1 /* Generated by Cython 0.29.12 */
2 
3 /* BEGIN: Cython Metadata
4 {
5     "distutils": {
6         "depends": [
7             "yt/utilities/lib/ewahboolarray/boolarray.h",
8             "yt/utilities/lib/ewahboolarray/ewah.h"
9         ],
10         "extra_compile_args": [
11             "-std=c++14"
12         ],
13         "include_dirs": [
14             "yt/utilities/lib/",
15             "yt/utilities/lib/ewahboolarray/"
16         ],
17         "language": "c++",
18         "name": "yt.utilities.lib.ewah_bool_wrap",
19         "sources": [
20             "yt/utilities/lib/ewah_bool_wrap.pyx"
21         ]
22     },
23     "module_name": "yt.utilities.lib.ewah_bool_wrap"
24 }
25 END: Cython Metadata */
26 
27 #define PY_SSIZE_T_CLEAN
28 #include "Python.h"
29 #ifndef Py_PYTHON_H
30     #error Python headers needed to compile C extensions, please install development version of Python.
31 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
32     #error Cython requires Python 2.6+ or Python 3.3+.
33 #else
34 #define CYTHON_ABI "0_29_12"
35 #define CYTHON_HEX_VERSION 0x001D0CF0
36 #define CYTHON_FUTURE_DIVISION 0
37 #include <stddef.h>
38 #ifndef offsetof
39   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
40 #endif
41 #if !defined(WIN32) && !defined(MS_WINDOWS)
42   #ifndef __stdcall
43     #define __stdcall
44   #endif
45   #ifndef __cdecl
46     #define __cdecl
47   #endif
48   #ifndef __fastcall
49     #define __fastcall
50   #endif
51 #endif
52 #ifndef DL_IMPORT
53   #define DL_IMPORT(t) t
54 #endif
55 #ifndef DL_EXPORT
56   #define DL_EXPORT(t) t
57 #endif
58 #define __PYX_COMMA ,
59 #ifndef HAVE_LONG_LONG
60   #if PY_VERSION_HEX >= 0x02070000
61     #define HAVE_LONG_LONG
62   #endif
63 #endif
64 #ifndef PY_LONG_LONG
65   #define PY_LONG_LONG LONG_LONG
66 #endif
67 #ifndef Py_HUGE_VAL
68   #define Py_HUGE_VAL HUGE_VAL
69 #endif
70 #ifdef PYPY_VERSION
71   #define CYTHON_COMPILING_IN_PYPY 1
72   #define CYTHON_COMPILING_IN_PYSTON 0
73   #define CYTHON_COMPILING_IN_CPYTHON 0
74   #undef CYTHON_USE_TYPE_SLOTS
75   #define CYTHON_USE_TYPE_SLOTS 0
76   #undef CYTHON_USE_PYTYPE_LOOKUP
77   #define CYTHON_USE_PYTYPE_LOOKUP 0
78   #if PY_VERSION_HEX < 0x03050000
79     #undef CYTHON_USE_ASYNC_SLOTS
80     #define CYTHON_USE_ASYNC_SLOTS 0
81   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
82     #define CYTHON_USE_ASYNC_SLOTS 1
83   #endif
84   #undef CYTHON_USE_PYLIST_INTERNALS
85   #define CYTHON_USE_PYLIST_INTERNALS 0
86   #undef CYTHON_USE_UNICODE_INTERNALS
87   #define CYTHON_USE_UNICODE_INTERNALS 0
88   #undef CYTHON_USE_UNICODE_WRITER
89   #define CYTHON_USE_UNICODE_WRITER 0
90   #undef CYTHON_USE_PYLONG_INTERNALS
91   #define CYTHON_USE_PYLONG_INTERNALS 0
92   #undef CYTHON_AVOID_BORROWED_REFS
93   #define CYTHON_AVOID_BORROWED_REFS 1
94   #undef CYTHON_ASSUME_SAFE_MACROS
95   #define CYTHON_ASSUME_SAFE_MACROS 0
96   #undef CYTHON_UNPACK_METHODS
97   #define CYTHON_UNPACK_METHODS 0
98   #undef CYTHON_FAST_THREAD_STATE
99   #define CYTHON_FAST_THREAD_STATE 0
100   #undef CYTHON_FAST_PYCALL
101   #define CYTHON_FAST_PYCALL 0
102   #undef CYTHON_PEP489_MULTI_PHASE_INIT
103   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
104   #undef CYTHON_USE_TP_FINALIZE
105   #define CYTHON_USE_TP_FINALIZE 0
106   #undef CYTHON_USE_DICT_VERSIONS
107   #define CYTHON_USE_DICT_VERSIONS 0
108   #undef CYTHON_USE_EXC_INFO_STACK
109   #define CYTHON_USE_EXC_INFO_STACK 0
110 #elif defined(PYSTON_VERSION)
111   #define CYTHON_COMPILING_IN_PYPY 0
112   #define CYTHON_COMPILING_IN_PYSTON 1
113   #define CYTHON_COMPILING_IN_CPYTHON 0
114   #ifndef CYTHON_USE_TYPE_SLOTS
115     #define CYTHON_USE_TYPE_SLOTS 1
116   #endif
117   #undef CYTHON_USE_PYTYPE_LOOKUP
118   #define CYTHON_USE_PYTYPE_LOOKUP 0
119   #undef CYTHON_USE_ASYNC_SLOTS
120   #define CYTHON_USE_ASYNC_SLOTS 0
121   #undef CYTHON_USE_PYLIST_INTERNALS
122   #define CYTHON_USE_PYLIST_INTERNALS 0
123   #ifndef CYTHON_USE_UNICODE_INTERNALS
124     #define CYTHON_USE_UNICODE_INTERNALS 1
125   #endif
126   #undef CYTHON_USE_UNICODE_WRITER
127   #define CYTHON_USE_UNICODE_WRITER 0
128   #undef CYTHON_USE_PYLONG_INTERNALS
129   #define CYTHON_USE_PYLONG_INTERNALS 0
130   #ifndef CYTHON_AVOID_BORROWED_REFS
131     #define CYTHON_AVOID_BORROWED_REFS 0
132   #endif
133   #ifndef CYTHON_ASSUME_SAFE_MACROS
134     #define CYTHON_ASSUME_SAFE_MACROS 1
135   #endif
136   #ifndef CYTHON_UNPACK_METHODS
137     #define CYTHON_UNPACK_METHODS 1
138   #endif
139   #undef CYTHON_FAST_THREAD_STATE
140   #define CYTHON_FAST_THREAD_STATE 0
141   #undef CYTHON_FAST_PYCALL
142   #define CYTHON_FAST_PYCALL 0
143   #undef CYTHON_PEP489_MULTI_PHASE_INIT
144   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
145   #undef CYTHON_USE_TP_FINALIZE
146   #define CYTHON_USE_TP_FINALIZE 0
147   #undef CYTHON_USE_DICT_VERSIONS
148   #define CYTHON_USE_DICT_VERSIONS 0
149   #undef CYTHON_USE_EXC_INFO_STACK
150   #define CYTHON_USE_EXC_INFO_STACK 0
151 #else
152   #define CYTHON_COMPILING_IN_PYPY 0
153   #define CYTHON_COMPILING_IN_PYSTON 0
154   #define CYTHON_COMPILING_IN_CPYTHON 1
155   #ifndef CYTHON_USE_TYPE_SLOTS
156     #define CYTHON_USE_TYPE_SLOTS 1
157   #endif
158   #if PY_VERSION_HEX < 0x02070000
159     #undef CYTHON_USE_PYTYPE_LOOKUP
160     #define CYTHON_USE_PYTYPE_LOOKUP 0
161   #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
162     #define CYTHON_USE_PYTYPE_LOOKUP 1
163   #endif
164   #if PY_MAJOR_VERSION < 3
165     #undef CYTHON_USE_ASYNC_SLOTS
166     #define CYTHON_USE_ASYNC_SLOTS 0
167   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
168     #define CYTHON_USE_ASYNC_SLOTS 1
169   #endif
170   #if PY_VERSION_HEX < 0x02070000
171     #undef CYTHON_USE_PYLONG_INTERNALS
172     #define CYTHON_USE_PYLONG_INTERNALS 0
173   #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
174     #define CYTHON_USE_PYLONG_INTERNALS 1
175   #endif
176   #ifndef CYTHON_USE_PYLIST_INTERNALS
177     #define CYTHON_USE_PYLIST_INTERNALS 1
178   #endif
179   #ifndef CYTHON_USE_UNICODE_INTERNALS
180     #define CYTHON_USE_UNICODE_INTERNALS 1
181   #endif
182   #if PY_VERSION_HEX < 0x030300F0
183     #undef CYTHON_USE_UNICODE_WRITER
184     #define CYTHON_USE_UNICODE_WRITER 0
185   #elif !defined(CYTHON_USE_UNICODE_WRITER)
186     #define CYTHON_USE_UNICODE_WRITER 1
187   #endif
188   #ifndef CYTHON_AVOID_BORROWED_REFS
189     #define CYTHON_AVOID_BORROWED_REFS 0
190   #endif
191   #ifndef CYTHON_ASSUME_SAFE_MACROS
192     #define CYTHON_ASSUME_SAFE_MACROS 1
193   #endif
194   #ifndef CYTHON_UNPACK_METHODS
195     #define CYTHON_UNPACK_METHODS 1
196   #endif
197   #ifndef CYTHON_FAST_THREAD_STATE
198     #define CYTHON_FAST_THREAD_STATE 1
199   #endif
200   #ifndef CYTHON_FAST_PYCALL
201     #define CYTHON_FAST_PYCALL 1
202   #endif
203   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
204     #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
205   #endif
206   #ifndef CYTHON_USE_TP_FINALIZE
207     #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
208   #endif
209   #ifndef CYTHON_USE_DICT_VERSIONS
210     #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
211   #endif
212   #ifndef CYTHON_USE_EXC_INFO_STACK
213     #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
214   #endif
215 #endif
216 #if !defined(CYTHON_FAST_PYCCALL)
217 #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
218 #endif
219 #if CYTHON_USE_PYLONG_INTERNALS
220   #include "longintrepr.h"
221   #undef SHIFT
222   #undef BASE
223   #undef MASK
224   #ifdef SIZEOF_VOID_P
225     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
226   #endif
227 #endif
228 #ifndef __has_attribute
229   #define __has_attribute(x) 0
230 #endif
231 #ifndef __has_cpp_attribute
232   #define __has_cpp_attribute(x) 0
233 #endif
234 #ifndef CYTHON_RESTRICT
235   #if defined(__GNUC__)
236     #define CYTHON_RESTRICT __restrict__
237   #elif defined(_MSC_VER) && _MSC_VER >= 1400
238     #define CYTHON_RESTRICT __restrict
239   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
240     #define CYTHON_RESTRICT restrict
241   #else
242     #define CYTHON_RESTRICT
243   #endif
244 #endif
245 #ifndef CYTHON_UNUSED
246 # if defined(__GNUC__)
247 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
248 #     define CYTHON_UNUSED __attribute__ ((__unused__))
249 #   else
250 #     define CYTHON_UNUSED
251 #   endif
252 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
253 #   define CYTHON_UNUSED __attribute__ ((__unused__))
254 # else
255 #   define CYTHON_UNUSED
256 # endif
257 #endif
258 #ifndef CYTHON_MAYBE_UNUSED_VAR
259 #  if defined(__cplusplus)
CYTHON_MAYBE_UNUSED_VAR(const T &)260      template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
261 #  else
262 #    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
263 #  endif
264 #endif
265 #ifndef CYTHON_NCP_UNUSED
266 # if CYTHON_COMPILING_IN_CPYTHON
267 #  define CYTHON_NCP_UNUSED
268 # else
269 #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
270 # endif
271 #endif
272 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
273 #ifdef _MSC_VER
274     #ifndef _MSC_STDINT_H_
275         #if _MSC_VER < 1300
276            typedef unsigned char     uint8_t;
277            typedef unsigned int      uint32_t;
278         #else
279            typedef unsigned __int8   uint8_t;
280            typedef unsigned __int32  uint32_t;
281         #endif
282     #endif
283 #else
284    #include <stdint.h>
285 #endif
286 #ifndef CYTHON_FALLTHROUGH
287   #if defined(__cplusplus) && __cplusplus >= 201103L
288     #if __has_cpp_attribute(fallthrough)
289       #define CYTHON_FALLTHROUGH [[fallthrough]]
290     #elif __has_cpp_attribute(clang::fallthrough)
291       #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
292     #elif __has_cpp_attribute(gnu::fallthrough)
293       #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
294     #endif
295   #endif
296   #ifndef CYTHON_FALLTHROUGH
297     #if __has_attribute(fallthrough)
298       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
299     #else
300       #define CYTHON_FALLTHROUGH
301     #endif
302   #endif
303   #if defined(__clang__ ) && defined(__apple_build_version__)
304     #if __apple_build_version__ < 7000000
305       #undef  CYTHON_FALLTHROUGH
306       #define CYTHON_FALLTHROUGH
307     #endif
308   #endif
309 #endif
310 
311 #ifndef __cplusplus
312   #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
313 #endif
314 #ifndef CYTHON_INLINE
315   #if defined(__clang__)
316     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
317   #else
318     #define CYTHON_INLINE inline
319   #endif
320 #endif
321 template<typename T>
__Pyx_call_destructor(T & x)322 void __Pyx_call_destructor(T& x) {
323     x.~T();
324 }
325 template<typename T>
326 class __Pyx_FakeReference {
327   public:
__Pyx_FakeReference()328     __Pyx_FakeReference() : ptr(NULL) { }
__Pyx_FakeReference(const T & ref)329     __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
operator ->()330     T *operator->() { return ptr; }
operator &()331     T *operator&() { return ptr; }
operator T&()332     operator T&() { return *ptr; }
operator ==(U other)333     template<typename U> bool operator ==(U other) { return *ptr == other; }
operator !=(U other)334     template<typename U> bool operator !=(U other) { return *ptr != other; }
335   private:
336     T *ptr;
337 };
338 
339 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
340   #define Py_OptimizeFlag 0
341 #endif
342 #define __PYX_BUILD_PY_SSIZE_T "n"
343 #define CYTHON_FORMAT_SSIZE_T "z"
344 #if PY_MAJOR_VERSION < 3
345   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
346   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
347           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
348   #define __Pyx_DefaultClassType PyClass_Type
349 #else
350   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
351 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
352   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
353           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
354 #else
355   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
356           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
357 #endif
358   #define __Pyx_DefaultClassType PyType_Type
359 #endif
360 #ifndef Py_TPFLAGS_CHECKTYPES
361   #define Py_TPFLAGS_CHECKTYPES 0
362 #endif
363 #ifndef Py_TPFLAGS_HAVE_INDEX
364   #define Py_TPFLAGS_HAVE_INDEX 0
365 #endif
366 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
367   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
368 #endif
369 #ifndef Py_TPFLAGS_HAVE_FINALIZE
370   #define Py_TPFLAGS_HAVE_FINALIZE 0
371 #endif
372 #ifndef METH_STACKLESS
373   #define METH_STACKLESS 0
374 #endif
375 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
376   #ifndef METH_FASTCALL
377      #define METH_FASTCALL 0x80
378   #endif
379   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
380   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
381                                                           Py_ssize_t nargs, PyObject *kwnames);
382 #else
383   #define __Pyx_PyCFunctionFast _PyCFunctionFast
384   #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
385 #endif
386 #if CYTHON_FAST_PYCCALL
387 #define __Pyx_PyFastCFunction_Check(func)\
388     ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
389 #else
390 #define __Pyx_PyFastCFunction_Check(func) 0
391 #endif
392 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
393   #define PyObject_Malloc(s)   PyMem_Malloc(s)
394   #define PyObject_Free(p)     PyMem_Free(p)
395   #define PyObject_Realloc(p)  PyMem_Realloc(p)
396 #endif
397 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
398   #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
399   #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
400   #define PyMem_RawFree(p)             PyMem_Free(p)
401 #endif
402 #if CYTHON_COMPILING_IN_PYSTON
403   #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
404   #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
405 #else
406   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
407   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
408 #endif
409 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
410   #define __Pyx_PyThreadState_Current PyThreadState_GET()
411 #elif PY_VERSION_HEX >= 0x03060000
412   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
413 #elif PY_VERSION_HEX >= 0x03000000
414   #define __Pyx_PyThreadState_Current PyThreadState_GET()
415 #else
416   #define __Pyx_PyThreadState_Current _PyThreadState_Current
417 #endif
418 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
419 #include "pythread.h"
420 #define Py_tss_NEEDS_INIT 0
421 typedef int Py_tss_t;
PyThread_tss_create(Py_tss_t * key)422 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
423   *key = PyThread_create_key();
424   return 0;
425 }
PyThread_tss_alloc(void)426 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
427   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
428   *key = Py_tss_NEEDS_INIT;
429   return key;
430 }
PyThread_tss_free(Py_tss_t * key)431 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
432   PyObject_Free(key);
433 }
PyThread_tss_is_created(Py_tss_t * key)434 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
435   return *key != Py_tss_NEEDS_INIT;
436 }
PyThread_tss_delete(Py_tss_t * key)437 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
438   PyThread_delete_key(*key);
439   *key = Py_tss_NEEDS_INIT;
440 }
PyThread_tss_set(Py_tss_t * key,void * value)441 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
442   return PyThread_set_key_value(*key, value);
443 }
PyThread_tss_get(Py_tss_t * key)444 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
445   return PyThread_get_key_value(*key);
446 }
447 #endif
448 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
449 #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
450 #else
451 #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
452 #endif
453 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
454   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
455   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
456 #else
457   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
458   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
459 #endif
460 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
461 #define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
462 #else
463 #define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
464 #endif
465 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
466   #define CYTHON_PEP393_ENABLED 1
467   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
468                                               0 : _PyUnicode_Ready((PyObject *)(op)))
469   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
470   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
471   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
472   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
473   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
474   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
475   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
476   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
477 #else
478   #define CYTHON_PEP393_ENABLED 0
479   #define PyUnicode_1BYTE_KIND  1
480   #define PyUnicode_2BYTE_KIND  2
481   #define PyUnicode_4BYTE_KIND  4
482   #define __Pyx_PyUnicode_READY(op)       (0)
483   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
484   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
485   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
486   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
487   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
488   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
489   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
490   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
491 #endif
492 #if CYTHON_COMPILING_IN_PYPY
493   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
494   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
495 #else
496   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
497   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
498       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
499 #endif
500 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
501   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
502 #endif
503 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
504   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
505 #endif
506 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
507   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
508 #endif
509 #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))
510 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
511 #if PY_MAJOR_VERSION >= 3
512   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
513 #else
514   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
515 #endif
516 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
517   #define PyObject_ASCII(o)            PyObject_Repr(o)
518 #endif
519 #if PY_MAJOR_VERSION >= 3
520   #define PyBaseString_Type            PyUnicode_Type
521   #define PyStringObject               PyUnicodeObject
522   #define PyString_Type                PyUnicode_Type
523   #define PyString_Check               PyUnicode_Check
524   #define PyString_CheckExact          PyUnicode_CheckExact
525   #define PyObject_Unicode             PyObject_Str
526 #endif
527 #if PY_MAJOR_VERSION >= 3
528   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
529   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
530 #else
531   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
532   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
533 #endif
534 #ifndef PySet_CheckExact
535   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
536 #endif
537 #if CYTHON_ASSUME_SAFE_MACROS
538   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
539 #else
540   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
541 #endif
542 #if PY_MAJOR_VERSION >= 3
543   #define PyIntObject                  PyLongObject
544   #define PyInt_Type                   PyLong_Type
545   #define PyInt_Check(op)              PyLong_Check(op)
546   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
547   #define PyInt_FromString             PyLong_FromString
548   #define PyInt_FromUnicode            PyLong_FromUnicode
549   #define PyInt_FromLong               PyLong_FromLong
550   #define PyInt_FromSize_t             PyLong_FromSize_t
551   #define PyInt_FromSsize_t            PyLong_FromSsize_t
552   #define PyInt_AsLong                 PyLong_AsLong
553   #define PyInt_AS_LONG                PyLong_AS_LONG
554   #define PyInt_AsSsize_t              PyLong_AsSsize_t
555   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
556   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
557   #define PyNumber_Int                 PyNumber_Long
558 #endif
559 #if PY_MAJOR_VERSION >= 3
560   #define PyBoolObject                 PyLongObject
561 #endif
562 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
563   #ifndef PyUnicode_InternFromString
564     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
565   #endif
566 #endif
567 #if PY_VERSION_HEX < 0x030200A4
568   typedef long Py_hash_t;
569   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
570   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
571 #else
572   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
573   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
574 #endif
575 #if PY_MAJOR_VERSION >= 3
576   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
577 #else
578   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
579 #endif
580 #if CYTHON_USE_ASYNC_SLOTS
581   #if PY_VERSION_HEX >= 0x030500B1
582     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
583     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
584   #else
585     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
586   #endif
587 #else
588   #define __Pyx_PyType_AsAsync(obj) NULL
589 #endif
590 #ifndef __Pyx_PyAsyncMethodsStruct
591     typedef struct {
592         unaryfunc am_await;
593         unaryfunc am_aiter;
594         unaryfunc am_anext;
595     } __Pyx_PyAsyncMethodsStruct;
596 #endif
597 
598 #if defined(WIN32) || defined(MS_WINDOWS)
599   #define _USE_MATH_DEFINES
600 #endif
601 #include <math.h>
602 #ifdef NAN
603 #define __PYX_NAN() ((float) NAN)
604 #else
__PYX_NAN()605 static CYTHON_INLINE float __PYX_NAN() {
606   float value;
607   memset(&value, 0xFF, sizeof(value));
608   return value;
609 }
610 #endif
611 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
612 #define __Pyx_truncl trunc
613 #else
614 #define __Pyx_truncl truncl
615 #endif
616 
617 
618 #define __PYX_ERR(f_index, lineno, Ln_error) \
619 { \
620   __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
621 }
622 
623 #ifndef __PYX_EXTERN_C
624   #ifdef __cplusplus
625     #define __PYX_EXTERN_C extern "C"
626   #else
627     #define __PYX_EXTERN_C extern
628   #endif
629 #endif
630 
631 #define __PYX_HAVE__yt__utilities__lib__ewah_bool_wrap
632 #define __PYX_HAVE_API__yt__utilities__lib__ewah_bool_wrap
633 /* Early includes */
634 #include <string.h>
635 #include <stdio.h>
636 #include "numpy/arrayobject.h"
637 #include "numpy/ufuncobject.h"
638 #include "ios"
639 #include "new"
640 #include "stdexcept"
641 #include "typeinfo"
642 #include <utility>
643 #include <set>
644 #include <vector>
645 #include <stdint.h>
646 #include <map>
647 #include <string>
648 #include <ostream>
649 #include <istream>
650 #include <sstream>
651 #include "ewah.h"
652 #include "boolarray.h"
653 #include <stdlib.h>
654 #include <algorithm>
655 #include <float.h>
656 #include <math.h>
657 #include "pythread.h"
658 #include "pystate.h"
659 #ifdef _OPENMP
660 #include <omp.h>
661 #endif /* _OPENMP */
662 
663 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
664 #define CYTHON_WITHOUT_ASSERTIONS
665 #endif
666 
667 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
668                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
669 
670 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
671 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
672 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
673 #define __PYX_DEFAULT_STRING_ENCODING ""
674 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
675 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
676 #define __Pyx_uchar_cast(c) ((unsigned char)c)
677 #define __Pyx_long_cast(x) ((long)x)
678 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
679     (sizeof(type) < sizeof(Py_ssize_t))  ||\
680     (sizeof(type) > sizeof(Py_ssize_t) &&\
681           likely(v < (type)PY_SSIZE_T_MAX ||\
682                  v == (type)PY_SSIZE_T_MAX)  &&\
683           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
684                                 v == (type)PY_SSIZE_T_MIN)))  ||\
685     (sizeof(type) == sizeof(Py_ssize_t) &&\
686           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
687                                v == (type)PY_SSIZE_T_MAX)))  )
__Pyx_is_valid_index(Py_ssize_t i,Py_ssize_t limit)688 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
689     return (size_t) i < (size_t) limit;
690 }
691 #if defined (__cplusplus) && __cplusplus >= 201103L
692     #include <cstdlib>
693     #define __Pyx_sst_abs(value) std::abs(value)
694 #elif SIZEOF_INT >= SIZEOF_SIZE_T
695     #define __Pyx_sst_abs(value) abs(value)
696 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
697     #define __Pyx_sst_abs(value) labs(value)
698 #elif defined (_MSC_VER)
699     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
700 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
701     #define __Pyx_sst_abs(value) llabs(value)
702 #elif defined (__GNUC__)
703     #define __Pyx_sst_abs(value) __builtin_llabs(value)
704 #else
705     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
706 #endif
707 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
708 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
709 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
710 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
711 #define __Pyx_PyBytes_FromString        PyBytes_FromString
712 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
713 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
714 #if PY_MAJOR_VERSION < 3
715     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
716     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
717 #else
718     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
719     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
720 #endif
721 #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
722 #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
723 #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
724 #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
725 #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
726 #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
727 #define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
728 #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
729 #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
730 #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
731 #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
732 #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
733 #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
734 #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
735 #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
736 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
__Pyx_Py_UNICODE_strlen(const Py_UNICODE * u)737 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
738     const Py_UNICODE *u_end = u;
739     while (*u_end++) ;
740     return (size_t)(u_end - u - 1);
741 }
742 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
743 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
744 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
745 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
746 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
747 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
748 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
749 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
750 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
751 #define __Pyx_PySequence_Tuple(obj)\
752     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
753 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
754 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
755 #if CYTHON_ASSUME_SAFE_MACROS
756 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
757 #else
758 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
759 #endif
760 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
761 #if PY_MAJOR_VERSION >= 3
762 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
763 #else
764 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
765 #endif
766 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
767 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
768 static int __Pyx_sys_getdefaultencoding_not_ascii;
__Pyx_init_sys_getdefaultencoding_params(void)769 static int __Pyx_init_sys_getdefaultencoding_params(void) {
770     PyObject* sys;
771     PyObject* default_encoding = NULL;
772     PyObject* ascii_chars_u = NULL;
773     PyObject* ascii_chars_b = NULL;
774     const char* default_encoding_c;
775     sys = PyImport_ImportModule("sys");
776     if (!sys) goto bad;
777     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
778     Py_DECREF(sys);
779     if (!default_encoding) goto bad;
780     default_encoding_c = PyBytes_AsString(default_encoding);
781     if (!default_encoding_c) goto bad;
782     if (strcmp(default_encoding_c, "ascii") == 0) {
783         __Pyx_sys_getdefaultencoding_not_ascii = 0;
784     } else {
785         char ascii_chars[128];
786         int c;
787         for (c = 0; c < 128; c++) {
788             ascii_chars[c] = c;
789         }
790         __Pyx_sys_getdefaultencoding_not_ascii = 1;
791         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
792         if (!ascii_chars_u) goto bad;
793         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
794         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
795             PyErr_Format(
796                 PyExc_ValueError,
797                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
798                 default_encoding_c);
799             goto bad;
800         }
801         Py_DECREF(ascii_chars_u);
802         Py_DECREF(ascii_chars_b);
803     }
804     Py_DECREF(default_encoding);
805     return 0;
806 bad:
807     Py_XDECREF(default_encoding);
808     Py_XDECREF(ascii_chars_u);
809     Py_XDECREF(ascii_chars_b);
810     return -1;
811 }
812 #endif
813 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
814 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
815 #else
816 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
817 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
818 static char* __PYX_DEFAULT_STRING_ENCODING;
__Pyx_init_sys_getdefaultencoding_params(void)819 static int __Pyx_init_sys_getdefaultencoding_params(void) {
820     PyObject* sys;
821     PyObject* default_encoding = NULL;
822     char* default_encoding_c;
823     sys = PyImport_ImportModule("sys");
824     if (!sys) goto bad;
825     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
826     Py_DECREF(sys);
827     if (!default_encoding) goto bad;
828     default_encoding_c = PyBytes_AsString(default_encoding);
829     if (!default_encoding_c) goto bad;
830     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
831     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
832     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
833     Py_DECREF(default_encoding);
834     return 0;
835 bad:
836     Py_XDECREF(default_encoding);
837     return -1;
838 }
839 #endif
840 #endif
841 
842 
843 /* Test for GCC > 2.95 */
844 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
845   #define likely(x)   __builtin_expect(!!(x), 1)
846   #define unlikely(x) __builtin_expect(!!(x), 0)
847 #else /* !__GNUC__ or GCC < 2.95 */
848   #define likely(x)   (x)
849   #define unlikely(x) (x)
850 #endif /* __GNUC__ */
__Pyx_pretend_to_initialize(void * ptr)851 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
852 
853 static PyObject *__pyx_m = NULL;
854 static PyObject *__pyx_d;
855 static PyObject *__pyx_b;
856 static PyObject *__pyx_cython_runtime = NULL;
857 static PyObject *__pyx_empty_tuple;
858 static PyObject *__pyx_empty_bytes;
859 static PyObject *__pyx_empty_unicode;
860 static int __pyx_lineno;
861 static int __pyx_clineno = 0;
862 static const char * __pyx_cfilenm= __FILE__;
863 static const char *__pyx_filename;
864 
865 /* Header.proto */
866 #if !defined(CYTHON_CCOMPLEX)
867   #if defined(__cplusplus)
868     #define CYTHON_CCOMPLEX 1
869   #elif defined(_Complex_I)
870     #define CYTHON_CCOMPLEX 1
871   #else
872     #define CYTHON_CCOMPLEX 0
873   #endif
874 #endif
875 #if CYTHON_CCOMPLEX
876   #ifdef __cplusplus
877     #include <complex>
878   #else
879     #include <complex.h>
880   #endif
881 #endif
882 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
883   #undef _Complex_I
884   #define _Complex_I 1.0fj
885 #endif
886 
887 
888 static const char *__pyx_f[] = {
889   "yt/utilities/lib/ewah_bool_wrap.pyx",
890   "stringsource",
891   "__init__.pxd",
892   "yt/utilities/lib/geometry_utils.pxd",
893   "type.pxd",
894 };
895 /* BufferFormatStructs.proto */
896 #define IS_UNSIGNED(type) (((type) -1) > 0)
897 struct __Pyx_StructField_;
898 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
899 typedef struct {
900   const char* name;
901   struct __Pyx_StructField_* fields;
902   size_t size;
903   size_t arraysize[8];
904   int ndim;
905   char typegroup;
906   char is_unsigned;
907   int flags;
908 } __Pyx_TypeInfo;
909 typedef struct __Pyx_StructField_ {
910   __Pyx_TypeInfo* type;
911   const char* name;
912   size_t offset;
913 } __Pyx_StructField;
914 typedef struct {
915   __Pyx_StructField* field;
916   size_t parent_offset;
917 } __Pyx_BufFmt_StackElem;
918 typedef struct {
919   __Pyx_StructField root;
920   __Pyx_BufFmt_StackElem* head;
921   size_t fmt_offset;
922   size_t new_count, enc_count;
923   size_t struct_alignment;
924   int is_complex;
925   char enc_type;
926   char new_packmode;
927   char enc_packmode;
928   char is_valid_array;
929 } __Pyx_BufFmt_Context;
930 
931 /* MemviewSliceStruct.proto */
932 struct __pyx_memoryview_obj;
933 typedef struct {
934   struct __pyx_memoryview_obj *memview;
935   char *data;
936   Py_ssize_t shape[8];
937   Py_ssize_t strides[8];
938   Py_ssize_t suboffsets[8];
939 } __Pyx_memviewslice;
940 #define __Pyx_MemoryView_Len(m)  (m.shape[0])
941 
942 /* Atomics.proto */
943 #include <pythread.h>
944 #ifndef CYTHON_ATOMICS
945     #define CYTHON_ATOMICS 1
946 #endif
947 #define __pyx_atomic_int_type int
948 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
949                     (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
950                     !defined(__i386__)
951     #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
952     #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
953     #ifdef __PYX_DEBUG_ATOMICS
954         #warning "Using GNU atomics"
955     #endif
956 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
957     #include <Windows.h>
958     #undef __pyx_atomic_int_type
959     #define __pyx_atomic_int_type LONG
960     #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
961     #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
962     #ifdef __PYX_DEBUG_ATOMICS
963         #pragma message ("Using MSVC atomics")
964     #endif
965 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
966     #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
967     #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
968     #ifdef __PYX_DEBUG_ATOMICS
969         #warning "Using Intel atomics"
970     #endif
971 #else
972     #undef CYTHON_ATOMICS
973     #define CYTHON_ATOMICS 0
974     #ifdef __PYX_DEBUG_ATOMICS
975         #warning "Not using atomics"
976     #endif
977 #endif
978 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
979 #if CYTHON_ATOMICS
980     #define __pyx_add_acquisition_count(memview)\
981              __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
982     #define __pyx_sub_acquisition_count(memview)\
983             __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
984 #else
985     #define __pyx_add_acquisition_count(memview)\
986             __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
987     #define __pyx_sub_acquisition_count(memview)\
988             __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
989 #endif
990 
991 /* ForceInitThreads.proto */
992 #ifndef __PYX_FORCE_INIT_THREADS
993   #define __PYX_FORCE_INIT_THREADS 0
994 #endif
995 
996 /* NoFastGil.proto */
997 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
998 #define __Pyx_PyGILState_Release PyGILState_Release
999 #define __Pyx_FastGIL_Remember()
1000 #define __Pyx_FastGIL_Forget()
1001 #define __Pyx_FastGilFuncInit()
1002 
1003 
1004 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776
1005  * # in Cython to enable them only on the right systems.
1006  *
1007  * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
1008  * ctypedef npy_int16      int16_t
1009  * ctypedef npy_int32      int32_t
1010  */
1011 typedef npy_int8 __pyx_t_5numpy_int8_t;
1012 
1013 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777
1014  *
1015  * ctypedef npy_int8       int8_t
1016  * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
1017  * ctypedef npy_int32      int32_t
1018  * ctypedef npy_int64      int64_t
1019  */
1020 typedef npy_int16 __pyx_t_5numpy_int16_t;
1021 
1022 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778
1023  * ctypedef npy_int8       int8_t
1024  * ctypedef npy_int16      int16_t
1025  * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
1026  * ctypedef npy_int64      int64_t
1027  * #ctypedef npy_int96      int96_t
1028  */
1029 typedef npy_int32 __pyx_t_5numpy_int32_t;
1030 
1031 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779
1032  * ctypedef npy_int16      int16_t
1033  * ctypedef npy_int32      int32_t
1034  * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
1035  * #ctypedef npy_int96      int96_t
1036  * #ctypedef npy_int128     int128_t
1037  */
1038 typedef npy_int64 __pyx_t_5numpy_int64_t;
1039 
1040 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783
1041  * #ctypedef npy_int128     int128_t
1042  *
1043  * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
1044  * ctypedef npy_uint16     uint16_t
1045  * ctypedef npy_uint32     uint32_t
1046  */
1047 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1048 
1049 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784
1050  *
1051  * ctypedef npy_uint8      uint8_t
1052  * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
1053  * ctypedef npy_uint32     uint32_t
1054  * ctypedef npy_uint64     uint64_t
1055  */
1056 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1057 
1058 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785
1059  * ctypedef npy_uint8      uint8_t
1060  * ctypedef npy_uint16     uint16_t
1061  * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
1062  * ctypedef npy_uint64     uint64_t
1063  * #ctypedef npy_uint96     uint96_t
1064  */
1065 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1066 
1067 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786
1068  * ctypedef npy_uint16     uint16_t
1069  * ctypedef npy_uint32     uint32_t
1070  * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
1071  * #ctypedef npy_uint96     uint96_t
1072  * #ctypedef npy_uint128    uint128_t
1073  */
1074 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1075 
1076 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790
1077  * #ctypedef npy_uint128    uint128_t
1078  *
1079  * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
1080  * ctypedef npy_float64    float64_t
1081  * #ctypedef npy_float80    float80_t
1082  */
1083 typedef npy_float32 __pyx_t_5numpy_float32_t;
1084 
1085 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791
1086  *
1087  * ctypedef npy_float32    float32_t
1088  * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
1089  * #ctypedef npy_float80    float80_t
1090  * #ctypedef npy_float128   float128_t
1091  */
1092 typedef npy_float64 __pyx_t_5numpy_float64_t;
1093 
1094 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800
1095  * # The int types are mapped a bit surprising --
1096  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1097  * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
1098  * ctypedef npy_longlong   long_t
1099  * ctypedef npy_longlong   longlong_t
1100  */
1101 typedef npy_long __pyx_t_5numpy_int_t;
1102 
1103 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801
1104  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1105  * ctypedef npy_long       int_t
1106  * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
1107  * ctypedef npy_longlong   longlong_t
1108  *
1109  */
1110 typedef npy_longlong __pyx_t_5numpy_long_t;
1111 
1112 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802
1113  * ctypedef npy_long       int_t
1114  * ctypedef npy_longlong   long_t
1115  * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
1116  *
1117  * ctypedef npy_ulong      uint_t
1118  */
1119 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1120 
1121 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804
1122  * ctypedef npy_longlong   longlong_t
1123  *
1124  * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
1125  * ctypedef npy_ulonglong  ulong_t
1126  * ctypedef npy_ulonglong  ulonglong_t
1127  */
1128 typedef npy_ulong __pyx_t_5numpy_uint_t;
1129 
1130 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805
1131  *
1132  * ctypedef npy_ulong      uint_t
1133  * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
1134  * ctypedef npy_ulonglong  ulonglong_t
1135  *
1136  */
1137 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1138 
1139 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806
1140  * ctypedef npy_ulong      uint_t
1141  * ctypedef npy_ulonglong  ulong_t
1142  * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
1143  *
1144  * ctypedef npy_intp       intp_t
1145  */
1146 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1147 
1148 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808
1149  * ctypedef npy_ulonglong  ulonglong_t
1150  *
1151  * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
1152  * ctypedef npy_uintp      uintp_t
1153  *
1154  */
1155 typedef npy_intp __pyx_t_5numpy_intp_t;
1156 
1157 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809
1158  *
1159  * ctypedef npy_intp       intp_t
1160  * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
1161  *
1162  * ctypedef npy_double     float_t
1163  */
1164 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1165 
1166 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811
1167  * ctypedef npy_uintp      uintp_t
1168  *
1169  * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
1170  * ctypedef npy_double     double_t
1171  * ctypedef npy_longdouble longdouble_t
1172  */
1173 typedef npy_double __pyx_t_5numpy_float_t;
1174 
1175 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812
1176  *
1177  * ctypedef npy_double     float_t
1178  * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
1179  * ctypedef npy_longdouble longdouble_t
1180  *
1181  */
1182 typedef npy_double __pyx_t_5numpy_double_t;
1183 
1184 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813
1185  * ctypedef npy_double     float_t
1186  * ctypedef npy_double     double_t
1187  * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
1188  *
1189  * ctypedef npy_cfloat      cfloat_t
1190  */
1191 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1192 
1193 /* "yt/utilities/lib/ewah_bool_array.pxd":97
1194  *     ctypedef uint32_t ewah_word_type
1195  * ELSE:
1196  *     ctypedef np.uint32_t ewah_word_type             # <<<<<<<<<<<<<<
1197  * ctypedef EWAHBoolArray[ewah_word_type] ewah_bool_array
1198  * ctypedef EWAHBoolArraySetBitForwardIterator[ewah_word_type] ewah_bool_iterator
1199  */
1200 typedef __pyx_t_5numpy_uint32_t __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_word_type;
1201 
1202 /* "yt/utilities/lib/ewah_bool_wrap.pxd":13
1203  * )
1204  *
1205  * ctypedef bint bitarrtype             # <<<<<<<<<<<<<<
1206  * ctypedef pair[np.uint64_t, np.uint64_t] ind_pair
1207  *
1208  */
1209 typedef int __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype;
1210 /* Declarations.proto */
1211 #if CYTHON_CCOMPLEX
1212   #ifdef __cplusplus
1213     typedef ::std::complex< float > __pyx_t_float_complex;
1214   #else
1215     typedef float _Complex __pyx_t_float_complex;
1216   #endif
1217 #else
1218     typedef struct { float real, imag; } __pyx_t_float_complex;
1219 #endif
1220 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1221 
1222 /* Declarations.proto */
1223 #if CYTHON_CCOMPLEX
1224   #ifdef __cplusplus
1225     typedef ::std::complex< double > __pyx_t_double_complex;
1226   #else
1227     typedef double _Complex __pyx_t_double_complex;
1228   #endif
1229 #else
1230     typedef struct { double real, imag; } __pyx_t_double_complex;
1231 #endif
1232 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1233 
1234 
1235 /*--- Type declarations ---*/
1236 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks;
1237 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection;
1238 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed;
1239 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet;
1240 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector;
1241 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet;
1242 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector;
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 
1284 /* "yt/utilities/lib/ewah_bool_array.pxd":98
1285  * ELSE:
1286  *     ctypedef np.uint32_t ewah_word_type
1287  * ctypedef EWAHBoolArray[ewah_word_type] ewah_bool_array             # <<<<<<<<<<<<<<
1288  * ctypedef EWAHBoolArraySetBitForwardIterator[ewah_word_type] ewah_bool_iterator
1289  * ctypedef vector[size_t] bitset_array
1290  */
1291 typedef ewah::EWAHBoolArray<__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_word_type>  __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array;
1292 
1293 /* "yt/utilities/lib/ewah_bool_array.pxd":99
1294  *     ctypedef np.uint32_t ewah_word_type
1295  * ctypedef EWAHBoolArray[ewah_word_type] ewah_bool_array
1296  * ctypedef EWAHBoolArraySetBitForwardIterator[ewah_word_type] ewah_bool_iterator             # <<<<<<<<<<<<<<
1297  * ctypedef vector[size_t] bitset_array
1298  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewah_map
1299  */
1300 typedef ewah::EWAHBoolArraySetBitForwardIterator<__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_word_type>  __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator;
1301 
1302 /* "yt/utilities/lib/ewah_bool_array.pxd":100
1303  * ctypedef EWAHBoolArray[ewah_word_type] ewah_bool_array
1304  * ctypedef EWAHBoolArraySetBitForwardIterator[ewah_word_type] ewah_bool_iterator
1305  * ctypedef vector[size_t] bitset_array             # <<<<<<<<<<<<<<
1306  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewah_map
1307  * ctypedef stringstream sstream
1308  */
1309 typedef std::vector<size_t>  __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_bitset_array;
1310 
1311 /* "yt/utilities/lib/ewah_bool_array.pxd":101
1312  * ctypedef EWAHBoolArraySetBitForwardIterator[ewah_word_type] ewah_bool_iterator
1313  * ctypedef vector[size_t] bitset_array
1314  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewah_map             # <<<<<<<<<<<<<<
1315  * ctypedef stringstream sstream
1316  * ctypedef BoolArray[ewah_word_type] bool_array
1317  */
1318 typedef std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map;
1319 
1320 /* "yt/utilities/lib/ewah_bool_array.pxd":102
1321  * ctypedef vector[size_t] bitset_array
1322  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewah_map
1323  * ctypedef stringstream sstream             # <<<<<<<<<<<<<<
1324  * ctypedef BoolArray[ewah_word_type] bool_array
1325  */
1326 typedef std::stringstream __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_sstream;
1327 
1328 /* "yt/utilities/lib/ewah_bool_array.pxd":103
1329  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewah_map
1330  * ctypedef stringstream sstream
1331  * ctypedef BoolArray[ewah_word_type] bool_array             # <<<<<<<<<<<<<<
1332  */
1333 typedef ewah::BoolArray<__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_word_type>  __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_bool_array;
1334 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions;
1335 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse;
1336 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined;
1337 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set;
1338 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get;
1339 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated;
1340 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated;
1341 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set;
1342 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get;
1343 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated;
1344 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated;
1345 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones;
1346 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set;
1347 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get;
1348 
1349 /* "yt/utilities/lib/ewah_bool_wrap.pxd":14
1350  *
1351  * ctypedef bint bitarrtype
1352  * ctypedef pair[np.uint64_t, np.uint64_t] ind_pair             # <<<<<<<<<<<<<<
1353  *
1354  * cdef class FileBitmasks:
1355  */
1356 typedef std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_5numpy_uint64_t>  __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair;
1357 
1358 /* "yt/utilities/lib/ewah_bool_wrap.pxd":25
1359  *     cdef bint _iseq(self, FileBitmasks solf)
1360  *     cdef BoolArrayCollection _get_bitmask(self, np.uint32_t ifile)
1361  *     cdef tuple _find_collisions(self, BoolArrayCollection coll, bint verbose=*)             # <<<<<<<<<<<<<<
1362  *     cdef tuple _find_collisions_coarse(self, BoolArrayCollection coll, bint
1363  *                 verbose=*, file_list=*)
1364  */
1365 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions {
1366   int __pyx_n;
1367   int verbose;
1368 };
1369 
1370 /* "yt/utilities/lib/ewah_bool_wrap.pxd":26
1371  *     cdef BoolArrayCollection _get_bitmask(self, np.uint32_t ifile)
1372  *     cdef tuple _find_collisions(self, BoolArrayCollection coll, bint verbose=*)
1373  *     cdef tuple _find_collisions_coarse(self, BoolArrayCollection coll, bint             # <<<<<<<<<<<<<<
1374  *                 verbose=*, file_list=*)
1375  *     cdef tuple _find_collisions_refined(self, BoolArrayCollection coll, bint verbose=*)
1376  */
1377 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse {
1378   int __pyx_n;
1379   int verbose;
1380   PyObject *file_list;
1381 };
1382 
1383 /* "yt/utilities/lib/ewah_bool_wrap.pxd":28
1384  *     cdef tuple _find_collisions_coarse(self, BoolArrayCollection coll, bint
1385  *                 verbose=*, file_list=*)
1386  *     cdef tuple _find_collisions_refined(self, BoolArrayCollection coll, bint verbose=*)             # <<<<<<<<<<<<<<
1387  *     cdef void _set(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2=*)
1388  *     cdef void _set_coarse(self, np.uint32_t ifile, np.uint64_t i1)
1389  */
1390 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined {
1391   int __pyx_n;
1392   int verbose;
1393 };
1394 
1395 /* "yt/utilities/lib/ewah_bool_wrap.pxd":29
1396  *                 verbose=*, file_list=*)
1397  *     cdef tuple _find_collisions_refined(self, BoolArrayCollection coll, bint verbose=*)
1398  *     cdef void _set(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2=*)             # <<<<<<<<<<<<<<
1399  *     cdef void _set_coarse(self, np.uint32_t ifile, np.uint64_t i1)
1400  *     cdef void _set_refined(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2)
1401  */
1402 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set {
1403   int __pyx_n;
1404   __pyx_t_5numpy_uint64_t i2;
1405 };
1406 
1407 /* "yt/utilities/lib/ewah_bool_wrap.pxd":39
1408  *     cdef void _set_map(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2)
1409  *     cdef void _set_refn(self, np.uint32_t ifile, np.uint64_t i1)
1410  *     cdef bint _get(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2=*)             # <<<<<<<<<<<<<<
1411  *     cdef bint _get_coarse(self, np.uint32_t ifile, np.uint64_t i1)
1412  *     cdef void _get_coarse_array(self, np.uint32_t ifile, np.uint64_t imax, np.uint8_t[:] arr) except *
1413  */
1414 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get {
1415   int __pyx_n;
1416   __pyx_t_5numpy_uint64_t i2;
1417 };
1418 
1419 /* "yt/utilities/lib/ewah_bool_wrap.pxd":50
1420  *     cdef void _logicalxor(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out)
1421  *     cdef void _logicaland(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out)
1422  *     cdef void _select_contaminated(self, np.uint32_t ifile, BoolArrayCollection mask, np.uint8_t[:] out,             # <<<<<<<<<<<<<<
1423  *                np.uint8_t[:] secondary_files, BoolArrayCollection mask2=*)
1424  *     cdef void _select_uncontaminated(self, np.uint32_t ifile, BoolArrayCollection mask, np.uint8_t[:] out,
1425  */
1426 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated {
1427   int __pyx_n;
1428   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *mask2;
1429 };
1430 
1431 /* "yt/utilities/lib/ewah_bool_wrap.pxd":52
1432  *     cdef void _select_contaminated(self, np.uint32_t ifile, BoolArrayCollection mask, np.uint8_t[:] out,
1433  *                np.uint8_t[:] secondary_files, BoolArrayCollection mask2=*)
1434  *     cdef void _select_uncontaminated(self, np.uint32_t ifile, BoolArrayCollection mask, np.uint8_t[:] out,             # <<<<<<<<<<<<<<
1435  *                BoolArrayCollection mask2=*)
1436  *     cdef bytes _dumps(self, np.uint32_t ifile)
1437  */
1438 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated {
1439   int __pyx_n;
1440   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *mask2;
1441 };
1442 
1443 /* "yt/utilities/lib/ewah_bool_wrap.pxd":66
1444  *     cdef void _reset(self)
1445  *     cdef int _richcmp(self, BoolArrayCollection solf, int op) except -1
1446  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2=*)             # <<<<<<<<<<<<<<
1447  *     cdef void _set_coarse(self, np.uint64_t i1)
1448  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2)
1449  */
1450 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set {
1451   int __pyx_n;
1452   __pyx_t_5numpy_uint64_t i2;
1453 };
1454 
1455 /* "yt/utilities/lib/ewah_bool_wrap.pxd":73
1456  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2)
1457  *     cdef void _set_refn(self, np.uint64_t i1)
1458  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2=*)             # <<<<<<<<<<<<<<
1459  *     cdef bint _get_coarse(self, np.uint64_t i1)
1460  *     cdef void _get_coarse_array(self, np.uint64_t imax, np.uint8_t[:] arr) except *
1461  */
1462 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get {
1463   int __pyx_n;
1464   __pyx_t_5numpy_uint64_t i2;
1465 };
1466 
1467 /* "yt/utilities/lib/ewah_bool_wrap.pxd":87
1468  *     cdef void _logicalxor(self, BoolArrayCollection solf, BoolArrayCollection out)
1469  *     cdef void _logicaland(self, BoolArrayCollection solf, BoolArrayCollection out)
1470  *     cdef void _select_contaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,             # <<<<<<<<<<<<<<
1471  *         BoolArrayCollection mask2=*)
1472  *     cdef void _select_uncontaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
1473  */
1474 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated {
1475   int __pyx_n;
1476   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *mask2;
1477 };
1478 
1479 /* "yt/utilities/lib/ewah_bool_wrap.pxd":89
1480  *     cdef void _select_contaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
1481  *         BoolArrayCollection mask2=*)
1482  *     cdef void _select_uncontaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,             # <<<<<<<<<<<<<<
1483  *         BoolArrayCollection mask2=*)
1484  *     cdef void _get_ghost_zones(self, int ngz, int order1, int order2,
1485  */
1486 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated {
1487   int __pyx_n;
1488   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *mask2;
1489 };
1490 
1491 /* "yt/utilities/lib/ewah_bool_wrap.pxd":91
1492  *     cdef void _select_uncontaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
1493  *         BoolArrayCollection mask2=*)
1494  *     cdef void _get_ghost_zones(self, int ngz, int order1, int order2,             # <<<<<<<<<<<<<<
1495  *                                bint periodicity[3], BoolArrayCollection out_ewah,
1496  *                                bint coarse_ghosts=*)
1497  */
1498 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones {
1499   int __pyx_n;
1500   int coarse_ghosts;
1501 };
1502 
1503 /* "yt/utilities/lib/ewah_bool_wrap.pxd":105
1504  *     cdef bitarrtype* ewah_refn
1505  *
1506  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2=*)             # <<<<<<<<<<<<<<
1507  *     cdef void _set_coarse(self, np.uint64_t i1)
1508  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2)
1509  */
1510 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set {
1511   int __pyx_n;
1512   __pyx_t_5numpy_uint64_t i2;
1513 };
1514 
1515 /* "yt/utilities/lib/ewah_bool_wrap.pxd":114
1516  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2)
1517  *     cdef void _set_refn(self, np.uint64_t i1)
1518  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2=*)             # <<<<<<<<<<<<<<
1519  *     cdef bint _get_coarse(self, np.uint64_t i1)
1520  *     cdef bint _isref(self, np.uint64_t i)
1521  */
1522 struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get {
1523   int __pyx_n;
1524   __pyx_t_5numpy_uint64_t i2;
1525 };
1526 
1527 /* "yt/utilities/lib/ewah_bool_wrap.pyx":36
1528  * cdef np.uint64_t MAX_VECTOR_SIZE = <np.uint64_t>1e7
1529  *
1530  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewahmap             # <<<<<<<<<<<<<<
1531  * ctypedef cmap[np.uint64_t, ewah_bool_array].iterator ewahmap_it
1532  * ctypedef pair[np.uint64_t, ewah_bool_array] ewahmap_p
1533  */
1534 typedef std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap;
1535 
1536 /* "yt/utilities/lib/ewah_bool_wrap.pyx":37
1537  *
1538  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewahmap
1539  * ctypedef cmap[np.uint64_t, ewah_bool_array].iterator ewahmap_it             # <<<<<<<<<<<<<<
1540  * ctypedef pair[np.uint64_t, ewah_bool_array] ewahmap_p
1541  *
1542  */
1543 typedef std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array> ::iterator __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it;
1544 
1545 /* "yt/utilities/lib/ewah_bool_wrap.pyx":38
1546  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewahmap
1547  * ctypedef cmap[np.uint64_t, ewah_bool_array].iterator ewahmap_it
1548  * ctypedef pair[np.uint64_t, ewah_bool_array] ewahmap_p             # <<<<<<<<<<<<<<
1549  *
1550  * cdef class FileBitmasks:
1551  */
1552 typedef std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_p;
1553 
1554 /* "yt/utilities/lib/ewah_bool_wrap.pxd":16
1555  * ctypedef pair[np.uint64_t, np.uint64_t] ind_pair
1556  *
1557  * cdef class FileBitmasks:             # <<<<<<<<<<<<<<
1558  *     cdef np.uint32_t nfiles
1559  *     cdef ewah_map** ewah_coll
1560  */
1561 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks {
1562   PyObject_HEAD
1563   struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_vtab;
1564   __pyx_t_5numpy_uint32_t nfiles;
1565   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **ewah_coll;
1566   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **ewah_keys;
1567   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **ewah_refn;
1568 };
1569 
1570 
1571 /* "yt/utilities/lib/ewah_bool_wrap.pxd":58
1572  *     cdef bint _check(self)
1573  *
1574  * cdef class BoolArrayCollection:             # <<<<<<<<<<<<<<
1575  *     cdef ewah_map* ewah_coll
1576  *     cdef ewah_bool_array* ewah_keys
1577  */
1578 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection {
1579   PyObject_HEAD
1580   struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_vtab;
1581   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *ewah_coll;
1582   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *ewah_keys;
1583   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *ewah_refn;
1584   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *ewah_coar;
1585 };
1586 
1587 
1588 /* "yt/utilities/lib/ewah_bool_wrap.pxd":98
1589  *     cdef bint _check(self)
1590  *
1591  * cdef class BoolArrayCollectionUncompressed:             # <<<<<<<<<<<<<<
1592  *     cdef int nele1
1593  *     cdef int nele2
1594  */
1595 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed {
1596   PyObject_HEAD
1597   struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_vtab;
1598   int nele1;
1599   int nele2;
1600   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *ewah_coll;
1601   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *ewah_keys;
1602   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *ewah_refn;
1603 };
1604 
1605 
1606 /* "yt/utilities/lib/ewah_bool_wrap.pxd":123
1607  *     cdef void _compress(self, BoolArrayCollection solf)
1608  *
1609  * cdef class SparseUnorderedBitmaskSet:             # <<<<<<<<<<<<<<
1610  *     cdef cset[np.uint64_t] entries
1611  *     cdef void _set(self, np.uint64_t ind)
1612  */
1613 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet {
1614   PyObject_HEAD
1615   struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_vtab;
1616   std::set<__pyx_t_5numpy_uint64_t>  entries;
1617 };
1618 
1619 
1620 /* "yt/utilities/lib/ewah_bool_wrap.pxd":132
1621  *     cdef to_array(self)
1622  *
1623  * cdef class SparseUnorderedBitmaskVector:             # <<<<<<<<<<<<<<
1624  *     cdef int total
1625  *     cdef vector[np.uint64_t] entries
1626  */
1627 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector {
1628   PyObject_HEAD
1629   struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_vtab;
1630   int total;
1631   std::vector<__pyx_t_5numpy_uint64_t>  entries;
1632 };
1633 
1634 
1635 /* "yt/utilities/lib/ewah_bool_wrap.pxd":144
1636  *     cdef void _prune(self)
1637  *
1638  * cdef class SparseUnorderedRefinedBitmaskSet:             # <<<<<<<<<<<<<<
1639  *     cdef cset[ind_pair] entries
1640  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2)
1641  */
1642 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet {
1643   PyObject_HEAD
1644   struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_vtab;
1645   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  entries;
1646 };
1647 
1648 
1649 /* "yt/utilities/lib/ewah_bool_wrap.pxd":153
1650  *     cdef to_array(self)
1651  *
1652  * cdef class SparseUnorderedRefinedBitmaskVector:             # <<<<<<<<<<<<<<
1653  *     cdef int total
1654  *     cdef vector[ind_pair] entries
1655  */
1656 struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector {
1657   PyObject_HEAD
1658   struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_vtab;
1659   int total;
1660   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  entries;
1661 };
1662 
1663 
1664 /* "View.MemoryView":105
1665  *
1666  * @cname("__pyx_array")
1667  * cdef class array:             # <<<<<<<<<<<<<<
1668  *
1669  *     cdef:
1670  */
1671 struct __pyx_array_obj {
1672   PyObject_HEAD
1673   struct __pyx_vtabstruct_array *__pyx_vtab;
1674   char *data;
1675   Py_ssize_t len;
1676   char *format;
1677   int ndim;
1678   Py_ssize_t *_shape;
1679   Py_ssize_t *_strides;
1680   Py_ssize_t itemsize;
1681   PyObject *mode;
1682   PyObject *_format;
1683   void (*callback_free_data)(void *);
1684   int free_data;
1685   int dtype_is_object;
1686 };
1687 
1688 
1689 /* "View.MemoryView":279
1690  *
1691  * @cname('__pyx_MemviewEnum')
1692  * cdef class Enum(object):             # <<<<<<<<<<<<<<
1693  *     cdef object name
1694  *     def __init__(self, name):
1695  */
1696 struct __pyx_MemviewEnum_obj {
1697   PyObject_HEAD
1698   PyObject *name;
1699 };
1700 
1701 
1702 /* "View.MemoryView":330
1703  *
1704  * @cname('__pyx_memoryview')
1705  * cdef class memoryview(object):             # <<<<<<<<<<<<<<
1706  *
1707  *     cdef object obj
1708  */
1709 struct __pyx_memoryview_obj {
1710   PyObject_HEAD
1711   struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1712   PyObject *obj;
1713   PyObject *_size;
1714   PyObject *_array_interface;
1715   PyThread_type_lock lock;
1716   __pyx_atomic_int acquisition_count[2];
1717   __pyx_atomic_int *acquisition_count_aligned_p;
1718   Py_buffer view;
1719   int flags;
1720   int dtype_is_object;
1721   __Pyx_TypeInfo *typeinfo;
1722 };
1723 
1724 
1725 /* "View.MemoryView":961
1726  *
1727  * @cname('__pyx_memoryviewslice')
1728  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
1729  *     "Internal class for passing memoryview slices to Python"
1730  *
1731  */
1732 struct __pyx_memoryviewslice_obj {
1733   struct __pyx_memoryview_obj __pyx_base;
1734   __Pyx_memviewslice from_slice;
1735   PyObject *from_object;
1736   PyObject *(*to_object_func)(char *);
1737   int (*to_dtype_func)(char *, PyObject *);
1738 };
1739 
1740 
1741 
1742 /* "yt/utilities/lib/ewah_bool_wrap.pyx":40
1743  * ctypedef pair[np.uint64_t, ewah_bool_array] ewahmap_p
1744  *
1745  * cdef class FileBitmasks:             # <<<<<<<<<<<<<<
1746  *
1747  *     def __cinit__(self, np.uint32_t nfiles):
1748  */
1749 
1750 struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks {
1751   void (*_reset)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *);
1752   int (*_iseq)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *);
1753   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *(*_get_bitmask)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t);
1754   PyObject *(*_find_collisions)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions *__pyx_optional_args);
1755   PyObject *(*_find_collisions_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse *__pyx_optional_args);
1756   PyObject *(*_find_collisions_refined)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined *__pyx_optional_args);
1757   void (*_set)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set *__pyx_optional_args);
1758   void (*_set_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t);
1759   void (*_set_refined)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
1760   void (*_set_coarse_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __Pyx_memviewslice);
1761   void (*_set_refined_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice);
1762   void (*_set_refined_index_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_int64_t, PyArrayObject *, PyArrayObject *);
1763   void (*_set_map)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
1764   void (*_set_refn)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t);
1765   int (*_get)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get *__pyx_optional_args);
1766   int (*_get_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t);
1767   void (*_get_coarse_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice);
1768   int (*_isref)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t);
1769   __pyx_t_5numpy_uint64_t (*_count_total)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t);
1770   __pyx_t_5numpy_uint64_t (*_count_refined)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t);
1771   __pyx_t_5numpy_uint64_t (*_count_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t);
1772   void (*_append)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1773   int (*_intersects)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1774   void (*_logicalxor)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1775   void (*_logicaland)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1776   void (*_select_contaminated)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice, __Pyx_memviewslice, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated *__pyx_optional_args);
1777   void (*_select_uncontaminated)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated *__pyx_optional_args);
1778   PyObject *(*_dumps)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t);
1779   int (*_loads)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, PyObject *);
1780   int (*_check)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *);
1781 };
1782 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks;
1783 
1784 
1785 /* "yt/utilities/lib/ewah_bool_wrap.pyx":635
1786  *             self._count_total(ifile)))
1787  *
1788  * cdef class BoolArrayCollection:             # <<<<<<<<<<<<<<
1789  *
1790  *     def __cinit__(self):
1791  */
1792 
1793 struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection {
1794   void (*_reset)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1795   int (*_richcmp)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, int);
1796   void (*_set)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set *__pyx_optional_args);
1797   void (*_set_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t);
1798   void (*_set_refined)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
1799   void (*_set_coarse_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice);
1800   void (*_set_refined_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice);
1801   void (*_set_map)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
1802   void (*_set_refn)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t);
1803   int (*_get)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get *__pyx_optional_args);
1804   int (*_get_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t);
1805   void (*_get_coarse_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice);
1806   int (*_contains)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t);
1807   int (*_isref)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t);
1808   void (*_ewah_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1809   __pyx_t_5numpy_uint64_t (*_count_total)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1810   __pyx_t_5numpy_uint64_t (*_count_refined)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1811   __pyx_t_5numpy_uint64_t (*_count_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1812   void (*_append)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1813   void (*_logicalor)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1814   int (*_intersects)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1815   void (*_logicalxor)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1816   void (*_logicaland)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1817   void (*_select_contaminated)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated *__pyx_optional_args);
1818   void (*_select_uncontaminated)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated *__pyx_optional_args);
1819   void (*_get_ghost_zones)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, int, int, int, int *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones *__pyx_optional_args);
1820   PyObject *(*_dumps)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1821   int (*_loads)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, PyObject *);
1822   int (*_check)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1823 };
1824 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection;
1825 
1826 
1827 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1319
1828  *                                                                      self._count_total()))
1829  *
1830  * cdef class BoolArrayCollectionUncompressed:             # <<<<<<<<<<<<<<
1831  *
1832  *     def __cinit__(self, np.uint64_t nele1, np.uint64_t nele2):
1833  */
1834 
1835 struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed {
1836   void (*_set)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set *__pyx_optional_args);
1837   void (*_set_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t);
1838   void (*_set_refined)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
1839   void (*_set_coarse_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __Pyx_memviewslice);
1840   void (*_set_coarse_array_ptr)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint8_t *);
1841   void (*_set_refined_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice);
1842   void (*_set_refined_array_ptr)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint8_t *);
1843   void (*_set_map)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
1844   void (*_set_refn)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t);
1845   int (*_get)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get *__pyx_optional_args);
1846   int (*_get_coarse)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t);
1847   int (*_isref)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t);
1848   __pyx_t_5numpy_uint64_t (*_count_total)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *);
1849   __pyx_t_5numpy_uint64_t (*_count_refined)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *);
1850   void (*_append)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *);
1851   int (*_intersects)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *);
1852   void (*_compress)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1853 };
1854 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed;
1855 
1856 
1857 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1612
1858  *
1859  * # Set version
1860  * cdef class SparseUnorderedBitmaskSet:             # <<<<<<<<<<<<<<
1861  *     cdef void _set(self, np.uint64_t ind):
1862  *         self.entries.insert(ind)
1863  */
1864 
1865 struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet {
1866   void (*_set)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, __pyx_t_5numpy_uint64_t);
1867   void (*_fill)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, __Pyx_memviewslice);
1868   void (*_fill_ewah)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1869   void (*_fill_bool)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *);
1870   void (*_reset)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *);
1871   PyObject *(*to_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *);
1872 };
1873 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet;
1874 
1875 
1876 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1554
1877  *
1878  * # Vector version
1879  * cdef class SparseUnorderedBitmaskVector:             # <<<<<<<<<<<<<<
1880  *     def __cinit__(self):
1881  *         self.total = 0
1882  */
1883 
1884 struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector {
1885   void (*_set)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *, __pyx_t_5numpy_uint64_t);
1886   void (*_fill)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *, __Pyx_memviewslice);
1887   void (*_fill_ewah)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1888   void (*_fill_bool)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *);
1889   void (*_reset)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *);
1890   PyObject *(*to_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *);
1891   void (*_remove_duplicates)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *);
1892   void (*_prune)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *);
1893 };
1894 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector;
1895 
1896 
1897 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1732
1898  *
1899  * # Set version
1900  * cdef class SparseUnorderedRefinedBitmaskSet:             # <<<<<<<<<<<<<<
1901  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2):
1902  *         cdef ind_pair ind
1903  */
1904 
1905 struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet {
1906   void (*_set)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
1907   void (*_fill)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, __Pyx_memviewslice, __Pyx_memviewslice);
1908   void (*_fill_ewah)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1909   void (*_fill_bool)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *);
1910   void (*_reset)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *);
1911   PyObject *(*to_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *);
1912 };
1913 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet;
1914 
1915 
1916 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1652
1917  *
1918  * # vector version
1919  * cdef class SparseUnorderedRefinedBitmaskVector:             # <<<<<<<<<<<<<<
1920  *     def __cinit__(self):
1921  *         self.total = 0
1922  */
1923 
1924 struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector {
1925   void (*_set)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
1926   void (*_fill)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *, __Pyx_memviewslice, __Pyx_memviewslice);
1927   void (*_fill_ewah)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *);
1928   void (*_fill_bool)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *);
1929   void (*_reset)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *);
1930   PyObject *(*to_array)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *);
1931   void (*_remove_duplicates)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *);
1932   void (*_prune)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *);
1933 };
1934 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector;
1935 
1936 
1937 /* "View.MemoryView":105
1938  *
1939  * @cname("__pyx_array")
1940  * cdef class array:             # <<<<<<<<<<<<<<
1941  *
1942  *     cdef:
1943  */
1944 
1945 struct __pyx_vtabstruct_array {
1946   PyObject *(*get_memview)(struct __pyx_array_obj *);
1947 };
1948 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1949 
1950 
1951 /* "View.MemoryView":330
1952  *
1953  * @cname('__pyx_memoryview')
1954  * cdef class memoryview(object):             # <<<<<<<<<<<<<<
1955  *
1956  *     cdef object obj
1957  */
1958 
1959 struct __pyx_vtabstruct_memoryview {
1960   char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1961   PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1962   PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1963   PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1964   PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1965   PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1966   PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1967 };
1968 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1969 
1970 
1971 /* "View.MemoryView":961
1972  *
1973  * @cname('__pyx_memoryviewslice')
1974  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
1975  *     "Internal class for passing memoryview slices to Python"
1976  *
1977  */
1978 
1979 struct __pyx_vtabstruct__memoryviewslice {
1980   struct __pyx_vtabstruct_memoryview __pyx_base;
1981 };
1982 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1983 
1984 /* --- Runtime support code (head) --- */
1985 /* Refnanny.proto */
1986 #ifndef CYTHON_REFNANNY
1987   #define CYTHON_REFNANNY 0
1988 #endif
1989 #if CYTHON_REFNANNY
1990   typedef struct {
1991     void (*INCREF)(void*, PyObject*, int);
1992     void (*DECREF)(void*, PyObject*, int);
1993     void (*GOTREF)(void*, PyObject*, int);
1994     void (*GIVEREF)(void*, PyObject*, int);
1995     void* (*SetupContext)(const char*, int, const char*);
1996     void (*FinishContext)(void**);
1997   } __Pyx_RefNannyAPIStruct;
1998   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1999   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
2000   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
2001 #ifdef WITH_THREAD
2002   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2003           if (acquire_gil) {\
2004               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2005               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
2006               PyGILState_Release(__pyx_gilstate_save);\
2007           } else {\
2008               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
2009           }
2010 #else
2011   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2012           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
2013 #endif
2014   #define __Pyx_RefNannyFinishContext()\
2015           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
2016   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
2017   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
2018   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
2019   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
2020   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
2021   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
2022   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
2023   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
2024 #else
2025   #define __Pyx_RefNannyDeclarations
2026   #define __Pyx_RefNannySetupContext(name, acquire_gil)
2027   #define __Pyx_RefNannyFinishContext()
2028   #define __Pyx_INCREF(r) Py_INCREF(r)
2029   #define __Pyx_DECREF(r) Py_DECREF(r)
2030   #define __Pyx_GOTREF(r)
2031   #define __Pyx_GIVEREF(r)
2032   #define __Pyx_XINCREF(r) Py_XINCREF(r)
2033   #define __Pyx_XDECREF(r) Py_XDECREF(r)
2034   #define __Pyx_XGOTREF(r)
2035   #define __Pyx_XGIVEREF(r)
2036 #endif
2037 #define __Pyx_XDECREF_SET(r, v) do {\
2038         PyObject *tmp = (PyObject *) r;\
2039         r = v; __Pyx_XDECREF(tmp);\
2040     } while (0)
2041 #define __Pyx_DECREF_SET(r, v) do {\
2042         PyObject *tmp = (PyObject *) r;\
2043         r = v; __Pyx_DECREF(tmp);\
2044     } while (0)
2045 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
2046 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
2047 
2048 /* PyObjectGetAttrStr.proto */
2049 #if CYTHON_USE_TYPE_SLOTS
2050 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2051 #else
2052 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2053 #endif
2054 
2055 /* GetBuiltinName.proto */
2056 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
2057 
2058 /* RaiseDoubleKeywords.proto */
2059 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2060 
2061 /* ParseKeywords.proto */
2062 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
2063     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
2064     const char* function_name);
2065 
2066 /* RaiseArgTupleInvalid.proto */
2067 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2068     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2069 
2070 /* ExtTypeTest.proto */
2071 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2072 
2073 /* PyFunctionFastCall.proto */
2074 #if CYTHON_FAST_PYCALL
2075 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
2076     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
2077 #if 1 || PY_VERSION_HEX < 0x030600B1
2078 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
2079 #else
2080 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
2081 #endif
2082 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
2083     (sizeof(char [1 - 2*!(cond)]) - 1)
2084 #ifndef Py_MEMBER_SIZE
2085 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
2086 #endif
2087   static size_t __pyx_pyframe_localsplus_offset = 0;
2088   #include "frameobject.h"
2089   #define __Pxy_PyFrame_Initialize_Offsets()\
2090     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
2091      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
2092   #define __Pyx_PyFrame_GetLocalsplus(frame)\
2093     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
2094 #endif
2095 
2096 /* PyObjectCall.proto */
2097 #if CYTHON_COMPILING_IN_CPYTHON
2098 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2099 #else
2100 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2101 #endif
2102 
2103 /* PyObjectCallMethO.proto */
2104 #if CYTHON_COMPILING_IN_CPYTHON
2105 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2106 #endif
2107 
2108 /* PyObjectCallNoArg.proto */
2109 #if CYTHON_COMPILING_IN_CPYTHON
2110 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2111 #else
2112 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
2113 #endif
2114 
2115 /* PyCFunctionFastCall.proto */
2116 #if CYTHON_FAST_PYCCALL
2117 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
2118 #else
2119 #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
2120 #endif
2121 
2122 /* PyObjectCallOneArg.proto */
2123 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2124 
2125 /* IsLittleEndian.proto */
2126 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
2127 
2128 /* BufferFormatCheck.proto */
2129 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
2130 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
2131                               __Pyx_BufFmt_StackElem* stack,
2132                               __Pyx_TypeInfo* type);
2133 
2134 /* BufferGetAndValidate.proto */
2135 #define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
2136     ((obj == Py_None || obj == NULL) ?\
2137     (__Pyx_ZeroBuffer(buf), 0) :\
2138     __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
2139 static int  __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
2140     __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
2141 static void __Pyx_ZeroBuffer(Py_buffer* buf);
2142 static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
2143 static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
2144 static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
2145 
2146 /* PyDictVersioning.proto */
2147 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2148 #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
2149 #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
2150 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2151     (version_var) = __PYX_GET_DICT_VERSION(dict);\
2152     (cache_var) = (value);
2153 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2154     static PY_UINT64_T __pyx_dict_version = 0;\
2155     static PyObject *__pyx_dict_cached_value = NULL;\
2156     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2157         (VAR) = __pyx_dict_cached_value;\
2158     } else {\
2159         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2160         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2161     }\
2162 }
2163 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2164 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2165 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2166 #else
2167 #define __PYX_GET_DICT_VERSION(dict)  (0)
2168 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2169 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
2170 #endif
2171 
2172 /* GetModuleGlobalName.proto */
2173 #if CYTHON_USE_DICT_VERSIONS
2174 #define __Pyx_GetModuleGlobalName(var, name)  {\
2175     static PY_UINT64_T __pyx_dict_version = 0;\
2176     static PyObject *__pyx_dict_cached_value = NULL;\
2177     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
2178         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
2179         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2180 }
2181 #define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
2182     PY_UINT64_T __pyx_dict_version;\
2183     PyObject *__pyx_dict_cached_value;\
2184     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2185 }
2186 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2187 #else
2188 #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
2189 #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
2190 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2191 #endif
2192 
2193 /* GetItemInt.proto */
2194 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2195     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2196     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
2197     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
2198                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
2199 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2200     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2201     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2202     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2203 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2204                                                               int wraparound, int boundscheck);
2205 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2206     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2207     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2208     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2209 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2210                                                               int wraparound, int boundscheck);
2211 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2212 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2213                                                      int is_list, int wraparound, int boundscheck);
2214 
2215 /* ObjectGetItem.proto */
2216 #if CYTHON_USE_TYPE_SLOTS
2217 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
2218 #else
2219 #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
2220 #endif
2221 
2222 /* PyObjectCall2Args.proto */
2223 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
2224 
2225 #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
2226 /* PyThreadStateGet.proto */
2227 #if CYTHON_FAST_THREAD_STATE
2228 #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
2229 #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
2230 #define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
2231 #else
2232 #define __Pyx_PyThreadState_declare
2233 #define __Pyx_PyThreadState_assign
2234 #define __Pyx_PyErr_Occurred()  PyErr_Occurred()
2235 #endif
2236 
2237 /* PyErrFetchRestore.proto */
2238 #if CYTHON_FAST_THREAD_STATE
2239 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2240 #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2241 #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2242 #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2243 #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2244 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2245 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2246 #if CYTHON_COMPILING_IN_CPYTHON
2247 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2248 #else
2249 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2250 #endif
2251 #else
2252 #define __Pyx_PyErr_Clear() PyErr_Clear()
2253 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2254 #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
2255 #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
2256 #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
2257 #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
2258 #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
2259 #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
2260 #endif
2261 
2262 /* WriteUnraisableException.proto */
2263 static void __Pyx_WriteUnraisable(const char *name, int clineno,
2264                                   int lineno, const char *filename,
2265                                   int full_traceback, int nogil);
2266 
2267 /* RaiseException.proto */
2268 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2269 
2270 /* ArgTypeTest.proto */
2271 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
2272     ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
2273         __Pyx__ArgTypeTest(obj, type, name, exact))
2274 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2275 
2276 /* BufferIndexError.proto */
2277 static void __Pyx_RaiseBufferIndexError(int axis);
2278 
2279 /* KeywordStringCheck.proto */
2280 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
2281 
2282 /* MemviewSliceInit.proto */
2283 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2284 #define __Pyx_MEMVIEW_DIRECT   1
2285 #define __Pyx_MEMVIEW_PTR      2
2286 #define __Pyx_MEMVIEW_FULL     4
2287 #define __Pyx_MEMVIEW_CONTIG   8
2288 #define __Pyx_MEMVIEW_STRIDED  16
2289 #define __Pyx_MEMVIEW_FOLLOW   32
2290 #define __Pyx_IS_C_CONTIG 1
2291 #define __Pyx_IS_F_CONTIG 2
2292 static int __Pyx_init_memviewslice(
2293                 struct __pyx_memoryview_obj *memview,
2294                 int ndim,
2295                 __Pyx_memviewslice *memviewslice,
2296                 int memview_is_new_reference);
2297 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
2298     __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2299 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
2300     __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2301 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2302 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2303 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2304 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2305 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
2306 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
2307 
2308 /* RaiseTooManyValuesToUnpack.proto */
2309 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2310 
2311 /* RaiseNeedMoreValuesToUnpack.proto */
2312 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2313 
2314 /* IterFinish.proto */
2315 static CYTHON_INLINE int __Pyx_IterFinish(void);
2316 
2317 /* UnpackItemEndCheck.proto */
2318 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
2319 
2320 /* BufferFallbackError.proto */
2321 static void __Pyx_RaiseBufferFallbackError(void);
2322 
2323 /* PyIntBinop.proto */
2324 #if !CYTHON_COMPILING_IN_PYPY
2325 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2326 #else
2327 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2328     (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2329 #endif
2330 
2331 /* PyErrExceptionMatches.proto */
2332 #if CYTHON_FAST_THREAD_STATE
2333 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2334 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2335 #else
2336 #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
2337 #endif
2338 
2339 /* GetAttr.proto */
2340 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2341 
2342 /* GetAttr3.proto */
2343 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2344 
2345 #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)
2346 /* Import.proto */
2347 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2348 
2349 /* ImportFrom.proto */
2350 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2351 
2352 /* HasAttr.proto */
2353 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2354 
2355 /* DictGetItem.proto */
2356 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
2357 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
2358 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
2359     (likely(PyDict_CheckExact(obj)) ?\
2360      __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
2361 #else
2362 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
2363 #define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
2364 #endif
2365 
2366 /* RaiseNoneIterError.proto */
2367 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2368 
2369 /* GetTopmostException.proto */
2370 #if CYTHON_USE_EXC_INFO_STACK
2371 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2372 #endif
2373 
2374 /* SaveResetException.proto */
2375 #if CYTHON_FAST_THREAD_STATE
2376 #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2377 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2378 #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2379 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2380 #else
2381 #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
2382 #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
2383 #endif
2384 
2385 /* GetException.proto */
2386 #if CYTHON_FAST_THREAD_STATE
2387 #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
2388 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2389 #else
2390 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2391 #endif
2392 
2393 /* IncludeStringH.proto */
2394 #include <string.h>
2395 
2396 /* BytesEquals.proto */
2397 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
2398 
2399 /* UnicodeEquals.proto */
2400 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
2401 
2402 /* StrEquals.proto */
2403 #if PY_MAJOR_VERSION >= 3
2404 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2405 #else
2406 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2407 #endif
2408 
2409 /* None.proto */
2410 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
2411 
2412 /* UnaryNegOverflows.proto */
2413 #define UNARY_NEG_WOULD_OVERFLOW(x)\
2414         (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2415 
2416 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2417 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2418 /* decode_c_string_utf16.proto */
__Pyx_PyUnicode_DecodeUTF16(const char * s,Py_ssize_t size,const char * errors)2419 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
2420     int byteorder = 0;
2421     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2422 }
__Pyx_PyUnicode_DecodeUTF16LE(const char * s,Py_ssize_t size,const char * errors)2423 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
2424     int byteorder = -1;
2425     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2426 }
__Pyx_PyUnicode_DecodeUTF16BE(const char * s,Py_ssize_t size,const char * errors)2427 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
2428     int byteorder = 1;
2429     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2430 }
2431 
2432 /* decode_c_string.proto */
2433 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
2434          const char* cstring, Py_ssize_t start, Py_ssize_t stop,
2435          const char* encoding, const char* errors,
2436          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
2437 
2438 /* SwapException.proto */
2439 #if CYTHON_FAST_THREAD_STATE
2440 #define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2441 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2442 #else
2443 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2444 #endif
2445 
2446 /* FastTypeChecks.proto */
2447 #if CYTHON_COMPILING_IN_CPYTHON
2448 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2449 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2450 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2451 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2452 #else
2453 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2454 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2455 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2456 #endif
2457 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2458 
2459 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2460 /* ListCompAppend.proto */
2461 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_ListComp_Append(PyObject * list,PyObject * x)2462 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
2463     PyListObject* L = (PyListObject*) list;
2464     Py_ssize_t len = Py_SIZE(list);
2465     if (likely(L->allocated > len)) {
2466         Py_INCREF(x);
2467         PyList_SET_ITEM(list, len, x);
2468         Py_SIZE(list) = len+1;
2469         return 0;
2470     }
2471     return PyList_Append(list, x);
2472 }
2473 #else
2474 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
2475 #endif
2476 
2477 /* ListExtend.proto */
__Pyx_PyList_Extend(PyObject * L,PyObject * v)2478 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
2479 #if CYTHON_COMPILING_IN_CPYTHON
2480     PyObject* none = _PyList_Extend((PyListObject*)L, v);
2481     if (unlikely(!none))
2482         return -1;
2483     Py_DECREF(none);
2484     return 0;
2485 #else
2486     return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
2487 #endif
2488 }
2489 
2490 /* ListAppend.proto */
2491 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_PyList_Append(PyObject * list,PyObject * x)2492 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2493     PyListObject* L = (PyListObject*) list;
2494     Py_ssize_t len = Py_SIZE(list);
2495     if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
2496         Py_INCREF(x);
2497         PyList_SET_ITEM(list, len, x);
2498         Py_SIZE(list) = len+1;
2499         return 0;
2500     }
2501     return PyList_Append(list, x);
2502 }
2503 #else
2504 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2505 #endif
2506 
2507 /* None.proto */
2508 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
2509 
2510 /* None.proto */
2511 static CYTHON_INLINE long __Pyx_div_long(long, long);
2512 
2513 /* StringJoin.proto */
2514 #if PY_MAJOR_VERSION < 3
2515 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
2516 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
2517 #else
2518 #define __Pyx_PyString_Join PyUnicode_Join
2519 #define __Pyx_PyBaseString_Join PyUnicode_Join
2520 #endif
2521 #if CYTHON_COMPILING_IN_CPYTHON
2522     #if PY_MAJOR_VERSION < 3
2523     #define __Pyx_PyBytes_Join _PyString_Join
2524     #else
2525     #define __Pyx_PyBytes_Join _PyBytes_Join
2526     #endif
2527 #else
2528 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
2529 #endif
2530 
2531 /* PyObject_Unicode.proto */
2532 #if PY_MAJOR_VERSION >= 3
2533 #define __Pyx_PyObject_Unicode(obj)\
2534     (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
2535 #else
2536 #define __Pyx_PyObject_Unicode(obj)\
2537     (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
2538 #endif
2539 
2540 /* PyObject_GenericGetAttrNoDict.proto */
2541 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2542 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2543 #else
2544 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2545 #endif
2546 
2547 /* PyObject_GenericGetAttr.proto */
2548 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2549 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2550 #else
2551 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2552 #endif
2553 
2554 /* SetVTable.proto */
2555 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2556 
2557 /* SetupReduce.proto */
2558 static int __Pyx_setup_reduce(PyObject* type_obj);
2559 
2560 /* TypeImport.proto */
2561 #ifndef __PYX_HAVE_RT_ImportType_proto
2562 #define __PYX_HAVE_RT_ImportType_proto
2563 enum __Pyx_ImportType_CheckSize {
2564    __Pyx_ImportType_CheckSize_Error = 0,
2565    __Pyx_ImportType_CheckSize_Warn = 1,
2566    __Pyx_ImportType_CheckSize_Ignore = 2
2567 };
2568 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2569 #endif
2570 
2571 /* CLineInTraceback.proto */
2572 #ifdef CYTHON_CLINE_IN_TRACEBACK
2573 #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2574 #else
2575 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2576 #endif
2577 
2578 /* CodeObjectCache.proto */
2579 typedef struct {
2580     PyCodeObject* code_object;
2581     int code_line;
2582 } __Pyx_CodeObjectCacheEntry;
2583 struct __Pyx_CodeObjectCache {
2584     int count;
2585     int max_count;
2586     __Pyx_CodeObjectCacheEntry* entries;
2587 };
2588 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2589 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2590 static PyCodeObject *__pyx_find_code_object(int code_line);
2591 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2592 
2593 /* AddTraceback.proto */
2594 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2595                                int py_line, const char *filename);
2596 
2597 #if PY_MAJOR_VERSION < 3
2598     static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2599     static void __Pyx_ReleaseBuffer(Py_buffer *view);
2600 #else
2601     #define __Pyx_GetBuffer PyObject_GetBuffer
2602     #define __Pyx_ReleaseBuffer PyBuffer_Release
2603 #endif
2604 
2605 
2606 /* BufferStructDeclare.proto */
2607 typedef struct {
2608   Py_ssize_t shape, strides, suboffsets;
2609 } __Pyx_Buf_DimInfo;
2610 typedef struct {
2611   size_t refcount;
2612   Py_buffer pybuffer;
2613 } __Pyx_Buffer;
2614 typedef struct {
2615   __Pyx_Buffer *rcbuffer;
2616   char *data;
2617   __Pyx_Buf_DimInfo diminfo[8];
2618 } __Pyx_LocalBuf_ND;
2619 
2620 /* MemviewSliceIsContig.proto */
2621 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2622 
2623 /* OverlappingSlices.proto */
2624 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2625                                 __Pyx_memviewslice *slice2,
2626                                 int ndim, size_t itemsize);
2627 
2628 /* Capsule.proto */
2629 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2630 
2631 /* None.proto */
2632 #include <new>
2633 
2634 /* CIntToPy.proto */
2635 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint64(npy_uint64 value);
2636 
2637 /* TypeInfoCompare.proto */
2638 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
2639 
2640 /* MemviewSliceValidateAndInit.proto */
2641 static int __Pyx_ValidateAndInit_memviewslice(
2642                 int *axes_specs,
2643                 int c_or_f_flag,
2644                 int buf_flags,
2645                 int ndim,
2646                 __Pyx_TypeInfo *dtype,
2647                 __Pyx_BufFmt_StackElem stack[],
2648                 __Pyx_memviewslice *memviewslice,
2649                 PyObject *original_obj);
2650 
2651 /* ObjectToMemviewSlice.proto */
2652 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(PyObject *, int writable_flag);
2653 
2654 /* CIntToPy.proto */
2655 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value);
2656 
2657 /* CppExceptionConversion.proto */
2658 #ifndef __Pyx_CppExn2PyErr
2659 #include <new>
2660 #include <typeinfo>
2661 #include <stdexcept>
2662 #include <ios>
__Pyx_CppExn2PyErr()2663 static void __Pyx_CppExn2PyErr() {
2664   try {
2665     if (PyErr_Occurred())
2666       ; // let the latest Python exn pass through and ignore the current one
2667     else
2668       throw;
2669   } catch (const std::bad_alloc& exn) {
2670     PyErr_SetString(PyExc_MemoryError, exn.what());
2671   } catch (const std::bad_cast& exn) {
2672     PyErr_SetString(PyExc_TypeError, exn.what());
2673   } catch (const std::bad_typeid& exn) {
2674     PyErr_SetString(PyExc_TypeError, exn.what());
2675   } catch (const std::domain_error& exn) {
2676     PyErr_SetString(PyExc_ValueError, exn.what());
2677   } catch (const std::invalid_argument& exn) {
2678     PyErr_SetString(PyExc_ValueError, exn.what());
2679   } catch (const std::ios_base::failure& exn) {
2680     PyErr_SetString(PyExc_IOError, exn.what());
2681   } catch (const std::out_of_range& exn) {
2682     PyErr_SetString(PyExc_IndexError, exn.what());
2683   } catch (const std::overflow_error& exn) {
2684     PyErr_SetString(PyExc_OverflowError, exn.what());
2685   } catch (const std::range_error& exn) {
2686     PyErr_SetString(PyExc_ArithmeticError, exn.what());
2687   } catch (const std::underflow_error& exn) {
2688     PyErr_SetString(PyExc_ArithmeticError, exn.what());
2689   } catch (const std::exception& exn) {
2690     PyErr_SetString(PyExc_RuntimeError, exn.what());
2691   }
2692   catch (...)
2693   {
2694     PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
2695   }
2696 }
2697 #endif
2698 
2699 /* CIntToPy.proto */
2700 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2701 
2702 /* Print.proto */
2703 static int __Pyx_Print(PyObject*, PyObject *, int);
2704 #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
2705 static PyObject* __pyx_print = 0;
2706 static PyObject* __pyx_print_kwargs = 0;
2707 #endif
2708 
2709 /* CIntToPy.proto */
2710 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value);
2711 
2712 /* MemviewDtypeToObject.proto */
2713 static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint64_t(const char *itemp);
2714 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint64_t(const char *itemp, PyObject *obj);
2715 
2716 /* None.proto */
2717 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __Pyx_pow___pyx_t_5numpy_uint64_t(__pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t);
2718 
2719 /* None.proto */
2720 static CYTHON_INLINE long __Pyx_pow_long(long, long);
2721 
2722 /* CIntToPy.proto */
2723 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2724 
2725 /* RealImag.proto */
2726 #if CYTHON_CCOMPLEX
2727   #ifdef __cplusplus
2728     #define __Pyx_CREAL(z) ((z).real())
2729     #define __Pyx_CIMAG(z) ((z).imag())
2730   #else
2731     #define __Pyx_CREAL(z) (__real__(z))
2732     #define __Pyx_CIMAG(z) (__imag__(z))
2733   #endif
2734 #else
2735     #define __Pyx_CREAL(z) ((z).real)
2736     #define __Pyx_CIMAG(z) ((z).imag)
2737 #endif
2738 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2739         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2740     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2741     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2742 #else
2743     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2744     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2745 #endif
2746 
2747 /* Arithmetic.proto */
2748 #if CYTHON_CCOMPLEX
2749     #define __Pyx_c_eq_float(a, b)   ((a)==(b))
2750     #define __Pyx_c_sum_float(a, b)  ((a)+(b))
2751     #define __Pyx_c_diff_float(a, b) ((a)-(b))
2752     #define __Pyx_c_prod_float(a, b) ((a)*(b))
2753     #define __Pyx_c_quot_float(a, b) ((a)/(b))
2754     #define __Pyx_c_neg_float(a)     (-(a))
2755   #ifdef __cplusplus
2756     #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2757     #define __Pyx_c_conj_float(z)    (::std::conj(z))
2758     #if 1
2759         #define __Pyx_c_abs_float(z)     (::std::abs(z))
2760         #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
2761     #endif
2762   #else
2763     #define __Pyx_c_is_zero_float(z) ((z)==0)
2764     #define __Pyx_c_conj_float(z)    (conjf(z))
2765     #if 1
2766         #define __Pyx_c_abs_float(z)     (cabsf(z))
2767         #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
2768     #endif
2769  #endif
2770 #else
2771     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2772     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2773     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2774     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2775     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2776     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2777     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2778     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2779     #if 1
2780         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2781         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2782     #endif
2783 #endif
2784 
2785 /* Arithmetic.proto */
2786 #if CYTHON_CCOMPLEX
2787     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
2788     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
2789     #define __Pyx_c_diff_double(a, b) ((a)-(b))
2790     #define __Pyx_c_prod_double(a, b) ((a)*(b))
2791     #define __Pyx_c_quot_double(a, b) ((a)/(b))
2792     #define __Pyx_c_neg_double(a)     (-(a))
2793   #ifdef __cplusplus
2794     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2795     #define __Pyx_c_conj_double(z)    (::std::conj(z))
2796     #if 1
2797         #define __Pyx_c_abs_double(z)     (::std::abs(z))
2798         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
2799     #endif
2800   #else
2801     #define __Pyx_c_is_zero_double(z) ((z)==0)
2802     #define __Pyx_c_conj_double(z)    (conj(z))
2803     #if 1
2804         #define __Pyx_c_abs_double(z)     (cabs(z))
2805         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
2806     #endif
2807  #endif
2808 #else
2809     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2810     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2811     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2812     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2813     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2814     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2815     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2816     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2817     #if 1
2818         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2819         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2820     #endif
2821 #endif
2822 
2823 /* CIntToPy.proto */
2824 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
2825 
2826 /* MemviewSliceCopyTemplate.proto */
2827 static __Pyx_memviewslice
2828 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2829                                  const char *mode, int ndim,
2830                                  size_t sizeof_dtype, int contig_flag,
2831                                  int dtype_is_object);
2832 
2833 /* CIntFromPy.proto */
2834 static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *);
2835 
2836 /* CIntFromPy.proto */
2837 static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *);
2838 
2839 /* CIntFromPy.proto */
2840 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2841 
2842 /* CIntFromPy.proto */
2843 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2844 
2845 /* TypeInfoToFormat.proto */
2846 struct __pyx_typeinfo_string {
2847     char string[3];
2848 };
2849 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2850 
2851 /* CIntFromPy.proto */
2852 static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *);
2853 
2854 /* CIntFromPy.proto */
2855 static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *);
2856 
2857 /* CIntFromPy.proto */
2858 static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
2859 
2860 /* PrintOne.proto */
2861 static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
2862 
2863 /* CIntFromPy.proto */
2864 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2865 
2866 /* ObjectToMemviewSlice.proto */
2867 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint8_t(PyObject *, int writable_flag);
2868 
2869 /* ObjectToMemviewSlice.proto */
2870 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint32_t(PyObject *, int writable_flag);
2871 
2872 /* ObjectToMemviewSlice.proto */
2873 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint64_t(PyObject *, int writable_flag);
2874 
2875 /* CheckBinaryVersion.proto */
2876 static int __Pyx_check_binary_version(void);
2877 
2878 /* FunctionImport.proto */
2879 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
2880 
2881 /* InitStrings.proto */
2882 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2883 
2884 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self); /* proto*/
2885 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__iseq(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_solf); /* proto*/
2886 static struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_bitmask(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile); /* proto*/
2887 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_coll, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions *__pyx_optional_args); /* proto*/
2888 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_coll, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse *__pyx_optional_args); /* proto*/
2889 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_coll, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined *__pyx_optional_args); /* proto*/
2890 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set *__pyx_optional_args); /* proto*/
2891 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2892 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2); /* proto*/
2893 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __Pyx_memviewslice __pyx_v_arr); /* proto*/
2894 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, __Pyx_memviewslice __pyx_v_arr); /* proto*/
2895 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined_index_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_int64_t __pyx_v_nsub_mi, PyArrayObject *__pyx_v_sub_mi1, PyArrayObject *__pyx_v_sub_mi2); /* proto*/
2896 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2); /* proto*/
2897 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2898 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get *__pyx_optional_args); /* proto*/
2899 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2900 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_imax, __Pyx_memviewslice __pyx_v_arr); /* proto*/
2901 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i); /* proto*/
2902 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile); /* proto*/
2903 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile); /* proto*/
2904 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile); /* proto*/
2905 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf); /* proto*/
2906 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf); /* proto*/
2907 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out); /* proto*/
2908 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out); /* proto*/
2909 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask, __Pyx_memviewslice __pyx_v_out, __Pyx_memviewslice __pyx_v_secondary_files, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated *__pyx_optional_args); /* proto*/
2910 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask, __Pyx_memviewslice __pyx_v_out, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated *__pyx_optional_args); /* proto*/
2911 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile); /* proto*/
2912 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, PyObject *__pyx_v_s); /* proto*/
2913 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self); /* proto*/
2914 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto*/
2915 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__richcmp(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, int __pyx_v_op); /* proto*/
2916 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set *__pyx_optional_args); /* proto*/
2917 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2918 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2); /* proto*/
2919 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __Pyx_memviewslice __pyx_v_arr); /* proto*/
2920 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __Pyx_memviewslice __pyx_v_arr); /* proto*/
2921 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2); /* proto*/
2922 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2923 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get *__pyx_optional_args); /* proto*/
2924 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2925 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_imax, __Pyx_memviewslice __pyx_v_arr); /* proto*/
2926 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__contains(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i); /* proto*/
2927 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i); /* proto*/
2928 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__ewah_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto*/
2929 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto*/
2930 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto*/
2931 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto*/
2932 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicalor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out); /* proto*/
2933 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf); /* proto*/
2934 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf); /* proto*/
2935 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out); /* proto*/
2936 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out); /* proto*/
2937 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask, __Pyx_memviewslice __pyx_v_out, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated *__pyx_optional_args); /* proto*/
2938 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask, __Pyx_memviewslice __pyx_v_out, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated *__pyx_optional_args); /* proto*/
2939 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, int __pyx_v_ngz, int __pyx_v_order1, int __pyx_v_order2, int *__pyx_v_periodicity, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out_ewah, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones *__pyx_optional_args); /* proto*/
2940 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto*/
2941 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_s); /* proto*/
2942 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto*/
2943 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__compress(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf); /* proto*/
2944 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set *__pyx_optional_args); /* proto*/
2945 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2946 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2); /* proto*/
2947 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __Pyx_memviewslice __pyx_v_arr); /* proto*/
2948 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse_array_ptr(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint8_t *__pyx_v_arr); /* proto*/
2949 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __Pyx_memviewslice __pyx_v_arr); /* proto*/
2950 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined_array_ptr(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint8_t *__pyx_v_arr); /* proto*/
2951 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2); /* proto*/
2952 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2953 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get *__pyx_optional_args); /* proto*/
2954 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1); /* proto*/
2955 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i); /* proto*/
2956 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self); /* proto*/
2957 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self); /* proto*/
2958 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_solf); /* proto*/
2959 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_solf); /* proto*/
2960 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_ind); /* proto*/
2961 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, __Pyx_memviewslice __pyx_v_mask); /* proto*/
2962 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mm); /* proto*/
2963 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_mm); /* proto*/
2964 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self); /* proto*/
2965 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self); /* proto*/
2966 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__remove_duplicates(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self); /* proto*/
2967 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__prune(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self); /* proto*/
2968 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_ind); /* proto*/
2969 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, __Pyx_memviewslice __pyx_v_mask); /* proto*/
2970 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mm); /* proto*/
2971 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_mm); /* proto*/
2972 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self); /* proto*/
2973 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self); /* proto*/
2974 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_ind1, __pyx_t_5numpy_uint64_t __pyx_v_ind2); /* proto*/
2975 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, __Pyx_memviewslice __pyx_v_mask1, __Pyx_memviewslice __pyx_v_mask2); /* proto*/
2976 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mm); /* proto*/
2977 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_mm); /* proto*/
2978 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self); /* proto*/
2979 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self); /* proto*/
2980 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__remove_duplicates(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self); /* proto*/
2981 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__prune(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self); /* proto*/
2982 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_ind1, __pyx_t_5numpy_uint64_t __pyx_v_ind2); /* proto*/
2983 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, __Pyx_memviewslice __pyx_v_mask1, __Pyx_memviewslice __pyx_v_mask2); /* proto*/
2984 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mm); /* proto*/
2985 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_mm); /* proto*/
2986 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self); /* proto*/
2987 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self); /* proto*/
2988 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2989 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2990 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2991 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
2992 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*/
2993 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2994 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2995 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2996 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2997 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2998 
2999 /* Module declarations from 'cpython.buffer' */
3000 
3001 /* Module declarations from 'libc.string' */
3002 
3003 /* Module declarations from 'libc.stdio' */
3004 
3005 /* Module declarations from '__builtin__' */
3006 
3007 /* Module declarations from 'cpython.type' */
3008 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
3009 
3010 /* Module declarations from 'cpython' */
3011 
3012 /* Module declarations from 'cpython.object' */
3013 
3014 /* Module declarations from 'cpython.ref' */
3015 
3016 /* Module declarations from 'cpython.mem' */
3017 
3018 /* Module declarations from 'numpy' */
3019 
3020 /* Module declarations from 'numpy' */
3021 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
3022 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
3023 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
3024 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
3025 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
3026 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
3027 
3028 /* Module declarations from 'libcpp.utility' */
3029 
3030 /* Module declarations from 'libcpp.pair' */
3031 
3032 /* Module declarations from 'libcpp.set' */
3033 
3034 /* Module declarations from 'libcpp.vector' */
3035 
3036 /* Module declarations from 'libc.stdint' */
3037 
3038 /* Module declarations from 'libcpp' */
3039 
3040 /* Module declarations from 'libcpp.map' */
3041 
3042 /* Module declarations from 'libcpp.string' */
3043 
3044 /* Module declarations from 'cython.view' */
3045 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
3046 
3047 /* Module declarations from 'cython' */
3048 
3049 /* Module declarations from 'yt.utilities.lib.ewah_bool_array' */
3050 
3051 /* Module declarations from 'libc.stdlib' */
3052 
3053 /* Module declarations from 'libcpp.algorithm' */
3054 
3055 /* Module declarations from 'libc.float' */
3056 
3057 /* Module declarations from 'libc.math' */
3058 
3059 /* Module declarations from 'yt.utilities.lib.geometry_utils' */
3060 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*/
3061 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*/
3062 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*/
3063 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_t_5numpy_uint64_t); /*proto*/
3064 static CYTHON_INLINE __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2(__pyx_t_5numpy_uint64_t); /*proto*/
3065 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*/
3066 static __pyx_t_5numpy_uint32_t (*__pyx_f_2yt_9utilities_3lib_14geometry_utils_morton_neighbors_coarse)(__pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, int *, __pyx_t_5numpy_uint32_t, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
3067 static __pyx_t_5numpy_uint32_t (*__pyx_f_2yt_9utilities_3lib_14geometry_utils_morton_neighbors_refined)(__pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, int *, __pyx_t_5numpy_uint32_t, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); /*proto*/
3068 
3069 /* Module declarations from 'yt.utilities.lib.ewah_bool_wrap' */
3070 static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks = 0;
3071 static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection = 0;
3072 static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed = 0;
3073 static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet = 0;
3074 static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector = 0;
3075 static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet = 0;
3076 static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector = 0;
3077 static PyTypeObject *__pyx_array_type = 0;
3078 static PyTypeObject *__pyx_MemviewEnum_type = 0;
3079 static PyTypeObject *__pyx_memoryview_type = 0;
3080 static PyTypeObject *__pyx_memoryviewslice_type = 0;
3081 static __pyx_t_5numpy_uint64_t __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG;
3082 static __pyx_t_5numpy_uint64_t __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_MAX_VECTOR_SIZE;
3083 static PyObject *generic = 0;
3084 static PyObject *strided = 0;
3085 static PyObject *indirect = 0;
3086 static PyObject *contiguous = 0;
3087 static PyObject *indirect_contiguous = 0;
3088 static int __pyx_memoryview_thread_locks_used;
3089 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
3090 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet__set_state(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, PyObject *); /*proto*/
3091 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, PyObject *); /*proto*/
3092 static PyObject *__pyx_convert_set_to_py___pyx_t_5numpy_uint64_t(std::set<__pyx_t_5numpy_uint64_t>  const &); /*proto*/
3093 static std::set<__pyx_t_5numpy_uint64_t>  __pyx_convert_set_from_py___pyx_t_5numpy_uint64_t(PyObject *); /*proto*/
3094 static PyObject *__pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t(std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_5numpy_uint64_t>  const &); /*proto*/
3095 static PyObject *__pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  const &); /*proto*/
3096 static std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_5numpy_uint64_t>  __pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t(PyObject *); /*proto*/
3097 static std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  __pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(PyObject *); /*proto*/
3098 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/
3099 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/
3100 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/
3101 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/
3102 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/
3103 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
3104 static void *__pyx_align_pointer(void *, size_t); /*proto*/
3105 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
3106 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
3107 static PyObject *_unellipsify(PyObject *, int); /*proto*/
3108 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
3109 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
3110 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*/
3111 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
3112 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
3113 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
3114 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3115 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3116 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
3117 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3118 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
3119 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
3120 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
3121 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
3122 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
3123 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
3124 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
3125 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
3126 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
3127 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
3128 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
3129 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
3130 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
3131 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
3132 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
3133 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
3134 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
3135 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
3136 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/
3137 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t = { "uint64_t", NULL, sizeof(__pyx_t_5numpy_uint64_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint64_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint64_t), 0 };
3138 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 };
3139 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t = { "uint32_t", NULL, sizeof(__pyx_t_5numpy_uint32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint32_t), 0 };
3140 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint8_t), 0 };
3141 #define __Pyx_MODULE_NAME "yt.utilities.lib.ewah_bool_wrap"
3142 extern int __pyx_module_is_main_yt__utilities__lib__ewah_bool_wrap;
3143 int __pyx_module_is_main_yt__utilities__lib__ewah_bool_wrap = 0;
3144 
3145 /* Implementation of 'yt.utilities.lib.ewah_bool_wrap' */
3146 static PyObject *__pyx_builtin_range;
3147 static PyObject *__pyx_builtin_IndexError;
3148 static PyObject *__pyx_builtin_TypeError;
3149 static PyObject *__pyx_builtin_RuntimeError;
3150 static PyObject *__pyx_builtin_open;
3151 static PyObject *__pyx_builtin_ValueError;
3152 static PyObject *__pyx_builtin_ImportError;
3153 static PyObject *__pyx_builtin_MemoryError;
3154 static PyObject *__pyx_builtin_enumerate;
3155 static PyObject *__pyx_builtin_Ellipsis;
3156 static PyObject *__pyx_builtin_id;
3157 static const char __pyx_k_O[] = "O";
3158 static const char __pyx_k_Q[] = "Q";
3159 static const char __pyx_k_T[] = "T{";
3160   static const char __pyx_k_c[] = "c";
3161   static const char __pyx_k_s[] = "(%s)";
3162   static const char __pyx_k__5[] = "";
3163   static const char __pyx_k_i1[] = "i1";
3164   static const char __pyx_k_i2[] = "i2";
3165   static const char __pyx_k_id[] = "id";
3166   static const char __pyx_k_np[] = "np";
3167   static const char __pyx_k_rb[] = "rb";
3168   static const char __pyx_k_wb[] = "wb";
3169   static const char __pyx_k__47[] = "^";
3170   static const char __pyx_k__48[] = ":";
3171 static const char __pyx_k__49[] = "}";
3172 static const char __pyx_k__50[] = ",";
3173 static const char __pyx_k_arr[] = "arr";
3174 static const char __pyx_k_end[] = "end";
3175 static const char __pyx_k_new[] = "__new__";
3176 static const char __pyx_k_obj[] = "obj";
3177 static const char __pyx_k_out[] = "out";
3178 static const char __pyx_k_base[] = "base";
3179 static const char __pyx_k_dict[] = "__dict__";
3180 static const char __pyx_k_file[] = "file";
3181 static const char __pyx_k_imax[] = "imax";
3182 static const char __pyx_k_ind1[] = "ind1";
3183 static const char __pyx_k_ind2[] = "ind2";
3184 static const char __pyx_k_init[] = "__init__";
3185 static const char __pyx_k_join[] = "join";
3186 static const char __pyx_k_main[] = "__main__";
3187 static const char __pyx_k_mode[] = "mode";
3188 static const char __pyx_k_name[] = "name";
3189 static const char __pyx_k_ndim[] = "ndim";
3190 static const char __pyx_k_open[] = "open";
3191 static const char __pyx_k_pack[] = "pack";
3192 static const char __pyx_k_read[] = "read";
3193 static const char __pyx_k_size[] = "size";
3194 static const char __pyx_k_solf[] = "solf";
3195 static const char __pyx_k_step[] = "step";
3196 static const char __pyx_k_stop[] = "stop";
3197 static const char __pyx_k_test[] = "__test__";
3198 static const char __pyx_k_ASCII[] = "ASCII";
3199 static const char __pyx_k_class[] = "__class__";
3200 static const char __pyx_k_close[] = "close";
3201 static const char __pyx_k_dtype[] = "dtype";
3202 static const char __pyx_k_empty[] = "empty";
3203 static const char __pyx_k_error[] = "error";
3204 static const char __pyx_k_flags[] = "flags";
3205 static const char __pyx_k_ifile[] = "ifile";
3206 static const char __pyx_k_nele1[] = "nele1";
3207 static const char __pyx_k_nele2[] = "nele2";
3208 static const char __pyx_k_numpy[] = "numpy";
3209 static const char __pyx_k_print[] = "print";
3210 static const char __pyx_k_range[] = "range";
3211 static const char __pyx_k_shape[] = "shape";
3212 static const char __pyx_k_start[] = "start";
3213 static const char __pyx_k_write[] = "write";
3214 static const char __pyx_k_encode[] = "encode";
3215 static const char __pyx_k_format[] = "format";
3216 static const char __pyx_k_import[] = "__import__";
3217 static const char __pyx_k_name_2[] = "__name__";
3218 static const char __pyx_k_nfiles[] = "nfiles";
3219 static const char __pyx_k_pickle[] = "pickle";
3220 static const char __pyx_k_prefix[] = "prefix";
3221 static const char __pyx_k_reduce[] = "__reduce__";
3222 static const char __pyx_k_struct[] = "struct";
3223 static const char __pyx_k_uint64[] = "uint64";
3224 static const char __pyx_k_unpack[] = "unpack";
3225 static const char __pyx_k_update[] = "update";
3226 static const char __pyx_k_dealloc[] = "__dealloc__";
3227 static const char __pyx_k_fortran[] = "fortran";
3228 static const char __pyx_k_lexsort[] = "lexsort";
3229 static const char __pyx_k_memview[] = "memview";
3230 static const char __pyx_k_Ellipsis[] = "Ellipsis";
3231 static const char __pyx_k_calcsize[] = "calcsize";
3232 static const char __pyx_k_getstate[] = "__getstate__";
3233 static const char __pyx_k_itemsize[] = "itemsize";
3234 static const char __pyx_k_pyx_type[] = "__pyx_type";
3235 static const char __pyx_k_setstate[] = "__setstate__";
3236 static const char __pyx_k_TypeError[] = "TypeError";
3237 static const char __pyx_k_enumerate[] = "enumerate";
3238 static const char __pyx_k_pyx_state[] = "__pyx_state";
3239 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
3240 static const char __pyx_k_IndexError[] = "IndexError";
3241 static const char __pyx_k_ValueError[] = "ValueError";
3242 static const char __pyx_k_pyx_result[] = "__pyx_result";
3243 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
3244 static const char __pyx_k_ImportError[] = "ImportError";
3245 static const char __pyx_k_MemoryError[] = "MemoryError";
3246 static const char __pyx_k_PickleError[] = "PickleError";
3247 static const char __pyx_k_FileBitmasks[] = "FileBitmasks";
3248 static const char __pyx_k_RuntimeError[] = "RuntimeError";
3249 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
3250 static const char __pyx_k_stringsource[] = "stringsource";
3251 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
3252 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
3253 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
3254 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
3255 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
3256 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
3257 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
3258 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
3259 static const char __pyx_k_Index_exceedes_max[] = "Index {} exceedes max {}.";
3260 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
3261 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
3262 static const char __pyx_k_BoolArrayCollection[] = "BoolArrayCollection";
3263 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
3264 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
3265 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
3266 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
3267 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
3268 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
3269 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
3270 static const char __pyx_k_SparseUnorderedBitmaskSet[] = "SparseUnorderedBitmaskSet";
3271 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
3272 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
3273 static const char __pyx_k_SparseUnorderedBitmaskVector[] = "SparseUnorderedBitmaskVector";
3274 static const char __pyx_k_8d_coarse_8d_refined_8d_total[] = "{}{: 8d} coarse, {: 8d} refined, {: 8d} total";
3275 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
3276 static const char __pyx_k_pyx_unpickle_SparseUnorderedBi[] = "__pyx_unpickle_SparseUnorderedBitmaskSet";
3277 static const char __pyx_k_pyx_unpickle_SparseUnorderedRe[] = "__pyx_unpickle_SparseUnorderedRefinedBitmaskSet";
3278 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
3279 static const char __pyx_k_10d_10d_collisions_at_coarse_re[] = "{: 10d}/{: 10d} collisions at coarse refinement.  ({: 10.5f}%)";
3280 static const char __pyx_k_10d_10d_collisions_at_refined_r[] = "{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)";
3281 static const char __pyx_k_BoolArrayCollectionUncompressed[] = "BoolArrayCollectionUncompressed";
3282 static const char __pyx_k_Wrapper_for_EWAH_Bool_Array_htt[] = "\nWrapper for EWAH Bool Array: https://github.com/lemire/EWAHBoolArray\n\n\n\n";
3283 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
3284 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
3285 static const char __pyx_k_yt_utilities_lib_ewah_bool_wrap[] = "yt.utilities.lib.ewah_bool_wrap";
3286 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
3287 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
3288 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
3289 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
3290 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
3291 static const char __pyx_k_Error_in_read_File_indicates_ref[] = "Error in read. File indicates {} refinements, but bool array has {}.";
3292 static const char __pyx_k_File_There_are_refined_cells_tha[] = "File {}: There are {} refined cells that are not set on coarse level.";
3293 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
3294 static const char __pyx_k_Incompatible_checksums_s_vs_0x5f[] = "Incompatible checksums (%s vs 0x5fce916 = (entries))";
3295 static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
3296 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
3297 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
3298 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
3299 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
3300 static const char __pyx_k_Set_from_s_array_and_ended_up_wi[] = "Set from %s array and ended up with %s bytes";
3301 static const char __pyx_k_SparseUnorderedRefinedBitmaskSet[] = "SparseUnorderedRefinedBitmaskSet";
3302 static const char __pyx_k_SparseUnorderedRefinedBitmaskVec[] = "SparseUnorderedRefinedBitmaskVector";
3303 static const char __pyx_k_There_are_refined_cells_that_are[] = "There are {} refined cells that are not set on coarse level.";
3304 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
3305 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
3306 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
3307 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
3308 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
3309 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
3310 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
3311 static PyObject *__pyx_kp_s_10d_10d_collisions_at_coarse_re;
3312 static PyObject *__pyx_kp_s_10d_10d_collisions_at_refined_r;
3313 static PyObject *__pyx_kp_s_8d_coarse_8d_refined_8d_total;
3314 static PyObject *__pyx_n_s_ASCII;
3315 static PyObject *__pyx_n_s_BoolArrayCollection;
3316 static PyObject *__pyx_n_s_BoolArrayCollectionUncompressed;
3317 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
3318 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
3319 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
3320 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
3321 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
3322 static PyObject *__pyx_n_s_Ellipsis;
3323 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
3324 static PyObject *__pyx_kp_s_Error_in_read_File_indicates_ref;
3325 static PyObject *__pyx_n_s_FileBitmasks;
3326 static PyObject *__pyx_kp_s_File_There_are_refined_cells_tha;
3327 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
3328 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
3329 static PyObject *__pyx_n_s_ImportError;
3330 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x5f;
3331 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
3332 static PyObject *__pyx_n_s_IndexError;
3333 static PyObject *__pyx_kp_s_Index_exceedes_max;
3334 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
3335 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
3336 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
3337 static PyObject *__pyx_n_s_MemoryError;
3338 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
3339 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
3340 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
3341 static PyObject *__pyx_n_b_O;
3342 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
3343 static PyObject *__pyx_n_s_PickleError;
3344 static PyObject *__pyx_n_s_Q;
3345 static PyObject *__pyx_n_s_RuntimeError;
3346 static PyObject *__pyx_kp_s_Set_from_s_array_and_ended_up_wi;
3347 static PyObject *__pyx_n_s_SparseUnorderedBitmaskSet;
3348 static PyObject *__pyx_n_s_SparseUnorderedBitmaskVector;
3349 static PyObject *__pyx_n_s_SparseUnorderedRefinedBitmaskSet;
3350 static PyObject *__pyx_n_s_SparseUnorderedRefinedBitmaskVec;
3351 static PyObject *__pyx_kp_b_T;
3352 static PyObject *__pyx_kp_s_There_are_refined_cells_that_are;
3353 static PyObject *__pyx_n_s_TypeError;
3354 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
3355 static PyObject *__pyx_n_s_ValueError;
3356 static PyObject *__pyx_n_s_View_MemoryView;
3357 static PyObject *__pyx_kp_b__47;
3358 static PyObject *__pyx_kp_b__48;
3359 static PyObject *__pyx_kp_b__49;
3360 static PyObject *__pyx_kp_b__5;
3361 static PyObject *__pyx_kp_s__5;
3362 static PyObject *__pyx_kp_u__50;
3363 static PyObject *__pyx_n_s_allocate_buffer;
3364 static PyObject *__pyx_n_s_arr;
3365 static PyObject *__pyx_n_s_base;
3366 static PyObject *__pyx_n_s_c;
3367 static PyObject *__pyx_n_u_c;
3368 static PyObject *__pyx_n_s_calcsize;
3369 static PyObject *__pyx_n_s_class;
3370 static PyObject *__pyx_n_s_cline_in_traceback;
3371 static PyObject *__pyx_n_s_close;
3372 static PyObject *__pyx_kp_s_contiguous_and_direct;
3373 static PyObject *__pyx_kp_s_contiguous_and_indirect;
3374 static PyObject *__pyx_n_s_dealloc;
3375 static PyObject *__pyx_n_s_dict;
3376 static PyObject *__pyx_n_s_dtype;
3377 static PyObject *__pyx_n_s_dtype_is_object;
3378 static PyObject *__pyx_n_s_empty;
3379 static PyObject *__pyx_n_s_encode;
3380 static PyObject *__pyx_n_s_end;
3381 static PyObject *__pyx_n_s_enumerate;
3382 static PyObject *__pyx_n_s_error;
3383 static PyObject *__pyx_n_s_file;
3384 static PyObject *__pyx_n_s_flags;
3385 static PyObject *__pyx_n_s_format;
3386 static PyObject *__pyx_n_s_fortran;
3387 static PyObject *__pyx_n_u_fortran;
3388 static PyObject *__pyx_n_s_getstate;
3389 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
3390 static PyObject *__pyx_n_s_i1;
3391 static PyObject *__pyx_n_s_i2;
3392 static PyObject *__pyx_n_s_id;
3393 static PyObject *__pyx_n_s_ifile;
3394 static PyObject *__pyx_n_s_imax;
3395 static PyObject *__pyx_n_s_import;
3396 static PyObject *__pyx_n_s_ind1;
3397 static PyObject *__pyx_n_s_ind2;
3398 static PyObject *__pyx_n_s_init;
3399 static PyObject *__pyx_n_s_itemsize;
3400 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
3401 static PyObject *__pyx_n_s_join;
3402 static PyObject *__pyx_n_s_lexsort;
3403 static PyObject *__pyx_n_s_main;
3404 static PyObject *__pyx_n_s_memview;
3405 static PyObject *__pyx_n_s_mode;
3406 static PyObject *__pyx_n_s_name;
3407 static PyObject *__pyx_n_s_name_2;
3408 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
3409 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
3410 static PyObject *__pyx_n_s_ndim;
3411 static PyObject *__pyx_n_s_nele1;
3412 static PyObject *__pyx_n_s_nele2;
3413 static PyObject *__pyx_n_s_new;
3414 static PyObject *__pyx_n_s_nfiles;
3415 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
3416 static PyObject *__pyx_n_s_np;
3417 static PyObject *__pyx_n_s_numpy;
3418 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
3419 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
3420 static PyObject *__pyx_n_s_obj;
3421 static PyObject *__pyx_n_s_open;
3422 static PyObject *__pyx_n_s_out;
3423 static PyObject *__pyx_n_s_pack;
3424 static PyObject *__pyx_n_s_pickle;
3425 static PyObject *__pyx_n_s_prefix;
3426 static PyObject *__pyx_n_s_print;
3427 static PyObject *__pyx_n_s_pyx_PickleError;
3428 static PyObject *__pyx_n_s_pyx_checksum;
3429 static PyObject *__pyx_n_s_pyx_getbuffer;
3430 static PyObject *__pyx_n_s_pyx_result;
3431 static PyObject *__pyx_n_s_pyx_state;
3432 static PyObject *__pyx_n_s_pyx_type;
3433 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
3434 static PyObject *__pyx_n_s_pyx_unpickle_SparseUnorderedBi;
3435 static PyObject *__pyx_n_s_pyx_unpickle_SparseUnorderedRe;
3436 static PyObject *__pyx_n_s_pyx_vtable;
3437 static PyObject *__pyx_n_s_range;
3438 static PyObject *__pyx_n_s_rb;
3439 static PyObject *__pyx_n_s_read;
3440 static PyObject *__pyx_n_s_reduce;
3441 static PyObject *__pyx_n_s_reduce_cython;
3442 static PyObject *__pyx_n_s_reduce_ex;
3443 static PyObject *__pyx_kp_u_s;
3444 static PyObject *__pyx_n_s_setstate;
3445 static PyObject *__pyx_n_s_setstate_cython;
3446 static PyObject *__pyx_n_s_shape;
3447 static PyObject *__pyx_n_s_size;
3448 static PyObject *__pyx_n_s_solf;
3449 static PyObject *__pyx_n_s_start;
3450 static PyObject *__pyx_n_s_step;
3451 static PyObject *__pyx_n_s_stop;
3452 static PyObject *__pyx_kp_s_strided_and_direct;
3453 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
3454 static PyObject *__pyx_kp_s_strided_and_indirect;
3455 static PyObject *__pyx_kp_s_stringsource;
3456 static PyObject *__pyx_n_s_struct;
3457 static PyObject *__pyx_n_s_test;
3458 static PyObject *__pyx_n_s_uint64;
3459 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
3460 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
3461 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
3462 static PyObject *__pyx_n_s_unpack;
3463 static PyObject *__pyx_n_s_update;
3464 static PyObject *__pyx_n_s_wb;
3465 static PyObject *__pyx_n_s_write;
3466 static PyObject *__pyx_n_s_yt_utilities_lib_ewah_bool_wrap;
3467 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_nfiles); /* proto */
3468 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_2iseq(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_solf); /* proto */
3469 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_4count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile); /* proto */
3470 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_6count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile); /* proto */
3471 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_8count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile); /* proto */
3472 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_10append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf); /* proto */
3473 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_12logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile, PyObject *__pyx_v_solf, PyObject *__pyx_v_out); /* proto */
3474 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_14logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile, PyObject *__pyx_v_solf, PyObject *__pyx_v_out); /* proto */
3475 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_16check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self); /* proto */
3476 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_18__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self); /* proto */
3477 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_20print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile, PyObject *__pyx_v_prefix); /* proto */
3478 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self); /* proto */
3479 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3480 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto */
3481 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_2__richcmp__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, int __pyx_v_op); /* proto */
3482 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_4set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1, PyObject *__pyx_v_i2); /* proto */
3483 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_6set_from(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __Pyx_memviewslice __pyx_v_ids); /* proto */
3484 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_8set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1); /* proto */
3485 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_10set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1, PyObject *__pyx_v_i2); /* proto */
3486 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_12set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1, PyObject *__pyx_v_i2); /* proto */
3487 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_14set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1); /* proto */
3488 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_16get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1, PyObject *__pyx_v_i2); /* proto */
3489 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_18get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1); /* proto */
3490 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_20get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_imax, PyObject *__pyx_v_arr); /* proto */
3491 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_22contains(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i); /* proto */
3492 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_24isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i); /* proto */
3493 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_26ewah_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto */
3494 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_28count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto */
3495 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_30count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto */
3496 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_32count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto */
3497 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_34append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_solf); /* proto */
3498 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_36logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_solf, PyObject *__pyx_v_out); /* proto */
3499 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_38logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_solf, PyObject *__pyx_v_out); /* proto */
3500 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_40dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto */
3501 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_42loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_s); /* proto */
3502 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_44save(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_fname); /* proto */
3503 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_46load(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_fname); /* proto */
3504 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_48__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto */
3505 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_50print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
3506 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_52__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self); /* proto */
3507 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_54__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3508 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_nele1, __pyx_t_5numpy_uint64_t __pyx_v_nele2); /* proto */
3509 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_2reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self); /* proto */
3510 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self); /* proto */
3511 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_6print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
3512 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self); /* proto */
3513 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3514 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self); /* proto */
3515 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_2set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, PyObject *__pyx_v_ind); /* proto */
3516 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self); /* proto */
3517 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self); /* proto */
3518 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3519 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, PyObject *__pyx_v_ind); /* proto */
3520 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_2__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self); /* proto */
3521 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_4__reduce_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self); /* proto */
3522 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_6__setstate_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
3523 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self); /* proto */
3524 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_2set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, PyObject *__pyx_v_ind1, PyObject *__pyx_v_ind2); /* proto */
3525 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self); /* proto */
3526 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self); /* proto */
3527 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
3528 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, PyObject *__pyx_v_ind1, PyObject *__pyx_v_ind2); /* proto */
3529 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_2__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self); /* proto */
3530 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_4__reduce_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self); /* proto */
3531 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_6__setstate_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
3532 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
3533 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_2__pyx_unpickle_SparseUnorderedRefinedBitmaskSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
3534 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
3535 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
3536 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 */
3537 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 */
3538 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3539 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3540 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
3541 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
3542 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
3543 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 */
3544 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
3545 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 */
3546 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3547 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3548 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
3549 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
3550 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 */
3551 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3552 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
3553 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 */
3554 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 */
3555 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3556 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3557 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3558 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3559 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3560 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3561 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3562 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3563 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3564 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3565 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3566 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3567 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3568 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3569 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3570 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3571 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
3572 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 */
3573 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3574 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3575 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
3576 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 */
3577 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 */
3578 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3579 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3580 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3581 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3582 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3583 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3584 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3585 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3586 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3587 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3588 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3589 static PyObject *__pyx_float_0_0;
3590 static PyObject *__pyx_int_0;
3591 static PyObject *__pyx_int_1;
3592 static PyObject *__pyx_int_2;
3593 static PyObject *__pyx_int_100460822;
3594 static PyObject *__pyx_int_184977713;
3595 static PyObject *__pyx_int_neg_1;
3596 static __pyx_t_5numpy_uint64_t __pyx_k__3;
3597 static __pyx_t_5numpy_uint64_t __pyx_k__4;
3598 static __pyx_t_5numpy_uint64_t __pyx_k__8;
3599 static PyObject *__pyx_k__9;
3600 static __pyx_t_5numpy_uint64_t __pyx_k__10;
3601 static PyObject *__pyx_k__11;
3602 static __pyx_t_5numpy_uint64_t __pyx_k__14;
3603 static __pyx_t_5numpy_uint64_t __pyx_k__15;
3604 static PyObject *__pyx_tuple_;
3605 static PyObject *__pyx_tuple__2;
3606 static PyObject *__pyx_tuple__6;
3607 static PyObject *__pyx_tuple__7;
3608 static PyObject *__pyx_slice__43;
3609 static PyObject *__pyx_tuple__12;
3610 static PyObject *__pyx_tuple__13;
3611 static PyObject *__pyx_tuple__16;
3612 static PyObject *__pyx_tuple__17;
3613 static PyObject *__pyx_tuple__18;
3614 static PyObject *__pyx_tuple__19;
3615 static PyObject *__pyx_tuple__20;
3616 static PyObject *__pyx_tuple__21;
3617 static PyObject *__pyx_tuple__22;
3618 static PyObject *__pyx_tuple__23;
3619 static PyObject *__pyx_tuple__24;
3620 static PyObject *__pyx_tuple__25;
3621 static PyObject *__pyx_tuple__26;
3622 static PyObject *__pyx_tuple__27;
3623 static PyObject *__pyx_tuple__28;
3624 static PyObject *__pyx_tuple__29;
3625 static PyObject *__pyx_tuple__30;
3626 static PyObject *__pyx_tuple__31;
3627 static PyObject *__pyx_tuple__32;
3628 static PyObject *__pyx_tuple__33;
3629 static PyObject *__pyx_tuple__34;
3630 static PyObject *__pyx_tuple__35;
3631 static PyObject *__pyx_tuple__36;
3632 static PyObject *__pyx_tuple__37;
3633 static PyObject *__pyx_tuple__38;
3634 static PyObject *__pyx_tuple__39;
3635 static PyObject *__pyx_tuple__40;
3636 static PyObject *__pyx_tuple__41;
3637 static PyObject *__pyx_tuple__42;
3638 static PyObject *__pyx_tuple__44;
3639 static PyObject *__pyx_tuple__45;
3640 static PyObject *__pyx_tuple__46;
3641 static PyObject *__pyx_tuple__51;
3642 static PyObject *__pyx_tuple__53;
3643 static PyObject *__pyx_tuple__55;
3644 static PyObject *__pyx_tuple__56;
3645 static PyObject *__pyx_tuple__57;
3646 static PyObject *__pyx_tuple__58;
3647 static PyObject *__pyx_tuple__59;
3648 static PyObject *__pyx_tuple__60;
3649 static PyObject *__pyx_codeobj__52;
3650 static PyObject *__pyx_codeobj__54;
3651 static PyObject *__pyx_codeobj__61;
3652 /* Late includes */
3653 
3654 /* "yt/utilities/lib/ewah_bool_wrap.pyx":42
3655  * cdef class FileBitmasks:
3656  *
3657  *     def __cinit__(self, np.uint32_t nfiles):             # <<<<<<<<<<<<<<
3658  *         cdef int i
3659  *         self.nfiles = nfiles
3660  */
3661 
3662 /* Python wrapper */
3663 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_1__cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)3664 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3665   __pyx_t_5numpy_uint32_t __pyx_v_nfiles;
3666   int __pyx_r;
3667   __Pyx_RefNannyDeclarations
3668   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
3669   {
3670     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nfiles,0};
3671     PyObject* values[1] = {0};
3672     if (unlikely(__pyx_kwds)) {
3673       Py_ssize_t kw_args;
3674       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3675       switch (pos_args) {
3676         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3677         CYTHON_FALLTHROUGH;
3678         case  0: break;
3679         default: goto __pyx_L5_argtuple_error;
3680       }
3681       kw_args = PyDict_Size(__pyx_kwds);
3682       switch (pos_args) {
3683         case  0:
3684         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nfiles)) != 0)) kw_args--;
3685         else goto __pyx_L5_argtuple_error;
3686       }
3687       if (unlikely(kw_args > 0)) {
3688         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 42, __pyx_L3_error)
3689       }
3690     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
3691       goto __pyx_L5_argtuple_error;
3692     } else {
3693       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3694     }
3695     __pyx_v_nfiles = __Pyx_PyInt_As_npy_uint32(values[0]); if (unlikely((__pyx_v_nfiles == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L3_error)
3696   }
3697   goto __pyx_L4_argument_unpacking_done;
3698   __pyx_L5_argtuple_error:;
3699   __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 42, __pyx_L3_error)
3700   __pyx_L3_error:;
3701   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3702   __Pyx_RefNannyFinishContext();
3703   return -1;
3704   __pyx_L4_argument_unpacking_done:;
3705   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), __pyx_v_nfiles);
3706 
3707   /* function exit code */
3708   __Pyx_RefNannyFinishContext();
3709   return __pyx_r;
3710 }
3711 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_nfiles)3712 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_nfiles) {
3713   int __pyx_v_i;
3714   int __pyx_r;
3715   __Pyx_RefNannyDeclarations
3716   __pyx_t_5numpy_uint32_t __pyx_t_1;
3717   __pyx_t_5numpy_uint32_t __pyx_t_2;
3718   int __pyx_t_3;
3719   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_t_4;
3720   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_t_5;
3721   __Pyx_RefNannySetupContext("__cinit__", 0);
3722 
3723   /* "yt/utilities/lib/ewah_bool_wrap.pyx":44
3724  *     def __cinit__(self, np.uint32_t nfiles):
3725  *         cdef int i
3726  *         self.nfiles = nfiles             # <<<<<<<<<<<<<<
3727  *         self.ewah_keys = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))
3728  *         self.ewah_refn = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))
3729  */
3730   __pyx_v_self->nfiles = __pyx_v_nfiles;
3731 
3732   /* "yt/utilities/lib/ewah_bool_wrap.pyx":45
3733  *         cdef int i
3734  *         self.nfiles = nfiles
3735  *         self.ewah_keys = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))             # <<<<<<<<<<<<<<
3736  *         self.ewah_refn = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))
3737  *         self.ewah_coll = <ewah_map **>malloc(nfiles*sizeof(ewah_map*))
3738  */
3739   __pyx_v_self->ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)malloc((__pyx_v_nfiles * (sizeof(__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)))));
3740 
3741   /* "yt/utilities/lib/ewah_bool_wrap.pyx":46
3742  *         self.nfiles = nfiles
3743  *         self.ewah_keys = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))
3744  *         self.ewah_refn = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))             # <<<<<<<<<<<<<<
3745  *         self.ewah_coll = <ewah_map **>malloc(nfiles*sizeof(ewah_map*))
3746  *         for i in range(nfiles):
3747  */
3748   __pyx_v_self->ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)malloc((__pyx_v_nfiles * (sizeof(__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)))));
3749 
3750   /* "yt/utilities/lib/ewah_bool_wrap.pyx":47
3751  *         self.ewah_keys = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))
3752  *         self.ewah_refn = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))
3753  *         self.ewah_coll = <ewah_map **>malloc(nfiles*sizeof(ewah_map*))             # <<<<<<<<<<<<<<
3754  *         for i in range(nfiles):
3755  *             self.ewah_keys[i] = new ewah_bool_array()
3756  */
3757   __pyx_v_self->ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)malloc((__pyx_v_nfiles * (sizeof(__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)))));
3758 
3759   /* "yt/utilities/lib/ewah_bool_wrap.pyx":48
3760  *         self.ewah_refn = <ewah_bool_array **>malloc(nfiles*sizeof(ewah_bool_array*))
3761  *         self.ewah_coll = <ewah_map **>malloc(nfiles*sizeof(ewah_map*))
3762  *         for i in range(nfiles):             # <<<<<<<<<<<<<<
3763  *             self.ewah_keys[i] = new ewah_bool_array()
3764  *             self.ewah_refn[i] = new ewah_bool_array()
3765  */
3766   __pyx_t_1 = __pyx_v_nfiles;
3767   __pyx_t_2 = __pyx_t_1;
3768   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
3769     __pyx_v_i = __pyx_t_3;
3770 
3771     /* "yt/utilities/lib/ewah_bool_wrap.pyx":49
3772  *         self.ewah_coll = <ewah_map **>malloc(nfiles*sizeof(ewah_map*))
3773  *         for i in range(nfiles):
3774  *             self.ewah_keys[i] = new ewah_bool_array()             # <<<<<<<<<<<<<<
3775  *             self.ewah_refn[i] = new ewah_bool_array()
3776  *             self.ewah_coll[i] = new ewah_map()
3777  */
3778     try {
3779       __pyx_t_4 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array();
3780     } catch(...) {
3781       __Pyx_CppExn2PyErr();
3782       __PYX_ERR(0, 49, __pyx_L1_error)
3783     }
3784     (__pyx_v_self->ewah_keys[__pyx_v_i]) = __pyx_t_4;
3785 
3786     /* "yt/utilities/lib/ewah_bool_wrap.pyx":50
3787  *         for i in range(nfiles):
3788  *             self.ewah_keys[i] = new ewah_bool_array()
3789  *             self.ewah_refn[i] = new ewah_bool_array()             # <<<<<<<<<<<<<<
3790  *             self.ewah_coll[i] = new ewah_map()
3791  *
3792  */
3793     try {
3794       __pyx_t_4 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array();
3795     } catch(...) {
3796       __Pyx_CppExn2PyErr();
3797       __PYX_ERR(0, 50, __pyx_L1_error)
3798     }
3799     (__pyx_v_self->ewah_refn[__pyx_v_i]) = __pyx_t_4;
3800 
3801     /* "yt/utilities/lib/ewah_bool_wrap.pyx":51
3802  *             self.ewah_keys[i] = new ewah_bool_array()
3803  *             self.ewah_refn[i] = new ewah_bool_array()
3804  *             self.ewah_coll[i] = new ewah_map()             # <<<<<<<<<<<<<<
3805  *
3806  *     cdef void _reset(self):
3807  */
3808     try {
3809       __pyx_t_5 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map();
3810     } catch(...) {
3811       __Pyx_CppExn2PyErr();
3812       __PYX_ERR(0, 51, __pyx_L1_error)
3813     }
3814     (__pyx_v_self->ewah_coll[__pyx_v_i]) = __pyx_t_5;
3815   }
3816 
3817   /* "yt/utilities/lib/ewah_bool_wrap.pyx":42
3818  * cdef class FileBitmasks:
3819  *
3820  *     def __cinit__(self, np.uint32_t nfiles):             # <<<<<<<<<<<<<<
3821  *         cdef int i
3822  *         self.nfiles = nfiles
3823  */
3824 
3825   /* function exit code */
3826   __pyx_r = 0;
3827   goto __pyx_L0;
3828   __pyx_L1_error:;
3829   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3830   __pyx_r = -1;
3831   __pyx_L0:;
3832   __Pyx_RefNannyFinishContext();
3833   return __pyx_r;
3834 }
3835 
3836 /* "yt/utilities/lib/ewah_bool_wrap.pyx":53
3837  *             self.ewah_coll[i] = new ewah_map()
3838  *
3839  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
3840  *         cdef np.int32_t ifile
3841  *         for ifile in range(self.nfiles):
3842  */
3843 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self)3844 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self) {
3845   __pyx_t_5numpy_int32_t __pyx_v_ifile;
3846   __Pyx_RefNannyDeclarations
3847   __pyx_t_5numpy_uint32_t __pyx_t_1;
3848   __pyx_t_5numpy_uint32_t __pyx_t_2;
3849   __pyx_t_5numpy_int32_t __pyx_t_3;
3850   __Pyx_RefNannySetupContext("_reset", 0);
3851 
3852   /* "yt/utilities/lib/ewah_bool_wrap.pyx":55
3853  *     cdef void _reset(self):
3854  *         cdef np.int32_t ifile
3855  *         for ifile in range(self.nfiles):             # <<<<<<<<<<<<<<
3856  *             self.ewah_keys[ifile].reset()
3857  *             self.ewah_refn[ifile].reset()
3858  */
3859   __pyx_t_1 = __pyx_v_self->nfiles;
3860   __pyx_t_2 = __pyx_t_1;
3861   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
3862     __pyx_v_ifile = __pyx_t_3;
3863 
3864     /* "yt/utilities/lib/ewah_bool_wrap.pyx":56
3865  *         cdef np.int32_t ifile
3866  *         for ifile in range(self.nfiles):
3867  *             self.ewah_keys[ifile].reset()             # <<<<<<<<<<<<<<
3868  *             self.ewah_refn[ifile].reset()
3869  *             self.ewah_coll[ifile].clear()
3870  */
3871     (__pyx_v_self->ewah_keys[__pyx_v_ifile])->reset();
3872 
3873     /* "yt/utilities/lib/ewah_bool_wrap.pyx":57
3874  *         for ifile in range(self.nfiles):
3875  *             self.ewah_keys[ifile].reset()
3876  *             self.ewah_refn[ifile].reset()             # <<<<<<<<<<<<<<
3877  *             self.ewah_coll[ifile].clear()
3878  *
3879  */
3880     (__pyx_v_self->ewah_refn[__pyx_v_ifile])->reset();
3881 
3882     /* "yt/utilities/lib/ewah_bool_wrap.pyx":58
3883  *             self.ewah_keys[ifile].reset()
3884  *             self.ewah_refn[ifile].reset()
3885  *             self.ewah_coll[ifile].clear()             # <<<<<<<<<<<<<<
3886  *
3887  *     cdef bint _iseq(self, FileBitmasks solf):
3888  */
3889     (__pyx_v_self->ewah_coll[__pyx_v_ifile])->clear();
3890   }
3891 
3892   /* "yt/utilities/lib/ewah_bool_wrap.pyx":53
3893  *             self.ewah_coll[i] = new ewah_map()
3894  *
3895  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
3896  *         cdef np.int32_t ifile
3897  *         for ifile in range(self.nfiles):
3898  */
3899 
3900   /* function exit code */
3901   __Pyx_RefNannyFinishContext();
3902 }
3903 
3904 /* "yt/utilities/lib/ewah_bool_wrap.pyx":60
3905  *             self.ewah_coll[ifile].clear()
3906  *
3907  *     cdef bint _iseq(self, FileBitmasks solf):             # <<<<<<<<<<<<<<
3908  *         cdef np.int32_t ifile
3909  *         cdef ewah_bool_array* arr1
3910  */
3911 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__iseq(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_solf)3912 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__iseq(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_solf) {
3913   __pyx_t_5numpy_int32_t __pyx_v_ifile;
3914   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_arr1;
3915   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_arr2;
3916   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_map1;
3917   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_map2;
3918   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_p __pyx_v_pair1;
3919   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_p __pyx_v_pair2;
3920   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
3921   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
3922   int __pyx_r;
3923   __Pyx_RefNannyDeclarations
3924   int __pyx_t_1;
3925   __pyx_t_5numpy_uint32_t __pyx_t_2;
3926   __pyx_t_5numpy_uint32_t __pyx_t_3;
3927   __pyx_t_5numpy_int32_t __pyx_t_4;
3928   std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array> ::iterator __pyx_t_5;
3929   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_t_6;
3930   std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  __pyx_t_7;
3931   __Pyx_RefNannySetupContext("_iseq", 0);
3932 
3933   /* "yt/utilities/lib/ewah_bool_wrap.pyx":68
3934  *         cdef ewahmap_p pair1, pair2
3935  *         cdef ewahmap_it it_map1, it_map2
3936  *         if self.nfiles != solf.nfiles:             # <<<<<<<<<<<<<<
3937  *             return 0
3938  *         for ifile in range(self.nfiles):
3939  */
3940   __pyx_t_1 = ((__pyx_v_self->nfiles != __pyx_v_solf->nfiles) != 0);
3941   if (__pyx_t_1) {
3942 
3943     /* "yt/utilities/lib/ewah_bool_wrap.pyx":69
3944  *         cdef ewahmap_it it_map1, it_map2
3945  *         if self.nfiles != solf.nfiles:
3946  *             return 0             # <<<<<<<<<<<<<<
3947  *         for ifile in range(self.nfiles):
3948  *             # Keys
3949  */
3950     __pyx_r = 0;
3951     goto __pyx_L0;
3952 
3953     /* "yt/utilities/lib/ewah_bool_wrap.pyx":68
3954  *         cdef ewahmap_p pair1, pair2
3955  *         cdef ewahmap_it it_map1, it_map2
3956  *         if self.nfiles != solf.nfiles:             # <<<<<<<<<<<<<<
3957  *             return 0
3958  *         for ifile in range(self.nfiles):
3959  */
3960   }
3961 
3962   /* "yt/utilities/lib/ewah_bool_wrap.pyx":70
3963  *         if self.nfiles != solf.nfiles:
3964  *             return 0
3965  *         for ifile in range(self.nfiles):             # <<<<<<<<<<<<<<
3966  *             # Keys
3967  *             arr1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
3968  */
3969   __pyx_t_2 = __pyx_v_self->nfiles;
3970   __pyx_t_3 = __pyx_t_2;
3971   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
3972     __pyx_v_ifile = __pyx_t_4;
3973 
3974     /* "yt/utilities/lib/ewah_bool_wrap.pyx":72
3975  *         for ifile in range(self.nfiles):
3976  *             # Keys
3977  *             arr1 = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
3978  *             arr2 = (<ewah_bool_array **> solf.ewah_keys)[ifile]
3979  *             if arr1[0] != arr2[0]:
3980  */
3981     __pyx_v_arr1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
3982 
3983     /* "yt/utilities/lib/ewah_bool_wrap.pyx":73
3984  *             # Keys
3985  *             arr1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
3986  *             arr2 = (<ewah_bool_array **> solf.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
3987  *             if arr1[0] != arr2[0]:
3988  *                 return 0
3989  */
3990     __pyx_v_arr2 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_solf->ewah_keys)[__pyx_v_ifile]);
3991 
3992     /* "yt/utilities/lib/ewah_bool_wrap.pyx":74
3993  *             arr1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
3994  *             arr2 = (<ewah_bool_array **> solf.ewah_keys)[ifile]
3995  *             if arr1[0] != arr2[0]:             # <<<<<<<<<<<<<<
3996  *                 return 0
3997  *             # Refn
3998  */
3999     __pyx_t_1 = (((__pyx_v_arr1[0]) != (__pyx_v_arr2[0])) != 0);
4000     if (__pyx_t_1) {
4001 
4002       /* "yt/utilities/lib/ewah_bool_wrap.pyx":75
4003  *             arr2 = (<ewah_bool_array **> solf.ewah_keys)[ifile]
4004  *             if arr1[0] != arr2[0]:
4005  *                 return 0             # <<<<<<<<<<<<<<
4006  *             # Refn
4007  *             arr1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
4008  */
4009       __pyx_r = 0;
4010       goto __pyx_L0;
4011 
4012       /* "yt/utilities/lib/ewah_bool_wrap.pyx":74
4013  *             arr1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
4014  *             arr2 = (<ewah_bool_array **> solf.ewah_keys)[ifile]
4015  *             if arr1[0] != arr2[0]:             # <<<<<<<<<<<<<<
4016  *                 return 0
4017  *             # Refn
4018  */
4019     }
4020 
4021     /* "yt/utilities/lib/ewah_bool_wrap.pyx":77
4022  *                 return 0
4023  *             # Refn
4024  *             arr1 = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
4025  *             arr2 = (<ewah_bool_array **> solf.ewah_refn)[ifile]
4026  *             if arr1[0] != arr2[0]:
4027  */
4028     __pyx_v_arr1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
4029 
4030     /* "yt/utilities/lib/ewah_bool_wrap.pyx":78
4031  *             # Refn
4032  *             arr1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
4033  *             arr2 = (<ewah_bool_array **> solf.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
4034  *             if arr1[0] != arr2[0]:
4035  *                 return 0
4036  */
4037     __pyx_v_arr2 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_solf->ewah_refn)[__pyx_v_ifile]);
4038 
4039     /* "yt/utilities/lib/ewah_bool_wrap.pyx":79
4040  *             arr1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
4041  *             arr2 = (<ewah_bool_array **> solf.ewah_refn)[ifile]
4042  *             if arr1[0] != arr2[0]:             # <<<<<<<<<<<<<<
4043  *                 return 0
4044  *             # Map
4045  */
4046     __pyx_t_1 = (((__pyx_v_arr1[0]) != (__pyx_v_arr2[0])) != 0);
4047     if (__pyx_t_1) {
4048 
4049       /* "yt/utilities/lib/ewah_bool_wrap.pyx":80
4050  *             arr2 = (<ewah_bool_array **> solf.ewah_refn)[ifile]
4051  *             if arr1[0] != arr2[0]:
4052  *                 return 0             # <<<<<<<<<<<<<<
4053  *             # Map
4054  *             map1 = (<ewahmap **> self.ewah_coll)[ifile]
4055  */
4056       __pyx_r = 0;
4057       goto __pyx_L0;
4058 
4059       /* "yt/utilities/lib/ewah_bool_wrap.pyx":79
4060  *             arr1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
4061  *             arr2 = (<ewah_bool_array **> solf.ewah_refn)[ifile]
4062  *             if arr1[0] != arr2[0]:             # <<<<<<<<<<<<<<
4063  *                 return 0
4064  *             # Map
4065  */
4066     }
4067 
4068     /* "yt/utilities/lib/ewah_bool_wrap.pyx":82
4069  *                 return 0
4070  *             # Map
4071  *             map1 = (<ewahmap **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
4072  *             map2 = (<ewahmap **> solf.ewah_coll)[ifile]
4073  *             for pair1 in map1[0]:
4074  */
4075     __pyx_v_map1 = (((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
4076 
4077     /* "yt/utilities/lib/ewah_bool_wrap.pyx":83
4078  *             # Map
4079  *             map1 = (<ewahmap **> self.ewah_coll)[ifile]
4080  *             map2 = (<ewahmap **> solf.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
4081  *             for pair1 in map1[0]:
4082  *                 it_map2 = map2[0].find(pair1.first)
4083  */
4084     __pyx_v_map2 = (((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap **)__pyx_v_solf->ewah_coll)[__pyx_v_ifile]);
4085 
4086     /* "yt/utilities/lib/ewah_bool_wrap.pyx":84
4087  *             map1 = (<ewahmap **> self.ewah_coll)[ifile]
4088  *             map2 = (<ewahmap **> solf.ewah_coll)[ifile]
4089  *             for pair1 in map1[0]:             # <<<<<<<<<<<<<<
4090  *                 it_map2 = map2[0].find(pair1.first)
4091  *                 if it_map2 == map2[0].end():
4092  */
4093     __pyx_t_6 = &(__pyx_v_map1[0]);
4094     __pyx_t_5 = __pyx_t_6->begin();
4095     for (;;) {
4096       if (!(__pyx_t_5 != __pyx_t_6->end())) break;
4097       __pyx_t_7 = *__pyx_t_5;
4098       ++__pyx_t_5;
4099       __pyx_v_pair1 = __pyx_t_7;
4100 
4101       /* "yt/utilities/lib/ewah_bool_wrap.pyx":85
4102  *             map2 = (<ewahmap **> solf.ewah_coll)[ifile]
4103  *             for pair1 in map1[0]:
4104  *                 it_map2 = map2[0].find(pair1.first)             # <<<<<<<<<<<<<<
4105  *                 if it_map2 == map2[0].end():
4106  *                     return 0
4107  */
4108       __pyx_v_it_map2 = (__pyx_v_map2[0]).find(__pyx_v_pair1.first);
4109 
4110       /* "yt/utilities/lib/ewah_bool_wrap.pyx":86
4111  *             for pair1 in map1[0]:
4112  *                 it_map2 = map2[0].find(pair1.first)
4113  *                 if it_map2 == map2[0].end():             # <<<<<<<<<<<<<<
4114  *                     return 0
4115  *                 if pair1.second != dereference(it_map2).second:
4116  */
4117       __pyx_t_1 = ((__pyx_v_it_map2 == (__pyx_v_map2[0]).end()) != 0);
4118       if (__pyx_t_1) {
4119 
4120         /* "yt/utilities/lib/ewah_bool_wrap.pyx":87
4121  *                 it_map2 = map2[0].find(pair1.first)
4122  *                 if it_map2 == map2[0].end():
4123  *                     return 0             # <<<<<<<<<<<<<<
4124  *                 if pair1.second != dereference(it_map2).second:
4125  *                     return 0
4126  */
4127         __pyx_r = 0;
4128         goto __pyx_L0;
4129 
4130         /* "yt/utilities/lib/ewah_bool_wrap.pyx":86
4131  *             for pair1 in map1[0]:
4132  *                 it_map2 = map2[0].find(pair1.first)
4133  *                 if it_map2 == map2[0].end():             # <<<<<<<<<<<<<<
4134  *                     return 0
4135  *                 if pair1.second != dereference(it_map2).second:
4136  */
4137       }
4138 
4139       /* "yt/utilities/lib/ewah_bool_wrap.pyx":88
4140  *                 if it_map2 == map2[0].end():
4141  *                     return 0
4142  *                 if pair1.second != dereference(it_map2).second:             # <<<<<<<<<<<<<<
4143  *                     return 0
4144  *             for pair2 in map2[0]:
4145  */
4146       __pyx_t_1 = ((__pyx_v_pair1.second != (*__pyx_v_it_map2).second) != 0);
4147       if (__pyx_t_1) {
4148 
4149         /* "yt/utilities/lib/ewah_bool_wrap.pyx":89
4150  *                     return 0
4151  *                 if pair1.second != dereference(it_map2).second:
4152  *                     return 0             # <<<<<<<<<<<<<<
4153  *             for pair2 in map2[0]:
4154  *                 it_map1 = map1[0].find(pair2.first)
4155  */
4156         __pyx_r = 0;
4157         goto __pyx_L0;
4158 
4159         /* "yt/utilities/lib/ewah_bool_wrap.pyx":88
4160  *                 if it_map2 == map2[0].end():
4161  *                     return 0
4162  *                 if pair1.second != dereference(it_map2).second:             # <<<<<<<<<<<<<<
4163  *                     return 0
4164  *             for pair2 in map2[0]:
4165  */
4166       }
4167 
4168       /* "yt/utilities/lib/ewah_bool_wrap.pyx":84
4169  *             map1 = (<ewahmap **> self.ewah_coll)[ifile]
4170  *             map2 = (<ewahmap **> solf.ewah_coll)[ifile]
4171  *             for pair1 in map1[0]:             # <<<<<<<<<<<<<<
4172  *                 it_map2 = map2[0].find(pair1.first)
4173  *                 if it_map2 == map2[0].end():
4174  */
4175     }
4176 
4177     /* "yt/utilities/lib/ewah_bool_wrap.pyx":90
4178  *                 if pair1.second != dereference(it_map2).second:
4179  *                     return 0
4180  *             for pair2 in map2[0]:             # <<<<<<<<<<<<<<
4181  *                 it_map1 = map1[0].find(pair2.first)
4182  *                 if it_map1 == map1[0].end():
4183  */
4184     __pyx_t_6 = &(__pyx_v_map2[0]);
4185     __pyx_t_5 = __pyx_t_6->begin();
4186     for (;;) {
4187       if (!(__pyx_t_5 != __pyx_t_6->end())) break;
4188       __pyx_t_7 = *__pyx_t_5;
4189       ++__pyx_t_5;
4190       __pyx_v_pair2 = __pyx_t_7;
4191 
4192       /* "yt/utilities/lib/ewah_bool_wrap.pyx":91
4193  *                     return 0
4194  *             for pair2 in map2[0]:
4195  *                 it_map1 = map1[0].find(pair2.first)             # <<<<<<<<<<<<<<
4196  *                 if it_map1 == map1[0].end():
4197  *                     return 0
4198  */
4199       __pyx_v_it_map1 = (__pyx_v_map1[0]).find(__pyx_v_pair2.first);
4200 
4201       /* "yt/utilities/lib/ewah_bool_wrap.pyx":92
4202  *             for pair2 in map2[0]:
4203  *                 it_map1 = map1[0].find(pair2.first)
4204  *                 if it_map1 == map1[0].end():             # <<<<<<<<<<<<<<
4205  *                     return 0
4206  *                 if pair2.second != dereference(it_map1).second:
4207  */
4208       __pyx_t_1 = ((__pyx_v_it_map1 == (__pyx_v_map1[0]).end()) != 0);
4209       if (__pyx_t_1) {
4210 
4211         /* "yt/utilities/lib/ewah_bool_wrap.pyx":93
4212  *                 it_map1 = map1[0].find(pair2.first)
4213  *                 if it_map1 == map1[0].end():
4214  *                     return 0             # <<<<<<<<<<<<<<
4215  *                 if pair2.second != dereference(it_map1).second:
4216  *                     return 0
4217  */
4218         __pyx_r = 0;
4219         goto __pyx_L0;
4220 
4221         /* "yt/utilities/lib/ewah_bool_wrap.pyx":92
4222  *             for pair2 in map2[0]:
4223  *                 it_map1 = map1[0].find(pair2.first)
4224  *                 if it_map1 == map1[0].end():             # <<<<<<<<<<<<<<
4225  *                     return 0
4226  *                 if pair2.second != dereference(it_map1).second:
4227  */
4228       }
4229 
4230       /* "yt/utilities/lib/ewah_bool_wrap.pyx":94
4231  *                 if it_map1 == map1[0].end():
4232  *                     return 0
4233  *                 if pair2.second != dereference(it_map1).second:             # <<<<<<<<<<<<<<
4234  *                     return 0
4235  *             # Match
4236  */
4237       __pyx_t_1 = ((__pyx_v_pair2.second != (*__pyx_v_it_map1).second) != 0);
4238       if (__pyx_t_1) {
4239 
4240         /* "yt/utilities/lib/ewah_bool_wrap.pyx":95
4241  *                     return 0
4242  *                 if pair2.second != dereference(it_map1).second:
4243  *                     return 0             # <<<<<<<<<<<<<<
4244  *             # Match
4245  *             return 1
4246  */
4247         __pyx_r = 0;
4248         goto __pyx_L0;
4249 
4250         /* "yt/utilities/lib/ewah_bool_wrap.pyx":94
4251  *                 if it_map1 == map1[0].end():
4252  *                     return 0
4253  *                 if pair2.second != dereference(it_map1).second:             # <<<<<<<<<<<<<<
4254  *                     return 0
4255  *             # Match
4256  */
4257       }
4258 
4259       /* "yt/utilities/lib/ewah_bool_wrap.pyx":90
4260  *                 if pair1.second != dereference(it_map2).second:
4261  *                     return 0
4262  *             for pair2 in map2[0]:             # <<<<<<<<<<<<<<
4263  *                 it_map1 = map1[0].find(pair2.first)
4264  *                 if it_map1 == map1[0].end():
4265  */
4266     }
4267 
4268     /* "yt/utilities/lib/ewah_bool_wrap.pyx":97
4269  *                     return 0
4270  *             # Match
4271  *             return 1             # <<<<<<<<<<<<<<
4272  *
4273  *     def iseq(self, solf):
4274  */
4275     __pyx_r = 1;
4276     goto __pyx_L0;
4277   }
4278 
4279   /* "yt/utilities/lib/ewah_bool_wrap.pyx":60
4280  *             self.ewah_coll[ifile].clear()
4281  *
4282  *     cdef bint _iseq(self, FileBitmasks solf):             # <<<<<<<<<<<<<<
4283  *         cdef np.int32_t ifile
4284  *         cdef ewah_bool_array* arr1
4285  */
4286 
4287   /* function exit code */
4288   __pyx_r = 0;
4289   __pyx_L0:;
4290   __Pyx_RefNannyFinishContext();
4291   return __pyx_r;
4292 }
4293 
4294 /* "yt/utilities/lib/ewah_bool_wrap.pyx":99
4295  *             return 1
4296  *
4297  *     def iseq(self, solf):             # <<<<<<<<<<<<<<
4298  *         return self._iseq(solf)
4299  *
4300  */
4301 
4302 /* Python wrapper */
4303 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_3iseq(PyObject *__pyx_v_self, PyObject *__pyx_v_solf); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_3iseq(PyObject * __pyx_v_self,PyObject * __pyx_v_solf)4304 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_3iseq(PyObject *__pyx_v_self, PyObject *__pyx_v_solf) {
4305   PyObject *__pyx_r = 0;
4306   __Pyx_RefNannyDeclarations
4307   __Pyx_RefNannySetupContext("iseq (wrapper)", 0);
4308   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_2iseq(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), ((PyObject *)__pyx_v_solf));
4309 
4310   /* function exit code */
4311   __Pyx_RefNannyFinishContext();
4312   return __pyx_r;
4313 }
4314 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_2iseq(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,PyObject * __pyx_v_solf)4315 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_2iseq(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_solf) {
4316   PyObject *__pyx_r = NULL;
4317   __Pyx_RefNannyDeclarations
4318   PyObject *__pyx_t_1 = NULL;
4319   __Pyx_RefNannySetupContext("iseq", 0);
4320 
4321   /* "yt/utilities/lib/ewah_bool_wrap.pyx":100
4322  *
4323  *     def iseq(self, solf):
4324  *         return self._iseq(solf)             # <<<<<<<<<<<<<<
4325  *
4326  *     cdef BoolArrayCollection _get_bitmask(self, np.uint32_t ifile):
4327  */
4328   __Pyx_XDECREF(__pyx_r);
4329   if (!(likely(((__pyx_v_solf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_solf, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks))))) __PYX_ERR(0, 100, __pyx_L1_error)
4330   __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_iseq(__pyx_v_self, ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_solf))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
4331   __Pyx_GOTREF(__pyx_t_1);
4332   __pyx_r = __pyx_t_1;
4333   __pyx_t_1 = 0;
4334   goto __pyx_L0;
4335 
4336   /* "yt/utilities/lib/ewah_bool_wrap.pyx":99
4337  *             return 1
4338  *
4339  *     def iseq(self, solf):             # <<<<<<<<<<<<<<
4340  *         return self._iseq(solf)
4341  *
4342  */
4343 
4344   /* function exit code */
4345   __pyx_L1_error:;
4346   __Pyx_XDECREF(__pyx_t_1);
4347   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.iseq", __pyx_clineno, __pyx_lineno, __pyx_filename);
4348   __pyx_r = NULL;
4349   __pyx_L0:;
4350   __Pyx_XGIVEREF(__pyx_r);
4351   __Pyx_RefNannyFinishContext();
4352   return __pyx_r;
4353 }
4354 
4355 /* "yt/utilities/lib/ewah_bool_wrap.pyx":102
4356  *         return self._iseq(solf)
4357  *
4358  *     cdef BoolArrayCollection _get_bitmask(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
4359  *         cdef BoolArrayCollection out = BoolArrayCollection()
4360  *         cdef ewah_bool_array **ewah_keys = <ewah_bool_array **>self.ewah_keys
4361  */
4362 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_bitmask(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile)4363 static struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_bitmask(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile) {
4364   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out = 0;
4365   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **__pyx_v_ewah_keys;
4366   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **__pyx_v_ewah_refn;
4367   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **__pyx_v_ewah_coll;
4368   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys_out;
4369   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn_out;
4370   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll_out;
4371   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_r = NULL;
4372   __Pyx_RefNannyDeclarations
4373   PyObject *__pyx_t_1 = NULL;
4374   __Pyx_RefNannySetupContext("_get_bitmask", 0);
4375 
4376   /* "yt/utilities/lib/ewah_bool_wrap.pyx":103
4377  *
4378  *     cdef BoolArrayCollection _get_bitmask(self, np.uint32_t ifile):
4379  *         cdef BoolArrayCollection out = BoolArrayCollection()             # <<<<<<<<<<<<<<
4380  *         cdef ewah_bool_array **ewah_keys = <ewah_bool_array **>self.ewah_keys
4381  *         cdef ewah_bool_array **ewah_refn = <ewah_bool_array **>self.ewah_refn
4382  */
4383   __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
4384   __Pyx_GOTREF(__pyx_t_1);
4385   __pyx_v_out = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_t_1);
4386   __pyx_t_1 = 0;
4387 
4388   /* "yt/utilities/lib/ewah_bool_wrap.pyx":104
4389  *     cdef BoolArrayCollection _get_bitmask(self, np.uint32_t ifile):
4390  *         cdef BoolArrayCollection out = BoolArrayCollection()
4391  *         cdef ewah_bool_array **ewah_keys = <ewah_bool_array **>self.ewah_keys             # <<<<<<<<<<<<<<
4392  *         cdef ewah_bool_array **ewah_refn = <ewah_bool_array **>self.ewah_refn
4393  *         cdef ewah_map **ewah_coll = <ewah_map **>self.ewah_coll
4394  */
4395   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys);
4396 
4397   /* "yt/utilities/lib/ewah_bool_wrap.pyx":105
4398  *         cdef BoolArrayCollection out = BoolArrayCollection()
4399  *         cdef ewah_bool_array **ewah_keys = <ewah_bool_array **>self.ewah_keys
4400  *         cdef ewah_bool_array **ewah_refn = <ewah_bool_array **>self.ewah_refn             # <<<<<<<<<<<<<<
4401  *         cdef ewah_map **ewah_coll = <ewah_map **>self.ewah_coll
4402  *         # This version actually copies arrays, which can be costly
4403  */
4404   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn);
4405 
4406   /* "yt/utilities/lib/ewah_bool_wrap.pyx":106
4407  *         cdef ewah_bool_array **ewah_keys = <ewah_bool_array **>self.ewah_keys
4408  *         cdef ewah_bool_array **ewah_refn = <ewah_bool_array **>self.ewah_refn
4409  *         cdef ewah_map **ewah_coll = <ewah_map **>self.ewah_coll             # <<<<<<<<<<<<<<
4410  *         # This version actually copies arrays, which can be costly
4411  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *>out.ewah_keys
4412  */
4413   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll);
4414 
4415   /* "yt/utilities/lib/ewah_bool_wrap.pyx":108
4416  *         cdef ewah_map **ewah_coll = <ewah_map **>self.ewah_coll
4417  *         # This version actually copies arrays, which can be costly
4418  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *>out.ewah_keys             # <<<<<<<<<<<<<<
4419  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *>out.ewah_refn
4420  *         cdef ewah_map *ewah_coll_out = <ewah_map *>out.ewah_coll
4421  */
4422   __pyx_v_ewah_keys_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_keys);
4423 
4424   /* "yt/utilities/lib/ewah_bool_wrap.pyx":109
4425  *         # This version actually copies arrays, which can be costly
4426  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *>out.ewah_keys
4427  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *>out.ewah_refn             # <<<<<<<<<<<<<<
4428  *         cdef ewah_map *ewah_coll_out = <ewah_map *>out.ewah_coll
4429  *         ewah_keys_out[0] = ewah_keys[ifile][0]
4430  */
4431   __pyx_v_ewah_refn_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_refn);
4432 
4433   /* "yt/utilities/lib/ewah_bool_wrap.pyx":110
4434  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *>out.ewah_keys
4435  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *>out.ewah_refn
4436  *         cdef ewah_map *ewah_coll_out = <ewah_map *>out.ewah_coll             # <<<<<<<<<<<<<<
4437  *         ewah_keys_out[0] = ewah_keys[ifile][0]
4438  *         ewah_refn_out[0] = ewah_refn[ifile][0]
4439  */
4440   __pyx_v_ewah_coll_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_out->ewah_coll);
4441 
4442   /* "yt/utilities/lib/ewah_bool_wrap.pyx":111
4443  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *>out.ewah_refn
4444  *         cdef ewah_map *ewah_coll_out = <ewah_map *>out.ewah_coll
4445  *         ewah_keys_out[0] = ewah_keys[ifile][0]             # <<<<<<<<<<<<<<
4446  *         ewah_refn_out[0] = ewah_refn[ifile][0]
4447  *         ewah_coll_out[0] = ewah_coll[ifile][0]
4448  */
4449   (__pyx_v_ewah_keys_out[0]) = ((__pyx_v_ewah_keys[__pyx_v_ifile])[0]);
4450 
4451   /* "yt/utilities/lib/ewah_bool_wrap.pyx":112
4452  *         cdef ewah_map *ewah_coll_out = <ewah_map *>out.ewah_coll
4453  *         ewah_keys_out[0] = ewah_keys[ifile][0]
4454  *         ewah_refn_out[0] = ewah_refn[ifile][0]             # <<<<<<<<<<<<<<
4455  *         ewah_coll_out[0] = ewah_coll[ifile][0]
4456  *         # This version only copies pointers which can lead to deallocation of
4457  */
4458   (__pyx_v_ewah_refn_out[0]) = ((__pyx_v_ewah_refn[__pyx_v_ifile])[0]);
4459 
4460   /* "yt/utilities/lib/ewah_bool_wrap.pyx":113
4461  *         ewah_keys_out[0] = ewah_keys[ifile][0]
4462  *         ewah_refn_out[0] = ewah_refn[ifile][0]
4463  *         ewah_coll_out[0] = ewah_coll[ifile][0]             # <<<<<<<<<<<<<<
4464  *         # This version only copies pointers which can lead to deallocation of
4465  *         # the source when the copy is deleted.
4466  */
4467   (__pyx_v_ewah_coll_out[0]) = ((__pyx_v_ewah_coll[__pyx_v_ifile])[0]);
4468 
4469   /* "yt/utilities/lib/ewah_bool_wrap.pyx":119
4470  *         # out.ewah_refn = <void *>ewah_refn[ifile]
4471  *         # out.ewah_coll = <void *>ewah_coll[ifile]
4472  *         return out             # <<<<<<<<<<<<<<
4473  *
4474  *     cdef tuple _find_collisions(self, BoolArrayCollection coll, bint verbose = 0):
4475  */
4476   __Pyx_XDECREF(((PyObject *)__pyx_r));
4477   __Pyx_INCREF(((PyObject *)__pyx_v_out));
4478   __pyx_r = __pyx_v_out;
4479   goto __pyx_L0;
4480 
4481   /* "yt/utilities/lib/ewah_bool_wrap.pyx":102
4482  *         return self._iseq(solf)
4483  *
4484  *     cdef BoolArrayCollection _get_bitmask(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
4485  *         cdef BoolArrayCollection out = BoolArrayCollection()
4486  *         cdef ewah_bool_array **ewah_keys = <ewah_bool_array **>self.ewah_keys
4487  */
4488 
4489   /* function exit code */
4490   __pyx_L1_error:;
4491   __Pyx_XDECREF(__pyx_t_1);
4492   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._get_bitmask", __pyx_clineno, __pyx_lineno, __pyx_filename);
4493   __pyx_r = 0;
4494   __pyx_L0:;
4495   __Pyx_XDECREF((PyObject *)__pyx_v_out);
4496   __Pyx_XGIVEREF((PyObject *)__pyx_r);
4497   __Pyx_RefNannyFinishContext();
4498   return __pyx_r;
4499 }
4500 
4501 /* "yt/utilities/lib/ewah_bool_wrap.pyx":121
4502  *         return out
4503  *
4504  *     cdef tuple _find_collisions(self, BoolArrayCollection coll, bint verbose = 0):             # <<<<<<<<<<<<<<
4505  *         cdef tuple cc, cr
4506  *         cc = self._find_collisions_coarse(coll, verbose)
4507  */
4508 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_coll,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions * __pyx_optional_args)4509 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_coll, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions *__pyx_optional_args) {
4510   int __pyx_v_verbose = ((int)0);
4511   PyObject *__pyx_v_cc = 0;
4512   PyObject *__pyx_v_cr = 0;
4513   PyObject *__pyx_r = NULL;
4514   __Pyx_RefNannyDeclarations
4515   PyObject *__pyx_t_1 = NULL;
4516   struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse __pyx_t_2;
4517   struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined __pyx_t_3;
4518   __Pyx_RefNannySetupContext("_find_collisions", 0);
4519   if (__pyx_optional_args) {
4520     if (__pyx_optional_args->__pyx_n > 0) {
4521       __pyx_v_verbose = __pyx_optional_args->verbose;
4522     }
4523   }
4524 
4525   /* "yt/utilities/lib/ewah_bool_wrap.pyx":123
4526  *     cdef tuple _find_collisions(self, BoolArrayCollection coll, bint verbose = 0):
4527  *         cdef tuple cc, cr
4528  *         cc = self._find_collisions_coarse(coll, verbose)             # <<<<<<<<<<<<<<
4529  *         cr = self._find_collisions_refined(coll, verbose)
4530  *         return cc, cr
4531  */
4532   __pyx_t_2.__pyx_n = 1;
4533   __pyx_t_2.verbose = __pyx_v_verbose;
4534   __pyx_t_1 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_find_collisions_coarse(__pyx_v_self, __pyx_v_coll, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
4535   __Pyx_GOTREF(__pyx_t_1);
4536   __pyx_v_cc = ((PyObject*)__pyx_t_1);
4537   __pyx_t_1 = 0;
4538 
4539   /* "yt/utilities/lib/ewah_bool_wrap.pyx":124
4540  *         cdef tuple cc, cr
4541  *         cc = self._find_collisions_coarse(coll, verbose)
4542  *         cr = self._find_collisions_refined(coll, verbose)             # <<<<<<<<<<<<<<
4543  *         return cc, cr
4544  *
4545  */
4546   __pyx_t_3.__pyx_n = 1;
4547   __pyx_t_3.verbose = __pyx_v_verbose;
4548   __pyx_t_1 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_find_collisions_refined(__pyx_v_self, __pyx_v_coll, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
4549   __Pyx_GOTREF(__pyx_t_1);
4550   __pyx_v_cr = ((PyObject*)__pyx_t_1);
4551   __pyx_t_1 = 0;
4552 
4553   /* "yt/utilities/lib/ewah_bool_wrap.pyx":125
4554  *         cc = self._find_collisions_coarse(coll, verbose)
4555  *         cr = self._find_collisions_refined(coll, verbose)
4556  *         return cc, cr             # <<<<<<<<<<<<<<
4557  *
4558  *     cdef tuple _find_collisions_coarse(self, BoolArrayCollection coll, bint
4559  */
4560   __Pyx_XDECREF(__pyx_r);
4561   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
4562   __Pyx_GOTREF(__pyx_t_1);
4563   __Pyx_INCREF(__pyx_v_cc);
4564   __Pyx_GIVEREF(__pyx_v_cc);
4565   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cc);
4566   __Pyx_INCREF(__pyx_v_cr);
4567   __Pyx_GIVEREF(__pyx_v_cr);
4568   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_cr);
4569   __pyx_r = ((PyObject*)__pyx_t_1);
4570   __pyx_t_1 = 0;
4571   goto __pyx_L0;
4572 
4573   /* "yt/utilities/lib/ewah_bool_wrap.pyx":121
4574  *         return out
4575  *
4576  *     cdef tuple _find_collisions(self, BoolArrayCollection coll, bint verbose = 0):             # <<<<<<<<<<<<<<
4577  *         cdef tuple cc, cr
4578  *         cc = self._find_collisions_coarse(coll, verbose)
4579  */
4580 
4581   /* function exit code */
4582   __pyx_L1_error:;
4583   __Pyx_XDECREF(__pyx_t_1);
4584   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._find_collisions", __pyx_clineno, __pyx_lineno, __pyx_filename);
4585   __pyx_r = 0;
4586   __pyx_L0:;
4587   __Pyx_XDECREF(__pyx_v_cc);
4588   __Pyx_XDECREF(__pyx_v_cr);
4589   __Pyx_XGIVEREF(__pyx_r);
4590   __Pyx_RefNannyFinishContext();
4591   return __pyx_r;
4592 }
4593 
4594 /* "yt/utilities/lib/ewah_bool_wrap.pyx":127
4595  *         return cc, cr
4596  *
4597  *     cdef tuple _find_collisions_coarse(self, BoolArrayCollection coll, bint             # <<<<<<<<<<<<<<
4598  *                         verbose = 0, file_list = None):
4599  *         cdef np.int32_t ifile
4600  */
4601 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_coll,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse * __pyx_optional_args)4602 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_coll, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse *__pyx_optional_args) {
4603   int __pyx_v_verbose = ((int)0);
4604 
4605   /* "yt/utilities/lib/ewah_bool_wrap.pyx":128
4606  *
4607  *     cdef tuple _find_collisions_coarse(self, BoolArrayCollection coll, bint
4608  *                         verbose = 0, file_list = None):             # <<<<<<<<<<<<<<
4609  *         cdef np.int32_t ifile
4610  *         cdef ewah_bool_array arr_two, arr_swap, arr_keys, arr_refn
4611  */
4612   PyObject *__pyx_v_file_list = ((PyObject *)Py_None);
4613   __pyx_t_5numpy_int32_t __pyx_v_ifile;
4614   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_arr_two;
4615   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_arr_swap;
4616   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_arr_keys;
4617   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_arr_refn;
4618   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_iarr;
4619   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_coll_keys;
4620   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_coll_refn;
4621   int __pyx_v_nc;
4622   int __pyx_v_nm;
4623   PyObject *__pyx_v_nout = 0;
4624   PyObject *__pyx_r = NULL;
4625   __Pyx_RefNannyDeclarations
4626   int __pyx_t_1;
4627   int __pyx_t_2;
4628   PyObject *__pyx_t_3 = NULL;
4629   PyObject *__pyx_t_4 = NULL;
4630   Py_ssize_t __pyx_t_5;
4631   PyObject *(*__pyx_t_6)(PyObject *);
4632   __pyx_t_5numpy_int32_t __pyx_t_7;
4633   PyObject *__pyx_t_8 = NULL;
4634   PyObject *__pyx_t_9 = NULL;
4635   double __pyx_t_10;
4636   PyObject *__pyx_t_11 = NULL;
4637   PyObject *__pyx_t_12 = NULL;
4638   int __pyx_t_13;
4639   PyObject *__pyx_t_14 = NULL;
4640   __Pyx_RefNannySetupContext("_find_collisions_coarse", 0);
4641   if (__pyx_optional_args) {
4642     if (__pyx_optional_args->__pyx_n > 0) {
4643       __pyx_v_verbose = __pyx_optional_args->verbose;
4644       if (__pyx_optional_args->__pyx_n > 1) {
4645         __pyx_v_file_list = __pyx_optional_args->file_list;
4646       }
4647     }
4648   }
4649   __Pyx_INCREF(__pyx_v_file_list);
4650 
4651   /* "yt/utilities/lib/ewah_bool_wrap.pyx":134
4652  *         cdef ewah_bool_array* coll_keys
4653  *         cdef ewah_bool_array* coll_refn
4654  *         coll_keys = (<ewah_bool_array*> coll.ewah_keys)             # <<<<<<<<<<<<<<
4655  *         coll_refn = (<ewah_bool_array*> coll.ewah_refn)
4656  *         if file_list is None:
4657  */
4658   __pyx_v_coll_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_coll->ewah_keys);
4659 
4660   /* "yt/utilities/lib/ewah_bool_wrap.pyx":135
4661  *         cdef ewah_bool_array* coll_refn
4662  *         coll_keys = (<ewah_bool_array*> coll.ewah_keys)
4663  *         coll_refn = (<ewah_bool_array*> coll.ewah_refn)             # <<<<<<<<<<<<<<
4664  *         if file_list is None:
4665  *             file_list = range(self.nfiles)
4666  */
4667   __pyx_v_coll_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_coll->ewah_refn);
4668 
4669   /* "yt/utilities/lib/ewah_bool_wrap.pyx":136
4670  *         coll_keys = (<ewah_bool_array*> coll.ewah_keys)
4671  *         coll_refn = (<ewah_bool_array*> coll.ewah_refn)
4672  *         if file_list is None:             # <<<<<<<<<<<<<<
4673  *             file_list = range(self.nfiles)
4674  *         for ifile in file_list:
4675  */
4676   __pyx_t_1 = (__pyx_v_file_list == Py_None);
4677   __pyx_t_2 = (__pyx_t_1 != 0);
4678   if (__pyx_t_2) {
4679 
4680     /* "yt/utilities/lib/ewah_bool_wrap.pyx":137
4681  *         coll_refn = (<ewah_bool_array*> coll.ewah_refn)
4682  *         if file_list is None:
4683  *             file_list = range(self.nfiles)             # <<<<<<<<<<<<<<
4684  *         for ifile in file_list:
4685  *             iarr = (<ewah_bool_array **>self.ewah_keys)[ifile]
4686  */
4687     __pyx_t_3 = __Pyx_PyInt_From_npy_uint32(__pyx_v_self->nfiles); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
4688     __Pyx_GOTREF(__pyx_t_3);
4689     __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
4690     __Pyx_GOTREF(__pyx_t_4);
4691     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4692     __Pyx_DECREF_SET(__pyx_v_file_list, __pyx_t_4);
4693     __pyx_t_4 = 0;
4694 
4695     /* "yt/utilities/lib/ewah_bool_wrap.pyx":136
4696  *         coll_keys = (<ewah_bool_array*> coll.ewah_keys)
4697  *         coll_refn = (<ewah_bool_array*> coll.ewah_refn)
4698  *         if file_list is None:             # <<<<<<<<<<<<<<
4699  *             file_list = range(self.nfiles)
4700  *         for ifile in file_list:
4701  */
4702   }
4703 
4704   /* "yt/utilities/lib/ewah_bool_wrap.pyx":138
4705  *         if file_list is None:
4706  *             file_list = range(self.nfiles)
4707  *         for ifile in file_list:             # <<<<<<<<<<<<<<
4708  *             iarr = (<ewah_bool_array **>self.ewah_keys)[ifile]
4709  *             arr_keys.logicaland(iarr[0], arr_two)
4710  */
4711   if (likely(PyList_CheckExact(__pyx_v_file_list)) || PyTuple_CheckExact(__pyx_v_file_list)) {
4712     __pyx_t_4 = __pyx_v_file_list; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
4713     __pyx_t_6 = NULL;
4714   } else {
4715     __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_file_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
4716     __Pyx_GOTREF(__pyx_t_4);
4717     __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
4718   }
4719   for (;;) {
4720     if (likely(!__pyx_t_6)) {
4721       if (likely(PyList_CheckExact(__pyx_t_4))) {
4722         if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
4723         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4724         __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 138, __pyx_L1_error)
4725         #else
4726         __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
4727         __Pyx_GOTREF(__pyx_t_3);
4728         #endif
4729       } else {
4730         if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
4731         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4732         __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 138, __pyx_L1_error)
4733         #else
4734         __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
4735         __Pyx_GOTREF(__pyx_t_3);
4736         #endif
4737       }
4738     } else {
4739       __pyx_t_3 = __pyx_t_6(__pyx_t_4);
4740       if (unlikely(!__pyx_t_3)) {
4741         PyObject* exc_type = PyErr_Occurred();
4742         if (exc_type) {
4743           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4744           else __PYX_ERR(0, 138, __pyx_L1_error)
4745         }
4746         break;
4747       }
4748       __Pyx_GOTREF(__pyx_t_3);
4749     }
4750     __pyx_t_7 = __Pyx_PyInt_As_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_7 == ((npy_int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
4751     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4752     __pyx_v_ifile = __pyx_t_7;
4753 
4754     /* "yt/utilities/lib/ewah_bool_wrap.pyx":139
4755  *             file_list = range(self.nfiles)
4756  *         for ifile in file_list:
4757  *             iarr = (<ewah_bool_array **>self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
4758  *             arr_keys.logicaland(iarr[0], arr_two)
4759  *             arr_keys.logicalor(iarr[0], arr_swap)
4760  */
4761     __pyx_v_iarr = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
4762 
4763     /* "yt/utilities/lib/ewah_bool_wrap.pyx":140
4764  *         for ifile in file_list:
4765  *             iarr = (<ewah_bool_array **>self.ewah_keys)[ifile]
4766  *             arr_keys.logicaland(iarr[0], arr_two)             # <<<<<<<<<<<<<<
4767  *             arr_keys.logicalor(iarr[0], arr_swap)
4768  *             arr_keys.swap(arr_swap)
4769  */
4770     __pyx_v_arr_keys.logicaland((__pyx_v_iarr[0]), __pyx_v_arr_two);
4771 
4772     /* "yt/utilities/lib/ewah_bool_wrap.pyx":141
4773  *             iarr = (<ewah_bool_array **>self.ewah_keys)[ifile]
4774  *             arr_keys.logicaland(iarr[0], arr_two)
4775  *             arr_keys.logicalor(iarr[0], arr_swap)             # <<<<<<<<<<<<<<
4776  *             arr_keys.swap(arr_swap)
4777  *             arr_refn.logicalor(arr_two, arr_swap)
4778  */
4779     __pyx_v_arr_keys.logicalor((__pyx_v_iarr[0]), __pyx_v_arr_swap);
4780 
4781     /* "yt/utilities/lib/ewah_bool_wrap.pyx":142
4782  *             arr_keys.logicaland(iarr[0], arr_two)
4783  *             arr_keys.logicalor(iarr[0], arr_swap)
4784  *             arr_keys.swap(arr_swap)             # <<<<<<<<<<<<<<
4785  *             arr_refn.logicalor(arr_two, arr_swap)
4786  *             arr_refn.swap(arr_swap)
4787  */
4788     __pyx_v_arr_keys.swap(__pyx_v_arr_swap);
4789 
4790     /* "yt/utilities/lib/ewah_bool_wrap.pyx":143
4791  *             arr_keys.logicalor(iarr[0], arr_swap)
4792  *             arr_keys.swap(arr_swap)
4793  *             arr_refn.logicalor(arr_two, arr_swap)             # <<<<<<<<<<<<<<
4794  *             arr_refn.swap(arr_swap)
4795  *         coll_keys[0].swap(arr_keys)
4796  */
4797     __pyx_v_arr_refn.logicalor(__pyx_v_arr_two, __pyx_v_arr_swap);
4798 
4799     /* "yt/utilities/lib/ewah_bool_wrap.pyx":144
4800  *             arr_keys.swap(arr_swap)
4801  *             arr_refn.logicalor(arr_two, arr_swap)
4802  *             arr_refn.swap(arr_swap)             # <<<<<<<<<<<<<<
4803  *         coll_keys[0].swap(arr_keys)
4804  *         coll_refn[0].swap(arr_refn)
4805  */
4806     __pyx_v_arr_refn.swap(__pyx_v_arr_swap);
4807 
4808     /* "yt/utilities/lib/ewah_bool_wrap.pyx":138
4809  *         if file_list is None:
4810  *             file_list = range(self.nfiles)
4811  *         for ifile in file_list:             # <<<<<<<<<<<<<<
4812  *             iarr = (<ewah_bool_array **>self.ewah_keys)[ifile]
4813  *             arr_keys.logicaland(iarr[0], arr_two)
4814  */
4815   }
4816   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4817 
4818   /* "yt/utilities/lib/ewah_bool_wrap.pyx":145
4819  *             arr_refn.logicalor(arr_two, arr_swap)
4820  *             arr_refn.swap(arr_swap)
4821  *         coll_keys[0].swap(arr_keys)             # <<<<<<<<<<<<<<
4822  *         coll_refn[0].swap(arr_refn)
4823  *         # Print
4824  */
4825   (__pyx_v_coll_keys[0]).swap(__pyx_v_arr_keys);
4826 
4827   /* "yt/utilities/lib/ewah_bool_wrap.pyx":146
4828  *             arr_refn.swap(arr_swap)
4829  *         coll_keys[0].swap(arr_keys)
4830  *         coll_refn[0].swap(arr_refn)             # <<<<<<<<<<<<<<
4831  *         # Print
4832  *         cdef int nc, nm
4833  */
4834   (__pyx_v_coll_refn[0]).swap(__pyx_v_arr_refn);
4835 
4836   /* "yt/utilities/lib/ewah_bool_wrap.pyx":149
4837  *         # Print
4838  *         cdef int nc, nm
4839  *         nc = coll_refn[0].numberOfOnes()             # <<<<<<<<<<<<<<
4840  *         nm = coll_keys[0].numberOfOnes()
4841  *         cdef tuple nout = (nc, nm)
4842  */
4843   __pyx_v_nc = (__pyx_v_coll_refn[0]).numberOfOnes();
4844 
4845   /* "yt/utilities/lib/ewah_bool_wrap.pyx":150
4846  *         cdef int nc, nm
4847  *         nc = coll_refn[0].numberOfOnes()
4848  *         nm = coll_keys[0].numberOfOnes()             # <<<<<<<<<<<<<<
4849  *         cdef tuple nout = (nc, nm)
4850  *         if verbose == 1:
4851  */
4852   __pyx_v_nm = (__pyx_v_coll_keys[0]).numberOfOnes();
4853 
4854   /* "yt/utilities/lib/ewah_bool_wrap.pyx":151
4855  *         nc = coll_refn[0].numberOfOnes()
4856  *         nm = coll_keys[0].numberOfOnes()
4857  *         cdef tuple nout = (nc, nm)             # <<<<<<<<<<<<<<
4858  *         if verbose == 1:
4859  *             print("{: 10d}/{: 10d} collisions at coarse refinement.  ({: 10.5f}%)".format(nc,nm,100.0*float(nc)/nm))
4860  */
4861   __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
4862   __Pyx_GOTREF(__pyx_t_4);
4863   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
4864   __Pyx_GOTREF(__pyx_t_3);
4865   __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L1_error)
4866   __Pyx_GOTREF(__pyx_t_8);
4867   __Pyx_GIVEREF(__pyx_t_4);
4868   PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
4869   __Pyx_GIVEREF(__pyx_t_3);
4870   PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
4871   __pyx_t_4 = 0;
4872   __pyx_t_3 = 0;
4873   __pyx_v_nout = ((PyObject*)__pyx_t_8);
4874   __pyx_t_8 = 0;
4875 
4876   /* "yt/utilities/lib/ewah_bool_wrap.pyx":152
4877  *         nm = coll_keys[0].numberOfOnes()
4878  *         cdef tuple nout = (nc, nm)
4879  *         if verbose == 1:             # <<<<<<<<<<<<<<
4880  *             print("{: 10d}/{: 10d} collisions at coarse refinement.  ({: 10.5f}%)".format(nc,nm,100.0*float(nc)/nm))
4881  *         return nout
4882  */
4883   __pyx_t_2 = ((__pyx_v_verbose == 1) != 0);
4884   if (__pyx_t_2) {
4885 
4886     /* "yt/utilities/lib/ewah_bool_wrap.pyx":153
4887  *         cdef tuple nout = (nc, nm)
4888  *         if verbose == 1:
4889  *             print("{: 10d}/{: 10d} collisions at coarse refinement.  ({: 10.5f}%)".format(nc,nm,100.0*float(nc)/nm))             # <<<<<<<<<<<<<<
4890  *         return nout
4891  *
4892  */
4893     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_10d_10d_collisions_at_coarse_re, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
4894     __Pyx_GOTREF(__pyx_t_3);
4895     __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
4896     __Pyx_GOTREF(__pyx_t_4);
4897     __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_nm); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 153, __pyx_L1_error)
4898     __Pyx_GOTREF(__pyx_t_9);
4899     __pyx_t_10 = (100.0 * ((double)__pyx_v_nc));
4900     if (unlikely(__pyx_v_nm == 0)) {
4901       PyErr_SetString(PyExc_ZeroDivisionError, "float division");
4902       __PYX_ERR(0, 153, __pyx_L1_error)
4903     }
4904     __pyx_t_11 = PyFloat_FromDouble((__pyx_t_10 / __pyx_v_nm)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 153, __pyx_L1_error)
4905     __Pyx_GOTREF(__pyx_t_11);
4906     __pyx_t_12 = NULL;
4907     __pyx_t_13 = 0;
4908     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4909       __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
4910       if (likely(__pyx_t_12)) {
4911         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4912         __Pyx_INCREF(__pyx_t_12);
4913         __Pyx_INCREF(function);
4914         __Pyx_DECREF_SET(__pyx_t_3, function);
4915         __pyx_t_13 = 1;
4916       }
4917     }
4918     #if CYTHON_FAST_PYCALL
4919     if (PyFunction_Check(__pyx_t_3)) {
4920       PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_4, __pyx_t_9, __pyx_t_11};
4921       __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 153, __pyx_L1_error)
4922       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
4923       __Pyx_GOTREF(__pyx_t_8);
4924       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4925       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4926       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4927     } else
4928     #endif
4929     #if CYTHON_FAST_PYCCALL
4930     if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
4931       PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_t_4, __pyx_t_9, __pyx_t_11};
4932       __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 153, __pyx_L1_error)
4933       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
4934       __Pyx_GOTREF(__pyx_t_8);
4935       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4936       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4937       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
4938     } else
4939     #endif
4940     {
4941       __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 153, __pyx_L1_error)
4942       __Pyx_GOTREF(__pyx_t_14);
4943       if (__pyx_t_12) {
4944         __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
4945       }
4946       __Pyx_GIVEREF(__pyx_t_4);
4947       PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_4);
4948       __Pyx_GIVEREF(__pyx_t_9);
4949       PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_9);
4950       __Pyx_GIVEREF(__pyx_t_11);
4951       PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_11);
4952       __pyx_t_4 = 0;
4953       __pyx_t_9 = 0;
4954       __pyx_t_11 = 0;
4955       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 153, __pyx_L1_error)
4956       __Pyx_GOTREF(__pyx_t_8);
4957       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
4958     }
4959     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4960     if (__Pyx_PrintOne(0, __pyx_t_8) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
4961     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4962 
4963     /* "yt/utilities/lib/ewah_bool_wrap.pyx":152
4964  *         nm = coll_keys[0].numberOfOnes()
4965  *         cdef tuple nout = (nc, nm)
4966  *         if verbose == 1:             # <<<<<<<<<<<<<<
4967  *             print("{: 10d}/{: 10d} collisions at coarse refinement.  ({: 10.5f}%)".format(nc,nm,100.0*float(nc)/nm))
4968  *         return nout
4969  */
4970   }
4971 
4972   /* "yt/utilities/lib/ewah_bool_wrap.pyx":154
4973  *         if verbose == 1:
4974  *             print("{: 10d}/{: 10d} collisions at coarse refinement.  ({: 10.5f}%)".format(nc,nm,100.0*float(nc)/nm))
4975  *         return nout             # <<<<<<<<<<<<<<
4976  *
4977  *     cdef tuple _find_collisions_refined(self, BoolArrayCollection coll, bint verbose = 0):
4978  */
4979   __Pyx_XDECREF(__pyx_r);
4980   __Pyx_INCREF(__pyx_v_nout);
4981   __pyx_r = __pyx_v_nout;
4982   goto __pyx_L0;
4983 
4984   /* "yt/utilities/lib/ewah_bool_wrap.pyx":127
4985  *         return cc, cr
4986  *
4987  *     cdef tuple _find_collisions_coarse(self, BoolArrayCollection coll, bint             # <<<<<<<<<<<<<<
4988  *                         verbose = 0, file_list = None):
4989  *         cdef np.int32_t ifile
4990  */
4991 
4992   /* function exit code */
4993   __pyx_L1_error:;
4994   __Pyx_XDECREF(__pyx_t_3);
4995   __Pyx_XDECREF(__pyx_t_4);
4996   __Pyx_XDECREF(__pyx_t_8);
4997   __Pyx_XDECREF(__pyx_t_9);
4998   __Pyx_XDECREF(__pyx_t_11);
4999   __Pyx_XDECREF(__pyx_t_12);
5000   __Pyx_XDECREF(__pyx_t_14);
5001   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._find_collisions_coarse", __pyx_clineno, __pyx_lineno, __pyx_filename);
5002   __pyx_r = 0;
5003   __pyx_L0:;
5004   __Pyx_XDECREF(__pyx_v_nout);
5005   __Pyx_XDECREF(__pyx_v_file_list);
5006   __Pyx_XGIVEREF(__pyx_r);
5007   __Pyx_RefNannyFinishContext();
5008   return __pyx_r;
5009 }
5010 
5011 /* "yt/utilities/lib/ewah_bool_wrap.pyx":156
5012  *         return nout
5013  *
5014  *     cdef tuple _find_collisions_refined(self, BoolArrayCollection coll, bint verbose = 0):             # <<<<<<<<<<<<<<
5015  *         cdef np.int32_t ifile
5016  *         cdef ewah_bool_array iarr, arr_two, arr_swap
5017  */
5018 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_coll,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined * __pyx_optional_args)5019 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_coll, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined *__pyx_optional_args) {
5020   int __pyx_v_verbose = ((int)0);
5021   __pyx_t_5numpy_int32_t __pyx_v_ifile;
5022   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_iarr;
5023   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_arr_two;
5024   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_arr_swap;
5025   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_coll_refn;
5026   std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  __pyx_v_map_keys;
5027   std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  __pyx_v_map_refn;
5028   std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  *__pyx_v_coll_coll;
5029   std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  *__pyx_v_map_bitmask;
5030   std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  __pyx_v_it_mi1;
5031   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
5032   int __pyx_v_nc;
5033   int __pyx_v_nm;
5034   PyObject *__pyx_v_nout = 0;
5035   PyObject *__pyx_r = NULL;
5036   __Pyx_RefNannyDeclarations
5037   int __pyx_t_1;
5038   PyObject *__pyx_t_2 = NULL;
5039   PyObject *__pyx_t_3 = NULL;
5040   __pyx_t_5numpy_uint32_t __pyx_t_4;
5041   __pyx_t_5numpy_uint32_t __pyx_t_5;
5042   __pyx_t_5numpy_int32_t __pyx_t_6;
5043   std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array> ::iterator __pyx_t_7;
5044   std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  *__pyx_t_8;
5045   std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  __pyx_t_9;
5046   __pyx_t_5numpy_uint64_t __pyx_t_10;
5047   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_11;
5048   PyObject *__pyx_t_12 = NULL;
5049   PyObject *__pyx_t_13 = NULL;
5050   PyObject *__pyx_t_14 = NULL;
5051   int __pyx_t_15;
5052   PyObject *__pyx_t_16 = NULL;
5053   double __pyx_t_17;
5054   PyObject *__pyx_t_18 = NULL;
5055   __Pyx_RefNannySetupContext("_find_collisions_refined", 0);
5056   if (__pyx_optional_args) {
5057     if (__pyx_optional_args->__pyx_n > 0) {
5058       __pyx_v_verbose = __pyx_optional_args->verbose;
5059     }
5060   }
5061 
5062   /* "yt/utilities/lib/ewah_bool_wrap.pyx":163
5063  *         cdef cmap[np.uint64_t, ewah_bool_array]* coll_coll
5064  *         cdef cmap[np.uint64_t, ewah_bool_array]* map_bitmask
5065  *         coll_refn = <ewah_bool_array*> coll.ewah_refn             # <<<<<<<<<<<<<<
5066  *         if coll_refn[0].numberOfOnes() == 0:
5067  *             if verbose == 1:
5068  */
5069   __pyx_v_coll_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_coll->ewah_refn);
5070 
5071   /* "yt/utilities/lib/ewah_bool_wrap.pyx":164
5072  *         cdef cmap[np.uint64_t, ewah_bool_array]* map_bitmask
5073  *         coll_refn = <ewah_bool_array*> coll.ewah_refn
5074  *         if coll_refn[0].numberOfOnes() == 0:             # <<<<<<<<<<<<<<
5075  *             if verbose == 1:
5076  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))
5077  */
5078   __pyx_t_1 = (((__pyx_v_coll_refn[0]).numberOfOnes() == 0) != 0);
5079   if (__pyx_t_1) {
5080 
5081     /* "yt/utilities/lib/ewah_bool_wrap.pyx":165
5082  *         coll_refn = <ewah_bool_array*> coll.ewah_refn
5083  *         if coll_refn[0].numberOfOnes() == 0:
5084  *             if verbose == 1:             # <<<<<<<<<<<<<<
5085  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))
5086  *             return (0,0)
5087  */
5088     __pyx_t_1 = ((__pyx_v_verbose == 1) != 0);
5089     if (__pyx_t_1) {
5090 
5091       /* "yt/utilities/lib/ewah_bool_wrap.pyx":166
5092  *         if coll_refn[0].numberOfOnes() == 0:
5093  *             if verbose == 1:
5094  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))             # <<<<<<<<<<<<<<
5095  *             return (0,0)
5096  *         coll_coll = <cmap[np.uint64_t, ewah_bool_array]*> coll.ewah_coll
5097  */
5098       __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_10d_10d_collisions_at_refined_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
5099       __Pyx_GOTREF(__pyx_t_2);
5100       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
5101       __Pyx_GOTREF(__pyx_t_3);
5102       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5103       if (__Pyx_PrintOne(0, __pyx_t_3) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
5104       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5105 
5106       /* "yt/utilities/lib/ewah_bool_wrap.pyx":165
5107  *         coll_refn = <ewah_bool_array*> coll.ewah_refn
5108  *         if coll_refn[0].numberOfOnes() == 0:
5109  *             if verbose == 1:             # <<<<<<<<<<<<<<
5110  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))
5111  *             return (0,0)
5112  */
5113     }
5114 
5115     /* "yt/utilities/lib/ewah_bool_wrap.pyx":167
5116  *             if verbose == 1:
5117  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))
5118  *             return (0,0)             # <<<<<<<<<<<<<<
5119  *         coll_coll = <cmap[np.uint64_t, ewah_bool_array]*> coll.ewah_coll
5120  *         for ifile in range(self.nfiles):
5121  */
5122     __Pyx_XDECREF(__pyx_r);
5123     __Pyx_INCREF(__pyx_tuple__2);
5124     __pyx_r = __pyx_tuple__2;
5125     goto __pyx_L0;
5126 
5127     /* "yt/utilities/lib/ewah_bool_wrap.pyx":164
5128  *         cdef cmap[np.uint64_t, ewah_bool_array]* map_bitmask
5129  *         coll_refn = <ewah_bool_array*> coll.ewah_refn
5130  *         if coll_refn[0].numberOfOnes() == 0:             # <<<<<<<<<<<<<<
5131  *             if verbose == 1:
5132  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))
5133  */
5134   }
5135 
5136   /* "yt/utilities/lib/ewah_bool_wrap.pyx":168
5137  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))
5138  *             return (0,0)
5139  *         coll_coll = <cmap[np.uint64_t, ewah_bool_array]*> coll.ewah_coll             # <<<<<<<<<<<<<<
5140  *         for ifile in range(self.nfiles):
5141  *             map_bitmask = (<cmap[np.uint64_t, ewah_bool_array]**> self.ewah_coll)[ifile]
5142  */
5143   __pyx_v_coll_coll = ((std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  *)__pyx_v_coll->ewah_coll);
5144 
5145   /* "yt/utilities/lib/ewah_bool_wrap.pyx":169
5146  *             return (0,0)
5147  *         coll_coll = <cmap[np.uint64_t, ewah_bool_array]*> coll.ewah_coll
5148  *         for ifile in range(self.nfiles):             # <<<<<<<<<<<<<<
5149  *             map_bitmask = (<cmap[np.uint64_t, ewah_bool_array]**> self.ewah_coll)[ifile]
5150  *             for it_mi1 in map_bitmask[0]:
5151  */
5152   __pyx_t_4 = __pyx_v_self->nfiles;
5153   __pyx_t_5 = __pyx_t_4;
5154   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
5155     __pyx_v_ifile = __pyx_t_6;
5156 
5157     /* "yt/utilities/lib/ewah_bool_wrap.pyx":170
5158  *         coll_coll = <cmap[np.uint64_t, ewah_bool_array]*> coll.ewah_coll
5159  *         for ifile in range(self.nfiles):
5160  *             map_bitmask = (<cmap[np.uint64_t, ewah_bool_array]**> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
5161  *             for it_mi1 in map_bitmask[0]:
5162  *                 mi1 = it_mi1.first
5163  */
5164     __pyx_v_map_bitmask = (((std::map<__pyx_t_5numpy_uint64_t,__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array>  **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
5165 
5166     /* "yt/utilities/lib/ewah_bool_wrap.pyx":171
5167  *         for ifile in range(self.nfiles):
5168  *             map_bitmask = (<cmap[np.uint64_t, ewah_bool_array]**> self.ewah_coll)[ifile]
5169  *             for it_mi1 in map_bitmask[0]:             # <<<<<<<<<<<<<<
5170  *                 mi1 = it_mi1.first
5171  *                 iarr = it_mi1.second
5172  */
5173     __pyx_t_8 = &(__pyx_v_map_bitmask[0]);
5174     __pyx_t_7 = __pyx_t_8->begin();
5175     for (;;) {
5176       if (!(__pyx_t_7 != __pyx_t_8->end())) break;
5177       __pyx_t_9 = *__pyx_t_7;
5178       ++__pyx_t_7;
5179       __pyx_v_it_mi1 = __pyx_t_9;
5180 
5181       /* "yt/utilities/lib/ewah_bool_wrap.pyx":172
5182  *             map_bitmask = (<cmap[np.uint64_t, ewah_bool_array]**> self.ewah_coll)[ifile]
5183  *             for it_mi1 in map_bitmask[0]:
5184  *                 mi1 = it_mi1.first             # <<<<<<<<<<<<<<
5185  *                 iarr = it_mi1.second
5186  *                 map_keys[mi1].logicaland(iarr, arr_two)
5187  */
5188       __pyx_t_10 = __pyx_v_it_mi1.first;
5189       __pyx_v_mi1 = __pyx_t_10;
5190 
5191       /* "yt/utilities/lib/ewah_bool_wrap.pyx":173
5192  *             for it_mi1 in map_bitmask[0]:
5193  *                 mi1 = it_mi1.first
5194  *                 iarr = it_mi1.second             # <<<<<<<<<<<<<<
5195  *                 map_keys[mi1].logicaland(iarr, arr_two)
5196  *                 map_keys[mi1].logicalor(iarr, arr_swap)
5197  */
5198       __pyx_t_11 = __pyx_v_it_mi1.second;
5199       __pyx_v_iarr = __pyx_t_11;
5200 
5201       /* "yt/utilities/lib/ewah_bool_wrap.pyx":174
5202  *                 mi1 = it_mi1.first
5203  *                 iarr = it_mi1.second
5204  *                 map_keys[mi1].logicaland(iarr, arr_two)             # <<<<<<<<<<<<<<
5205  *                 map_keys[mi1].logicalor(iarr, arr_swap)
5206  *                 map_keys[mi1].swap(arr_swap)
5207  */
5208       (__pyx_v_map_keys[__pyx_v_mi1]).logicaland(__pyx_v_iarr, __pyx_v_arr_two);
5209 
5210       /* "yt/utilities/lib/ewah_bool_wrap.pyx":175
5211  *                 iarr = it_mi1.second
5212  *                 map_keys[mi1].logicaland(iarr, arr_two)
5213  *                 map_keys[mi1].logicalor(iarr, arr_swap)             # <<<<<<<<<<<<<<
5214  *                 map_keys[mi1].swap(arr_swap)
5215  *                 map_refn[mi1].logicalor(arr_two, arr_swap)
5216  */
5217       (__pyx_v_map_keys[__pyx_v_mi1]).logicalor(__pyx_v_iarr, __pyx_v_arr_swap);
5218 
5219       /* "yt/utilities/lib/ewah_bool_wrap.pyx":176
5220  *                 map_keys[mi1].logicaland(iarr, arr_two)
5221  *                 map_keys[mi1].logicalor(iarr, arr_swap)
5222  *                 map_keys[mi1].swap(arr_swap)             # <<<<<<<<<<<<<<
5223  *                 map_refn[mi1].logicalor(arr_two, arr_swap)
5224  *                 map_refn[mi1].swap(arr_swap)
5225  */
5226       (__pyx_v_map_keys[__pyx_v_mi1]).swap(__pyx_v_arr_swap);
5227 
5228       /* "yt/utilities/lib/ewah_bool_wrap.pyx":177
5229  *                 map_keys[mi1].logicalor(iarr, arr_swap)
5230  *                 map_keys[mi1].swap(arr_swap)
5231  *                 map_refn[mi1].logicalor(arr_two, arr_swap)             # <<<<<<<<<<<<<<
5232  *                 map_refn[mi1].swap(arr_swap)
5233  *         coll_coll[0] = map_refn
5234  */
5235       (__pyx_v_map_refn[__pyx_v_mi1]).logicalor(__pyx_v_arr_two, __pyx_v_arr_swap);
5236 
5237       /* "yt/utilities/lib/ewah_bool_wrap.pyx":178
5238  *                 map_keys[mi1].swap(arr_swap)
5239  *                 map_refn[mi1].logicalor(arr_two, arr_swap)
5240  *                 map_refn[mi1].swap(arr_swap)             # <<<<<<<<<<<<<<
5241  *         coll_coll[0] = map_refn
5242  *         # Count
5243  */
5244       (__pyx_v_map_refn[__pyx_v_mi1]).swap(__pyx_v_arr_swap);
5245 
5246       /* "yt/utilities/lib/ewah_bool_wrap.pyx":171
5247  *         for ifile in range(self.nfiles):
5248  *             map_bitmask = (<cmap[np.uint64_t, ewah_bool_array]**> self.ewah_coll)[ifile]
5249  *             for it_mi1 in map_bitmask[0]:             # <<<<<<<<<<<<<<
5250  *                 mi1 = it_mi1.first
5251  *                 iarr = it_mi1.second
5252  */
5253     }
5254   }
5255 
5256   /* "yt/utilities/lib/ewah_bool_wrap.pyx":179
5257  *                 map_refn[mi1].logicalor(arr_two, arr_swap)
5258  *                 map_refn[mi1].swap(arr_swap)
5259  *         coll_coll[0] = map_refn             # <<<<<<<<<<<<<<
5260  *         # Count
5261  *         cdef int nc, nm
5262  */
5263   (__pyx_v_coll_coll[0]) = __pyx_v_map_refn;
5264 
5265   /* "yt/utilities/lib/ewah_bool_wrap.pyx":182
5266  *         # Count
5267  *         cdef int nc, nm
5268  *         nc = 0             # <<<<<<<<<<<<<<
5269  *         nm = 0
5270  *         for it_mi1 in map_refn:
5271  */
5272   __pyx_v_nc = 0;
5273 
5274   /* "yt/utilities/lib/ewah_bool_wrap.pyx":183
5275  *         cdef int nc, nm
5276  *         nc = 0
5277  *         nm = 0             # <<<<<<<<<<<<<<
5278  *         for it_mi1 in map_refn:
5279  *             mi1 = it_mi1.first
5280  */
5281   __pyx_v_nm = 0;
5282 
5283   /* "yt/utilities/lib/ewah_bool_wrap.pyx":184
5284  *         nc = 0
5285  *         nm = 0
5286  *         for it_mi1 in map_refn:             # <<<<<<<<<<<<<<
5287  *             mi1 = it_mi1.first
5288  *             iarr = it_mi1.second
5289  */
5290   __pyx_t_7 = __pyx_v_map_refn.begin();
5291   for (;;) {
5292     if (!(__pyx_t_7 != __pyx_v_map_refn.end())) break;
5293     __pyx_t_9 = *__pyx_t_7;
5294     ++__pyx_t_7;
5295     __pyx_v_it_mi1 = __pyx_t_9;
5296 
5297     /* "yt/utilities/lib/ewah_bool_wrap.pyx":185
5298  *         nm = 0
5299  *         for it_mi1 in map_refn:
5300  *             mi1 = it_mi1.first             # <<<<<<<<<<<<<<
5301  *             iarr = it_mi1.second
5302  *             nc += iarr.numberOfOnes()
5303  */
5304     __pyx_t_10 = __pyx_v_it_mi1.first;
5305     __pyx_v_mi1 = __pyx_t_10;
5306 
5307     /* "yt/utilities/lib/ewah_bool_wrap.pyx":186
5308  *         for it_mi1 in map_refn:
5309  *             mi1 = it_mi1.first
5310  *             iarr = it_mi1.second             # <<<<<<<<<<<<<<
5311  *             nc += iarr.numberOfOnes()
5312  *             iarr = map_keys[mi1]
5313  */
5314     __pyx_t_11 = __pyx_v_it_mi1.second;
5315     __pyx_v_iarr = __pyx_t_11;
5316 
5317     /* "yt/utilities/lib/ewah_bool_wrap.pyx":187
5318  *             mi1 = it_mi1.first
5319  *             iarr = it_mi1.second
5320  *             nc += iarr.numberOfOnes()             # <<<<<<<<<<<<<<
5321  *             iarr = map_keys[mi1]
5322  *             nm += iarr.numberOfOnes()
5323  */
5324     __pyx_v_nc = (__pyx_v_nc + __pyx_v_iarr.numberOfOnes());
5325 
5326     /* "yt/utilities/lib/ewah_bool_wrap.pyx":188
5327  *             iarr = it_mi1.second
5328  *             nc += iarr.numberOfOnes()
5329  *             iarr = map_keys[mi1]             # <<<<<<<<<<<<<<
5330  *             nm += iarr.numberOfOnes()
5331  *         cdef tuple nout = (nc, nm)
5332  */
5333     __pyx_v_iarr = (__pyx_v_map_keys[__pyx_v_mi1]);
5334 
5335     /* "yt/utilities/lib/ewah_bool_wrap.pyx":189
5336  *             nc += iarr.numberOfOnes()
5337  *             iarr = map_keys[mi1]
5338  *             nm += iarr.numberOfOnes()             # <<<<<<<<<<<<<<
5339  *         cdef tuple nout = (nc, nm)
5340  *         # Print
5341  */
5342     __pyx_v_nm = (__pyx_v_nm + __pyx_v_iarr.numberOfOnes());
5343 
5344     /* "yt/utilities/lib/ewah_bool_wrap.pyx":184
5345  *         nc = 0
5346  *         nm = 0
5347  *         for it_mi1 in map_refn:             # <<<<<<<<<<<<<<
5348  *             mi1 = it_mi1.first
5349  *             iarr = it_mi1.second
5350  */
5351   }
5352 
5353   /* "yt/utilities/lib/ewah_bool_wrap.pyx":190
5354  *             iarr = map_keys[mi1]
5355  *             nm += iarr.numberOfOnes()
5356  *         cdef tuple nout = (nc, nm)             # <<<<<<<<<<<<<<
5357  *         # Print
5358  *         if verbose == 1:
5359  */
5360   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
5361   __Pyx_GOTREF(__pyx_t_3);
5362   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
5363   __Pyx_GOTREF(__pyx_t_2);
5364   __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 190, __pyx_L1_error)
5365   __Pyx_GOTREF(__pyx_t_12);
5366   __Pyx_GIVEREF(__pyx_t_3);
5367   PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3);
5368   __Pyx_GIVEREF(__pyx_t_2);
5369   PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_2);
5370   __pyx_t_3 = 0;
5371   __pyx_t_2 = 0;
5372   __pyx_v_nout = ((PyObject*)__pyx_t_12);
5373   __pyx_t_12 = 0;
5374 
5375   /* "yt/utilities/lib/ewah_bool_wrap.pyx":192
5376  *         cdef tuple nout = (nc, nm)
5377  *         # Print
5378  *         if verbose == 1:             # <<<<<<<<<<<<<<
5379  *             if nm == 0:
5380  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,0.0))
5381  */
5382   __pyx_t_1 = ((__pyx_v_verbose == 1) != 0);
5383   if (__pyx_t_1) {
5384 
5385     /* "yt/utilities/lib/ewah_bool_wrap.pyx":193
5386  *         # Print
5387  *         if verbose == 1:
5388  *             if nm == 0:             # <<<<<<<<<<<<<<
5389  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,0.0))
5390  *             else:
5391  */
5392     __pyx_t_1 = ((__pyx_v_nm == 0) != 0);
5393     if (__pyx_t_1) {
5394 
5395       /* "yt/utilities/lib/ewah_bool_wrap.pyx":194
5396  *         if verbose == 1:
5397  *             if nm == 0:
5398  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,0.0))             # <<<<<<<<<<<<<<
5399  *             else:
5400  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,100.0*float(nc)/nm))
5401  */
5402       __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_10d_10d_collisions_at_refined_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
5403       __Pyx_GOTREF(__pyx_t_2);
5404       __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
5405       __Pyx_GOTREF(__pyx_t_3);
5406       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_nm); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 194, __pyx_L1_error)
5407       __Pyx_GOTREF(__pyx_t_13);
5408       __pyx_t_14 = NULL;
5409       __pyx_t_15 = 0;
5410       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5411         __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
5412         if (likely(__pyx_t_14)) {
5413           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5414           __Pyx_INCREF(__pyx_t_14);
5415           __Pyx_INCREF(function);
5416           __Pyx_DECREF_SET(__pyx_t_2, function);
5417           __pyx_t_15 = 1;
5418         }
5419       }
5420       #if CYTHON_FAST_PYCALL
5421       if (PyFunction_Check(__pyx_t_2)) {
5422         PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_3, __pyx_t_13, __pyx_float_0_0};
5423         __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 194, __pyx_L1_error)
5424         __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
5425         __Pyx_GOTREF(__pyx_t_12);
5426         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5427         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5428       } else
5429       #endif
5430       #if CYTHON_FAST_PYCCALL
5431       if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
5432         PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_3, __pyx_t_13, __pyx_float_0_0};
5433         __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 194, __pyx_L1_error)
5434         __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
5435         __Pyx_GOTREF(__pyx_t_12);
5436         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5437         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5438       } else
5439       #endif
5440       {
5441         __pyx_t_16 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 194, __pyx_L1_error)
5442         __Pyx_GOTREF(__pyx_t_16);
5443         if (__pyx_t_14) {
5444           __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
5445         }
5446         __Pyx_GIVEREF(__pyx_t_3);
5447         PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_t_3);
5448         __Pyx_GIVEREF(__pyx_t_13);
5449         PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_13);
5450         __Pyx_INCREF(__pyx_float_0_0);
5451         __Pyx_GIVEREF(__pyx_float_0_0);
5452         PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_float_0_0);
5453         __pyx_t_3 = 0;
5454         __pyx_t_13 = 0;
5455         __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 194, __pyx_L1_error)
5456         __Pyx_GOTREF(__pyx_t_12);
5457         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5458       }
5459       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5460       if (__Pyx_PrintOne(0, __pyx_t_12) < 0) __PYX_ERR(0, 194, __pyx_L1_error)
5461       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5462 
5463       /* "yt/utilities/lib/ewah_bool_wrap.pyx":193
5464  *         # Print
5465  *         if verbose == 1:
5466  *             if nm == 0:             # <<<<<<<<<<<<<<
5467  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,0.0))
5468  *             else:
5469  */
5470       goto __pyx_L12;
5471     }
5472 
5473     /* "yt/utilities/lib/ewah_bool_wrap.pyx":196
5474  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,0.0))
5475  *             else:
5476  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,100.0*float(nc)/nm))             # <<<<<<<<<<<<<<
5477  *         return nout
5478  *
5479  */
5480     /*else*/ {
5481       __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_10d_10d_collisions_at_refined_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
5482       __Pyx_GOTREF(__pyx_t_2);
5483       __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_nc); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 196, __pyx_L1_error)
5484       __Pyx_GOTREF(__pyx_t_16);
5485       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_nm); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 196, __pyx_L1_error)
5486       __Pyx_GOTREF(__pyx_t_13);
5487       __pyx_t_17 = (100.0 * ((double)__pyx_v_nc));
5488       if (unlikely(__pyx_v_nm == 0)) {
5489         PyErr_SetString(PyExc_ZeroDivisionError, "float division");
5490         __PYX_ERR(0, 196, __pyx_L1_error)
5491       }
5492       __pyx_t_3 = PyFloat_FromDouble((__pyx_t_17 / __pyx_v_nm)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
5493       __Pyx_GOTREF(__pyx_t_3);
5494       __pyx_t_14 = NULL;
5495       __pyx_t_15 = 0;
5496       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5497         __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
5498         if (likely(__pyx_t_14)) {
5499           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5500           __Pyx_INCREF(__pyx_t_14);
5501           __Pyx_INCREF(function);
5502           __Pyx_DECREF_SET(__pyx_t_2, function);
5503           __pyx_t_15 = 1;
5504         }
5505       }
5506       #if CYTHON_FAST_PYCALL
5507       if (PyFunction_Check(__pyx_t_2)) {
5508         PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_16, __pyx_t_13, __pyx_t_3};
5509         __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 196, __pyx_L1_error)
5510         __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
5511         __Pyx_GOTREF(__pyx_t_12);
5512         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5513         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5514         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5515       } else
5516       #endif
5517       #if CYTHON_FAST_PYCCALL
5518       if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
5519         PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_16, __pyx_t_13, __pyx_t_3};
5520         __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 196, __pyx_L1_error)
5521         __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
5522         __Pyx_GOTREF(__pyx_t_12);
5523         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5524         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5525         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5526       } else
5527       #endif
5528       {
5529         __pyx_t_18 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 196, __pyx_L1_error)
5530         __Pyx_GOTREF(__pyx_t_18);
5531         if (__pyx_t_14) {
5532           __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_14); __pyx_t_14 = NULL;
5533         }
5534         __Pyx_GIVEREF(__pyx_t_16);
5535         PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_15, __pyx_t_16);
5536         __Pyx_GIVEREF(__pyx_t_13);
5537         PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_15, __pyx_t_13);
5538         __Pyx_GIVEREF(__pyx_t_3);
5539         PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_15, __pyx_t_3);
5540         __pyx_t_16 = 0;
5541         __pyx_t_13 = 0;
5542         __pyx_t_3 = 0;
5543         __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_18, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 196, __pyx_L1_error)
5544         __Pyx_GOTREF(__pyx_t_12);
5545         __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5546       }
5547       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5548       if (__Pyx_PrintOne(0, __pyx_t_12) < 0) __PYX_ERR(0, 196, __pyx_L1_error)
5549       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5550     }
5551     __pyx_L12:;
5552 
5553     /* "yt/utilities/lib/ewah_bool_wrap.pyx":192
5554  *         cdef tuple nout = (nc, nm)
5555  *         # Print
5556  *         if verbose == 1:             # <<<<<<<<<<<<<<
5557  *             if nm == 0:
5558  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,0.0))
5559  */
5560   }
5561 
5562   /* "yt/utilities/lib/ewah_bool_wrap.pyx":197
5563  *             else:
5564  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(nc,nm,100.0*float(nc)/nm))
5565  *         return nout             # <<<<<<<<<<<<<<
5566  *
5567  *     cdef void _set(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):
5568  */
5569   __Pyx_XDECREF(__pyx_r);
5570   __Pyx_INCREF(__pyx_v_nout);
5571   __pyx_r = __pyx_v_nout;
5572   goto __pyx_L0;
5573 
5574   /* "yt/utilities/lib/ewah_bool_wrap.pyx":156
5575  *         return nout
5576  *
5577  *     cdef tuple _find_collisions_refined(self, BoolArrayCollection coll, bint verbose = 0):             # <<<<<<<<<<<<<<
5578  *         cdef np.int32_t ifile
5579  *         cdef ewah_bool_array iarr, arr_two, arr_swap
5580  */
5581 
5582   /* function exit code */
5583   __pyx_L1_error:;
5584   __Pyx_XDECREF(__pyx_t_2);
5585   __Pyx_XDECREF(__pyx_t_3);
5586   __Pyx_XDECREF(__pyx_t_12);
5587   __Pyx_XDECREF(__pyx_t_13);
5588   __Pyx_XDECREF(__pyx_t_14);
5589   __Pyx_XDECREF(__pyx_t_16);
5590   __Pyx_XDECREF(__pyx_t_18);
5591   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._find_collisions_refined", __pyx_clineno, __pyx_lineno, __pyx_filename);
5592   __pyx_r = 0;
5593   __pyx_L0:;
5594   __Pyx_XDECREF(__pyx_v_nout);
5595   __Pyx_XGIVEREF(__pyx_r);
5596   __Pyx_RefNannyFinishContext();
5597   return __pyx_r;
5598 }
5599 
5600 /* "yt/utilities/lib/ewah_bool_wrap.pyx":199
5601  *         return nout
5602  *
5603  *     cdef void _set(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
5604  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5605  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5606  */
5607 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i1,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set * __pyx_optional_args)5608 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set *__pyx_optional_args) {
5609   __pyx_t_5numpy_uint64_t __pyx_v_i2 = __pyx_k__3;
5610   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
5611   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
5612   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
5613   __Pyx_RefNannyDeclarations
5614   int __pyx_t_1;
5615   __Pyx_RefNannySetupContext("_set", 0);
5616   if (__pyx_optional_args) {
5617     if (__pyx_optional_args->__pyx_n > 0) {
5618       __pyx_v_i2 = __pyx_optional_args->i2;
5619     }
5620   }
5621 
5622   /* "yt/utilities/lib/ewah_bool_wrap.pyx":200
5623  *
5624  *     cdef void _set(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):
5625  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
5626  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5627  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5628  */
5629   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
5630 
5631   /* "yt/utilities/lib/ewah_bool_wrap.pyx":201
5632  *     cdef void _set(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):
5633  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5634  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
5635  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5636  *         ewah_keys[0].set(i1)
5637  */
5638   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
5639 
5640   /* "yt/utilities/lib/ewah_bool_wrap.pyx":202
5641  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5642  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5643  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
5644  *         ewah_keys[0].set(i1)
5645  *         if i2 != FLAG:
5646  */
5647   __pyx_v_ewah_coll = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
5648 
5649   /* "yt/utilities/lib/ewah_bool_wrap.pyx":203
5650  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5651  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5652  *         ewah_keys[0].set(i1)             # <<<<<<<<<<<<<<
5653  *         if i2 != FLAG:
5654  *             ewah_refn[0].set(i1)
5655  */
5656   (void)((__pyx_v_ewah_keys[0]).set(__pyx_v_i1));
5657 
5658   /* "yt/utilities/lib/ewah_bool_wrap.pyx":204
5659  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5660  *         ewah_keys[0].set(i1)
5661  *         if i2 != FLAG:             # <<<<<<<<<<<<<<
5662  *             ewah_refn[0].set(i1)
5663  *             ewah_coll[0][i1].set(i2)
5664  */
5665   __pyx_t_1 = ((__pyx_v_i2 != __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG) != 0);
5666   if (__pyx_t_1) {
5667 
5668     /* "yt/utilities/lib/ewah_bool_wrap.pyx":205
5669  *         ewah_keys[0].set(i1)
5670  *         if i2 != FLAG:
5671  *             ewah_refn[0].set(i1)             # <<<<<<<<<<<<<<
5672  *             ewah_coll[0][i1].set(i2)
5673  *
5674  */
5675     (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i1));
5676 
5677     /* "yt/utilities/lib/ewah_bool_wrap.pyx":206
5678  *         if i2 != FLAG:
5679  *             ewah_refn[0].set(i1)
5680  *             ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
5681  *
5682  *     cdef void _set_coarse(self, np.uint32_t ifile, np.uint64_t i1):
5683  */
5684     (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
5685 
5686     /* "yt/utilities/lib/ewah_bool_wrap.pyx":204
5687  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5688  *         ewah_keys[0].set(i1)
5689  *         if i2 != FLAG:             # <<<<<<<<<<<<<<
5690  *             ewah_refn[0].set(i1)
5691  *             ewah_coll[0][i1].set(i2)
5692  */
5693   }
5694 
5695   /* "yt/utilities/lib/ewah_bool_wrap.pyx":199
5696  *         return nout
5697  *
5698  *     cdef void _set(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
5699  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5700  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5701  */
5702 
5703   /* function exit code */
5704   __Pyx_RefNannyFinishContext();
5705 }
5706 
5707 /* "yt/utilities/lib/ewah_bool_wrap.pyx":208
5708  *             ewah_coll[0][i1].set(i2)
5709  *
5710  *     cdef void _set_coarse(self, np.uint32_t ifile, np.uint64_t i1):             # <<<<<<<<<<<<<<
5711  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5712  *         ewah_keys[0].set(i1)
5713  */
5714 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i1)5715 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
5716   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
5717   __Pyx_RefNannyDeclarations
5718   __Pyx_RefNannySetupContext("_set_coarse", 0);
5719 
5720   /* "yt/utilities/lib/ewah_bool_wrap.pyx":209
5721  *
5722  *     cdef void _set_coarse(self, np.uint32_t ifile, np.uint64_t i1):
5723  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
5724  *         ewah_keys[0].set(i1)
5725  *
5726  */
5727   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
5728 
5729   /* "yt/utilities/lib/ewah_bool_wrap.pyx":210
5730  *     cdef void _set_coarse(self, np.uint32_t ifile, np.uint64_t i1):
5731  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5732  *         ewah_keys[0].set(i1)             # <<<<<<<<<<<<<<
5733  *
5734  *     cdef void _set_refined(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):
5735  */
5736   (void)((__pyx_v_ewah_keys[0]).set(__pyx_v_i1));
5737 
5738   /* "yt/utilities/lib/ewah_bool_wrap.pyx":208
5739  *             ewah_coll[0][i1].set(i2)
5740  *
5741  *     cdef void _set_coarse(self, np.uint32_t ifile, np.uint64_t i1):             # <<<<<<<<<<<<<<
5742  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5743  *         ewah_keys[0].set(i1)
5744  */
5745 
5746   /* function exit code */
5747   __Pyx_RefNannyFinishContext();
5748 }
5749 
5750 /* "yt/utilities/lib/ewah_bool_wrap.pyx":212
5751  *         ewah_keys[0].set(i1)
5752  *
5753  *     cdef void _set_refined(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
5754  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5755  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5756  */
5757 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i1,__pyx_t_5numpy_uint64_t __pyx_v_i2)5758 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2) {
5759   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
5760   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
5761   __Pyx_RefNannyDeclarations
5762   __Pyx_RefNannySetupContext("_set_refined", 0);
5763 
5764   /* "yt/utilities/lib/ewah_bool_wrap.pyx":213
5765  *
5766  *     cdef void _set_refined(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):
5767  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
5768  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5769  *         ewah_refn[0].set(i1)
5770  */
5771   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
5772 
5773   /* "yt/utilities/lib/ewah_bool_wrap.pyx":214
5774  *     cdef void _set_refined(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):
5775  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5776  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
5777  *         ewah_refn[0].set(i1)
5778  *         ewah_coll[0][i1].set(i2)
5779  */
5780   __pyx_v_ewah_coll = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
5781 
5782   /* "yt/utilities/lib/ewah_bool_wrap.pyx":215
5783  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5784  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5785  *         ewah_refn[0].set(i1)             # <<<<<<<<<<<<<<
5786  *         ewah_coll[0][i1].set(i2)
5787  *
5788  */
5789   (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i1));
5790 
5791   /* "yt/utilities/lib/ewah_bool_wrap.pyx":216
5792  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5793  *         ewah_refn[0].set(i1)
5794  *         ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
5795  *
5796  *     @cython.boundscheck(False)
5797  */
5798   (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
5799 
5800   /* "yt/utilities/lib/ewah_bool_wrap.pyx":212
5801  *         ewah_keys[0].set(i1)
5802  *
5803  *     cdef void _set_refined(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
5804  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5805  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5806  */
5807 
5808   /* function exit code */
5809   __Pyx_RefNannyFinishContext();
5810 }
5811 
5812 /* "yt/utilities/lib/ewah_bool_wrap.pyx":222
5813  *     @cython.cdivision(True)
5814  *     @cython.initializedcheck(False)
5815  *     cdef void _set_coarse_array(self, np.uint32_t ifile, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
5816  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5817  *         cdef np.uint64_t i1
5818  */
5819 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__Pyx_memviewslice __pyx_v_arr)5820 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __Pyx_memviewslice __pyx_v_arr) {
5821   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
5822   __pyx_t_5numpy_uint64_t __pyx_v_i1;
5823   __Pyx_RefNannyDeclarations
5824   Py_ssize_t __pyx_t_1;
5825   Py_ssize_t __pyx_t_2;
5826   __pyx_t_5numpy_uint64_t __pyx_t_3;
5827   __pyx_t_5numpy_uint64_t __pyx_t_4;
5828   int __pyx_t_5;
5829   __Pyx_RefNannySetupContext("_set_coarse_array", 0);
5830 
5831   /* "yt/utilities/lib/ewah_bool_wrap.pyx":223
5832  *     @cython.initializedcheck(False)
5833  *     cdef void _set_coarse_array(self, np.uint32_t ifile, np.uint8_t[:] arr):
5834  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
5835  *         cdef np.uint64_t i1
5836  *         for i1 in range(arr.shape[0]):
5837  */
5838   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
5839 
5840   /* "yt/utilities/lib/ewah_bool_wrap.pyx":225
5841  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5842  *         cdef np.uint64_t i1
5843  *         for i1 in range(arr.shape[0]):             # <<<<<<<<<<<<<<
5844  *             if arr[i1] == 1:
5845  *                 ewah_keys[0].set(i1)
5846  */
5847   __pyx_t_1 = (__pyx_v_arr.shape[0]);
5848   __pyx_t_2 = __pyx_t_1;
5849   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
5850     __pyx_v_i1 = __pyx_t_3;
5851 
5852     /* "yt/utilities/lib/ewah_bool_wrap.pyx":226
5853  *         cdef np.uint64_t i1
5854  *         for i1 in range(arr.shape[0]):
5855  *             if arr[i1] == 1:             # <<<<<<<<<<<<<<
5856  *                 ewah_keys[0].set(i1)
5857  *
5858  */
5859     __pyx_t_4 = __pyx_v_i1;
5860     __pyx_t_5 = (((*((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_arr.data + __pyx_t_4 * __pyx_v_arr.strides[0]) ))) == 1) != 0);
5861     if (__pyx_t_5) {
5862 
5863       /* "yt/utilities/lib/ewah_bool_wrap.pyx":227
5864  *         for i1 in range(arr.shape[0]):
5865  *             if arr[i1] == 1:
5866  *                 ewah_keys[0].set(i1)             # <<<<<<<<<<<<<<
5867  *
5868  *     @cython.boundscheck(False)
5869  */
5870       (void)((__pyx_v_ewah_keys[0]).set(__pyx_v_i1));
5871 
5872       /* "yt/utilities/lib/ewah_bool_wrap.pyx":226
5873  *         cdef np.uint64_t i1
5874  *         for i1 in range(arr.shape[0]):
5875  *             if arr[i1] == 1:             # <<<<<<<<<<<<<<
5876  *                 ewah_keys[0].set(i1)
5877  *
5878  */
5879     }
5880   }
5881 
5882   /* "yt/utilities/lib/ewah_bool_wrap.pyx":222
5883  *     @cython.cdivision(True)
5884  *     @cython.initializedcheck(False)
5885  *     cdef void _set_coarse_array(self, np.uint32_t ifile, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
5886  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
5887  *         cdef np.uint64_t i1
5888  */
5889 
5890   /* function exit code */
5891   __Pyx_RefNannyFinishContext();
5892 }
5893 
5894 /* "yt/utilities/lib/ewah_bool_wrap.pyx":233
5895  *     @cython.cdivision(True)
5896  *     @cython.initializedcheck(False)
5897  *     cdef void _set_refined_array(self, np.uint32_t ifile, np.uint64_t i1, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
5898  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5899  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5900  */
5901 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i1,__Pyx_memviewslice __pyx_v_arr)5902 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, __Pyx_memviewslice __pyx_v_arr) {
5903   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
5904   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
5905   __pyx_t_5numpy_uint64_t __pyx_v_i2;
5906   __Pyx_RefNannyDeclarations
5907   Py_ssize_t __pyx_t_1;
5908   Py_ssize_t __pyx_t_2;
5909   __pyx_t_5numpy_uint64_t __pyx_t_3;
5910   __pyx_t_5numpy_uint64_t __pyx_t_4;
5911   int __pyx_t_5;
5912   __Pyx_RefNannySetupContext("_set_refined_array", 0);
5913 
5914   /* "yt/utilities/lib/ewah_bool_wrap.pyx":234
5915  *     @cython.initializedcheck(False)
5916  *     cdef void _set_refined_array(self, np.uint32_t ifile, np.uint64_t i1, np.uint8_t[:] arr):
5917  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
5918  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5919  *         cdef np.uint64_t i2
5920  */
5921   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
5922 
5923   /* "yt/utilities/lib/ewah_bool_wrap.pyx":235
5924  *     cdef void _set_refined_array(self, np.uint32_t ifile, np.uint64_t i1, np.uint8_t[:] arr):
5925  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5926  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
5927  *         cdef np.uint64_t i2
5928  *         for i2 in range(arr.shape[0]):
5929  */
5930   __pyx_v_ewah_coll = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
5931 
5932   /* "yt/utilities/lib/ewah_bool_wrap.pyx":237
5933  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5934  *         cdef np.uint64_t i2
5935  *         for i2 in range(arr.shape[0]):             # <<<<<<<<<<<<<<
5936  *             if arr[i2] == 1:
5937  *                 ewah_refn[0].set(i1)
5938  */
5939   __pyx_t_1 = (__pyx_v_arr.shape[0]);
5940   __pyx_t_2 = __pyx_t_1;
5941   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
5942     __pyx_v_i2 = __pyx_t_3;
5943 
5944     /* "yt/utilities/lib/ewah_bool_wrap.pyx":238
5945  *         cdef np.uint64_t i2
5946  *         for i2 in range(arr.shape[0]):
5947  *             if arr[i2] == 1:             # <<<<<<<<<<<<<<
5948  *                 ewah_refn[0].set(i1)
5949  *                 ewah_coll[0][i1].set(i2)
5950  */
5951     __pyx_t_4 = __pyx_v_i2;
5952     __pyx_t_5 = (((*((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_arr.data + __pyx_t_4 * __pyx_v_arr.strides[0]) ))) == 1) != 0);
5953     if (__pyx_t_5) {
5954 
5955       /* "yt/utilities/lib/ewah_bool_wrap.pyx":239
5956  *         for i2 in range(arr.shape[0]):
5957  *             if arr[i2] == 1:
5958  *                 ewah_refn[0].set(i1)             # <<<<<<<<<<<<<<
5959  *                 ewah_coll[0][i1].set(i2)
5960  *
5961  */
5962       (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i1));
5963 
5964       /* "yt/utilities/lib/ewah_bool_wrap.pyx":240
5965  *             if arr[i2] == 1:
5966  *                 ewah_refn[0].set(i1)
5967  *                 ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
5968  *
5969  *     @cython.boundscheck(False)
5970  */
5971       (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
5972 
5973       /* "yt/utilities/lib/ewah_bool_wrap.pyx":238
5974  *         cdef np.uint64_t i2
5975  *         for i2 in range(arr.shape[0]):
5976  *             if arr[i2] == 1:             # <<<<<<<<<<<<<<
5977  *                 ewah_refn[0].set(i1)
5978  *                 ewah_coll[0][i1].set(i2)
5979  */
5980     }
5981   }
5982 
5983   /* "yt/utilities/lib/ewah_bool_wrap.pyx":233
5984  *     @cython.cdivision(True)
5985  *     @cython.initializedcheck(False)
5986  *     cdef void _set_refined_array(self, np.uint32_t ifile, np.uint64_t i1, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
5987  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
5988  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
5989  */
5990 
5991   /* function exit code */
5992   __Pyx_RefNannyFinishContext();
5993 }
5994 
5995 /* "yt/utilities/lib/ewah_bool_wrap.pyx":246
5996  *     @cython.cdivision(True)
5997  *     @cython.initializedcheck(False)
5998  *     cdef void _set_refined_index_array(self, np.uint32_t ifile, np.int64_t nsub_mi,             # <<<<<<<<<<<<<<
5999  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi1,
6000  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi2):
6001  */
6002 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined_index_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_int64_t __pyx_v_nsub_mi,PyArrayObject * __pyx_v_sub_mi1,PyArrayObject * __pyx_v_sub_mi2)6003 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined_index_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_int64_t __pyx_v_nsub_mi, PyArrayObject *__pyx_v_sub_mi1, PyArrayObject *__pyx_v_sub_mi2) {
6004   PyArrayObject *__pyx_v_ind = 0;
6005   __pyx_t_5numpy_int64_t __pyx_v_i;
6006   __pyx_t_5numpy_int64_t __pyx_v_p;
6007   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_temp = 0;
6008   __Pyx_LocalBuf_ND __pyx_pybuffernd_ind;
6009   __Pyx_Buffer __pyx_pybuffer_ind;
6010   __Pyx_LocalBuf_ND __pyx_pybuffernd_sub_mi1;
6011   __Pyx_Buffer __pyx_pybuffer_sub_mi1;
6012   __Pyx_LocalBuf_ND __pyx_pybuffernd_sub_mi2;
6013   __Pyx_Buffer __pyx_pybuffer_sub_mi2;
6014   __Pyx_RefNannyDeclarations
6015   PyObject *__pyx_t_1 = NULL;
6016   PyObject *__pyx_t_2 = NULL;
6017   PyObject *__pyx_t_3 = NULL;
6018   PyObject *__pyx_t_4 = NULL;
6019   PyObject *__pyx_t_5 = NULL;
6020   PyArrayObject *__pyx_t_6 = NULL;
6021   int __pyx_t_7;
6022   __pyx_t_5numpy_int64_t __pyx_t_8;
6023   __pyx_t_5numpy_int64_t __pyx_t_9;
6024   __pyx_t_5numpy_int64_t __pyx_t_10;
6025   __pyx_t_5numpy_int64_t __pyx_t_11;
6026   __pyx_t_5numpy_int64_t __pyx_t_12;
6027   __pyx_t_5numpy_int64_t __pyx_t_13;
6028   __pyx_t_5numpy_int64_t __pyx_t_14;
6029   __pyx_t_5numpy_int64_t __pyx_t_15;
6030   __pyx_t_5numpy_int64_t __pyx_t_16;
6031   __pyx_t_5numpy_int64_t __pyx_t_17;
6032   __Pyx_RefNannySetupContext("_set_refined_index_array", 0);
6033   __pyx_pybuffer_ind.pybuffer.buf = NULL;
6034   __pyx_pybuffer_ind.refcount = 0;
6035   __pyx_pybuffernd_ind.data = NULL;
6036   __pyx_pybuffernd_ind.rcbuffer = &__pyx_pybuffer_ind;
6037   __pyx_pybuffer_sub_mi1.pybuffer.buf = NULL;
6038   __pyx_pybuffer_sub_mi1.refcount = 0;
6039   __pyx_pybuffernd_sub_mi1.data = NULL;
6040   __pyx_pybuffernd_sub_mi1.rcbuffer = &__pyx_pybuffer_sub_mi1;
6041   __pyx_pybuffer_sub_mi2.pybuffer.buf = NULL;
6042   __pyx_pybuffer_sub_mi2.refcount = 0;
6043   __pyx_pybuffernd_sub_mi2.data = NULL;
6044   __pyx_pybuffernd_sub_mi2.rcbuffer = &__pyx_pybuffer_sub_mi2;
6045   {
6046     __Pyx_BufFmt_StackElem __pyx_stack[1];
6047     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sub_mi1.rcbuffer->pybuffer, (PyObject*)__pyx_v_sub_mi1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 246, __pyx_L1_error)
6048   }
6049   __pyx_pybuffernd_sub_mi1.diminfo[0].strides = __pyx_pybuffernd_sub_mi1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sub_mi1.diminfo[0].shape = __pyx_pybuffernd_sub_mi1.rcbuffer->pybuffer.shape[0];
6050   {
6051     __Pyx_BufFmt_StackElem __pyx_stack[1];
6052     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sub_mi2.rcbuffer->pybuffer, (PyObject*)__pyx_v_sub_mi2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 246, __pyx_L1_error)
6053   }
6054   __pyx_pybuffernd_sub_mi2.diminfo[0].strides = __pyx_pybuffernd_sub_mi2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sub_mi2.diminfo[0].shape = __pyx_pybuffernd_sub_mi2.rcbuffer->pybuffer.shape[0];
6055 
6056   /* "yt/utilities/lib/ewah_bool_wrap.pyx":249
6057  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi1,
6058  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi2):
6059  *         cdef np.ndarray[np.int64_t, ndim=1] ind = np.lexsort((sub_mi2[:nsub_mi],             # <<<<<<<<<<<<<<
6060  *                                                               sub_mi1[:nsub_mi]))
6061  *         cdef np.int64_t i, p
6062  */
6063   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
6064   __Pyx_GOTREF(__pyx_t_2);
6065   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lexsort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
6066   __Pyx_GOTREF(__pyx_t_3);
6067   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6068   __pyx_t_2 = __Pyx_PyInt_From_npy_int64(__pyx_v_nsub_mi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
6069   __Pyx_GOTREF(__pyx_t_2);
6070   __pyx_t_4 = PySlice_New(Py_None, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
6071   __Pyx_GOTREF(__pyx_t_4);
6072   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6073   __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_sub_mi2), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
6074   __Pyx_GOTREF(__pyx_t_2);
6075   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6076 
6077   /* "yt/utilities/lib/ewah_bool_wrap.pyx":250
6078  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi2):
6079  *         cdef np.ndarray[np.int64_t, ndim=1] ind = np.lexsort((sub_mi2[:nsub_mi],
6080  *                                                               sub_mi1[:nsub_mi]))             # <<<<<<<<<<<<<<
6081  *         cdef np.int64_t i, p
6082  *         cdef BoolArrayCollection temp
6083  */
6084   __pyx_t_4 = __Pyx_PyInt_From_npy_int64(__pyx_v_nsub_mi); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
6085   __Pyx_GOTREF(__pyx_t_4);
6086   __pyx_t_5 = PySlice_New(Py_None, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
6087   __Pyx_GOTREF(__pyx_t_5);
6088   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6089   __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_sub_mi1), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
6090   __Pyx_GOTREF(__pyx_t_4);
6091   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6092 
6093   /* "yt/utilities/lib/ewah_bool_wrap.pyx":249
6094  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi1,
6095  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi2):
6096  *         cdef np.ndarray[np.int64_t, ndim=1] ind = np.lexsort((sub_mi2[:nsub_mi],             # <<<<<<<<<<<<<<
6097  *                                                               sub_mi1[:nsub_mi]))
6098  *         cdef np.int64_t i, p
6099  */
6100   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
6101   __Pyx_GOTREF(__pyx_t_5);
6102   __Pyx_GIVEREF(__pyx_t_2);
6103   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
6104   __Pyx_GIVEREF(__pyx_t_4);
6105   PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
6106   __pyx_t_2 = 0;
6107   __pyx_t_4 = 0;
6108   __pyx_t_4 = NULL;
6109   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6110     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6111     if (likely(__pyx_t_4)) {
6112       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6113       __Pyx_INCREF(__pyx_t_4);
6114       __Pyx_INCREF(function);
6115       __Pyx_DECREF_SET(__pyx_t_3, function);
6116     }
6117   }
6118   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
6119   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6120   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6121   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
6122   __Pyx_GOTREF(__pyx_t_1);
6123   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6124   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 249, __pyx_L1_error)
6125   __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
6126   {
6127     __Pyx_BufFmt_StackElem __pyx_stack[1];
6128     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ind.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
6129       __pyx_v_ind = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_ind.rcbuffer->pybuffer.buf = NULL;
6130       __PYX_ERR(0, 249, __pyx_L1_error)
6131     } else {__pyx_pybuffernd_ind.diminfo[0].strides = __pyx_pybuffernd_ind.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ind.diminfo[0].shape = __pyx_pybuffernd_ind.rcbuffer->pybuffer.shape[0];
6132     }
6133   }
6134   __pyx_t_6 = 0;
6135   __pyx_v_ind = ((PyArrayObject *)__pyx_t_1);
6136   __pyx_t_1 = 0;
6137 
6138   /* "yt/utilities/lib/ewah_bool_wrap.pyx":253
6139  *         cdef np.int64_t i, p
6140  *         cdef BoolArrayCollection temp
6141  *         if self._count_refined(ifile) == 0:             # <<<<<<<<<<<<<<
6142  *             # Add to file bitmask in order
6143  *             for i in range(nsub_mi):
6144  */
6145   __pyx_t_7 = ((((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_refined(__pyx_v_self, __pyx_v_ifile) == 0) != 0);
6146   if (__pyx_t_7) {
6147 
6148     /* "yt/utilities/lib/ewah_bool_wrap.pyx":255
6149  *         if self._count_refined(ifile) == 0:
6150  *             # Add to file bitmask in order
6151  *             for i in range(nsub_mi):             # <<<<<<<<<<<<<<
6152  *                 p = ind[i]
6153  *                 self._set_refined(ifile, sub_mi1[p], sub_mi2[p])
6154  */
6155     __pyx_t_8 = __pyx_v_nsub_mi;
6156     __pyx_t_9 = __pyx_t_8;
6157     for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
6158       __pyx_v_i = __pyx_t_10;
6159 
6160       /* "yt/utilities/lib/ewah_bool_wrap.pyx":256
6161  *             # Add to file bitmask in order
6162  *             for i in range(nsub_mi):
6163  *                 p = ind[i]             # <<<<<<<<<<<<<<
6164  *                 self._set_refined(ifile, sub_mi1[p], sub_mi2[p])
6165  *         else:
6166  */
6167       __pyx_t_11 = __pyx_v_i;
6168       __pyx_v_p = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ind.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_ind.diminfo[0].strides));
6169 
6170       /* "yt/utilities/lib/ewah_bool_wrap.pyx":257
6171  *             for i in range(nsub_mi):
6172  *                 p = ind[i]
6173  *                 self._set_refined(ifile, sub_mi1[p], sub_mi2[p])             # <<<<<<<<<<<<<<
6174  *         else:
6175  *             # Add to dummy bitmask in order, then combine
6176  */
6177       __pyx_t_12 = __pyx_v_p;
6178       __pyx_t_13 = __pyx_v_p;
6179       ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_set_refined(__pyx_v_self, __pyx_v_ifile, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_sub_mi1.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_sub_mi1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_sub_mi2.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_sub_mi2.diminfo[0].strides)));
6180     }
6181 
6182     /* "yt/utilities/lib/ewah_bool_wrap.pyx":253
6183  *         cdef np.int64_t i, p
6184  *         cdef BoolArrayCollection temp
6185  *         if self._count_refined(ifile) == 0:             # <<<<<<<<<<<<<<
6186  *             # Add to file bitmask in order
6187  *             for i in range(nsub_mi):
6188  */
6189     goto __pyx_L3;
6190   }
6191 
6192   /* "yt/utilities/lib/ewah_bool_wrap.pyx":260
6193  *         else:
6194  *             # Add to dummy bitmask in order, then combine
6195  *             temp = BoolArrayCollection()             # <<<<<<<<<<<<<<
6196  *             for i in range(nsub_mi):
6197  *                 p = ind[i]
6198  */
6199   /*else*/ {
6200     __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
6201     __Pyx_GOTREF(__pyx_t_1);
6202     __pyx_v_temp = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_t_1);
6203     __pyx_t_1 = 0;
6204 
6205     /* "yt/utilities/lib/ewah_bool_wrap.pyx":261
6206  *             # Add to dummy bitmask in order, then combine
6207  *             temp = BoolArrayCollection()
6208  *             for i in range(nsub_mi):             # <<<<<<<<<<<<<<
6209  *                 p = ind[i]
6210  *                 temp._set_coarse(sub_mi1[p])
6211  */
6212     __pyx_t_8 = __pyx_v_nsub_mi;
6213     __pyx_t_9 = __pyx_t_8;
6214     for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
6215       __pyx_v_i = __pyx_t_10;
6216 
6217       /* "yt/utilities/lib/ewah_bool_wrap.pyx":262
6218  *             temp = BoolArrayCollection()
6219  *             for i in range(nsub_mi):
6220  *                 p = ind[i]             # <<<<<<<<<<<<<<
6221  *                 temp._set_coarse(sub_mi1[p])
6222  *                 temp._set_refined(sub_mi1[p], sub_mi2[p])
6223  */
6224       __pyx_t_14 = __pyx_v_i;
6225       __pyx_v_p = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ind.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_ind.diminfo[0].strides));
6226 
6227       /* "yt/utilities/lib/ewah_bool_wrap.pyx":263
6228  *             for i in range(nsub_mi):
6229  *                 p = ind[i]
6230  *                 temp._set_coarse(sub_mi1[p])             # <<<<<<<<<<<<<<
6231  *                 temp._set_refined(sub_mi1[p], sub_mi2[p])
6232  *                 self._append(ifile, temp)
6233  */
6234       __pyx_t_15 = __pyx_v_p;
6235       ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_temp->__pyx_vtab)->_set_coarse(__pyx_v_temp, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_sub_mi1.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_sub_mi1.diminfo[0].strides)));
6236 
6237       /* "yt/utilities/lib/ewah_bool_wrap.pyx":264
6238  *                 p = ind[i]
6239  *                 temp._set_coarse(sub_mi1[p])
6240  *                 temp._set_refined(sub_mi1[p], sub_mi2[p])             # <<<<<<<<<<<<<<
6241  *                 self._append(ifile, temp)
6242  *
6243  */
6244       __pyx_t_16 = __pyx_v_p;
6245       __pyx_t_17 = __pyx_v_p;
6246       ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_temp->__pyx_vtab)->_set_refined(__pyx_v_temp, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_sub_mi1.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_sub_mi1.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_sub_mi2.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_sub_mi2.diminfo[0].strides)));
6247 
6248       /* "yt/utilities/lib/ewah_bool_wrap.pyx":265
6249  *                 temp._set_coarse(sub_mi1[p])
6250  *                 temp._set_refined(sub_mi1[p], sub_mi2[p])
6251  *                 self._append(ifile, temp)             # <<<<<<<<<<<<<<
6252  *
6253  *     cdef void _set_map(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):
6254  */
6255       ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_ifile, __pyx_v_temp);
6256     }
6257   }
6258   __pyx_L3:;
6259 
6260   /* "yt/utilities/lib/ewah_bool_wrap.pyx":246
6261  *     @cython.cdivision(True)
6262  *     @cython.initializedcheck(False)
6263  *     cdef void _set_refined_index_array(self, np.uint32_t ifile, np.int64_t nsub_mi,             # <<<<<<<<<<<<<<
6264  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi1,
6265  *                                        np.ndarray[np.uint64_t, ndim=1] sub_mi2):
6266  */
6267 
6268   /* function exit code */
6269   goto __pyx_L0;
6270   __pyx_L1_error:;
6271   __Pyx_XDECREF(__pyx_t_1);
6272   __Pyx_XDECREF(__pyx_t_2);
6273   __Pyx_XDECREF(__pyx_t_3);
6274   __Pyx_XDECREF(__pyx_t_4);
6275   __Pyx_XDECREF(__pyx_t_5);
6276   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
6277     __Pyx_PyThreadState_declare
6278     __Pyx_PyThreadState_assign
6279     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
6280     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ind.rcbuffer->pybuffer);
6281     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sub_mi1.rcbuffer->pybuffer);
6282     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sub_mi2.rcbuffer->pybuffer);
6283   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
6284   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._set_refined_index_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6285   goto __pyx_L2;
6286   __pyx_L0:;
6287   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ind.rcbuffer->pybuffer);
6288   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sub_mi1.rcbuffer->pybuffer);
6289   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sub_mi2.rcbuffer->pybuffer);
6290   __pyx_L2:;
6291   __Pyx_XDECREF((PyObject *)__pyx_v_ind);
6292   __Pyx_XDECREF((PyObject *)__pyx_v_temp);
6293   __Pyx_RefNannyFinishContext();
6294 }
6295 
6296 /* "yt/utilities/lib/ewah_bool_wrap.pyx":267
6297  *                 self._append(ifile, temp)
6298  *
6299  *     cdef void _set_map(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
6300  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
6301  *         ewah_coll[0][i1].set(i2)
6302  */
6303 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i1,__pyx_t_5numpy_uint64_t __pyx_v_i2)6304 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2) {
6305   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
6306   __Pyx_RefNannyDeclarations
6307   __Pyx_RefNannySetupContext("_set_map", 0);
6308 
6309   /* "yt/utilities/lib/ewah_bool_wrap.pyx":268
6310  *
6311  *     cdef void _set_map(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):
6312  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
6313  *         ewah_coll[0][i1].set(i2)
6314  *
6315  */
6316   __pyx_v_ewah_coll = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
6317 
6318   /* "yt/utilities/lib/ewah_bool_wrap.pyx":269
6319  *     cdef void _set_map(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):
6320  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
6321  *         ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
6322  *
6323  *     cdef void _set_refn(self, np.uint32_t ifile, np.uint64_t i1):
6324  */
6325   (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
6326 
6327   /* "yt/utilities/lib/ewah_bool_wrap.pyx":267
6328  *                 self._append(ifile, temp)
6329  *
6330  *     cdef void _set_map(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
6331  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
6332  *         ewah_coll[0][i1].set(i2)
6333  */
6334 
6335   /* function exit code */
6336   __Pyx_RefNannyFinishContext();
6337 }
6338 
6339 /* "yt/utilities/lib/ewah_bool_wrap.pyx":271
6340  *         ewah_coll[0][i1].set(i2)
6341  *
6342  *     cdef void _set_refn(self, np.uint32_t ifile, np.uint64_t i1):             # <<<<<<<<<<<<<<
6343  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6344  *         ewah_refn[0].set(i1)
6345  */
6346 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i1)6347 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
6348   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
6349   __Pyx_RefNannyDeclarations
6350   __Pyx_RefNannySetupContext("_set_refn", 0);
6351 
6352   /* "yt/utilities/lib/ewah_bool_wrap.pyx":272
6353  *
6354  *     cdef void _set_refn(self, np.uint32_t ifile, np.uint64_t i1):
6355  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
6356  *         ewah_refn[0].set(i1)
6357  *
6358  */
6359   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
6360 
6361   /* "yt/utilities/lib/ewah_bool_wrap.pyx":273
6362  *     cdef void _set_refn(self, np.uint32_t ifile, np.uint64_t i1):
6363  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6364  *         ewah_refn[0].set(i1)             # <<<<<<<<<<<<<<
6365  *
6366  *     cdef bint _get(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):
6367  */
6368   (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i1));
6369 
6370   /* "yt/utilities/lib/ewah_bool_wrap.pyx":271
6371  *         ewah_coll[0][i1].set(i2)
6372  *
6373  *     cdef void _set_refn(self, np.uint32_t ifile, np.uint64_t i1):             # <<<<<<<<<<<<<<
6374  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6375  *         ewah_refn[0].set(i1)
6376  */
6377 
6378   /* function exit code */
6379   __Pyx_RefNannyFinishContext();
6380 }
6381 
6382 /* "yt/utilities/lib/ewah_bool_wrap.pyx":275
6383  *         ewah_refn[0].set(i1)
6384  *
6385  *     cdef bint _get(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
6386  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6387  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6388  */
6389 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i1,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get * __pyx_optional_args)6390 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get *__pyx_optional_args) {
6391   __pyx_t_5numpy_uint64_t __pyx_v_i2 = __pyx_k__4;
6392   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
6393   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
6394   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
6395   int __pyx_r;
6396   __Pyx_RefNannyDeclarations
6397   int __pyx_t_1;
6398   int __pyx_t_2;
6399   __Pyx_RefNannySetupContext("_get", 0);
6400   if (__pyx_optional_args) {
6401     if (__pyx_optional_args->__pyx_n > 0) {
6402       __pyx_v_i2 = __pyx_optional_args->i2;
6403     }
6404   }
6405 
6406   /* "yt/utilities/lib/ewah_bool_wrap.pyx":276
6407  *
6408  *     cdef bint _get(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):
6409  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
6410  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6411  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
6412  */
6413   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
6414 
6415   /* "yt/utilities/lib/ewah_bool_wrap.pyx":277
6416  *     cdef bint _get(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):
6417  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6418  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
6419  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
6420  *         if (ewah_keys[0].get(i1) == 0): return 0
6421  */
6422   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
6423 
6424   /* "yt/utilities/lib/ewah_bool_wrap.pyx":278
6425  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6426  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6427  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
6428  *         if (ewah_keys[0].get(i1) == 0): return 0
6429  *         if (i2 == FLAG) or (ewah_refn[0].get(i1) == 0):
6430  */
6431   __pyx_v_ewah_coll = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
6432 
6433   /* "yt/utilities/lib/ewah_bool_wrap.pyx":279
6434  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6435  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
6436  *         if (ewah_keys[0].get(i1) == 0): return 0             # <<<<<<<<<<<<<<
6437  *         if (i2 == FLAG) or (ewah_refn[0].get(i1) == 0):
6438  *             return 1
6439  */
6440   __pyx_t_1 = (((__pyx_v_ewah_keys[0]).get(__pyx_v_i1) == 0) != 0);
6441   if (__pyx_t_1) {
6442     __pyx_r = 0;
6443     goto __pyx_L0;
6444   }
6445 
6446   /* "yt/utilities/lib/ewah_bool_wrap.pyx":280
6447  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
6448  *         if (ewah_keys[0].get(i1) == 0): return 0
6449  *         if (i2 == FLAG) or (ewah_refn[0].get(i1) == 0):             # <<<<<<<<<<<<<<
6450  *             return 1
6451  *         return ewah_coll[0][i1].get(i2)
6452  */
6453   __pyx_t_2 = ((__pyx_v_i2 == __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG) != 0);
6454   if (!__pyx_t_2) {
6455   } else {
6456     __pyx_t_1 = __pyx_t_2;
6457     goto __pyx_L5_bool_binop_done;
6458   }
6459   __pyx_t_2 = (((__pyx_v_ewah_refn[0]).get(__pyx_v_i1) == 0) != 0);
6460   __pyx_t_1 = __pyx_t_2;
6461   __pyx_L5_bool_binop_done:;
6462   if (__pyx_t_1) {
6463 
6464     /* "yt/utilities/lib/ewah_bool_wrap.pyx":281
6465  *         if (ewah_keys[0].get(i1) == 0): return 0
6466  *         if (i2 == FLAG) or (ewah_refn[0].get(i1) == 0):
6467  *             return 1             # <<<<<<<<<<<<<<
6468  *         return ewah_coll[0][i1].get(i2)
6469  *
6470  */
6471     __pyx_r = 1;
6472     goto __pyx_L0;
6473 
6474     /* "yt/utilities/lib/ewah_bool_wrap.pyx":280
6475  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
6476  *         if (ewah_keys[0].get(i1) == 0): return 0
6477  *         if (i2 == FLAG) or (ewah_refn[0].get(i1) == 0):             # <<<<<<<<<<<<<<
6478  *             return 1
6479  *         return ewah_coll[0][i1].get(i2)
6480  */
6481   }
6482 
6483   /* "yt/utilities/lib/ewah_bool_wrap.pyx":282
6484  *         if (i2 == FLAG) or (ewah_refn[0].get(i1) == 0):
6485  *             return 1
6486  *         return ewah_coll[0][i1].get(i2)             # <<<<<<<<<<<<<<
6487  *
6488  *     cdef bint _get_coarse(self, np.uint32_t ifile, np.uint64_t i1):
6489  */
6490   __pyx_r = ((__pyx_v_ewah_coll[0])[__pyx_v_i1]).get(__pyx_v_i2);
6491   goto __pyx_L0;
6492 
6493   /* "yt/utilities/lib/ewah_bool_wrap.pyx":275
6494  *         ewah_refn[0].set(i1)
6495  *
6496  *     cdef bint _get(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
6497  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6498  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6499  */
6500 
6501   /* function exit code */
6502   __pyx_L0:;
6503   __Pyx_RefNannyFinishContext();
6504   return __pyx_r;
6505 }
6506 
6507 /* "yt/utilities/lib/ewah_bool_wrap.pyx":284
6508  *         return ewah_coll[0][i1].get(i2)
6509  *
6510  *     cdef bint _get_coarse(self, np.uint32_t ifile, np.uint64_t i1):             # <<<<<<<<<<<<<<
6511  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6512  *         return ewah_keys[0].get(i1)
6513  */
6514 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i1)6515 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
6516   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
6517   int __pyx_r;
6518   __Pyx_RefNannyDeclarations
6519   __Pyx_RefNannySetupContext("_get_coarse", 0);
6520 
6521   /* "yt/utilities/lib/ewah_bool_wrap.pyx":285
6522  *
6523  *     cdef bint _get_coarse(self, np.uint32_t ifile, np.uint64_t i1):
6524  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
6525  *         return ewah_keys[0].get(i1)
6526  *
6527  */
6528   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
6529 
6530   /* "yt/utilities/lib/ewah_bool_wrap.pyx":286
6531  *     cdef bint _get_coarse(self, np.uint32_t ifile, np.uint64_t i1):
6532  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6533  *         return ewah_keys[0].get(i1)             # <<<<<<<<<<<<<<
6534  *
6535  *     @cython.boundscheck(False)
6536  */
6537   __pyx_r = (__pyx_v_ewah_keys[0]).get(__pyx_v_i1);
6538   goto __pyx_L0;
6539 
6540   /* "yt/utilities/lib/ewah_bool_wrap.pyx":284
6541  *         return ewah_coll[0][i1].get(i2)
6542  *
6543  *     cdef bint _get_coarse(self, np.uint32_t ifile, np.uint64_t i1):             # <<<<<<<<<<<<<<
6544  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6545  *         return ewah_keys[0].get(i1)
6546  */
6547 
6548   /* function exit code */
6549   __pyx_L0:;
6550   __Pyx_RefNannyFinishContext();
6551   return __pyx_r;
6552 }
6553 
6554 /* "yt/utilities/lib/ewah_bool_wrap.pyx":292
6555  *     @cython.cdivision(True)
6556  *     @cython.initializedcheck(False)
6557  *     cdef void _get_coarse_array(self, np.uint32_t ifile, np.uint64_t imax,             # <<<<<<<<<<<<<<
6558  *                                 np.uint8_t[:] arr) except *:
6559  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6560  */
6561 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_imax,__Pyx_memviewslice __pyx_v_arr)6562 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_imax, __Pyx_memviewslice __pyx_v_arr) {
6563   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
6564   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_set;
6565   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_end;
6566   __pyx_t_5numpy_uint64_t __pyx_v_iset;
6567   __Pyx_RefNannyDeclarations
6568   int __pyx_t_1;
6569   PyObject *__pyx_t_2 = NULL;
6570   PyObject *__pyx_t_3 = NULL;
6571   PyObject *__pyx_t_4 = NULL;
6572   PyObject *__pyx_t_5 = NULL;
6573   PyObject *__pyx_t_6 = NULL;
6574   int __pyx_t_7;
6575   PyObject *__pyx_t_8 = NULL;
6576   __pyx_t_5numpy_uint64_t __pyx_t_9;
6577   __Pyx_RefNannySetupContext("_get_coarse_array", 0);
6578 
6579   /* "yt/utilities/lib/ewah_bool_wrap.pyx":294
6580  *     cdef void _get_coarse_array(self, np.uint32_t ifile, np.uint64_t imax,
6581  *                                 np.uint8_t[:] arr) except *:
6582  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
6583  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_keys[0].begin())
6584  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_keys[0].end())
6585  */
6586   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
6587 
6588   /* "yt/utilities/lib/ewah_bool_wrap.pyx":295
6589  *                                 np.uint8_t[:] arr) except *:
6590  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6591  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_keys[0].begin())             # <<<<<<<<<<<<<<
6592  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_keys[0].end())
6593  *         cdef np.uint64_t iset
6594  */
6595   __pyx_v_iter_set = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator((__pyx_v_ewah_keys[0]).begin());
6596 
6597   /* "yt/utilities/lib/ewah_bool_wrap.pyx":296
6598  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6599  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_keys[0].begin())
6600  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_keys[0].end())             # <<<<<<<<<<<<<<
6601  *         cdef np.uint64_t iset
6602  *         while iter_set[0] != iter_end[0]:
6603  */
6604   __pyx_v_iter_end = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator((__pyx_v_ewah_keys[0]).end());
6605 
6606   /* "yt/utilities/lib/ewah_bool_wrap.pyx":298
6607  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_keys[0].end())
6608  *         cdef np.uint64_t iset
6609  *         while iter_set[0] != iter_end[0]:             # <<<<<<<<<<<<<<
6610  *             iset = dereference(iter_set[0])
6611  *             if iset >= imax:
6612  */
6613   while (1) {
6614     __pyx_t_1 = (((__pyx_v_iter_set[0]) != (__pyx_v_iter_end[0])) != 0);
6615     if (!__pyx_t_1) break;
6616 
6617     /* "yt/utilities/lib/ewah_bool_wrap.pyx":299
6618  *         cdef np.uint64_t iset
6619  *         while iter_set[0] != iter_end[0]:
6620  *             iset = dereference(iter_set[0])             # <<<<<<<<<<<<<<
6621  *             if iset >= imax:
6622  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
6623  */
6624     __pyx_v_iset = (*(__pyx_v_iter_set[0]));
6625 
6626     /* "yt/utilities/lib/ewah_bool_wrap.pyx":300
6627  *         while iter_set[0] != iter_end[0]:
6628  *             iset = dereference(iter_set[0])
6629  *             if iset >= imax:             # <<<<<<<<<<<<<<
6630  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
6631  *             arr[iset] = 1
6632  */
6633     __pyx_t_1 = ((__pyx_v_iset >= __pyx_v_imax) != 0);
6634     if (unlikely(__pyx_t_1)) {
6635 
6636       /* "yt/utilities/lib/ewah_bool_wrap.pyx":301
6637  *             iset = dereference(iter_set[0])
6638  *             if iset >= imax:
6639  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))             # <<<<<<<<<<<<<<
6640  *             arr[iset] = 1
6641  *             preincrement(iter_set[0])
6642  */
6643       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Index_exceedes_max, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
6644       __Pyx_GOTREF(__pyx_t_3);
6645       __pyx_t_4 = __Pyx_PyInt_From_npy_uint64(__pyx_v_iset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
6646       __Pyx_GOTREF(__pyx_t_4);
6647       __pyx_t_5 = __Pyx_PyInt_From_npy_uint64(__pyx_v_imax); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error)
6648       __Pyx_GOTREF(__pyx_t_5);
6649       __pyx_t_6 = NULL;
6650       __pyx_t_7 = 0;
6651       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6652         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
6653         if (likely(__pyx_t_6)) {
6654           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6655           __Pyx_INCREF(__pyx_t_6);
6656           __Pyx_INCREF(function);
6657           __Pyx_DECREF_SET(__pyx_t_3, function);
6658           __pyx_t_7 = 1;
6659         }
6660       }
6661       #if CYTHON_FAST_PYCALL
6662       if (PyFunction_Check(__pyx_t_3)) {
6663         PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
6664         __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
6665         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6666         __Pyx_GOTREF(__pyx_t_2);
6667         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6668         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6669       } else
6670       #endif
6671       #if CYTHON_FAST_PYCCALL
6672       if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6673         PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
6674         __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
6675         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6676         __Pyx_GOTREF(__pyx_t_2);
6677         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6678         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6679       } else
6680       #endif
6681       {
6682         __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 301, __pyx_L1_error)
6683         __Pyx_GOTREF(__pyx_t_8);
6684         if (__pyx_t_6) {
6685           __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
6686         }
6687         __Pyx_GIVEREF(__pyx_t_4);
6688         PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
6689         __Pyx_GIVEREF(__pyx_t_5);
6690         PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
6691         __pyx_t_4 = 0;
6692         __pyx_t_5 = 0;
6693         __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
6694         __Pyx_GOTREF(__pyx_t_2);
6695         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6696       }
6697       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6698       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
6699       __Pyx_GOTREF(__pyx_t_3);
6700       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6701       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6702       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6703       __PYX_ERR(0, 301, __pyx_L1_error)
6704 
6705       /* "yt/utilities/lib/ewah_bool_wrap.pyx":300
6706  *         while iter_set[0] != iter_end[0]:
6707  *             iset = dereference(iter_set[0])
6708  *             if iset >= imax:             # <<<<<<<<<<<<<<
6709  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
6710  *             arr[iset] = 1
6711  */
6712     }
6713 
6714     /* "yt/utilities/lib/ewah_bool_wrap.pyx":302
6715  *             if iset >= imax:
6716  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
6717  *             arr[iset] = 1             # <<<<<<<<<<<<<<
6718  *             preincrement(iter_set[0])
6719  *
6720  */
6721     __pyx_t_9 = __pyx_v_iset;
6722     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_arr.data + __pyx_t_9 * __pyx_v_arr.strides[0]) )) = 1;
6723 
6724     /* "yt/utilities/lib/ewah_bool_wrap.pyx":303
6725  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
6726  *             arr[iset] = 1
6727  *             preincrement(iter_set[0])             # <<<<<<<<<<<<<<
6728  *
6729  *     cdef bint _isref(self, np.uint32_t ifile, np.uint64_t i):
6730  */
6731     (void)((++(__pyx_v_iter_set[0])));
6732   }
6733 
6734   /* "yt/utilities/lib/ewah_bool_wrap.pyx":292
6735  *     @cython.cdivision(True)
6736  *     @cython.initializedcheck(False)
6737  *     cdef void _get_coarse_array(self, np.uint32_t ifile, np.uint64_t imax,             # <<<<<<<<<<<<<<
6738  *                                 np.uint8_t[:] arr) except *:
6739  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
6740  */
6741 
6742   /* function exit code */
6743   goto __pyx_L0;
6744   __pyx_L1_error:;
6745   __Pyx_XDECREF(__pyx_t_2);
6746   __Pyx_XDECREF(__pyx_t_3);
6747   __Pyx_XDECREF(__pyx_t_4);
6748   __Pyx_XDECREF(__pyx_t_5);
6749   __Pyx_XDECREF(__pyx_t_6);
6750   __Pyx_XDECREF(__pyx_t_8);
6751   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._get_coarse_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
6752   __pyx_L0:;
6753   __Pyx_RefNannyFinishContext();
6754 }
6755 
6756 /* "yt/utilities/lib/ewah_bool_wrap.pyx":305
6757  *             preincrement(iter_set[0])
6758  *
6759  *     cdef bint _isref(self, np.uint32_t ifile, np.uint64_t i):             # <<<<<<<<<<<<<<
6760  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6761  *         return ewah_refn[0].get(i)
6762  */
6763 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,__pyx_t_5numpy_uint64_t __pyx_v_i)6764 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, __pyx_t_5numpy_uint64_t __pyx_v_i) {
6765   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
6766   int __pyx_r;
6767   __Pyx_RefNannyDeclarations
6768   __Pyx_RefNannySetupContext("_isref", 0);
6769 
6770   /* "yt/utilities/lib/ewah_bool_wrap.pyx":306
6771  *
6772  *     cdef bint _isref(self, np.uint32_t ifile, np.uint64_t i):
6773  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
6774  *         return ewah_refn[0].get(i)
6775  *
6776  */
6777   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
6778 
6779   /* "yt/utilities/lib/ewah_bool_wrap.pyx":307
6780  *     cdef bint _isref(self, np.uint32_t ifile, np.uint64_t i):
6781  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6782  *         return ewah_refn[0].get(i)             # <<<<<<<<<<<<<<
6783  *
6784  *     def count_coarse(self, ifile):
6785  */
6786   __pyx_r = (__pyx_v_ewah_refn[0]).get(__pyx_v_i);
6787   goto __pyx_L0;
6788 
6789   /* "yt/utilities/lib/ewah_bool_wrap.pyx":305
6790  *             preincrement(iter_set[0])
6791  *
6792  *     cdef bint _isref(self, np.uint32_t ifile, np.uint64_t i):             # <<<<<<<<<<<<<<
6793  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
6794  *         return ewah_refn[0].get(i)
6795  */
6796 
6797   /* function exit code */
6798   __pyx_L0:;
6799   __Pyx_RefNannyFinishContext();
6800   return __pyx_r;
6801 }
6802 
6803 /* "yt/utilities/lib/ewah_bool_wrap.pyx":309
6804  *         return ewah_refn[0].get(i)
6805  *
6806  *     def count_coarse(self, ifile):             # <<<<<<<<<<<<<<
6807  *         return self._count_coarse(ifile)
6808  *
6809  */
6810 
6811 /* Python wrapper */
6812 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_5count_coarse(PyObject *__pyx_v_self, PyObject *__pyx_v_ifile); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_5count_coarse(PyObject * __pyx_v_self,PyObject * __pyx_v_ifile)6813 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_5count_coarse(PyObject *__pyx_v_self, PyObject *__pyx_v_ifile) {
6814   PyObject *__pyx_r = 0;
6815   __Pyx_RefNannyDeclarations
6816   __Pyx_RefNannySetupContext("count_coarse (wrapper)", 0);
6817   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_4count_coarse(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), ((PyObject *)__pyx_v_ifile));
6818 
6819   /* function exit code */
6820   __Pyx_RefNannyFinishContext();
6821   return __pyx_r;
6822 }
6823 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_4count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,PyObject * __pyx_v_ifile)6824 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_4count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile) {
6825   PyObject *__pyx_r = NULL;
6826   __Pyx_RefNannyDeclarations
6827   __pyx_t_5numpy_uint32_t __pyx_t_1;
6828   PyObject *__pyx_t_2 = NULL;
6829   __Pyx_RefNannySetupContext("count_coarse", 0);
6830 
6831   /* "yt/utilities/lib/ewah_bool_wrap.pyx":310
6832  *
6833  *     def count_coarse(self, ifile):
6834  *         return self._count_coarse(ifile)             # <<<<<<<<<<<<<<
6835  *
6836  *     def count_total(self, ifile):
6837  */
6838   __Pyx_XDECREF(__pyx_r);
6839   __pyx_t_1 = __Pyx_PyInt_As_npy_uint32(__pyx_v_ifile); if (unlikely((__pyx_t_1 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error)
6840   __pyx_t_2 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_coarse(__pyx_v_self, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
6841   __Pyx_GOTREF(__pyx_t_2);
6842   __pyx_r = __pyx_t_2;
6843   __pyx_t_2 = 0;
6844   goto __pyx_L0;
6845 
6846   /* "yt/utilities/lib/ewah_bool_wrap.pyx":309
6847  *         return ewah_refn[0].get(i)
6848  *
6849  *     def count_coarse(self, ifile):             # <<<<<<<<<<<<<<
6850  *         return self._count_coarse(ifile)
6851  *
6852  */
6853 
6854   /* function exit code */
6855   __pyx_L1_error:;
6856   __Pyx_XDECREF(__pyx_t_2);
6857   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.count_coarse", __pyx_clineno, __pyx_lineno, __pyx_filename);
6858   __pyx_r = NULL;
6859   __pyx_L0:;
6860   __Pyx_XGIVEREF(__pyx_r);
6861   __Pyx_RefNannyFinishContext();
6862   return __pyx_r;
6863 }
6864 
6865 /* "yt/utilities/lib/ewah_bool_wrap.pyx":312
6866  *         return self._count_coarse(ifile)
6867  *
6868  *     def count_total(self, ifile):             # <<<<<<<<<<<<<<
6869  *         return self._count_total(ifile)
6870  *
6871  */
6872 
6873 /* Python wrapper */
6874 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_7count_total(PyObject *__pyx_v_self, PyObject *__pyx_v_ifile); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_7count_total(PyObject * __pyx_v_self,PyObject * __pyx_v_ifile)6875 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_7count_total(PyObject *__pyx_v_self, PyObject *__pyx_v_ifile) {
6876   PyObject *__pyx_r = 0;
6877   __Pyx_RefNannyDeclarations
6878   __Pyx_RefNannySetupContext("count_total (wrapper)", 0);
6879   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_6count_total(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), ((PyObject *)__pyx_v_ifile));
6880 
6881   /* function exit code */
6882   __Pyx_RefNannyFinishContext();
6883   return __pyx_r;
6884 }
6885 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_6count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,PyObject * __pyx_v_ifile)6886 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_6count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile) {
6887   PyObject *__pyx_r = NULL;
6888   __Pyx_RefNannyDeclarations
6889   __pyx_t_5numpy_uint32_t __pyx_t_1;
6890   PyObject *__pyx_t_2 = NULL;
6891   __Pyx_RefNannySetupContext("count_total", 0);
6892 
6893   /* "yt/utilities/lib/ewah_bool_wrap.pyx":313
6894  *
6895  *     def count_total(self, ifile):
6896  *         return self._count_total(ifile)             # <<<<<<<<<<<<<<
6897  *
6898  *     def count_refined(self, ifile):
6899  */
6900   __Pyx_XDECREF(__pyx_r);
6901   __pyx_t_1 = __Pyx_PyInt_As_npy_uint32(__pyx_v_ifile); if (unlikely((__pyx_t_1 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 313, __pyx_L1_error)
6902   __pyx_t_2 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_total(__pyx_v_self, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
6903   __Pyx_GOTREF(__pyx_t_2);
6904   __pyx_r = __pyx_t_2;
6905   __pyx_t_2 = 0;
6906   goto __pyx_L0;
6907 
6908   /* "yt/utilities/lib/ewah_bool_wrap.pyx":312
6909  *         return self._count_coarse(ifile)
6910  *
6911  *     def count_total(self, ifile):             # <<<<<<<<<<<<<<
6912  *         return self._count_total(ifile)
6913  *
6914  */
6915 
6916   /* function exit code */
6917   __pyx_L1_error:;
6918   __Pyx_XDECREF(__pyx_t_2);
6919   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.count_total", __pyx_clineno, __pyx_lineno, __pyx_filename);
6920   __pyx_r = NULL;
6921   __pyx_L0:;
6922   __Pyx_XGIVEREF(__pyx_r);
6923   __Pyx_RefNannyFinishContext();
6924   return __pyx_r;
6925 }
6926 
6927 /* "yt/utilities/lib/ewah_bool_wrap.pyx":315
6928  *         return self._count_total(ifile)
6929  *
6930  *     def count_refined(self, ifile):             # <<<<<<<<<<<<<<
6931  *         return self._count_refined(ifile)
6932  *
6933  */
6934 
6935 /* Python wrapper */
6936 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_9count_refined(PyObject *__pyx_v_self, PyObject *__pyx_v_ifile); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_9count_refined(PyObject * __pyx_v_self,PyObject * __pyx_v_ifile)6937 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_9count_refined(PyObject *__pyx_v_self, PyObject *__pyx_v_ifile) {
6938   PyObject *__pyx_r = 0;
6939   __Pyx_RefNannyDeclarations
6940   __Pyx_RefNannySetupContext("count_refined (wrapper)", 0);
6941   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_8count_refined(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), ((PyObject *)__pyx_v_ifile));
6942 
6943   /* function exit code */
6944   __Pyx_RefNannyFinishContext();
6945   return __pyx_r;
6946 }
6947 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_8count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,PyObject * __pyx_v_ifile)6948 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_8count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile) {
6949   PyObject *__pyx_r = NULL;
6950   __Pyx_RefNannyDeclarations
6951   __pyx_t_5numpy_uint32_t __pyx_t_1;
6952   PyObject *__pyx_t_2 = NULL;
6953   __Pyx_RefNannySetupContext("count_refined", 0);
6954 
6955   /* "yt/utilities/lib/ewah_bool_wrap.pyx":316
6956  *
6957  *     def count_refined(self, ifile):
6958  *         return self._count_refined(ifile)             # <<<<<<<<<<<<<<
6959  *
6960  *     cdef np.uint64_t _count_coarse(self, np.uint32_t ifile):
6961  */
6962   __Pyx_XDECREF(__pyx_r);
6963   __pyx_t_1 = __Pyx_PyInt_As_npy_uint32(__pyx_v_ifile); if (unlikely((__pyx_t_1 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L1_error)
6964   __pyx_t_2 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_refined(__pyx_v_self, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
6965   __Pyx_GOTREF(__pyx_t_2);
6966   __pyx_r = __pyx_t_2;
6967   __pyx_t_2 = 0;
6968   goto __pyx_L0;
6969 
6970   /* "yt/utilities/lib/ewah_bool_wrap.pyx":315
6971  *         return self._count_total(ifile)
6972  *
6973  *     def count_refined(self, ifile):             # <<<<<<<<<<<<<<
6974  *         return self._count_refined(ifile)
6975  *
6976  */
6977 
6978   /* function exit code */
6979   __pyx_L1_error:;
6980   __Pyx_XDECREF(__pyx_t_2);
6981   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.count_refined", __pyx_clineno, __pyx_lineno, __pyx_filename);
6982   __pyx_r = NULL;
6983   __pyx_L0:;
6984   __Pyx_XGIVEREF(__pyx_r);
6985   __Pyx_RefNannyFinishContext();
6986   return __pyx_r;
6987 }
6988 
6989 /* "yt/utilities/lib/ewah_bool_wrap.pyx":318
6990  *         return self._count_refined(ifile)
6991  *
6992  *     cdef np.uint64_t _count_coarse(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
6993  *         return self._count_total(ifile) - self._count_refined(ifile)
6994  *
6995  */
6996 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile)6997 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile) {
6998   __pyx_t_5numpy_uint64_t __pyx_r;
6999   __Pyx_RefNannyDeclarations
7000   __Pyx_RefNannySetupContext("_count_coarse", 0);
7001 
7002   /* "yt/utilities/lib/ewah_bool_wrap.pyx":319
7003  *
7004  *     cdef np.uint64_t _count_coarse(self, np.uint32_t ifile):
7005  *         return self._count_total(ifile) - self._count_refined(ifile)             # <<<<<<<<<<<<<<
7006  *
7007  *     cdef np.uint64_t _count_total(self, np.uint32_t ifile):
7008  */
7009   __pyx_r = (((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_total(__pyx_v_self, __pyx_v_ifile) - ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_refined(__pyx_v_self, __pyx_v_ifile));
7010   goto __pyx_L0;
7011 
7012   /* "yt/utilities/lib/ewah_bool_wrap.pyx":318
7013  *         return self._count_refined(ifile)
7014  *
7015  *     cdef np.uint64_t _count_coarse(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
7016  *         return self._count_total(ifile) - self._count_refined(ifile)
7017  *
7018  */
7019 
7020   /* function exit code */
7021   __pyx_L0:;
7022   __Pyx_RefNannyFinishContext();
7023   return __pyx_r;
7024 }
7025 
7026 /* "yt/utilities/lib/ewah_bool_wrap.pyx":321
7027  *         return self._count_total(ifile) - self._count_refined(ifile)
7028  *
7029  *     cdef np.uint64_t _count_total(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
7030  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
7031  *         cdef np.uint64_t out = ewah_keys[0].numberOfOnes()
7032  */
7033 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile)7034 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile) {
7035   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
7036   __pyx_t_5numpy_uint64_t __pyx_v_out;
7037   __pyx_t_5numpy_uint64_t __pyx_r;
7038   __Pyx_RefNannyDeclarations
7039   __Pyx_RefNannySetupContext("_count_total", 0);
7040 
7041   /* "yt/utilities/lib/ewah_bool_wrap.pyx":322
7042  *
7043  *     cdef np.uint64_t _count_total(self, np.uint32_t ifile):
7044  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
7045  *         cdef np.uint64_t out = ewah_keys[0].numberOfOnes()
7046  *         return out
7047  */
7048   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
7049 
7050   /* "yt/utilities/lib/ewah_bool_wrap.pyx":323
7051  *     cdef np.uint64_t _count_total(self, np.uint32_t ifile):
7052  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
7053  *         cdef np.uint64_t out = ewah_keys[0].numberOfOnes()             # <<<<<<<<<<<<<<
7054  *         return out
7055  *
7056  */
7057   __pyx_v_out = (__pyx_v_ewah_keys[0]).numberOfOnes();
7058 
7059   /* "yt/utilities/lib/ewah_bool_wrap.pyx":324
7060  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
7061  *         cdef np.uint64_t out = ewah_keys[0].numberOfOnes()
7062  *         return out             # <<<<<<<<<<<<<<
7063  *
7064  *     cdef np.uint64_t _count_refined(self, np.uint32_t ifile):
7065  */
7066   __pyx_r = __pyx_v_out;
7067   goto __pyx_L0;
7068 
7069   /* "yt/utilities/lib/ewah_bool_wrap.pyx":321
7070  *         return self._count_total(ifile) - self._count_refined(ifile)
7071  *
7072  *     cdef np.uint64_t _count_total(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
7073  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
7074  *         cdef np.uint64_t out = ewah_keys[0].numberOfOnes()
7075  */
7076 
7077   /* function exit code */
7078   __pyx_L0:;
7079   __Pyx_RefNannyFinishContext();
7080   return __pyx_r;
7081 }
7082 
7083 /* "yt/utilities/lib/ewah_bool_wrap.pyx":326
7084  *         return out
7085  *
7086  *     cdef np.uint64_t _count_refined(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
7087  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
7088  *         cdef np.uint64_t out = ewah_refn[0].numberOfOnes()
7089  */
7090 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile)7091 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile) {
7092   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
7093   __pyx_t_5numpy_uint64_t __pyx_v_out;
7094   __pyx_t_5numpy_uint64_t __pyx_r;
7095   __Pyx_RefNannyDeclarations
7096   __Pyx_RefNannySetupContext("_count_refined", 0);
7097 
7098   /* "yt/utilities/lib/ewah_bool_wrap.pyx":327
7099  *
7100  *     cdef np.uint64_t _count_refined(self, np.uint32_t ifile):
7101  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
7102  *         cdef np.uint64_t out = ewah_refn[0].numberOfOnes()
7103  *         return out
7104  */
7105   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
7106 
7107   /* "yt/utilities/lib/ewah_bool_wrap.pyx":328
7108  *     cdef np.uint64_t _count_refined(self, np.uint32_t ifile):
7109  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
7110  *         cdef np.uint64_t out = ewah_refn[0].numberOfOnes()             # <<<<<<<<<<<<<<
7111  *         return out
7112  *
7113  */
7114   __pyx_v_out = (__pyx_v_ewah_refn[0]).numberOfOnes();
7115 
7116   /* "yt/utilities/lib/ewah_bool_wrap.pyx":329
7117  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
7118  *         cdef np.uint64_t out = ewah_refn[0].numberOfOnes()
7119  *         return out             # <<<<<<<<<<<<<<
7120  *
7121  *     def append(self, np.uint32_t ifile, BoolArrayCollection solf):
7122  */
7123   __pyx_r = __pyx_v_out;
7124   goto __pyx_L0;
7125 
7126   /* "yt/utilities/lib/ewah_bool_wrap.pyx":326
7127  *         return out
7128  *
7129  *     cdef np.uint64_t _count_refined(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
7130  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
7131  *         cdef np.uint64_t out = ewah_refn[0].numberOfOnes()
7132  */
7133 
7134   /* function exit code */
7135   __pyx_L0:;
7136   __Pyx_RefNannyFinishContext();
7137   return __pyx_r;
7138 }
7139 
7140 /* "yt/utilities/lib/ewah_bool_wrap.pyx":331
7141  *         return out
7142  *
7143  *     def append(self, np.uint32_t ifile, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
7144  *         if solf is None: return
7145  *         self._append(ifile, solf)
7146  */
7147 
7148 /* Python wrapper */
7149 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_11append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_11append(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)7150 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_11append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7151   __pyx_t_5numpy_uint32_t __pyx_v_ifile;
7152   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf = 0;
7153   PyObject *__pyx_r = 0;
7154   __Pyx_RefNannyDeclarations
7155   __Pyx_RefNannySetupContext("append (wrapper)", 0);
7156   {
7157     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifile,&__pyx_n_s_solf,0};
7158     PyObject* values[2] = {0,0};
7159     if (unlikely(__pyx_kwds)) {
7160       Py_ssize_t kw_args;
7161       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7162       switch (pos_args) {
7163         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7164         CYTHON_FALLTHROUGH;
7165         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7166         CYTHON_FALLTHROUGH;
7167         case  0: break;
7168         default: goto __pyx_L5_argtuple_error;
7169       }
7170       kw_args = PyDict_Size(__pyx_kwds);
7171       switch (pos_args) {
7172         case  0:
7173         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifile)) != 0)) kw_args--;
7174         else goto __pyx_L5_argtuple_error;
7175         CYTHON_FALLTHROUGH;
7176         case  1:
7177         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solf)) != 0)) kw_args--;
7178         else {
7179           __Pyx_RaiseArgtupleInvalid("append", 1, 2, 2, 1); __PYX_ERR(0, 331, __pyx_L3_error)
7180         }
7181       }
7182       if (unlikely(kw_args > 0)) {
7183         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "append") < 0)) __PYX_ERR(0, 331, __pyx_L3_error)
7184       }
7185     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
7186       goto __pyx_L5_argtuple_error;
7187     } else {
7188       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7189       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7190     }
7191     __pyx_v_ifile = __Pyx_PyInt_As_npy_uint32(values[0]); if (unlikely((__pyx_v_ifile == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 331, __pyx_L3_error)
7192     __pyx_v_solf = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)values[1]);
7193   }
7194   goto __pyx_L4_argument_unpacking_done;
7195   __pyx_L5_argtuple_error:;
7196   __Pyx_RaiseArgtupleInvalid("append", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 331, __pyx_L3_error)
7197   __pyx_L3_error:;
7198   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
7199   __Pyx_RefNannyFinishContext();
7200   return NULL;
7201   __pyx_L4_argument_unpacking_done:;
7202   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solf), __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection, 1, "solf", 0))) __PYX_ERR(0, 331, __pyx_L1_error)
7203   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_10append(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), __pyx_v_ifile, __pyx_v_solf);
7204 
7205   /* function exit code */
7206   goto __pyx_L0;
7207   __pyx_L1_error:;
7208   __pyx_r = NULL;
7209   __pyx_L0:;
7210   __Pyx_RefNannyFinishContext();
7211   return __pyx_r;
7212 }
7213 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_10append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf)7214 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_10append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf) {
7215   PyObject *__pyx_r = NULL;
7216   __Pyx_RefNannyDeclarations
7217   int __pyx_t_1;
7218   int __pyx_t_2;
7219   __Pyx_RefNannySetupContext("append", 0);
7220 
7221   /* "yt/utilities/lib/ewah_bool_wrap.pyx":332
7222  *
7223  *     def append(self, np.uint32_t ifile, BoolArrayCollection solf):
7224  *         if solf is None: return             # <<<<<<<<<<<<<<
7225  *         self._append(ifile, solf)
7226  *
7227  */
7228   __pyx_t_1 = (((PyObject *)__pyx_v_solf) == Py_None);
7229   __pyx_t_2 = (__pyx_t_1 != 0);
7230   if (__pyx_t_2) {
7231     __Pyx_XDECREF(__pyx_r);
7232     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7233     goto __pyx_L0;
7234   }
7235 
7236   /* "yt/utilities/lib/ewah_bool_wrap.pyx":333
7237  *     def append(self, np.uint32_t ifile, BoolArrayCollection solf):
7238  *         if solf is None: return
7239  *         self._append(ifile, solf)             # <<<<<<<<<<<<<<
7240  *
7241  *     cdef void _append(self, np.uint32_t ifile, BoolArrayCollection solf):
7242  */
7243   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_ifile, __pyx_v_solf);
7244 
7245   /* "yt/utilities/lib/ewah_bool_wrap.pyx":331
7246  *         return out
7247  *
7248  *     def append(self, np.uint32_t ifile, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
7249  *         if solf is None: return
7250  *         self._append(ifile, solf)
7251  */
7252 
7253   /* function exit code */
7254   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7255   __pyx_L0:;
7256   __Pyx_XGIVEREF(__pyx_r);
7257   __Pyx_RefNannyFinishContext();
7258   return __pyx_r;
7259 }
7260 
7261 /* "yt/utilities/lib/ewah_bool_wrap.pyx":335
7262  *         self._append(ifile, solf)
7263  *
7264  *     cdef void _append(self, np.uint32_t ifile, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
7265  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7266  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7267  */
7268 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf)7269 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf) {
7270   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
7271   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
7272   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll1;
7273   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
7274   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
7275   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
7276   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
7277   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
7278   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_swap;
7279   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
7280   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
7281   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
7282   __Pyx_RefNannyDeclarations
7283   int __pyx_t_1;
7284   __pyx_t_5numpy_uint64_t __pyx_t_2;
7285   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
7286   __Pyx_RefNannySetupContext("_append", 0);
7287 
7288   /* "yt/utilities/lib/ewah_bool_wrap.pyx":336
7289  *
7290  *     cdef void _append(self, np.uint32_t ifile, BoolArrayCollection solf):
7291  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
7292  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7293  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7294  */
7295   __pyx_v_ewah_keys1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
7296 
7297   /* "yt/utilities/lib/ewah_bool_wrap.pyx":337
7298  *     cdef void _append(self, np.uint32_t ifile, BoolArrayCollection solf):
7299  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7300  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
7301  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7302  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7303  */
7304   __pyx_v_ewah_refn1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
7305 
7306   /* "yt/utilities/lib/ewah_bool_wrap.pyx":338
7307  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7308  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7309  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
7310  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7311  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7312  */
7313   __pyx_v_ewah_coll1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
7314 
7315   /* "yt/utilities/lib/ewah_bool_wrap.pyx":339
7316  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7317  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7318  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
7319  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7320  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
7321  */
7322   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
7323 
7324   /* "yt/utilities/lib/ewah_bool_wrap.pyx":340
7325  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7326  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7327  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
7328  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
7329  *         cdef ewahmap_it it_map1, it_map2
7330  */
7331   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
7332 
7333   /* "yt/utilities/lib/ewah_bool_wrap.pyx":341
7334  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7335  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7336  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
7337  *         cdef ewahmap_it it_map1, it_map2
7338  *         cdef ewah_bool_array swap, mi1_ewah1, mi1_ewah2
7339  */
7340   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
7341 
7342   /* "yt/utilities/lib/ewah_bool_wrap.pyx":346
7343  *         cdef np.uint64_t mi1
7344  *         # Keys
7345  *         ewah_keys1[0].logicalor(ewah_keys2[0], swap)             # <<<<<<<<<<<<<<
7346  *         ewah_keys1[0].swap(swap)
7347  *         # Refined
7348  */
7349   (__pyx_v_ewah_keys1[0]).logicalor((__pyx_v_ewah_keys2[0]), __pyx_v_swap);
7350 
7351   /* "yt/utilities/lib/ewah_bool_wrap.pyx":347
7352  *         # Keys
7353  *         ewah_keys1[0].logicalor(ewah_keys2[0], swap)
7354  *         ewah_keys1[0].swap(swap)             # <<<<<<<<<<<<<<
7355  *         # Refined
7356  *         ewah_refn1[0].logicalor(ewah_refn2[0], swap)
7357  */
7358   (__pyx_v_ewah_keys1[0]).swap(__pyx_v_swap);
7359 
7360   /* "yt/utilities/lib/ewah_bool_wrap.pyx":349
7361  *         ewah_keys1[0].swap(swap)
7362  *         # Refined
7363  *         ewah_refn1[0].logicalor(ewah_refn2[0], swap)             # <<<<<<<<<<<<<<
7364  *         ewah_refn1[0].swap(swap)
7365  *         # Map
7366  */
7367   (__pyx_v_ewah_refn1[0]).logicalor((__pyx_v_ewah_refn2[0]), __pyx_v_swap);
7368 
7369   /* "yt/utilities/lib/ewah_bool_wrap.pyx":350
7370  *         # Refined
7371  *         ewah_refn1[0].logicalor(ewah_refn2[0], swap)
7372  *         ewah_refn1[0].swap(swap)             # <<<<<<<<<<<<<<
7373  *         # Map
7374  *         it_map2 = ewah_coll2[0].begin()
7375  */
7376   (__pyx_v_ewah_refn1[0]).swap(__pyx_v_swap);
7377 
7378   /* "yt/utilities/lib/ewah_bool_wrap.pyx":352
7379  *         ewah_refn1[0].swap(swap)
7380  *         # Map
7381  *         it_map2 = ewah_coll2[0].begin()             # <<<<<<<<<<<<<<
7382  *         while it_map2 != ewah_coll2[0].end():
7383  *             mi1 = dereference(it_map2).first
7384  */
7385   __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).begin();
7386 
7387   /* "yt/utilities/lib/ewah_bool_wrap.pyx":353
7388  *         # Map
7389  *         it_map2 = ewah_coll2[0].begin()
7390  *         while it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
7391  *             mi1 = dereference(it_map2).first
7392  *             mi1_ewah2 = dereference(it_map2).second
7393  */
7394   while (1) {
7395     __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
7396     if (!__pyx_t_1) break;
7397 
7398     /* "yt/utilities/lib/ewah_bool_wrap.pyx":354
7399  *         it_map2 = ewah_coll2[0].begin()
7400  *         while it_map2 != ewah_coll2[0].end():
7401  *             mi1 = dereference(it_map2).first             # <<<<<<<<<<<<<<
7402  *             mi1_ewah2 = dereference(it_map2).second
7403  *             it_map1 = ewah_coll1[0].find(mi1)
7404  */
7405     __pyx_t_2 = (*__pyx_v_it_map2).first;
7406     __pyx_v_mi1 = __pyx_t_2;
7407 
7408     /* "yt/utilities/lib/ewah_bool_wrap.pyx":355
7409  *         while it_map2 != ewah_coll2[0].end():
7410  *             mi1 = dereference(it_map2).first
7411  *             mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
7412  *             it_map1 = ewah_coll1[0].find(mi1)
7413  *             if it_map1 == ewah_coll1[0].end():
7414  */
7415     __pyx_t_3 = (*__pyx_v_it_map2).second;
7416     __pyx_v_mi1_ewah2 = __pyx_t_3;
7417 
7418     /* "yt/utilities/lib/ewah_bool_wrap.pyx":356
7419  *             mi1 = dereference(it_map2).first
7420  *             mi1_ewah2 = dereference(it_map2).second
7421  *             it_map1 = ewah_coll1[0].find(mi1)             # <<<<<<<<<<<<<<
7422  *             if it_map1 == ewah_coll1[0].end():
7423  *                 ewah_coll1[0][mi1] = mi1_ewah2
7424  */
7425     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).find(__pyx_v_mi1);
7426 
7427     /* "yt/utilities/lib/ewah_bool_wrap.pyx":357
7428  *             mi1_ewah2 = dereference(it_map2).second
7429  *             it_map1 = ewah_coll1[0].find(mi1)
7430  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
7431  *                 ewah_coll1[0][mi1] = mi1_ewah2
7432  *             else:
7433  */
7434     __pyx_t_1 = ((__pyx_v_it_map1 == (__pyx_v_ewah_coll1[0]).end()) != 0);
7435     if (__pyx_t_1) {
7436 
7437       /* "yt/utilities/lib/ewah_bool_wrap.pyx":358
7438  *             it_map1 = ewah_coll1[0].find(mi1)
7439  *             if it_map1 == ewah_coll1[0].end():
7440  *                 ewah_coll1[0][mi1] = mi1_ewah2             # <<<<<<<<<<<<<<
7441  *             else:
7442  *                 mi1_ewah1 = dereference(it_map1).second
7443  */
7444       ((__pyx_v_ewah_coll1[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah2;
7445 
7446       /* "yt/utilities/lib/ewah_bool_wrap.pyx":357
7447  *             mi1_ewah2 = dereference(it_map2).second
7448  *             it_map1 = ewah_coll1[0].find(mi1)
7449  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
7450  *                 ewah_coll1[0][mi1] = mi1_ewah2
7451  *             else:
7452  */
7453       goto __pyx_L5;
7454     }
7455 
7456     /* "yt/utilities/lib/ewah_bool_wrap.pyx":360
7457  *                 ewah_coll1[0][mi1] = mi1_ewah2
7458  *             else:
7459  *                 mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
7460  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
7461  *                 mi1_ewah1.swap(swap)
7462  */
7463     /*else*/ {
7464       __pyx_t_3 = (*__pyx_v_it_map1).second;
7465       __pyx_v_mi1_ewah1 = __pyx_t_3;
7466 
7467       /* "yt/utilities/lib/ewah_bool_wrap.pyx":361
7468  *             else:
7469  *                 mi1_ewah1 = dereference(it_map1).second
7470  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)             # <<<<<<<<<<<<<<
7471  *                 mi1_ewah1.swap(swap)
7472  *             preincrement(it_map2)
7473  */
7474       __pyx_v_mi1_ewah1.logicalor(__pyx_v_mi1_ewah2, __pyx_v_swap);
7475 
7476       /* "yt/utilities/lib/ewah_bool_wrap.pyx":362
7477  *                 mi1_ewah1 = dereference(it_map1).second
7478  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
7479  *                 mi1_ewah1.swap(swap)             # <<<<<<<<<<<<<<
7480  *             preincrement(it_map2)
7481  *
7482  */
7483       __pyx_v_mi1_ewah1.swap(__pyx_v_swap);
7484     }
7485     __pyx_L5:;
7486 
7487     /* "yt/utilities/lib/ewah_bool_wrap.pyx":363
7488  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
7489  *                 mi1_ewah1.swap(swap)
7490  *             preincrement(it_map2)             # <<<<<<<<<<<<<<
7491  *
7492  *     cdef bint _intersects(self, np.uint32_t ifile, BoolArrayCollection solf):
7493  */
7494     (void)((++__pyx_v_it_map2));
7495   }
7496 
7497   /* "yt/utilities/lib/ewah_bool_wrap.pyx":335
7498  *         self._append(ifile, solf)
7499  *
7500  *     cdef void _append(self, np.uint32_t ifile, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
7501  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7502  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7503  */
7504 
7505   /* function exit code */
7506   __Pyx_RefNannyFinishContext();
7507 }
7508 
7509 /* "yt/utilities/lib/ewah_bool_wrap.pyx":365
7510  *             preincrement(it_map2)
7511  *
7512  *     cdef bint _intersects(self, np.uint32_t ifile, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
7513  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7514  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7515  */
7516 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf)7517 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf) {
7518   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
7519   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
7520   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll1;
7521   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
7522   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
7523   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
7524   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
7525   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
7526   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
7527   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
7528   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
7529   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_coar1;
7530   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_coar2;
7531   int __pyx_r;
7532   __Pyx_RefNannyDeclarations
7533   int __pyx_t_1;
7534   __pyx_t_5numpy_uint64_t __pyx_t_2;
7535   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
7536   __Pyx_RefNannySetupContext("_intersects", 0);
7537 
7538   /* "yt/utilities/lib/ewah_bool_wrap.pyx":366
7539  *
7540  *     cdef bint _intersects(self, np.uint32_t ifile, BoolArrayCollection solf):
7541  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
7542  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7543  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7544  */
7545   __pyx_v_ewah_keys1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
7546 
7547   /* "yt/utilities/lib/ewah_bool_wrap.pyx":367
7548  *     cdef bint _intersects(self, np.uint32_t ifile, BoolArrayCollection solf):
7549  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7550  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
7551  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7552  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7553  */
7554   __pyx_v_ewah_refn1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
7555 
7556   /* "yt/utilities/lib/ewah_bool_wrap.pyx":368
7557  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7558  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7559  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
7560  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7561  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7562  */
7563   __pyx_v_ewah_coll1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
7564 
7565   /* "yt/utilities/lib/ewah_bool_wrap.pyx":369
7566  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7567  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7568  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
7569  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7570  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
7571  */
7572   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
7573 
7574   /* "yt/utilities/lib/ewah_bool_wrap.pyx":370
7575  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7576  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7577  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
7578  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
7579  *         cdef ewahmap_it it_map1, it_map2
7580  */
7581   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
7582 
7583   /* "yt/utilities/lib/ewah_bool_wrap.pyx":371
7584  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7585  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7586  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
7587  *         cdef ewahmap_it it_map1, it_map2
7588  *         cdef ewah_bool_array mi1_ewah1, mi1_ewah2
7589  */
7590   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
7591 
7592   /* "yt/utilities/lib/ewah_bool_wrap.pyx":377
7593  *         cdef ewah_bool_array ewah_coar1, ewah_coar2
7594  *         # No intersection
7595  *         if ewah_keys1[0].intersects(ewah_keys2[0]) == 0:             # <<<<<<<<<<<<<<
7596  *             return 0
7597  *         # Intersection at coarse level
7598  */
7599   __pyx_t_1 = (((__pyx_v_ewah_keys1[0]).intersects((__pyx_v_ewah_keys2[0])) == 0) != 0);
7600   if (__pyx_t_1) {
7601 
7602     /* "yt/utilities/lib/ewah_bool_wrap.pyx":378
7603  *         # No intersection
7604  *         if ewah_keys1[0].intersects(ewah_keys2[0]) == 0:
7605  *             return 0             # <<<<<<<<<<<<<<
7606  *         # Intersection at coarse level
7607  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)
7608  */
7609     __pyx_r = 0;
7610     goto __pyx_L0;
7611 
7612     /* "yt/utilities/lib/ewah_bool_wrap.pyx":377
7613  *         cdef ewah_bool_array ewah_coar1, ewah_coar2
7614  *         # No intersection
7615  *         if ewah_keys1[0].intersects(ewah_keys2[0]) == 0:             # <<<<<<<<<<<<<<
7616  *             return 0
7617  *         # Intersection at coarse level
7618  */
7619   }
7620 
7621   /* "yt/utilities/lib/ewah_bool_wrap.pyx":380
7622  *             return 0
7623  *         # Intersection at coarse level
7624  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)             # <<<<<<<<<<<<<<
7625  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)
7626  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
7627  */
7628   (__pyx_v_ewah_keys1[0]).logicalxor((__pyx_v_ewah_refn1[0]), __pyx_v_ewah_coar1);
7629 
7630   /* "yt/utilities/lib/ewah_bool_wrap.pyx":381
7631  *         # Intersection at coarse level
7632  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)
7633  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)             # <<<<<<<<<<<<<<
7634  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
7635  *             return 1
7636  */
7637   (__pyx_v_ewah_keys2[0]).logicalxor((__pyx_v_ewah_refn2[0]), __pyx_v_ewah_coar2);
7638 
7639   /* "yt/utilities/lib/ewah_bool_wrap.pyx":382
7640  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)
7641  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)
7642  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:             # <<<<<<<<<<<<<<
7643  *             return 1
7644  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:
7645  */
7646   __pyx_t_1 = ((__pyx_v_ewah_coar1.intersects((__pyx_v_ewah_keys2[0])) == 1) != 0);
7647   if (__pyx_t_1) {
7648 
7649     /* "yt/utilities/lib/ewah_bool_wrap.pyx":383
7650  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)
7651  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
7652  *             return 1             # <<<<<<<<<<<<<<
7653  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:
7654  *             return 1
7655  */
7656     __pyx_r = 1;
7657     goto __pyx_L0;
7658 
7659     /* "yt/utilities/lib/ewah_bool_wrap.pyx":382
7660  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)
7661  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)
7662  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:             # <<<<<<<<<<<<<<
7663  *             return 1
7664  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:
7665  */
7666   }
7667 
7668   /* "yt/utilities/lib/ewah_bool_wrap.pyx":384
7669  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
7670  *             return 1
7671  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:             # <<<<<<<<<<<<<<
7672  *             return 1
7673  *         # Intersection at refined level
7674  */
7675   __pyx_t_1 = ((__pyx_v_ewah_coar2.intersects((__pyx_v_ewah_keys1[0])) == 1) != 0);
7676   if (__pyx_t_1) {
7677 
7678     /* "yt/utilities/lib/ewah_bool_wrap.pyx":385
7679  *             return 1
7680  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:
7681  *             return 1             # <<<<<<<<<<<<<<
7682  *         # Intersection at refined level
7683  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:
7684  */
7685     __pyx_r = 1;
7686     goto __pyx_L0;
7687 
7688     /* "yt/utilities/lib/ewah_bool_wrap.pyx":384
7689  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
7690  *             return 1
7691  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:             # <<<<<<<<<<<<<<
7692  *             return 1
7693  *         # Intersection at refined level
7694  */
7695   }
7696 
7697   /* "yt/utilities/lib/ewah_bool_wrap.pyx":387
7698  *             return 1
7699  *         # Intersection at refined level
7700  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:             # <<<<<<<<<<<<<<
7701  *             it_map1 = ewah_coll1[0].begin()
7702  *             while (it_map1 != ewah_coll1[0].end()):
7703  */
7704   __pyx_t_1 = (((__pyx_v_ewah_refn1[0]).intersects((__pyx_v_ewah_refn2[0])) == 1) != 0);
7705   if (__pyx_t_1) {
7706 
7707     /* "yt/utilities/lib/ewah_bool_wrap.pyx":388
7708  *         # Intersection at refined level
7709  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:
7710  *             it_map1 = ewah_coll1[0].begin()             # <<<<<<<<<<<<<<
7711  *             while (it_map1 != ewah_coll1[0].end()):
7712  *                 mi1 = dereference(it_map1).first
7713  */
7714     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).begin();
7715 
7716     /* "yt/utilities/lib/ewah_bool_wrap.pyx":389
7717  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:
7718  *             it_map1 = ewah_coll1[0].begin()
7719  *             while (it_map1 != ewah_coll1[0].end()):             # <<<<<<<<<<<<<<
7720  *                 mi1 = dereference(it_map1).first
7721  *                 it_map2 = ewah_coll2[0].find(mi1)
7722  */
7723     while (1) {
7724       __pyx_t_1 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
7725       if (!__pyx_t_1) break;
7726 
7727       /* "yt/utilities/lib/ewah_bool_wrap.pyx":390
7728  *             it_map1 = ewah_coll1[0].begin()
7729  *             while (it_map1 != ewah_coll1[0].end()):
7730  *                 mi1 = dereference(it_map1).first             # <<<<<<<<<<<<<<
7731  *                 it_map2 = ewah_coll2[0].find(mi1)
7732  *                 if it_map2 != ewah_coll2[0].end():
7733  */
7734       __pyx_t_2 = (*__pyx_v_it_map1).first;
7735       __pyx_v_mi1 = __pyx_t_2;
7736 
7737       /* "yt/utilities/lib/ewah_bool_wrap.pyx":391
7738  *             while (it_map1 != ewah_coll1[0].end()):
7739  *                 mi1 = dereference(it_map1).first
7740  *                 it_map2 = ewah_coll2[0].find(mi1)             # <<<<<<<<<<<<<<
7741  *                 if it_map2 != ewah_coll2[0].end():
7742  *                     mi1_ewah1 = dereference(it_map1).second
7743  */
7744       __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).find(__pyx_v_mi1);
7745 
7746       /* "yt/utilities/lib/ewah_bool_wrap.pyx":392
7747  *                 mi1 = dereference(it_map1).first
7748  *                 it_map2 = ewah_coll2[0].find(mi1)
7749  *                 if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
7750  *                     mi1_ewah1 = dereference(it_map1).second
7751  *                     mi1_ewah2 = dereference(it_map2).second
7752  */
7753       __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
7754       if (__pyx_t_1) {
7755 
7756         /* "yt/utilities/lib/ewah_bool_wrap.pyx":393
7757  *                 it_map2 = ewah_coll2[0].find(mi1)
7758  *                 if it_map2 != ewah_coll2[0].end():
7759  *                     mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
7760  *                     mi1_ewah2 = dereference(it_map2).second
7761  *                     if mi1_ewah1.intersects(mi1_ewah2):
7762  */
7763         __pyx_t_3 = (*__pyx_v_it_map1).second;
7764         __pyx_v_mi1_ewah1 = __pyx_t_3;
7765 
7766         /* "yt/utilities/lib/ewah_bool_wrap.pyx":394
7767  *                 if it_map2 != ewah_coll2[0].end():
7768  *                     mi1_ewah1 = dereference(it_map1).second
7769  *                     mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
7770  *                     if mi1_ewah1.intersects(mi1_ewah2):
7771  *                         return 1
7772  */
7773         __pyx_t_3 = (*__pyx_v_it_map2).second;
7774         __pyx_v_mi1_ewah2 = __pyx_t_3;
7775 
7776         /* "yt/utilities/lib/ewah_bool_wrap.pyx":395
7777  *                     mi1_ewah1 = dereference(it_map1).second
7778  *                     mi1_ewah2 = dereference(it_map2).second
7779  *                     if mi1_ewah1.intersects(mi1_ewah2):             # <<<<<<<<<<<<<<
7780  *                         return 1
7781  *                 preincrement(it_map1)
7782  */
7783         __pyx_t_1 = (__pyx_v_mi1_ewah1.intersects(__pyx_v_mi1_ewah2) != 0);
7784         if (__pyx_t_1) {
7785 
7786           /* "yt/utilities/lib/ewah_bool_wrap.pyx":396
7787  *                     mi1_ewah2 = dereference(it_map2).second
7788  *                     if mi1_ewah1.intersects(mi1_ewah2):
7789  *                         return 1             # <<<<<<<<<<<<<<
7790  *                 preincrement(it_map1)
7791  *         return 0
7792  */
7793           __pyx_r = 1;
7794           goto __pyx_L0;
7795 
7796           /* "yt/utilities/lib/ewah_bool_wrap.pyx":395
7797  *                     mi1_ewah1 = dereference(it_map1).second
7798  *                     mi1_ewah2 = dereference(it_map2).second
7799  *                     if mi1_ewah1.intersects(mi1_ewah2):             # <<<<<<<<<<<<<<
7800  *                         return 1
7801  *                 preincrement(it_map1)
7802  */
7803         }
7804 
7805         /* "yt/utilities/lib/ewah_bool_wrap.pyx":392
7806  *                 mi1 = dereference(it_map1).first
7807  *                 it_map2 = ewah_coll2[0].find(mi1)
7808  *                 if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
7809  *                     mi1_ewah1 = dereference(it_map1).second
7810  *                     mi1_ewah2 = dereference(it_map2).second
7811  */
7812       }
7813 
7814       /* "yt/utilities/lib/ewah_bool_wrap.pyx":397
7815  *                     if mi1_ewah1.intersects(mi1_ewah2):
7816  *                         return 1
7817  *                 preincrement(it_map1)             # <<<<<<<<<<<<<<
7818  *         return 0
7819  *
7820  */
7821       (void)((++__pyx_v_it_map1));
7822     }
7823 
7824     /* "yt/utilities/lib/ewah_bool_wrap.pyx":387
7825  *             return 1
7826  *         # Intersection at refined level
7827  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:             # <<<<<<<<<<<<<<
7828  *             it_map1 = ewah_coll1[0].begin()
7829  *             while (it_map1 != ewah_coll1[0].end()):
7830  */
7831   }
7832 
7833   /* "yt/utilities/lib/ewah_bool_wrap.pyx":398
7834  *                         return 1
7835  *                 preincrement(it_map1)
7836  *         return 0             # <<<<<<<<<<<<<<
7837  *
7838  *     cdef void _logicalxor(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):
7839  */
7840   __pyx_r = 0;
7841   goto __pyx_L0;
7842 
7843   /* "yt/utilities/lib/ewah_bool_wrap.pyx":365
7844  *             preincrement(it_map2)
7845  *
7846  *     cdef bint _intersects(self, np.uint32_t ifile, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
7847  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7848  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7849  */
7850 
7851   /* function exit code */
7852   __pyx_L0:;
7853   __Pyx_RefNannyFinishContext();
7854   return __pyx_r;
7855 }
7856 
7857 /* "yt/utilities/lib/ewah_bool_wrap.pyx":400
7858  *         return 0
7859  *
7860  *     cdef void _logicalxor(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
7861  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7862  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7863  */
7864 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_out)7865 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out) {
7866   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
7867   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
7868   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll1;
7869   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
7870   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
7871   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
7872   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys_out;
7873   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn_out;
7874   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll_out;
7875   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
7876   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
7877   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
7878   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
7879   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_swap;
7880   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
7881   __Pyx_RefNannyDeclarations
7882   int __pyx_t_1;
7883   __pyx_t_5numpy_uint64_t __pyx_t_2;
7884   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
7885   __Pyx_RefNannySetupContext("_logicalxor", 0);
7886 
7887   /* "yt/utilities/lib/ewah_bool_wrap.pyx":401
7888  *
7889  *     cdef void _logicalxor(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):
7890  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
7891  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7892  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7893  */
7894   __pyx_v_ewah_keys1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
7895 
7896   /* "yt/utilities/lib/ewah_bool_wrap.pyx":402
7897  *     cdef void _logicalxor(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):
7898  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7899  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
7900  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7901  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7902  */
7903   __pyx_v_ewah_refn1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
7904 
7905   /* "yt/utilities/lib/ewah_bool_wrap.pyx":403
7906  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
7907  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7908  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
7909  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7910  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7911  */
7912   __pyx_v_ewah_coll1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
7913 
7914   /* "yt/utilities/lib/ewah_bool_wrap.pyx":404
7915  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
7916  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7917  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
7918  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7919  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
7920  */
7921   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
7922 
7923   /* "yt/utilities/lib/ewah_bool_wrap.pyx":405
7924  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
7925  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7926  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
7927  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
7928  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
7929  */
7930   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
7931 
7932   /* "yt/utilities/lib/ewah_bool_wrap.pyx":406
7933  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
7934  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7935  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
7936  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
7937  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
7938  */
7939   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
7940 
7941   /* "yt/utilities/lib/ewah_bool_wrap.pyx":407
7942  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
7943  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
7944  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys             # <<<<<<<<<<<<<<
7945  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
7946  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll
7947  */
7948   __pyx_v_ewah_keys_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_keys);
7949 
7950   /* "yt/utilities/lib/ewah_bool_wrap.pyx":408
7951  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
7952  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
7953  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn             # <<<<<<<<<<<<<<
7954  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll
7955  *         cdef ewahmap_it it_map1, it_map2
7956  */
7957   __pyx_v_ewah_refn_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_refn);
7958 
7959   /* "yt/utilities/lib/ewah_bool_wrap.pyx":409
7960  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
7961  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
7962  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll             # <<<<<<<<<<<<<<
7963  *         cdef ewahmap_it it_map1, it_map2
7964  *         cdef ewah_bool_array mi1_ewah1, mi1_ewah2, swap
7965  */
7966   __pyx_v_ewah_coll_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_out->ewah_coll);
7967 
7968   /* "yt/utilities/lib/ewah_bool_wrap.pyx":414
7969  *         cdef np.uint64_t mi1
7970  *         # Keys
7971  *         ewah_keys1[0].logicalxor(ewah_keys2[0],ewah_keys_out[0])             # <<<<<<<<<<<<<<
7972  *         # Refn
7973  *         ewah_refn1[0].logicalxor(ewah_refn2[0],ewah_refn_out[0])
7974  */
7975   (__pyx_v_ewah_keys1[0]).logicalxor((__pyx_v_ewah_keys2[0]), (__pyx_v_ewah_keys_out[0]));
7976 
7977   /* "yt/utilities/lib/ewah_bool_wrap.pyx":416
7978  *         ewah_keys1[0].logicalxor(ewah_keys2[0],ewah_keys_out[0])
7979  *         # Refn
7980  *         ewah_refn1[0].logicalxor(ewah_refn2[0],ewah_refn_out[0])             # <<<<<<<<<<<<<<
7981  *         # Coll
7982  *         it_map1 = ewah_coll1[0].begin()
7983  */
7984   (__pyx_v_ewah_refn1[0]).logicalxor((__pyx_v_ewah_refn2[0]), (__pyx_v_ewah_refn_out[0]));
7985 
7986   /* "yt/utilities/lib/ewah_bool_wrap.pyx":418
7987  *         ewah_refn1[0].logicalxor(ewah_refn2[0],ewah_refn_out[0])
7988  *         # Coll
7989  *         it_map1 = ewah_coll1[0].begin()             # <<<<<<<<<<<<<<
7990  *         while (it_map1 != ewah_coll1[0].end()):
7991  *             mi1 = dereference(it_map1).first
7992  */
7993   __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).begin();
7994 
7995   /* "yt/utilities/lib/ewah_bool_wrap.pyx":419
7996  *         # Coll
7997  *         it_map1 = ewah_coll1[0].begin()
7998  *         while (it_map1 != ewah_coll1[0].end()):             # <<<<<<<<<<<<<<
7999  *             mi1 = dereference(it_map1).first
8000  *             mi1_ewah1 = dereference(it_map1).second
8001  */
8002   while (1) {
8003     __pyx_t_1 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
8004     if (!__pyx_t_1) break;
8005 
8006     /* "yt/utilities/lib/ewah_bool_wrap.pyx":420
8007  *         it_map1 = ewah_coll1[0].begin()
8008  *         while (it_map1 != ewah_coll1[0].end()):
8009  *             mi1 = dereference(it_map1).first             # <<<<<<<<<<<<<<
8010  *             mi1_ewah1 = dereference(it_map1).second
8011  *             it_map2 = ewah_coll2[0].find(mi1)
8012  */
8013     __pyx_t_2 = (*__pyx_v_it_map1).first;
8014     __pyx_v_mi1 = __pyx_t_2;
8015 
8016     /* "yt/utilities/lib/ewah_bool_wrap.pyx":421
8017  *         while (it_map1 != ewah_coll1[0].end()):
8018  *             mi1 = dereference(it_map1).first
8019  *             mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
8020  *             it_map2 = ewah_coll2[0].find(mi1)
8021  *             if it_map2 == ewah_coll2[0].end():
8022  */
8023     __pyx_t_3 = (*__pyx_v_it_map1).second;
8024     __pyx_v_mi1_ewah1 = __pyx_t_3;
8025 
8026     /* "yt/utilities/lib/ewah_bool_wrap.pyx":422
8027  *             mi1 = dereference(it_map1).first
8028  *             mi1_ewah1 = dereference(it_map1).second
8029  *             it_map2 = ewah_coll2[0].find(mi1)             # <<<<<<<<<<<<<<
8030  *             if it_map2 == ewah_coll2[0].end():
8031  *                 ewah_coll_out[0][mi1] = mi1_ewah1
8032  */
8033     __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).find(__pyx_v_mi1);
8034 
8035     /* "yt/utilities/lib/ewah_bool_wrap.pyx":423
8036  *             mi1_ewah1 = dereference(it_map1).second
8037  *             it_map2 = ewah_coll2[0].find(mi1)
8038  *             if it_map2 == ewah_coll2[0].end():             # <<<<<<<<<<<<<<
8039  *                 ewah_coll_out[0][mi1] = mi1_ewah1
8040  *             else:
8041  */
8042     __pyx_t_1 = ((__pyx_v_it_map2 == (__pyx_v_ewah_coll2[0]).end()) != 0);
8043     if (__pyx_t_1) {
8044 
8045       /* "yt/utilities/lib/ewah_bool_wrap.pyx":424
8046  *             it_map2 = ewah_coll2[0].find(mi1)
8047  *             if it_map2 == ewah_coll2[0].end():
8048  *                 ewah_coll_out[0][mi1] = mi1_ewah1             # <<<<<<<<<<<<<<
8049  *             else:
8050  *                 mi1_ewah2 = dereference(it_map2).second
8051  */
8052       ((__pyx_v_ewah_coll_out[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah1;
8053 
8054       /* "yt/utilities/lib/ewah_bool_wrap.pyx":423
8055  *             mi1_ewah1 = dereference(it_map1).second
8056  *             it_map2 = ewah_coll2[0].find(mi1)
8057  *             if it_map2 == ewah_coll2[0].end():             # <<<<<<<<<<<<<<
8058  *                 ewah_coll_out[0][mi1] = mi1_ewah1
8059  *             else:
8060  */
8061       goto __pyx_L5;
8062     }
8063 
8064     /* "yt/utilities/lib/ewah_bool_wrap.pyx":426
8065  *                 ewah_coll_out[0][mi1] = mi1_ewah1
8066  *             else:
8067  *                 mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
8068  *                 mi1_ewah1.logicalxor(mi1_ewah2, swap)
8069  *                 ewah_coll_out[0][mi1] = swap
8070  */
8071     /*else*/ {
8072       __pyx_t_3 = (*__pyx_v_it_map2).second;
8073       __pyx_v_mi1_ewah2 = __pyx_t_3;
8074 
8075       /* "yt/utilities/lib/ewah_bool_wrap.pyx":427
8076  *             else:
8077  *                 mi1_ewah2 = dereference(it_map2).second
8078  *                 mi1_ewah1.logicalxor(mi1_ewah2, swap)             # <<<<<<<<<<<<<<
8079  *                 ewah_coll_out[0][mi1] = swap
8080  *             preincrement(it_map1)
8081  */
8082       __pyx_v_mi1_ewah1.logicalxor(__pyx_v_mi1_ewah2, __pyx_v_swap);
8083 
8084       /* "yt/utilities/lib/ewah_bool_wrap.pyx":428
8085  *                 mi1_ewah2 = dereference(it_map2).second
8086  *                 mi1_ewah1.logicalxor(mi1_ewah2, swap)
8087  *                 ewah_coll_out[0][mi1] = swap             # <<<<<<<<<<<<<<
8088  *             preincrement(it_map1)
8089  *         it_map2 = ewah_coll2[0].begin()
8090  */
8091       ((__pyx_v_ewah_coll_out[0])[__pyx_v_mi1]) = __pyx_v_swap;
8092     }
8093     __pyx_L5:;
8094 
8095     /* "yt/utilities/lib/ewah_bool_wrap.pyx":429
8096  *                 mi1_ewah1.logicalxor(mi1_ewah2, swap)
8097  *                 ewah_coll_out[0][mi1] = swap
8098  *             preincrement(it_map1)             # <<<<<<<<<<<<<<
8099  *         it_map2 = ewah_coll2[0].begin()
8100  *         while (it_map2 != ewah_coll2[0].end()):
8101  */
8102     (void)((++__pyx_v_it_map1));
8103   }
8104 
8105   /* "yt/utilities/lib/ewah_bool_wrap.pyx":430
8106  *                 ewah_coll_out[0][mi1] = swap
8107  *             preincrement(it_map1)
8108  *         it_map2 = ewah_coll2[0].begin()             # <<<<<<<<<<<<<<
8109  *         while (it_map2 != ewah_coll2[0].end()):
8110  *             mi1 = dereference(it_map2).first
8111  */
8112   __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).begin();
8113 
8114   /* "yt/utilities/lib/ewah_bool_wrap.pyx":431
8115  *             preincrement(it_map1)
8116  *         it_map2 = ewah_coll2[0].begin()
8117  *         while (it_map2 != ewah_coll2[0].end()):             # <<<<<<<<<<<<<<
8118  *             mi1 = dereference(it_map2).first
8119  *             mi1_ewah2 = dereference(it_map2).second
8120  */
8121   while (1) {
8122     __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
8123     if (!__pyx_t_1) break;
8124 
8125     /* "yt/utilities/lib/ewah_bool_wrap.pyx":432
8126  *         it_map2 = ewah_coll2[0].begin()
8127  *         while (it_map2 != ewah_coll2[0].end()):
8128  *             mi1 = dereference(it_map2).first             # <<<<<<<<<<<<<<
8129  *             mi1_ewah2 = dereference(it_map2).second
8130  *             it_map1 = ewah_coll1[0].find(mi1)
8131  */
8132     __pyx_t_2 = (*__pyx_v_it_map2).first;
8133     __pyx_v_mi1 = __pyx_t_2;
8134 
8135     /* "yt/utilities/lib/ewah_bool_wrap.pyx":433
8136  *         while (it_map2 != ewah_coll2[0].end()):
8137  *             mi1 = dereference(it_map2).first
8138  *             mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
8139  *             it_map1 = ewah_coll1[0].find(mi1)
8140  *             if it_map1 == ewah_coll1[0].end():
8141  */
8142     __pyx_t_3 = (*__pyx_v_it_map2).second;
8143     __pyx_v_mi1_ewah2 = __pyx_t_3;
8144 
8145     /* "yt/utilities/lib/ewah_bool_wrap.pyx":434
8146  *             mi1 = dereference(it_map2).first
8147  *             mi1_ewah2 = dereference(it_map2).second
8148  *             it_map1 = ewah_coll1[0].find(mi1)             # <<<<<<<<<<<<<<
8149  *             if it_map1 == ewah_coll1[0].end():
8150  *                 ewah_coll_out[0][mi1] = mi1_ewah2
8151  */
8152     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).find(__pyx_v_mi1);
8153 
8154     /* "yt/utilities/lib/ewah_bool_wrap.pyx":435
8155  *             mi1_ewah2 = dereference(it_map2).second
8156  *             it_map1 = ewah_coll1[0].find(mi1)
8157  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
8158  *                 ewah_coll_out[0][mi1] = mi1_ewah2
8159  *             preincrement(it_map2)
8160  */
8161     __pyx_t_1 = ((__pyx_v_it_map1 == (__pyx_v_ewah_coll1[0]).end()) != 0);
8162     if (__pyx_t_1) {
8163 
8164       /* "yt/utilities/lib/ewah_bool_wrap.pyx":436
8165  *             it_map1 = ewah_coll1[0].find(mi1)
8166  *             if it_map1 == ewah_coll1[0].end():
8167  *                 ewah_coll_out[0][mi1] = mi1_ewah2             # <<<<<<<<<<<<<<
8168  *             preincrement(it_map2)
8169  *
8170  */
8171       ((__pyx_v_ewah_coll_out[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah2;
8172 
8173       /* "yt/utilities/lib/ewah_bool_wrap.pyx":435
8174  *             mi1_ewah2 = dereference(it_map2).second
8175  *             it_map1 = ewah_coll1[0].find(mi1)
8176  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
8177  *                 ewah_coll_out[0][mi1] = mi1_ewah2
8178  *             preincrement(it_map2)
8179  */
8180     }
8181 
8182     /* "yt/utilities/lib/ewah_bool_wrap.pyx":437
8183  *             if it_map1 == ewah_coll1[0].end():
8184  *                 ewah_coll_out[0][mi1] = mi1_ewah2
8185  *             preincrement(it_map2)             # <<<<<<<<<<<<<<
8186  *
8187  *     def logicalxor(self, ifile, solf, out):
8188  */
8189     (void)((++__pyx_v_it_map2));
8190   }
8191 
8192   /* "yt/utilities/lib/ewah_bool_wrap.pyx":400
8193  *         return 0
8194  *
8195  *     cdef void _logicalxor(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
8196  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
8197  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
8198  */
8199 
8200   /* function exit code */
8201   __Pyx_RefNannyFinishContext();
8202 }
8203 
8204 /* "yt/utilities/lib/ewah_bool_wrap.pyx":439
8205  *             preincrement(it_map2)
8206  *
8207  *     def logicalxor(self, ifile, solf, out):             # <<<<<<<<<<<<<<
8208  *         return self._logicalxor(ifile, solf, out)
8209  *
8210  */
8211 
8212 /* Python wrapper */
8213 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_13logicalxor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_13logicalxor(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)8214 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_13logicalxor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8215   PyObject *__pyx_v_ifile = 0;
8216   PyObject *__pyx_v_solf = 0;
8217   PyObject *__pyx_v_out = 0;
8218   PyObject *__pyx_r = 0;
8219   __Pyx_RefNannyDeclarations
8220   __Pyx_RefNannySetupContext("logicalxor (wrapper)", 0);
8221   {
8222     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifile,&__pyx_n_s_solf,&__pyx_n_s_out,0};
8223     PyObject* values[3] = {0,0,0};
8224     if (unlikely(__pyx_kwds)) {
8225       Py_ssize_t kw_args;
8226       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8227       switch (pos_args) {
8228         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8229         CYTHON_FALLTHROUGH;
8230         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8231         CYTHON_FALLTHROUGH;
8232         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8233         CYTHON_FALLTHROUGH;
8234         case  0: break;
8235         default: goto __pyx_L5_argtuple_error;
8236       }
8237       kw_args = PyDict_Size(__pyx_kwds);
8238       switch (pos_args) {
8239         case  0:
8240         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifile)) != 0)) kw_args--;
8241         else goto __pyx_L5_argtuple_error;
8242         CYTHON_FALLTHROUGH;
8243         case  1:
8244         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solf)) != 0)) kw_args--;
8245         else {
8246           __Pyx_RaiseArgtupleInvalid("logicalxor", 1, 3, 3, 1); __PYX_ERR(0, 439, __pyx_L3_error)
8247         }
8248         CYTHON_FALLTHROUGH;
8249         case  2:
8250         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
8251         else {
8252           __Pyx_RaiseArgtupleInvalid("logicalxor", 1, 3, 3, 2); __PYX_ERR(0, 439, __pyx_L3_error)
8253         }
8254       }
8255       if (unlikely(kw_args > 0)) {
8256         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "logicalxor") < 0)) __PYX_ERR(0, 439, __pyx_L3_error)
8257       }
8258     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
8259       goto __pyx_L5_argtuple_error;
8260     } else {
8261       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8262       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8263       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8264     }
8265     __pyx_v_ifile = values[0];
8266     __pyx_v_solf = values[1];
8267     __pyx_v_out = values[2];
8268   }
8269   goto __pyx_L4_argument_unpacking_done;
8270   __pyx_L5_argtuple_error:;
8271   __Pyx_RaiseArgtupleInvalid("logicalxor", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 439, __pyx_L3_error)
8272   __pyx_L3_error:;
8273   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.logicalxor", __pyx_clineno, __pyx_lineno, __pyx_filename);
8274   __Pyx_RefNannyFinishContext();
8275   return NULL;
8276   __pyx_L4_argument_unpacking_done:;
8277   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_12logicalxor(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), __pyx_v_ifile, __pyx_v_solf, __pyx_v_out);
8278 
8279   /* function exit code */
8280   __Pyx_RefNannyFinishContext();
8281   return __pyx_r;
8282 }
8283 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_12logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,PyObject * __pyx_v_ifile,PyObject * __pyx_v_solf,PyObject * __pyx_v_out)8284 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_12logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile, PyObject *__pyx_v_solf, PyObject *__pyx_v_out) {
8285   PyObject *__pyx_r = NULL;
8286   __Pyx_RefNannyDeclarations
8287   __pyx_t_5numpy_uint32_t __pyx_t_1;
8288   PyObject *__pyx_t_2 = NULL;
8289   __Pyx_RefNannySetupContext("logicalxor", 0);
8290 
8291   /* "yt/utilities/lib/ewah_bool_wrap.pyx":440
8292  *
8293  *     def logicalxor(self, ifile, solf, out):
8294  *         return self._logicalxor(ifile, solf, out)             # <<<<<<<<<<<<<<
8295  *
8296  *     cdef void _logicaland(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):
8297  */
8298   __Pyx_XDECREF(__pyx_r);
8299   __pyx_t_1 = __Pyx_PyInt_As_npy_uint32(__pyx_v_ifile); if (unlikely((__pyx_t_1 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L1_error)
8300   if (!(likely(((__pyx_v_solf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_solf, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 440, __pyx_L1_error)
8301   if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 440, __pyx_L1_error)
8302   __pyx_t_2 = __Pyx_void_to_None(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_logicalxor(__pyx_v_self, __pyx_t_1, ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_solf), ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_out))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error)
8303   __Pyx_GOTREF(__pyx_t_2);
8304   __pyx_r = __pyx_t_2;
8305   __pyx_t_2 = 0;
8306   goto __pyx_L0;
8307 
8308   /* "yt/utilities/lib/ewah_bool_wrap.pyx":439
8309  *             preincrement(it_map2)
8310  *
8311  *     def logicalxor(self, ifile, solf, out):             # <<<<<<<<<<<<<<
8312  *         return self._logicalxor(ifile, solf, out)
8313  *
8314  */
8315 
8316   /* function exit code */
8317   __pyx_L1_error:;
8318   __Pyx_XDECREF(__pyx_t_2);
8319   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.logicalxor", __pyx_clineno, __pyx_lineno, __pyx_filename);
8320   __pyx_r = NULL;
8321   __pyx_L0:;
8322   __Pyx_XGIVEREF(__pyx_r);
8323   __Pyx_RefNannyFinishContext();
8324   return __pyx_r;
8325 }
8326 
8327 /* "yt/utilities/lib/ewah_bool_wrap.pyx":442
8328  *         return self._logicalxor(ifile, solf, out)
8329  *
8330  *     cdef void _logicaland(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
8331  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
8332  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
8333  */
8334 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_out)8335 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out) {
8336   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
8337   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
8338   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll1;
8339   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
8340   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
8341   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
8342   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys_out;
8343   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn_out;
8344   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll_out;
8345   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
8346   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
8347   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
8348   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
8349   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_swap;
8350   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
8351   __Pyx_RefNannyDeclarations
8352   int __pyx_t_1;
8353   __pyx_t_5numpy_uint64_t __pyx_t_2;
8354   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
8355   __Pyx_RefNannySetupContext("_logicaland", 0);
8356 
8357   /* "yt/utilities/lib/ewah_bool_wrap.pyx":443
8358  *
8359  *     cdef void _logicaland(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):
8360  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
8361  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
8362  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
8363  */
8364   __pyx_v_ewah_keys1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
8365 
8366   /* "yt/utilities/lib/ewah_bool_wrap.pyx":444
8367  *     cdef void _logicaland(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):
8368  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
8369  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
8370  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
8371  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
8372  */
8373   __pyx_v_ewah_refn1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
8374 
8375   /* "yt/utilities/lib/ewah_bool_wrap.pyx":445
8376  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
8377  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
8378  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
8379  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
8380  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
8381  */
8382   __pyx_v_ewah_coll1 = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
8383 
8384   /* "yt/utilities/lib/ewah_bool_wrap.pyx":446
8385  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
8386  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
8387  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
8388  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
8389  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
8390  */
8391   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
8392 
8393   /* "yt/utilities/lib/ewah_bool_wrap.pyx":447
8394  *         cdef ewah_map *ewah_coll1 = (<ewah_map **> self.ewah_coll)[ifile]
8395  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
8396  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
8397  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
8398  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
8399  */
8400   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
8401 
8402   /* "yt/utilities/lib/ewah_bool_wrap.pyx":448
8403  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
8404  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
8405  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
8406  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
8407  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
8408  */
8409   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
8410 
8411   /* "yt/utilities/lib/ewah_bool_wrap.pyx":449
8412  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
8413  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
8414  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys             # <<<<<<<<<<<<<<
8415  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
8416  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll
8417  */
8418   __pyx_v_ewah_keys_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_keys);
8419 
8420   /* "yt/utilities/lib/ewah_bool_wrap.pyx":450
8421  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
8422  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
8423  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn             # <<<<<<<<<<<<<<
8424  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll
8425  *         cdef ewahmap_it it_map1, it_map2
8426  */
8427   __pyx_v_ewah_refn_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_refn);
8428 
8429   /* "yt/utilities/lib/ewah_bool_wrap.pyx":451
8430  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
8431  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
8432  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll             # <<<<<<<<<<<<<<
8433  *         cdef ewahmap_it it_map1, it_map2
8434  *         cdef ewah_bool_array mi1_ewah1, mi1_ewah2, swap
8435  */
8436   __pyx_v_ewah_coll_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_out->ewah_coll);
8437 
8438   /* "yt/utilities/lib/ewah_bool_wrap.pyx":456
8439  *         cdef np.uint64_t mi1
8440  *         # Keys
8441  *         ewah_keys1[0].logicaland(ewah_keys2[0],ewah_keys_out[0])             # <<<<<<<<<<<<<<
8442  *         # Refn
8443  *         ewah_refn1[0].logicaland(ewah_refn2[0],ewah_refn_out[0])
8444  */
8445   (__pyx_v_ewah_keys1[0]).logicaland((__pyx_v_ewah_keys2[0]), (__pyx_v_ewah_keys_out[0]));
8446 
8447   /* "yt/utilities/lib/ewah_bool_wrap.pyx":458
8448  *         ewah_keys1[0].logicaland(ewah_keys2[0],ewah_keys_out[0])
8449  *         # Refn
8450  *         ewah_refn1[0].logicaland(ewah_refn2[0],ewah_refn_out[0])             # <<<<<<<<<<<<<<
8451  *         # Coll
8452  *         if ewah_refn_out[0].numberOfOnes() > 0:
8453  */
8454   (__pyx_v_ewah_refn1[0]).logicaland((__pyx_v_ewah_refn2[0]), (__pyx_v_ewah_refn_out[0]));
8455 
8456   /* "yt/utilities/lib/ewah_bool_wrap.pyx":460
8457  *         ewah_refn1[0].logicaland(ewah_refn2[0],ewah_refn_out[0])
8458  *         # Coll
8459  *         if ewah_refn_out[0].numberOfOnes() > 0:             # <<<<<<<<<<<<<<
8460  *             it_map1 = ewah_coll1[0].begin()
8461  *             while (it_map1 != ewah_coll1[0].end()):
8462  */
8463   __pyx_t_1 = (((__pyx_v_ewah_refn_out[0]).numberOfOnes() > 0) != 0);
8464   if (__pyx_t_1) {
8465 
8466     /* "yt/utilities/lib/ewah_bool_wrap.pyx":461
8467  *         # Coll
8468  *         if ewah_refn_out[0].numberOfOnes() > 0:
8469  *             it_map1 = ewah_coll1[0].begin()             # <<<<<<<<<<<<<<
8470  *             while (it_map1 != ewah_coll1[0].end()):
8471  *                 mi1 = dereference(it_map1).first
8472  */
8473     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).begin();
8474 
8475     /* "yt/utilities/lib/ewah_bool_wrap.pyx":462
8476  *         if ewah_refn_out[0].numberOfOnes() > 0:
8477  *             it_map1 = ewah_coll1[0].begin()
8478  *             while (it_map1 != ewah_coll1[0].end()):             # <<<<<<<<<<<<<<
8479  *                 mi1 = dereference(it_map1).first
8480  *                 it_map2 = ewah_coll2[0].find(mi1)
8481  */
8482     while (1) {
8483       __pyx_t_1 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
8484       if (!__pyx_t_1) break;
8485 
8486       /* "yt/utilities/lib/ewah_bool_wrap.pyx":463
8487  *             it_map1 = ewah_coll1[0].begin()
8488  *             while (it_map1 != ewah_coll1[0].end()):
8489  *                 mi1 = dereference(it_map1).first             # <<<<<<<<<<<<<<
8490  *                 it_map2 = ewah_coll2[0].find(mi1)
8491  *                 if it_map2 != ewah_coll2[0].end():
8492  */
8493       __pyx_t_2 = (*__pyx_v_it_map1).first;
8494       __pyx_v_mi1 = __pyx_t_2;
8495 
8496       /* "yt/utilities/lib/ewah_bool_wrap.pyx":464
8497  *             while (it_map1 != ewah_coll1[0].end()):
8498  *                 mi1 = dereference(it_map1).first
8499  *                 it_map2 = ewah_coll2[0].find(mi1)             # <<<<<<<<<<<<<<
8500  *                 if it_map2 != ewah_coll2[0].end():
8501  *                     mi1_ewah1 = dereference(it_map1).second
8502  */
8503       __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).find(__pyx_v_mi1);
8504 
8505       /* "yt/utilities/lib/ewah_bool_wrap.pyx":465
8506  *                 mi1 = dereference(it_map1).first
8507  *                 it_map2 = ewah_coll2[0].find(mi1)
8508  *                 if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
8509  *                     mi1_ewah1 = dereference(it_map1).second
8510  *                     mi1_ewah2 = dereference(it_map2).second
8511  */
8512       __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
8513       if (__pyx_t_1) {
8514 
8515         /* "yt/utilities/lib/ewah_bool_wrap.pyx":466
8516  *                 it_map2 = ewah_coll2[0].find(mi1)
8517  *                 if it_map2 != ewah_coll2[0].end():
8518  *                     mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
8519  *                     mi1_ewah2 = dereference(it_map2).second
8520  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
8521  */
8522         __pyx_t_3 = (*__pyx_v_it_map1).second;
8523         __pyx_v_mi1_ewah1 = __pyx_t_3;
8524 
8525         /* "yt/utilities/lib/ewah_bool_wrap.pyx":467
8526  *                 if it_map2 != ewah_coll2[0].end():
8527  *                     mi1_ewah1 = dereference(it_map1).second
8528  *                     mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
8529  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
8530  *                     ewah_coll_out[0][mi1] = swap
8531  */
8532         __pyx_t_3 = (*__pyx_v_it_map2).second;
8533         __pyx_v_mi1_ewah2 = __pyx_t_3;
8534 
8535         /* "yt/utilities/lib/ewah_bool_wrap.pyx":468
8536  *                     mi1_ewah1 = dereference(it_map1).second
8537  *                     mi1_ewah2 = dereference(it_map2).second
8538  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)             # <<<<<<<<<<<<<<
8539  *                     ewah_coll_out[0][mi1] = swap
8540  *                 preincrement(it_map1)
8541  */
8542         __pyx_v_mi1_ewah1.logicaland(__pyx_v_mi1_ewah2, __pyx_v_swap);
8543 
8544         /* "yt/utilities/lib/ewah_bool_wrap.pyx":469
8545  *                     mi1_ewah2 = dereference(it_map2).second
8546  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
8547  *                     ewah_coll_out[0][mi1] = swap             # <<<<<<<<<<<<<<
8548  *                 preincrement(it_map1)
8549  *
8550  */
8551         ((__pyx_v_ewah_coll_out[0])[__pyx_v_mi1]) = __pyx_v_swap;
8552 
8553         /* "yt/utilities/lib/ewah_bool_wrap.pyx":465
8554  *                 mi1 = dereference(it_map1).first
8555  *                 it_map2 = ewah_coll2[0].find(mi1)
8556  *                 if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
8557  *                     mi1_ewah1 = dereference(it_map1).second
8558  *                     mi1_ewah2 = dereference(it_map2).second
8559  */
8560       }
8561 
8562       /* "yt/utilities/lib/ewah_bool_wrap.pyx":470
8563  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
8564  *                     ewah_coll_out[0][mi1] = swap
8565  *                 preincrement(it_map1)             # <<<<<<<<<<<<<<
8566  *
8567  *     def logicaland(self, ifile, solf, out):
8568  */
8569       (void)((++__pyx_v_it_map1));
8570     }
8571 
8572     /* "yt/utilities/lib/ewah_bool_wrap.pyx":460
8573  *         ewah_refn1[0].logicaland(ewah_refn2[0],ewah_refn_out[0])
8574  *         # Coll
8575  *         if ewah_refn_out[0].numberOfOnes() > 0:             # <<<<<<<<<<<<<<
8576  *             it_map1 = ewah_coll1[0].begin()
8577  *             while (it_map1 != ewah_coll1[0].end()):
8578  */
8579   }
8580 
8581   /* "yt/utilities/lib/ewah_bool_wrap.pyx":442
8582  *         return self._logicalxor(ifile, solf, out)
8583  *
8584  *     cdef void _logicaland(self, np.uint32_t ifile, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
8585  *         cdef ewah_bool_array *ewah_keys1 = (<ewah_bool_array **> self.ewah_keys)[ifile]
8586  *         cdef ewah_bool_array *ewah_refn1 = (<ewah_bool_array **> self.ewah_refn)[ifile]
8587  */
8588 
8589   /* function exit code */
8590   __Pyx_RefNannyFinishContext();
8591 }
8592 
8593 /* "yt/utilities/lib/ewah_bool_wrap.pyx":472
8594  *                 preincrement(it_map1)
8595  *
8596  *     def logicaland(self, ifile, solf, out):             # <<<<<<<<<<<<<<
8597  *         return self._logicaland(ifile, solf, out)
8598  *
8599  */
8600 
8601 /* Python wrapper */
8602 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_15logicaland(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_15logicaland(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)8603 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_15logicaland(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8604   PyObject *__pyx_v_ifile = 0;
8605   PyObject *__pyx_v_solf = 0;
8606   PyObject *__pyx_v_out = 0;
8607   PyObject *__pyx_r = 0;
8608   __Pyx_RefNannyDeclarations
8609   __Pyx_RefNannySetupContext("logicaland (wrapper)", 0);
8610   {
8611     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifile,&__pyx_n_s_solf,&__pyx_n_s_out,0};
8612     PyObject* values[3] = {0,0,0};
8613     if (unlikely(__pyx_kwds)) {
8614       Py_ssize_t kw_args;
8615       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8616       switch (pos_args) {
8617         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8618         CYTHON_FALLTHROUGH;
8619         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8620         CYTHON_FALLTHROUGH;
8621         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8622         CYTHON_FALLTHROUGH;
8623         case  0: break;
8624         default: goto __pyx_L5_argtuple_error;
8625       }
8626       kw_args = PyDict_Size(__pyx_kwds);
8627       switch (pos_args) {
8628         case  0:
8629         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifile)) != 0)) kw_args--;
8630         else goto __pyx_L5_argtuple_error;
8631         CYTHON_FALLTHROUGH;
8632         case  1:
8633         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solf)) != 0)) kw_args--;
8634         else {
8635           __Pyx_RaiseArgtupleInvalid("logicaland", 1, 3, 3, 1); __PYX_ERR(0, 472, __pyx_L3_error)
8636         }
8637         CYTHON_FALLTHROUGH;
8638         case  2:
8639         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
8640         else {
8641           __Pyx_RaiseArgtupleInvalid("logicaland", 1, 3, 3, 2); __PYX_ERR(0, 472, __pyx_L3_error)
8642         }
8643       }
8644       if (unlikely(kw_args > 0)) {
8645         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "logicaland") < 0)) __PYX_ERR(0, 472, __pyx_L3_error)
8646       }
8647     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
8648       goto __pyx_L5_argtuple_error;
8649     } else {
8650       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8651       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8652       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8653     }
8654     __pyx_v_ifile = values[0];
8655     __pyx_v_solf = values[1];
8656     __pyx_v_out = values[2];
8657   }
8658   goto __pyx_L4_argument_unpacking_done;
8659   __pyx_L5_argtuple_error:;
8660   __Pyx_RaiseArgtupleInvalid("logicaland", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 472, __pyx_L3_error)
8661   __pyx_L3_error:;
8662   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.logicaland", __pyx_clineno, __pyx_lineno, __pyx_filename);
8663   __Pyx_RefNannyFinishContext();
8664   return NULL;
8665   __pyx_L4_argument_unpacking_done:;
8666   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_14logicaland(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), __pyx_v_ifile, __pyx_v_solf, __pyx_v_out);
8667 
8668   /* function exit code */
8669   __Pyx_RefNannyFinishContext();
8670   return __pyx_r;
8671 }
8672 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_14logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,PyObject * __pyx_v_ifile,PyObject * __pyx_v_solf,PyObject * __pyx_v_out)8673 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_14logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile, PyObject *__pyx_v_solf, PyObject *__pyx_v_out) {
8674   PyObject *__pyx_r = NULL;
8675   __Pyx_RefNannyDeclarations
8676   __pyx_t_5numpy_uint32_t __pyx_t_1;
8677   PyObject *__pyx_t_2 = NULL;
8678   __Pyx_RefNannySetupContext("logicaland", 0);
8679 
8680   /* "yt/utilities/lib/ewah_bool_wrap.pyx":473
8681  *
8682  *     def logicaland(self, ifile, solf, out):
8683  *         return self._logicaland(ifile, solf, out)             # <<<<<<<<<<<<<<
8684  *
8685  *     cdef void _select_contaminated(self, np.uint32_t ifile,
8686  */
8687   __Pyx_XDECREF(__pyx_r);
8688   __pyx_t_1 = __Pyx_PyInt_As_npy_uint32(__pyx_v_ifile); if (unlikely((__pyx_t_1 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L1_error)
8689   if (!(likely(((__pyx_v_solf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_solf, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 473, __pyx_L1_error)
8690   if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 473, __pyx_L1_error)
8691   __pyx_t_2 = __Pyx_void_to_None(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_logicaland(__pyx_v_self, __pyx_t_1, ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_solf), ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_out))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
8692   __Pyx_GOTREF(__pyx_t_2);
8693   __pyx_r = __pyx_t_2;
8694   __pyx_t_2 = 0;
8695   goto __pyx_L0;
8696 
8697   /* "yt/utilities/lib/ewah_bool_wrap.pyx":472
8698  *                 preincrement(it_map1)
8699  *
8700  *     def logicaland(self, ifile, solf, out):             # <<<<<<<<<<<<<<
8701  *         return self._logicaland(ifile, solf, out)
8702  *
8703  */
8704 
8705   /* function exit code */
8706   __pyx_L1_error:;
8707   __Pyx_XDECREF(__pyx_t_2);
8708   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.logicaland", __pyx_clineno, __pyx_lineno, __pyx_filename);
8709   __pyx_r = NULL;
8710   __pyx_L0:;
8711   __Pyx_XGIVEREF(__pyx_r);
8712   __Pyx_RefNannyFinishContext();
8713   return __pyx_r;
8714 }
8715 
8716 /* "yt/utilities/lib/ewah_bool_wrap.pyx":475
8717  *         return self._logicaland(ifile, solf, out)
8718  *
8719  *     cdef void _select_contaminated(self, np.uint32_t ifile,             # <<<<<<<<<<<<<<
8720  *                                    BoolArrayCollection mask, np.uint8_t[:] out,
8721  *                                    np.uint8_t[:] secondary_files,
8722  */
8723 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_mask,__Pyx_memviewslice __pyx_v_out,__Pyx_memviewslice __pyx_v_secondary_files,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated * __pyx_optional_args)8724 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask, __Pyx_memviewslice __pyx_v_out, __Pyx_memviewslice __pyx_v_secondary_files, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated *__pyx_optional_args) {
8725 
8726   /* "yt/utilities/lib/ewah_bool_wrap.pyx":478
8727  *                                    BoolArrayCollection mask, np.uint8_t[:] out,
8728  *                                    np.uint8_t[:] secondary_files,
8729  *                                    BoolArrayCollection mask2 = None):             # <<<<<<<<<<<<<<
8730  *         # Fill mask at indices owned by this file that are also contaminated by
8731  *         # other files.
8732  */
8733   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask2 = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)Py_None);
8734   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
8735   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_mask;
8736   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_mask1;
8737   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_mask2;
8738   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_slct;
8739   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_file;
8740   __pyx_t_5numpy_uint64_t __pyx_v_iset;
8741   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_set;
8742   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_end;
8743   __pyx_t_5numpy_uint32_t __pyx_v_isfile;
8744   __Pyx_RefNannyDeclarations
8745   int __pyx_t_1;
8746   int __pyx_t_2;
8747   __pyx_t_5numpy_uint64_t __pyx_t_3;
8748   int __pyx_t_4;
8749   __pyx_t_5numpy_uint32_t __pyx_t_5;
8750   __pyx_t_5numpy_uint32_t __pyx_t_6;
8751   __pyx_t_5numpy_uint32_t __pyx_t_7;
8752   size_t __pyx_t_8;
8753   __Pyx_RefNannySetupContext("_select_contaminated", 0);
8754   if (__pyx_optional_args) {
8755     if (__pyx_optional_args->__pyx_n > 0) {
8756       __pyx_v_mask2 = __pyx_optional_args->mask2;
8757     }
8758   }
8759 
8760   /* "yt/utilities/lib/ewah_bool_wrap.pyx":481
8761  *         # Fill mask at indices owned by this file that are also contaminated by
8762  *         # other files.
8763  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
8764  *         cdef ewah_bool_array ewah_mask
8765  *         cdef ewah_bool_array *ewah_mask1
8766  */
8767   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
8768 
8769   /* "yt/utilities/lib/ewah_bool_wrap.pyx":489
8770  *         cdef np.uint64_t iset
8771  *         # Merge masks as necessary
8772  *         if mask2 is None:             # <<<<<<<<<<<<<<
8773  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
8774  *         else:
8775  */
8776   __pyx_t_1 = (((PyObject *)__pyx_v_mask2) == Py_None);
8777   __pyx_t_2 = (__pyx_t_1 != 0);
8778   if (__pyx_t_2) {
8779 
8780     /* "yt/utilities/lib/ewah_bool_wrap.pyx":490
8781  *         # Merge masks as necessary
8782  *         if mask2 is None:
8783  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]             # <<<<<<<<<<<<<<
8784  *         else:
8785  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
8786  */
8787     __pyx_v_ewah_mask = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask->ewah_keys)[0]);
8788 
8789     /* "yt/utilities/lib/ewah_bool_wrap.pyx":489
8790  *         cdef np.uint64_t iset
8791  *         # Merge masks as necessary
8792  *         if mask2 is None:             # <<<<<<<<<<<<<<
8793  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
8794  *         else:
8795  */
8796     goto __pyx_L3;
8797   }
8798 
8799   /* "yt/utilities/lib/ewah_bool_wrap.pyx":492
8800  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
8801  *         else:
8802  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys             # <<<<<<<<<<<<<<
8803  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys
8804  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
8805  */
8806   /*else*/ {
8807     __pyx_v_ewah_mask1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask->ewah_keys);
8808 
8809     /* "yt/utilities/lib/ewah_bool_wrap.pyx":493
8810  *         else:
8811  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
8812  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys             # <<<<<<<<<<<<<<
8813  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
8814  *         # Get just refined cells owned by this file
8815  */
8816     __pyx_v_ewah_mask2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask2->ewah_keys);
8817 
8818     /* "yt/utilities/lib/ewah_bool_wrap.pyx":494
8819  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
8820  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys
8821  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)             # <<<<<<<<<<<<<<
8822  *         # Get just refined cells owned by this file
8823  *         ewah_mask.logicaland(ewah_refn[0], ewah_slct)
8824  */
8825     (__pyx_v_ewah_mask1[0]).logicalor((__pyx_v_ewah_mask2[0]), __pyx_v_ewah_mask);
8826   }
8827   __pyx_L3:;
8828 
8829   /* "yt/utilities/lib/ewah_bool_wrap.pyx":496
8830  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
8831  *         # Get just refined cells owned by this file
8832  *         ewah_mask.logicaland(ewah_refn[0], ewah_slct)             # <<<<<<<<<<<<<<
8833  *         # Set array values
8834  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
8835  */
8836   __pyx_v_ewah_mask.logicaland((__pyx_v_ewah_refn[0]), __pyx_v_ewah_slct);
8837 
8838   /* "yt/utilities/lib/ewah_bool_wrap.pyx":498
8839  *         ewah_mask.logicaland(ewah_refn[0], ewah_slct)
8840  *         # Set array values
8841  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())             # <<<<<<<<<<<<<<
8842  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
8843  *         while iter_set[0] != iter_end[0]:
8844  */
8845   __pyx_v_iter_set = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_slct.begin());
8846 
8847   /* "yt/utilities/lib/ewah_bool_wrap.pyx":499
8848  *         # Set array values
8849  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
8850  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())             # <<<<<<<<<<<<<<
8851  *         while iter_set[0] != iter_end[0]:
8852  *             iset = dereference(iter_set[0])
8853  */
8854   __pyx_v_iter_end = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_slct.end());
8855 
8856   /* "yt/utilities/lib/ewah_bool_wrap.pyx":500
8857  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
8858  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
8859  *         while iter_set[0] != iter_end[0]:             # <<<<<<<<<<<<<<
8860  *             iset = dereference(iter_set[0])
8861  *             out[iset] = 1
8862  */
8863   while (1) {
8864     __pyx_t_2 = (((__pyx_v_iter_set[0]) != (__pyx_v_iter_end[0])) != 0);
8865     if (!__pyx_t_2) break;
8866 
8867     /* "yt/utilities/lib/ewah_bool_wrap.pyx":501
8868  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
8869  *         while iter_set[0] != iter_end[0]:
8870  *             iset = dereference(iter_set[0])             # <<<<<<<<<<<<<<
8871  *             out[iset] = 1
8872  *             preincrement(iter_set[0])
8873  */
8874     __pyx_v_iset = (*(__pyx_v_iter_set[0]));
8875 
8876     /* "yt/utilities/lib/ewah_bool_wrap.pyx":502
8877  *         while iter_set[0] != iter_end[0]:
8878  *             iset = dereference(iter_set[0])
8879  *             out[iset] = 1             # <<<<<<<<<<<<<<
8880  *             preincrement(iter_set[0])
8881  *         # Find files that intersect this one
8882  */
8883     __pyx_t_3 = __pyx_v_iset;
8884     __pyx_t_4 = -1;
8885     if (unlikely(__pyx_t_3 >= (size_t)__pyx_v_out.shape[0])) __pyx_t_4 = 0;
8886     if (unlikely(__pyx_t_4 != -1)) {
8887       __Pyx_RaiseBufferIndexError(__pyx_t_4);
8888       __PYX_ERR(0, 502, __pyx_L1_error)
8889     }
8890     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_3 * __pyx_v_out.strides[0]) )) = 1;
8891 
8892     /* "yt/utilities/lib/ewah_bool_wrap.pyx":503
8893  *             iset = dereference(iter_set[0])
8894  *             out[iset] = 1
8895  *             preincrement(iter_set[0])             # <<<<<<<<<<<<<<
8896  *         # Find files that intersect this one
8897  *         cdef np.uint32_t isfile
8898  */
8899     (void)((++(__pyx_v_iter_set[0])));
8900   }
8901 
8902   /* "yt/utilities/lib/ewah_bool_wrap.pyx":506
8903  *         # Find files that intersect this one
8904  *         cdef np.uint32_t isfile
8905  *         for isfile in range(self.nfiles):             # <<<<<<<<<<<<<<
8906  *             if isfile == ifile: continue
8907  *             ewah_file = (<ewah_bool_array **> self.ewah_keys)[isfile]
8908  */
8909   __pyx_t_5 = __pyx_v_self->nfiles;
8910   __pyx_t_6 = __pyx_t_5;
8911   for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
8912     __pyx_v_isfile = __pyx_t_7;
8913 
8914     /* "yt/utilities/lib/ewah_bool_wrap.pyx":507
8915  *         cdef np.uint32_t isfile
8916  *         for isfile in range(self.nfiles):
8917  *             if isfile == ifile: continue             # <<<<<<<<<<<<<<
8918  *             ewah_file = (<ewah_bool_array **> self.ewah_keys)[isfile]
8919  *             if ewah_slct.intersects(ewah_file[0]) == 1:
8920  */
8921     __pyx_t_2 = ((__pyx_v_isfile == __pyx_v_ifile) != 0);
8922     if (__pyx_t_2) {
8923       goto __pyx_L6_continue;
8924     }
8925 
8926     /* "yt/utilities/lib/ewah_bool_wrap.pyx":508
8927  *         for isfile in range(self.nfiles):
8928  *             if isfile == ifile: continue
8929  *             ewah_file = (<ewah_bool_array **> self.ewah_keys)[isfile]             # <<<<<<<<<<<<<<
8930  *             if ewah_slct.intersects(ewah_file[0]) == 1:
8931  *                 secondary_files[isfile] = 1
8932  */
8933     __pyx_v_ewah_file = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_isfile]);
8934 
8935     /* "yt/utilities/lib/ewah_bool_wrap.pyx":509
8936  *             if isfile == ifile: continue
8937  *             ewah_file = (<ewah_bool_array **> self.ewah_keys)[isfile]
8938  *             if ewah_slct.intersects(ewah_file[0]) == 1:             # <<<<<<<<<<<<<<
8939  *                 secondary_files[isfile] = 1
8940  *
8941  */
8942     __pyx_t_2 = ((__pyx_v_ewah_slct.intersects((__pyx_v_ewah_file[0])) == 1) != 0);
8943     if (__pyx_t_2) {
8944 
8945       /* "yt/utilities/lib/ewah_bool_wrap.pyx":510
8946  *             ewah_file = (<ewah_bool_array **> self.ewah_keys)[isfile]
8947  *             if ewah_slct.intersects(ewah_file[0]) == 1:
8948  *                 secondary_files[isfile] = 1             # <<<<<<<<<<<<<<
8949  *
8950  *     cdef void _select_uncontaminated(self, np.uint32_t ifile,
8951  */
8952       __pyx_t_8 = __pyx_v_isfile;
8953       __pyx_t_4 = -1;
8954       if (unlikely(__pyx_t_8 >= (size_t)__pyx_v_secondary_files.shape[0])) __pyx_t_4 = 0;
8955       if (unlikely(__pyx_t_4 != -1)) {
8956         __Pyx_RaiseBufferIndexError(__pyx_t_4);
8957         __PYX_ERR(0, 510, __pyx_L1_error)
8958       }
8959       *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_secondary_files.data + __pyx_t_8 * __pyx_v_secondary_files.strides[0]) )) = 1;
8960 
8961       /* "yt/utilities/lib/ewah_bool_wrap.pyx":509
8962  *             if isfile == ifile: continue
8963  *             ewah_file = (<ewah_bool_array **> self.ewah_keys)[isfile]
8964  *             if ewah_slct.intersects(ewah_file[0]) == 1:             # <<<<<<<<<<<<<<
8965  *                 secondary_files[isfile] = 1
8966  *
8967  */
8968     }
8969     __pyx_L6_continue:;
8970   }
8971 
8972   /* "yt/utilities/lib/ewah_bool_wrap.pyx":475
8973  *         return self._logicaland(ifile, solf, out)
8974  *
8975  *     cdef void _select_contaminated(self, np.uint32_t ifile,             # <<<<<<<<<<<<<<
8976  *                                    BoolArrayCollection mask, np.uint8_t[:] out,
8977  *                                    np.uint8_t[:] secondary_files,
8978  */
8979 
8980   /* function exit code */
8981   goto __pyx_L0;
8982   __pyx_L1_error:;
8983   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._select_contaminated", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
8984   __pyx_L0:;
8985   __Pyx_RefNannyFinishContext();
8986 }
8987 
8988 /* "yt/utilities/lib/ewah_bool_wrap.pyx":512
8989  *                 secondary_files[isfile] = 1
8990  *
8991  *     cdef void _select_uncontaminated(self, np.uint32_t ifile,             # <<<<<<<<<<<<<<
8992  *                                      BoolArrayCollection mask, np.uint8_t[:] out,
8993  *                                      BoolArrayCollection mask2 = None):
8994  */
8995 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_mask,__Pyx_memviewslice __pyx_v_out,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated * __pyx_optional_args)8996 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask, __Pyx_memviewslice __pyx_v_out, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated *__pyx_optional_args) {
8997 
8998   /* "yt/utilities/lib/ewah_bool_wrap.pyx":514
8999  *     cdef void _select_uncontaminated(self, np.uint32_t ifile,
9000  *                                      BoolArrayCollection mask, np.uint8_t[:] out,
9001  *                                      BoolArrayCollection mask2 = None):             # <<<<<<<<<<<<<<
9002  *         # Fill mask at indices that are owned by this file and no other.
9003  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
9004  */
9005   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask2 = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)Py_None);
9006   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
9007   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
9008   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_mask;
9009   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_mask1;
9010   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_mask2;
9011   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_slct;
9012   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_coar;
9013   __pyx_t_5numpy_uint64_t __pyx_v_iset;
9014   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_set;
9015   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_end;
9016   __Pyx_RefNannyDeclarations
9017   int __pyx_t_1;
9018   int __pyx_t_2;
9019   __pyx_t_5numpy_uint64_t __pyx_t_3;
9020   int __pyx_t_4;
9021   __Pyx_RefNannySetupContext("_select_uncontaminated", 0);
9022   if (__pyx_optional_args) {
9023     if (__pyx_optional_args->__pyx_n > 0) {
9024       __pyx_v_mask2 = __pyx_optional_args->mask2;
9025     }
9026   }
9027 
9028   /* "yt/utilities/lib/ewah_bool_wrap.pyx":516
9029  *                                      BoolArrayCollection mask2 = None):
9030  *         # Fill mask at indices that are owned by this file and no other.
9031  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
9032  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
9033  *         cdef ewah_bool_array ewah_mask
9034  */
9035   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
9036 
9037   /* "yt/utilities/lib/ewah_bool_wrap.pyx":517
9038  *         # Fill mask at indices that are owned by this file and no other.
9039  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
9040  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
9041  *         cdef ewah_bool_array ewah_mask
9042  *         cdef ewah_bool_array *ewah_mask1
9043  */
9044   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
9045 
9046   /* "yt/utilities/lib/ewah_bool_wrap.pyx":525
9047  *         cdef np.uint64_t iset
9048  *         # Merge masks if necessary
9049  *         if mask2 is None:             # <<<<<<<<<<<<<<
9050  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
9051  *         else:
9052  */
9053   __pyx_t_1 = (((PyObject *)__pyx_v_mask2) == Py_None);
9054   __pyx_t_2 = (__pyx_t_1 != 0);
9055   if (__pyx_t_2) {
9056 
9057     /* "yt/utilities/lib/ewah_bool_wrap.pyx":526
9058  *         # Merge masks if necessary
9059  *         if mask2 is None:
9060  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]             # <<<<<<<<<<<<<<
9061  *         else:
9062  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
9063  */
9064     __pyx_v_ewah_mask = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask->ewah_keys)[0]);
9065 
9066     /* "yt/utilities/lib/ewah_bool_wrap.pyx":525
9067  *         cdef np.uint64_t iset
9068  *         # Merge masks if necessary
9069  *         if mask2 is None:             # <<<<<<<<<<<<<<
9070  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
9071  *         else:
9072  */
9073     goto __pyx_L3;
9074   }
9075 
9076   /* "yt/utilities/lib/ewah_bool_wrap.pyx":528
9077  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
9078  *         else:
9079  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys             # <<<<<<<<<<<<<<
9080  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys
9081  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
9082  */
9083   /*else*/ {
9084     __pyx_v_ewah_mask1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask->ewah_keys);
9085 
9086     /* "yt/utilities/lib/ewah_bool_wrap.pyx":529
9087  *         else:
9088  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
9089  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys             # <<<<<<<<<<<<<<
9090  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
9091  *         # Get coarse cells owned by this file
9092  */
9093     __pyx_v_ewah_mask2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask2->ewah_keys);
9094 
9095     /* "yt/utilities/lib/ewah_bool_wrap.pyx":530
9096  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
9097  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys
9098  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)             # <<<<<<<<<<<<<<
9099  *         # Get coarse cells owned by this file
9100  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar)
9101  */
9102     (__pyx_v_ewah_mask1[0]).logicalor((__pyx_v_ewah_mask2[0]), __pyx_v_ewah_mask);
9103   }
9104   __pyx_L3:;
9105 
9106   /* "yt/utilities/lib/ewah_bool_wrap.pyx":532
9107  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
9108  *         # Get coarse cells owned by this file
9109  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar)             # <<<<<<<<<<<<<<
9110  *         ewah_coar.logicaland(ewah_mask,ewah_slct)
9111  *         # Set array elements
9112  */
9113   (__pyx_v_ewah_keys[0]).logicalxor((__pyx_v_ewah_refn[0]), __pyx_v_ewah_coar);
9114 
9115   /* "yt/utilities/lib/ewah_bool_wrap.pyx":533
9116  *         # Get coarse cells owned by this file
9117  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar)
9118  *         ewah_coar.logicaland(ewah_mask,ewah_slct)             # <<<<<<<<<<<<<<
9119  *         # Set array elements
9120  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
9121  */
9122   __pyx_v_ewah_coar.logicaland(__pyx_v_ewah_mask, __pyx_v_ewah_slct);
9123 
9124   /* "yt/utilities/lib/ewah_bool_wrap.pyx":535
9125  *         ewah_coar.logicaland(ewah_mask,ewah_slct)
9126  *         # Set array elements
9127  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())             # <<<<<<<<<<<<<<
9128  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
9129  *         while iter_set[0] != iter_end[0]:
9130  */
9131   __pyx_v_iter_set = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_slct.begin());
9132 
9133   /* "yt/utilities/lib/ewah_bool_wrap.pyx":536
9134  *         # Set array elements
9135  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
9136  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())             # <<<<<<<<<<<<<<
9137  *         while iter_set[0] != iter_end[0]:
9138  *             iset = dereference(iter_set[0])
9139  */
9140   __pyx_v_iter_end = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_slct.end());
9141 
9142   /* "yt/utilities/lib/ewah_bool_wrap.pyx":537
9143  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
9144  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
9145  *         while iter_set[0] != iter_end[0]:             # <<<<<<<<<<<<<<
9146  *             iset = dereference(iter_set[0])
9147  *             out[iset] = 1
9148  */
9149   while (1) {
9150     __pyx_t_2 = (((__pyx_v_iter_set[0]) != (__pyx_v_iter_end[0])) != 0);
9151     if (!__pyx_t_2) break;
9152 
9153     /* "yt/utilities/lib/ewah_bool_wrap.pyx":538
9154  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
9155  *         while iter_set[0] != iter_end[0]:
9156  *             iset = dereference(iter_set[0])             # <<<<<<<<<<<<<<
9157  *             out[iset] = 1
9158  *             preincrement(iter_set[0])
9159  */
9160     __pyx_v_iset = (*(__pyx_v_iter_set[0]));
9161 
9162     /* "yt/utilities/lib/ewah_bool_wrap.pyx":539
9163  *         while iter_set[0] != iter_end[0]:
9164  *             iset = dereference(iter_set[0])
9165  *             out[iset] = 1             # <<<<<<<<<<<<<<
9166  *             preincrement(iter_set[0])
9167  *
9168  */
9169     __pyx_t_3 = __pyx_v_iset;
9170     __pyx_t_4 = -1;
9171     if (unlikely(__pyx_t_3 >= (size_t)__pyx_v_out.shape[0])) __pyx_t_4 = 0;
9172     if (unlikely(__pyx_t_4 != -1)) {
9173       __Pyx_RaiseBufferIndexError(__pyx_t_4);
9174       __PYX_ERR(0, 539, __pyx_L1_error)
9175     }
9176     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_3 * __pyx_v_out.strides[0]) )) = 1;
9177 
9178     /* "yt/utilities/lib/ewah_bool_wrap.pyx":540
9179  *             iset = dereference(iter_set[0])
9180  *             out[iset] = 1
9181  *             preincrement(iter_set[0])             # <<<<<<<<<<<<<<
9182  *
9183  *     cdef bytes _dumps(self, np.uint32_t ifile):
9184  */
9185     (void)((++(__pyx_v_iter_set[0])));
9186   }
9187 
9188   /* "yt/utilities/lib/ewah_bool_wrap.pyx":512
9189  *                 secondary_files[isfile] = 1
9190  *
9191  *     cdef void _select_uncontaminated(self, np.uint32_t ifile,             # <<<<<<<<<<<<<<
9192  *                                      BoolArrayCollection mask, np.uint8_t[:] out,
9193  *                                      BoolArrayCollection mask2 = None):
9194  */
9195 
9196   /* function exit code */
9197   goto __pyx_L0;
9198   __pyx_L1_error:;
9199   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._select_uncontaminated", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
9200   __pyx_L0:;
9201   __Pyx_RefNannyFinishContext();
9202 }
9203 
9204 /* "yt/utilities/lib/ewah_bool_wrap.pyx":542
9205  *             preincrement(iter_set[0])
9206  *
9207  *     cdef bytes _dumps(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
9208  *         # TODO: write word size
9209  *         cdef sstream ss
9210  */
9211 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile)9212 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile) {
9213   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_sstream __pyx_v_ss;
9214   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
9215   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
9216   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
9217   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map;
9218   __pyx_t_5numpy_uint64_t __pyx_v_nrefn;
9219   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
9220   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah;
9221   PyObject *__pyx_r = NULL;
9222   __Pyx_RefNannyDeclarations
9223   int __pyx_t_1;
9224   __pyx_t_5numpy_uint64_t __pyx_t_2;
9225   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
9226   PyObject *__pyx_t_4 = NULL;
9227   __Pyx_RefNannySetupContext("_dumps", 0);
9228 
9229   /* "yt/utilities/lib/ewah_bool_wrap.pyx":545
9230  *         # TODO: write word size
9231  *         cdef sstream ss
9232  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
9233  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
9234  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
9235  */
9236   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
9237 
9238   /* "yt/utilities/lib/ewah_bool_wrap.pyx":546
9239  *         cdef sstream ss
9240  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
9241  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
9242  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
9243  *         cdef ewahmap_it it_map
9244  */
9245   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
9246 
9247   /* "yt/utilities/lib/ewah_bool_wrap.pyx":547
9248  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
9249  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
9250  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
9251  *         cdef ewahmap_it it_map
9252  *         cdef np.uint64_t nrefn, mi1
9253  */
9254   __pyx_v_ewah_coll = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
9255 
9256   /* "yt/utilities/lib/ewah_bool_wrap.pyx":552
9257  *         cdef ewah_bool_array mi1_ewah
9258  *         # Write mi1 ewah & refinment ewah
9259  *         ewah_keys[0].write(ss,1)             # <<<<<<<<<<<<<<
9260  *         ewah_refn[0].write(ss,1)
9261  *         # Number of refined bool arrays
9262  */
9263   (__pyx_v_ewah_keys[0]).write(__pyx_v_ss, 1);
9264 
9265   /* "yt/utilities/lib/ewah_bool_wrap.pyx":553
9266  *         # Write mi1 ewah & refinment ewah
9267  *         ewah_keys[0].write(ss,1)
9268  *         ewah_refn[0].write(ss,1)             # <<<<<<<<<<<<<<
9269  *         # Number of refined bool arrays
9270  *         nrefn = <np.uint64_t>(ewah_refn[0].numberOfOnes())
9271  */
9272   (__pyx_v_ewah_refn[0]).write(__pyx_v_ss, 1);
9273 
9274   /* "yt/utilities/lib/ewah_bool_wrap.pyx":555
9275  *         ewah_refn[0].write(ss,1)
9276  *         # Number of refined bool arrays
9277  *         nrefn = <np.uint64_t>(ewah_refn[0].numberOfOnes())             # <<<<<<<<<<<<<<
9278  *         ss.write(<const char *> &nrefn, sizeof(nrefn))
9279  *         # Loop over refined bool arrays
9280  */
9281   __pyx_v_nrefn = ((__pyx_t_5numpy_uint64_t)(__pyx_v_ewah_refn[0]).numberOfOnes());
9282 
9283   /* "yt/utilities/lib/ewah_bool_wrap.pyx":556
9284  *         # Number of refined bool arrays
9285  *         nrefn = <np.uint64_t>(ewah_refn[0].numberOfOnes())
9286  *         ss.write(<const char *> &nrefn, sizeof(nrefn))             # <<<<<<<<<<<<<<
9287  *         # Loop over refined bool arrays
9288  *         it_map = ewah_coll[0].begin()
9289  */
9290   (void)(__pyx_v_ss.write(((char const *)(&__pyx_v_nrefn)), (sizeof(__pyx_v_nrefn))));
9291 
9292   /* "yt/utilities/lib/ewah_bool_wrap.pyx":558
9293  *         ss.write(<const char *> &nrefn, sizeof(nrefn))
9294  *         # Loop over refined bool arrays
9295  *         it_map = ewah_coll[0].begin()             # <<<<<<<<<<<<<<
9296  *         while it_map != ewah_coll[0].end():
9297  *             mi1 = dereference(it_map).first
9298  */
9299   __pyx_v_it_map = (__pyx_v_ewah_coll[0]).begin();
9300 
9301   /* "yt/utilities/lib/ewah_bool_wrap.pyx":559
9302  *         # Loop over refined bool arrays
9303  *         it_map = ewah_coll[0].begin()
9304  *         while it_map != ewah_coll[0].end():             # <<<<<<<<<<<<<<
9305  *             mi1 = dereference(it_map).first
9306  *             mi1_ewah = dereference(it_map).second
9307  */
9308   while (1) {
9309     __pyx_t_1 = ((__pyx_v_it_map != (__pyx_v_ewah_coll[0]).end()) != 0);
9310     if (!__pyx_t_1) break;
9311 
9312     /* "yt/utilities/lib/ewah_bool_wrap.pyx":560
9313  *         it_map = ewah_coll[0].begin()
9314  *         while it_map != ewah_coll[0].end():
9315  *             mi1 = dereference(it_map).first             # <<<<<<<<<<<<<<
9316  *             mi1_ewah = dereference(it_map).second
9317  *             ss.write(<const char *> &mi1, sizeof(mi1))
9318  */
9319     __pyx_t_2 = (*__pyx_v_it_map).first;
9320     __pyx_v_mi1 = __pyx_t_2;
9321 
9322     /* "yt/utilities/lib/ewah_bool_wrap.pyx":561
9323  *         while it_map != ewah_coll[0].end():
9324  *             mi1 = dereference(it_map).first
9325  *             mi1_ewah = dereference(it_map).second             # <<<<<<<<<<<<<<
9326  *             ss.write(<const char *> &mi1, sizeof(mi1))
9327  *             mi1_ewah.write(ss,1)
9328  */
9329     __pyx_t_3 = (*__pyx_v_it_map).second;
9330     __pyx_v_mi1_ewah = __pyx_t_3;
9331 
9332     /* "yt/utilities/lib/ewah_bool_wrap.pyx":562
9333  *             mi1 = dereference(it_map).first
9334  *             mi1_ewah = dereference(it_map).second
9335  *             ss.write(<const char *> &mi1, sizeof(mi1))             # <<<<<<<<<<<<<<
9336  *             mi1_ewah.write(ss,1)
9337  *             preincrement(it_map)
9338  */
9339     (void)(__pyx_v_ss.write(((char const *)(&__pyx_v_mi1)), (sizeof(__pyx_v_mi1))));
9340 
9341     /* "yt/utilities/lib/ewah_bool_wrap.pyx":563
9342  *             mi1_ewah = dereference(it_map).second
9343  *             ss.write(<const char *> &mi1, sizeof(mi1))
9344  *             mi1_ewah.write(ss,1)             # <<<<<<<<<<<<<<
9345  *             preincrement(it_map)
9346  *         # Return type cast python bytes string
9347  */
9348     __pyx_v_mi1_ewah.write(__pyx_v_ss, 1);
9349 
9350     /* "yt/utilities/lib/ewah_bool_wrap.pyx":564
9351  *             ss.write(<const char *> &mi1, sizeof(mi1))
9352  *             mi1_ewah.write(ss,1)
9353  *             preincrement(it_map)             # <<<<<<<<<<<<<<
9354  *         # Return type cast python bytes string
9355  *         return <bytes>ss.str()
9356  */
9357     (void)((++__pyx_v_it_map));
9358   }
9359 
9360   /* "yt/utilities/lib/ewah_bool_wrap.pyx":566
9361  *             preincrement(it_map)
9362  *         # Return type cast python bytes string
9363  *         return <bytes>ss.str()             # <<<<<<<<<<<<<<
9364  *
9365  *     cdef bint _loads(self, np.uint32_t ifile, bytes s):
9366  */
9367   __Pyx_XDECREF(__pyx_r);
9368   __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_ss.str()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
9369   __Pyx_GOTREF(__pyx_t_4);
9370   __Pyx_INCREF(((PyObject*)__pyx_t_4));
9371   __pyx_r = ((PyObject*)__pyx_t_4);
9372   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9373   goto __pyx_L0;
9374 
9375   /* "yt/utilities/lib/ewah_bool_wrap.pyx":542
9376  *             preincrement(iter_set[0])
9377  *
9378  *     cdef bytes _dumps(self, np.uint32_t ifile):             # <<<<<<<<<<<<<<
9379  *         # TODO: write word size
9380  *         cdef sstream ss
9381  */
9382 
9383   /* function exit code */
9384   __pyx_L1_error:;
9385   __Pyx_XDECREF(__pyx_t_4);
9386   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._dumps", __pyx_clineno, __pyx_lineno, __pyx_filename);
9387   __pyx_r = 0;
9388   __pyx_L0:;
9389   __Pyx_XGIVEREF(__pyx_r);
9390   __Pyx_RefNannyFinishContext();
9391   return __pyx_r;
9392 }
9393 
9394 /* "yt/utilities/lib/ewah_bool_wrap.pyx":568
9395  *         return <bytes>ss.str()
9396  *
9397  *     cdef bint _loads(self, np.uint32_t ifile, bytes s):             # <<<<<<<<<<<<<<
9398  *         # TODO: write word size
9399  *         cdef sstream ss
9400  */
9401 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,__pyx_t_5numpy_uint32_t __pyx_v_ifile,PyObject * __pyx_v_s)9402 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, __pyx_t_5numpy_uint32_t __pyx_v_ifile, PyObject *__pyx_v_s) {
9403   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_sstream __pyx_v_ss;
9404   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
9405   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
9406   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
9407   __pyx_t_5numpy_uint64_t __pyx_v_nrefn;
9408   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
9409   CYTHON_UNUSED __pyx_t_5numpy_uint64_t __pyx_v__;
9410   int __pyx_r;
9411   __Pyx_RefNannyDeclarations
9412   Py_ssize_t __pyx_t_1;
9413   int __pyx_t_2;
9414   char *__pyx_t_3;
9415   PyObject *__pyx_t_4 = NULL;
9416   PyObject *__pyx_t_5 = NULL;
9417   PyObject *__pyx_t_6 = NULL;
9418   PyObject *__pyx_t_7 = NULL;
9419   PyObject *__pyx_t_8 = NULL;
9420   int __pyx_t_9;
9421   PyObject *__pyx_t_10 = NULL;
9422   __pyx_t_5numpy_uint64_t __pyx_t_11;
9423   __pyx_t_5numpy_uint64_t __pyx_t_12;
9424   __pyx_t_5numpy_uint64_t __pyx_t_13;
9425   __Pyx_RefNannySetupContext("_loads", 0);
9426 
9427   /* "yt/utilities/lib/ewah_bool_wrap.pyx":571
9428  *         # TODO: write word size
9429  *         cdef sstream ss
9430  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
9431  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
9432  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
9433  */
9434   __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
9435 
9436   /* "yt/utilities/lib/ewah_bool_wrap.pyx":572
9437  *         cdef sstream ss
9438  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
9439  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
9440  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
9441  *         cdef np.uint64_t nrefn, mi1
9442  */
9443   __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
9444 
9445   /* "yt/utilities/lib/ewah_bool_wrap.pyx":573
9446  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
9447  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
9448  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]             # <<<<<<<<<<<<<<
9449  *         cdef np.uint64_t nrefn, mi1
9450  *         nrefn = mi1 = 0
9451  */
9452   __pyx_v_ewah_coll = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map **)__pyx_v_self->ewah_coll)[__pyx_v_ifile]);
9453 
9454   /* "yt/utilities/lib/ewah_bool_wrap.pyx":575
9455  *         cdef ewah_map *ewah_coll = (<ewah_map **> self.ewah_coll)[ifile]
9456  *         cdef np.uint64_t nrefn, mi1
9457  *         nrefn = mi1 = 0             # <<<<<<<<<<<<<<
9458  *         # Write string to string stream
9459  *         if len(s) == 0: return 1
9460  */
9461   __pyx_v_nrefn = 0;
9462   __pyx_v_mi1 = 0;
9463 
9464   /* "yt/utilities/lib/ewah_bool_wrap.pyx":577
9465  *         nrefn = mi1 = 0
9466  *         # Write string to string stream
9467  *         if len(s) == 0: return 1             # <<<<<<<<<<<<<<
9468  *         ss.write(s, len(s))
9469  *         # Read keys and refinement arrays
9470  */
9471   if (unlikely(__pyx_v_s == Py_None)) {
9472     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
9473     __PYX_ERR(0, 577, __pyx_L1_error)
9474   }
9475   __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_s); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 577, __pyx_L1_error)
9476   __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
9477   if (__pyx_t_2) {
9478     __pyx_r = 1;
9479     goto __pyx_L0;
9480   }
9481 
9482   /* "yt/utilities/lib/ewah_bool_wrap.pyx":578
9483  *         # Write string to string stream
9484  *         if len(s) == 0: return 1
9485  *         ss.write(s, len(s))             # <<<<<<<<<<<<<<
9486  *         # Read keys and refinement arrays
9487  *         ewah_keys[0].read(ss,1)
9488  */
9489   if (unlikely(__pyx_v_s == Py_None)) {
9490     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
9491     __PYX_ERR(0, 578, __pyx_L1_error)
9492   }
9493   __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 578, __pyx_L1_error)
9494   if (unlikely(__pyx_v_s == Py_None)) {
9495     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
9496     __PYX_ERR(0, 578, __pyx_L1_error)
9497   }
9498   __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_s); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 578, __pyx_L1_error)
9499   (void)(__pyx_v_ss.write(__pyx_t_3, __pyx_t_1));
9500 
9501   /* "yt/utilities/lib/ewah_bool_wrap.pyx":580
9502  *         ss.write(s, len(s))
9503  *         # Read keys and refinement arrays
9504  *         ewah_keys[0].read(ss,1)             # <<<<<<<<<<<<<<
9505  *         if ss.eof(): return 1
9506  *         ewah_refn[0].read(ss,1)
9507  */
9508   (__pyx_v_ewah_keys[0]).read(__pyx_v_ss, 1);
9509 
9510   /* "yt/utilities/lib/ewah_bool_wrap.pyx":581
9511  *         # Read keys and refinement arrays
9512  *         ewah_keys[0].read(ss,1)
9513  *         if ss.eof(): return 1             # <<<<<<<<<<<<<<
9514  *         ewah_refn[0].read(ss,1)
9515  *         # Read and check number of refined cells
9516  */
9517   __pyx_t_2 = (__pyx_v_ss.eof() != 0);
9518   if (__pyx_t_2) {
9519     __pyx_r = 1;
9520     goto __pyx_L0;
9521   }
9522 
9523   /* "yt/utilities/lib/ewah_bool_wrap.pyx":582
9524  *         ewah_keys[0].read(ss,1)
9525  *         if ss.eof(): return 1
9526  *         ewah_refn[0].read(ss,1)             # <<<<<<<<<<<<<<
9527  *         # Read and check number of refined cells
9528  *         ss.read(<char *> (&nrefn), sizeof(nrefn))
9529  */
9530   (__pyx_v_ewah_refn[0]).read(__pyx_v_ss, 1);
9531 
9532   /* "yt/utilities/lib/ewah_bool_wrap.pyx":584
9533  *         ewah_refn[0].read(ss,1)
9534  *         # Read and check number of refined cells
9535  *         ss.read(<char *> (&nrefn), sizeof(nrefn))             # <<<<<<<<<<<<<<
9536  *         if nrefn != ewah_refn[0].numberOfOnes():
9537  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))
9538  */
9539   (void)(__pyx_v_ss.read(((char *)(&__pyx_v_nrefn)), (sizeof(__pyx_v_nrefn))));
9540 
9541   /* "yt/utilities/lib/ewah_bool_wrap.pyx":585
9542  *         # Read and check number of refined cells
9543  *         ss.read(<char *> (&nrefn), sizeof(nrefn))
9544  *         if nrefn != ewah_refn[0].numberOfOnes():             # <<<<<<<<<<<<<<
9545  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))
9546  *         # Loop over refined cells
9547  */
9548   __pyx_t_2 = ((__pyx_v_nrefn != (__pyx_v_ewah_refn[0]).numberOfOnes()) != 0);
9549   if (unlikely(__pyx_t_2)) {
9550 
9551     /* "yt/utilities/lib/ewah_bool_wrap.pyx":586
9552  *         ss.read(<char *> (&nrefn), sizeof(nrefn))
9553  *         if nrefn != ewah_refn[0].numberOfOnes():
9554  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))             # <<<<<<<<<<<<<<
9555  *         # Loop over refined cells
9556  *         for _ in range(nrefn):
9557  */
9558     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Error_in_read_File_indicates_ref, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error)
9559     __Pyx_GOTREF(__pyx_t_5);
9560     __pyx_t_6 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nrefn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 586, __pyx_L1_error)
9561     __Pyx_GOTREF(__pyx_t_6);
9562     __pyx_t_7 = __Pyx_PyInt_FromSize_t((__pyx_v_ewah_refn[0]).numberOfOnes()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
9563     __Pyx_GOTREF(__pyx_t_7);
9564     __pyx_t_8 = NULL;
9565     __pyx_t_9 = 0;
9566     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
9567       __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
9568       if (likely(__pyx_t_8)) {
9569         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
9570         __Pyx_INCREF(__pyx_t_8);
9571         __Pyx_INCREF(function);
9572         __Pyx_DECREF_SET(__pyx_t_5, function);
9573         __pyx_t_9 = 1;
9574       }
9575     }
9576     #if CYTHON_FAST_PYCALL
9577     if (PyFunction_Check(__pyx_t_5)) {
9578       PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
9579       __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
9580       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9581       __Pyx_GOTREF(__pyx_t_4);
9582       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9583       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9584     } else
9585     #endif
9586     #if CYTHON_FAST_PYCCALL
9587     if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
9588       PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
9589       __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
9590       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9591       __Pyx_GOTREF(__pyx_t_4);
9592       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9593       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9594     } else
9595     #endif
9596     {
9597       __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 586, __pyx_L1_error)
9598       __Pyx_GOTREF(__pyx_t_10);
9599       if (__pyx_t_8) {
9600         __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
9601       }
9602       __Pyx_GIVEREF(__pyx_t_6);
9603       PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
9604       __Pyx_GIVEREF(__pyx_t_7);
9605       PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
9606       __pyx_t_6 = 0;
9607       __pyx_t_7 = 0;
9608       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
9609       __Pyx_GOTREF(__pyx_t_4);
9610       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9611     }
9612     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9613     __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error)
9614     __Pyx_GOTREF(__pyx_t_5);
9615     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9616     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
9617     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9618     __PYX_ERR(0, 586, __pyx_L1_error)
9619 
9620     /* "yt/utilities/lib/ewah_bool_wrap.pyx":585
9621  *         # Read and check number of refined cells
9622  *         ss.read(<char *> (&nrefn), sizeof(nrefn))
9623  *         if nrefn != ewah_refn[0].numberOfOnes():             # <<<<<<<<<<<<<<
9624  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))
9625  *         # Loop over refined cells
9626  */
9627   }
9628 
9629   /* "yt/utilities/lib/ewah_bool_wrap.pyx":588
9630  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))
9631  *         # Loop over refined cells
9632  *         for _ in range(nrefn):             # <<<<<<<<<<<<<<
9633  *             ss.read(<char *> (&mi1), sizeof(mi1))
9634  *             if ss.eof(): return 1
9635  */
9636   __pyx_t_11 = __pyx_v_nrefn;
9637   __pyx_t_12 = __pyx_t_11;
9638   for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
9639     __pyx_v__ = __pyx_t_13;
9640 
9641     /* "yt/utilities/lib/ewah_bool_wrap.pyx":589
9642  *         # Loop over refined cells
9643  *         for _ in range(nrefn):
9644  *             ss.read(<char *> (&mi1), sizeof(mi1))             # <<<<<<<<<<<<<<
9645  *             if ss.eof(): return 1
9646  *             ewah_coll[0][mi1].read(ss,1)
9647  */
9648     (void)(__pyx_v_ss.read(((char *)(&__pyx_v_mi1)), (sizeof(__pyx_v_mi1))));
9649 
9650     /* "yt/utilities/lib/ewah_bool_wrap.pyx":590
9651  *         for _ in range(nrefn):
9652  *             ss.read(<char *> (&mi1), sizeof(mi1))
9653  *             if ss.eof(): return 1             # <<<<<<<<<<<<<<
9654  *             ewah_coll[0][mi1].read(ss,1)
9655  *             # or...
9656  */
9657     __pyx_t_2 = (__pyx_v_ss.eof() != 0);
9658     if (__pyx_t_2) {
9659       __pyx_r = 1;
9660       goto __pyx_L0;
9661     }
9662 
9663     /* "yt/utilities/lib/ewah_bool_wrap.pyx":591
9664  *             ss.read(<char *> (&mi1), sizeof(mi1))
9665  *             if ss.eof(): return 1
9666  *             ewah_coll[0][mi1].read(ss,1)             # <<<<<<<<<<<<<<
9667  *             # or...
9668  *             #mi1_ewah.read(ss,1)
9669  */
9670     ((__pyx_v_ewah_coll[0])[__pyx_v_mi1]).read(__pyx_v_ss, 1);
9671   }
9672 
9673   /* "yt/utilities/lib/ewah_bool_wrap.pyx":595
9674  *             #mi1_ewah.read(ss,1)
9675  *             #ewah_coll[0][mi1].swap(mi1_ewah)
9676  *         return 1             # <<<<<<<<<<<<<<
9677  *
9678  *     cdef bint _check(self):
9679  */
9680   __pyx_r = 1;
9681   goto __pyx_L0;
9682 
9683   /* "yt/utilities/lib/ewah_bool_wrap.pyx":568
9684  *         return <bytes>ss.str()
9685  *
9686  *     cdef bint _loads(self, np.uint32_t ifile, bytes s):             # <<<<<<<<<<<<<<
9687  *         # TODO: write word size
9688  *         cdef sstream ss
9689  */
9690 
9691   /* function exit code */
9692   __pyx_L1_error:;
9693   __Pyx_XDECREF(__pyx_t_4);
9694   __Pyx_XDECREF(__pyx_t_5);
9695   __Pyx_XDECREF(__pyx_t_6);
9696   __Pyx_XDECREF(__pyx_t_7);
9697   __Pyx_XDECREF(__pyx_t_8);
9698   __Pyx_XDECREF(__pyx_t_10);
9699   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._loads", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
9700   __pyx_r = 0;
9701   __pyx_L0:;
9702   __Pyx_RefNannyFinishContext();
9703   return __pyx_r;
9704 }
9705 
9706 /* "yt/utilities/lib/ewah_bool_wrap.pyx":597
9707  *         return 1
9708  *
9709  *     cdef bint _check(self):             # <<<<<<<<<<<<<<
9710  *         cdef np.uint32_t ifile
9711  *         cdef ewah_bool_array *ewah_keys
9712  */
9713 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self)9714 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self) {
9715   __pyx_t_5numpy_uint32_t __pyx_v_ifile;
9716   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
9717   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
9718   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_tmp1;
9719   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_tmp2;
9720   __pyx_t_5numpy_uint64_t __pyx_v_nchk;
9721   PyObject *__pyx_v_msg = 0;
9722   int __pyx_r;
9723   __Pyx_RefNannyDeclarations
9724   __pyx_t_5numpy_uint32_t __pyx_t_1;
9725   __pyx_t_5numpy_uint32_t __pyx_t_2;
9726   __pyx_t_5numpy_uint32_t __pyx_t_3;
9727   int __pyx_t_4;
9728   PyObject *__pyx_t_5 = NULL;
9729   PyObject *__pyx_t_6 = NULL;
9730   PyObject *__pyx_t_7 = NULL;
9731   PyObject *__pyx_t_8 = NULL;
9732   PyObject *__pyx_t_9 = NULL;
9733   int __pyx_t_10;
9734   PyObject *__pyx_t_11 = NULL;
9735   __Pyx_RefNannySetupContext("_check", 0);
9736 
9737   /* "yt/utilities/lib/ewah_bool_wrap.pyx":605
9738  *         cdef str msg
9739  *         # Check individual files
9740  *         for ifile in range(self.nfiles):             # <<<<<<<<<<<<<<
9741  *             ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
9742  *             ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
9743  */
9744   __pyx_t_1 = __pyx_v_self->nfiles;
9745   __pyx_t_2 = __pyx_t_1;
9746   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
9747     __pyx_v_ifile = __pyx_t_3;
9748 
9749     /* "yt/utilities/lib/ewah_bool_wrap.pyx":606
9750  *         # Check individual files
9751  *         for ifile in range(self.nfiles):
9752  *             ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]             # <<<<<<<<<<<<<<
9753  *             ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
9754  *             # Check that there are not any refn that are not keys
9755  */
9756     __pyx_v_ewah_keys = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_keys)[__pyx_v_ifile]);
9757 
9758     /* "yt/utilities/lib/ewah_bool_wrap.pyx":607
9759  *         for ifile in range(self.nfiles):
9760  *             ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
9761  *             ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]             # <<<<<<<<<<<<<<
9762  *             # Check that there are not any refn that are not keys
9763  *             ewah_keys[0].logicalxor(ewah_refn[0], tmp1)
9764  */
9765     __pyx_v_ewah_refn = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array **)__pyx_v_self->ewah_refn)[__pyx_v_ifile]);
9766 
9767     /* "yt/utilities/lib/ewah_bool_wrap.pyx":609
9768  *             ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
9769  *             # Check that there are not any refn that are not keys
9770  *             ewah_keys[0].logicalxor(ewah_refn[0], tmp1)             # <<<<<<<<<<<<<<
9771  *             ewah_refn[0].logicaland(tmp1, tmp2)
9772  *             nchk = tmp2.numberOfOnes()
9773  */
9774     (__pyx_v_ewah_keys[0]).logicalxor((__pyx_v_ewah_refn[0]), __pyx_v_tmp1);
9775 
9776     /* "yt/utilities/lib/ewah_bool_wrap.pyx":610
9777  *             # Check that there are not any refn that are not keys
9778  *             ewah_keys[0].logicalxor(ewah_refn[0], tmp1)
9779  *             ewah_refn[0].logicaland(tmp1, tmp2)             # <<<<<<<<<<<<<<
9780  *             nchk = tmp2.numberOfOnes()
9781  *             if nchk > 0:
9782  */
9783     (__pyx_v_ewah_refn[0]).logicaland(__pyx_v_tmp1, __pyx_v_tmp2);
9784 
9785     /* "yt/utilities/lib/ewah_bool_wrap.pyx":611
9786  *             ewah_keys[0].logicalxor(ewah_refn[0], tmp1)
9787  *             ewah_refn[0].logicaland(tmp1, tmp2)
9788  *             nchk = tmp2.numberOfOnes()             # <<<<<<<<<<<<<<
9789  *             if nchk > 0:
9790  *                 msg = "File {}: There are {} refined cells that are not set on coarse level.".format(ifile,nchk)
9791  */
9792     __pyx_v_nchk = __pyx_v_tmp2.numberOfOnes();
9793 
9794     /* "yt/utilities/lib/ewah_bool_wrap.pyx":612
9795  *             ewah_refn[0].logicaland(tmp1, tmp2)
9796  *             nchk = tmp2.numberOfOnes()
9797  *             if nchk > 0:             # <<<<<<<<<<<<<<
9798  *                 msg = "File {}: There are {} refined cells that are not set on coarse level.".format(ifile,nchk)
9799  *                 print(msg)
9800  */
9801     __pyx_t_4 = ((__pyx_v_nchk > 0) != 0);
9802     if (__pyx_t_4) {
9803 
9804       /* "yt/utilities/lib/ewah_bool_wrap.pyx":613
9805  *             nchk = tmp2.numberOfOnes()
9806  *             if nchk > 0:
9807  *                 msg = "File {}: There are {} refined cells that are not set on coarse level.".format(ifile,nchk)             # <<<<<<<<<<<<<<
9808  *                 print(msg)
9809  *                 return 0
9810  */
9811       __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_File_There_are_refined_cells_tha, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
9812       __Pyx_GOTREF(__pyx_t_6);
9813       __pyx_t_7 = __Pyx_PyInt_From_npy_uint32(__pyx_v_ifile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error)
9814       __Pyx_GOTREF(__pyx_t_7);
9815       __pyx_t_8 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nchk); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 613, __pyx_L1_error)
9816       __Pyx_GOTREF(__pyx_t_8);
9817       __pyx_t_9 = NULL;
9818       __pyx_t_10 = 0;
9819       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
9820         __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
9821         if (likely(__pyx_t_9)) {
9822           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
9823           __Pyx_INCREF(__pyx_t_9);
9824           __Pyx_INCREF(function);
9825           __Pyx_DECREF_SET(__pyx_t_6, function);
9826           __pyx_t_10 = 1;
9827         }
9828       }
9829       #if CYTHON_FAST_PYCALL
9830       if (PyFunction_Check(__pyx_t_6)) {
9831         PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
9832         __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L1_error)
9833         __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
9834         __Pyx_GOTREF(__pyx_t_5);
9835         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9836         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9837       } else
9838       #endif
9839       #if CYTHON_FAST_PYCCALL
9840       if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
9841         PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
9842         __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L1_error)
9843         __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
9844         __Pyx_GOTREF(__pyx_t_5);
9845         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9846         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9847       } else
9848       #endif
9849       {
9850         __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 613, __pyx_L1_error)
9851         __Pyx_GOTREF(__pyx_t_11);
9852         if (__pyx_t_9) {
9853           __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
9854         }
9855         __Pyx_GIVEREF(__pyx_t_7);
9856         PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_7);
9857         __Pyx_GIVEREF(__pyx_t_8);
9858         PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
9859         __pyx_t_7 = 0;
9860         __pyx_t_8 = 0;
9861         __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L1_error)
9862         __Pyx_GOTREF(__pyx_t_5);
9863         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9864       }
9865       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9866       if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 613, __pyx_L1_error)
9867       __pyx_v_msg = ((PyObject*)__pyx_t_5);
9868       __pyx_t_5 = 0;
9869 
9870       /* "yt/utilities/lib/ewah_bool_wrap.pyx":614
9871  *             if nchk > 0:
9872  *                 msg = "File {}: There are {} refined cells that are not set on coarse level.".format(ifile,nchk)
9873  *                 print(msg)             # <<<<<<<<<<<<<<
9874  *                 return 0
9875  *                 # raise Exception(msg)
9876  */
9877       if (__Pyx_PrintOne(0, __pyx_v_msg) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
9878 
9879       /* "yt/utilities/lib/ewah_bool_wrap.pyx":615
9880  *                 msg = "File {}: There are {} refined cells that are not set on coarse level.".format(ifile,nchk)
9881  *                 print(msg)
9882  *                 return 0             # <<<<<<<<<<<<<<
9883  *                 # raise Exception(msg)
9884  *         return 1
9885  */
9886       __pyx_r = 0;
9887       goto __pyx_L0;
9888 
9889       /* "yt/utilities/lib/ewah_bool_wrap.pyx":612
9890  *             ewah_refn[0].logicaland(tmp1, tmp2)
9891  *             nchk = tmp2.numberOfOnes()
9892  *             if nchk > 0:             # <<<<<<<<<<<<<<
9893  *                 msg = "File {}: There are {} refined cells that are not set on coarse level.".format(ifile,nchk)
9894  *                 print(msg)
9895  */
9896     }
9897   }
9898 
9899   /* "yt/utilities/lib/ewah_bool_wrap.pyx":617
9900  *                 return 0
9901  *                 # raise Exception(msg)
9902  *         return 1             # <<<<<<<<<<<<<<
9903  *
9904  *     def check(self):
9905  */
9906   __pyx_r = 1;
9907   goto __pyx_L0;
9908 
9909   /* "yt/utilities/lib/ewah_bool_wrap.pyx":597
9910  *         return 1
9911  *
9912  *     cdef bint _check(self):             # <<<<<<<<<<<<<<
9913  *         cdef np.uint32_t ifile
9914  *         cdef ewah_bool_array *ewah_keys
9915  */
9916 
9917   /* function exit code */
9918   __pyx_L1_error:;
9919   __Pyx_XDECREF(__pyx_t_5);
9920   __Pyx_XDECREF(__pyx_t_6);
9921   __Pyx_XDECREF(__pyx_t_7);
9922   __Pyx_XDECREF(__pyx_t_8);
9923   __Pyx_XDECREF(__pyx_t_9);
9924   __Pyx_XDECREF(__pyx_t_11);
9925   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.FileBitmasks._check", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
9926   __pyx_r = 0;
9927   __pyx_L0:;
9928   __Pyx_XDECREF(__pyx_v_msg);
9929   __Pyx_RefNannyFinishContext();
9930   return __pyx_r;
9931 }
9932 
9933 /* "yt/utilities/lib/ewah_bool_wrap.pyx":619
9934  *         return 1
9935  *
9936  *     def check(self):             # <<<<<<<<<<<<<<
9937  *         return self._check()
9938  *
9939  */
9940 
9941 /* Python wrapper */
9942 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_17check(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_17check(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)9943 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_17check(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9944   PyObject *__pyx_r = 0;
9945   __Pyx_RefNannyDeclarations
9946   __Pyx_RefNannySetupContext("check (wrapper)", 0);
9947   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_16check(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self));
9948 
9949   /* function exit code */
9950   __Pyx_RefNannyFinishContext();
9951   return __pyx_r;
9952 }
9953 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_16check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self)9954 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_16check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self) {
9955   PyObject *__pyx_r = NULL;
9956   __Pyx_RefNannyDeclarations
9957   PyObject *__pyx_t_1 = NULL;
9958   __Pyx_RefNannySetupContext("check", 0);
9959 
9960   /* "yt/utilities/lib/ewah_bool_wrap.pyx":620
9961  *
9962  *     def check(self):
9963  *         return self._check()             # <<<<<<<<<<<<<<
9964  *
9965  *     def __dealloc__(self):
9966  */
9967   __Pyx_XDECREF(__pyx_r);
9968   __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_check(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
9969   __Pyx_GOTREF(__pyx_t_1);
9970   __pyx_r = __pyx_t_1;
9971   __pyx_t_1 = 0;
9972   goto __pyx_L0;
9973 
9974   /* "yt/utilities/lib/ewah_bool_wrap.pyx":619
9975  *         return 1
9976  *
9977  *     def check(self):             # <<<<<<<<<<<<<<
9978  *         return self._check()
9979  *
9980  */
9981 
9982   /* function exit code */
9983   __pyx_L1_error:;
9984   __Pyx_XDECREF(__pyx_t_1);
9985   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.check", __pyx_clineno, __pyx_lineno, __pyx_filename);
9986   __pyx_r = NULL;
9987   __pyx_L0:;
9988   __Pyx_XGIVEREF(__pyx_r);
9989   __Pyx_RefNannyFinishContext();
9990   return __pyx_r;
9991 }
9992 
9993 /* "yt/utilities/lib/ewah_bool_wrap.pyx":622
9994  *         return self._check()
9995  *
9996  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
9997  *         for ifile in range(self.nfiles):
9998  *             del self.ewah_keys[ifile]
9999  */
10000 
10001 /* Python wrapper */
10002 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_19__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_19__dealloc__(PyObject * __pyx_v_self)10003 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_19__dealloc__(PyObject *__pyx_v_self) {
10004   __Pyx_RefNannyDeclarations
10005   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
10006   __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_18__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self));
10007 
10008   /* function exit code */
10009   __Pyx_RefNannyFinishContext();
10010 }
10011 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_18__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self)10012 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_18__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self) {
10013   __pyx_t_5numpy_uint32_t __pyx_v_ifile;
10014   __Pyx_RefNannyDeclarations
10015   __pyx_t_5numpy_uint32_t __pyx_t_1;
10016   __pyx_t_5numpy_uint32_t __pyx_t_2;
10017   __pyx_t_5numpy_uint32_t __pyx_t_3;
10018   __Pyx_RefNannySetupContext("__dealloc__", 0);
10019 
10020   /* "yt/utilities/lib/ewah_bool_wrap.pyx":623
10021  *
10022  *     def __dealloc__(self):
10023  *         for ifile in range(self.nfiles):             # <<<<<<<<<<<<<<
10024  *             del self.ewah_keys[ifile]
10025  *             del self.ewah_refn[ifile]
10026  */
10027   __pyx_t_1 = __pyx_v_self->nfiles;
10028   __pyx_t_2 = __pyx_t_1;
10029   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
10030     __pyx_v_ifile = __pyx_t_3;
10031 
10032     /* "yt/utilities/lib/ewah_bool_wrap.pyx":624
10033  *     def __dealloc__(self):
10034  *         for ifile in range(self.nfiles):
10035  *             del self.ewah_keys[ifile]             # <<<<<<<<<<<<<<
10036  *             del self.ewah_refn[ifile]
10037  *             del self.ewah_coll[ifile]
10038  */
10039     delete (__pyx_v_self->ewah_keys[__pyx_v_ifile]);
10040 
10041     /* "yt/utilities/lib/ewah_bool_wrap.pyx":625
10042  *         for ifile in range(self.nfiles):
10043  *             del self.ewah_keys[ifile]
10044  *             del self.ewah_refn[ifile]             # <<<<<<<<<<<<<<
10045  *             del self.ewah_coll[ifile]
10046  *
10047  */
10048     delete (__pyx_v_self->ewah_refn[__pyx_v_ifile]);
10049 
10050     /* "yt/utilities/lib/ewah_bool_wrap.pyx":626
10051  *             del self.ewah_keys[ifile]
10052  *             del self.ewah_refn[ifile]
10053  *             del self.ewah_coll[ifile]             # <<<<<<<<<<<<<<
10054  *
10055  *     def print_info(self, ifile, prefix=''):
10056  */
10057     delete (__pyx_v_self->ewah_coll[__pyx_v_ifile]);
10058   }
10059 
10060   /* "yt/utilities/lib/ewah_bool_wrap.pyx":622
10061  *         return self._check()
10062  *
10063  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
10064  *         for ifile in range(self.nfiles):
10065  *             del self.ewah_keys[ifile]
10066  */
10067 
10068   /* function exit code */
10069   __Pyx_RefNannyFinishContext();
10070 }
10071 
10072 /* "yt/utilities/lib/ewah_bool_wrap.pyx":628
10073  *             del self.ewah_coll[ifile]
10074  *
10075  *     def print_info(self, ifile, prefix=''):             # <<<<<<<<<<<<<<
10076  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(
10077  *             prefix,
10078  */
10079 
10080 /* Python wrapper */
10081 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_21print_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_21print_info(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)10082 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_21print_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10083   PyObject *__pyx_v_ifile = 0;
10084   PyObject *__pyx_v_prefix = 0;
10085   PyObject *__pyx_r = 0;
10086   __Pyx_RefNannyDeclarations
10087   __Pyx_RefNannySetupContext("print_info (wrapper)", 0);
10088   {
10089     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifile,&__pyx_n_s_prefix,0};
10090     PyObject* values[2] = {0,0};
10091     values[1] = ((PyObject *)__pyx_kp_s__5);
10092     if (unlikely(__pyx_kwds)) {
10093       Py_ssize_t kw_args;
10094       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10095       switch (pos_args) {
10096         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10097         CYTHON_FALLTHROUGH;
10098         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10099         CYTHON_FALLTHROUGH;
10100         case  0: break;
10101         default: goto __pyx_L5_argtuple_error;
10102       }
10103       kw_args = PyDict_Size(__pyx_kwds);
10104       switch (pos_args) {
10105         case  0:
10106         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifile)) != 0)) kw_args--;
10107         else goto __pyx_L5_argtuple_error;
10108         CYTHON_FALLTHROUGH;
10109         case  1:
10110         if (kw_args > 0) {
10111           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prefix);
10112           if (value) { values[1] = value; kw_args--; }
10113         }
10114       }
10115       if (unlikely(kw_args > 0)) {
10116         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "print_info") < 0)) __PYX_ERR(0, 628, __pyx_L3_error)
10117       }
10118     } else {
10119       switch (PyTuple_GET_SIZE(__pyx_args)) {
10120         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10121         CYTHON_FALLTHROUGH;
10122         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10123         break;
10124         default: goto __pyx_L5_argtuple_error;
10125       }
10126     }
10127     __pyx_v_ifile = values[0];
10128     __pyx_v_prefix = values[1];
10129   }
10130   goto __pyx_L4_argument_unpacking_done;
10131   __pyx_L5_argtuple_error:;
10132   __Pyx_RaiseArgtupleInvalid("print_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 628, __pyx_L3_error)
10133   __pyx_L3_error:;
10134   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.print_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
10135   __Pyx_RefNannyFinishContext();
10136   return NULL;
10137   __pyx_L4_argument_unpacking_done:;
10138   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_20print_info(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), __pyx_v_ifile, __pyx_v_prefix);
10139 
10140   /* function exit code */
10141   __Pyx_RefNannyFinishContext();
10142   return __pyx_r;
10143 }
10144 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_20print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,PyObject * __pyx_v_ifile,PyObject * __pyx_v_prefix)10145 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_20print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, PyObject *__pyx_v_ifile, PyObject *__pyx_v_prefix) {
10146   PyObject *__pyx_r = NULL;
10147   __Pyx_RefNannyDeclarations
10148   PyObject *__pyx_t_1 = NULL;
10149   PyObject *__pyx_t_2 = NULL;
10150   __pyx_t_5numpy_uint32_t __pyx_t_3;
10151   PyObject *__pyx_t_4 = NULL;
10152   PyObject *__pyx_t_5 = NULL;
10153   PyObject *__pyx_t_6 = NULL;
10154   PyObject *__pyx_t_7 = NULL;
10155   int __pyx_t_8;
10156   PyObject *__pyx_t_9 = NULL;
10157   __Pyx_RefNannySetupContext("print_info", 0);
10158 
10159   /* "yt/utilities/lib/ewah_bool_wrap.pyx":629
10160  *
10161  *     def print_info(self, ifile, prefix=''):
10162  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(             # <<<<<<<<<<<<<<
10163  *             prefix,
10164  *             self._count_coarse(ifile),
10165  */
10166   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_8d_coarse_8d_refined_8d_total, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
10167   __Pyx_GOTREF(__pyx_t_2);
10168 
10169   /* "yt/utilities/lib/ewah_bool_wrap.pyx":631
10170  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(
10171  *             prefix,
10172  *             self._count_coarse(ifile),             # <<<<<<<<<<<<<<
10173  *             self._count_refined(ifile),
10174  *             self._count_total(ifile)))
10175  */
10176   __pyx_t_3 = __Pyx_PyInt_As_npy_uint32(__pyx_v_ifile); if (unlikely((__pyx_t_3 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L1_error)
10177   __pyx_t_4 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_coarse(__pyx_v_self, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error)
10178   __Pyx_GOTREF(__pyx_t_4);
10179 
10180   /* "yt/utilities/lib/ewah_bool_wrap.pyx":632
10181  *             prefix,
10182  *             self._count_coarse(ifile),
10183  *             self._count_refined(ifile),             # <<<<<<<<<<<<<<
10184  *             self._count_total(ifile)))
10185  *
10186  */
10187   __pyx_t_3 = __Pyx_PyInt_As_npy_uint32(__pyx_v_ifile); if (unlikely((__pyx_t_3 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 632, __pyx_L1_error)
10188   __pyx_t_5 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_refined(__pyx_v_self, __pyx_t_3)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 632, __pyx_L1_error)
10189   __Pyx_GOTREF(__pyx_t_5);
10190 
10191   /* "yt/utilities/lib/ewah_bool_wrap.pyx":633
10192  *             self._count_coarse(ifile),
10193  *             self._count_refined(ifile),
10194  *             self._count_total(ifile)))             # <<<<<<<<<<<<<<
10195  *
10196  * cdef class BoolArrayCollection:
10197  */
10198   __pyx_t_3 = __Pyx_PyInt_As_npy_uint32(__pyx_v_ifile); if (unlikely((__pyx_t_3 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 633, __pyx_L1_error)
10199   __pyx_t_6 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self->__pyx_vtab)->_count_total(__pyx_v_self, __pyx_t_3)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 633, __pyx_L1_error)
10200   __Pyx_GOTREF(__pyx_t_6);
10201   __pyx_t_7 = NULL;
10202   __pyx_t_8 = 0;
10203   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10204     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
10205     if (likely(__pyx_t_7)) {
10206       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10207       __Pyx_INCREF(__pyx_t_7);
10208       __Pyx_INCREF(function);
10209       __Pyx_DECREF_SET(__pyx_t_2, function);
10210       __pyx_t_8 = 1;
10211     }
10212   }
10213   #if CYTHON_FAST_PYCALL
10214   if (PyFunction_Check(__pyx_t_2)) {
10215     PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_prefix, __pyx_t_4, __pyx_t_5, __pyx_t_6};
10216     __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
10217     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10218     __Pyx_GOTREF(__pyx_t_1);
10219     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10220     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10221     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10222   } else
10223   #endif
10224   #if CYTHON_FAST_PYCCALL
10225   if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
10226     PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_prefix, __pyx_t_4, __pyx_t_5, __pyx_t_6};
10227     __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
10228     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10229     __Pyx_GOTREF(__pyx_t_1);
10230     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10231     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10232     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10233   } else
10234   #endif
10235   {
10236     __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 629, __pyx_L1_error)
10237     __Pyx_GOTREF(__pyx_t_9);
10238     if (__pyx_t_7) {
10239       __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
10240     }
10241     __Pyx_INCREF(__pyx_v_prefix);
10242     __Pyx_GIVEREF(__pyx_v_prefix);
10243     PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_prefix);
10244     __Pyx_GIVEREF(__pyx_t_4);
10245     PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
10246     __Pyx_GIVEREF(__pyx_t_5);
10247     PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
10248     __Pyx_GIVEREF(__pyx_t_6);
10249     PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
10250     __pyx_t_4 = 0;
10251     __pyx_t_5 = 0;
10252     __pyx_t_6 = 0;
10253     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
10254     __Pyx_GOTREF(__pyx_t_1);
10255     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
10256   }
10257   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10258   if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
10259   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10260 
10261   /* "yt/utilities/lib/ewah_bool_wrap.pyx":628
10262  *             del self.ewah_coll[ifile]
10263  *
10264  *     def print_info(self, ifile, prefix=''):             # <<<<<<<<<<<<<<
10265  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(
10266  *             prefix,
10267  */
10268 
10269   /* function exit code */
10270   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10271   goto __pyx_L0;
10272   __pyx_L1_error:;
10273   __Pyx_XDECREF(__pyx_t_1);
10274   __Pyx_XDECREF(__pyx_t_2);
10275   __Pyx_XDECREF(__pyx_t_4);
10276   __Pyx_XDECREF(__pyx_t_5);
10277   __Pyx_XDECREF(__pyx_t_6);
10278   __Pyx_XDECREF(__pyx_t_7);
10279   __Pyx_XDECREF(__pyx_t_9);
10280   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.print_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
10281   __pyx_r = NULL;
10282   __pyx_L0:;
10283   __Pyx_XGIVEREF(__pyx_r);
10284   __Pyx_RefNannyFinishContext();
10285   return __pyx_r;
10286 }
10287 
10288 /* "(tree fragment)":1
10289  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
10290  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10291  * def __setstate_cython__(self, __pyx_state):
10292  */
10293 
10294 /* Python wrapper */
10295 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_23__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)10296 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10297   PyObject *__pyx_r = 0;
10298   __Pyx_RefNannyDeclarations
10299   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10300   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_22__reduce_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self));
10301 
10302   /* function exit code */
10303   __Pyx_RefNannyFinishContext();
10304   return __pyx_r;
10305 }
10306 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self)10307 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self) {
10308   PyObject *__pyx_r = NULL;
10309   __Pyx_RefNannyDeclarations
10310   PyObject *__pyx_t_1 = NULL;
10311   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10312 
10313   /* "(tree fragment)":2
10314  * def __reduce_cython__(self):
10315  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
10316  * def __setstate_cython__(self, __pyx_state):
10317  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10318  */
10319   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
10320   __Pyx_GOTREF(__pyx_t_1);
10321   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10322   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10323   __PYX_ERR(1, 2, __pyx_L1_error)
10324 
10325   /* "(tree fragment)":1
10326  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
10327  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10328  * def __setstate_cython__(self, __pyx_state):
10329  */
10330 
10331   /* function exit code */
10332   __pyx_L1_error:;
10333   __Pyx_XDECREF(__pyx_t_1);
10334   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10335   __pyx_r = NULL;
10336   __Pyx_XGIVEREF(__pyx_r);
10337   __Pyx_RefNannyFinishContext();
10338   return __pyx_r;
10339 }
10340 
10341 /* "(tree fragment)":3
10342  * def __reduce_cython__(self):
10343  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10344  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
10345  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10346  */
10347 
10348 /* Python wrapper */
10349 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_25__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)10350 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
10351   PyObject *__pyx_r = 0;
10352   __Pyx_RefNannyDeclarations
10353   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
10354   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_24__setstate_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
10355 
10356   /* function exit code */
10357   __Pyx_RefNannyFinishContext();
10358   return __pyx_r;
10359 }
10360 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)10361 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
10362   PyObject *__pyx_r = NULL;
10363   __Pyx_RefNannyDeclarations
10364   PyObject *__pyx_t_1 = NULL;
10365   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
10366 
10367   /* "(tree fragment)":4
10368  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10369  * def __setstate_cython__(self, __pyx_state):
10370  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
10371  */
10372   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
10373   __Pyx_GOTREF(__pyx_t_1);
10374   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10375   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10376   __PYX_ERR(1, 4, __pyx_L1_error)
10377 
10378   /* "(tree fragment)":3
10379  * def __reduce_cython__(self):
10380  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10381  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
10382  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10383  */
10384 
10385   /* function exit code */
10386   __pyx_L1_error:;
10387   __Pyx_XDECREF(__pyx_t_1);
10388   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.FileBitmasks.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10389   __pyx_r = NULL;
10390   __Pyx_XGIVEREF(__pyx_r);
10391   __Pyx_RefNannyFinishContext();
10392   return __pyx_r;
10393 }
10394 
10395 /* "yt/utilities/lib/ewah_bool_wrap.pyx":637
10396  * cdef class BoolArrayCollection:
10397  *
10398  *     def __cinit__(self):             # <<<<<<<<<<<<<<
10399  *         self.ewah_keys = new ewah_bool_array()
10400  *         self.ewah_refn = new ewah_bool_array()
10401  */
10402 
10403 /* Python wrapper */
10404 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_1__cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)10405 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10406   int __pyx_r;
10407   __Pyx_RefNannyDeclarations
10408   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
10409   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
10410     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
10411   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
10412   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self));
10413 
10414   /* function exit code */
10415   __Pyx_RefNannyFinishContext();
10416   return __pyx_r;
10417 }
10418 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)10419 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
10420   int __pyx_r;
10421   __Pyx_RefNannyDeclarations
10422   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_t_1;
10423   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_t_2;
10424   __Pyx_RefNannySetupContext("__cinit__", 0);
10425 
10426   /* "yt/utilities/lib/ewah_bool_wrap.pyx":638
10427  *
10428  *     def __cinit__(self):
10429  *         self.ewah_keys = new ewah_bool_array()             # <<<<<<<<<<<<<<
10430  *         self.ewah_refn = new ewah_bool_array()
10431  *         self.ewah_coar = new ewah_bool_array()
10432  */
10433   try {
10434     __pyx_t_1 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array();
10435   } catch(...) {
10436     __Pyx_CppExn2PyErr();
10437     __PYX_ERR(0, 638, __pyx_L1_error)
10438   }
10439   __pyx_v_self->ewah_keys = __pyx_t_1;
10440 
10441   /* "yt/utilities/lib/ewah_bool_wrap.pyx":639
10442  *     def __cinit__(self):
10443  *         self.ewah_keys = new ewah_bool_array()
10444  *         self.ewah_refn = new ewah_bool_array()             # <<<<<<<<<<<<<<
10445  *         self.ewah_coar = new ewah_bool_array()
10446  *         self.ewah_coll = new ewah_map()
10447  */
10448   try {
10449     __pyx_t_1 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array();
10450   } catch(...) {
10451     __Pyx_CppExn2PyErr();
10452     __PYX_ERR(0, 639, __pyx_L1_error)
10453   }
10454   __pyx_v_self->ewah_refn = __pyx_t_1;
10455 
10456   /* "yt/utilities/lib/ewah_bool_wrap.pyx":640
10457  *         self.ewah_keys = new ewah_bool_array()
10458  *         self.ewah_refn = new ewah_bool_array()
10459  *         self.ewah_coar = new ewah_bool_array()             # <<<<<<<<<<<<<<
10460  *         self.ewah_coll = new ewah_map()
10461  *
10462  */
10463   try {
10464     __pyx_t_1 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array();
10465   } catch(...) {
10466     __Pyx_CppExn2PyErr();
10467     __PYX_ERR(0, 640, __pyx_L1_error)
10468   }
10469   __pyx_v_self->ewah_coar = __pyx_t_1;
10470 
10471   /* "yt/utilities/lib/ewah_bool_wrap.pyx":641
10472  *         self.ewah_refn = new ewah_bool_array()
10473  *         self.ewah_coar = new ewah_bool_array()
10474  *         self.ewah_coll = new ewah_map()             # <<<<<<<<<<<<<<
10475  *
10476  *     cdef void _reset(self):
10477  */
10478   try {
10479     __pyx_t_2 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map();
10480   } catch(...) {
10481     __Pyx_CppExn2PyErr();
10482     __PYX_ERR(0, 641, __pyx_L1_error)
10483   }
10484   __pyx_v_self->ewah_coll = __pyx_t_2;
10485 
10486   /* "yt/utilities/lib/ewah_bool_wrap.pyx":637
10487  * cdef class BoolArrayCollection:
10488  *
10489  *     def __cinit__(self):             # <<<<<<<<<<<<<<
10490  *         self.ewah_keys = new ewah_bool_array()
10491  *         self.ewah_refn = new ewah_bool_array()
10492  */
10493 
10494   /* function exit code */
10495   __pyx_r = 0;
10496   goto __pyx_L0;
10497   __pyx_L1_error:;
10498   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10499   __pyx_r = -1;
10500   __pyx_L0:;
10501   __Pyx_RefNannyFinishContext();
10502   return __pyx_r;
10503 }
10504 
10505 /* "yt/utilities/lib/ewah_bool_wrap.pyx":643
10506  *         self.ewah_coll = new ewah_map()
10507  *
10508  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
10509  *         self.ewah_keys[0].reset()
10510  *         self.ewah_refn[0].reset()
10511  */
10512 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)10513 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
10514   __Pyx_RefNannyDeclarations
10515   __Pyx_RefNannySetupContext("_reset", 0);
10516 
10517   /* "yt/utilities/lib/ewah_bool_wrap.pyx":644
10518  *
10519  *     cdef void _reset(self):
10520  *         self.ewah_keys[0].reset()             # <<<<<<<<<<<<<<
10521  *         self.ewah_refn[0].reset()
10522  *         self.ewah_coar[0].reset()
10523  */
10524   (__pyx_v_self->ewah_keys[0]).reset();
10525 
10526   /* "yt/utilities/lib/ewah_bool_wrap.pyx":645
10527  *     cdef void _reset(self):
10528  *         self.ewah_keys[0].reset()
10529  *         self.ewah_refn[0].reset()             # <<<<<<<<<<<<<<
10530  *         self.ewah_coar[0].reset()
10531  *         self.ewah_coll[0].clear()
10532  */
10533   (__pyx_v_self->ewah_refn[0]).reset();
10534 
10535   /* "yt/utilities/lib/ewah_bool_wrap.pyx":646
10536  *         self.ewah_keys[0].reset()
10537  *         self.ewah_refn[0].reset()
10538  *         self.ewah_coar[0].reset()             # <<<<<<<<<<<<<<
10539  *         self.ewah_coll[0].clear()
10540  *
10541  */
10542   (__pyx_v_self->ewah_coar[0]).reset();
10543 
10544   /* "yt/utilities/lib/ewah_bool_wrap.pyx":647
10545  *         self.ewah_refn[0].reset()
10546  *         self.ewah_coar[0].reset()
10547  *         self.ewah_coll[0].clear()             # <<<<<<<<<<<<<<
10548  *
10549  *     cdef int _richcmp(self, BoolArrayCollection solf, int op) except -1:
10550  */
10551   (__pyx_v_self->ewah_coll[0]).clear();
10552 
10553   /* "yt/utilities/lib/ewah_bool_wrap.pyx":643
10554  *         self.ewah_coll = new ewah_map()
10555  *
10556  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
10557  *         self.ewah_keys[0].reset()
10558  *         self.ewah_refn[0].reset()
10559  */
10560 
10561   /* function exit code */
10562   __Pyx_RefNannyFinishContext();
10563 }
10564 
10565 /* "yt/utilities/lib/ewah_bool_wrap.pyx":649
10566  *         self.ewah_coll[0].clear()
10567  *
10568  *     cdef int _richcmp(self, BoolArrayCollection solf, int op) except -1:             # <<<<<<<<<<<<<<
10569  *
10570  *         cdef ewah_bool_array *arr1
10571  */
10572 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__richcmp(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf,int __pyx_v_op)10573 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__richcmp(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, int __pyx_v_op) {
10574   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_arr1;
10575   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_arr2;
10576   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_map1;
10577   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_map2;
10578   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
10579   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
10580   int __pyx_r;
10581   __Pyx_RefNannyDeclarations
10582   int __pyx_t_1;
10583   int __pyx_t_2;
10584   __Pyx_RefNannySetupContext("_richcmp", 0);
10585 
10586   /* "yt/utilities/lib/ewah_bool_wrap.pyx":657
10587  *         cdef ewahmap_it it_map1, it_map2
10588  *         # ==
10589  *         if op == 2:             # <<<<<<<<<<<<<<
10590  *             # Keys
10591  *             arr1 = <ewah_bool_array *> self.ewah_keys
10592  */
10593   switch (__pyx_v_op) {
10594     case 2:
10595 
10596     /* "yt/utilities/lib/ewah_bool_wrap.pyx":659
10597  *         if op == 2:
10598  *             # Keys
10599  *             arr1 = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
10600  *             arr2 = <ewah_bool_array *> solf.ewah_keys
10601  *             if arr1[0] != arr2[0]:
10602  */
10603     __pyx_v_arr1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
10604 
10605     /* "yt/utilities/lib/ewah_bool_wrap.pyx":660
10606  *             # Keys
10607  *             arr1 = <ewah_bool_array *> self.ewah_keys
10608  *             arr2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
10609  *             if arr1[0] != arr2[0]:
10610  *                 return 0
10611  */
10612     __pyx_v_arr2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
10613 
10614     /* "yt/utilities/lib/ewah_bool_wrap.pyx":661
10615  *             arr1 = <ewah_bool_array *> self.ewah_keys
10616  *             arr2 = <ewah_bool_array *> solf.ewah_keys
10617  *             if arr1[0] != arr2[0]:             # <<<<<<<<<<<<<<
10618  *                 return 0
10619  *             # Refn
10620  */
10621     __pyx_t_1 = (((__pyx_v_arr1[0]) != (__pyx_v_arr2[0])) != 0);
10622     if (__pyx_t_1) {
10623 
10624       /* "yt/utilities/lib/ewah_bool_wrap.pyx":662
10625  *             arr2 = <ewah_bool_array *> solf.ewah_keys
10626  *             if arr1[0] != arr2[0]:
10627  *                 return 0             # <<<<<<<<<<<<<<
10628  *             # Refn
10629  *             arr1 = <ewah_bool_array *> self.ewah_refn
10630  */
10631       __pyx_r = 0;
10632       goto __pyx_L0;
10633 
10634       /* "yt/utilities/lib/ewah_bool_wrap.pyx":661
10635  *             arr1 = <ewah_bool_array *> self.ewah_keys
10636  *             arr2 = <ewah_bool_array *> solf.ewah_keys
10637  *             if arr1[0] != arr2[0]:             # <<<<<<<<<<<<<<
10638  *                 return 0
10639  *             # Refn
10640  */
10641     }
10642 
10643     /* "yt/utilities/lib/ewah_bool_wrap.pyx":664
10644  *                 return 0
10645  *             # Refn
10646  *             arr1 = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
10647  *             arr2 = <ewah_bool_array *> solf.ewah_refn
10648  *             if arr1[0] != arr2[0]:
10649  */
10650     __pyx_v_arr1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
10651 
10652     /* "yt/utilities/lib/ewah_bool_wrap.pyx":665
10653  *             # Refn
10654  *             arr1 = <ewah_bool_array *> self.ewah_refn
10655  *             arr2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
10656  *             if arr1[0] != arr2[0]:
10657  *                 return 0
10658  */
10659     __pyx_v_arr2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
10660 
10661     /* "yt/utilities/lib/ewah_bool_wrap.pyx":666
10662  *             arr1 = <ewah_bool_array *> self.ewah_refn
10663  *             arr2 = <ewah_bool_array *> solf.ewah_refn
10664  *             if arr1[0] != arr2[0]:             # <<<<<<<<<<<<<<
10665  *                 return 0
10666  *             # Map
10667  */
10668     __pyx_t_1 = (((__pyx_v_arr1[0]) != (__pyx_v_arr2[0])) != 0);
10669     if (__pyx_t_1) {
10670 
10671       /* "yt/utilities/lib/ewah_bool_wrap.pyx":667
10672  *             arr2 = <ewah_bool_array *> solf.ewah_refn
10673  *             if arr1[0] != arr2[0]:
10674  *                 return 0             # <<<<<<<<<<<<<<
10675  *             # Map
10676  *             map1 = <ewahmap *> self.ewah_coll
10677  */
10678       __pyx_r = 0;
10679       goto __pyx_L0;
10680 
10681       /* "yt/utilities/lib/ewah_bool_wrap.pyx":666
10682  *             arr1 = <ewah_bool_array *> self.ewah_refn
10683  *             arr2 = <ewah_bool_array *> solf.ewah_refn
10684  *             if arr1[0] != arr2[0]:             # <<<<<<<<<<<<<<
10685  *                 return 0
10686  *             # Map
10687  */
10688     }
10689 
10690     /* "yt/utilities/lib/ewah_bool_wrap.pyx":669
10691  *                 return 0
10692  *             # Map
10693  *             map1 = <ewahmap *> self.ewah_coll             # <<<<<<<<<<<<<<
10694  *             map2 = <ewahmap *> solf.ewah_coll
10695  *             it_map1 = map1[0].begin()
10696  */
10697     __pyx_v_map1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_self->ewah_coll);
10698 
10699     /* "yt/utilities/lib/ewah_bool_wrap.pyx":670
10700  *             # Map
10701  *             map1 = <ewahmap *> self.ewah_coll
10702  *             map2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
10703  *             it_map1 = map1[0].begin()
10704  *             while (it_map1 != map1[0].end()):
10705  */
10706     __pyx_v_map2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
10707 
10708     /* "yt/utilities/lib/ewah_bool_wrap.pyx":671
10709  *             map1 = <ewahmap *> self.ewah_coll
10710  *             map2 = <ewahmap *> solf.ewah_coll
10711  *             it_map1 = map1[0].begin()             # <<<<<<<<<<<<<<
10712  *             while (it_map1 != map1[0].end()):
10713  *                 it_map2 = map2[0].find(dereference(it_map1).first)
10714  */
10715     __pyx_v_it_map1 = (__pyx_v_map1[0]).begin();
10716 
10717     /* "yt/utilities/lib/ewah_bool_wrap.pyx":672
10718  *             map2 = <ewahmap *> solf.ewah_coll
10719  *             it_map1 = map1[0].begin()
10720  *             while (it_map1 != map1[0].end()):             # <<<<<<<<<<<<<<
10721  *                 it_map2 = map2[0].find(dereference(it_map1).first)
10722  *                 if it_map2 == map2[0].end():
10723  */
10724     while (1) {
10725       __pyx_t_1 = ((__pyx_v_it_map1 != (__pyx_v_map1[0]).end()) != 0);
10726       if (!__pyx_t_1) break;
10727 
10728       /* "yt/utilities/lib/ewah_bool_wrap.pyx":673
10729  *             it_map1 = map1[0].begin()
10730  *             while (it_map1 != map1[0].end()):
10731  *                 it_map2 = map2[0].find(dereference(it_map1).first)             # <<<<<<<<<<<<<<
10732  *                 if it_map2 == map2[0].end():
10733  *                     return 0
10734  */
10735       __pyx_v_it_map2 = (__pyx_v_map2[0]).find((*__pyx_v_it_map1).first);
10736 
10737       /* "yt/utilities/lib/ewah_bool_wrap.pyx":674
10738  *             while (it_map1 != map1[0].end()):
10739  *                 it_map2 = map2[0].find(dereference(it_map1).first)
10740  *                 if it_map2 == map2[0].end():             # <<<<<<<<<<<<<<
10741  *                     return 0
10742  *                 if dereference(it_map1).second != dereference(it_map2).second:
10743  */
10744       __pyx_t_1 = ((__pyx_v_it_map2 == (__pyx_v_map2[0]).end()) != 0);
10745       if (__pyx_t_1) {
10746 
10747         /* "yt/utilities/lib/ewah_bool_wrap.pyx":675
10748  *                 it_map2 = map2[0].find(dereference(it_map1).first)
10749  *                 if it_map2 == map2[0].end():
10750  *                     return 0             # <<<<<<<<<<<<<<
10751  *                 if dereference(it_map1).second != dereference(it_map2).second:
10752  *                     return 0
10753  */
10754         __pyx_r = 0;
10755         goto __pyx_L0;
10756 
10757         /* "yt/utilities/lib/ewah_bool_wrap.pyx":674
10758  *             while (it_map1 != map1[0].end()):
10759  *                 it_map2 = map2[0].find(dereference(it_map1).first)
10760  *                 if it_map2 == map2[0].end():             # <<<<<<<<<<<<<<
10761  *                     return 0
10762  *                 if dereference(it_map1).second != dereference(it_map2).second:
10763  */
10764       }
10765 
10766       /* "yt/utilities/lib/ewah_bool_wrap.pyx":676
10767  *                 if it_map2 == map2[0].end():
10768  *                     return 0
10769  *                 if dereference(it_map1).second != dereference(it_map2).second:             # <<<<<<<<<<<<<<
10770  *                     return 0
10771  *                 preincrement(it_map1)
10772  */
10773       __pyx_t_1 = (((*__pyx_v_it_map1).second != (*__pyx_v_it_map2).second) != 0);
10774       if (__pyx_t_1) {
10775 
10776         /* "yt/utilities/lib/ewah_bool_wrap.pyx":677
10777  *                     return 0
10778  *                 if dereference(it_map1).second != dereference(it_map2).second:
10779  *                     return 0             # <<<<<<<<<<<<<<
10780  *                 preincrement(it_map1)
10781  *             it_map2 =map2[0].begin()
10782  */
10783         __pyx_r = 0;
10784         goto __pyx_L0;
10785 
10786         /* "yt/utilities/lib/ewah_bool_wrap.pyx":676
10787  *                 if it_map2 == map2[0].end():
10788  *                     return 0
10789  *                 if dereference(it_map1).second != dereference(it_map2).second:             # <<<<<<<<<<<<<<
10790  *                     return 0
10791  *                 preincrement(it_map1)
10792  */
10793       }
10794 
10795       /* "yt/utilities/lib/ewah_bool_wrap.pyx":678
10796  *                 if dereference(it_map1).second != dereference(it_map2).second:
10797  *                     return 0
10798  *                 preincrement(it_map1)             # <<<<<<<<<<<<<<
10799  *             it_map2 =map2[0].begin()
10800  *             while (it_map2 != map2[0].end()):
10801  */
10802       (void)((++__pyx_v_it_map1));
10803     }
10804 
10805     /* "yt/utilities/lib/ewah_bool_wrap.pyx":679
10806  *                     return 0
10807  *                 preincrement(it_map1)
10808  *             it_map2 =map2[0].begin()             # <<<<<<<<<<<<<<
10809  *             while (it_map2 != map2[0].end()):
10810  *                 it_map1 = map1[0].find(dereference(it_map2).first)
10811  */
10812     __pyx_v_it_map2 = (__pyx_v_map2[0]).begin();
10813 
10814     /* "yt/utilities/lib/ewah_bool_wrap.pyx":680
10815  *                 preincrement(it_map1)
10816  *             it_map2 =map2[0].begin()
10817  *             while (it_map2 != map2[0].end()):             # <<<<<<<<<<<<<<
10818  *                 it_map1 = map1[0].find(dereference(it_map2).first)
10819  *                 if it_map1 == map1[0].end():
10820  */
10821     while (1) {
10822       __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_map2[0]).end()) != 0);
10823       if (!__pyx_t_1) break;
10824 
10825       /* "yt/utilities/lib/ewah_bool_wrap.pyx":681
10826  *             it_map2 =map2[0].begin()
10827  *             while (it_map2 != map2[0].end()):
10828  *                 it_map1 = map1[0].find(dereference(it_map2).first)             # <<<<<<<<<<<<<<
10829  *                 if it_map1 == map1[0].end():
10830  *                     return 0
10831  */
10832       __pyx_v_it_map1 = (__pyx_v_map1[0]).find((*__pyx_v_it_map2).first);
10833 
10834       /* "yt/utilities/lib/ewah_bool_wrap.pyx":682
10835  *             while (it_map2 != map2[0].end()):
10836  *                 it_map1 = map1[0].find(dereference(it_map2).first)
10837  *                 if it_map1 == map1[0].end():             # <<<<<<<<<<<<<<
10838  *                     return 0
10839  *                 if dereference(it_map2).second != dereference(it_map1).second:
10840  */
10841       __pyx_t_1 = ((__pyx_v_it_map1 == (__pyx_v_map1[0]).end()) != 0);
10842       if (__pyx_t_1) {
10843 
10844         /* "yt/utilities/lib/ewah_bool_wrap.pyx":683
10845  *                 it_map1 = map1[0].find(dereference(it_map2).first)
10846  *                 if it_map1 == map1[0].end():
10847  *                     return 0             # <<<<<<<<<<<<<<
10848  *                 if dereference(it_map2).second != dereference(it_map1).second:
10849  *                     return 0
10850  */
10851         __pyx_r = 0;
10852         goto __pyx_L0;
10853 
10854         /* "yt/utilities/lib/ewah_bool_wrap.pyx":682
10855  *             while (it_map2 != map2[0].end()):
10856  *                 it_map1 = map1[0].find(dereference(it_map2).first)
10857  *                 if it_map1 == map1[0].end():             # <<<<<<<<<<<<<<
10858  *                     return 0
10859  *                 if dereference(it_map2).second != dereference(it_map1).second:
10860  */
10861       }
10862 
10863       /* "yt/utilities/lib/ewah_bool_wrap.pyx":684
10864  *                 if it_map1 == map1[0].end():
10865  *                     return 0
10866  *                 if dereference(it_map2).second != dereference(it_map1).second:             # <<<<<<<<<<<<<<
10867  *                     return 0
10868  *                 preincrement(it_map2)
10869  */
10870       __pyx_t_1 = (((*__pyx_v_it_map2).second != (*__pyx_v_it_map1).second) != 0);
10871       if (__pyx_t_1) {
10872 
10873         /* "yt/utilities/lib/ewah_bool_wrap.pyx":685
10874  *                     return 0
10875  *                 if dereference(it_map2).second != dereference(it_map1).second:
10876  *                     return 0             # <<<<<<<<<<<<<<
10877  *                 preincrement(it_map2)
10878  *             # Match
10879  */
10880         __pyx_r = 0;
10881         goto __pyx_L0;
10882 
10883         /* "yt/utilities/lib/ewah_bool_wrap.pyx":684
10884  *                 if it_map1 == map1[0].end():
10885  *                     return 0
10886  *                 if dereference(it_map2).second != dereference(it_map1).second:             # <<<<<<<<<<<<<<
10887  *                     return 0
10888  *                 preincrement(it_map2)
10889  */
10890       }
10891 
10892       /* "yt/utilities/lib/ewah_bool_wrap.pyx":686
10893  *                 if dereference(it_map2).second != dereference(it_map1).second:
10894  *                     return 0
10895  *                 preincrement(it_map2)             # <<<<<<<<<<<<<<
10896  *             # Match
10897  *             return 1
10898  */
10899       (void)((++__pyx_v_it_map2));
10900     }
10901 
10902     /* "yt/utilities/lib/ewah_bool_wrap.pyx":688
10903  *                 preincrement(it_map2)
10904  *             # Match
10905  *             return 1             # <<<<<<<<<<<<<<
10906  *         # !=
10907  *         elif op == 3:
10908  */
10909     __pyx_r = 1;
10910     goto __pyx_L0;
10911 
10912     /* "yt/utilities/lib/ewah_bool_wrap.pyx":657
10913  *         cdef ewahmap_it it_map1, it_map2
10914  *         # ==
10915  *         if op == 2:             # <<<<<<<<<<<<<<
10916  *             # Keys
10917  *             arr1 = <ewah_bool_array *> self.ewah_keys
10918  */
10919     break;
10920     case 3:
10921 
10922     /* "yt/utilities/lib/ewah_bool_wrap.pyx":691
10923  *         # !=
10924  *         elif op == 3:
10925  *             if self._richcmp(solf, 2) == 1:             # <<<<<<<<<<<<<<
10926  *                 return 0
10927  *             return 1
10928  */
10929     __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_richcmp(__pyx_v_self, __pyx_v_solf, 2); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 691, __pyx_L1_error)
10930     __pyx_t_1 = ((__pyx_t_2 == 1) != 0);
10931     if (__pyx_t_1) {
10932 
10933       /* "yt/utilities/lib/ewah_bool_wrap.pyx":692
10934  *         elif op == 3:
10935  *             if self._richcmp(solf, 2) == 1:
10936  *                 return 0             # <<<<<<<<<<<<<<
10937  *             return 1
10938  *         else:
10939  */
10940       __pyx_r = 0;
10941       goto __pyx_L0;
10942 
10943       /* "yt/utilities/lib/ewah_bool_wrap.pyx":691
10944  *         # !=
10945  *         elif op == 3:
10946  *             if self._richcmp(solf, 2) == 1:             # <<<<<<<<<<<<<<
10947  *                 return 0
10948  *             return 1
10949  */
10950     }
10951 
10952     /* "yt/utilities/lib/ewah_bool_wrap.pyx":693
10953  *             if self._richcmp(solf, 2) == 1:
10954  *                 return 0
10955  *             return 1             # <<<<<<<<<<<<<<
10956  *         else:
10957  *             return -1
10958  */
10959     __pyx_r = 1;
10960     goto __pyx_L0;
10961 
10962     /* "yt/utilities/lib/ewah_bool_wrap.pyx":690
10963  *             return 1
10964  *         # !=
10965  *         elif op == 3:             # <<<<<<<<<<<<<<
10966  *             if self._richcmp(solf, 2) == 1:
10967  *                 return 0
10968  */
10969     break;
10970     default:
10971 
10972     /* "yt/utilities/lib/ewah_bool_wrap.pyx":695
10973  *             return 1
10974  *         else:
10975  *             return -1             # <<<<<<<<<<<<<<
10976  *             # options = ['<','<=','==','!=','>','>=']
10977  *             # raise NotImplementedError("Operator {} is not yet implemented.".format(options[op]))
10978  */
10979     __pyx_r = -1;
10980     goto __pyx_L0;
10981     break;
10982   }
10983 
10984   /* "yt/utilities/lib/ewah_bool_wrap.pyx":649
10985  *         self.ewah_coll[0].clear()
10986  *
10987  *     cdef int _richcmp(self, BoolArrayCollection solf, int op) except -1:             # <<<<<<<<<<<<<<
10988  *
10989  *         cdef ewah_bool_array *arr1
10990  */
10991 
10992   /* function exit code */
10993   __pyx_L1_error:;
10994   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection._richcmp", __pyx_clineno, __pyx_lineno, __pyx_filename);
10995   __pyx_r = -1;
10996   __pyx_L0:;
10997   __Pyx_RefNannyFinishContext();
10998   return __pyx_r;
10999 }
11000 
11001 /* "yt/utilities/lib/ewah_bool_wrap.pyx":699
11002  *             # raise NotImplementedError("Operator {} is not yet implemented.".format(options[op]))
11003  *
11004  *     def __richcmp__(BoolArrayCollection self, BoolArrayCollection solf, int op):             # <<<<<<<<<<<<<<
11005  *         if self._richcmp(solf, op) == 1:
11006  *             return True
11007  */
11008 
11009 /* Python wrapper */
11010 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_solf, int __pyx_v_op); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_3__richcmp__(PyObject * __pyx_v_self,PyObject * __pyx_v_solf,int __pyx_v_op)11011 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_solf, int __pyx_v_op) {
11012   PyObject *__pyx_r = 0;
11013   __Pyx_RefNannyDeclarations
11014   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
11015   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solf), __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection, 1, "solf", 0))) __PYX_ERR(0, 699, __pyx_L1_error)
11016   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_2__richcmp__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_solf), ((int)__pyx_v_op));
11017 
11018   /* function exit code */
11019   goto __pyx_L0;
11020   __pyx_L1_error:;
11021   __pyx_r = NULL;
11022   __pyx_L0:;
11023   __Pyx_RefNannyFinishContext();
11024   return __pyx_r;
11025 }
11026 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_2__richcmp__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf,int __pyx_v_op)11027 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_2__richcmp__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, int __pyx_v_op) {
11028   PyObject *__pyx_r = NULL;
11029   __Pyx_RefNannyDeclarations
11030   int __pyx_t_1;
11031   int __pyx_t_2;
11032   __Pyx_RefNannySetupContext("__richcmp__", 0);
11033 
11034   /* "yt/utilities/lib/ewah_bool_wrap.pyx":700
11035  *
11036  *     def __richcmp__(BoolArrayCollection self, BoolArrayCollection solf, int op):
11037  *         if self._richcmp(solf, op) == 1:             # <<<<<<<<<<<<<<
11038  *             return True
11039  *         else:
11040  */
11041   __pyx_t_1 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_richcmp(__pyx_v_self, __pyx_v_solf, __pyx_v_op); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 700, __pyx_L1_error)
11042   __pyx_t_2 = ((__pyx_t_1 == 1) != 0);
11043   if (__pyx_t_2) {
11044 
11045     /* "yt/utilities/lib/ewah_bool_wrap.pyx":701
11046  *     def __richcmp__(BoolArrayCollection self, BoolArrayCollection solf, int op):
11047  *         if self._richcmp(solf, op) == 1:
11048  *             return True             # <<<<<<<<<<<<<<
11049  *         else:
11050  *             return False
11051  */
11052     __Pyx_XDECREF(__pyx_r);
11053     __Pyx_INCREF(Py_True);
11054     __pyx_r = Py_True;
11055     goto __pyx_L0;
11056 
11057     /* "yt/utilities/lib/ewah_bool_wrap.pyx":700
11058  *
11059  *     def __richcmp__(BoolArrayCollection self, BoolArrayCollection solf, int op):
11060  *         if self._richcmp(solf, op) == 1:             # <<<<<<<<<<<<<<
11061  *             return True
11062  *         else:
11063  */
11064   }
11065 
11066   /* "yt/utilities/lib/ewah_bool_wrap.pyx":703
11067  *             return True
11068  *         else:
11069  *             return False             # <<<<<<<<<<<<<<
11070  *
11071  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
11072  */
11073   /*else*/ {
11074     __Pyx_XDECREF(__pyx_r);
11075     __Pyx_INCREF(Py_False);
11076     __pyx_r = Py_False;
11077     goto __pyx_L0;
11078   }
11079 
11080   /* "yt/utilities/lib/ewah_bool_wrap.pyx":699
11081  *             # raise NotImplementedError("Operator {} is not yet implemented.".format(options[op]))
11082  *
11083  *     def __richcmp__(BoolArrayCollection self, BoolArrayCollection solf, int op):             # <<<<<<<<<<<<<<
11084  *         if self._richcmp(solf, op) == 1:
11085  *             return True
11086  */
11087 
11088   /* function exit code */
11089   __pyx_L1_error:;
11090   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11091   __pyx_r = NULL;
11092   __pyx_L0:;
11093   __Pyx_XGIVEREF(__pyx_r);
11094   __Pyx_RefNannyFinishContext();
11095   return __pyx_r;
11096 }
11097 
11098 /* "yt/utilities/lib/ewah_bool_wrap.pyx":705
11099  *             return False
11100  *
11101  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
11102  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11103  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11104  */
11105 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set * __pyx_optional_args)11106 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set *__pyx_optional_args) {
11107   __pyx_t_5numpy_uint64_t __pyx_v_i2 = __pyx_k__8;
11108   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
11109   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
11110   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
11111   __Pyx_RefNannyDeclarations
11112   int __pyx_t_1;
11113   __Pyx_RefNannySetupContext("_set", 0);
11114   if (__pyx_optional_args) {
11115     if (__pyx_optional_args->__pyx_n > 0) {
11116       __pyx_v_i2 = __pyx_optional_args->i2;
11117     }
11118   }
11119 
11120   /* "yt/utilities/lib/ewah_bool_wrap.pyx":706
11121  *
11122  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
11123  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
11124  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11125  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11126  */
11127   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
11128 
11129   /* "yt/utilities/lib/ewah_bool_wrap.pyx":707
11130  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
11131  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11132  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
11133  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11134  *         ewah_keys[0].set(i1)
11135  */
11136   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
11137 
11138   /* "yt/utilities/lib/ewah_bool_wrap.pyx":708
11139  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11140  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11141  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
11142  *         ewah_keys[0].set(i1)
11143  *         # Note the 0 here, for dereferencing
11144  */
11145   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
11146 
11147   /* "yt/utilities/lib/ewah_bool_wrap.pyx":709
11148  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11149  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11150  *         ewah_keys[0].set(i1)             # <<<<<<<<<<<<<<
11151  *         # Note the 0 here, for dereferencing
11152  *         if i2 != FLAG:
11153  */
11154   (void)((__pyx_v_ewah_keys[0]).set(__pyx_v_i1));
11155 
11156   /* "yt/utilities/lib/ewah_bool_wrap.pyx":711
11157  *         ewah_keys[0].set(i1)
11158  *         # Note the 0 here, for dereferencing
11159  *         if i2 != FLAG:             # <<<<<<<<<<<<<<
11160  *             ewah_refn[0].set(i1)
11161  *             ewah_coll[0][i1].set(i2)
11162  */
11163   __pyx_t_1 = ((__pyx_v_i2 != __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG) != 0);
11164   if (__pyx_t_1) {
11165 
11166     /* "yt/utilities/lib/ewah_bool_wrap.pyx":712
11167  *         # Note the 0 here, for dereferencing
11168  *         if i2 != FLAG:
11169  *             ewah_refn[0].set(i1)             # <<<<<<<<<<<<<<
11170  *             ewah_coll[0][i1].set(i2)
11171  *
11172  */
11173     (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i1));
11174 
11175     /* "yt/utilities/lib/ewah_bool_wrap.pyx":713
11176  *         if i2 != FLAG:
11177  *             ewah_refn[0].set(i1)
11178  *             ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
11179  *
11180  *     def set(self, i1, i2 = FLAG):
11181  */
11182     (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
11183 
11184     /* "yt/utilities/lib/ewah_bool_wrap.pyx":711
11185  *         ewah_keys[0].set(i1)
11186  *         # Note the 0 here, for dereferencing
11187  *         if i2 != FLAG:             # <<<<<<<<<<<<<<
11188  *             ewah_refn[0].set(i1)
11189  *             ewah_coll[0][i1].set(i2)
11190  */
11191   }
11192 
11193   /* "yt/utilities/lib/ewah_bool_wrap.pyx":705
11194  *             return False
11195  *
11196  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
11197  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11198  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11199  */
11200 
11201   /* function exit code */
11202   __Pyx_RefNannyFinishContext();
11203 }
11204 
11205 /* "yt/utilities/lib/ewah_bool_wrap.pyx":715
11206  *             ewah_coll[0][i1].set(i2)
11207  *
11208  *     def set(self, i1, i2 = FLAG):             # <<<<<<<<<<<<<<
11209  *         self._set(i1, i2)
11210  *
11211  */
11212 
11213 /* Python wrapper */
11214 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_5set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_5set(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)11215 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_5set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11216   PyObject *__pyx_v_i1 = 0;
11217   PyObject *__pyx_v_i2 = 0;
11218   PyObject *__pyx_r = 0;
11219   __Pyx_RefNannyDeclarations
11220   __Pyx_RefNannySetupContext("set (wrapper)", 0);
11221   {
11222     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i1,&__pyx_n_s_i2,0};
11223     PyObject* values[2] = {0,0};
11224     values[1] = __pyx_k__9;
11225     if (unlikely(__pyx_kwds)) {
11226       Py_ssize_t kw_args;
11227       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11228       switch (pos_args) {
11229         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11230         CYTHON_FALLTHROUGH;
11231         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11232         CYTHON_FALLTHROUGH;
11233         case  0: break;
11234         default: goto __pyx_L5_argtuple_error;
11235       }
11236       kw_args = PyDict_Size(__pyx_kwds);
11237       switch (pos_args) {
11238         case  0:
11239         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i1)) != 0)) kw_args--;
11240         else goto __pyx_L5_argtuple_error;
11241         CYTHON_FALLTHROUGH;
11242         case  1:
11243         if (kw_args > 0) {
11244           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i2);
11245           if (value) { values[1] = value; kw_args--; }
11246         }
11247       }
11248       if (unlikely(kw_args > 0)) {
11249         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 715, __pyx_L3_error)
11250       }
11251     } else {
11252       switch (PyTuple_GET_SIZE(__pyx_args)) {
11253         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11254         CYTHON_FALLTHROUGH;
11255         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11256         break;
11257         default: goto __pyx_L5_argtuple_error;
11258       }
11259     }
11260     __pyx_v_i1 = values[0];
11261     __pyx_v_i2 = values[1];
11262   }
11263   goto __pyx_L4_argument_unpacking_done;
11264   __pyx_L5_argtuple_error:;
11265   __Pyx_RaiseArgtupleInvalid("set", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 715, __pyx_L3_error)
11266   __pyx_L3_error:;
11267   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
11268   __Pyx_RefNannyFinishContext();
11269   return NULL;
11270   __pyx_L4_argument_unpacking_done:;
11271   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_4set(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_i1, __pyx_v_i2);
11272 
11273   /* function exit code */
11274   __Pyx_RefNannyFinishContext();
11275   return __pyx_r;
11276 }
11277 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_4set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_i1,PyObject * __pyx_v_i2)11278 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_4set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1, PyObject *__pyx_v_i2) {
11279   PyObject *__pyx_r = NULL;
11280   __Pyx_RefNannyDeclarations
11281   __pyx_t_5numpy_uint64_t __pyx_t_1;
11282   __pyx_t_5numpy_uint64_t __pyx_t_2;
11283   struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set __pyx_t_3;
11284   __Pyx_RefNannySetupContext("set", 0);
11285 
11286   /* "yt/utilities/lib/ewah_bool_wrap.pyx":716
11287  *
11288  *     def set(self, i1, i2 = FLAG):
11289  *         self._set(i1, i2)             # <<<<<<<<<<<<<<
11290  *
11291  *     @cython.boundscheck(False)
11292  */
11293   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L1_error)
11294   __pyx_t_2 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i2); if (unlikely((__pyx_t_2 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L1_error)
11295   __pyx_t_3.__pyx_n = 1;
11296   __pyx_t_3.i2 = __pyx_t_2;
11297   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_t_1, &__pyx_t_3);
11298 
11299   /* "yt/utilities/lib/ewah_bool_wrap.pyx":715
11300  *             ewah_coll[0][i1].set(i2)
11301  *
11302  *     def set(self, i1, i2 = FLAG):             # <<<<<<<<<<<<<<
11303  *         self._set(i1, i2)
11304  *
11305  */
11306 
11307   /* function exit code */
11308   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11309   goto __pyx_L0;
11310   __pyx_L1_error:;
11311   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
11312   __pyx_r = NULL;
11313   __pyx_L0:;
11314   __Pyx_XGIVEREF(__pyx_r);
11315   __Pyx_RefNannyFinishContext();
11316   return __pyx_r;
11317 }
11318 
11319 /* "yt/utilities/lib/ewah_bool_wrap.pyx":722
11320  *     @cython.cdivision(True)
11321  *     @cython.initializedcheck(False)
11322  *     def set_from(self, np.uint64_t[:] ids):             # <<<<<<<<<<<<<<
11323  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11324  *         cdef np.uint64_t i
11325  */
11326 
11327 /* Python wrapper */
11328 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_7set_from(PyObject *__pyx_v_self, PyObject *__pyx_arg_ids); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_7set_from(PyObject * __pyx_v_self,PyObject * __pyx_arg_ids)11329 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_7set_from(PyObject *__pyx_v_self, PyObject *__pyx_arg_ids) {
11330   __Pyx_memviewslice __pyx_v_ids = { 0, 0, { 0 }, { 0 }, { 0 } };
11331   PyObject *__pyx_r = 0;
11332   __Pyx_RefNannyDeclarations
11333   __Pyx_RefNannySetupContext("set_from (wrapper)", 0);
11334   assert(__pyx_arg_ids); {
11335     __pyx_v_ids = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(__pyx_arg_ids, PyBUF_WRITABLE); if (unlikely(!__pyx_v_ids.memview)) __PYX_ERR(0, 722, __pyx_L3_error)
11336   }
11337   goto __pyx_L4_argument_unpacking_done;
11338   __pyx_L3_error:;
11339   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
11340   __Pyx_RefNannyFinishContext();
11341   return NULL;
11342   __pyx_L4_argument_unpacking_done:;
11343   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_6set_from(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_ids);
11344 
11345   /* function exit code */
11346   __Pyx_RefNannyFinishContext();
11347   return __pyx_r;
11348 }
11349 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_6set_from(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__Pyx_memviewslice __pyx_v_ids)11350 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_6set_from(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __Pyx_memviewslice __pyx_v_ids) {
11351   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
11352   __pyx_t_5numpy_uint64_t __pyx_v_i;
11353   __pyx_t_5numpy_uint64_t __pyx_v_last;
11354   PyObject *__pyx_r = NULL;
11355   __Pyx_RefNannyDeclarations
11356   Py_ssize_t __pyx_t_1;
11357   Py_ssize_t __pyx_t_2;
11358   __pyx_t_5numpy_uint64_t __pyx_t_3;
11359   __pyx_t_5numpy_uint64_t __pyx_t_4;
11360   int __pyx_t_5;
11361   __pyx_t_5numpy_uint64_t __pyx_t_6;
11362   __pyx_t_5numpy_uint64_t __pyx_t_7;
11363   PyObject *__pyx_t_8 = NULL;
11364   PyObject *__pyx_t_9 = NULL;
11365   PyObject *__pyx_t_10 = NULL;
11366   __Pyx_RefNannySetupContext("set_from", 0);
11367 
11368   /* "yt/utilities/lib/ewah_bool_wrap.pyx":723
11369  *     @cython.initializedcheck(False)
11370  *     def set_from(self, np.uint64_t[:] ids):
11371  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
11372  *         cdef np.uint64_t i
11373  *         cdef np.uint64_t last = 0
11374  */
11375   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
11376 
11377   /* "yt/utilities/lib/ewah_bool_wrap.pyx":725
11378  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11379  *         cdef np.uint64_t i
11380  *         cdef np.uint64_t last = 0             # <<<<<<<<<<<<<<
11381  *         for i in range(ids.shape[0]):
11382  *             if ids[i] < last:
11383  */
11384   __pyx_v_last = 0;
11385 
11386   /* "yt/utilities/lib/ewah_bool_wrap.pyx":726
11387  *         cdef np.uint64_t i
11388  *         cdef np.uint64_t last = 0
11389  *         for i in range(ids.shape[0]):             # <<<<<<<<<<<<<<
11390  *             if ids[i] < last:
11391  *                 raise RuntimeError
11392  */
11393   __pyx_t_1 = (__pyx_v_ids.shape[0]);
11394   __pyx_t_2 = __pyx_t_1;
11395   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
11396     __pyx_v_i = __pyx_t_3;
11397 
11398     /* "yt/utilities/lib/ewah_bool_wrap.pyx":727
11399  *         cdef np.uint64_t last = 0
11400  *         for i in range(ids.shape[0]):
11401  *             if ids[i] < last:             # <<<<<<<<<<<<<<
11402  *                 raise RuntimeError
11403  *             self._set(ids[i])
11404  */
11405     __pyx_t_4 = __pyx_v_i;
11406     __pyx_t_5 = (((*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_ids.data + __pyx_t_4 * __pyx_v_ids.strides[0]) ))) < __pyx_v_last) != 0);
11407     if (unlikely(__pyx_t_5)) {
11408 
11409       /* "yt/utilities/lib/ewah_bool_wrap.pyx":728
11410  *         for i in range(ids.shape[0]):
11411  *             if ids[i] < last:
11412  *                 raise RuntimeError             # <<<<<<<<<<<<<<
11413  *             self._set(ids[i])
11414  *             last = ids[i]
11415  */
11416       __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
11417       __PYX_ERR(0, 728, __pyx_L1_error)
11418 
11419       /* "yt/utilities/lib/ewah_bool_wrap.pyx":727
11420  *         cdef np.uint64_t last = 0
11421  *         for i in range(ids.shape[0]):
11422  *             if ids[i] < last:             # <<<<<<<<<<<<<<
11423  *                 raise RuntimeError
11424  *             self._set(ids[i])
11425  */
11426     }
11427 
11428     /* "yt/utilities/lib/ewah_bool_wrap.pyx":729
11429  *             if ids[i] < last:
11430  *                 raise RuntimeError
11431  *             self._set(ids[i])             # <<<<<<<<<<<<<<
11432  *             last = ids[i]
11433  *         print("Set from %s array and ended up with %s bytes" % (
11434  */
11435     __pyx_t_6 = __pyx_v_i;
11436     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, (*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_ids.data + __pyx_t_6 * __pyx_v_ids.strides[0]) ))), NULL);
11437 
11438     /* "yt/utilities/lib/ewah_bool_wrap.pyx":730
11439  *                 raise RuntimeError
11440  *             self._set(ids[i])
11441  *             last = ids[i]             # <<<<<<<<<<<<<<
11442  *         print("Set from %s array and ended up with %s bytes" % (
11443  *             ids.size, ewah_keys[0].sizeInBytes()))
11444  */
11445     __pyx_t_7 = __pyx_v_i;
11446     __pyx_v_last = (*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_ids.data + __pyx_t_7 * __pyx_v_ids.strides[0]) )));
11447   }
11448 
11449   /* "yt/utilities/lib/ewah_bool_wrap.pyx":732
11450  *             last = ids[i]
11451  *         print("Set from %s array and ended up with %s bytes" % (
11452  *             ids.size, ewah_keys[0].sizeInBytes()))             # <<<<<<<<<<<<<<
11453  *
11454  *     cdef void _set_coarse(self, np.uint64_t i1):
11455  */
11456   __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_v_ids, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_uint64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_uint64_t, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 732, __pyx_L1_error)
11457   __Pyx_GOTREF(__pyx_t_8);
11458   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 732, __pyx_L1_error)
11459   __Pyx_GOTREF(__pyx_t_9);
11460   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11461   __pyx_t_8 = __Pyx_PyInt_FromSize_t((__pyx_v_ewah_keys[0]).sizeInBytes()); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 732, __pyx_L1_error)
11462   __Pyx_GOTREF(__pyx_t_8);
11463   __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 732, __pyx_L1_error)
11464   __Pyx_GOTREF(__pyx_t_10);
11465   __Pyx_GIVEREF(__pyx_t_9);
11466   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
11467   __Pyx_GIVEREF(__pyx_t_8);
11468   PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
11469   __pyx_t_9 = 0;
11470   __pyx_t_8 = 0;
11471 
11472   /* "yt/utilities/lib/ewah_bool_wrap.pyx":731
11473  *             self._set(ids[i])
11474  *             last = ids[i]
11475  *         print("Set from %s array and ended up with %s bytes" % (             # <<<<<<<<<<<<<<
11476  *             ids.size, ewah_keys[0].sizeInBytes()))
11477  *
11478  */
11479   __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Set_from_s_array_and_ended_up_wi, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 731, __pyx_L1_error)
11480   __Pyx_GOTREF(__pyx_t_8);
11481   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11482   if (__Pyx_PrintOne(0, __pyx_t_8) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
11483   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11484 
11485   /* "yt/utilities/lib/ewah_bool_wrap.pyx":722
11486  *     @cython.cdivision(True)
11487  *     @cython.initializedcheck(False)
11488  *     def set_from(self, np.uint64_t[:] ids):             # <<<<<<<<<<<<<<
11489  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11490  *         cdef np.uint64_t i
11491  */
11492 
11493   /* function exit code */
11494   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11495   goto __pyx_L0;
11496   __pyx_L1_error:;
11497   __Pyx_XDECREF(__pyx_t_8);
11498   __Pyx_XDECREF(__pyx_t_9);
11499   __Pyx_XDECREF(__pyx_t_10);
11500   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set_from", __pyx_clineno, __pyx_lineno, __pyx_filename);
11501   __pyx_r = NULL;
11502   __pyx_L0:;
11503   __PYX_XDEC_MEMVIEW(&__pyx_v_ids, 1);
11504   __Pyx_XGIVEREF(__pyx_r);
11505   __Pyx_RefNannyFinishContext();
11506   return __pyx_r;
11507 }
11508 
11509 /* "yt/utilities/lib/ewah_bool_wrap.pyx":734
11510  *             ids.size, ewah_keys[0].sizeInBytes()))
11511  *
11512  *     cdef void _set_coarse(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
11513  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11514  *         ewah_keys[0].set(i1)
11515  */
11516 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1)11517 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
11518   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
11519   __Pyx_RefNannyDeclarations
11520   __Pyx_RefNannySetupContext("_set_coarse", 0);
11521 
11522   /* "yt/utilities/lib/ewah_bool_wrap.pyx":735
11523  *
11524  *     cdef void _set_coarse(self, np.uint64_t i1):
11525  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
11526  *         ewah_keys[0].set(i1)
11527  *
11528  */
11529   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
11530 
11531   /* "yt/utilities/lib/ewah_bool_wrap.pyx":736
11532  *     cdef void _set_coarse(self, np.uint64_t i1):
11533  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11534  *         ewah_keys[0].set(i1)             # <<<<<<<<<<<<<<
11535  *
11536  *     def set_coarse(self, i1):
11537  */
11538   (void)((__pyx_v_ewah_keys[0]).set(__pyx_v_i1));
11539 
11540   /* "yt/utilities/lib/ewah_bool_wrap.pyx":734
11541  *             ids.size, ewah_keys[0].sizeInBytes()))
11542  *
11543  *     cdef void _set_coarse(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
11544  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11545  *         ewah_keys[0].set(i1)
11546  */
11547 
11548   /* function exit code */
11549   __Pyx_RefNannyFinishContext();
11550 }
11551 
11552 /* "yt/utilities/lib/ewah_bool_wrap.pyx":738
11553  *         ewah_keys[0].set(i1)
11554  *
11555  *     def set_coarse(self, i1):             # <<<<<<<<<<<<<<
11556  *         return self._set_coarse(i1)
11557  *
11558  */
11559 
11560 /* Python wrapper */
11561 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_9set_coarse(PyObject *__pyx_v_self, PyObject *__pyx_v_i1); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_9set_coarse(PyObject * __pyx_v_self,PyObject * __pyx_v_i1)11562 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_9set_coarse(PyObject *__pyx_v_self, PyObject *__pyx_v_i1) {
11563   PyObject *__pyx_r = 0;
11564   __Pyx_RefNannyDeclarations
11565   __Pyx_RefNannySetupContext("set_coarse (wrapper)", 0);
11566   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_8set_coarse(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((PyObject *)__pyx_v_i1));
11567 
11568   /* function exit code */
11569   __Pyx_RefNannyFinishContext();
11570   return __pyx_r;
11571 }
11572 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_8set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_i1)11573 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_8set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1) {
11574   PyObject *__pyx_r = NULL;
11575   __Pyx_RefNannyDeclarations
11576   __pyx_t_5numpy_uint64_t __pyx_t_1;
11577   PyObject *__pyx_t_2 = NULL;
11578   __Pyx_RefNannySetupContext("set_coarse", 0);
11579 
11580   /* "yt/utilities/lib/ewah_bool_wrap.pyx":739
11581  *
11582  *     def set_coarse(self, i1):
11583  *         return self._set_coarse(i1)             # <<<<<<<<<<<<<<
11584  *
11585  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):
11586  */
11587   __Pyx_XDECREF(__pyx_r);
11588   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L1_error)
11589   __pyx_t_2 = __Pyx_void_to_None(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_set_coarse(__pyx_v_self, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error)
11590   __Pyx_GOTREF(__pyx_t_2);
11591   __pyx_r = __pyx_t_2;
11592   __pyx_t_2 = 0;
11593   goto __pyx_L0;
11594 
11595   /* "yt/utilities/lib/ewah_bool_wrap.pyx":738
11596  *         ewah_keys[0].set(i1)
11597  *
11598  *     def set_coarse(self, i1):             # <<<<<<<<<<<<<<
11599  *         return self._set_coarse(i1)
11600  *
11601  */
11602 
11603   /* function exit code */
11604   __pyx_L1_error:;
11605   __Pyx_XDECREF(__pyx_t_2);
11606   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set_coarse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11607   __pyx_r = NULL;
11608   __pyx_L0:;
11609   __Pyx_XGIVEREF(__pyx_r);
11610   __Pyx_RefNannyFinishContext();
11611   return __pyx_r;
11612 }
11613 
11614 /* "yt/utilities/lib/ewah_bool_wrap.pyx":741
11615  *         return self._set_coarse(i1)
11616  *
11617  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
11618  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11619  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11620  */
11621 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,__pyx_t_5numpy_uint64_t __pyx_v_i2)11622 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2) {
11623   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
11624   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
11625   __Pyx_RefNannyDeclarations
11626   __Pyx_RefNannySetupContext("_set_refined", 0);
11627 
11628   /* "yt/utilities/lib/ewah_bool_wrap.pyx":742
11629  *
11630  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):
11631  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
11632  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11633  *         # Note the 0 here, for dereferencing
11634  */
11635   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
11636 
11637   /* "yt/utilities/lib/ewah_bool_wrap.pyx":743
11638  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):
11639  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11640  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
11641  *         # Note the 0 here, for dereferencing
11642  *         ewah_refn[0].set(i1)
11643  */
11644   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
11645 
11646   /* "yt/utilities/lib/ewah_bool_wrap.pyx":745
11647  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11648  *         # Note the 0 here, for dereferencing
11649  *         ewah_refn[0].set(i1)             # <<<<<<<<<<<<<<
11650  *         ewah_coll[0][i1].set(i2)
11651  *
11652  */
11653   (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i1));
11654 
11655   /* "yt/utilities/lib/ewah_bool_wrap.pyx":746
11656  *         # Note the 0 here, for dereferencing
11657  *         ewah_refn[0].set(i1)
11658  *         ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
11659  *
11660  *     @cython.boundscheck(False)
11661  */
11662   (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
11663 
11664   /* "yt/utilities/lib/ewah_bool_wrap.pyx":741
11665  *         return self._set_coarse(i1)
11666  *
11667  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
11668  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11669  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11670  */
11671 
11672   /* function exit code */
11673   __Pyx_RefNannyFinishContext();
11674 }
11675 
11676 /* "yt/utilities/lib/ewah_bool_wrap.pyx":752
11677  *     @cython.cdivision(True)
11678  *     @cython.initializedcheck(False)
11679  *     cdef void _set_coarse_array(self, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
11680  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11681  *         cdef np.uint64_t i1
11682  */
11683 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__Pyx_memviewslice __pyx_v_arr)11684 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __Pyx_memviewslice __pyx_v_arr) {
11685   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
11686   __pyx_t_5numpy_uint64_t __pyx_v_i1;
11687   __Pyx_RefNannyDeclarations
11688   Py_ssize_t __pyx_t_1;
11689   Py_ssize_t __pyx_t_2;
11690   __pyx_t_5numpy_uint64_t __pyx_t_3;
11691   __pyx_t_5numpy_uint64_t __pyx_t_4;
11692   int __pyx_t_5;
11693   __Pyx_RefNannySetupContext("_set_coarse_array", 0);
11694 
11695   /* "yt/utilities/lib/ewah_bool_wrap.pyx":753
11696  *     @cython.initializedcheck(False)
11697  *     cdef void _set_coarse_array(self, np.uint8_t[:] arr):
11698  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
11699  *         cdef np.uint64_t i1
11700  *         for i1 in range(arr.shape[0]):
11701  */
11702   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
11703 
11704   /* "yt/utilities/lib/ewah_bool_wrap.pyx":755
11705  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11706  *         cdef np.uint64_t i1
11707  *         for i1 in range(arr.shape[0]):             # <<<<<<<<<<<<<<
11708  *             if arr[i1] == 1:
11709  *                 ewah_keys[0].set(i1)
11710  */
11711   __pyx_t_1 = (__pyx_v_arr.shape[0]);
11712   __pyx_t_2 = __pyx_t_1;
11713   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
11714     __pyx_v_i1 = __pyx_t_3;
11715 
11716     /* "yt/utilities/lib/ewah_bool_wrap.pyx":756
11717  *         cdef np.uint64_t i1
11718  *         for i1 in range(arr.shape[0]):
11719  *             if arr[i1] == 1:             # <<<<<<<<<<<<<<
11720  *                 ewah_keys[0].set(i1)
11721  *                 # self._set_coarse(i1)
11722  */
11723     __pyx_t_4 = __pyx_v_i1;
11724     __pyx_t_5 = (((*((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_arr.data + __pyx_t_4 * __pyx_v_arr.strides[0]) ))) == 1) != 0);
11725     if (__pyx_t_5) {
11726 
11727       /* "yt/utilities/lib/ewah_bool_wrap.pyx":757
11728  *         for i1 in range(arr.shape[0]):
11729  *             if arr[i1] == 1:
11730  *                 ewah_keys[0].set(i1)             # <<<<<<<<<<<<<<
11731  *                 # self._set_coarse(i1)
11732  *
11733  */
11734       (void)((__pyx_v_ewah_keys[0]).set(__pyx_v_i1));
11735 
11736       /* "yt/utilities/lib/ewah_bool_wrap.pyx":756
11737  *         cdef np.uint64_t i1
11738  *         for i1 in range(arr.shape[0]):
11739  *             if arr[i1] == 1:             # <<<<<<<<<<<<<<
11740  *                 ewah_keys[0].set(i1)
11741  *                 # self._set_coarse(i1)
11742  */
11743     }
11744   }
11745 
11746   /* "yt/utilities/lib/ewah_bool_wrap.pyx":752
11747  *     @cython.cdivision(True)
11748  *     @cython.initializedcheck(False)
11749  *     cdef void _set_coarse_array(self, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
11750  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
11751  *         cdef np.uint64_t i1
11752  */
11753 
11754   /* function exit code */
11755   __Pyx_RefNannyFinishContext();
11756 }
11757 
11758 /* "yt/utilities/lib/ewah_bool_wrap.pyx":764
11759  *     @cython.cdivision(True)
11760  *     @cython.initializedcheck(False)
11761  *     cdef void _set_refined_array(self, np.uint64_t i1, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
11762  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11763  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11764  */
11765 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,__Pyx_memviewslice __pyx_v_arr)11766 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __Pyx_memviewslice __pyx_v_arr) {
11767   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
11768   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
11769   __pyx_t_5numpy_uint64_t __pyx_v_i2;
11770   __Pyx_RefNannyDeclarations
11771   Py_ssize_t __pyx_t_1;
11772   Py_ssize_t __pyx_t_2;
11773   __pyx_t_5numpy_uint64_t __pyx_t_3;
11774   __pyx_t_5numpy_uint64_t __pyx_t_4;
11775   int __pyx_t_5;
11776   __Pyx_RefNannySetupContext("_set_refined_array", 0);
11777 
11778   /* "yt/utilities/lib/ewah_bool_wrap.pyx":765
11779  *     @cython.initializedcheck(False)
11780  *     cdef void _set_refined_array(self, np.uint64_t i1, np.uint8_t[:] arr):
11781  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
11782  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11783  *         cdef np.uint64_t i2
11784  */
11785   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
11786 
11787   /* "yt/utilities/lib/ewah_bool_wrap.pyx":766
11788  *     cdef void _set_refined_array(self, np.uint64_t i1, np.uint8_t[:] arr):
11789  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11790  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
11791  *         cdef np.uint64_t i2
11792  *         for i2 in range(arr.shape[0]):
11793  */
11794   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
11795 
11796   /* "yt/utilities/lib/ewah_bool_wrap.pyx":768
11797  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11798  *         cdef np.uint64_t i2
11799  *         for i2 in range(arr.shape[0]):             # <<<<<<<<<<<<<<
11800  *             if arr[i2] == 1:
11801  *                 ewah_refn[0].set(i1)
11802  */
11803   __pyx_t_1 = (__pyx_v_arr.shape[0]);
11804   __pyx_t_2 = __pyx_t_1;
11805   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
11806     __pyx_v_i2 = __pyx_t_3;
11807 
11808     /* "yt/utilities/lib/ewah_bool_wrap.pyx":769
11809  *         cdef np.uint64_t i2
11810  *         for i2 in range(arr.shape[0]):
11811  *             if arr[i2] == 1:             # <<<<<<<<<<<<<<
11812  *                 ewah_refn[0].set(i1)
11813  *                 ewah_coll[0][i1].set(i2)
11814  */
11815     __pyx_t_4 = __pyx_v_i2;
11816     __pyx_t_5 = (((*((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_arr.data + __pyx_t_4 * __pyx_v_arr.strides[0]) ))) == 1) != 0);
11817     if (__pyx_t_5) {
11818 
11819       /* "yt/utilities/lib/ewah_bool_wrap.pyx":770
11820  *         for i2 in range(arr.shape[0]):
11821  *             if arr[i2] == 1:
11822  *                 ewah_refn[0].set(i1)             # <<<<<<<<<<<<<<
11823  *                 ewah_coll[0][i1].set(i2)
11824  *                 # self._set_refined(i1, i2)
11825  */
11826       (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i1));
11827 
11828       /* "yt/utilities/lib/ewah_bool_wrap.pyx":771
11829  *             if arr[i2] == 1:
11830  *                 ewah_refn[0].set(i1)
11831  *                 ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
11832  *                 # self._set_refined(i1, i2)
11833  *
11834  */
11835       (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
11836 
11837       /* "yt/utilities/lib/ewah_bool_wrap.pyx":769
11838  *         cdef np.uint64_t i2
11839  *         for i2 in range(arr.shape[0]):
11840  *             if arr[i2] == 1:             # <<<<<<<<<<<<<<
11841  *                 ewah_refn[0].set(i1)
11842  *                 ewah_coll[0][i1].set(i2)
11843  */
11844     }
11845   }
11846 
11847   /* "yt/utilities/lib/ewah_bool_wrap.pyx":764
11848  *     @cython.cdivision(True)
11849  *     @cython.initializedcheck(False)
11850  *     cdef void _set_refined_array(self, np.uint64_t i1, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
11851  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
11852  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11853  */
11854 
11855   /* function exit code */
11856   __Pyx_RefNannyFinishContext();
11857 }
11858 
11859 /* "yt/utilities/lib/ewah_bool_wrap.pyx":774
11860  *                 # self._set_refined(i1, i2)
11861  *
11862  *     def set_refined(self, i1, i2):             # <<<<<<<<<<<<<<
11863  *         return self._set_refined(i1, i2)
11864  *
11865  */
11866 
11867 /* Python wrapper */
11868 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_11set_refined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_11set_refined(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)11869 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_11set_refined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11870   PyObject *__pyx_v_i1 = 0;
11871   PyObject *__pyx_v_i2 = 0;
11872   PyObject *__pyx_r = 0;
11873   __Pyx_RefNannyDeclarations
11874   __Pyx_RefNannySetupContext("set_refined (wrapper)", 0);
11875   {
11876     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i1,&__pyx_n_s_i2,0};
11877     PyObject* values[2] = {0,0};
11878     if (unlikely(__pyx_kwds)) {
11879       Py_ssize_t kw_args;
11880       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11881       switch (pos_args) {
11882         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11883         CYTHON_FALLTHROUGH;
11884         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11885         CYTHON_FALLTHROUGH;
11886         case  0: break;
11887         default: goto __pyx_L5_argtuple_error;
11888       }
11889       kw_args = PyDict_Size(__pyx_kwds);
11890       switch (pos_args) {
11891         case  0:
11892         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i1)) != 0)) kw_args--;
11893         else goto __pyx_L5_argtuple_error;
11894         CYTHON_FALLTHROUGH;
11895         case  1:
11896         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i2)) != 0)) kw_args--;
11897         else {
11898           __Pyx_RaiseArgtupleInvalid("set_refined", 1, 2, 2, 1); __PYX_ERR(0, 774, __pyx_L3_error)
11899         }
11900       }
11901       if (unlikely(kw_args > 0)) {
11902         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_refined") < 0)) __PYX_ERR(0, 774, __pyx_L3_error)
11903       }
11904     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11905       goto __pyx_L5_argtuple_error;
11906     } else {
11907       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11908       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11909     }
11910     __pyx_v_i1 = values[0];
11911     __pyx_v_i2 = values[1];
11912   }
11913   goto __pyx_L4_argument_unpacking_done;
11914   __pyx_L5_argtuple_error:;
11915   __Pyx_RaiseArgtupleInvalid("set_refined", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 774, __pyx_L3_error)
11916   __pyx_L3_error:;
11917   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set_refined", __pyx_clineno, __pyx_lineno, __pyx_filename);
11918   __Pyx_RefNannyFinishContext();
11919   return NULL;
11920   __pyx_L4_argument_unpacking_done:;
11921   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_10set_refined(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_i1, __pyx_v_i2);
11922 
11923   /* function exit code */
11924   __Pyx_RefNannyFinishContext();
11925   return __pyx_r;
11926 }
11927 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_10set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_i1,PyObject * __pyx_v_i2)11928 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_10set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1, PyObject *__pyx_v_i2) {
11929   PyObject *__pyx_r = NULL;
11930   __Pyx_RefNannyDeclarations
11931   __pyx_t_5numpy_uint64_t __pyx_t_1;
11932   __pyx_t_5numpy_uint64_t __pyx_t_2;
11933   PyObject *__pyx_t_3 = NULL;
11934   __Pyx_RefNannySetupContext("set_refined", 0);
11935 
11936   /* "yt/utilities/lib/ewah_bool_wrap.pyx":775
11937  *
11938  *     def set_refined(self, i1, i2):
11939  *         return self._set_refined(i1, i2)             # <<<<<<<<<<<<<<
11940  *
11941  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):
11942  */
11943   __Pyx_XDECREF(__pyx_r);
11944   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L1_error)
11945   __pyx_t_2 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i2); if (unlikely((__pyx_t_2 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L1_error)
11946   __pyx_t_3 = __Pyx_void_to_None(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_set_refined(__pyx_v_self, __pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
11947   __Pyx_GOTREF(__pyx_t_3);
11948   __pyx_r = __pyx_t_3;
11949   __pyx_t_3 = 0;
11950   goto __pyx_L0;
11951 
11952   /* "yt/utilities/lib/ewah_bool_wrap.pyx":774
11953  *                 # self._set_refined(i1, i2)
11954  *
11955  *     def set_refined(self, i1, i2):             # <<<<<<<<<<<<<<
11956  *         return self._set_refined(i1, i2)
11957  *
11958  */
11959 
11960   /* function exit code */
11961   __pyx_L1_error:;
11962   __Pyx_XDECREF(__pyx_t_3);
11963   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set_refined", __pyx_clineno, __pyx_lineno, __pyx_filename);
11964   __pyx_r = NULL;
11965   __pyx_L0:;
11966   __Pyx_XGIVEREF(__pyx_r);
11967   __Pyx_RefNannyFinishContext();
11968   return __pyx_r;
11969 }
11970 
11971 /* "yt/utilities/lib/ewah_bool_wrap.pyx":777
11972  *         return self._set_refined(i1, i2)
11973  *
11974  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
11975  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11976  *         ewah_coll[0][i1].set(i2)
11977  */
11978 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,__pyx_t_5numpy_uint64_t __pyx_v_i2)11979 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2) {
11980   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
11981   __Pyx_RefNannyDeclarations
11982   __Pyx_RefNannySetupContext("_set_map", 0);
11983 
11984   /* "yt/utilities/lib/ewah_bool_wrap.pyx":778
11985  *
11986  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):
11987  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
11988  *         ewah_coll[0][i1].set(i2)
11989  *
11990  */
11991   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
11992 
11993   /* "yt/utilities/lib/ewah_bool_wrap.pyx":779
11994  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):
11995  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
11996  *         ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
11997  *
11998  *     def set_map(self, i1, i2):
11999  */
12000   (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
12001 
12002   /* "yt/utilities/lib/ewah_bool_wrap.pyx":777
12003  *         return self._set_refined(i1, i2)
12004  *
12005  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
12006  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
12007  *         ewah_coll[0][i1].set(i2)
12008  */
12009 
12010   /* function exit code */
12011   __Pyx_RefNannyFinishContext();
12012 }
12013 
12014 /* "yt/utilities/lib/ewah_bool_wrap.pyx":781
12015  *         ewah_coll[0][i1].set(i2)
12016  *
12017  *     def set_map(self, i1, i2):             # <<<<<<<<<<<<<<
12018  *         self._set_map(i1, i2)
12019  *
12020  */
12021 
12022 /* Python wrapper */
12023 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_13set_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_13set_map(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)12024 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_13set_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12025   PyObject *__pyx_v_i1 = 0;
12026   PyObject *__pyx_v_i2 = 0;
12027   PyObject *__pyx_r = 0;
12028   __Pyx_RefNannyDeclarations
12029   __Pyx_RefNannySetupContext("set_map (wrapper)", 0);
12030   {
12031     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i1,&__pyx_n_s_i2,0};
12032     PyObject* values[2] = {0,0};
12033     if (unlikely(__pyx_kwds)) {
12034       Py_ssize_t kw_args;
12035       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12036       switch (pos_args) {
12037         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12038         CYTHON_FALLTHROUGH;
12039         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12040         CYTHON_FALLTHROUGH;
12041         case  0: break;
12042         default: goto __pyx_L5_argtuple_error;
12043       }
12044       kw_args = PyDict_Size(__pyx_kwds);
12045       switch (pos_args) {
12046         case  0:
12047         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i1)) != 0)) kw_args--;
12048         else goto __pyx_L5_argtuple_error;
12049         CYTHON_FALLTHROUGH;
12050         case  1:
12051         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i2)) != 0)) kw_args--;
12052         else {
12053           __Pyx_RaiseArgtupleInvalid("set_map", 1, 2, 2, 1); __PYX_ERR(0, 781, __pyx_L3_error)
12054         }
12055       }
12056       if (unlikely(kw_args > 0)) {
12057         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_map") < 0)) __PYX_ERR(0, 781, __pyx_L3_error)
12058       }
12059     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12060       goto __pyx_L5_argtuple_error;
12061     } else {
12062       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12063       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12064     }
12065     __pyx_v_i1 = values[0];
12066     __pyx_v_i2 = values[1];
12067   }
12068   goto __pyx_L4_argument_unpacking_done;
12069   __pyx_L5_argtuple_error:;
12070   __Pyx_RaiseArgtupleInvalid("set_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 781, __pyx_L3_error)
12071   __pyx_L3_error:;
12072   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
12073   __Pyx_RefNannyFinishContext();
12074   return NULL;
12075   __pyx_L4_argument_unpacking_done:;
12076   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_12set_map(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_i1, __pyx_v_i2);
12077 
12078   /* function exit code */
12079   __Pyx_RefNannyFinishContext();
12080   return __pyx_r;
12081 }
12082 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_12set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_i1,PyObject * __pyx_v_i2)12083 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_12set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1, PyObject *__pyx_v_i2) {
12084   PyObject *__pyx_r = NULL;
12085   __Pyx_RefNannyDeclarations
12086   __pyx_t_5numpy_uint64_t __pyx_t_1;
12087   __pyx_t_5numpy_uint64_t __pyx_t_2;
12088   __Pyx_RefNannySetupContext("set_map", 0);
12089 
12090   /* "yt/utilities/lib/ewah_bool_wrap.pyx":782
12091  *
12092  *     def set_map(self, i1, i2):
12093  *         self._set_map(i1, i2)             # <<<<<<<<<<<<<<
12094  *
12095  *     cdef void _set_refn(self, np.uint64_t i1):
12096  */
12097   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L1_error)
12098   __pyx_t_2 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i2); if (unlikely((__pyx_t_2 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L1_error)
12099   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_set_map(__pyx_v_self, __pyx_t_1, __pyx_t_2);
12100 
12101   /* "yt/utilities/lib/ewah_bool_wrap.pyx":781
12102  *         ewah_coll[0][i1].set(i2)
12103  *
12104  *     def set_map(self, i1, i2):             # <<<<<<<<<<<<<<
12105  *         self._set_map(i1, i2)
12106  *
12107  */
12108 
12109   /* function exit code */
12110   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12111   goto __pyx_L0;
12112   __pyx_L1_error:;
12113   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
12114   __pyx_r = NULL;
12115   __pyx_L0:;
12116   __Pyx_XGIVEREF(__pyx_r);
12117   __Pyx_RefNannyFinishContext();
12118   return __pyx_r;
12119 }
12120 
12121 /* "yt/utilities/lib/ewah_bool_wrap.pyx":784
12122  *         self._set_map(i1, i2)
12123  *
12124  *     cdef void _set_refn(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
12125  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
12126  *         ewah_refn[0].set(i1)
12127  */
12128 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1)12129 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
12130   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
12131   __Pyx_RefNannyDeclarations
12132   __Pyx_RefNannySetupContext("_set_refn", 0);
12133 
12134   /* "yt/utilities/lib/ewah_bool_wrap.pyx":785
12135  *
12136  *     cdef void _set_refn(self, np.uint64_t i1):
12137  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
12138  *         ewah_refn[0].set(i1)
12139  *
12140  */
12141   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
12142 
12143   /* "yt/utilities/lib/ewah_bool_wrap.pyx":786
12144  *     cdef void _set_refn(self, np.uint64_t i1):
12145  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
12146  *         ewah_refn[0].set(i1)             # <<<<<<<<<<<<<<
12147  *
12148  *     def set_refn(self, i1):
12149  */
12150   (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i1));
12151 
12152   /* "yt/utilities/lib/ewah_bool_wrap.pyx":784
12153  *         self._set_map(i1, i2)
12154  *
12155  *     cdef void _set_refn(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
12156  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
12157  *         ewah_refn[0].set(i1)
12158  */
12159 
12160   /* function exit code */
12161   __Pyx_RefNannyFinishContext();
12162 }
12163 
12164 /* "yt/utilities/lib/ewah_bool_wrap.pyx":788
12165  *         ewah_refn[0].set(i1)
12166  *
12167  *     def set_refn(self, i1):             # <<<<<<<<<<<<<<
12168  *         self._set_refn(i1)
12169  *
12170  */
12171 
12172 /* Python wrapper */
12173 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_15set_refn(PyObject *__pyx_v_self, PyObject *__pyx_v_i1); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_15set_refn(PyObject * __pyx_v_self,PyObject * __pyx_v_i1)12174 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_15set_refn(PyObject *__pyx_v_self, PyObject *__pyx_v_i1) {
12175   PyObject *__pyx_r = 0;
12176   __Pyx_RefNannyDeclarations
12177   __Pyx_RefNannySetupContext("set_refn (wrapper)", 0);
12178   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_14set_refn(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((PyObject *)__pyx_v_i1));
12179 
12180   /* function exit code */
12181   __Pyx_RefNannyFinishContext();
12182   return __pyx_r;
12183 }
12184 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_14set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_i1)12185 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_14set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1) {
12186   PyObject *__pyx_r = NULL;
12187   __Pyx_RefNannyDeclarations
12188   __pyx_t_5numpy_uint64_t __pyx_t_1;
12189   __Pyx_RefNannySetupContext("set_refn", 0);
12190 
12191   /* "yt/utilities/lib/ewah_bool_wrap.pyx":789
12192  *
12193  *     def set_refn(self, i1):
12194  *         self._set_refn(i1)             # <<<<<<<<<<<<<<
12195  *
12196  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
12197  */
12198   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 789, __pyx_L1_error)
12199   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_set_refn(__pyx_v_self, __pyx_t_1);
12200 
12201   /* "yt/utilities/lib/ewah_bool_wrap.pyx":788
12202  *         ewah_refn[0].set(i1)
12203  *
12204  *     def set_refn(self, i1):             # <<<<<<<<<<<<<<
12205  *         self._set_refn(i1)
12206  *
12207  */
12208 
12209   /* function exit code */
12210   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12211   goto __pyx_L0;
12212   __pyx_L1_error:;
12213   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.set_refn", __pyx_clineno, __pyx_lineno, __pyx_filename);
12214   __pyx_r = NULL;
12215   __pyx_L0:;
12216   __Pyx_XGIVEREF(__pyx_r);
12217   __Pyx_RefNannyFinishContext();
12218   return __pyx_r;
12219 }
12220 
12221 /* "yt/utilities/lib/ewah_bool_wrap.pyx":791
12222  *         self._set_refn(i1)
12223  *
12224  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
12225  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12226  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
12227  */
12228 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get * __pyx_optional_args)12229 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get *__pyx_optional_args) {
12230   __pyx_t_5numpy_uint64_t __pyx_v_i2 = __pyx_k__10;
12231   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
12232   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
12233   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
12234   int __pyx_r;
12235   __Pyx_RefNannyDeclarations
12236   int __pyx_t_1;
12237   int __pyx_t_2;
12238   __Pyx_RefNannySetupContext("_get", 0);
12239   if (__pyx_optional_args) {
12240     if (__pyx_optional_args->__pyx_n > 0) {
12241       __pyx_v_i2 = __pyx_optional_args->i2;
12242     }
12243   }
12244 
12245   /* "yt/utilities/lib/ewah_bool_wrap.pyx":792
12246  *
12247  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
12248  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
12249  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
12250  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
12251  */
12252   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
12253 
12254   /* "yt/utilities/lib/ewah_bool_wrap.pyx":793
12255  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
12256  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12257  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
12258  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
12259  *         # Note the 0 here, for dereferencing
12260  */
12261   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
12262 
12263   /* "yt/utilities/lib/ewah_bool_wrap.pyx":794
12264  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12265  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
12266  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
12267  *         # Note the 0 here, for dereferencing
12268  *         if (ewah_keys[0].get(i1) == 0): return 0
12269  */
12270   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
12271 
12272   /* "yt/utilities/lib/ewah_bool_wrap.pyx":796
12273  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
12274  *         # Note the 0 here, for dereferencing
12275  *         if (ewah_keys[0].get(i1) == 0): return 0             # <<<<<<<<<<<<<<
12276  *         if (ewah_refn[0].get(i1) == 0) or (i2 == FLAG):
12277  *             return 1
12278  */
12279   __pyx_t_1 = (((__pyx_v_ewah_keys[0]).get(__pyx_v_i1) == 0) != 0);
12280   if (__pyx_t_1) {
12281     __pyx_r = 0;
12282     goto __pyx_L0;
12283   }
12284 
12285   /* "yt/utilities/lib/ewah_bool_wrap.pyx":797
12286  *         # Note the 0 here, for dereferencing
12287  *         if (ewah_keys[0].get(i1) == 0): return 0
12288  *         if (ewah_refn[0].get(i1) == 0) or (i2 == FLAG):             # <<<<<<<<<<<<<<
12289  *             return 1
12290  *         return ewah_coll[0][i1].get(i2)
12291  */
12292   __pyx_t_2 = (((__pyx_v_ewah_refn[0]).get(__pyx_v_i1) == 0) != 0);
12293   if (!__pyx_t_2) {
12294   } else {
12295     __pyx_t_1 = __pyx_t_2;
12296     goto __pyx_L5_bool_binop_done;
12297   }
12298   __pyx_t_2 = ((__pyx_v_i2 == __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG) != 0);
12299   __pyx_t_1 = __pyx_t_2;
12300   __pyx_L5_bool_binop_done:;
12301   if (__pyx_t_1) {
12302 
12303     /* "yt/utilities/lib/ewah_bool_wrap.pyx":798
12304  *         if (ewah_keys[0].get(i1) == 0): return 0
12305  *         if (ewah_refn[0].get(i1) == 0) or (i2 == FLAG):
12306  *             return 1             # <<<<<<<<<<<<<<
12307  *         return ewah_coll[0][i1].get(i2)
12308  *
12309  */
12310     __pyx_r = 1;
12311     goto __pyx_L0;
12312 
12313     /* "yt/utilities/lib/ewah_bool_wrap.pyx":797
12314  *         # Note the 0 here, for dereferencing
12315  *         if (ewah_keys[0].get(i1) == 0): return 0
12316  *         if (ewah_refn[0].get(i1) == 0) or (i2 == FLAG):             # <<<<<<<<<<<<<<
12317  *             return 1
12318  *         return ewah_coll[0][i1].get(i2)
12319  */
12320   }
12321 
12322   /* "yt/utilities/lib/ewah_bool_wrap.pyx":799
12323  *         if (ewah_refn[0].get(i1) == 0) or (i2 == FLAG):
12324  *             return 1
12325  *         return ewah_coll[0][i1].get(i2)             # <<<<<<<<<<<<<<
12326  *
12327  *     def get(self, i1, i2 = FLAG):
12328  */
12329   __pyx_r = ((__pyx_v_ewah_coll[0])[__pyx_v_i1]).get(__pyx_v_i2);
12330   goto __pyx_L0;
12331 
12332   /* "yt/utilities/lib/ewah_bool_wrap.pyx":791
12333  *         self._set_refn(i1)
12334  *
12335  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
12336  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12337  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
12338  */
12339 
12340   /* function exit code */
12341   __pyx_L0:;
12342   __Pyx_RefNannyFinishContext();
12343   return __pyx_r;
12344 }
12345 
12346 /* "yt/utilities/lib/ewah_bool_wrap.pyx":801
12347  *         return ewah_coll[0][i1].get(i2)
12348  *
12349  *     def get(self, i1, i2 = FLAG):             # <<<<<<<<<<<<<<
12350  *         return self._get(i1, i2)
12351  *
12352  */
12353 
12354 /* Python wrapper */
12355 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_17get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_17get(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)12356 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_17get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12357   PyObject *__pyx_v_i1 = 0;
12358   PyObject *__pyx_v_i2 = 0;
12359   PyObject *__pyx_r = 0;
12360   __Pyx_RefNannyDeclarations
12361   __Pyx_RefNannySetupContext("get (wrapper)", 0);
12362   {
12363     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i1,&__pyx_n_s_i2,0};
12364     PyObject* values[2] = {0,0};
12365     values[1] = __pyx_k__11;
12366     if (unlikely(__pyx_kwds)) {
12367       Py_ssize_t kw_args;
12368       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12369       switch (pos_args) {
12370         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12371         CYTHON_FALLTHROUGH;
12372         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12373         CYTHON_FALLTHROUGH;
12374         case  0: break;
12375         default: goto __pyx_L5_argtuple_error;
12376       }
12377       kw_args = PyDict_Size(__pyx_kwds);
12378       switch (pos_args) {
12379         case  0:
12380         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i1)) != 0)) kw_args--;
12381         else goto __pyx_L5_argtuple_error;
12382         CYTHON_FALLTHROUGH;
12383         case  1:
12384         if (kw_args > 0) {
12385           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i2);
12386           if (value) { values[1] = value; kw_args--; }
12387         }
12388       }
12389       if (unlikely(kw_args > 0)) {
12390         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 801, __pyx_L3_error)
12391       }
12392     } else {
12393       switch (PyTuple_GET_SIZE(__pyx_args)) {
12394         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12395         CYTHON_FALLTHROUGH;
12396         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12397         break;
12398         default: goto __pyx_L5_argtuple_error;
12399       }
12400     }
12401     __pyx_v_i1 = values[0];
12402     __pyx_v_i2 = values[1];
12403   }
12404   goto __pyx_L4_argument_unpacking_done;
12405   __pyx_L5_argtuple_error:;
12406   __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 801, __pyx_L3_error)
12407   __pyx_L3_error:;
12408   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
12409   __Pyx_RefNannyFinishContext();
12410   return NULL;
12411   __pyx_L4_argument_unpacking_done:;
12412   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_16get(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_i1, __pyx_v_i2);
12413 
12414   /* function exit code */
12415   __Pyx_RefNannyFinishContext();
12416   return __pyx_r;
12417 }
12418 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_16get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_i1,PyObject * __pyx_v_i2)12419 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_16get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1, PyObject *__pyx_v_i2) {
12420   PyObject *__pyx_r = NULL;
12421   __Pyx_RefNannyDeclarations
12422   __pyx_t_5numpy_uint64_t __pyx_t_1;
12423   __pyx_t_5numpy_uint64_t __pyx_t_2;
12424   int __pyx_t_3;
12425   struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get __pyx_t_4;
12426   PyObject *__pyx_t_5 = NULL;
12427   __Pyx_RefNannySetupContext("get", 0);
12428 
12429   /* "yt/utilities/lib/ewah_bool_wrap.pyx":802
12430  *
12431  *     def get(self, i1, i2 = FLAG):
12432  *         return self._get(i1, i2)             # <<<<<<<<<<<<<<
12433  *
12434  *     cdef bint _get_coarse(self, np.uint64_t i1):
12435  */
12436   __Pyx_XDECREF(__pyx_r);
12437   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L1_error)
12438   __pyx_t_2 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i2); if (unlikely((__pyx_t_2 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L1_error)
12439   __pyx_t_4.__pyx_n = 1;
12440   __pyx_t_4.i2 = __pyx_t_2;
12441   __pyx_t_3 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_t_1, &__pyx_t_4);
12442   __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error)
12443   __Pyx_GOTREF(__pyx_t_5);
12444   __pyx_r = __pyx_t_5;
12445   __pyx_t_5 = 0;
12446   goto __pyx_L0;
12447 
12448   /* "yt/utilities/lib/ewah_bool_wrap.pyx":801
12449  *         return ewah_coll[0][i1].get(i2)
12450  *
12451  *     def get(self, i1, i2 = FLAG):             # <<<<<<<<<<<<<<
12452  *         return self._get(i1, i2)
12453  *
12454  */
12455 
12456   /* function exit code */
12457   __pyx_L1_error:;
12458   __Pyx_XDECREF(__pyx_t_5);
12459   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
12460   __pyx_r = NULL;
12461   __pyx_L0:;
12462   __Pyx_XGIVEREF(__pyx_r);
12463   __Pyx_RefNannyFinishContext();
12464   return __pyx_r;
12465 }
12466 
12467 /* "yt/utilities/lib/ewah_bool_wrap.pyx":804
12468  *         return self._get(i1, i2)
12469  *
12470  *     cdef bint _get_coarse(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
12471  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12472  *         return ewah_keys[0].get(i1)
12473  */
12474 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1)12475 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
12476   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
12477   int __pyx_r;
12478   __Pyx_RefNannyDeclarations
12479   __Pyx_RefNannySetupContext("_get_coarse", 0);
12480 
12481   /* "yt/utilities/lib/ewah_bool_wrap.pyx":805
12482  *
12483  *     cdef bint _get_coarse(self, np.uint64_t i1):
12484  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
12485  *         return ewah_keys[0].get(i1)
12486  *
12487  */
12488   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
12489 
12490   /* "yt/utilities/lib/ewah_bool_wrap.pyx":806
12491  *     cdef bint _get_coarse(self, np.uint64_t i1):
12492  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12493  *         return ewah_keys[0].get(i1)             # <<<<<<<<<<<<<<
12494  *
12495  *     def get_coarse(self, i1):
12496  */
12497   __pyx_r = (__pyx_v_ewah_keys[0]).get(__pyx_v_i1);
12498   goto __pyx_L0;
12499 
12500   /* "yt/utilities/lib/ewah_bool_wrap.pyx":804
12501  *         return self._get(i1, i2)
12502  *
12503  *     cdef bint _get_coarse(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
12504  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12505  *         return ewah_keys[0].get(i1)
12506  */
12507 
12508   /* function exit code */
12509   __pyx_L0:;
12510   __Pyx_RefNannyFinishContext();
12511   return __pyx_r;
12512 }
12513 
12514 /* "yt/utilities/lib/ewah_bool_wrap.pyx":808
12515  *         return ewah_keys[0].get(i1)
12516  *
12517  *     def get_coarse(self, i1):             # <<<<<<<<<<<<<<
12518  *         return self._get_coarse(i1)
12519  *
12520  */
12521 
12522 /* Python wrapper */
12523 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_19get_coarse(PyObject *__pyx_v_self, PyObject *__pyx_v_i1); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_19get_coarse(PyObject * __pyx_v_self,PyObject * __pyx_v_i1)12524 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_19get_coarse(PyObject *__pyx_v_self, PyObject *__pyx_v_i1) {
12525   PyObject *__pyx_r = 0;
12526   __Pyx_RefNannyDeclarations
12527   __Pyx_RefNannySetupContext("get_coarse (wrapper)", 0);
12528   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_18get_coarse(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((PyObject *)__pyx_v_i1));
12529 
12530   /* function exit code */
12531   __Pyx_RefNannyFinishContext();
12532   return __pyx_r;
12533 }
12534 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_18get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_i1)12535 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_18get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_i1) {
12536   PyObject *__pyx_r = NULL;
12537   __Pyx_RefNannyDeclarations
12538   __pyx_t_5numpy_uint64_t __pyx_t_1;
12539   PyObject *__pyx_t_2 = NULL;
12540   __Pyx_RefNannySetupContext("get_coarse", 0);
12541 
12542   /* "yt/utilities/lib/ewah_bool_wrap.pyx":809
12543  *
12544  *     def get_coarse(self, i1):
12545  *         return self._get_coarse(i1)             # <<<<<<<<<<<<<<
12546  *
12547  *     @cython.boundscheck(False)
12548  */
12549   __Pyx_XDECREF(__pyx_r);
12550   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_i1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
12551   __pyx_t_2 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_get_coarse(__pyx_v_self, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 809, __pyx_L1_error)
12552   __Pyx_GOTREF(__pyx_t_2);
12553   __pyx_r = __pyx_t_2;
12554   __pyx_t_2 = 0;
12555   goto __pyx_L0;
12556 
12557   /* "yt/utilities/lib/ewah_bool_wrap.pyx":808
12558  *         return ewah_keys[0].get(i1)
12559  *
12560  *     def get_coarse(self, i1):             # <<<<<<<<<<<<<<
12561  *         return self._get_coarse(i1)
12562  *
12563  */
12564 
12565   /* function exit code */
12566   __pyx_L1_error:;
12567   __Pyx_XDECREF(__pyx_t_2);
12568   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.get_coarse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12569   __pyx_r = NULL;
12570   __pyx_L0:;
12571   __Pyx_XGIVEREF(__pyx_r);
12572   __Pyx_RefNannyFinishContext();
12573   return __pyx_r;
12574 }
12575 
12576 /* "yt/utilities/lib/ewah_bool_wrap.pyx":815
12577  *     @cython.cdivision(True)
12578  *     @cython.initializedcheck(False)
12579  *     cdef void _get_coarse_array(self, np.uint64_t imax, np.uint8_t[:] arr) except *:             # <<<<<<<<<<<<<<
12580  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12581  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_keys[0].begin())
12582  */
12583 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_imax,__Pyx_memviewslice __pyx_v_arr)12584 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_imax, __Pyx_memviewslice __pyx_v_arr) {
12585   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
12586   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_set;
12587   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_end;
12588   __pyx_t_5numpy_uint64_t __pyx_v_iset;
12589   __Pyx_RefNannyDeclarations
12590   int __pyx_t_1;
12591   PyObject *__pyx_t_2 = NULL;
12592   PyObject *__pyx_t_3 = NULL;
12593   PyObject *__pyx_t_4 = NULL;
12594   PyObject *__pyx_t_5 = NULL;
12595   PyObject *__pyx_t_6 = NULL;
12596   int __pyx_t_7;
12597   PyObject *__pyx_t_8 = NULL;
12598   __pyx_t_5numpy_uint64_t __pyx_t_9;
12599   __Pyx_RefNannySetupContext("_get_coarse_array", 0);
12600 
12601   /* "yt/utilities/lib/ewah_bool_wrap.pyx":816
12602  *     @cython.initializedcheck(False)
12603  *     cdef void _get_coarse_array(self, np.uint64_t imax, np.uint8_t[:] arr) except *:
12604  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
12605  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_keys[0].begin())
12606  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_keys[0].end())
12607  */
12608   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
12609 
12610   /* "yt/utilities/lib/ewah_bool_wrap.pyx":817
12611  *     cdef void _get_coarse_array(self, np.uint64_t imax, np.uint8_t[:] arr) except *:
12612  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12613  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_keys[0].begin())             # <<<<<<<<<<<<<<
12614  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_keys[0].end())
12615  *         cdef np.uint64_t iset
12616  */
12617   __pyx_v_iter_set = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator((__pyx_v_ewah_keys[0]).begin());
12618 
12619   /* "yt/utilities/lib/ewah_bool_wrap.pyx":818
12620  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12621  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_keys[0].begin())
12622  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_keys[0].end())             # <<<<<<<<<<<<<<
12623  *         cdef np.uint64_t iset
12624  *         while iter_set[0] != iter_end[0]:
12625  */
12626   __pyx_v_iter_end = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator((__pyx_v_ewah_keys[0]).end());
12627 
12628   /* "yt/utilities/lib/ewah_bool_wrap.pyx":820
12629  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_keys[0].end())
12630  *         cdef np.uint64_t iset
12631  *         while iter_set[0] != iter_end[0]:             # <<<<<<<<<<<<<<
12632  *             iset = dereference(iter_set[0])
12633  *             if iset >= imax:
12634  */
12635   while (1) {
12636     __pyx_t_1 = (((__pyx_v_iter_set[0]) != (__pyx_v_iter_end[0])) != 0);
12637     if (!__pyx_t_1) break;
12638 
12639     /* "yt/utilities/lib/ewah_bool_wrap.pyx":821
12640  *         cdef np.uint64_t iset
12641  *         while iter_set[0] != iter_end[0]:
12642  *             iset = dereference(iter_set[0])             # <<<<<<<<<<<<<<
12643  *             if iset >= imax:
12644  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
12645  */
12646     __pyx_v_iset = (*(__pyx_v_iter_set[0]));
12647 
12648     /* "yt/utilities/lib/ewah_bool_wrap.pyx":822
12649  *         while iter_set[0] != iter_end[0]:
12650  *             iset = dereference(iter_set[0])
12651  *             if iset >= imax:             # <<<<<<<<<<<<<<
12652  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
12653  *             arr[iset] = 1
12654  */
12655     __pyx_t_1 = ((__pyx_v_iset >= __pyx_v_imax) != 0);
12656     if (unlikely(__pyx_t_1)) {
12657 
12658       /* "yt/utilities/lib/ewah_bool_wrap.pyx":823
12659  *             iset = dereference(iter_set[0])
12660  *             if iset >= imax:
12661  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))             # <<<<<<<<<<<<<<
12662  *             arr[iset] = 1
12663  *             preincrement(iter_set[0])
12664  */
12665       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Index_exceedes_max, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error)
12666       __Pyx_GOTREF(__pyx_t_3);
12667       __pyx_t_4 = __Pyx_PyInt_From_npy_uint64(__pyx_v_iset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
12668       __Pyx_GOTREF(__pyx_t_4);
12669       __pyx_t_5 = __Pyx_PyInt_From_npy_uint64(__pyx_v_imax); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 823, __pyx_L1_error)
12670       __Pyx_GOTREF(__pyx_t_5);
12671       __pyx_t_6 = NULL;
12672       __pyx_t_7 = 0;
12673       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12674         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
12675         if (likely(__pyx_t_6)) {
12676           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12677           __Pyx_INCREF(__pyx_t_6);
12678           __Pyx_INCREF(function);
12679           __Pyx_DECREF_SET(__pyx_t_3, function);
12680           __pyx_t_7 = 1;
12681         }
12682       }
12683       #if CYTHON_FAST_PYCALL
12684       if (PyFunction_Check(__pyx_t_3)) {
12685         PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
12686         __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)
12687         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12688         __Pyx_GOTREF(__pyx_t_2);
12689         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12690         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12691       } else
12692       #endif
12693       #if CYTHON_FAST_PYCCALL
12694       if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
12695         PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
12696         __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)
12697         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12698         __Pyx_GOTREF(__pyx_t_2);
12699         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12700         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12701       } else
12702       #endif
12703       {
12704         __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 823, __pyx_L1_error)
12705         __Pyx_GOTREF(__pyx_t_8);
12706         if (__pyx_t_6) {
12707           __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
12708         }
12709         __Pyx_GIVEREF(__pyx_t_4);
12710         PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
12711         __Pyx_GIVEREF(__pyx_t_5);
12712         PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
12713         __pyx_t_4 = 0;
12714         __pyx_t_5 = 0;
12715         __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)
12716         __Pyx_GOTREF(__pyx_t_2);
12717         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12718       }
12719       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12720       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error)
12721       __Pyx_GOTREF(__pyx_t_3);
12722       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12723       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
12724       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12725       __PYX_ERR(0, 823, __pyx_L1_error)
12726 
12727       /* "yt/utilities/lib/ewah_bool_wrap.pyx":822
12728  *         while iter_set[0] != iter_end[0]:
12729  *             iset = dereference(iter_set[0])
12730  *             if iset >= imax:             # <<<<<<<<<<<<<<
12731  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
12732  *             arr[iset] = 1
12733  */
12734     }
12735 
12736     /* "yt/utilities/lib/ewah_bool_wrap.pyx":824
12737  *             if iset >= imax:
12738  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
12739  *             arr[iset] = 1             # <<<<<<<<<<<<<<
12740  *             preincrement(iter_set[0])
12741  *
12742  */
12743     __pyx_t_9 = __pyx_v_iset;
12744     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_arr.data + __pyx_t_9 * __pyx_v_arr.strides[0]) )) = 1;
12745 
12746     /* "yt/utilities/lib/ewah_bool_wrap.pyx":825
12747  *                 raise IndexError("Index {} exceedes max {}.".format(iset, imax))
12748  *             arr[iset] = 1
12749  *             preincrement(iter_set[0])             # <<<<<<<<<<<<<<
12750  *
12751  *     def get_coarse_array(self, imax, arr):
12752  */
12753     (void)((++(__pyx_v_iter_set[0])));
12754   }
12755 
12756   /* "yt/utilities/lib/ewah_bool_wrap.pyx":815
12757  *     @cython.cdivision(True)
12758  *     @cython.initializedcheck(False)
12759  *     cdef void _get_coarse_array(self, np.uint64_t imax, np.uint8_t[:] arr) except *:             # <<<<<<<<<<<<<<
12760  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12761  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_keys[0].begin())
12762  */
12763 
12764   /* function exit code */
12765   goto __pyx_L0;
12766   __pyx_L1_error:;
12767   __Pyx_XDECREF(__pyx_t_2);
12768   __Pyx_XDECREF(__pyx_t_3);
12769   __Pyx_XDECREF(__pyx_t_4);
12770   __Pyx_XDECREF(__pyx_t_5);
12771   __Pyx_XDECREF(__pyx_t_6);
12772   __Pyx_XDECREF(__pyx_t_8);
12773   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection._get_coarse_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
12774   __pyx_L0:;
12775   __Pyx_RefNannyFinishContext();
12776 }
12777 
12778 /* "yt/utilities/lib/ewah_bool_wrap.pyx":827
12779  *             preincrement(iter_set[0])
12780  *
12781  *     def get_coarse_array(self, imax, arr):             # <<<<<<<<<<<<<<
12782  *         return self._get_coarse_array(imax, arr)
12783  *
12784  */
12785 
12786 /* Python wrapper */
12787 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_21get_coarse_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_21get_coarse_array(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)12788 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_21get_coarse_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12789   PyObject *__pyx_v_imax = 0;
12790   PyObject *__pyx_v_arr = 0;
12791   PyObject *__pyx_r = 0;
12792   __Pyx_RefNannyDeclarations
12793   __Pyx_RefNannySetupContext("get_coarse_array (wrapper)", 0);
12794   {
12795     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_imax,&__pyx_n_s_arr,0};
12796     PyObject* values[2] = {0,0};
12797     if (unlikely(__pyx_kwds)) {
12798       Py_ssize_t kw_args;
12799       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12800       switch (pos_args) {
12801         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12802         CYTHON_FALLTHROUGH;
12803         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12804         CYTHON_FALLTHROUGH;
12805         case  0: break;
12806         default: goto __pyx_L5_argtuple_error;
12807       }
12808       kw_args = PyDict_Size(__pyx_kwds);
12809       switch (pos_args) {
12810         case  0:
12811         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_imax)) != 0)) kw_args--;
12812         else goto __pyx_L5_argtuple_error;
12813         CYTHON_FALLTHROUGH;
12814         case  1:
12815         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arr)) != 0)) kw_args--;
12816         else {
12817           __Pyx_RaiseArgtupleInvalid("get_coarse_array", 1, 2, 2, 1); __PYX_ERR(0, 827, __pyx_L3_error)
12818         }
12819       }
12820       if (unlikely(kw_args > 0)) {
12821         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_coarse_array") < 0)) __PYX_ERR(0, 827, __pyx_L3_error)
12822       }
12823     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12824       goto __pyx_L5_argtuple_error;
12825     } else {
12826       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12827       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12828     }
12829     __pyx_v_imax = values[0];
12830     __pyx_v_arr = values[1];
12831   }
12832   goto __pyx_L4_argument_unpacking_done;
12833   __pyx_L5_argtuple_error:;
12834   __Pyx_RaiseArgtupleInvalid("get_coarse_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 827, __pyx_L3_error)
12835   __pyx_L3_error:;
12836   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.get_coarse_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
12837   __Pyx_RefNannyFinishContext();
12838   return NULL;
12839   __pyx_L4_argument_unpacking_done:;
12840   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_20get_coarse_array(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_imax, __pyx_v_arr);
12841 
12842   /* function exit code */
12843   __Pyx_RefNannyFinishContext();
12844   return __pyx_r;
12845 }
12846 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_20get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_imax,PyObject * __pyx_v_arr)12847 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_20get_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_imax, PyObject *__pyx_v_arr) {
12848   PyObject *__pyx_r = NULL;
12849   __Pyx_RefNannyDeclarations
12850   __pyx_t_5numpy_uint64_t __pyx_t_1;
12851   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
12852   PyObject *__pyx_t_3 = NULL;
12853   __Pyx_RefNannySetupContext("get_coarse_array", 0);
12854 
12855   /* "yt/utilities/lib/ewah_bool_wrap.pyx":828
12856  *
12857  *     def get_coarse_array(self, imax, arr):
12858  *         return self._get_coarse_array(imax, arr)             # <<<<<<<<<<<<<<
12859  *
12860  *     cdef bint _contains(self, np.uint64_t i):
12861  */
12862   __Pyx_XDECREF(__pyx_r);
12863   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_imax); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 828, __pyx_L1_error)
12864   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint8_t(__pyx_v_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 828, __pyx_L1_error)
12865   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_get_coarse_array(__pyx_v_self, __pyx_t_1, __pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 828, __pyx_L1_error)
12866   __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
12867   __pyx_t_2.memview = NULL;
12868   __pyx_t_2.data = NULL;
12869   __pyx_t_3 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error)
12870   __Pyx_GOTREF(__pyx_t_3);
12871   __pyx_r = __pyx_t_3;
12872   __pyx_t_3 = 0;
12873   goto __pyx_L0;
12874 
12875   /* "yt/utilities/lib/ewah_bool_wrap.pyx":827
12876  *             preincrement(iter_set[0])
12877  *
12878  *     def get_coarse_array(self, imax, arr):             # <<<<<<<<<<<<<<
12879  *         return self._get_coarse_array(imax, arr)
12880  *
12881  */
12882 
12883   /* function exit code */
12884   __pyx_L1_error:;
12885   __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
12886   __Pyx_XDECREF(__pyx_t_3);
12887   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.get_coarse_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
12888   __pyx_r = NULL;
12889   __pyx_L0:;
12890   __Pyx_XGIVEREF(__pyx_r);
12891   __Pyx_RefNannyFinishContext();
12892   return __pyx_r;
12893 }
12894 
12895 /* "yt/utilities/lib/ewah_bool_wrap.pyx":830
12896  *         return self._get_coarse_array(imax, arr)
12897  *
12898  *     cdef bint _contains(self, np.uint64_t i):             # <<<<<<<<<<<<<<
12899  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12900  *         return ewah_keys[0].get(i)
12901  */
12902 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__contains(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i)12903 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__contains(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i) {
12904   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
12905   int __pyx_r;
12906   __Pyx_RefNannyDeclarations
12907   __Pyx_RefNannySetupContext("_contains", 0);
12908 
12909   /* "yt/utilities/lib/ewah_bool_wrap.pyx":831
12910  *
12911  *     cdef bint _contains(self, np.uint64_t i):
12912  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
12913  *         return ewah_keys[0].get(i)
12914  *
12915  */
12916   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
12917 
12918   /* "yt/utilities/lib/ewah_bool_wrap.pyx":832
12919  *     cdef bint _contains(self, np.uint64_t i):
12920  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12921  *         return ewah_keys[0].get(i)             # <<<<<<<<<<<<<<
12922  *
12923  *     def contains(self, np.uint64_t i):
12924  */
12925   __pyx_r = (__pyx_v_ewah_keys[0]).get(__pyx_v_i);
12926   goto __pyx_L0;
12927 
12928   /* "yt/utilities/lib/ewah_bool_wrap.pyx":830
12929  *         return self._get_coarse_array(imax, arr)
12930  *
12931  *     cdef bint _contains(self, np.uint64_t i):             # <<<<<<<<<<<<<<
12932  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
12933  *         return ewah_keys[0].get(i)
12934  */
12935 
12936   /* function exit code */
12937   __pyx_L0:;
12938   __Pyx_RefNannyFinishContext();
12939   return __pyx_r;
12940 }
12941 
12942 /* "yt/utilities/lib/ewah_bool_wrap.pyx":834
12943  *         return ewah_keys[0].get(i)
12944  *
12945  *     def contains(self, np.uint64_t i):             # <<<<<<<<<<<<<<
12946  *         return self._contains(i)
12947  *
12948  */
12949 
12950 /* Python wrapper */
12951 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_23contains(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_23contains(PyObject * __pyx_v_self,PyObject * __pyx_arg_i)12952 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_23contains(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
12953   __pyx_t_5numpy_uint64_t __pyx_v_i;
12954   PyObject *__pyx_r = 0;
12955   __Pyx_RefNannyDeclarations
12956   __Pyx_RefNannySetupContext("contains (wrapper)", 0);
12957   assert(__pyx_arg_i); {
12958     __pyx_v_i = __Pyx_PyInt_As_npy_uint64(__pyx_arg_i); if (unlikely((__pyx_v_i == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 834, __pyx_L3_error)
12959   }
12960   goto __pyx_L4_argument_unpacking_done;
12961   __pyx_L3_error:;
12962   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
12963   __Pyx_RefNannyFinishContext();
12964   return NULL;
12965   __pyx_L4_argument_unpacking_done:;
12966   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_22contains(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((__pyx_t_5numpy_uint64_t)__pyx_v_i));
12967 
12968   /* function exit code */
12969   __Pyx_RefNannyFinishContext();
12970   return __pyx_r;
12971 }
12972 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_22contains(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i)12973 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_22contains(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i) {
12974   PyObject *__pyx_r = NULL;
12975   __Pyx_RefNannyDeclarations
12976   PyObject *__pyx_t_1 = NULL;
12977   __Pyx_RefNannySetupContext("contains", 0);
12978 
12979   /* "yt/utilities/lib/ewah_bool_wrap.pyx":835
12980  *
12981  *     def contains(self, np.uint64_t i):
12982  *         return self._contains(i)             # <<<<<<<<<<<<<<
12983  *
12984  *     cdef bint _isref(self, np.uint64_t i):
12985  */
12986   __Pyx_XDECREF(__pyx_r);
12987   __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_contains(__pyx_v_self, __pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
12988   __Pyx_GOTREF(__pyx_t_1);
12989   __pyx_r = __pyx_t_1;
12990   __pyx_t_1 = 0;
12991   goto __pyx_L0;
12992 
12993   /* "yt/utilities/lib/ewah_bool_wrap.pyx":834
12994  *         return ewah_keys[0].get(i)
12995  *
12996  *     def contains(self, np.uint64_t i):             # <<<<<<<<<<<<<<
12997  *         return self._contains(i)
12998  *
12999  */
13000 
13001   /* function exit code */
13002   __pyx_L1_error:;
13003   __Pyx_XDECREF(__pyx_t_1);
13004   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
13005   __pyx_r = NULL;
13006   __pyx_L0:;
13007   __Pyx_XGIVEREF(__pyx_r);
13008   __Pyx_RefNannyFinishContext();
13009   return __pyx_r;
13010 }
13011 
13012 /* "yt/utilities/lib/ewah_bool_wrap.pyx":837
13013  *         return self._contains(i)
13014  *
13015  *     cdef bint _isref(self, np.uint64_t i):             # <<<<<<<<<<<<<<
13016  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13017  *         return ewah_refn[0].get(i)
13018  */
13019 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i)13020 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i) {
13021   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
13022   int __pyx_r;
13023   __Pyx_RefNannyDeclarations
13024   __Pyx_RefNannySetupContext("_isref", 0);
13025 
13026   /* "yt/utilities/lib/ewah_bool_wrap.pyx":838
13027  *
13028  *     cdef bint _isref(self, np.uint64_t i):
13029  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
13030  *         return ewah_refn[0].get(i)
13031  *
13032  */
13033   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
13034 
13035   /* "yt/utilities/lib/ewah_bool_wrap.pyx":839
13036  *     cdef bint _isref(self, np.uint64_t i):
13037  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13038  *         return ewah_refn[0].get(i)             # <<<<<<<<<<<<<<
13039  *
13040  *     def isref(self, np.uint64_t i):
13041  */
13042   __pyx_r = (__pyx_v_ewah_refn[0]).get(__pyx_v_i);
13043   goto __pyx_L0;
13044 
13045   /* "yt/utilities/lib/ewah_bool_wrap.pyx":837
13046  *         return self._contains(i)
13047  *
13048  *     cdef bint _isref(self, np.uint64_t i):             # <<<<<<<<<<<<<<
13049  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13050  *         return ewah_refn[0].get(i)
13051  */
13052 
13053   /* function exit code */
13054   __pyx_L0:;
13055   __Pyx_RefNannyFinishContext();
13056   return __pyx_r;
13057 }
13058 
13059 /* "yt/utilities/lib/ewah_bool_wrap.pyx":841
13060  *         return ewah_refn[0].get(i)
13061  *
13062  *     def isref(self, np.uint64_t i):             # <<<<<<<<<<<<<<
13063  *         return self._isref(i)
13064  *
13065  */
13066 
13067 /* Python wrapper */
13068 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_25isref(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_25isref(PyObject * __pyx_v_self,PyObject * __pyx_arg_i)13069 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_25isref(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
13070   __pyx_t_5numpy_uint64_t __pyx_v_i;
13071   PyObject *__pyx_r = 0;
13072   __Pyx_RefNannyDeclarations
13073   __Pyx_RefNannySetupContext("isref (wrapper)", 0);
13074   assert(__pyx_arg_i); {
13075     __pyx_v_i = __Pyx_PyInt_As_npy_uint64(__pyx_arg_i); if (unlikely((__pyx_v_i == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 841, __pyx_L3_error)
13076   }
13077   goto __pyx_L4_argument_unpacking_done;
13078   __pyx_L3_error:;
13079   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.isref", __pyx_clineno, __pyx_lineno, __pyx_filename);
13080   __Pyx_RefNannyFinishContext();
13081   return NULL;
13082   __pyx_L4_argument_unpacking_done:;
13083   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_24isref(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((__pyx_t_5numpy_uint64_t)__pyx_v_i));
13084 
13085   /* function exit code */
13086   __Pyx_RefNannyFinishContext();
13087   return __pyx_r;
13088 }
13089 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_24isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i)13090 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_24isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i) {
13091   PyObject *__pyx_r = NULL;
13092   __Pyx_RefNannyDeclarations
13093   PyObject *__pyx_t_1 = NULL;
13094   __Pyx_RefNannySetupContext("isref", 0);
13095 
13096   /* "yt/utilities/lib/ewah_bool_wrap.pyx":842
13097  *
13098  *     def isref(self, np.uint64_t i):
13099  *         return self._isref(i)             # <<<<<<<<<<<<<<
13100  *
13101  *     cdef void _ewah_coarse(self):
13102  */
13103   __Pyx_XDECREF(__pyx_r);
13104   __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_isref(__pyx_v_self, __pyx_v_i)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
13105   __Pyx_GOTREF(__pyx_t_1);
13106   __pyx_r = __pyx_t_1;
13107   __pyx_t_1 = 0;
13108   goto __pyx_L0;
13109 
13110   /* "yt/utilities/lib/ewah_bool_wrap.pyx":841
13111  *         return ewah_refn[0].get(i)
13112  *
13113  *     def isref(self, np.uint64_t i):             # <<<<<<<<<<<<<<
13114  *         return self._isref(i)
13115  *
13116  */
13117 
13118   /* function exit code */
13119   __pyx_L1_error:;
13120   __Pyx_XDECREF(__pyx_t_1);
13121   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.isref", __pyx_clineno, __pyx_lineno, __pyx_filename);
13122   __pyx_r = NULL;
13123   __pyx_L0:;
13124   __Pyx_XGIVEREF(__pyx_r);
13125   __Pyx_RefNannyFinishContext();
13126   return __pyx_r;
13127 }
13128 
13129 /* "yt/utilities/lib/ewah_bool_wrap.pyx":844
13130  *         return self._isref(i)
13131  *
13132  *     cdef void _ewah_coarse(self):             # <<<<<<<<<<<<<<
13133  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
13134  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13135  */
13136 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__ewah_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)13137 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__ewah_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
13138   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
13139   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
13140   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_coar;
13141   __Pyx_RefNannyDeclarations
13142   __Pyx_RefNannySetupContext("_ewah_coarse", 0);
13143 
13144   /* "yt/utilities/lib/ewah_bool_wrap.pyx":845
13145  *
13146  *     cdef void _ewah_coarse(self):
13147  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
13148  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13149  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13150  */
13151   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
13152 
13153   /* "yt/utilities/lib/ewah_bool_wrap.pyx":846
13154  *     cdef void _ewah_coarse(self):
13155  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
13156  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
13157  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13158  *         ewah_coar[0].reset()
13159  */
13160   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
13161 
13162   /* "yt/utilities/lib/ewah_bool_wrap.pyx":847
13163  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
13164  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13165  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar             # <<<<<<<<<<<<<<
13166  *         ewah_coar[0].reset()
13167  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar[0])
13168  */
13169   __pyx_v_ewah_coar = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_coar);
13170 
13171   /* "yt/utilities/lib/ewah_bool_wrap.pyx":848
13172  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13173  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13174  *         ewah_coar[0].reset()             # <<<<<<<<<<<<<<
13175  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar[0])
13176  *         return
13177  */
13178   (__pyx_v_ewah_coar[0]).reset();
13179 
13180   /* "yt/utilities/lib/ewah_bool_wrap.pyx":849
13181  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13182  *         ewah_coar[0].reset()
13183  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar[0])             # <<<<<<<<<<<<<<
13184  *         return
13185  *
13186  */
13187   (__pyx_v_ewah_keys[0]).logicalxor((__pyx_v_ewah_refn[0]), (__pyx_v_ewah_coar[0]));
13188 
13189   /* "yt/utilities/lib/ewah_bool_wrap.pyx":850
13190  *         ewah_coar[0].reset()
13191  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar[0])
13192  *         return             # <<<<<<<<<<<<<<
13193  *
13194  *     def ewah_coarse(self):
13195  */
13196   goto __pyx_L0;
13197 
13198   /* "yt/utilities/lib/ewah_bool_wrap.pyx":844
13199  *         return self._isref(i)
13200  *
13201  *     cdef void _ewah_coarse(self):             # <<<<<<<<<<<<<<
13202  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
13203  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13204  */
13205 
13206   /* function exit code */
13207   __pyx_L0:;
13208   __Pyx_RefNannyFinishContext();
13209 }
13210 
13211 /* "yt/utilities/lib/ewah_bool_wrap.pyx":852
13212  *         return
13213  *
13214  *     def ewah_coarse(self):             # <<<<<<<<<<<<<<
13215  *         return self._ewah_coarse()
13216  *
13217  */
13218 
13219 /* Python wrapper */
13220 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_27ewah_coarse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_27ewah_coarse(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)13221 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_27ewah_coarse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13222   PyObject *__pyx_r = 0;
13223   __Pyx_RefNannyDeclarations
13224   __Pyx_RefNannySetupContext("ewah_coarse (wrapper)", 0);
13225   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_26ewah_coarse(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self));
13226 
13227   /* function exit code */
13228   __Pyx_RefNannyFinishContext();
13229   return __pyx_r;
13230 }
13231 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_26ewah_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)13232 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_26ewah_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
13233   PyObject *__pyx_r = NULL;
13234   __Pyx_RefNannyDeclarations
13235   PyObject *__pyx_t_1 = NULL;
13236   __Pyx_RefNannySetupContext("ewah_coarse", 0);
13237 
13238   /* "yt/utilities/lib/ewah_bool_wrap.pyx":853
13239  *
13240  *     def ewah_coarse(self):
13241  *         return self._ewah_coarse()             # <<<<<<<<<<<<<<
13242  *
13243  *     cdef np.uint64_t _count_total(self):
13244  */
13245   __Pyx_XDECREF(__pyx_r);
13246   __pyx_t_1 = __Pyx_void_to_None(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_ewah_coarse(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error)
13247   __Pyx_GOTREF(__pyx_t_1);
13248   __pyx_r = __pyx_t_1;
13249   __pyx_t_1 = 0;
13250   goto __pyx_L0;
13251 
13252   /* "yt/utilities/lib/ewah_bool_wrap.pyx":852
13253  *         return
13254  *
13255  *     def ewah_coarse(self):             # <<<<<<<<<<<<<<
13256  *         return self._ewah_coarse()
13257  *
13258  */
13259 
13260   /* function exit code */
13261   __pyx_L1_error:;
13262   __Pyx_XDECREF(__pyx_t_1);
13263   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.ewah_coarse", __pyx_clineno, __pyx_lineno, __pyx_filename);
13264   __pyx_r = NULL;
13265   __pyx_L0:;
13266   __Pyx_XGIVEREF(__pyx_r);
13267   __Pyx_RefNannyFinishContext();
13268   return __pyx_r;
13269 }
13270 
13271 /* "yt/utilities/lib/ewah_bool_wrap.pyx":855
13272  *         return self._ewah_coarse()
13273  *
13274  *     cdef np.uint64_t _count_total(self):             # <<<<<<<<<<<<<<
13275  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
13276  *         cdef np.uint64_t out = ewah_keys.numberOfOnes()
13277  */
13278 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)13279 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
13280   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
13281   __pyx_t_5numpy_uint64_t __pyx_v_out;
13282   __pyx_t_5numpy_uint64_t __pyx_r;
13283   __Pyx_RefNannyDeclarations
13284   __Pyx_RefNannySetupContext("_count_total", 0);
13285 
13286   /* "yt/utilities/lib/ewah_bool_wrap.pyx":856
13287  *
13288  *     cdef np.uint64_t _count_total(self):
13289  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
13290  *         cdef np.uint64_t out = ewah_keys.numberOfOnes()
13291  *         return out
13292  */
13293   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
13294 
13295   /* "yt/utilities/lib/ewah_bool_wrap.pyx":857
13296  *     cdef np.uint64_t _count_total(self):
13297  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
13298  *         cdef np.uint64_t out = ewah_keys.numberOfOnes()             # <<<<<<<<<<<<<<
13299  *         return out
13300  *
13301  */
13302   __pyx_v_out = __pyx_v_ewah_keys->numberOfOnes();
13303 
13304   /* "yt/utilities/lib/ewah_bool_wrap.pyx":858
13305  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
13306  *         cdef np.uint64_t out = ewah_keys.numberOfOnes()
13307  *         return out             # <<<<<<<<<<<<<<
13308  *
13309  *     def count_total(self):
13310  */
13311   __pyx_r = __pyx_v_out;
13312   goto __pyx_L0;
13313 
13314   /* "yt/utilities/lib/ewah_bool_wrap.pyx":855
13315  *         return self._ewah_coarse()
13316  *
13317  *     cdef np.uint64_t _count_total(self):             # <<<<<<<<<<<<<<
13318  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
13319  *         cdef np.uint64_t out = ewah_keys.numberOfOnes()
13320  */
13321 
13322   /* function exit code */
13323   __pyx_L0:;
13324   __Pyx_RefNannyFinishContext();
13325   return __pyx_r;
13326 }
13327 
13328 /* "yt/utilities/lib/ewah_bool_wrap.pyx":860
13329  *         return out
13330  *
13331  *     def count_total(self):             # <<<<<<<<<<<<<<
13332  *         return self._count_total()
13333  *
13334  */
13335 
13336 /* Python wrapper */
13337 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_29count_total(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_29count_total(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)13338 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_29count_total(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13339   PyObject *__pyx_r = 0;
13340   __Pyx_RefNannyDeclarations
13341   __Pyx_RefNannySetupContext("count_total (wrapper)", 0);
13342   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_28count_total(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self));
13343 
13344   /* function exit code */
13345   __Pyx_RefNannyFinishContext();
13346   return __pyx_r;
13347 }
13348 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_28count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)13349 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_28count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
13350   PyObject *__pyx_r = NULL;
13351   __Pyx_RefNannyDeclarations
13352   PyObject *__pyx_t_1 = NULL;
13353   __Pyx_RefNannySetupContext("count_total", 0);
13354 
13355   /* "yt/utilities/lib/ewah_bool_wrap.pyx":861
13356  *
13357  *     def count_total(self):
13358  *         return self._count_total()             # <<<<<<<<<<<<<<
13359  *
13360  *     cdef np.uint64_t _count_refined(self):
13361  */
13362   __Pyx_XDECREF(__pyx_r);
13363   __pyx_t_1 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_count_total(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L1_error)
13364   __Pyx_GOTREF(__pyx_t_1);
13365   __pyx_r = __pyx_t_1;
13366   __pyx_t_1 = 0;
13367   goto __pyx_L0;
13368 
13369   /* "yt/utilities/lib/ewah_bool_wrap.pyx":860
13370  *         return out
13371  *
13372  *     def count_total(self):             # <<<<<<<<<<<<<<
13373  *         return self._count_total()
13374  *
13375  */
13376 
13377   /* function exit code */
13378   __pyx_L1_error:;
13379   __Pyx_XDECREF(__pyx_t_1);
13380   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.count_total", __pyx_clineno, __pyx_lineno, __pyx_filename);
13381   __pyx_r = NULL;
13382   __pyx_L0:;
13383   __Pyx_XGIVEREF(__pyx_r);
13384   __Pyx_RefNannyFinishContext();
13385   return __pyx_r;
13386 }
13387 
13388 /* "yt/utilities/lib/ewah_bool_wrap.pyx":863
13389  *         return self._count_total()
13390  *
13391  *     cdef np.uint64_t _count_refined(self):             # <<<<<<<<<<<<<<
13392  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13393  *         cdef np.uint64_t out = ewah_refn.numberOfOnes()
13394  */
13395 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)13396 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
13397   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
13398   __pyx_t_5numpy_uint64_t __pyx_v_out;
13399   __pyx_t_5numpy_uint64_t __pyx_r;
13400   __Pyx_RefNannyDeclarations
13401   __Pyx_RefNannySetupContext("_count_refined", 0);
13402 
13403   /* "yt/utilities/lib/ewah_bool_wrap.pyx":864
13404  *
13405  *     cdef np.uint64_t _count_refined(self):
13406  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
13407  *         cdef np.uint64_t out = ewah_refn.numberOfOnes()
13408  *         return out
13409  */
13410   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
13411 
13412   /* "yt/utilities/lib/ewah_bool_wrap.pyx":865
13413  *     cdef np.uint64_t _count_refined(self):
13414  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13415  *         cdef np.uint64_t out = ewah_refn.numberOfOnes()             # <<<<<<<<<<<<<<
13416  *         return out
13417  *
13418  */
13419   __pyx_v_out = __pyx_v_ewah_refn->numberOfOnes();
13420 
13421   /* "yt/utilities/lib/ewah_bool_wrap.pyx":866
13422  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13423  *         cdef np.uint64_t out = ewah_refn.numberOfOnes()
13424  *         return out             # <<<<<<<<<<<<<<
13425  *
13426  *     def count_refined(self):
13427  */
13428   __pyx_r = __pyx_v_out;
13429   goto __pyx_L0;
13430 
13431   /* "yt/utilities/lib/ewah_bool_wrap.pyx":863
13432  *         return self._count_total()
13433  *
13434  *     cdef np.uint64_t _count_refined(self):             # <<<<<<<<<<<<<<
13435  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
13436  *         cdef np.uint64_t out = ewah_refn.numberOfOnes()
13437  */
13438 
13439   /* function exit code */
13440   __pyx_L0:;
13441   __Pyx_RefNannyFinishContext();
13442   return __pyx_r;
13443 }
13444 
13445 /* "yt/utilities/lib/ewah_bool_wrap.pyx":868
13446  *         return out
13447  *
13448  *     def count_refined(self):             # <<<<<<<<<<<<<<
13449  *         return self._count_refined()
13450  *
13451  */
13452 
13453 /* Python wrapper */
13454 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_31count_refined(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_31count_refined(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)13455 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_31count_refined(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13456   PyObject *__pyx_r = 0;
13457   __Pyx_RefNannyDeclarations
13458   __Pyx_RefNannySetupContext("count_refined (wrapper)", 0);
13459   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_30count_refined(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self));
13460 
13461   /* function exit code */
13462   __Pyx_RefNannyFinishContext();
13463   return __pyx_r;
13464 }
13465 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_30count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)13466 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_30count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
13467   PyObject *__pyx_r = NULL;
13468   __Pyx_RefNannyDeclarations
13469   PyObject *__pyx_t_1 = NULL;
13470   __Pyx_RefNannySetupContext("count_refined", 0);
13471 
13472   /* "yt/utilities/lib/ewah_bool_wrap.pyx":869
13473  *
13474  *     def count_refined(self):
13475  *         return self._count_refined()             # <<<<<<<<<<<<<<
13476  *
13477  *     cdef np.uint64_t _count_coarse(self):
13478  */
13479   __Pyx_XDECREF(__pyx_r);
13480   __pyx_t_1 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_count_refined(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error)
13481   __Pyx_GOTREF(__pyx_t_1);
13482   __pyx_r = __pyx_t_1;
13483   __pyx_t_1 = 0;
13484   goto __pyx_L0;
13485 
13486   /* "yt/utilities/lib/ewah_bool_wrap.pyx":868
13487  *         return out
13488  *
13489  *     def count_refined(self):             # <<<<<<<<<<<<<<
13490  *         return self._count_refined()
13491  *
13492  */
13493 
13494   /* function exit code */
13495   __pyx_L1_error:;
13496   __Pyx_XDECREF(__pyx_t_1);
13497   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.count_refined", __pyx_clineno, __pyx_lineno, __pyx_filename);
13498   __pyx_r = NULL;
13499   __pyx_L0:;
13500   __Pyx_XGIVEREF(__pyx_r);
13501   __Pyx_RefNannyFinishContext();
13502   return __pyx_r;
13503 }
13504 
13505 /* "yt/utilities/lib/ewah_bool_wrap.pyx":871
13506  *         return self._count_refined()
13507  *
13508  *     cdef np.uint64_t _count_coarse(self):             # <<<<<<<<<<<<<<
13509  *         self._ewah_coarse()
13510  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13511  */
13512 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)13513 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
13514   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_coar;
13515   __pyx_t_5numpy_uint64_t __pyx_v_out;
13516   __pyx_t_5numpy_uint64_t __pyx_r;
13517   __Pyx_RefNannyDeclarations
13518   __Pyx_RefNannySetupContext("_count_coarse", 0);
13519 
13520   /* "yt/utilities/lib/ewah_bool_wrap.pyx":872
13521  *
13522  *     cdef np.uint64_t _count_coarse(self):
13523  *         self._ewah_coarse()             # <<<<<<<<<<<<<<
13524  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13525  *         cdef np.uint64_t out = ewah_coar.numberOfOnes()
13526  */
13527   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_ewah_coarse(__pyx_v_self);
13528 
13529   /* "yt/utilities/lib/ewah_bool_wrap.pyx":873
13530  *     cdef np.uint64_t _count_coarse(self):
13531  *         self._ewah_coarse()
13532  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar             # <<<<<<<<<<<<<<
13533  *         cdef np.uint64_t out = ewah_coar.numberOfOnes()
13534  *         return out
13535  */
13536   __pyx_v_ewah_coar = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_coar);
13537 
13538   /* "yt/utilities/lib/ewah_bool_wrap.pyx":874
13539  *         self._ewah_coarse()
13540  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13541  *         cdef np.uint64_t out = ewah_coar.numberOfOnes()             # <<<<<<<<<<<<<<
13542  *         return out
13543  *
13544  */
13545   __pyx_v_out = __pyx_v_ewah_coar->numberOfOnes();
13546 
13547   /* "yt/utilities/lib/ewah_bool_wrap.pyx":875
13548  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13549  *         cdef np.uint64_t out = ewah_coar.numberOfOnes()
13550  *         return out             # <<<<<<<<<<<<<<
13551  *
13552  *     def count_coarse(self):
13553  */
13554   __pyx_r = __pyx_v_out;
13555   goto __pyx_L0;
13556 
13557   /* "yt/utilities/lib/ewah_bool_wrap.pyx":871
13558  *         return self._count_refined()
13559  *
13560  *     cdef np.uint64_t _count_coarse(self):             # <<<<<<<<<<<<<<
13561  *         self._ewah_coarse()
13562  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
13563  */
13564 
13565   /* function exit code */
13566   __pyx_L0:;
13567   __Pyx_RefNannyFinishContext();
13568   return __pyx_r;
13569 }
13570 
13571 /* "yt/utilities/lib/ewah_bool_wrap.pyx":877
13572  *         return out
13573  *
13574  *     def count_coarse(self):             # <<<<<<<<<<<<<<
13575  *         return self._count_coarse()
13576  *
13577  */
13578 
13579 /* Python wrapper */
13580 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_33count_coarse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_33count_coarse(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)13581 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_33count_coarse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13582   PyObject *__pyx_r = 0;
13583   __Pyx_RefNannyDeclarations
13584   __Pyx_RefNannySetupContext("count_coarse (wrapper)", 0);
13585   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_32count_coarse(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self));
13586 
13587   /* function exit code */
13588   __Pyx_RefNannyFinishContext();
13589   return __pyx_r;
13590 }
13591 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_32count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)13592 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_32count_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
13593   PyObject *__pyx_r = NULL;
13594   __Pyx_RefNannyDeclarations
13595   PyObject *__pyx_t_1 = NULL;
13596   __Pyx_RefNannySetupContext("count_coarse", 0);
13597 
13598   /* "yt/utilities/lib/ewah_bool_wrap.pyx":878
13599  *
13600  *     def count_coarse(self):
13601  *         return self._count_coarse()             # <<<<<<<<<<<<<<
13602  *
13603  *     cdef void _logicalor(self, BoolArrayCollection solf, BoolArrayCollection out):
13604  */
13605   __Pyx_XDECREF(__pyx_r);
13606   __pyx_t_1 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_count_coarse(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
13607   __Pyx_GOTREF(__pyx_t_1);
13608   __pyx_r = __pyx_t_1;
13609   __pyx_t_1 = 0;
13610   goto __pyx_L0;
13611 
13612   /* "yt/utilities/lib/ewah_bool_wrap.pyx":877
13613  *         return out
13614  *
13615  *     def count_coarse(self):             # <<<<<<<<<<<<<<
13616  *         return self._count_coarse()
13617  *
13618  */
13619 
13620   /* function exit code */
13621   __pyx_L1_error:;
13622   __Pyx_XDECREF(__pyx_t_1);
13623   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.count_coarse", __pyx_clineno, __pyx_lineno, __pyx_filename);
13624   __pyx_r = NULL;
13625   __pyx_L0:;
13626   __Pyx_XGIVEREF(__pyx_r);
13627   __Pyx_RefNannyFinishContext();
13628   return __pyx_r;
13629 }
13630 
13631 /* "yt/utilities/lib/ewah_bool_wrap.pyx":880
13632  *         return self._count_coarse()
13633  *
13634  *     cdef void _logicalor(self, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
13635  *         cdef ewah_bool_array *ewah_keys1 = self.ewah_keys
13636  *         cdef ewah_bool_array *ewah_refn1 = self.ewah_refn
13637  */
13638 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicalor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_out)13639 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicalor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out) {
13640   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
13641   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
13642   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll1;
13643   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
13644   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
13645   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
13646   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys3;
13647   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn3;
13648   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll3;
13649   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
13650   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
13651   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
13652   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
13653   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
13654   __Pyx_RefNannyDeclarations
13655   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_t_1;
13656   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_t_2;
13657   int __pyx_t_3;
13658   __pyx_t_5numpy_uint64_t __pyx_t_4;
13659   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_5;
13660   __Pyx_RefNannySetupContext("_logicalor", 0);
13661 
13662   /* "yt/utilities/lib/ewah_bool_wrap.pyx":881
13663  *
13664  *     cdef void _logicalor(self, BoolArrayCollection solf, BoolArrayCollection out):
13665  *         cdef ewah_bool_array *ewah_keys1 = self.ewah_keys             # <<<<<<<<<<<<<<
13666  *         cdef ewah_bool_array *ewah_refn1 = self.ewah_refn
13667  *         cdef ewahmap *ewah_coll1 = self.ewah_coll
13668  */
13669   __pyx_t_1 = __pyx_v_self->ewah_keys;
13670   __pyx_v_ewah_keys1 = __pyx_t_1;
13671 
13672   /* "yt/utilities/lib/ewah_bool_wrap.pyx":882
13673  *     cdef void _logicalor(self, BoolArrayCollection solf, BoolArrayCollection out):
13674  *         cdef ewah_bool_array *ewah_keys1 = self.ewah_keys
13675  *         cdef ewah_bool_array *ewah_refn1 = self.ewah_refn             # <<<<<<<<<<<<<<
13676  *         cdef ewahmap *ewah_coll1 = self.ewah_coll
13677  *         cdef ewah_bool_array *ewah_keys2 = solf.ewah_keys
13678  */
13679   __pyx_t_1 = __pyx_v_self->ewah_refn;
13680   __pyx_v_ewah_refn1 = __pyx_t_1;
13681 
13682   /* "yt/utilities/lib/ewah_bool_wrap.pyx":883
13683  *         cdef ewah_bool_array *ewah_keys1 = self.ewah_keys
13684  *         cdef ewah_bool_array *ewah_refn1 = self.ewah_refn
13685  *         cdef ewahmap *ewah_coll1 = self.ewah_coll             # <<<<<<<<<<<<<<
13686  *         cdef ewah_bool_array *ewah_keys2 = solf.ewah_keys
13687  *         cdef ewah_bool_array *ewah_refn2 = solf.ewah_refn
13688  */
13689   __pyx_t_2 = __pyx_v_self->ewah_coll;
13690   __pyx_v_ewah_coll1 = __pyx_t_2;
13691 
13692   /* "yt/utilities/lib/ewah_bool_wrap.pyx":884
13693  *         cdef ewah_bool_array *ewah_refn1 = self.ewah_refn
13694  *         cdef ewahmap *ewah_coll1 = self.ewah_coll
13695  *         cdef ewah_bool_array *ewah_keys2 = solf.ewah_keys             # <<<<<<<<<<<<<<
13696  *         cdef ewah_bool_array *ewah_refn2 = solf.ewah_refn
13697  *         cdef ewahmap *ewah_coll2 = solf.ewah_coll
13698  */
13699   __pyx_t_1 = __pyx_v_solf->ewah_keys;
13700   __pyx_v_ewah_keys2 = __pyx_t_1;
13701 
13702   /* "yt/utilities/lib/ewah_bool_wrap.pyx":885
13703  *         cdef ewahmap *ewah_coll1 = self.ewah_coll
13704  *         cdef ewah_bool_array *ewah_keys2 = solf.ewah_keys
13705  *         cdef ewah_bool_array *ewah_refn2 = solf.ewah_refn             # <<<<<<<<<<<<<<
13706  *         cdef ewahmap *ewah_coll2 = solf.ewah_coll
13707  *         cdef ewah_bool_array *ewah_keys3 = out.ewah_keys
13708  */
13709   __pyx_t_1 = __pyx_v_solf->ewah_refn;
13710   __pyx_v_ewah_refn2 = __pyx_t_1;
13711 
13712   /* "yt/utilities/lib/ewah_bool_wrap.pyx":886
13713  *         cdef ewah_bool_array *ewah_keys2 = solf.ewah_keys
13714  *         cdef ewah_bool_array *ewah_refn2 = solf.ewah_refn
13715  *         cdef ewahmap *ewah_coll2 = solf.ewah_coll             # <<<<<<<<<<<<<<
13716  *         cdef ewah_bool_array *ewah_keys3 = out.ewah_keys
13717  *         cdef ewah_bool_array *ewah_refn3 = out.ewah_refn
13718  */
13719   __pyx_t_2 = __pyx_v_solf->ewah_coll;
13720   __pyx_v_ewah_coll2 = __pyx_t_2;
13721 
13722   /* "yt/utilities/lib/ewah_bool_wrap.pyx":887
13723  *         cdef ewah_bool_array *ewah_refn2 = solf.ewah_refn
13724  *         cdef ewahmap *ewah_coll2 = solf.ewah_coll
13725  *         cdef ewah_bool_array *ewah_keys3 = out.ewah_keys             # <<<<<<<<<<<<<<
13726  *         cdef ewah_bool_array *ewah_refn3 = out.ewah_refn
13727  *         cdef ewahmap *ewah_coll3 = out.ewah_coll
13728  */
13729   __pyx_t_1 = __pyx_v_out->ewah_keys;
13730   __pyx_v_ewah_keys3 = __pyx_t_1;
13731 
13732   /* "yt/utilities/lib/ewah_bool_wrap.pyx":888
13733  *         cdef ewahmap *ewah_coll2 = solf.ewah_coll
13734  *         cdef ewah_bool_array *ewah_keys3 = out.ewah_keys
13735  *         cdef ewah_bool_array *ewah_refn3 = out.ewah_refn             # <<<<<<<<<<<<<<
13736  *         cdef ewahmap *ewah_coll3 = out.ewah_coll
13737  *         cdef ewahmap_it it_map1, it_map2
13738  */
13739   __pyx_t_1 = __pyx_v_out->ewah_refn;
13740   __pyx_v_ewah_refn3 = __pyx_t_1;
13741 
13742   /* "yt/utilities/lib/ewah_bool_wrap.pyx":889
13743  *         cdef ewah_bool_array *ewah_keys3 = out.ewah_keys
13744  *         cdef ewah_bool_array *ewah_refn3 = out.ewah_refn
13745  *         cdef ewahmap *ewah_coll3 = out.ewah_coll             # <<<<<<<<<<<<<<
13746  *         cdef ewahmap_it it_map1, it_map2
13747  *         cdef ewah_bool_array mi1_ewah1, mi1_ewah2
13748  */
13749   __pyx_t_2 = __pyx_v_out->ewah_coll;
13750   __pyx_v_ewah_coll3 = __pyx_t_2;
13751 
13752   /* "yt/utilities/lib/ewah_bool_wrap.pyx":894
13753  *         cdef np.uint64_t mi1
13754  *         # Keys
13755  *         ewah_keys1[0].logicalor(ewah_keys2[0], ewah_keys3[0])             # <<<<<<<<<<<<<<
13756  *         # Refined
13757  *         ewah_refn1[0].logicalor(ewah_refn2[0], ewah_refn3[0])
13758  */
13759   (__pyx_v_ewah_keys1[0]).logicalor((__pyx_v_ewah_keys2[0]), (__pyx_v_ewah_keys3[0]));
13760 
13761   /* "yt/utilities/lib/ewah_bool_wrap.pyx":896
13762  *         ewah_keys1[0].logicalor(ewah_keys2[0], ewah_keys3[0])
13763  *         # Refined
13764  *         ewah_refn1[0].logicalor(ewah_refn2[0], ewah_refn3[0])             # <<<<<<<<<<<<<<
13765  *         # Map
13766  *         it_map1 = ewah_coll1[0].begin()
13767  */
13768   (__pyx_v_ewah_refn1[0]).logicalor((__pyx_v_ewah_refn2[0]), (__pyx_v_ewah_refn3[0]));
13769 
13770   /* "yt/utilities/lib/ewah_bool_wrap.pyx":898
13771  *         ewah_refn1[0].logicalor(ewah_refn2[0], ewah_refn3[0])
13772  *         # Map
13773  *         it_map1 = ewah_coll1[0].begin()             # <<<<<<<<<<<<<<
13774  *         while it_map1 != ewah_coll1[0].end():
13775  *             mi1 = dereference(it_map1).first
13776  */
13777   __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).begin();
13778 
13779   /* "yt/utilities/lib/ewah_bool_wrap.pyx":899
13780  *         # Map
13781  *         it_map1 = ewah_coll1[0].begin()
13782  *         while it_map1 != ewah_coll1[0].end():             # <<<<<<<<<<<<<<
13783  *             mi1 = dereference(it_map1).first
13784  *             mi1_ewah1 = dereference(it_map1).second
13785  */
13786   while (1) {
13787     __pyx_t_3 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
13788     if (!__pyx_t_3) break;
13789 
13790     /* "yt/utilities/lib/ewah_bool_wrap.pyx":900
13791  *         it_map1 = ewah_coll1[0].begin()
13792  *         while it_map1 != ewah_coll1[0].end():
13793  *             mi1 = dereference(it_map1).first             # <<<<<<<<<<<<<<
13794  *             mi1_ewah1 = dereference(it_map1).second
13795  *             ewah_coll3[0][mi1] = mi1_ewah1
13796  */
13797     __pyx_t_4 = (*__pyx_v_it_map1).first;
13798     __pyx_v_mi1 = __pyx_t_4;
13799 
13800     /* "yt/utilities/lib/ewah_bool_wrap.pyx":901
13801  *         while it_map1 != ewah_coll1[0].end():
13802  *             mi1 = dereference(it_map1).first
13803  *             mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
13804  *             ewah_coll3[0][mi1] = mi1_ewah1
13805  *             preincrement(it_map1)
13806  */
13807     __pyx_t_5 = (*__pyx_v_it_map1).second;
13808     __pyx_v_mi1_ewah1 = __pyx_t_5;
13809 
13810     /* "yt/utilities/lib/ewah_bool_wrap.pyx":902
13811  *             mi1 = dereference(it_map1).first
13812  *             mi1_ewah1 = dereference(it_map1).second
13813  *             ewah_coll3[0][mi1] = mi1_ewah1             # <<<<<<<<<<<<<<
13814  *             preincrement(it_map1)
13815  *         it_map2 = ewah_coll2[0].begin()
13816  */
13817     ((__pyx_v_ewah_coll3[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah1;
13818 
13819     /* "yt/utilities/lib/ewah_bool_wrap.pyx":903
13820  *             mi1_ewah1 = dereference(it_map1).second
13821  *             ewah_coll3[0][mi1] = mi1_ewah1
13822  *             preincrement(it_map1)             # <<<<<<<<<<<<<<
13823  *         it_map2 = ewah_coll2[0].begin()
13824  *         while it_map2 != ewah_coll2[0].end():
13825  */
13826     (void)((++__pyx_v_it_map1));
13827   }
13828 
13829   /* "yt/utilities/lib/ewah_bool_wrap.pyx":904
13830  *             ewah_coll3[0][mi1] = mi1_ewah1
13831  *             preincrement(it_map1)
13832  *         it_map2 = ewah_coll2[0].begin()             # <<<<<<<<<<<<<<
13833  *         while it_map2 != ewah_coll2[0].end():
13834  *             mi1 = dereference(it_map2).first
13835  */
13836   __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).begin();
13837 
13838   /* "yt/utilities/lib/ewah_bool_wrap.pyx":905
13839  *             preincrement(it_map1)
13840  *         it_map2 = ewah_coll2[0].begin()
13841  *         while it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
13842  *             mi1 = dereference(it_map2).first
13843  *             mi1_ewah2 = dereference(it_map2).second
13844  */
13845   while (1) {
13846     __pyx_t_3 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
13847     if (!__pyx_t_3) break;
13848 
13849     /* "yt/utilities/lib/ewah_bool_wrap.pyx":906
13850  *         it_map2 = ewah_coll2[0].begin()
13851  *         while it_map2 != ewah_coll2[0].end():
13852  *             mi1 = dereference(it_map2).first             # <<<<<<<<<<<<<<
13853  *             mi1_ewah2 = dereference(it_map2).second
13854  *             it_map1 = ewah_coll1[0].find(mi1)
13855  */
13856     __pyx_t_4 = (*__pyx_v_it_map2).first;
13857     __pyx_v_mi1 = __pyx_t_4;
13858 
13859     /* "yt/utilities/lib/ewah_bool_wrap.pyx":907
13860  *         while it_map2 != ewah_coll2[0].end():
13861  *             mi1 = dereference(it_map2).first
13862  *             mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
13863  *             it_map1 = ewah_coll1[0].find(mi1)
13864  *             if it_map1 != ewah_coll1[0].end():
13865  */
13866     __pyx_t_5 = (*__pyx_v_it_map2).second;
13867     __pyx_v_mi1_ewah2 = __pyx_t_5;
13868 
13869     /* "yt/utilities/lib/ewah_bool_wrap.pyx":908
13870  *             mi1 = dereference(it_map2).first
13871  *             mi1_ewah2 = dereference(it_map2).second
13872  *             it_map1 = ewah_coll1[0].find(mi1)             # <<<<<<<<<<<<<<
13873  *             if it_map1 != ewah_coll1[0].end():
13874  *                 mi1_ewah1 = dereference(it_map1).second
13875  */
13876     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).find(__pyx_v_mi1);
13877 
13878     /* "yt/utilities/lib/ewah_bool_wrap.pyx":909
13879  *             mi1_ewah2 = dereference(it_map2).second
13880  *             it_map1 = ewah_coll1[0].find(mi1)
13881  *             if it_map1 != ewah_coll1[0].end():             # <<<<<<<<<<<<<<
13882  *                 mi1_ewah1 = dereference(it_map1).second
13883  *                 mi1_ewah1.logicalor(mi1_ewah2, ewah_coll3[0][mi1])
13884  */
13885     __pyx_t_3 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
13886     if (__pyx_t_3) {
13887 
13888       /* "yt/utilities/lib/ewah_bool_wrap.pyx":910
13889  *             it_map1 = ewah_coll1[0].find(mi1)
13890  *             if it_map1 != ewah_coll1[0].end():
13891  *                 mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
13892  *                 mi1_ewah1.logicalor(mi1_ewah2, ewah_coll3[0][mi1])
13893  *             else:
13894  */
13895       __pyx_t_5 = (*__pyx_v_it_map1).second;
13896       __pyx_v_mi1_ewah1 = __pyx_t_5;
13897 
13898       /* "yt/utilities/lib/ewah_bool_wrap.pyx":911
13899  *             if it_map1 != ewah_coll1[0].end():
13900  *                 mi1_ewah1 = dereference(it_map1).second
13901  *                 mi1_ewah1.logicalor(mi1_ewah2, ewah_coll3[0][mi1])             # <<<<<<<<<<<<<<
13902  *             else:
13903  *                 ewah_coll3[0][mi1] = mi1_ewah2
13904  */
13905       __pyx_v_mi1_ewah1.logicalor(__pyx_v_mi1_ewah2, ((__pyx_v_ewah_coll3[0])[__pyx_v_mi1]));
13906 
13907       /* "yt/utilities/lib/ewah_bool_wrap.pyx":909
13908  *             mi1_ewah2 = dereference(it_map2).second
13909  *             it_map1 = ewah_coll1[0].find(mi1)
13910  *             if it_map1 != ewah_coll1[0].end():             # <<<<<<<<<<<<<<
13911  *                 mi1_ewah1 = dereference(it_map1).second
13912  *                 mi1_ewah1.logicalor(mi1_ewah2, ewah_coll3[0][mi1])
13913  */
13914       goto __pyx_L7;
13915     }
13916 
13917     /* "yt/utilities/lib/ewah_bool_wrap.pyx":913
13918  *                 mi1_ewah1.logicalor(mi1_ewah2, ewah_coll3[0][mi1])
13919  *             else:
13920  *                 ewah_coll3[0][mi1] = mi1_ewah2             # <<<<<<<<<<<<<<
13921  *             preincrement(it_map2)
13922  *
13923  */
13924     /*else*/ {
13925       ((__pyx_v_ewah_coll3[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah2;
13926     }
13927     __pyx_L7:;
13928 
13929     /* "yt/utilities/lib/ewah_bool_wrap.pyx":914
13930  *             else:
13931  *                 ewah_coll3[0][mi1] = mi1_ewah2
13932  *             preincrement(it_map2)             # <<<<<<<<<<<<<<
13933  *
13934  *     cdef void _append(self, BoolArrayCollection solf):
13935  */
13936     (void)((++__pyx_v_it_map2));
13937   }
13938 
13939   /* "yt/utilities/lib/ewah_bool_wrap.pyx":880
13940  *         return self._count_coarse()
13941  *
13942  *     cdef void _logicalor(self, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
13943  *         cdef ewah_bool_array *ewah_keys1 = self.ewah_keys
13944  *         cdef ewah_bool_array *ewah_refn1 = self.ewah_refn
13945  */
13946 
13947   /* function exit code */
13948   __Pyx_RefNannyFinishContext();
13949 }
13950 
13951 /* "yt/utilities/lib/ewah_bool_wrap.pyx":916
13952  *             preincrement(it_map2)
13953  *
13954  *     cdef void _append(self, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
13955  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
13956  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
13957  */
13958 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf)13959 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf) {
13960   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
13961   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
13962   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll1;
13963   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
13964   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
13965   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
13966   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
13967   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
13968   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_swap;
13969   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
13970   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
13971   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
13972   __Pyx_RefNannyDeclarations
13973   int __pyx_t_1;
13974   __pyx_t_5numpy_uint64_t __pyx_t_2;
13975   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
13976   __Pyx_RefNannySetupContext("_append", 0);
13977 
13978   /* "yt/utilities/lib/ewah_bool_wrap.pyx":917
13979  *
13980  *     cdef void _append(self, BoolArrayCollection solf):
13981  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
13982  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
13983  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
13984  */
13985   __pyx_v_ewah_keys1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
13986 
13987   /* "yt/utilities/lib/ewah_bool_wrap.pyx":918
13988  *     cdef void _append(self, BoolArrayCollection solf):
13989  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
13990  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
13991  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
13992  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
13993  */
13994   __pyx_v_ewah_refn1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
13995 
13996   /* "yt/utilities/lib/ewah_bool_wrap.pyx":919
13997  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
13998  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
13999  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll             # <<<<<<<<<<<<<<
14000  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14001  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14002  */
14003   __pyx_v_ewah_coll1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_self->ewah_coll);
14004 
14005   /* "yt/utilities/lib/ewah_bool_wrap.pyx":920
14006  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14007  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
14008  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
14009  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14010  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
14011  */
14012   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
14013 
14014   /* "yt/utilities/lib/ewah_bool_wrap.pyx":921
14015  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
14016  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14017  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
14018  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
14019  *         cdef ewahmap_it it_map1, it_map2
14020  */
14021   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
14022 
14023   /* "yt/utilities/lib/ewah_bool_wrap.pyx":922
14024  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14025  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14026  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
14027  *         cdef ewahmap_it it_map1, it_map2
14028  *         cdef ewah_bool_array swap, mi1_ewah1, mi1_ewah2
14029  */
14030   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
14031 
14032   /* "yt/utilities/lib/ewah_bool_wrap.pyx":927
14033  *         cdef np.uint64_t mi1
14034  *         # Keys
14035  *         ewah_keys1[0].logicalor(ewah_keys2[0], swap)             # <<<<<<<<<<<<<<
14036  *         ewah_keys1[0].swap(swap)
14037  *         # Refined
14038  */
14039   (__pyx_v_ewah_keys1[0]).logicalor((__pyx_v_ewah_keys2[0]), __pyx_v_swap);
14040 
14041   /* "yt/utilities/lib/ewah_bool_wrap.pyx":928
14042  *         # Keys
14043  *         ewah_keys1[0].logicalor(ewah_keys2[0], swap)
14044  *         ewah_keys1[0].swap(swap)             # <<<<<<<<<<<<<<
14045  *         # Refined
14046  *         ewah_refn1[0].logicalor(ewah_refn2[0], swap)
14047  */
14048   (__pyx_v_ewah_keys1[0]).swap(__pyx_v_swap);
14049 
14050   /* "yt/utilities/lib/ewah_bool_wrap.pyx":930
14051  *         ewah_keys1[0].swap(swap)
14052  *         # Refined
14053  *         ewah_refn1[0].logicalor(ewah_refn2[0], swap)             # <<<<<<<<<<<<<<
14054  *         ewah_refn1[0].swap(swap)
14055  *         # Map
14056  */
14057   (__pyx_v_ewah_refn1[0]).logicalor((__pyx_v_ewah_refn2[0]), __pyx_v_swap);
14058 
14059   /* "yt/utilities/lib/ewah_bool_wrap.pyx":931
14060  *         # Refined
14061  *         ewah_refn1[0].logicalor(ewah_refn2[0], swap)
14062  *         ewah_refn1[0].swap(swap)             # <<<<<<<<<<<<<<
14063  *         # Map
14064  *         it_map2 = ewah_coll2[0].begin()
14065  */
14066   (__pyx_v_ewah_refn1[0]).swap(__pyx_v_swap);
14067 
14068   /* "yt/utilities/lib/ewah_bool_wrap.pyx":933
14069  *         ewah_refn1[0].swap(swap)
14070  *         # Map
14071  *         it_map2 = ewah_coll2[0].begin()             # <<<<<<<<<<<<<<
14072  *         while it_map2 != ewah_coll2[0].end():
14073  *             mi1 = dereference(it_map2).first
14074  */
14075   __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).begin();
14076 
14077   /* "yt/utilities/lib/ewah_bool_wrap.pyx":934
14078  *         # Map
14079  *         it_map2 = ewah_coll2[0].begin()
14080  *         while it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
14081  *             mi1 = dereference(it_map2).first
14082  *             mi1_ewah2 = dereference(it_map2).second
14083  */
14084   while (1) {
14085     __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
14086     if (!__pyx_t_1) break;
14087 
14088     /* "yt/utilities/lib/ewah_bool_wrap.pyx":935
14089  *         it_map2 = ewah_coll2[0].begin()
14090  *         while it_map2 != ewah_coll2[0].end():
14091  *             mi1 = dereference(it_map2).first             # <<<<<<<<<<<<<<
14092  *             mi1_ewah2 = dereference(it_map2).second
14093  *             it_map1 = ewah_coll1[0].find(mi1)
14094  */
14095     __pyx_t_2 = (*__pyx_v_it_map2).first;
14096     __pyx_v_mi1 = __pyx_t_2;
14097 
14098     /* "yt/utilities/lib/ewah_bool_wrap.pyx":936
14099  *         while it_map2 != ewah_coll2[0].end():
14100  *             mi1 = dereference(it_map2).first
14101  *             mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
14102  *             it_map1 = ewah_coll1[0].find(mi1)
14103  *             if it_map1 == ewah_coll1[0].end():
14104  */
14105     __pyx_t_3 = (*__pyx_v_it_map2).second;
14106     __pyx_v_mi1_ewah2 = __pyx_t_3;
14107 
14108     /* "yt/utilities/lib/ewah_bool_wrap.pyx":937
14109  *             mi1 = dereference(it_map2).first
14110  *             mi1_ewah2 = dereference(it_map2).second
14111  *             it_map1 = ewah_coll1[0].find(mi1)             # <<<<<<<<<<<<<<
14112  *             if it_map1 == ewah_coll1[0].end():
14113  *                 ewah_coll1[0][mi1] = mi1_ewah2
14114  */
14115     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).find(__pyx_v_mi1);
14116 
14117     /* "yt/utilities/lib/ewah_bool_wrap.pyx":938
14118  *             mi1_ewah2 = dereference(it_map2).second
14119  *             it_map1 = ewah_coll1[0].find(mi1)
14120  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
14121  *                 ewah_coll1[0][mi1] = mi1_ewah2
14122  *             else:
14123  */
14124     __pyx_t_1 = ((__pyx_v_it_map1 == (__pyx_v_ewah_coll1[0]).end()) != 0);
14125     if (__pyx_t_1) {
14126 
14127       /* "yt/utilities/lib/ewah_bool_wrap.pyx":939
14128  *             it_map1 = ewah_coll1[0].find(mi1)
14129  *             if it_map1 == ewah_coll1[0].end():
14130  *                 ewah_coll1[0][mi1] = mi1_ewah2             # <<<<<<<<<<<<<<
14131  *             else:
14132  *                 mi1_ewah1 = dereference(it_map1).second
14133  */
14134       ((__pyx_v_ewah_coll1[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah2;
14135 
14136       /* "yt/utilities/lib/ewah_bool_wrap.pyx":938
14137  *             mi1_ewah2 = dereference(it_map2).second
14138  *             it_map1 = ewah_coll1[0].find(mi1)
14139  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
14140  *                 ewah_coll1[0][mi1] = mi1_ewah2
14141  *             else:
14142  */
14143       goto __pyx_L5;
14144     }
14145 
14146     /* "yt/utilities/lib/ewah_bool_wrap.pyx":941
14147  *                 ewah_coll1[0][mi1] = mi1_ewah2
14148  *             else:
14149  *                 mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
14150  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
14151  *                 mi1_ewah1.swap(swap)
14152  */
14153     /*else*/ {
14154       __pyx_t_3 = (*__pyx_v_it_map1).second;
14155       __pyx_v_mi1_ewah1 = __pyx_t_3;
14156 
14157       /* "yt/utilities/lib/ewah_bool_wrap.pyx":942
14158  *             else:
14159  *                 mi1_ewah1 = dereference(it_map1).second
14160  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)             # <<<<<<<<<<<<<<
14161  *                 mi1_ewah1.swap(swap)
14162  *             preincrement(it_map2)
14163  */
14164       __pyx_v_mi1_ewah1.logicalor(__pyx_v_mi1_ewah2, __pyx_v_swap);
14165 
14166       /* "yt/utilities/lib/ewah_bool_wrap.pyx":943
14167  *                 mi1_ewah1 = dereference(it_map1).second
14168  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
14169  *                 mi1_ewah1.swap(swap)             # <<<<<<<<<<<<<<
14170  *             preincrement(it_map2)
14171  *
14172  */
14173       __pyx_v_mi1_ewah1.swap(__pyx_v_swap);
14174     }
14175     __pyx_L5:;
14176 
14177     /* "yt/utilities/lib/ewah_bool_wrap.pyx":944
14178  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
14179  *                 mi1_ewah1.swap(swap)
14180  *             preincrement(it_map2)             # <<<<<<<<<<<<<<
14181  *
14182  *     def append(self, solf):
14183  */
14184     (void)((++__pyx_v_it_map2));
14185   }
14186 
14187   /* "yt/utilities/lib/ewah_bool_wrap.pyx":916
14188  *             preincrement(it_map2)
14189  *
14190  *     cdef void _append(self, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
14191  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14192  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14193  */
14194 
14195   /* function exit code */
14196   __Pyx_RefNannyFinishContext();
14197 }
14198 
14199 /* "yt/utilities/lib/ewah_bool_wrap.pyx":946
14200  *             preincrement(it_map2)
14201  *
14202  *     def append(self, solf):             # <<<<<<<<<<<<<<
14203  *         return self._append(solf)
14204  *
14205  */
14206 
14207 /* Python wrapper */
14208 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_35append(PyObject *__pyx_v_self, PyObject *__pyx_v_solf); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_35append(PyObject * __pyx_v_self,PyObject * __pyx_v_solf)14209 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_35append(PyObject *__pyx_v_self, PyObject *__pyx_v_solf) {
14210   PyObject *__pyx_r = 0;
14211   __Pyx_RefNannyDeclarations
14212   __Pyx_RefNannySetupContext("append (wrapper)", 0);
14213   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_34append(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((PyObject *)__pyx_v_solf));
14214 
14215   /* function exit code */
14216   __Pyx_RefNannyFinishContext();
14217   return __pyx_r;
14218 }
14219 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_34append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_solf)14220 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_34append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_solf) {
14221   PyObject *__pyx_r = NULL;
14222   __Pyx_RefNannyDeclarations
14223   PyObject *__pyx_t_1 = NULL;
14224   __Pyx_RefNannySetupContext("append", 0);
14225 
14226   /* "yt/utilities/lib/ewah_bool_wrap.pyx":947
14227  *
14228  *     def append(self, solf):
14229  *         return self._append(solf)             # <<<<<<<<<<<<<<
14230  *
14231  *     cdef bint _intersects(self, BoolArrayCollection solf):
14232  */
14233   __Pyx_XDECREF(__pyx_r);
14234   if (!(likely(((__pyx_v_solf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_solf, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 947, __pyx_L1_error)
14235   __pyx_t_1 = __Pyx_void_to_None(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_solf))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
14236   __Pyx_GOTREF(__pyx_t_1);
14237   __pyx_r = __pyx_t_1;
14238   __pyx_t_1 = 0;
14239   goto __pyx_L0;
14240 
14241   /* "yt/utilities/lib/ewah_bool_wrap.pyx":946
14242  *             preincrement(it_map2)
14243  *
14244  *     def append(self, solf):             # <<<<<<<<<<<<<<
14245  *         return self._append(solf)
14246  *
14247  */
14248 
14249   /* function exit code */
14250   __pyx_L1_error:;
14251   __Pyx_XDECREF(__pyx_t_1);
14252   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
14253   __pyx_r = NULL;
14254   __pyx_L0:;
14255   __Pyx_XGIVEREF(__pyx_r);
14256   __Pyx_RefNannyFinishContext();
14257   return __pyx_r;
14258 }
14259 
14260 /* "yt/utilities/lib/ewah_bool_wrap.pyx":949
14261  *         return self._append(solf)
14262  *
14263  *     cdef bint _intersects(self, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
14264  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14265  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14266  */
14267 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf)14268 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf) {
14269   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
14270   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
14271   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll1;
14272   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
14273   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
14274   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
14275   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
14276   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
14277   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
14278   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
14279   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
14280   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_coar1;
14281   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_coar2;
14282   int __pyx_r;
14283   __Pyx_RefNannyDeclarations
14284   int __pyx_t_1;
14285   __pyx_t_5numpy_uint64_t __pyx_t_2;
14286   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
14287   __Pyx_RefNannySetupContext("_intersects", 0);
14288 
14289   /* "yt/utilities/lib/ewah_bool_wrap.pyx":950
14290  *
14291  *     cdef bint _intersects(self, BoolArrayCollection solf):
14292  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
14293  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14294  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
14295  */
14296   __pyx_v_ewah_keys1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
14297 
14298   /* "yt/utilities/lib/ewah_bool_wrap.pyx":951
14299  *     cdef bint _intersects(self, BoolArrayCollection solf):
14300  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14301  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
14302  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
14303  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14304  */
14305   __pyx_v_ewah_refn1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
14306 
14307   /* "yt/utilities/lib/ewah_bool_wrap.pyx":952
14308  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14309  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14310  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll             # <<<<<<<<<<<<<<
14311  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14312  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14313  */
14314   __pyx_v_ewah_coll1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_self->ewah_coll);
14315 
14316   /* "yt/utilities/lib/ewah_bool_wrap.pyx":953
14317  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14318  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
14319  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
14320  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14321  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
14322  */
14323   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
14324 
14325   /* "yt/utilities/lib/ewah_bool_wrap.pyx":954
14326  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
14327  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14328  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
14329  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
14330  *         cdef ewahmap_it it_map1, it_map2
14331  */
14332   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
14333 
14334   /* "yt/utilities/lib/ewah_bool_wrap.pyx":955
14335  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14336  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14337  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
14338  *         cdef ewahmap_it it_map1, it_map2
14339  *         cdef ewah_bool_array mi1_ewah1, mi1_ewah2
14340  */
14341   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
14342 
14343   /* "yt/utilities/lib/ewah_bool_wrap.pyx":961
14344  *         cdef ewah_bool_array ewah_coar1, ewah_coar2
14345  *         # No intersection
14346  *         if ewah_keys1[0].intersects(ewah_keys2[0]) == 0:             # <<<<<<<<<<<<<<
14347  *             return 0
14348  *         # Intersection at coarse level
14349  */
14350   __pyx_t_1 = (((__pyx_v_ewah_keys1[0]).intersects((__pyx_v_ewah_keys2[0])) == 0) != 0);
14351   if (__pyx_t_1) {
14352 
14353     /* "yt/utilities/lib/ewah_bool_wrap.pyx":962
14354  *         # No intersection
14355  *         if ewah_keys1[0].intersects(ewah_keys2[0]) == 0:
14356  *             return 0             # <<<<<<<<<<<<<<
14357  *         # Intersection at coarse level
14358  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)
14359  */
14360     __pyx_r = 0;
14361     goto __pyx_L0;
14362 
14363     /* "yt/utilities/lib/ewah_bool_wrap.pyx":961
14364  *         cdef ewah_bool_array ewah_coar1, ewah_coar2
14365  *         # No intersection
14366  *         if ewah_keys1[0].intersects(ewah_keys2[0]) == 0:             # <<<<<<<<<<<<<<
14367  *             return 0
14368  *         # Intersection at coarse level
14369  */
14370   }
14371 
14372   /* "yt/utilities/lib/ewah_bool_wrap.pyx":964
14373  *             return 0
14374  *         # Intersection at coarse level
14375  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)             # <<<<<<<<<<<<<<
14376  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)
14377  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
14378  */
14379   (__pyx_v_ewah_keys1[0]).logicalxor((__pyx_v_ewah_refn1[0]), __pyx_v_ewah_coar1);
14380 
14381   /* "yt/utilities/lib/ewah_bool_wrap.pyx":965
14382  *         # Intersection at coarse level
14383  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)
14384  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)             # <<<<<<<<<<<<<<
14385  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
14386  *             return 1
14387  */
14388   (__pyx_v_ewah_keys2[0]).logicalxor((__pyx_v_ewah_refn2[0]), __pyx_v_ewah_coar2);
14389 
14390   /* "yt/utilities/lib/ewah_bool_wrap.pyx":966
14391  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)
14392  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)
14393  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:             # <<<<<<<<<<<<<<
14394  *             return 1
14395  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:
14396  */
14397   __pyx_t_1 = ((__pyx_v_ewah_coar1.intersects((__pyx_v_ewah_keys2[0])) == 1) != 0);
14398   if (__pyx_t_1) {
14399 
14400     /* "yt/utilities/lib/ewah_bool_wrap.pyx":967
14401  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)
14402  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
14403  *             return 1             # <<<<<<<<<<<<<<
14404  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:
14405  *             return 1
14406  */
14407     __pyx_r = 1;
14408     goto __pyx_L0;
14409 
14410     /* "yt/utilities/lib/ewah_bool_wrap.pyx":966
14411  *         ewah_keys1[0].logicalxor(ewah_refn1[0],ewah_coar1)
14412  *         ewah_keys2[0].logicalxor(ewah_refn2[0],ewah_coar2)
14413  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:             # <<<<<<<<<<<<<<
14414  *             return 1
14415  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:
14416  */
14417   }
14418 
14419   /* "yt/utilities/lib/ewah_bool_wrap.pyx":968
14420  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
14421  *             return 1
14422  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:             # <<<<<<<<<<<<<<
14423  *             return 1
14424  *         # Intersection at refined level
14425  */
14426   __pyx_t_1 = ((__pyx_v_ewah_coar2.intersects((__pyx_v_ewah_keys1[0])) == 1) != 0);
14427   if (__pyx_t_1) {
14428 
14429     /* "yt/utilities/lib/ewah_bool_wrap.pyx":969
14430  *             return 1
14431  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:
14432  *             return 1             # <<<<<<<<<<<<<<
14433  *         # Intersection at refined level
14434  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:
14435  */
14436     __pyx_r = 1;
14437     goto __pyx_L0;
14438 
14439     /* "yt/utilities/lib/ewah_bool_wrap.pyx":968
14440  *         if ewah_coar1.intersects(ewah_keys2[0]) == 1:
14441  *             return 1
14442  *         if ewah_coar2.intersects(ewah_keys1[0]) == 1:             # <<<<<<<<<<<<<<
14443  *             return 1
14444  *         # Intersection at refined level
14445  */
14446   }
14447 
14448   /* "yt/utilities/lib/ewah_bool_wrap.pyx":971
14449  *             return 1
14450  *         # Intersection at refined level
14451  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:             # <<<<<<<<<<<<<<
14452  *             it_map1 = ewah_coll1[0].begin()
14453  *             while (it_map1 != ewah_coll1[0].end()):
14454  */
14455   __pyx_t_1 = (((__pyx_v_ewah_refn1[0]).intersects((__pyx_v_ewah_refn2[0])) == 1) != 0);
14456   if (__pyx_t_1) {
14457 
14458     /* "yt/utilities/lib/ewah_bool_wrap.pyx":972
14459  *         # Intersection at refined level
14460  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:
14461  *             it_map1 = ewah_coll1[0].begin()             # <<<<<<<<<<<<<<
14462  *             while (it_map1 != ewah_coll1[0].end()):
14463  *                 mi1 = dereference(it_map1).first
14464  */
14465     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).begin();
14466 
14467     /* "yt/utilities/lib/ewah_bool_wrap.pyx":973
14468  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:
14469  *             it_map1 = ewah_coll1[0].begin()
14470  *             while (it_map1 != ewah_coll1[0].end()):             # <<<<<<<<<<<<<<
14471  *                 mi1 = dereference(it_map1).first
14472  *                 it_map2 = ewah_coll2[0].find(mi1)
14473  */
14474     while (1) {
14475       __pyx_t_1 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
14476       if (!__pyx_t_1) break;
14477 
14478       /* "yt/utilities/lib/ewah_bool_wrap.pyx":974
14479  *             it_map1 = ewah_coll1[0].begin()
14480  *             while (it_map1 != ewah_coll1[0].end()):
14481  *                 mi1 = dereference(it_map1).first             # <<<<<<<<<<<<<<
14482  *                 it_map2 = ewah_coll2[0].find(mi1)
14483  *                 if it_map2 != ewah_coll2[0].end():
14484  */
14485       __pyx_t_2 = (*__pyx_v_it_map1).first;
14486       __pyx_v_mi1 = __pyx_t_2;
14487 
14488       /* "yt/utilities/lib/ewah_bool_wrap.pyx":975
14489  *             while (it_map1 != ewah_coll1[0].end()):
14490  *                 mi1 = dereference(it_map1).first
14491  *                 it_map2 = ewah_coll2[0].find(mi1)             # <<<<<<<<<<<<<<
14492  *                 if it_map2 != ewah_coll2[0].end():
14493  *                     mi1_ewah1 = dereference(it_map1).second
14494  */
14495       __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).find(__pyx_v_mi1);
14496 
14497       /* "yt/utilities/lib/ewah_bool_wrap.pyx":976
14498  *                 mi1 = dereference(it_map1).first
14499  *                 it_map2 = ewah_coll2[0].find(mi1)
14500  *                 if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
14501  *                     mi1_ewah1 = dereference(it_map1).second
14502  *                     mi1_ewah2 = dereference(it_map2).second
14503  */
14504       __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
14505       if (__pyx_t_1) {
14506 
14507         /* "yt/utilities/lib/ewah_bool_wrap.pyx":977
14508  *                 it_map2 = ewah_coll2[0].find(mi1)
14509  *                 if it_map2 != ewah_coll2[0].end():
14510  *                     mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
14511  *                     mi1_ewah2 = dereference(it_map2).second
14512  *                     if mi1_ewah1.intersects(mi1_ewah2):
14513  */
14514         __pyx_t_3 = (*__pyx_v_it_map1).second;
14515         __pyx_v_mi1_ewah1 = __pyx_t_3;
14516 
14517         /* "yt/utilities/lib/ewah_bool_wrap.pyx":978
14518  *                 if it_map2 != ewah_coll2[0].end():
14519  *                     mi1_ewah1 = dereference(it_map1).second
14520  *                     mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
14521  *                     if mi1_ewah1.intersects(mi1_ewah2):
14522  *                         return 1
14523  */
14524         __pyx_t_3 = (*__pyx_v_it_map2).second;
14525         __pyx_v_mi1_ewah2 = __pyx_t_3;
14526 
14527         /* "yt/utilities/lib/ewah_bool_wrap.pyx":979
14528  *                     mi1_ewah1 = dereference(it_map1).second
14529  *                     mi1_ewah2 = dereference(it_map2).second
14530  *                     if mi1_ewah1.intersects(mi1_ewah2):             # <<<<<<<<<<<<<<
14531  *                         return 1
14532  *                 preincrement(it_map1)
14533  */
14534         __pyx_t_1 = (__pyx_v_mi1_ewah1.intersects(__pyx_v_mi1_ewah2) != 0);
14535         if (__pyx_t_1) {
14536 
14537           /* "yt/utilities/lib/ewah_bool_wrap.pyx":980
14538  *                     mi1_ewah2 = dereference(it_map2).second
14539  *                     if mi1_ewah1.intersects(mi1_ewah2):
14540  *                         return 1             # <<<<<<<<<<<<<<
14541  *                 preincrement(it_map1)
14542  *         return 0
14543  */
14544           __pyx_r = 1;
14545           goto __pyx_L0;
14546 
14547           /* "yt/utilities/lib/ewah_bool_wrap.pyx":979
14548  *                     mi1_ewah1 = dereference(it_map1).second
14549  *                     mi1_ewah2 = dereference(it_map2).second
14550  *                     if mi1_ewah1.intersects(mi1_ewah2):             # <<<<<<<<<<<<<<
14551  *                         return 1
14552  *                 preincrement(it_map1)
14553  */
14554         }
14555 
14556         /* "yt/utilities/lib/ewah_bool_wrap.pyx":976
14557  *                 mi1 = dereference(it_map1).first
14558  *                 it_map2 = ewah_coll2[0].find(mi1)
14559  *                 if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
14560  *                     mi1_ewah1 = dereference(it_map1).second
14561  *                     mi1_ewah2 = dereference(it_map2).second
14562  */
14563       }
14564 
14565       /* "yt/utilities/lib/ewah_bool_wrap.pyx":981
14566  *                     if mi1_ewah1.intersects(mi1_ewah2):
14567  *                         return 1
14568  *                 preincrement(it_map1)             # <<<<<<<<<<<<<<
14569  *         return 0
14570  *
14571  */
14572       (void)((++__pyx_v_it_map1));
14573     }
14574 
14575     /* "yt/utilities/lib/ewah_bool_wrap.pyx":971
14576  *             return 1
14577  *         # Intersection at refined level
14578  *         if ewah_refn1[0].intersects(ewah_refn2[0]) == 1:             # <<<<<<<<<<<<<<
14579  *             it_map1 = ewah_coll1[0].begin()
14580  *             while (it_map1 != ewah_coll1[0].end()):
14581  */
14582   }
14583 
14584   /* "yt/utilities/lib/ewah_bool_wrap.pyx":982
14585  *                         return 1
14586  *                 preincrement(it_map1)
14587  *         return 0             # <<<<<<<<<<<<<<
14588  *
14589  *     cdef void _logicalxor(self, BoolArrayCollection solf, BoolArrayCollection out):
14590  */
14591   __pyx_r = 0;
14592   goto __pyx_L0;
14593 
14594   /* "yt/utilities/lib/ewah_bool_wrap.pyx":949
14595  *         return self._append(solf)
14596  *
14597  *     cdef bint _intersects(self, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
14598  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14599  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14600  */
14601 
14602   /* function exit code */
14603   __pyx_L0:;
14604   __Pyx_RefNannyFinishContext();
14605   return __pyx_r;
14606 }
14607 
14608 /* "yt/utilities/lib/ewah_bool_wrap.pyx":984
14609  *         return 0
14610  *
14611  *     cdef void _logicalxor(self, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
14612  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14613  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14614  */
14615 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_out)14616 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out) {
14617   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
14618   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
14619   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll1;
14620   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
14621   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
14622   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
14623   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys_out;
14624   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn_out;
14625   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll_out;
14626   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
14627   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
14628   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
14629   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
14630   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_swap;
14631   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
14632   __Pyx_RefNannyDeclarations
14633   int __pyx_t_1;
14634   __pyx_t_5numpy_uint64_t __pyx_t_2;
14635   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
14636   __Pyx_RefNannySetupContext("_logicalxor", 0);
14637 
14638   /* "yt/utilities/lib/ewah_bool_wrap.pyx":985
14639  *
14640  *     cdef void _logicalxor(self, BoolArrayCollection solf, BoolArrayCollection out):
14641  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
14642  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14643  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
14644  */
14645   __pyx_v_ewah_keys1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
14646 
14647   /* "yt/utilities/lib/ewah_bool_wrap.pyx":986
14648  *     cdef void _logicalxor(self, BoolArrayCollection solf, BoolArrayCollection out):
14649  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14650  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
14651  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
14652  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14653  */
14654   __pyx_v_ewah_refn1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
14655 
14656   /* "yt/utilities/lib/ewah_bool_wrap.pyx":987
14657  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14658  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14659  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
14660  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14661  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14662  */
14663   __pyx_v_ewah_coll1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
14664 
14665   /* "yt/utilities/lib/ewah_bool_wrap.pyx":988
14666  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14667  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
14668  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
14669  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14670  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
14671  */
14672   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
14673 
14674   /* "yt/utilities/lib/ewah_bool_wrap.pyx":989
14675  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
14676  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14677  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
14678  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
14679  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
14680  */
14681   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
14682 
14683   /* "yt/utilities/lib/ewah_bool_wrap.pyx":990
14684  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
14685  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14686  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
14687  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
14688  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
14689  */
14690   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
14691 
14692   /* "yt/utilities/lib/ewah_bool_wrap.pyx":991
14693  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
14694  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
14695  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys             # <<<<<<<<<<<<<<
14696  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
14697  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll
14698  */
14699   __pyx_v_ewah_keys_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_keys);
14700 
14701   /* "yt/utilities/lib/ewah_bool_wrap.pyx":992
14702  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
14703  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
14704  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn             # <<<<<<<<<<<<<<
14705  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll
14706  *         cdef ewahmap_it it_map1, it_map2
14707  */
14708   __pyx_v_ewah_refn_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_refn);
14709 
14710   /* "yt/utilities/lib/ewah_bool_wrap.pyx":993
14711  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
14712  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
14713  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll             # <<<<<<<<<<<<<<
14714  *         cdef ewahmap_it it_map1, it_map2
14715  *         cdef ewah_bool_array mi1_ewah1, mi1_ewah2, swap
14716  */
14717   __pyx_v_ewah_coll_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_out->ewah_coll);
14718 
14719   /* "yt/utilities/lib/ewah_bool_wrap.pyx":998
14720  *         cdef np.uint64_t mi1
14721  *         # Keys
14722  *         ewah_keys1[0].logicalxor(ewah_keys2[0],ewah_keys_out[0])             # <<<<<<<<<<<<<<
14723  *         # Refn
14724  *         ewah_refn1[0].logicalxor(ewah_refn2[0],ewah_refn_out[0])
14725  */
14726   (__pyx_v_ewah_keys1[0]).logicalxor((__pyx_v_ewah_keys2[0]), (__pyx_v_ewah_keys_out[0]));
14727 
14728   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1000
14729  *         ewah_keys1[0].logicalxor(ewah_keys2[0],ewah_keys_out[0])
14730  *         # Refn
14731  *         ewah_refn1[0].logicalxor(ewah_refn2[0],ewah_refn_out[0])             # <<<<<<<<<<<<<<
14732  *         # Coll
14733  *         it_map1 = ewah_coll1[0].begin()
14734  */
14735   (__pyx_v_ewah_refn1[0]).logicalxor((__pyx_v_ewah_refn2[0]), (__pyx_v_ewah_refn_out[0]));
14736 
14737   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1002
14738  *         ewah_refn1[0].logicalxor(ewah_refn2[0],ewah_refn_out[0])
14739  *         # Coll
14740  *         it_map1 = ewah_coll1[0].begin()             # <<<<<<<<<<<<<<
14741  *         while (it_map1 != ewah_coll1[0].end()):
14742  *             mi1 = dereference(it_map1).first
14743  */
14744   __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).begin();
14745 
14746   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1003
14747  *         # Coll
14748  *         it_map1 = ewah_coll1[0].begin()
14749  *         while (it_map1 != ewah_coll1[0].end()):             # <<<<<<<<<<<<<<
14750  *             mi1 = dereference(it_map1).first
14751  *             mi1_ewah1 = dereference(it_map1).second
14752  */
14753   while (1) {
14754     __pyx_t_1 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
14755     if (!__pyx_t_1) break;
14756 
14757     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1004
14758  *         it_map1 = ewah_coll1[0].begin()
14759  *         while (it_map1 != ewah_coll1[0].end()):
14760  *             mi1 = dereference(it_map1).first             # <<<<<<<<<<<<<<
14761  *             mi1_ewah1 = dereference(it_map1).second
14762  *             it_map2 = ewah_coll2[0].find(mi1)
14763  */
14764     __pyx_t_2 = (*__pyx_v_it_map1).first;
14765     __pyx_v_mi1 = __pyx_t_2;
14766 
14767     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1005
14768  *         while (it_map1 != ewah_coll1[0].end()):
14769  *             mi1 = dereference(it_map1).first
14770  *             mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
14771  *             it_map2 = ewah_coll2[0].find(mi1)
14772  *             if it_map2 == ewah_coll2[0].end():
14773  */
14774     __pyx_t_3 = (*__pyx_v_it_map1).second;
14775     __pyx_v_mi1_ewah1 = __pyx_t_3;
14776 
14777     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1006
14778  *             mi1 = dereference(it_map1).first
14779  *             mi1_ewah1 = dereference(it_map1).second
14780  *             it_map2 = ewah_coll2[0].find(mi1)             # <<<<<<<<<<<<<<
14781  *             if it_map2 == ewah_coll2[0].end():
14782  *                 ewah_coll_out[0][mi1] = mi1_ewah1
14783  */
14784     __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).find(__pyx_v_mi1);
14785 
14786     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1007
14787  *             mi1_ewah1 = dereference(it_map1).second
14788  *             it_map2 = ewah_coll2[0].find(mi1)
14789  *             if it_map2 == ewah_coll2[0].end():             # <<<<<<<<<<<<<<
14790  *                 ewah_coll_out[0][mi1] = mi1_ewah1
14791  *             else:
14792  */
14793     __pyx_t_1 = ((__pyx_v_it_map2 == (__pyx_v_ewah_coll2[0]).end()) != 0);
14794     if (__pyx_t_1) {
14795 
14796       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1008
14797  *             it_map2 = ewah_coll2[0].find(mi1)
14798  *             if it_map2 == ewah_coll2[0].end():
14799  *                 ewah_coll_out[0][mi1] = mi1_ewah1             # <<<<<<<<<<<<<<
14800  *             else:
14801  *                 mi1_ewah2 = dereference(it_map2).second
14802  */
14803       ((__pyx_v_ewah_coll_out[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah1;
14804 
14805       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1007
14806  *             mi1_ewah1 = dereference(it_map1).second
14807  *             it_map2 = ewah_coll2[0].find(mi1)
14808  *             if it_map2 == ewah_coll2[0].end():             # <<<<<<<<<<<<<<
14809  *                 ewah_coll_out[0][mi1] = mi1_ewah1
14810  *             else:
14811  */
14812       goto __pyx_L5;
14813     }
14814 
14815     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1010
14816  *                 ewah_coll_out[0][mi1] = mi1_ewah1
14817  *             else:
14818  *                 mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
14819  *                 mi1_ewah1.logicalxor(mi1_ewah2, swap)
14820  *                 ewah_coll_out[0][mi1] = swap
14821  */
14822     /*else*/ {
14823       __pyx_t_3 = (*__pyx_v_it_map2).second;
14824       __pyx_v_mi1_ewah2 = __pyx_t_3;
14825 
14826       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1011
14827  *             else:
14828  *                 mi1_ewah2 = dereference(it_map2).second
14829  *                 mi1_ewah1.logicalxor(mi1_ewah2, swap)             # <<<<<<<<<<<<<<
14830  *                 ewah_coll_out[0][mi1] = swap
14831  *             preincrement(it_map1)
14832  */
14833       __pyx_v_mi1_ewah1.logicalxor(__pyx_v_mi1_ewah2, __pyx_v_swap);
14834 
14835       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1012
14836  *                 mi1_ewah2 = dereference(it_map2).second
14837  *                 mi1_ewah1.logicalxor(mi1_ewah2, swap)
14838  *                 ewah_coll_out[0][mi1] = swap             # <<<<<<<<<<<<<<
14839  *             preincrement(it_map1)
14840  *         it_map2 = ewah_coll2[0].begin()
14841  */
14842       ((__pyx_v_ewah_coll_out[0])[__pyx_v_mi1]) = __pyx_v_swap;
14843     }
14844     __pyx_L5:;
14845 
14846     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1013
14847  *                 mi1_ewah1.logicalxor(mi1_ewah2, swap)
14848  *                 ewah_coll_out[0][mi1] = swap
14849  *             preincrement(it_map1)             # <<<<<<<<<<<<<<
14850  *         it_map2 = ewah_coll2[0].begin()
14851  *         while (it_map2 != ewah_coll2[0].end()):
14852  */
14853     (void)((++__pyx_v_it_map1));
14854   }
14855 
14856   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1014
14857  *                 ewah_coll_out[0][mi1] = swap
14858  *             preincrement(it_map1)
14859  *         it_map2 = ewah_coll2[0].begin()             # <<<<<<<<<<<<<<
14860  *         while (it_map2 != ewah_coll2[0].end()):
14861  *             mi1 = dereference(it_map2).first
14862  */
14863   __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).begin();
14864 
14865   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1015
14866  *             preincrement(it_map1)
14867  *         it_map2 = ewah_coll2[0].begin()
14868  *         while (it_map2 != ewah_coll2[0].end()):             # <<<<<<<<<<<<<<
14869  *             mi1 = dereference(it_map2).first
14870  *             mi1_ewah2 = dereference(it_map2).second
14871  */
14872   while (1) {
14873     __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
14874     if (!__pyx_t_1) break;
14875 
14876     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1016
14877  *         it_map2 = ewah_coll2[0].begin()
14878  *         while (it_map2 != ewah_coll2[0].end()):
14879  *             mi1 = dereference(it_map2).first             # <<<<<<<<<<<<<<
14880  *             mi1_ewah2 = dereference(it_map2).second
14881  *             it_map1 = ewah_coll1[0].find(mi1)
14882  */
14883     __pyx_t_2 = (*__pyx_v_it_map2).first;
14884     __pyx_v_mi1 = __pyx_t_2;
14885 
14886     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1017
14887  *         while (it_map2 != ewah_coll2[0].end()):
14888  *             mi1 = dereference(it_map2).first
14889  *             mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
14890  *             it_map1 = ewah_coll1[0].find(mi1)
14891  *             if it_map1 == ewah_coll1[0].end():
14892  */
14893     __pyx_t_3 = (*__pyx_v_it_map2).second;
14894     __pyx_v_mi1_ewah2 = __pyx_t_3;
14895 
14896     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1018
14897  *             mi1 = dereference(it_map2).first
14898  *             mi1_ewah2 = dereference(it_map2).second
14899  *             it_map1 = ewah_coll1[0].find(mi1)             # <<<<<<<<<<<<<<
14900  *             if it_map1 == ewah_coll1[0].end():
14901  *                 ewah_coll_out[0][mi1] = mi1_ewah2
14902  */
14903     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).find(__pyx_v_mi1);
14904 
14905     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1019
14906  *             mi1_ewah2 = dereference(it_map2).second
14907  *             it_map1 = ewah_coll1[0].find(mi1)
14908  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
14909  *                 ewah_coll_out[0][mi1] = mi1_ewah2
14910  *             preincrement(it_map2)
14911  */
14912     __pyx_t_1 = ((__pyx_v_it_map1 == (__pyx_v_ewah_coll1[0]).end()) != 0);
14913     if (__pyx_t_1) {
14914 
14915       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1020
14916  *             it_map1 = ewah_coll1[0].find(mi1)
14917  *             if it_map1 == ewah_coll1[0].end():
14918  *                 ewah_coll_out[0][mi1] = mi1_ewah2             # <<<<<<<<<<<<<<
14919  *             preincrement(it_map2)
14920  *
14921  */
14922       ((__pyx_v_ewah_coll_out[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah2;
14923 
14924       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1019
14925  *             mi1_ewah2 = dereference(it_map2).second
14926  *             it_map1 = ewah_coll1[0].find(mi1)
14927  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
14928  *                 ewah_coll_out[0][mi1] = mi1_ewah2
14929  *             preincrement(it_map2)
14930  */
14931     }
14932 
14933     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1021
14934  *             if it_map1 == ewah_coll1[0].end():
14935  *                 ewah_coll_out[0][mi1] = mi1_ewah2
14936  *             preincrement(it_map2)             # <<<<<<<<<<<<<<
14937  *
14938  *     def logicalxor(self, solf, out):
14939  */
14940     (void)((++__pyx_v_it_map2));
14941   }
14942 
14943   /* "yt/utilities/lib/ewah_bool_wrap.pyx":984
14944  *         return 0
14945  *
14946  *     cdef void _logicalxor(self, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
14947  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
14948  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
14949  */
14950 
14951   /* function exit code */
14952   __Pyx_RefNannyFinishContext();
14953 }
14954 
14955 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1023
14956  *             preincrement(it_map2)
14957  *
14958  *     def logicalxor(self, solf, out):             # <<<<<<<<<<<<<<
14959  *         return self._logicalxor(solf, out)
14960  *
14961  */
14962 
14963 /* Python wrapper */
14964 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_37logicalxor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_37logicalxor(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)14965 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_37logicalxor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14966   PyObject *__pyx_v_solf = 0;
14967   PyObject *__pyx_v_out = 0;
14968   PyObject *__pyx_r = 0;
14969   __Pyx_RefNannyDeclarations
14970   __Pyx_RefNannySetupContext("logicalxor (wrapper)", 0);
14971   {
14972     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solf,&__pyx_n_s_out,0};
14973     PyObject* values[2] = {0,0};
14974     if (unlikely(__pyx_kwds)) {
14975       Py_ssize_t kw_args;
14976       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14977       switch (pos_args) {
14978         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14979         CYTHON_FALLTHROUGH;
14980         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14981         CYTHON_FALLTHROUGH;
14982         case  0: break;
14983         default: goto __pyx_L5_argtuple_error;
14984       }
14985       kw_args = PyDict_Size(__pyx_kwds);
14986       switch (pos_args) {
14987         case  0:
14988         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solf)) != 0)) kw_args--;
14989         else goto __pyx_L5_argtuple_error;
14990         CYTHON_FALLTHROUGH;
14991         case  1:
14992         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
14993         else {
14994           __Pyx_RaiseArgtupleInvalid("logicalxor", 1, 2, 2, 1); __PYX_ERR(0, 1023, __pyx_L3_error)
14995         }
14996       }
14997       if (unlikely(kw_args > 0)) {
14998         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "logicalxor") < 0)) __PYX_ERR(0, 1023, __pyx_L3_error)
14999       }
15000     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
15001       goto __pyx_L5_argtuple_error;
15002     } else {
15003       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15004       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15005     }
15006     __pyx_v_solf = values[0];
15007     __pyx_v_out = values[1];
15008   }
15009   goto __pyx_L4_argument_unpacking_done;
15010   __pyx_L5_argtuple_error:;
15011   __Pyx_RaiseArgtupleInvalid("logicalxor", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1023, __pyx_L3_error)
15012   __pyx_L3_error:;
15013   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.logicalxor", __pyx_clineno, __pyx_lineno, __pyx_filename);
15014   __Pyx_RefNannyFinishContext();
15015   return NULL;
15016   __pyx_L4_argument_unpacking_done:;
15017   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_36logicalxor(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_solf, __pyx_v_out);
15018 
15019   /* function exit code */
15020   __Pyx_RefNannyFinishContext();
15021   return __pyx_r;
15022 }
15023 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_36logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_solf,PyObject * __pyx_v_out)15024 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_36logicalxor(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_solf, PyObject *__pyx_v_out) {
15025   PyObject *__pyx_r = NULL;
15026   __Pyx_RefNannyDeclarations
15027   PyObject *__pyx_t_1 = NULL;
15028   __Pyx_RefNannySetupContext("logicalxor", 0);
15029 
15030   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1024
15031  *
15032  *     def logicalxor(self, solf, out):
15033  *         return self._logicalxor(solf, out)             # <<<<<<<<<<<<<<
15034  *
15035  *     cdef void _logicaland(self, BoolArrayCollection solf, BoolArrayCollection out):
15036  */
15037   __Pyx_XDECREF(__pyx_r);
15038   if (!(likely(((__pyx_v_solf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_solf, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 1024, __pyx_L1_error)
15039   if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 1024, __pyx_L1_error)
15040   __pyx_t_1 = __Pyx_void_to_None(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_logicalxor(__pyx_v_self, ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_solf), ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_out))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)
15041   __Pyx_GOTREF(__pyx_t_1);
15042   __pyx_r = __pyx_t_1;
15043   __pyx_t_1 = 0;
15044   goto __pyx_L0;
15045 
15046   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1023
15047  *             preincrement(it_map2)
15048  *
15049  *     def logicalxor(self, solf, out):             # <<<<<<<<<<<<<<
15050  *         return self._logicalxor(solf, out)
15051  *
15052  */
15053 
15054   /* function exit code */
15055   __pyx_L1_error:;
15056   __Pyx_XDECREF(__pyx_t_1);
15057   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.logicalxor", __pyx_clineno, __pyx_lineno, __pyx_filename);
15058   __pyx_r = NULL;
15059   __pyx_L0:;
15060   __Pyx_XGIVEREF(__pyx_r);
15061   __Pyx_RefNannyFinishContext();
15062   return __pyx_r;
15063 }
15064 
15065 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1026
15066  *         return self._logicalxor(solf, out)
15067  *
15068  *     cdef void _logicaland(self, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
15069  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
15070  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
15071  */
15072 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_out)15073 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out) {
15074   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys1;
15075   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn1;
15076   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll1;
15077   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys2;
15078   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn2;
15079   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
15080   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys_out;
15081   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn_out;
15082   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll_out;
15083   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
15084   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
15085   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
15086   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
15087   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_swap;
15088   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
15089   __Pyx_RefNannyDeclarations
15090   int __pyx_t_1;
15091   __pyx_t_5numpy_uint64_t __pyx_t_2;
15092   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
15093   __Pyx_RefNannySetupContext("_logicaland", 0);
15094 
15095   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1027
15096  *
15097  *     cdef void _logicaland(self, BoolArrayCollection solf, BoolArrayCollection out):
15098  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
15099  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
15100  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
15101  */
15102   __pyx_v_ewah_keys1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
15103 
15104   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1028
15105  *     cdef void _logicaland(self, BoolArrayCollection solf, BoolArrayCollection out):
15106  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
15107  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
15108  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
15109  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
15110  */
15111   __pyx_v_ewah_refn1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
15112 
15113   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1029
15114  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
15115  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
15116  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
15117  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
15118  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
15119  */
15120   __pyx_v_ewah_coll1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
15121 
15122   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1030
15123  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
15124  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
15125  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
15126  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
15127  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
15128  */
15129   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
15130 
15131   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1031
15132  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
15133  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
15134  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
15135  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
15136  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
15137  */
15138   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
15139 
15140   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1032
15141  *         cdef ewah_bool_array *ewah_keys2 = <ewah_bool_array *> solf.ewah_keys
15142  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
15143  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
15144  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
15145  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
15146  */
15147   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
15148 
15149   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1033
15150  *         cdef ewah_bool_array *ewah_refn2 = <ewah_bool_array *> solf.ewah_refn
15151  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
15152  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys             # <<<<<<<<<<<<<<
15153  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
15154  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll
15155  */
15156   __pyx_v_ewah_keys_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_keys);
15157 
15158   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1034
15159  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
15160  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
15161  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn             # <<<<<<<<<<<<<<
15162  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll
15163  *         cdef ewahmap_it it_map1, it_map2
15164  */
15165   __pyx_v_ewah_refn_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_out->ewah_refn);
15166 
15167   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1035
15168  *         cdef ewah_bool_array *ewah_keys_out = <ewah_bool_array *> out.ewah_keys
15169  *         cdef ewah_bool_array *ewah_refn_out = <ewah_bool_array *> out.ewah_refn
15170  *         cdef ewah_map *ewah_coll_out = <ewah_map *> out.ewah_coll             # <<<<<<<<<<<<<<
15171  *         cdef ewahmap_it it_map1, it_map2
15172  *         cdef ewah_bool_array mi1_ewah1, mi1_ewah2, swap
15173  */
15174   __pyx_v_ewah_coll_out = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_out->ewah_coll);
15175 
15176   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1040
15177  *         cdef np.uint64_t mi1
15178  *         # Keys
15179  *         ewah_keys1[0].logicaland(ewah_keys2[0],ewah_keys_out[0])             # <<<<<<<<<<<<<<
15180  *         # Refn
15181  *         ewah_refn1[0].logicaland(ewah_refn2[0],ewah_refn_out[0])
15182  */
15183   (__pyx_v_ewah_keys1[0]).logicaland((__pyx_v_ewah_keys2[0]), (__pyx_v_ewah_keys_out[0]));
15184 
15185   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1042
15186  *         ewah_keys1[0].logicaland(ewah_keys2[0],ewah_keys_out[0])
15187  *         # Refn
15188  *         ewah_refn1[0].logicaland(ewah_refn2[0],ewah_refn_out[0])             # <<<<<<<<<<<<<<
15189  *         # Coll
15190  *         if ewah_refn_out[0].numberOfOnes() > 0:
15191  */
15192   (__pyx_v_ewah_refn1[0]).logicaland((__pyx_v_ewah_refn2[0]), (__pyx_v_ewah_refn_out[0]));
15193 
15194   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1044
15195  *         ewah_refn1[0].logicaland(ewah_refn2[0],ewah_refn_out[0])
15196  *         # Coll
15197  *         if ewah_refn_out[0].numberOfOnes() > 0:             # <<<<<<<<<<<<<<
15198  *             it_map1 = ewah_coll1[0].begin()
15199  *             while (it_map1 != ewah_coll1[0].end()):
15200  */
15201   __pyx_t_1 = (((__pyx_v_ewah_refn_out[0]).numberOfOnes() > 0) != 0);
15202   if (__pyx_t_1) {
15203 
15204     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1045
15205  *         # Coll
15206  *         if ewah_refn_out[0].numberOfOnes() > 0:
15207  *             it_map1 = ewah_coll1[0].begin()             # <<<<<<<<<<<<<<
15208  *             while (it_map1 != ewah_coll1[0].end()):
15209  *                 mi1 = dereference(it_map1).first
15210  */
15211     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).begin();
15212 
15213     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1046
15214  *         if ewah_refn_out[0].numberOfOnes() > 0:
15215  *             it_map1 = ewah_coll1[0].begin()
15216  *             while (it_map1 != ewah_coll1[0].end()):             # <<<<<<<<<<<<<<
15217  *                 mi1 = dereference(it_map1).first
15218  *                 mi1_ewah1 = dereference(it_map1).second
15219  */
15220     while (1) {
15221       __pyx_t_1 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
15222       if (!__pyx_t_1) break;
15223 
15224       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1047
15225  *             it_map1 = ewah_coll1[0].begin()
15226  *             while (it_map1 != ewah_coll1[0].end()):
15227  *                 mi1 = dereference(it_map1).first             # <<<<<<<<<<<<<<
15228  *                 mi1_ewah1 = dereference(it_map1).second
15229  *                 it_map2 = ewah_coll2[0].find(mi1)
15230  */
15231       __pyx_t_2 = (*__pyx_v_it_map1).first;
15232       __pyx_v_mi1 = __pyx_t_2;
15233 
15234       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1048
15235  *             while (it_map1 != ewah_coll1[0].end()):
15236  *                 mi1 = dereference(it_map1).first
15237  *                 mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
15238  *                 it_map2 = ewah_coll2[0].find(mi1)
15239  *                 if it_map2 != ewah_coll2[0].end():
15240  */
15241       __pyx_t_3 = (*__pyx_v_it_map1).second;
15242       __pyx_v_mi1_ewah1 = __pyx_t_3;
15243 
15244       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1049
15245  *                 mi1 = dereference(it_map1).first
15246  *                 mi1_ewah1 = dereference(it_map1).second
15247  *                 it_map2 = ewah_coll2[0].find(mi1)             # <<<<<<<<<<<<<<
15248  *                 if it_map2 != ewah_coll2[0].end():
15249  *                     mi1_ewah2 = dereference(it_map2).second
15250  */
15251       __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).find(__pyx_v_mi1);
15252 
15253       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1050
15254  *                 mi1_ewah1 = dereference(it_map1).second
15255  *                 it_map2 = ewah_coll2[0].find(mi1)
15256  *                 if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
15257  *                     mi1_ewah2 = dereference(it_map2).second
15258  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
15259  */
15260       __pyx_t_1 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
15261       if (__pyx_t_1) {
15262 
15263         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1051
15264  *                 it_map2 = ewah_coll2[0].find(mi1)
15265  *                 if it_map2 != ewah_coll2[0].end():
15266  *                     mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
15267  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
15268  *                     ewah_coll_out[0][mi1] = swap
15269  */
15270         __pyx_t_3 = (*__pyx_v_it_map2).second;
15271         __pyx_v_mi1_ewah2 = __pyx_t_3;
15272 
15273         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1052
15274  *                 if it_map2 != ewah_coll2[0].end():
15275  *                     mi1_ewah2 = dereference(it_map2).second
15276  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)             # <<<<<<<<<<<<<<
15277  *                     ewah_coll_out[0][mi1] = swap
15278  *                 preincrement(it_map1)
15279  */
15280         __pyx_v_mi1_ewah1.logicaland(__pyx_v_mi1_ewah2, __pyx_v_swap);
15281 
15282         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1053
15283  *                     mi1_ewah2 = dereference(it_map2).second
15284  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
15285  *                     ewah_coll_out[0][mi1] = swap             # <<<<<<<<<<<<<<
15286  *                 preincrement(it_map1)
15287  *
15288  */
15289         ((__pyx_v_ewah_coll_out[0])[__pyx_v_mi1]) = __pyx_v_swap;
15290 
15291         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1050
15292  *                 mi1_ewah1 = dereference(it_map1).second
15293  *                 it_map2 = ewah_coll2[0].find(mi1)
15294  *                 if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
15295  *                     mi1_ewah2 = dereference(it_map2).second
15296  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
15297  */
15298       }
15299 
15300       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1054
15301  *                     mi1_ewah1.logicaland(mi1_ewah2, swap)
15302  *                     ewah_coll_out[0][mi1] = swap
15303  *                 preincrement(it_map1)             # <<<<<<<<<<<<<<
15304  *
15305  *     def logicaland(self, solf, out):
15306  */
15307       (void)((++__pyx_v_it_map1));
15308     }
15309 
15310     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1044
15311  *         ewah_refn1[0].logicaland(ewah_refn2[0],ewah_refn_out[0])
15312  *         # Coll
15313  *         if ewah_refn_out[0].numberOfOnes() > 0:             # <<<<<<<<<<<<<<
15314  *             it_map1 = ewah_coll1[0].begin()
15315  *             while (it_map1 != ewah_coll1[0].end()):
15316  */
15317   }
15318 
15319   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1026
15320  *         return self._logicalxor(solf, out)
15321  *
15322  *     cdef void _logicaland(self, BoolArrayCollection solf, BoolArrayCollection out):             # <<<<<<<<<<<<<<
15323  *         cdef ewah_bool_array *ewah_keys1 = <ewah_bool_array *> self.ewah_keys
15324  *         cdef ewah_bool_array *ewah_refn1 = <ewah_bool_array *> self.ewah_refn
15325  */
15326 
15327   /* function exit code */
15328   __Pyx_RefNannyFinishContext();
15329 }
15330 
15331 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1056
15332  *                 preincrement(it_map1)
15333  *
15334  *     def logicaland(self, solf, out):             # <<<<<<<<<<<<<<
15335  *         return self._logicaland(solf, out)
15336  *
15337  */
15338 
15339 /* Python wrapper */
15340 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_39logicaland(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_39logicaland(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)15341 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_39logicaland(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15342   PyObject *__pyx_v_solf = 0;
15343   PyObject *__pyx_v_out = 0;
15344   PyObject *__pyx_r = 0;
15345   __Pyx_RefNannyDeclarations
15346   __Pyx_RefNannySetupContext("logicaland (wrapper)", 0);
15347   {
15348     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solf,&__pyx_n_s_out,0};
15349     PyObject* values[2] = {0,0};
15350     if (unlikely(__pyx_kwds)) {
15351       Py_ssize_t kw_args;
15352       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15353       switch (pos_args) {
15354         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15355         CYTHON_FALLTHROUGH;
15356         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15357         CYTHON_FALLTHROUGH;
15358         case  0: break;
15359         default: goto __pyx_L5_argtuple_error;
15360       }
15361       kw_args = PyDict_Size(__pyx_kwds);
15362       switch (pos_args) {
15363         case  0:
15364         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_solf)) != 0)) kw_args--;
15365         else goto __pyx_L5_argtuple_error;
15366         CYTHON_FALLTHROUGH;
15367         case  1:
15368         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
15369         else {
15370           __Pyx_RaiseArgtupleInvalid("logicaland", 1, 2, 2, 1); __PYX_ERR(0, 1056, __pyx_L3_error)
15371         }
15372       }
15373       if (unlikely(kw_args > 0)) {
15374         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "logicaland") < 0)) __PYX_ERR(0, 1056, __pyx_L3_error)
15375       }
15376     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
15377       goto __pyx_L5_argtuple_error;
15378     } else {
15379       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15380       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15381     }
15382     __pyx_v_solf = values[0];
15383     __pyx_v_out = values[1];
15384   }
15385   goto __pyx_L4_argument_unpacking_done;
15386   __pyx_L5_argtuple_error:;
15387   __Pyx_RaiseArgtupleInvalid("logicaland", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1056, __pyx_L3_error)
15388   __pyx_L3_error:;
15389   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.logicaland", __pyx_clineno, __pyx_lineno, __pyx_filename);
15390   __Pyx_RefNannyFinishContext();
15391   return NULL;
15392   __pyx_L4_argument_unpacking_done:;
15393   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_38logicaland(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_solf, __pyx_v_out);
15394 
15395   /* function exit code */
15396   __Pyx_RefNannyFinishContext();
15397   return __pyx_r;
15398 }
15399 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_38logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_solf,PyObject * __pyx_v_out)15400 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_38logicaland(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_solf, PyObject *__pyx_v_out) {
15401   PyObject *__pyx_r = NULL;
15402   __Pyx_RefNannyDeclarations
15403   PyObject *__pyx_t_1 = NULL;
15404   __Pyx_RefNannySetupContext("logicaland", 0);
15405 
15406   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1057
15407  *
15408  *     def logicaland(self, solf, out):
15409  *         return self._logicaland(solf, out)             # <<<<<<<<<<<<<<
15410  *
15411  *     cdef void _select_contaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
15412  */
15413   __Pyx_XDECREF(__pyx_r);
15414   if (!(likely(((__pyx_v_solf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_solf, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 1057, __pyx_L1_error)
15415   if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection))))) __PYX_ERR(0, 1057, __pyx_L1_error)
15416   __pyx_t_1 = __Pyx_void_to_None(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_logicaland(__pyx_v_self, ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_solf), ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_out))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error)
15417   __Pyx_GOTREF(__pyx_t_1);
15418   __pyx_r = __pyx_t_1;
15419   __pyx_t_1 = 0;
15420   goto __pyx_L0;
15421 
15422   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1056
15423  *                 preincrement(it_map1)
15424  *
15425  *     def logicaland(self, solf, out):             # <<<<<<<<<<<<<<
15426  *         return self._logicaland(solf, out)
15427  *
15428  */
15429 
15430   /* function exit code */
15431   __pyx_L1_error:;
15432   __Pyx_XDECREF(__pyx_t_1);
15433   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.logicaland", __pyx_clineno, __pyx_lineno, __pyx_filename);
15434   __pyx_r = NULL;
15435   __pyx_L0:;
15436   __Pyx_XGIVEREF(__pyx_r);
15437   __Pyx_RefNannyFinishContext();
15438   return __pyx_r;
15439 }
15440 
15441 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1059
15442  *         return self._logicaland(solf, out)
15443  *
15444  *     cdef void _select_contaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,             # <<<<<<<<<<<<<<
15445  *                                    BoolArrayCollection mask2 = None):
15446  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
15447  */
15448 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_mask,__Pyx_memviewslice __pyx_v_out,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated * __pyx_optional_args)15449 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask, __Pyx_memviewslice __pyx_v_out, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated *__pyx_optional_args) {
15450 
15451   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1060
15452  *
15453  *     cdef void _select_contaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
15454  *                                    BoolArrayCollection mask2 = None):             # <<<<<<<<<<<<<<
15455  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
15456  *         cdef ewah_bool_array ewah_mask
15457  */
15458   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask2 = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)Py_None);
15459   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
15460   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_mask;
15461   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_mask1;
15462   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_mask2;
15463   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_slct;
15464   __pyx_t_5numpy_uint64_t __pyx_v_iset;
15465   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_set;
15466   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_end;
15467   __Pyx_RefNannyDeclarations
15468   int __pyx_t_1;
15469   int __pyx_t_2;
15470   __pyx_t_5numpy_uint64_t __pyx_t_3;
15471   int __pyx_t_4;
15472   __Pyx_RefNannySetupContext("_select_contaminated", 0);
15473   if (__pyx_optional_args) {
15474     if (__pyx_optional_args->__pyx_n > 0) {
15475       __pyx_v_mask2 = __pyx_optional_args->mask2;
15476     }
15477   }
15478 
15479   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1061
15480  *     cdef void _select_contaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
15481  *                                    BoolArrayCollection mask2 = None):
15482  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
15483  *         cdef ewah_bool_array ewah_mask
15484  *         cdef ewah_bool_array *ewah_mask1
15485  */
15486   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
15487 
15488   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1065
15489  *         cdef ewah_bool_array *ewah_mask1
15490  *         cdef ewah_bool_array *ewah_mask2
15491  *         if mask2 is None:             # <<<<<<<<<<<<<<
15492  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
15493  *         else:
15494  */
15495   __pyx_t_1 = (((PyObject *)__pyx_v_mask2) == Py_None);
15496   __pyx_t_2 = (__pyx_t_1 != 0);
15497   if (__pyx_t_2) {
15498 
15499     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1066
15500  *         cdef ewah_bool_array *ewah_mask2
15501  *         if mask2 is None:
15502  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]             # <<<<<<<<<<<<<<
15503  *         else:
15504  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
15505  */
15506     __pyx_v_ewah_mask = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask->ewah_keys)[0]);
15507 
15508     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1065
15509  *         cdef ewah_bool_array *ewah_mask1
15510  *         cdef ewah_bool_array *ewah_mask2
15511  *         if mask2 is None:             # <<<<<<<<<<<<<<
15512  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
15513  *         else:
15514  */
15515     goto __pyx_L3;
15516   }
15517 
15518   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1068
15519  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
15520  *         else:
15521  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys             # <<<<<<<<<<<<<<
15522  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys
15523  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
15524  */
15525   /*else*/ {
15526     __pyx_v_ewah_mask1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask->ewah_keys);
15527 
15528     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1069
15529  *         else:
15530  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
15531  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys             # <<<<<<<<<<<<<<
15532  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
15533  *         cdef ewah_bool_array ewah_slct
15534  */
15535     __pyx_v_ewah_mask2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask2->ewah_keys);
15536 
15537     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1070
15538  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
15539  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys
15540  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)             # <<<<<<<<<<<<<<
15541  *         cdef ewah_bool_array ewah_slct
15542  *         ewah_refn[0].logicaland(ewah_mask,ewah_slct)
15543  */
15544     (__pyx_v_ewah_mask1[0]).logicalor((__pyx_v_ewah_mask2[0]), __pyx_v_ewah_mask);
15545   }
15546   __pyx_L3:;
15547 
15548   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1072
15549  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
15550  *         cdef ewah_bool_array ewah_slct
15551  *         ewah_refn[0].logicaland(ewah_mask,ewah_slct)             # <<<<<<<<<<<<<<
15552  *         cdef np.uint64_t iset
15553  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
15554  */
15555   (__pyx_v_ewah_refn[0]).logicaland(__pyx_v_ewah_mask, __pyx_v_ewah_slct);
15556 
15557   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1074
15558  *         ewah_refn[0].logicaland(ewah_mask,ewah_slct)
15559  *         cdef np.uint64_t iset
15560  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())             # <<<<<<<<<<<<<<
15561  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
15562  *         while iter_set[0] != iter_end[0]:
15563  */
15564   __pyx_v_iter_set = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_slct.begin());
15565 
15566   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1075
15567  *         cdef np.uint64_t iset
15568  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
15569  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())             # <<<<<<<<<<<<<<
15570  *         while iter_set[0] != iter_end[0]:
15571  *             iset = dereference(iter_set[0])
15572  */
15573   __pyx_v_iter_end = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_slct.end());
15574 
15575   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1076
15576  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
15577  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
15578  *         while iter_set[0] != iter_end[0]:             # <<<<<<<<<<<<<<
15579  *             iset = dereference(iter_set[0])
15580  *             out[iset] = 1
15581  */
15582   while (1) {
15583     __pyx_t_2 = (((__pyx_v_iter_set[0]) != (__pyx_v_iter_end[0])) != 0);
15584     if (!__pyx_t_2) break;
15585 
15586     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1077
15587  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
15588  *         while iter_set[0] != iter_end[0]:
15589  *             iset = dereference(iter_set[0])             # <<<<<<<<<<<<<<
15590  *             out[iset] = 1
15591  *             preincrement(iter_set[0])
15592  */
15593     __pyx_v_iset = (*(__pyx_v_iter_set[0]));
15594 
15595     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1078
15596  *         while iter_set[0] != iter_end[0]:
15597  *             iset = dereference(iter_set[0])
15598  *             out[iset] = 1             # <<<<<<<<<<<<<<
15599  *             preincrement(iter_set[0])
15600  *
15601  */
15602     __pyx_t_3 = __pyx_v_iset;
15603     __pyx_t_4 = -1;
15604     if (unlikely(__pyx_t_3 >= (size_t)__pyx_v_out.shape[0])) __pyx_t_4 = 0;
15605     if (unlikely(__pyx_t_4 != -1)) {
15606       __Pyx_RaiseBufferIndexError(__pyx_t_4);
15607       __PYX_ERR(0, 1078, __pyx_L1_error)
15608     }
15609     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_3 * __pyx_v_out.strides[0]) )) = 1;
15610 
15611     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1079
15612  *             iset = dereference(iter_set[0])
15613  *             out[iset] = 1
15614  *             preincrement(iter_set[0])             # <<<<<<<<<<<<<<
15615  *
15616  *     cdef void _select_uncontaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
15617  */
15618     (void)((++(__pyx_v_iter_set[0])));
15619   }
15620 
15621   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1059
15622  *         return self._logicaland(solf, out)
15623  *
15624  *     cdef void _select_contaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,             # <<<<<<<<<<<<<<
15625  *                                    BoolArrayCollection mask2 = None):
15626  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
15627  */
15628 
15629   /* function exit code */
15630   goto __pyx_L0;
15631   __pyx_L1_error:;
15632   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection._select_contaminated", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15633   __pyx_L0:;
15634   __Pyx_RefNannyFinishContext();
15635 }
15636 
15637 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1081
15638  *             preincrement(iter_set[0])
15639  *
15640  *     cdef void _select_uncontaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,             # <<<<<<<<<<<<<<
15641  *                                      BoolArrayCollection mask2 = None):
15642  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
15643  */
15644 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_mask,__Pyx_memviewslice __pyx_v_out,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated * __pyx_optional_args)15645 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask, __Pyx_memviewslice __pyx_v_out, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated *__pyx_optional_args) {
15646 
15647   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1082
15648  *
15649  *     cdef void _select_uncontaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
15650  *                                      BoolArrayCollection mask2 = None):             # <<<<<<<<<<<<<<
15651  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
15652  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
15653  */
15654   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mask2 = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)Py_None);
15655   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
15656   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
15657   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_mask;
15658   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_mask1;
15659   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_mask2;
15660   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_slct;
15661   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_ewah_coar;
15662   __pyx_t_5numpy_uint64_t __pyx_v_iset;
15663   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_set;
15664   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_end;
15665   __Pyx_RefNannyDeclarations
15666   int __pyx_t_1;
15667   int __pyx_t_2;
15668   __pyx_t_5numpy_uint64_t __pyx_t_3;
15669   int __pyx_t_4;
15670   __Pyx_RefNannySetupContext("_select_uncontaminated", 0);
15671   if (__pyx_optional_args) {
15672     if (__pyx_optional_args->__pyx_n > 0) {
15673       __pyx_v_mask2 = __pyx_optional_args->mask2;
15674     }
15675   }
15676 
15677   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1083
15678  *     cdef void _select_uncontaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,
15679  *                                      BoolArrayCollection mask2 = None):
15680  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
15681  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
15682  *         cdef ewah_bool_array ewah_mask
15683  */
15684   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
15685 
15686   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1084
15687  *                                      BoolArrayCollection mask2 = None):
15688  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
15689  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
15690  *         cdef ewah_bool_array ewah_mask
15691  *         cdef ewah_bool_array *ewah_mask1
15692  */
15693   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
15694 
15695   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1088
15696  *         cdef ewah_bool_array *ewah_mask1
15697  *         cdef ewah_bool_array *ewah_mask2
15698  *         if mask2 is None:             # <<<<<<<<<<<<<<
15699  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
15700  *         else:
15701  */
15702   __pyx_t_1 = (((PyObject *)__pyx_v_mask2) == Py_None);
15703   __pyx_t_2 = (__pyx_t_1 != 0);
15704   if (__pyx_t_2) {
15705 
15706     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1089
15707  *         cdef ewah_bool_array *ewah_mask2
15708  *         if mask2 is None:
15709  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]             # <<<<<<<<<<<<<<
15710  *         else:
15711  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
15712  */
15713     __pyx_v_ewah_mask = (((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask->ewah_keys)[0]);
15714 
15715     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1088
15716  *         cdef ewah_bool_array *ewah_mask1
15717  *         cdef ewah_bool_array *ewah_mask2
15718  *         if mask2 is None:             # <<<<<<<<<<<<<<
15719  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
15720  *         else:
15721  */
15722     goto __pyx_L3;
15723   }
15724 
15725   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1091
15726  *             ewah_mask = (<ewah_bool_array *> mask.ewah_keys)[0]
15727  *         else:
15728  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys             # <<<<<<<<<<<<<<
15729  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys
15730  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
15731  */
15732   /*else*/ {
15733     __pyx_v_ewah_mask1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask->ewah_keys);
15734 
15735     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1092
15736  *         else:
15737  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
15738  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys             # <<<<<<<<<<<<<<
15739  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)
15740  *         cdef ewah_bool_array ewah_slct
15741  */
15742     __pyx_v_ewah_mask2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_mask2->ewah_keys);
15743 
15744     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1093
15745  *             ewah_mask1 = <ewah_bool_array *> mask.ewah_keys
15746  *             ewah_mask2 = <ewah_bool_array *> mask2.ewah_keys
15747  *             ewah_mask1[0].logicalor(ewah_mask2[0],ewah_mask)             # <<<<<<<<<<<<<<
15748  *         cdef ewah_bool_array ewah_slct
15749  *         cdef ewah_bool_array ewah_coar
15750  */
15751     (__pyx_v_ewah_mask1[0]).logicalor((__pyx_v_ewah_mask2[0]), __pyx_v_ewah_mask);
15752   }
15753   __pyx_L3:;
15754 
15755   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1096
15756  *         cdef ewah_bool_array ewah_slct
15757  *         cdef ewah_bool_array ewah_coar
15758  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar)             # <<<<<<<<<<<<<<
15759  *         ewah_coar.logicaland(ewah_mask,ewah_slct)
15760  *         cdef np.uint64_t iset
15761  */
15762   (__pyx_v_ewah_keys[0]).logicalxor((__pyx_v_ewah_refn[0]), __pyx_v_ewah_coar);
15763 
15764   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1097
15765  *         cdef ewah_bool_array ewah_coar
15766  *         ewah_keys[0].logicalxor(ewah_refn[0],ewah_coar)
15767  *         ewah_coar.logicaland(ewah_mask,ewah_slct)             # <<<<<<<<<<<<<<
15768  *         cdef np.uint64_t iset
15769  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
15770  */
15771   __pyx_v_ewah_coar.logicaland(__pyx_v_ewah_mask, __pyx_v_ewah_slct);
15772 
15773   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1099
15774  *         ewah_coar.logicaland(ewah_mask,ewah_slct)
15775  *         cdef np.uint64_t iset
15776  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())             # <<<<<<<<<<<<<<
15777  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
15778  *         while iter_set[0] != iter_end[0]:
15779  */
15780   __pyx_v_iter_set = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_slct.begin());
15781 
15782   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1100
15783  *         cdef np.uint64_t iset
15784  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
15785  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())             # <<<<<<<<<<<<<<
15786  *         while iter_set[0] != iter_end[0]:
15787  *             iset = dereference(iter_set[0])
15788  */
15789   __pyx_v_iter_end = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_slct.end());
15790 
15791   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1101
15792  *         cdef ewah_bool_iterator *iter_set = new ewah_bool_iterator(ewah_slct.begin())
15793  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
15794  *         while iter_set[0] != iter_end[0]:             # <<<<<<<<<<<<<<
15795  *             iset = dereference(iter_set[0])
15796  *             out[iset] = 1
15797  */
15798   while (1) {
15799     __pyx_t_2 = (((__pyx_v_iter_set[0]) != (__pyx_v_iter_end[0])) != 0);
15800     if (!__pyx_t_2) break;
15801 
15802     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1102
15803  *         cdef ewah_bool_iterator *iter_end = new ewah_bool_iterator(ewah_slct.end())
15804  *         while iter_set[0] != iter_end[0]:
15805  *             iset = dereference(iter_set[0])             # <<<<<<<<<<<<<<
15806  *             out[iset] = 1
15807  *             preincrement(iter_set[0])
15808  */
15809     __pyx_v_iset = (*(__pyx_v_iter_set[0]));
15810 
15811     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1103
15812  *         while iter_set[0] != iter_end[0]:
15813  *             iset = dereference(iter_set[0])
15814  *             out[iset] = 1             # <<<<<<<<<<<<<<
15815  *             preincrement(iter_set[0])
15816  *
15817  */
15818     __pyx_t_3 = __pyx_v_iset;
15819     __pyx_t_4 = -1;
15820     if (unlikely(__pyx_t_3 >= (size_t)__pyx_v_out.shape[0])) __pyx_t_4 = 0;
15821     if (unlikely(__pyx_t_4 != -1)) {
15822       __Pyx_RaiseBufferIndexError(__pyx_t_4);
15823       __PYX_ERR(0, 1103, __pyx_L1_error)
15824     }
15825     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_3 * __pyx_v_out.strides[0]) )) = 1;
15826 
15827     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1104
15828  *             iset = dereference(iter_set[0])
15829  *             out[iset] = 1
15830  *             preincrement(iter_set[0])             # <<<<<<<<<<<<<<
15831  *
15832  *     cdef void _get_ghost_zones(self, int ngz, int order1, int order2,
15833  */
15834     (void)((++(__pyx_v_iter_set[0])));
15835   }
15836 
15837   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1081
15838  *             preincrement(iter_set[0])
15839  *
15840  *     cdef void _select_uncontaminated(self, BoolArrayCollection mask, np.uint8_t[:] out,             # <<<<<<<<<<<<<<
15841  *                                      BoolArrayCollection mask2 = None):
15842  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
15843  */
15844 
15845   /* function exit code */
15846   goto __pyx_L0;
15847   __pyx_L1_error:;
15848   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection._select_uncontaminated", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15849   __pyx_L0:;
15850   __Pyx_RefNannyFinishContext();
15851 }
15852 
15853 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1106
15854  *             preincrement(iter_set[0])
15855  *
15856  *     cdef void _get_ghost_zones(self, int ngz, int order1, int order2,             # <<<<<<<<<<<<<<
15857  *                                bint periodicity[3], BoolArrayCollection out_ewah,
15858  *                                bint coarse_ghosts = 0):
15859  */
15860 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,int __pyx_v_ngz,int __pyx_v_order1,int __pyx_v_order2,int * __pyx_v_periodicity,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_out_ewah,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones * __pyx_optional_args)15861 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, int __pyx_v_ngz, int __pyx_v_order1, int __pyx_v_order2, int *__pyx_v_periodicity, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_out_ewah, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones *__pyx_optional_args) {
15862   int __pyx_v_coarse_ghosts = ((int)0);
15863   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
15864   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
15865   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll;
15866   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_set1;
15867   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_end1;
15868   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_set2;
15869   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator *__pyx_v_iter_end2;
15870   __pyx_t_5numpy_uint64_t __pyx_v_max_index1;
15871   __pyx_t_5numpy_uint64_t __pyx_v_max_index2;
15872   __pyx_t_5numpy_uint64_t __pyx_v_nele1;
15873   __pyx_t_5numpy_uint64_t __pyx_v_nele2;
15874   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_temp_bool = 0;
15875   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_out_bool = 0;
15876   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
15877   __pyx_t_5numpy_uint64_t __pyx_v_mi2;
15878   __pyx_t_5numpy_uint64_t __pyx_v_mi1_n;
15879   __pyx_t_5numpy_uint64_t __pyx_v_mi2_n;
15880   __pyx_t_5numpy_uint32_t __pyx_v_ntot;
15881   __pyx_t_5numpy_uint32_t __pyx_v_i;
15882   void *__pyx_v_pointers[7];
15883   __Pyx_memviewslice __pyx_v_index = { 0, 0, { 0 }, { 0 }, { 0 } };
15884   __Pyx_memviewslice __pyx_v_ind1_n = { 0, 0, { 0 }, { 0 }, { 0 } };
15885   __Pyx_memviewslice __pyx_v_ind2_n = { 0, 0, { 0 }, { 0 }, { 0 } };
15886   __Pyx_memviewslice __pyx_v_neighbor_list1 = { 0, 0, { 0 }, { 0 }, { 0 } };
15887   __Pyx_memviewslice __pyx_v_neighbor_list2 = { 0, 0, { 0 }, { 0 }, { 0 } };
15888   __pyx_t_5numpy_uint8_t *__pyx_v_bool_keys;
15889   __pyx_t_5numpy_uint8_t *__pyx_v_bool_coll;
15890   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_list_coll = 0;
15891   __Pyx_RefNannyDeclarations
15892   PyObject *__pyx_t_1 = NULL;
15893   PyObject *__pyx_t_2 = NULL;
15894   PyObject *__pyx_t_3 = NULL;
15895   void *__pyx_t_4;
15896   struct __pyx_array_obj *__pyx_t_5 = NULL;
15897   __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
15898   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
15899   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
15900   __pyx_t_5numpy_uint64_t __pyx_t_9;
15901   __pyx_t_5numpy_uint64_t __pyx_t_10;
15902   __pyx_t_5numpy_uint32_t __pyx_t_11;
15903   int __pyx_t_12;
15904   int __pyx_t_13;
15905   __pyx_t_5numpy_uint32_t __pyx_t_14;
15906   __pyx_t_5numpy_uint32_t __pyx_t_15;
15907   size_t __pyx_t_16;
15908   int __pyx_t_17;
15909   size_t __pyx_t_18;
15910   size_t __pyx_t_19;
15911   __Pyx_RefNannySetupContext("_get_ghost_zones", 0);
15912   if (__pyx_optional_args) {
15913     if (__pyx_optional_args->__pyx_n > 0) {
15914       __pyx_v_coarse_ghosts = __pyx_optional_args->coarse_ghosts;
15915     }
15916   }
15917 
15918   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1109
15919  *                                bint periodicity[3], BoolArrayCollection out_ewah,
15920  *                                bint coarse_ghosts = 0):
15921  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
15922  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
15923  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
15924  */
15925   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
15926 
15927   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1110
15928  *                                bint coarse_ghosts = 0):
15929  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
15930  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
15931  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
15932  *         cdef ewah_bool_iterator *iter_set1 = new ewah_bool_iterator(ewah_keys.begin())
15933  */
15934   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
15935 
15936   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1111
15937  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
15938  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
15939  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll             # <<<<<<<<<<<<<<
15940  *         cdef ewah_bool_iterator *iter_set1 = new ewah_bool_iterator(ewah_keys.begin())
15941  *         cdef ewah_bool_iterator *iter_end1 = new ewah_bool_iterator(ewah_keys.end())
15942  */
15943   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_self->ewah_coll);
15944 
15945   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1112
15946  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
15947  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
15948  *         cdef ewah_bool_iterator *iter_set1 = new ewah_bool_iterator(ewah_keys.begin())             # <<<<<<<<<<<<<<
15949  *         cdef ewah_bool_iterator *iter_end1 = new ewah_bool_iterator(ewah_keys.end())
15950  *         cdef ewah_bool_iterator *iter_set2
15951  */
15952   __pyx_v_iter_set1 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_keys->begin());
15953 
15954   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1113
15955  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
15956  *         cdef ewah_bool_iterator *iter_set1 = new ewah_bool_iterator(ewah_keys.begin())
15957  *         cdef ewah_bool_iterator *iter_end1 = new ewah_bool_iterator(ewah_keys.end())             # <<<<<<<<<<<<<<
15958  *         cdef ewah_bool_iterator *iter_set2
15959  *         cdef ewah_bool_iterator *iter_end2
15960  */
15961   __pyx_v_iter_end1 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(__pyx_v_ewah_keys->end());
15962 
15963   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1116
15964  *         cdef ewah_bool_iterator *iter_set2
15965  *         cdef ewah_bool_iterator *iter_end2
15966  *         cdef np.uint64_t max_index1 = <np.uint64_t>(1 << order1)             # <<<<<<<<<<<<<<
15967  *         cdef np.uint64_t max_index2 = <np.uint64_t>(1 << order2)
15968  *         cdef np.uint64_t nele1 = <np.uint64_t>(max_index1**3)
15969  */
15970   __pyx_v_max_index1 = ((__pyx_t_5numpy_uint64_t)(1 << __pyx_v_order1));
15971 
15972   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1117
15973  *         cdef ewah_bool_iterator *iter_end2
15974  *         cdef np.uint64_t max_index1 = <np.uint64_t>(1 << order1)
15975  *         cdef np.uint64_t max_index2 = <np.uint64_t>(1 << order2)             # <<<<<<<<<<<<<<
15976  *         cdef np.uint64_t nele1 = <np.uint64_t>(max_index1**3)
15977  *         cdef np.uint64_t nele2 = <np.uint64_t>(max_index2**3)
15978  */
15979   __pyx_v_max_index2 = ((__pyx_t_5numpy_uint64_t)(1 << __pyx_v_order2));
15980 
15981   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1118
15982  *         cdef np.uint64_t max_index1 = <np.uint64_t>(1 << order1)
15983  *         cdef np.uint64_t max_index2 = <np.uint64_t>(1 << order2)
15984  *         cdef np.uint64_t nele1 = <np.uint64_t>(max_index1**3)             # <<<<<<<<<<<<<<
15985  *         cdef np.uint64_t nele2 = <np.uint64_t>(max_index2**3)
15986  *         cdef BoolArrayCollectionUncompressed temp_bool = BoolArrayCollectionUncompressed(nele1, nele2)
15987  */
15988   __pyx_v_nele1 = ((__pyx_t_5numpy_uint64_t)__Pyx_pow___pyx_t_5numpy_uint64_t(__pyx_v_max_index1, 3));
15989 
15990   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1119
15991  *         cdef np.uint64_t max_index2 = <np.uint64_t>(1 << order2)
15992  *         cdef np.uint64_t nele1 = <np.uint64_t>(max_index1**3)
15993  *         cdef np.uint64_t nele2 = <np.uint64_t>(max_index2**3)             # <<<<<<<<<<<<<<
15994  *         cdef BoolArrayCollectionUncompressed temp_bool = BoolArrayCollectionUncompressed(nele1, nele2)
15995  *         cdef BoolArrayCollectionUncompressed out_bool = BoolArrayCollectionUncompressed(nele1, nele2)
15996  */
15997   __pyx_v_nele2 = ((__pyx_t_5numpy_uint64_t)__Pyx_pow___pyx_t_5numpy_uint64_t(__pyx_v_max_index2, 3));
15998 
15999   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1120
16000  *         cdef np.uint64_t nele1 = <np.uint64_t>(max_index1**3)
16001  *         cdef np.uint64_t nele2 = <np.uint64_t>(max_index2**3)
16002  *         cdef BoolArrayCollectionUncompressed temp_bool = BoolArrayCollectionUncompressed(nele1, nele2)             # <<<<<<<<<<<<<<
16003  *         cdef BoolArrayCollectionUncompressed out_bool = BoolArrayCollectionUncompressed(nele1, nele2)
16004  *         cdef np.uint64_t mi1, mi2, mi1_n, mi2_n
16005  */
16006   __pyx_t_1 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nele1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
16007   __Pyx_GOTREF(__pyx_t_1);
16008   __pyx_t_2 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nele2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
16009   __Pyx_GOTREF(__pyx_t_2);
16010   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error)
16011   __Pyx_GOTREF(__pyx_t_3);
16012   __Pyx_GIVEREF(__pyx_t_1);
16013   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
16014   __Pyx_GIVEREF(__pyx_t_2);
16015   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
16016   __pyx_t_1 = 0;
16017   __pyx_t_2 = 0;
16018   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
16019   __Pyx_GOTREF(__pyx_t_2);
16020   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16021   __pyx_v_temp_bool = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_t_2);
16022   __pyx_t_2 = 0;
16023 
16024   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1121
16025  *         cdef np.uint64_t nele2 = <np.uint64_t>(max_index2**3)
16026  *         cdef BoolArrayCollectionUncompressed temp_bool = BoolArrayCollectionUncompressed(nele1, nele2)
16027  *         cdef BoolArrayCollectionUncompressed out_bool = BoolArrayCollectionUncompressed(nele1, nele2)             # <<<<<<<<<<<<<<
16028  *         cdef np.uint64_t mi1, mi2, mi1_n, mi2_n
16029  *         cdef np.uint32_t ntot, i
16030  */
16031   __pyx_t_2 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nele1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
16032   __Pyx_GOTREF(__pyx_t_2);
16033   __pyx_t_3 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nele2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error)
16034   __Pyx_GOTREF(__pyx_t_3);
16035   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
16036   __Pyx_GOTREF(__pyx_t_1);
16037   __Pyx_GIVEREF(__pyx_t_2);
16038   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
16039   __Pyx_GIVEREF(__pyx_t_3);
16040   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
16041   __pyx_t_2 = 0;
16042   __pyx_t_3 = 0;
16043   __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error)
16044   __Pyx_GOTREF(__pyx_t_3);
16045   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16046   __pyx_v_out_bool = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_t_3);
16047   __pyx_t_3 = 0;
16048 
16049   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1125
16050  *         cdef np.uint32_t ntot, i
16051  *         cdef void* pointers[7]
16052  *         pointers[0] = malloc( sizeof(np.int32_t) * (2*ngz+1)*3)             # <<<<<<<<<<<<<<
16053  *         pointers[1] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)
16054  *         pointers[2] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)
16055  */
16056   (__pyx_v_pointers[0]) = malloc((((sizeof(__pyx_t_5numpy_int32_t)) * ((2 * __pyx_v_ngz) + 1)) * 3));
16057 
16058   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1126
16059  *         cdef void* pointers[7]
16060  *         pointers[0] = malloc( sizeof(np.int32_t) * (2*ngz+1)*3)
16061  *         pointers[1] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)             # <<<<<<<<<<<<<<
16062  *         pointers[2] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)
16063  *         pointers[3] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)
16064  */
16065   (__pyx_v_pointers[1]) = malloc((((sizeof(__pyx_t_5numpy_uint64_t)) * ((2 * __pyx_v_ngz) + 1)) * 3));
16066 
16067   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1127
16068  *         pointers[0] = malloc( sizeof(np.int32_t) * (2*ngz+1)*3)
16069  *         pointers[1] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)
16070  *         pointers[2] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)             # <<<<<<<<<<<<<<
16071  *         pointers[3] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)
16072  *         pointers[4] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)
16073  */
16074   (__pyx_v_pointers[2]) = malloc((((sizeof(__pyx_t_5numpy_uint64_t)) * ((2 * __pyx_v_ngz) + 1)) * 3));
16075 
16076   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1128
16077  *         pointers[1] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)
16078  *         pointers[2] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)
16079  *         pointers[3] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)             # <<<<<<<<<<<<<<
16080  *         pointers[4] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)
16081  *         pointers[5] = malloc( sizeof(np.uint8_t) * nele1)
16082  */
16083   (__pyx_v_pointers[3]) = malloc(((sizeof(__pyx_t_5numpy_uint64_t)) * __Pyx_pow_long(((2 * __pyx_v_ngz) + 1), 3)));
16084 
16085   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1129
16086  *         pointers[2] = malloc( sizeof(np.uint64_t) * (2*ngz+1)*3)
16087  *         pointers[3] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)
16088  *         pointers[4] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)             # <<<<<<<<<<<<<<
16089  *         pointers[5] = malloc( sizeof(np.uint8_t) * nele1)
16090  *         pointers[6] = malloc( sizeof(np.uint8_t) * nele2)
16091  */
16092   (__pyx_v_pointers[4]) = malloc(((sizeof(__pyx_t_5numpy_uint64_t)) * __Pyx_pow_long(((2 * __pyx_v_ngz) + 1), 3)));
16093 
16094   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1130
16095  *         pointers[3] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)
16096  *         pointers[4] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)
16097  *         pointers[5] = malloc( sizeof(np.uint8_t) * nele1)             # <<<<<<<<<<<<<<
16098  *         pointers[6] = malloc( sizeof(np.uint8_t) * nele2)
16099  *         cdef np.uint32_t[:,:] index = <np.uint32_t[:2*ngz+1,:3]> pointers[0]
16100  */
16101   (__pyx_v_pointers[5]) = malloc(((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_nele1));
16102 
16103   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1131
16104  *         pointers[4] = malloc( sizeof(np.uint64_t) * (2*ngz+1)**3)
16105  *         pointers[5] = malloc( sizeof(np.uint8_t) * nele1)
16106  *         pointers[6] = malloc( sizeof(np.uint8_t) * nele2)             # <<<<<<<<<<<<<<
16107  *         cdef np.uint32_t[:,:] index = <np.uint32_t[:2*ngz+1,:3]> pointers[0]
16108  *         cdef np.uint64_t[:,:] ind1_n = <np.uint64_t[:2*ngz+1,:3]> pointers[1]
16109  */
16110   (__pyx_v_pointers[6]) = malloc(((sizeof(__pyx_t_5numpy_uint8_t)) * __pyx_v_nele2));
16111 
16112   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1132
16113  *         pointers[5] = malloc( sizeof(np.uint8_t) * nele1)
16114  *         pointers[6] = malloc( sizeof(np.uint8_t) * nele2)
16115  *         cdef np.uint32_t[:,:] index = <np.uint32_t[:2*ngz+1,:3]> pointers[0]             # <<<<<<<<<<<<<<
16116  *         cdef np.uint64_t[:,:] ind1_n = <np.uint64_t[:2*ngz+1,:3]> pointers[1]
16117  *         cdef np.uint64_t[:,:] ind2_n = <np.uint64_t[:2*ngz+1,:3]> pointers[2]
16118  */
16119   __pyx_t_4 = (__pyx_v_pointers[0]);
16120   if (!__pyx_t_4) {
16121     PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
16122     __PYX_ERR(0, 1132, __pyx_L1_error)
16123   }
16124   __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t);
16125   __pyx_t_3 = Py_BuildValue((char*) "("  __PYX_BUILD_PY_SSIZE_T  __PYX_BUILD_PY_SSIZE_T  ")", ((Py_ssize_t)((2 * __pyx_v_ngz) + 1)), ((Py_ssize_t)3));
16126   if (unlikely(!__pyx_t_1 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_1))) __PYX_ERR(0, 1132, __pyx_L1_error)
16127   __Pyx_GOTREF(__pyx_t_1);
16128   __Pyx_GOTREF(__pyx_t_3);
16129   __pyx_t_5 = __pyx_array_new(__pyx_t_3, sizeof(__pyx_t_5numpy_uint32_t), PyBytes_AS_STRING(__pyx_t_1), (char *) "c", (char *) __pyx_t_4);
16130   if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1132, __pyx_L1_error)
16131   __Pyx_GOTREF(__pyx_t_5);
16132   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16133   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16134   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint32_t(((PyObject *)__pyx_t_5), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1132, __pyx_L1_error)
16135   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
16136   __pyx_v_index = __pyx_t_6;
16137   __pyx_t_6.memview = NULL;
16138   __pyx_t_6.data = NULL;
16139 
16140   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1133
16141  *         pointers[6] = malloc( sizeof(np.uint8_t) * nele2)
16142  *         cdef np.uint32_t[:,:] index = <np.uint32_t[:2*ngz+1,:3]> pointers[0]
16143  *         cdef np.uint64_t[:,:] ind1_n = <np.uint64_t[:2*ngz+1,:3]> pointers[1]             # <<<<<<<<<<<<<<
16144  *         cdef np.uint64_t[:,:] ind2_n = <np.uint64_t[:2*ngz+1,:3]> pointers[2]
16145  *         cdef np.uint64_t[:] neighbor_list1 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[3]
16146  */
16147   __pyx_t_4 = (__pyx_v_pointers[1]);
16148   if (!__pyx_t_4) {
16149     PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
16150     __PYX_ERR(0, 1133, __pyx_L1_error)
16151   }
16152   __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t);
16153   __pyx_t_1 = Py_BuildValue((char*) "("  __PYX_BUILD_PY_SSIZE_T  __PYX_BUILD_PY_SSIZE_T  ")", ((Py_ssize_t)((2 * __pyx_v_ngz) + 1)), ((Py_ssize_t)3));
16154   if (unlikely(!__pyx_t_3 || !__pyx_t_1 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(0, 1133, __pyx_L1_error)
16155   __Pyx_GOTREF(__pyx_t_3);
16156   __Pyx_GOTREF(__pyx_t_1);
16157   __pyx_t_5 = __pyx_array_new(__pyx_t_1, sizeof(__pyx_t_5numpy_uint64_t), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_4);
16158   if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1133, __pyx_L1_error)
16159   __Pyx_GOTREF(__pyx_t_5);
16160   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16161   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16162   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint64_t(((PyObject *)__pyx_t_5), PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1133, __pyx_L1_error)
16163   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
16164   __pyx_v_ind1_n = __pyx_t_7;
16165   __pyx_t_7.memview = NULL;
16166   __pyx_t_7.data = NULL;
16167 
16168   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1134
16169  *         cdef np.uint32_t[:,:] index = <np.uint32_t[:2*ngz+1,:3]> pointers[0]
16170  *         cdef np.uint64_t[:,:] ind1_n = <np.uint64_t[:2*ngz+1,:3]> pointers[1]
16171  *         cdef np.uint64_t[:,:] ind2_n = <np.uint64_t[:2*ngz+1,:3]> pointers[2]             # <<<<<<<<<<<<<<
16172  *         cdef np.uint64_t[:] neighbor_list1 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[3]
16173  *         cdef np.uint64_t[:] neighbor_list2 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[4]
16174  */
16175   __pyx_t_4 = (__pyx_v_pointers[2]);
16176   if (!__pyx_t_4) {
16177     PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
16178     __PYX_ERR(0, 1134, __pyx_L1_error)
16179   }
16180   __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t);
16181   __pyx_t_3 = Py_BuildValue((char*) "("  __PYX_BUILD_PY_SSIZE_T  __PYX_BUILD_PY_SSIZE_T  ")", ((Py_ssize_t)((2 * __pyx_v_ngz) + 1)), ((Py_ssize_t)3));
16182   if (unlikely(!__pyx_t_1 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_1))) __PYX_ERR(0, 1134, __pyx_L1_error)
16183   __Pyx_GOTREF(__pyx_t_1);
16184   __Pyx_GOTREF(__pyx_t_3);
16185   __pyx_t_5 = __pyx_array_new(__pyx_t_3, sizeof(__pyx_t_5numpy_uint64_t), PyBytes_AS_STRING(__pyx_t_1), (char *) "c", (char *) __pyx_t_4);
16186   if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
16187   __Pyx_GOTREF(__pyx_t_5);
16188   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16189   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16190   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint64_t(((PyObject *)__pyx_t_5), PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1134, __pyx_L1_error)
16191   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
16192   __pyx_v_ind2_n = __pyx_t_7;
16193   __pyx_t_7.memview = NULL;
16194   __pyx_t_7.data = NULL;
16195 
16196   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1135
16197  *         cdef np.uint64_t[:,:] ind1_n = <np.uint64_t[:2*ngz+1,:3]> pointers[1]
16198  *         cdef np.uint64_t[:,:] ind2_n = <np.uint64_t[:2*ngz+1,:3]> pointers[2]
16199  *         cdef np.uint64_t[:] neighbor_list1 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[3]             # <<<<<<<<<<<<<<
16200  *         cdef np.uint64_t[:] neighbor_list2 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[4]
16201  *         cdef np.uint8_t *bool_keys = <np.uint8_t *> pointers[5]
16202  */
16203   __pyx_t_4 = (__pyx_v_pointers[3]);
16204   if (!__pyx_t_4) {
16205     PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
16206     __PYX_ERR(0, 1135, __pyx_L1_error)
16207   }
16208   __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t);
16209   __pyx_t_1 = Py_BuildValue((char*) "("  __PYX_BUILD_PY_SSIZE_T  ")", ((Py_ssize_t)__Pyx_pow_long(((2 * __pyx_v_ngz) + 1), 3)));
16210   if (unlikely(!__pyx_t_3 || !__pyx_t_1 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(0, 1135, __pyx_L1_error)
16211   __Pyx_GOTREF(__pyx_t_3);
16212   __Pyx_GOTREF(__pyx_t_1);
16213   __pyx_t_5 = __pyx_array_new(__pyx_t_1, sizeof(__pyx_t_5numpy_uint64_t), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_4);
16214   if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
16215   __Pyx_GOTREF(__pyx_t_5);
16216   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16217   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16218   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(((PyObject *)__pyx_t_5), PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1135, __pyx_L1_error)
16219   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
16220   __pyx_v_neighbor_list1 = __pyx_t_8;
16221   __pyx_t_8.memview = NULL;
16222   __pyx_t_8.data = NULL;
16223 
16224   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1136
16225  *         cdef np.uint64_t[:,:] ind2_n = <np.uint64_t[:2*ngz+1,:3]> pointers[2]
16226  *         cdef np.uint64_t[:] neighbor_list1 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[3]
16227  *         cdef np.uint64_t[:] neighbor_list2 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[4]             # <<<<<<<<<<<<<<
16228  *         cdef np.uint8_t *bool_keys = <np.uint8_t *> pointers[5]
16229  *         cdef np.uint8_t *bool_coll = <np.uint8_t *> pointers[6]
16230  */
16231   __pyx_t_4 = (__pyx_v_pointers[4]);
16232   if (!__pyx_t_4) {
16233     PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
16234     __PYX_ERR(0, 1136, __pyx_L1_error)
16235   }
16236   __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t);
16237   __pyx_t_3 = Py_BuildValue((char*) "("  __PYX_BUILD_PY_SSIZE_T  ")", ((Py_ssize_t)__Pyx_pow_long(((2 * __pyx_v_ngz) + 1), 3)));
16238   if (unlikely(!__pyx_t_1 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_1))) __PYX_ERR(0, 1136, __pyx_L1_error)
16239   __Pyx_GOTREF(__pyx_t_1);
16240   __Pyx_GOTREF(__pyx_t_3);
16241   __pyx_t_5 = __pyx_array_new(__pyx_t_3, sizeof(__pyx_t_5numpy_uint64_t), PyBytes_AS_STRING(__pyx_t_1), (char *) "c", (char *) __pyx_t_4);
16242   if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1136, __pyx_L1_error)
16243   __Pyx_GOTREF(__pyx_t_5);
16244   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16245   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16246   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(((PyObject *)__pyx_t_5), PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1136, __pyx_L1_error)
16247   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
16248   __pyx_v_neighbor_list2 = __pyx_t_8;
16249   __pyx_t_8.memview = NULL;
16250   __pyx_t_8.data = NULL;
16251 
16252   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1137
16253  *         cdef np.uint64_t[:] neighbor_list1 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[3]
16254  *         cdef np.uint64_t[:] neighbor_list2 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[4]
16255  *         cdef np.uint8_t *bool_keys = <np.uint8_t *> pointers[5]             # <<<<<<<<<<<<<<
16256  *         cdef np.uint8_t *bool_coll = <np.uint8_t *> pointers[6]
16257  *         cdef SparseUnorderedRefinedBitmaskSet list_coll = SparseUnorderedRefinedBitmaskSet()
16258  */
16259   __pyx_v_bool_keys = ((__pyx_t_5numpy_uint8_t *)(__pyx_v_pointers[5]));
16260 
16261   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1138
16262  *         cdef np.uint64_t[:] neighbor_list2 = <np.uint64_t[:((2*ngz+1)**3)]> pointers[4]
16263  *         cdef np.uint8_t *bool_keys = <np.uint8_t *> pointers[5]
16264  *         cdef np.uint8_t *bool_coll = <np.uint8_t *> pointers[6]             # <<<<<<<<<<<<<<
16265  *         cdef SparseUnorderedRefinedBitmaskSet list_coll = SparseUnorderedRefinedBitmaskSet()
16266  *         for i in range(nele1):
16267  */
16268   __pyx_v_bool_coll = ((__pyx_t_5numpy_uint8_t *)(__pyx_v_pointers[6]));
16269 
16270   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1139
16271  *         cdef np.uint8_t *bool_keys = <np.uint8_t *> pointers[5]
16272  *         cdef np.uint8_t *bool_coll = <np.uint8_t *> pointers[6]
16273  *         cdef SparseUnorderedRefinedBitmaskSet list_coll = SparseUnorderedRefinedBitmaskSet()             # <<<<<<<<<<<<<<
16274  *         for i in range(nele1):
16275  *             bool_keys[i] = 0
16276  */
16277   __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
16278   __Pyx_GOTREF(__pyx_t_1);
16279   __pyx_v_list_coll = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_t_1);
16280   __pyx_t_1 = 0;
16281 
16282   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1140
16283  *         cdef np.uint8_t *bool_coll = <np.uint8_t *> pointers[6]
16284  *         cdef SparseUnorderedRefinedBitmaskSet list_coll = SparseUnorderedRefinedBitmaskSet()
16285  *         for i in range(nele1):             # <<<<<<<<<<<<<<
16286  *             bool_keys[i] = 0
16287  *         while iter_set1[0] != iter_end1[0]:
16288  */
16289   __pyx_t_9 = __pyx_v_nele1;
16290   __pyx_t_10 = __pyx_t_9;
16291   for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
16292     __pyx_v_i = __pyx_t_11;
16293 
16294     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1141
16295  *         cdef SparseUnorderedRefinedBitmaskSet list_coll = SparseUnorderedRefinedBitmaskSet()
16296  *         for i in range(nele1):
16297  *             bool_keys[i] = 0             # <<<<<<<<<<<<<<
16298  *         while iter_set1[0] != iter_end1[0]:
16299  *             mi1 = dereference(iter_set1[0])
16300  */
16301     (__pyx_v_bool_keys[__pyx_v_i]) = 0;
16302   }
16303 
16304   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1142
16305  *         for i in range(nele1):
16306  *             bool_keys[i] = 0
16307  *         while iter_set1[0] != iter_end1[0]:             # <<<<<<<<<<<<<<
16308  *             mi1 = dereference(iter_set1[0])
16309  *             if (coarse_ghosts == 1) or (ewah_refn[0].get(mi1) == 0):
16310  */
16311   while (1) {
16312     __pyx_t_12 = (((__pyx_v_iter_set1[0]) != (__pyx_v_iter_end1[0])) != 0);
16313     if (!__pyx_t_12) break;
16314 
16315     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1143
16316  *             bool_keys[i] = 0
16317  *         while iter_set1[0] != iter_end1[0]:
16318  *             mi1 = dereference(iter_set1[0])             # <<<<<<<<<<<<<<
16319  *             if (coarse_ghosts == 1) or (ewah_refn[0].get(mi1) == 0):
16320  *                 # Coarse neighbors
16321  */
16322     __pyx_v_mi1 = (*(__pyx_v_iter_set1[0]));
16323 
16324     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1144
16325  *         while iter_set1[0] != iter_end1[0]:
16326  *             mi1 = dereference(iter_set1[0])
16327  *             if (coarse_ghosts == 1) or (ewah_refn[0].get(mi1) == 0):             # <<<<<<<<<<<<<<
16328  *                 # Coarse neighbors
16329  *                 ntot = morton_neighbors_coarse(mi1, max_index1, periodicity, ngz,
16330  */
16331     __pyx_t_13 = ((__pyx_v_coarse_ghosts == 1) != 0);
16332     if (!__pyx_t_13) {
16333     } else {
16334       __pyx_t_12 = __pyx_t_13;
16335       goto __pyx_L8_bool_binop_done;
16336     }
16337     __pyx_t_13 = (((__pyx_v_ewah_refn[0]).get(__pyx_v_mi1) == 0) != 0);
16338     __pyx_t_12 = __pyx_t_13;
16339     __pyx_L8_bool_binop_done:;
16340     if (__pyx_t_12) {
16341 
16342       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1146
16343  *             if (coarse_ghosts == 1) or (ewah_refn[0].get(mi1) == 0):
16344  *                 # Coarse neighbors
16345  *                 ntot = morton_neighbors_coarse(mi1, max_index1, periodicity, ngz,             # <<<<<<<<<<<<<<
16346  *                                                index, ind1_n, neighbor_list1)
16347  *                 for i in range(ntot):
16348  */
16349       __pyx_v_ntot = __pyx_f_2yt_9utilities_3lib_14geometry_utils_morton_neighbors_coarse(__pyx_v_mi1, __pyx_v_max_index1, __pyx_v_periodicity, __pyx_v_ngz, __pyx_v_index, __pyx_v_ind1_n, __pyx_v_neighbor_list1);
16350 
16351       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1148
16352  *                 ntot = morton_neighbors_coarse(mi1, max_index1, periodicity, ngz,
16353  *                                                index, ind1_n, neighbor_list1)
16354  *                 for i in range(ntot):             # <<<<<<<<<<<<<<
16355  *                     mi1_n = neighbor_list1[i]
16356  *                     if ewah_keys[0].get(mi1_n) == 0:
16357  */
16358       __pyx_t_11 = __pyx_v_ntot;
16359       __pyx_t_14 = __pyx_t_11;
16360       for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
16361         __pyx_v_i = __pyx_t_15;
16362 
16363         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1149
16364  *                                                index, ind1_n, neighbor_list1)
16365  *                 for i in range(ntot):
16366  *                     mi1_n = neighbor_list1[i]             # <<<<<<<<<<<<<<
16367  *                     if ewah_keys[0].get(mi1_n) == 0:
16368  *                         bool_keys[mi1_n] = 1
16369  */
16370         __pyx_t_16 = __pyx_v_i;
16371         __pyx_t_17 = -1;
16372         if (unlikely(__pyx_t_16 >= (size_t)__pyx_v_neighbor_list1.shape[0])) __pyx_t_17 = 0;
16373         if (unlikely(__pyx_t_17 != -1)) {
16374           __Pyx_RaiseBufferIndexError(__pyx_t_17);
16375           __PYX_ERR(0, 1149, __pyx_L1_error)
16376         }
16377         __pyx_v_mi1_n = (*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_neighbor_list1.data + __pyx_t_16 * __pyx_v_neighbor_list1.strides[0]) )));
16378 
16379         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1150
16380  *                 for i in range(ntot):
16381  *                     mi1_n = neighbor_list1[i]
16382  *                     if ewah_keys[0].get(mi1_n) == 0:             # <<<<<<<<<<<<<<
16383  *                         bool_keys[mi1_n] = 1
16384  *             else:
16385  */
16386         __pyx_t_12 = (((__pyx_v_ewah_keys[0]).get(__pyx_v_mi1_n) == 0) != 0);
16387         if (__pyx_t_12) {
16388 
16389           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1151
16390  *                     mi1_n = neighbor_list1[i]
16391  *                     if ewah_keys[0].get(mi1_n) == 0:
16392  *                         bool_keys[mi1_n] = 1             # <<<<<<<<<<<<<<
16393  *             else:
16394  *                 for i in range(nele2):
16395  */
16396           (__pyx_v_bool_keys[__pyx_v_mi1_n]) = 1;
16397 
16398           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1150
16399  *                 for i in range(ntot):
16400  *                     mi1_n = neighbor_list1[i]
16401  *                     if ewah_keys[0].get(mi1_n) == 0:             # <<<<<<<<<<<<<<
16402  *                         bool_keys[mi1_n] = 1
16403  *             else:
16404  */
16405         }
16406       }
16407 
16408       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1144
16409  *         while iter_set1[0] != iter_end1[0]:
16410  *             mi1 = dereference(iter_set1[0])
16411  *             if (coarse_ghosts == 1) or (ewah_refn[0].get(mi1) == 0):             # <<<<<<<<<<<<<<
16412  *                 # Coarse neighbors
16413  *                 ntot = morton_neighbors_coarse(mi1, max_index1, periodicity, ngz,
16414  */
16415       goto __pyx_L7;
16416     }
16417 
16418     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1153
16419  *                         bool_keys[mi1_n] = 1
16420  *             else:
16421  *                 for i in range(nele2):             # <<<<<<<<<<<<<<
16422  *                     bool_coll[i] = 0
16423  *                 # Refined neighbors
16424  */
16425     /*else*/ {
16426       __pyx_t_9 = __pyx_v_nele2;
16427       __pyx_t_10 = __pyx_t_9;
16428       for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
16429         __pyx_v_i = __pyx_t_11;
16430 
16431         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1154
16432  *             else:
16433  *                 for i in range(nele2):
16434  *                     bool_coll[i] = 0             # <<<<<<<<<<<<<<
16435  *                 # Refined neighbors
16436  *                 iter_set2 = new ewah_bool_iterator(ewah_coll[0][mi1].begin())
16437  */
16438         (__pyx_v_bool_coll[__pyx_v_i]) = 0;
16439       }
16440 
16441       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1156
16442  *                     bool_coll[i] = 0
16443  *                 # Refined neighbors
16444  *                 iter_set2 = new ewah_bool_iterator(ewah_coll[0][mi1].begin())             # <<<<<<<<<<<<<<
16445  *                 iter_end2 = new ewah_bool_iterator(ewah_coll[0][mi1].end())
16446  *                 while iter_set2[0] != iter_end2[0]:
16447  */
16448       __pyx_v_iter_set2 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(((__pyx_v_ewah_coll[0])[__pyx_v_mi1]).begin());
16449 
16450       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1157
16451  *                 # Refined neighbors
16452  *                 iter_set2 = new ewah_bool_iterator(ewah_coll[0][mi1].begin())
16453  *                 iter_end2 = new ewah_bool_iterator(ewah_coll[0][mi1].end())             # <<<<<<<<<<<<<<
16454  *                 while iter_set2[0] != iter_end2[0]:
16455  *                     mi2 = dereference(iter_set2[0])
16456  */
16457       __pyx_v_iter_end2 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_iterator(((__pyx_v_ewah_coll[0])[__pyx_v_mi1]).end());
16458 
16459       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1158
16460  *                 iter_set2 = new ewah_bool_iterator(ewah_coll[0][mi1].begin())
16461  *                 iter_end2 = new ewah_bool_iterator(ewah_coll[0][mi1].end())
16462  *                 while iter_set2[0] != iter_end2[0]:             # <<<<<<<<<<<<<<
16463  *                     mi2 = dereference(iter_set2[0])
16464  *                     ntot = morton_neighbors_refined(mi1, mi2,
16465  */
16466       while (1) {
16467         __pyx_t_12 = (((__pyx_v_iter_set2[0]) != (__pyx_v_iter_end2[0])) != 0);
16468         if (!__pyx_t_12) break;
16469 
16470         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1159
16471  *                 iter_end2 = new ewah_bool_iterator(ewah_coll[0][mi1].end())
16472  *                 while iter_set2[0] != iter_end2[0]:
16473  *                     mi2 = dereference(iter_set2[0])             # <<<<<<<<<<<<<<
16474  *                     ntot = morton_neighbors_refined(mi1, mi2,
16475  *                                                     max_index1, max_index2,
16476  */
16477         __pyx_v_mi2 = (*(__pyx_v_iter_set2[0]));
16478 
16479         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1160
16480  *                 while iter_set2[0] != iter_end2[0]:
16481  *                     mi2 = dereference(iter_set2[0])
16482  *                     ntot = morton_neighbors_refined(mi1, mi2,             # <<<<<<<<<<<<<<
16483  *                                                     max_index1, max_index2,
16484  *                                                     periodicity, ngz, index,
16485  */
16486         __pyx_v_ntot = __pyx_f_2yt_9utilities_3lib_14geometry_utils_morton_neighbors_refined(__pyx_v_mi1, __pyx_v_mi2, __pyx_v_max_index1, __pyx_v_max_index2, __pyx_v_periodicity, __pyx_v_ngz, __pyx_v_index, __pyx_v_ind1_n, __pyx_v_ind2_n, __pyx_v_neighbor_list1, __pyx_v_neighbor_list2);
16487 
16488         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1166
16489  *                                                     neighbor_list1,
16490  *                                                     neighbor_list2)
16491  *                     for i in range(ntot):             # <<<<<<<<<<<<<<
16492  *                         mi1_n = neighbor_list1[i]
16493  *                         mi2_n = neighbor_list2[i]
16494  */
16495         __pyx_t_11 = __pyx_v_ntot;
16496         __pyx_t_14 = __pyx_t_11;
16497         for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
16498           __pyx_v_i = __pyx_t_15;
16499 
16500           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1167
16501  *                                                     neighbor_list2)
16502  *                     for i in range(ntot):
16503  *                         mi1_n = neighbor_list1[i]             # <<<<<<<<<<<<<<
16504  *                         mi2_n = neighbor_list2[i]
16505  *                         if mi1_n == mi1:
16506  */
16507           __pyx_t_18 = __pyx_v_i;
16508           __pyx_t_17 = -1;
16509           if (unlikely(__pyx_t_18 >= (size_t)__pyx_v_neighbor_list1.shape[0])) __pyx_t_17 = 0;
16510           if (unlikely(__pyx_t_17 != -1)) {
16511             __Pyx_RaiseBufferIndexError(__pyx_t_17);
16512             __PYX_ERR(0, 1167, __pyx_L1_error)
16513           }
16514           __pyx_v_mi1_n = (*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_neighbor_list1.data + __pyx_t_18 * __pyx_v_neighbor_list1.strides[0]) )));
16515 
16516           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1168
16517  *                     for i in range(ntot):
16518  *                         mi1_n = neighbor_list1[i]
16519  *                         mi2_n = neighbor_list2[i]             # <<<<<<<<<<<<<<
16520  *                         if mi1_n == mi1:
16521  *                             if ewah_coll[0][mi1].get(mi2_n) == 0:
16522  */
16523           __pyx_t_19 = __pyx_v_i;
16524           __pyx_t_17 = -1;
16525           if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_neighbor_list2.shape[0])) __pyx_t_17 = 0;
16526           if (unlikely(__pyx_t_17 != -1)) {
16527             __Pyx_RaiseBufferIndexError(__pyx_t_17);
16528             __PYX_ERR(0, 1168, __pyx_L1_error)
16529           }
16530           __pyx_v_mi2_n = (*((__pyx_t_5numpy_uint64_t *) ( /* dim=0 */ (__pyx_v_neighbor_list2.data + __pyx_t_19 * __pyx_v_neighbor_list2.strides[0]) )));
16531 
16532           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1169
16533  *                         mi1_n = neighbor_list1[i]
16534  *                         mi2_n = neighbor_list2[i]
16535  *                         if mi1_n == mi1:             # <<<<<<<<<<<<<<
16536  *                             if ewah_coll[0][mi1].get(mi2_n) == 0:
16537  *                                 bool_keys[mi1_n] = 1
16538  */
16539           __pyx_t_12 = ((__pyx_v_mi1_n == __pyx_v_mi1) != 0);
16540           if (__pyx_t_12) {
16541 
16542             /* "yt/utilities/lib/ewah_bool_wrap.pyx":1170
16543  *                         mi2_n = neighbor_list2[i]
16544  *                         if mi1_n == mi1:
16545  *                             if ewah_coll[0][mi1].get(mi2_n) == 0:             # <<<<<<<<<<<<<<
16546  *                                 bool_keys[mi1_n] = 1
16547  *                                 bool_coll[mi2_n] = 1
16548  */
16549             __pyx_t_12 = ((((__pyx_v_ewah_coll[0])[__pyx_v_mi1]).get(__pyx_v_mi2_n) == 0) != 0);
16550             if (__pyx_t_12) {
16551 
16552               /* "yt/utilities/lib/ewah_bool_wrap.pyx":1171
16553  *                         if mi1_n == mi1:
16554  *                             if ewah_coll[0][mi1].get(mi2_n) == 0:
16555  *                                 bool_keys[mi1_n] = 1             # <<<<<<<<<<<<<<
16556  *                                 bool_coll[mi2_n] = 1
16557  *                         else:
16558  */
16559               (__pyx_v_bool_keys[__pyx_v_mi1_n]) = 1;
16560 
16561               /* "yt/utilities/lib/ewah_bool_wrap.pyx":1172
16562  *                             if ewah_coll[0][mi1].get(mi2_n) == 0:
16563  *                                 bool_keys[mi1_n] = 1
16564  *                                 bool_coll[mi2_n] = 1             # <<<<<<<<<<<<<<
16565  *                         else:
16566  *                             if ewah_refn[0].get(mi1_n) == 1:
16567  */
16568               (__pyx_v_bool_coll[__pyx_v_mi2_n]) = 1;
16569 
16570               /* "yt/utilities/lib/ewah_bool_wrap.pyx":1170
16571  *                         mi2_n = neighbor_list2[i]
16572  *                         if mi1_n == mi1:
16573  *                             if ewah_coll[0][mi1].get(mi2_n) == 0:             # <<<<<<<<<<<<<<
16574  *                                 bool_keys[mi1_n] = 1
16575  *                                 bool_coll[mi2_n] = 1
16576  */
16577             }
16578 
16579             /* "yt/utilities/lib/ewah_bool_wrap.pyx":1169
16580  *                         mi1_n = neighbor_list1[i]
16581  *                         mi2_n = neighbor_list2[i]
16582  *                         if mi1_n == mi1:             # <<<<<<<<<<<<<<
16583  *                             if ewah_coll[0][mi1].get(mi2_n) == 0:
16584  *                                 bool_keys[mi1_n] = 1
16585  */
16586             goto __pyx_L19;
16587           }
16588 
16589           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1174
16590  *                                 bool_coll[mi2_n] = 1
16591  *                         else:
16592  *                             if ewah_refn[0].get(mi1_n) == 1:             # <<<<<<<<<<<<<<
16593  *                                 if ewah_coll[0][mi1_n].get(mi2_n) == 0:
16594  *                                     bool_keys[mi1_n] = 1
16595  */
16596           /*else*/ {
16597             __pyx_t_12 = (((__pyx_v_ewah_refn[0]).get(__pyx_v_mi1_n) == 1) != 0);
16598             if (__pyx_t_12) {
16599 
16600               /* "yt/utilities/lib/ewah_bool_wrap.pyx":1175
16601  *                         else:
16602  *                             if ewah_refn[0].get(mi1_n) == 1:
16603  *                                 if ewah_coll[0][mi1_n].get(mi2_n) == 0:             # <<<<<<<<<<<<<<
16604  *                                     bool_keys[mi1_n] = 1
16605  *                                     list_coll._set(mi1_n, mi2_n)
16606  */
16607               __pyx_t_12 = ((((__pyx_v_ewah_coll[0])[__pyx_v_mi1_n]).get(__pyx_v_mi2_n) == 0) != 0);
16608               if (__pyx_t_12) {
16609 
16610                 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1176
16611  *                             if ewah_refn[0].get(mi1_n) == 1:
16612  *                                 if ewah_coll[0][mi1_n].get(mi2_n) == 0:
16613  *                                     bool_keys[mi1_n] = 1             # <<<<<<<<<<<<<<
16614  *                                     list_coll._set(mi1_n, mi2_n)
16615  *                             else:
16616  */
16617                 (__pyx_v_bool_keys[__pyx_v_mi1_n]) = 1;
16618 
16619                 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1177
16620  *                                 if ewah_coll[0][mi1_n].get(mi2_n) == 0:
16621  *                                     bool_keys[mi1_n] = 1
16622  *                                     list_coll._set(mi1_n, mi2_n)             # <<<<<<<<<<<<<<
16623  *                             else:
16624  *                                 if ewah_keys[0].get(mi1_n) == 0:
16625  */
16626                 ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_v_list_coll->__pyx_vtab)->_set(__pyx_v_list_coll, __pyx_v_mi1_n, __pyx_v_mi2_n);
16627 
16628                 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1175
16629  *                         else:
16630  *                             if ewah_refn[0].get(mi1_n) == 1:
16631  *                                 if ewah_coll[0][mi1_n].get(mi2_n) == 0:             # <<<<<<<<<<<<<<
16632  *                                     bool_keys[mi1_n] = 1
16633  *                                     list_coll._set(mi1_n, mi2_n)
16634  */
16635               }
16636 
16637               /* "yt/utilities/lib/ewah_bool_wrap.pyx":1174
16638  *                                 bool_coll[mi2_n] = 1
16639  *                         else:
16640  *                             if ewah_refn[0].get(mi1_n) == 1:             # <<<<<<<<<<<<<<
16641  *                                 if ewah_coll[0][mi1_n].get(mi2_n) == 0:
16642  *                                     bool_keys[mi1_n] = 1
16643  */
16644               goto __pyx_L21;
16645             }
16646 
16647             /* "yt/utilities/lib/ewah_bool_wrap.pyx":1179
16648  *                                     list_coll._set(mi1_n, mi2_n)
16649  *                             else:
16650  *                                 if ewah_keys[0].get(mi1_n) == 0:             # <<<<<<<<<<<<<<
16651  *                                     bool_keys[mi1_n] = 1
16652  *                     preincrement(iter_set2[0])
16653  */
16654             /*else*/ {
16655               __pyx_t_12 = (((__pyx_v_ewah_keys[0]).get(__pyx_v_mi1_n) == 0) != 0);
16656               if (__pyx_t_12) {
16657 
16658                 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1180
16659  *                             else:
16660  *                                 if ewah_keys[0].get(mi1_n) == 0:
16661  *                                     bool_keys[mi1_n] = 1             # <<<<<<<<<<<<<<
16662  *                     preincrement(iter_set2[0])
16663  *                 # Add to running list
16664  */
16665                 (__pyx_v_bool_keys[__pyx_v_mi1_n]) = 1;
16666 
16667                 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1179
16668  *                                     list_coll._set(mi1_n, mi2_n)
16669  *                             else:
16670  *                                 if ewah_keys[0].get(mi1_n) == 0:             # <<<<<<<<<<<<<<
16671  *                                     bool_keys[mi1_n] = 1
16672  *                     preincrement(iter_set2[0])
16673  */
16674               }
16675             }
16676             __pyx_L21:;
16677           }
16678           __pyx_L19:;
16679         }
16680 
16681         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1181
16682  *                                 if ewah_keys[0].get(mi1_n) == 0:
16683  *                                     bool_keys[mi1_n] = 1
16684  *                     preincrement(iter_set2[0])             # <<<<<<<<<<<<<<
16685  *                 # Add to running list
16686  *                 temp_bool._set_refined_array_ptr(mi1, bool_coll)
16687  */
16688         (void)((++(__pyx_v_iter_set2[0])));
16689       }
16690 
16691       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1183
16692  *                     preincrement(iter_set2[0])
16693  *                 # Add to running list
16694  *                 temp_bool._set_refined_array_ptr(mi1, bool_coll)             # <<<<<<<<<<<<<<
16695  *             preincrement(iter_set1[0])
16696  *         # Set keys
16697  */
16698       ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_temp_bool->__pyx_vtab)->_set_refined_array_ptr(__pyx_v_temp_bool, __pyx_v_mi1, __pyx_v_bool_coll);
16699     }
16700     __pyx_L7:;
16701 
16702     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1184
16703  *                 # Add to running list
16704  *                 temp_bool._set_refined_array_ptr(mi1, bool_coll)
16705  *             preincrement(iter_set1[0])             # <<<<<<<<<<<<<<
16706  *         # Set keys
16707  *         out_bool._set_coarse_array_ptr(bool_keys)
16708  */
16709     (void)((++(__pyx_v_iter_set1[0])));
16710   }
16711 
16712   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1186
16713  *             preincrement(iter_set1[0])
16714  *         # Set keys
16715  *         out_bool._set_coarse_array_ptr(bool_keys)             # <<<<<<<<<<<<<<
16716  *         list_coll._fill_bool(out_bool)
16717  *         out_bool._append(temp_bool)
16718  */
16719   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_out_bool->__pyx_vtab)->_set_coarse_array_ptr(__pyx_v_out_bool, __pyx_v_bool_keys);
16720 
16721   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1187
16722  *         # Set keys
16723  *         out_bool._set_coarse_array_ptr(bool_keys)
16724  *         list_coll._fill_bool(out_bool)             # <<<<<<<<<<<<<<
16725  *         out_bool._append(temp_bool)
16726  *         out_bool._compress(out_ewah)
16727  */
16728   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_v_list_coll->__pyx_vtab)->_fill_bool(__pyx_v_list_coll, __pyx_v_out_bool);
16729 
16730   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1188
16731  *         out_bool._set_coarse_array_ptr(bool_keys)
16732  *         list_coll._fill_bool(out_bool)
16733  *         out_bool._append(temp_bool)             # <<<<<<<<<<<<<<
16734  *         out_bool._compress(out_ewah)
16735  *         # Free things
16736  */
16737   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_out_bool->__pyx_vtab)->_append(__pyx_v_out_bool, __pyx_v_temp_bool);
16738 
16739   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1189
16740  *         list_coll._fill_bool(out_bool)
16741  *         out_bool._append(temp_bool)
16742  *         out_bool._compress(out_ewah)             # <<<<<<<<<<<<<<
16743  *         # Free things
16744  *         for i in range(7):
16745  */
16746   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_out_bool->__pyx_vtab)->_compress(__pyx_v_out_bool, __pyx_v_out_ewah);
16747 
16748   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1191
16749  *         out_bool._compress(out_ewah)
16750  *         # Free things
16751  *         for i in range(7):             # <<<<<<<<<<<<<<
16752  *             free(pointers[i])
16753  *
16754  */
16755   for (__pyx_t_11 = 0; __pyx_t_11 < 7; __pyx_t_11+=1) {
16756     __pyx_v_i = __pyx_t_11;
16757 
16758     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1192
16759  *         # Free things
16760  *         for i in range(7):
16761  *             free(pointers[i])             # <<<<<<<<<<<<<<
16762  *
16763  *     cdef bytes _dumps(self):
16764  */
16765     free((__pyx_v_pointers[__pyx_v_i]));
16766   }
16767 
16768   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1106
16769  *             preincrement(iter_set[0])
16770  *
16771  *     cdef void _get_ghost_zones(self, int ngz, int order1, int order2,             # <<<<<<<<<<<<<<
16772  *                                bint periodicity[3], BoolArrayCollection out_ewah,
16773  *                                bint coarse_ghosts = 0):
16774  */
16775 
16776   /* function exit code */
16777   goto __pyx_L0;
16778   __pyx_L1_error:;
16779   __Pyx_XDECREF(__pyx_t_1);
16780   __Pyx_XDECREF(__pyx_t_2);
16781   __Pyx_XDECREF(__pyx_t_3);
16782   __Pyx_XDECREF(((PyObject *)__pyx_t_5));
16783   __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
16784   __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
16785   __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
16786   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection._get_ghost_zones", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
16787   __pyx_L0:;
16788   __Pyx_XDECREF((PyObject *)__pyx_v_temp_bool);
16789   __Pyx_XDECREF((PyObject *)__pyx_v_out_bool);
16790   __PYX_XDEC_MEMVIEW(&__pyx_v_index, 1);
16791   __PYX_XDEC_MEMVIEW(&__pyx_v_ind1_n, 1);
16792   __PYX_XDEC_MEMVIEW(&__pyx_v_ind2_n, 1);
16793   __PYX_XDEC_MEMVIEW(&__pyx_v_neighbor_list1, 1);
16794   __PYX_XDEC_MEMVIEW(&__pyx_v_neighbor_list2, 1);
16795   __Pyx_XDECREF((PyObject *)__pyx_v_list_coll);
16796   __Pyx_RefNannyFinishContext();
16797 }
16798 
16799 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1194
16800  *             free(pointers[i])
16801  *
16802  *     cdef bytes _dumps(self):             # <<<<<<<<<<<<<<
16803  *         # TODO: write word size
16804  *         cdef sstream ss
16805  */
16806 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)16807 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
16808   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_sstream __pyx_v_ss;
16809   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
16810   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
16811   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll;
16812   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map;
16813   __pyx_t_5numpy_uint64_t __pyx_v_nrefn;
16814   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
16815   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah;
16816   PyObject *__pyx_r = NULL;
16817   __Pyx_RefNannyDeclarations
16818   int __pyx_t_1;
16819   __pyx_t_5numpy_uint64_t __pyx_t_2;
16820   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_3;
16821   PyObject *__pyx_t_4 = NULL;
16822   __Pyx_RefNannySetupContext("_dumps", 0);
16823 
16824   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1197
16825  *         # TODO: write word size
16826  *         cdef sstream ss
16827  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
16828  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
16829  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
16830  */
16831   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
16832 
16833   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1198
16834  *         cdef sstream ss
16835  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
16836  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
16837  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
16838  *         cdef ewahmap_it it_map
16839  */
16840   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
16841 
16842   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1199
16843  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
16844  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
16845  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll             # <<<<<<<<<<<<<<
16846  *         cdef ewahmap_it it_map
16847  *         cdef np.uint64_t nrefn, mi1
16848  */
16849   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_self->ewah_coll);
16850 
16851   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1204
16852  *         cdef ewah_bool_array mi1_ewah
16853  *         # Write mi1 ewah & refinment ewah
16854  *         ewah_keys[0].write(ss,1)             # <<<<<<<<<<<<<<
16855  *         ewah_refn[0].write(ss,1)
16856  *         # Number of refined bool arrays
16857  */
16858   (__pyx_v_ewah_keys[0]).write(__pyx_v_ss, 1);
16859 
16860   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1205
16861  *         # Write mi1 ewah & refinment ewah
16862  *         ewah_keys[0].write(ss,1)
16863  *         ewah_refn[0].write(ss,1)             # <<<<<<<<<<<<<<
16864  *         # Number of refined bool arrays
16865  *         nrefn = <np.uint64_t>(ewah_refn[0].numberOfOnes())
16866  */
16867   (__pyx_v_ewah_refn[0]).write(__pyx_v_ss, 1);
16868 
16869   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1207
16870  *         ewah_refn[0].write(ss,1)
16871  *         # Number of refined bool arrays
16872  *         nrefn = <np.uint64_t>(ewah_refn[0].numberOfOnes())             # <<<<<<<<<<<<<<
16873  *         ss.write(<const char *> &nrefn, sizeof(nrefn))
16874  *         # Loop over refined bool arrays
16875  */
16876   __pyx_v_nrefn = ((__pyx_t_5numpy_uint64_t)(__pyx_v_ewah_refn[0]).numberOfOnes());
16877 
16878   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1208
16879  *         # Number of refined bool arrays
16880  *         nrefn = <np.uint64_t>(ewah_refn[0].numberOfOnes())
16881  *         ss.write(<const char *> &nrefn, sizeof(nrefn))             # <<<<<<<<<<<<<<
16882  *         # Loop over refined bool arrays
16883  *         it_map = ewah_coll[0].begin()
16884  */
16885   (void)(__pyx_v_ss.write(((char const *)(&__pyx_v_nrefn)), (sizeof(__pyx_v_nrefn))));
16886 
16887   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1210
16888  *         ss.write(<const char *> &nrefn, sizeof(nrefn))
16889  *         # Loop over refined bool arrays
16890  *         it_map = ewah_coll[0].begin()             # <<<<<<<<<<<<<<
16891  *         while it_map != ewah_coll[0].end():
16892  *             mi1 = dereference(it_map).first
16893  */
16894   __pyx_v_it_map = (__pyx_v_ewah_coll[0]).begin();
16895 
16896   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1211
16897  *         # Loop over refined bool arrays
16898  *         it_map = ewah_coll[0].begin()
16899  *         while it_map != ewah_coll[0].end():             # <<<<<<<<<<<<<<
16900  *             mi1 = dereference(it_map).first
16901  *             mi1_ewah = dereference(it_map).second
16902  */
16903   while (1) {
16904     __pyx_t_1 = ((__pyx_v_it_map != (__pyx_v_ewah_coll[0]).end()) != 0);
16905     if (!__pyx_t_1) break;
16906 
16907     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1212
16908  *         it_map = ewah_coll[0].begin()
16909  *         while it_map != ewah_coll[0].end():
16910  *             mi1 = dereference(it_map).first             # <<<<<<<<<<<<<<
16911  *             mi1_ewah = dereference(it_map).second
16912  *             ss.write(<const char *> &mi1, sizeof(mi1))
16913  */
16914     __pyx_t_2 = (*__pyx_v_it_map).first;
16915     __pyx_v_mi1 = __pyx_t_2;
16916 
16917     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1213
16918  *         while it_map != ewah_coll[0].end():
16919  *             mi1 = dereference(it_map).first
16920  *             mi1_ewah = dereference(it_map).second             # <<<<<<<<<<<<<<
16921  *             ss.write(<const char *> &mi1, sizeof(mi1))
16922  *             mi1_ewah.write(ss,1)
16923  */
16924     __pyx_t_3 = (*__pyx_v_it_map).second;
16925     __pyx_v_mi1_ewah = __pyx_t_3;
16926 
16927     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1214
16928  *             mi1 = dereference(it_map).first
16929  *             mi1_ewah = dereference(it_map).second
16930  *             ss.write(<const char *> &mi1, sizeof(mi1))             # <<<<<<<<<<<<<<
16931  *             mi1_ewah.write(ss,1)
16932  *             preincrement(it_map)
16933  */
16934     (void)(__pyx_v_ss.write(((char const *)(&__pyx_v_mi1)), (sizeof(__pyx_v_mi1))));
16935 
16936     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1215
16937  *             mi1_ewah = dereference(it_map).second
16938  *             ss.write(<const char *> &mi1, sizeof(mi1))
16939  *             mi1_ewah.write(ss,1)             # <<<<<<<<<<<<<<
16940  *             preincrement(it_map)
16941  *         # Return type cast python bytes string
16942  */
16943     __pyx_v_mi1_ewah.write(__pyx_v_ss, 1);
16944 
16945     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1216
16946  *             ss.write(<const char *> &mi1, sizeof(mi1))
16947  *             mi1_ewah.write(ss,1)
16948  *             preincrement(it_map)             # <<<<<<<<<<<<<<
16949  *         # Return type cast python bytes string
16950  *         return <bytes>ss.str()
16951  */
16952     (void)((++__pyx_v_it_map));
16953   }
16954 
16955   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1218
16956  *             preincrement(it_map)
16957  *         # Return type cast python bytes string
16958  *         return <bytes>ss.str()             # <<<<<<<<<<<<<<
16959  *
16960  *     def dumps(self):
16961  */
16962   __Pyx_XDECREF(__pyx_r);
16963   __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_ss.str()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error)
16964   __Pyx_GOTREF(__pyx_t_4);
16965   __Pyx_INCREF(((PyObject*)__pyx_t_4));
16966   __pyx_r = ((PyObject*)__pyx_t_4);
16967   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16968   goto __pyx_L0;
16969 
16970   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1194
16971  *             free(pointers[i])
16972  *
16973  *     cdef bytes _dumps(self):             # <<<<<<<<<<<<<<
16974  *         # TODO: write word size
16975  *         cdef sstream ss
16976  */
16977 
16978   /* function exit code */
16979   __pyx_L1_error:;
16980   __Pyx_XDECREF(__pyx_t_4);
16981   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection._dumps", __pyx_clineno, __pyx_lineno, __pyx_filename);
16982   __pyx_r = 0;
16983   __pyx_L0:;
16984   __Pyx_XGIVEREF(__pyx_r);
16985   __Pyx_RefNannyFinishContext();
16986   return __pyx_r;
16987 }
16988 
16989 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1220
16990  *         return <bytes>ss.str()
16991  *
16992  *     def dumps(self):             # <<<<<<<<<<<<<<
16993  *         return self._dumps()
16994  *
16995  */
16996 
16997 /* Python wrapper */
16998 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_41dumps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_41dumps(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)16999 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_41dumps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
17000   PyObject *__pyx_r = 0;
17001   __Pyx_RefNannyDeclarations
17002   __Pyx_RefNannySetupContext("dumps (wrapper)", 0);
17003   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_40dumps(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self));
17004 
17005   /* function exit code */
17006   __Pyx_RefNannyFinishContext();
17007   return __pyx_r;
17008 }
17009 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_40dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)17010 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_40dumps(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
17011   PyObject *__pyx_r = NULL;
17012   __Pyx_RefNannyDeclarations
17013   PyObject *__pyx_t_1 = NULL;
17014   __Pyx_RefNannySetupContext("dumps", 0);
17015 
17016   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1221
17017  *
17018  *     def dumps(self):
17019  *         return self._dumps()             # <<<<<<<<<<<<<<
17020  *
17021  *     cdef bint _loads(self, bytes s):
17022  */
17023   __Pyx_XDECREF(__pyx_r);
17024   __pyx_t_1 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_dumps(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L1_error)
17025   __Pyx_GOTREF(__pyx_t_1);
17026   __pyx_r = __pyx_t_1;
17027   __pyx_t_1 = 0;
17028   goto __pyx_L0;
17029 
17030   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1220
17031  *         return <bytes>ss.str()
17032  *
17033  *     def dumps(self):             # <<<<<<<<<<<<<<
17034  *         return self._dumps()
17035  *
17036  */
17037 
17038   /* function exit code */
17039   __pyx_L1_error:;
17040   __Pyx_XDECREF(__pyx_t_1);
17041   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.dumps", __pyx_clineno, __pyx_lineno, __pyx_filename);
17042   __pyx_r = NULL;
17043   __pyx_L0:;
17044   __Pyx_XGIVEREF(__pyx_r);
17045   __Pyx_RefNannyFinishContext();
17046   return __pyx_r;
17047 }
17048 
17049 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1223
17050  *         return self._dumps()
17051  *
17052  *     cdef bint _loads(self, bytes s):             # <<<<<<<<<<<<<<
17053  *         # TODO: write word size
17054  *         cdef sstream ss
17055  */
17056 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_s)17057 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_s) {
17058   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_sstream __pyx_v_ss;
17059   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
17060   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
17061   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll;
17062   __pyx_t_5numpy_uint64_t __pyx_v_nrefn;
17063   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
17064   CYTHON_UNUSED __pyx_t_5numpy_uint64_t __pyx_v__;
17065   int __pyx_r;
17066   __Pyx_RefNannyDeclarations
17067   Py_ssize_t __pyx_t_1;
17068   int __pyx_t_2;
17069   char *__pyx_t_3;
17070   PyObject *__pyx_t_4 = NULL;
17071   PyObject *__pyx_t_5 = NULL;
17072   PyObject *__pyx_t_6 = NULL;
17073   PyObject *__pyx_t_7 = NULL;
17074   PyObject *__pyx_t_8 = NULL;
17075   int __pyx_t_9;
17076   PyObject *__pyx_t_10 = NULL;
17077   __pyx_t_5numpy_uint64_t __pyx_t_11;
17078   __pyx_t_5numpy_uint64_t __pyx_t_12;
17079   __pyx_t_5numpy_uint64_t __pyx_t_13;
17080   __Pyx_RefNannySetupContext("_loads", 0);
17081 
17082   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1226
17083  *         # TODO: write word size
17084  *         cdef sstream ss
17085  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
17086  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
17087  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
17088  */
17089   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
17090 
17091   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1227
17092  *         cdef sstream ss
17093  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
17094  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
17095  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
17096  *         cdef np.uint64_t nrefn, mi1
17097  */
17098   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
17099 
17100   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1228
17101  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
17102  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
17103  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll             # <<<<<<<<<<<<<<
17104  *         cdef np.uint64_t nrefn, mi1
17105  *         nrefn = mi1 = 0
17106  */
17107   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_self->ewah_coll);
17108 
17109   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1230
17110  *         cdef ewahmap *ewah_coll = <ewahmap *> self.ewah_coll
17111  *         cdef np.uint64_t nrefn, mi1
17112  *         nrefn = mi1 = 0             # <<<<<<<<<<<<<<
17113  *         # Write string to string stream
17114  *         if len(s) == 0: return 1
17115  */
17116   __pyx_v_nrefn = 0;
17117   __pyx_v_mi1 = 0;
17118 
17119   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1232
17120  *         nrefn = mi1 = 0
17121  *         # Write string to string stream
17122  *         if len(s) == 0: return 1             # <<<<<<<<<<<<<<
17123  *         ss.write(s, len(s))
17124  *         # Read keys and refinement arrays
17125  */
17126   if (unlikely(__pyx_v_s == Py_None)) {
17127     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
17128     __PYX_ERR(0, 1232, __pyx_L1_error)
17129   }
17130   __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_s); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1232, __pyx_L1_error)
17131   __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
17132   if (__pyx_t_2) {
17133     __pyx_r = 1;
17134     goto __pyx_L0;
17135   }
17136 
17137   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1233
17138  *         # Write string to string stream
17139  *         if len(s) == 0: return 1
17140  *         ss.write(s, len(s))             # <<<<<<<<<<<<<<
17141  *         # Read keys and refinement arrays
17142  *         if ss.eof(): return 1
17143  */
17144   if (unlikely(__pyx_v_s == Py_None)) {
17145     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
17146     __PYX_ERR(0, 1233, __pyx_L1_error)
17147   }
17148   __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 1233, __pyx_L1_error)
17149   if (unlikely(__pyx_v_s == Py_None)) {
17150     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
17151     __PYX_ERR(0, 1233, __pyx_L1_error)
17152   }
17153   __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_s); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1233, __pyx_L1_error)
17154   (void)(__pyx_v_ss.write(__pyx_t_3, __pyx_t_1));
17155 
17156   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1235
17157  *         ss.write(s, len(s))
17158  *         # Read keys and refinement arrays
17159  *         if ss.eof(): return 1             # <<<<<<<<<<<<<<
17160  *         ewah_keys[0].read(ss,1)
17161  *         if ss.eof(): return 1
17162  */
17163   __pyx_t_2 = (__pyx_v_ss.eof() != 0);
17164   if (__pyx_t_2) {
17165     __pyx_r = 1;
17166     goto __pyx_L0;
17167   }
17168 
17169   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1236
17170  *         # Read keys and refinement arrays
17171  *         if ss.eof(): return 1
17172  *         ewah_keys[0].read(ss,1)             # <<<<<<<<<<<<<<
17173  *         if ss.eof(): return 1
17174  *         ewah_refn[0].read(ss,1)
17175  */
17176   (__pyx_v_ewah_keys[0]).read(__pyx_v_ss, 1);
17177 
17178   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1237
17179  *         if ss.eof(): return 1
17180  *         ewah_keys[0].read(ss,1)
17181  *         if ss.eof(): return 1             # <<<<<<<<<<<<<<
17182  *         ewah_refn[0].read(ss,1)
17183  *         # Read and check number of refined cells
17184  */
17185   __pyx_t_2 = (__pyx_v_ss.eof() != 0);
17186   if (__pyx_t_2) {
17187     __pyx_r = 1;
17188     goto __pyx_L0;
17189   }
17190 
17191   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1238
17192  *         ewah_keys[0].read(ss,1)
17193  *         if ss.eof(): return 1
17194  *         ewah_refn[0].read(ss,1)             # <<<<<<<<<<<<<<
17195  *         # Read and check number of refined cells
17196  *         if ss.eof(): return 1
17197  */
17198   (__pyx_v_ewah_refn[0]).read(__pyx_v_ss, 1);
17199 
17200   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1240
17201  *         ewah_refn[0].read(ss,1)
17202  *         # Read and check number of refined cells
17203  *         if ss.eof(): return 1             # <<<<<<<<<<<<<<
17204  *         ss.read(<char *> (&nrefn), sizeof(nrefn))
17205  *         if nrefn != ewah_refn[0].numberOfOnes():
17206  */
17207   __pyx_t_2 = (__pyx_v_ss.eof() != 0);
17208   if (__pyx_t_2) {
17209     __pyx_r = 1;
17210     goto __pyx_L0;
17211   }
17212 
17213   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1241
17214  *         # Read and check number of refined cells
17215  *         if ss.eof(): return 1
17216  *         ss.read(<char *> (&nrefn), sizeof(nrefn))             # <<<<<<<<<<<<<<
17217  *         if nrefn != ewah_refn[0].numberOfOnes():
17218  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))
17219  */
17220   (void)(__pyx_v_ss.read(((char *)(&__pyx_v_nrefn)), (sizeof(__pyx_v_nrefn))));
17221 
17222   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1242
17223  *         if ss.eof(): return 1
17224  *         ss.read(<char *> (&nrefn), sizeof(nrefn))
17225  *         if nrefn != ewah_refn[0].numberOfOnes():             # <<<<<<<<<<<<<<
17226  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))
17227  *         # Loop over refined cells
17228  */
17229   __pyx_t_2 = ((__pyx_v_nrefn != (__pyx_v_ewah_refn[0]).numberOfOnes()) != 0);
17230   if (unlikely(__pyx_t_2)) {
17231 
17232     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1243
17233  *         ss.read(<char *> (&nrefn), sizeof(nrefn))
17234  *         if nrefn != ewah_refn[0].numberOfOnes():
17235  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))             # <<<<<<<<<<<<<<
17236  *         # Loop over refined cells
17237  *         for _ in range(nrefn):
17238  */
17239     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Error_in_read_File_indicates_ref, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1243, __pyx_L1_error)
17240     __Pyx_GOTREF(__pyx_t_5);
17241     __pyx_t_6 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nrefn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1243, __pyx_L1_error)
17242     __Pyx_GOTREF(__pyx_t_6);
17243     __pyx_t_7 = __Pyx_PyInt_FromSize_t((__pyx_v_ewah_refn[0]).numberOfOnes()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1243, __pyx_L1_error)
17244     __Pyx_GOTREF(__pyx_t_7);
17245     __pyx_t_8 = NULL;
17246     __pyx_t_9 = 0;
17247     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
17248       __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
17249       if (likely(__pyx_t_8)) {
17250         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
17251         __Pyx_INCREF(__pyx_t_8);
17252         __Pyx_INCREF(function);
17253         __Pyx_DECREF_SET(__pyx_t_5, function);
17254         __pyx_t_9 = 1;
17255       }
17256     }
17257     #if CYTHON_FAST_PYCALL
17258     if (PyFunction_Check(__pyx_t_5)) {
17259       PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
17260       __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1243, __pyx_L1_error)
17261       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17262       __Pyx_GOTREF(__pyx_t_4);
17263       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17264       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17265     } else
17266     #endif
17267     #if CYTHON_FAST_PYCCALL
17268     if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
17269       PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
17270       __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1243, __pyx_L1_error)
17271       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17272       __Pyx_GOTREF(__pyx_t_4);
17273       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17274       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17275     } else
17276     #endif
17277     {
17278       __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1243, __pyx_L1_error)
17279       __Pyx_GOTREF(__pyx_t_10);
17280       if (__pyx_t_8) {
17281         __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
17282       }
17283       __Pyx_GIVEREF(__pyx_t_6);
17284       PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
17285       __Pyx_GIVEREF(__pyx_t_7);
17286       PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
17287       __pyx_t_6 = 0;
17288       __pyx_t_7 = 0;
17289       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1243, __pyx_L1_error)
17290       __Pyx_GOTREF(__pyx_t_4);
17291       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17292     }
17293     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17294     __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1243, __pyx_L1_error)
17295     __Pyx_GOTREF(__pyx_t_5);
17296     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17297     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
17298     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17299     __PYX_ERR(0, 1243, __pyx_L1_error)
17300 
17301     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1242
17302  *         if ss.eof(): return 1
17303  *         ss.read(<char *> (&nrefn), sizeof(nrefn))
17304  *         if nrefn != ewah_refn[0].numberOfOnes():             # <<<<<<<<<<<<<<
17305  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))
17306  *         # Loop over refined cells
17307  */
17308   }
17309 
17310   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1245
17311  *             raise Exception("Error in read. File indicates {} refinements, but bool array has {}.".format(nrefn,ewah_refn[0].numberOfOnes()))
17312  *         # Loop over refined cells
17313  *         for _ in range(nrefn):             # <<<<<<<<<<<<<<
17314  *             ss.read(<char *> (&mi1), sizeof(mi1))
17315  *             if ss.eof():
17316  */
17317   __pyx_t_11 = __pyx_v_nrefn;
17318   __pyx_t_12 = __pyx_t_11;
17319   for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
17320     __pyx_v__ = __pyx_t_13;
17321 
17322     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1246
17323  *         # Loop over refined cells
17324  *         for _ in range(nrefn):
17325  *             ss.read(<char *> (&mi1), sizeof(mi1))             # <<<<<<<<<<<<<<
17326  *             if ss.eof():
17327  *                 # A brief note about why we do this!
17328  */
17329     (void)(__pyx_v_ss.read(((char *)(&__pyx_v_mi1)), (sizeof(__pyx_v_mi1))));
17330 
17331     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1247
17332  *         for _ in range(nrefn):
17333  *             ss.read(<char *> (&mi1), sizeof(mi1))
17334  *             if ss.eof():             # <<<<<<<<<<<<<<
17335  *                 # A brief note about why we do this!
17336  *                 # In previous versions of the EWAH code, which were more
17337  */
17338     __pyx_t_2 = (__pyx_v_ss.eof() != 0);
17339     if (__pyx_t_2) {
17340 
17341       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1259
17342  *                 # really big!  So we do a check for EOF here to make sure we're
17343  *                 # not up to no good.
17344  *                 break             # <<<<<<<<<<<<<<
17345  *             ewah_coll[0][mi1].read(ss,1)
17346  *             # or...
17347  */
17348       goto __pyx_L9_break;
17349 
17350       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1247
17351  *         for _ in range(nrefn):
17352  *             ss.read(<char *> (&mi1), sizeof(mi1))
17353  *             if ss.eof():             # <<<<<<<<<<<<<<
17354  *                 # A brief note about why we do this!
17355  *                 # In previous versions of the EWAH code, which were more
17356  */
17357     }
17358 
17359     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1260
17360  *                 # not up to no good.
17361  *                 break
17362  *             ewah_coll[0][mi1].read(ss,1)             # <<<<<<<<<<<<<<
17363  *             # or...
17364  *             #mi1_ewah.read(ss,1)
17365  */
17366     ((__pyx_v_ewah_coll[0])[__pyx_v_mi1]).read(__pyx_v_ss, 1);
17367   }
17368   __pyx_L9_break:;
17369 
17370   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1264
17371  *             #mi1_ewah.read(ss,1)
17372  *             #ewah_coll[0][mi1].swap(mi1_ewah)
17373  *         return 1             # <<<<<<<<<<<<<<
17374  *
17375  *     def loads(self, s):
17376  */
17377   __pyx_r = 1;
17378   goto __pyx_L0;
17379 
17380   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1223
17381  *         return self._dumps()
17382  *
17383  *     cdef bint _loads(self, bytes s):             # <<<<<<<<<<<<<<
17384  *         # TODO: write word size
17385  *         cdef sstream ss
17386  */
17387 
17388   /* function exit code */
17389   __pyx_L1_error:;
17390   __Pyx_XDECREF(__pyx_t_4);
17391   __Pyx_XDECREF(__pyx_t_5);
17392   __Pyx_XDECREF(__pyx_t_6);
17393   __Pyx_XDECREF(__pyx_t_7);
17394   __Pyx_XDECREF(__pyx_t_8);
17395   __Pyx_XDECREF(__pyx_t_10);
17396   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection._loads", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
17397   __pyx_r = 0;
17398   __pyx_L0:;
17399   __Pyx_RefNannyFinishContext();
17400   return __pyx_r;
17401 }
17402 
17403 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1266
17404  *         return 1
17405  *
17406  *     def loads(self, s):             # <<<<<<<<<<<<<<
17407  *         return self._loads(s)
17408  *
17409  */
17410 
17411 /* Python wrapper */
17412 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_43loads(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_43loads(PyObject * __pyx_v_self,PyObject * __pyx_v_s)17413 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_43loads(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
17414   PyObject *__pyx_r = 0;
17415   __Pyx_RefNannyDeclarations
17416   __Pyx_RefNannySetupContext("loads (wrapper)", 0);
17417   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_42loads(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((PyObject *)__pyx_v_s));
17418 
17419   /* function exit code */
17420   __Pyx_RefNannyFinishContext();
17421   return __pyx_r;
17422 }
17423 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_42loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_s)17424 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_42loads(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_s) {
17425   PyObject *__pyx_r = NULL;
17426   __Pyx_RefNannyDeclarations
17427   PyObject *__pyx_t_1 = NULL;
17428   __Pyx_RefNannySetupContext("loads", 0);
17429 
17430   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1267
17431  *
17432  *     def loads(self, s):
17433  *         return self._loads(s)             # <<<<<<<<<<<<<<
17434  *
17435  *     def save(self, fname):
17436  */
17437   __Pyx_XDECREF(__pyx_r);
17438   if (!(likely(PyBytes_CheckExact(__pyx_v_s))||((__pyx_v_s) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_s)->tp_name), 0))) __PYX_ERR(0, 1267, __pyx_L1_error)
17439   __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_loads(__pyx_v_self, ((PyObject*)__pyx_v_s))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
17440   __Pyx_GOTREF(__pyx_t_1);
17441   __pyx_r = __pyx_t_1;
17442   __pyx_t_1 = 0;
17443   goto __pyx_L0;
17444 
17445   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1266
17446  *         return 1
17447  *
17448  *     def loads(self, s):             # <<<<<<<<<<<<<<
17449  *         return self._loads(s)
17450  *
17451  */
17452 
17453   /* function exit code */
17454   __pyx_L1_error:;
17455   __Pyx_XDECREF(__pyx_t_1);
17456   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.loads", __pyx_clineno, __pyx_lineno, __pyx_filename);
17457   __pyx_r = NULL;
17458   __pyx_L0:;
17459   __Pyx_XGIVEREF(__pyx_r);
17460   __Pyx_RefNannyFinishContext();
17461   return __pyx_r;
17462 }
17463 
17464 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1269
17465  *         return self._loads(s)
17466  *
17467  *     def save(self, fname):             # <<<<<<<<<<<<<<
17468  *         cdef bytes serial_BAC
17469  *         f = open(fname,'wb')
17470  */
17471 
17472 /* Python wrapper */
17473 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_45save(PyObject *__pyx_v_self, PyObject *__pyx_v_fname); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_45save(PyObject * __pyx_v_self,PyObject * __pyx_v_fname)17474 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_45save(PyObject *__pyx_v_self, PyObject *__pyx_v_fname) {
17475   PyObject *__pyx_r = 0;
17476   __Pyx_RefNannyDeclarations
17477   __Pyx_RefNannySetupContext("save (wrapper)", 0);
17478   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_44save(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((PyObject *)__pyx_v_fname));
17479 
17480   /* function exit code */
17481   __Pyx_RefNannyFinishContext();
17482   return __pyx_r;
17483 }
17484 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_44save(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_fname)17485 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_44save(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_fname) {
17486   PyObject *__pyx_v_serial_BAC = 0;
17487   PyObject *__pyx_v_f = NULL;
17488   PyObject *__pyx_r = NULL;
17489   __Pyx_RefNannyDeclarations
17490   PyObject *__pyx_t_1 = NULL;
17491   PyObject *__pyx_t_2 = NULL;
17492   PyObject *__pyx_t_3 = NULL;
17493   PyObject *__pyx_t_4 = NULL;
17494   PyObject *__pyx_t_5 = NULL;
17495   Py_ssize_t __pyx_t_6;
17496   PyObject *__pyx_t_7 = NULL;
17497   int __pyx_t_8;
17498   PyObject *__pyx_t_9 = NULL;
17499   __Pyx_RefNannySetupContext("save", 0);
17500 
17501   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1271
17502  *     def save(self, fname):
17503  *         cdef bytes serial_BAC
17504  *         f = open(fname,'wb')             # <<<<<<<<<<<<<<
17505  *         serial_BAC = self._dumps()
17506  *         f.write(struct.pack('Q',len(serial_BAC)))
17507  */
17508   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
17509   __Pyx_GOTREF(__pyx_t_1);
17510   __Pyx_INCREF(__pyx_v_fname);
17511   __Pyx_GIVEREF(__pyx_v_fname);
17512   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fname);
17513   __Pyx_INCREF(__pyx_n_s_wb);
17514   __Pyx_GIVEREF(__pyx_n_s_wb);
17515   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_wb);
17516   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error)
17517   __Pyx_GOTREF(__pyx_t_2);
17518   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17519   __pyx_v_f = __pyx_t_2;
17520   __pyx_t_2 = 0;
17521 
17522   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1272
17523  *         cdef bytes serial_BAC
17524  *         f = open(fname,'wb')
17525  *         serial_BAC = self._dumps()             # <<<<<<<<<<<<<<
17526  *         f.write(struct.pack('Q',len(serial_BAC)))
17527  *         f.write(serial_BAC)
17528  */
17529   __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_dumps(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
17530   __Pyx_GOTREF(__pyx_t_2);
17531   __pyx_v_serial_BAC = ((PyObject*)__pyx_t_2);
17532   __pyx_t_2 = 0;
17533 
17534   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1273
17535  *         f = open(fname,'wb')
17536  *         serial_BAC = self._dumps()
17537  *         f.write(struct.pack('Q',len(serial_BAC)))             # <<<<<<<<<<<<<<
17538  *         f.write(serial_BAC)
17539  *         f.close()
17540  */
17541   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
17542   __Pyx_GOTREF(__pyx_t_1);
17543   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_struct); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L1_error)
17544   __Pyx_GOTREF(__pyx_t_4);
17545   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error)
17546   __Pyx_GOTREF(__pyx_t_5);
17547   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17548   if (unlikely(__pyx_v_serial_BAC == Py_None)) {
17549     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
17550     __PYX_ERR(0, 1273, __pyx_L1_error)
17551   }
17552   __pyx_t_6 = PyBytes_GET_SIZE(__pyx_v_serial_BAC); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1273, __pyx_L1_error)
17553   __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L1_error)
17554   __Pyx_GOTREF(__pyx_t_4);
17555   __pyx_t_7 = NULL;
17556   __pyx_t_8 = 0;
17557   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
17558     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
17559     if (likely(__pyx_t_7)) {
17560       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
17561       __Pyx_INCREF(__pyx_t_7);
17562       __Pyx_INCREF(function);
17563       __Pyx_DECREF_SET(__pyx_t_5, function);
17564       __pyx_t_8 = 1;
17565     }
17566   }
17567   #if CYTHON_FAST_PYCALL
17568   if (PyFunction_Check(__pyx_t_5)) {
17569     PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_s_Q, __pyx_t_4};
17570     __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error)
17571     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17572     __Pyx_GOTREF(__pyx_t_3);
17573     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17574   } else
17575   #endif
17576   #if CYTHON_FAST_PYCCALL
17577   if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
17578     PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_s_Q, __pyx_t_4};
17579     __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error)
17580     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17581     __Pyx_GOTREF(__pyx_t_3);
17582     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17583   } else
17584   #endif
17585   {
17586     __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1273, __pyx_L1_error)
17587     __Pyx_GOTREF(__pyx_t_9);
17588     if (__pyx_t_7) {
17589       __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
17590     }
17591     __Pyx_INCREF(__pyx_n_s_Q);
17592     __Pyx_GIVEREF(__pyx_n_s_Q);
17593     PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_n_s_Q);
17594     __Pyx_GIVEREF(__pyx_t_4);
17595     PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
17596     __pyx_t_4 = 0;
17597     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error)
17598     __Pyx_GOTREF(__pyx_t_3);
17599     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17600   }
17601   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17602   __pyx_t_5 = NULL;
17603   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
17604     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
17605     if (likely(__pyx_t_5)) {
17606       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
17607       __Pyx_INCREF(__pyx_t_5);
17608       __Pyx_INCREF(function);
17609       __Pyx_DECREF_SET(__pyx_t_1, function);
17610     }
17611   }
17612   __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
17613   __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17614   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17615   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
17616   __Pyx_GOTREF(__pyx_t_2);
17617   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17618   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17619 
17620   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1274
17621  *         serial_BAC = self._dumps()
17622  *         f.write(struct.pack('Q',len(serial_BAC)))
17623  *         f.write(serial_BAC)             # <<<<<<<<<<<<<<
17624  *         f.close()
17625  *
17626  */
17627   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
17628   __Pyx_GOTREF(__pyx_t_1);
17629   __pyx_t_3 = NULL;
17630   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
17631     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
17632     if (likely(__pyx_t_3)) {
17633       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
17634       __Pyx_INCREF(__pyx_t_3);
17635       __Pyx_INCREF(function);
17636       __Pyx_DECREF_SET(__pyx_t_1, function);
17637     }
17638   }
17639   __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_serial_BAC) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_serial_BAC);
17640   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17641   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
17642   __Pyx_GOTREF(__pyx_t_2);
17643   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17644   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17645 
17646   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1275
17647  *         f.write(struct.pack('Q',len(serial_BAC)))
17648  *         f.write(serial_BAC)
17649  *         f.close()             # <<<<<<<<<<<<<<
17650  *
17651  *     def load(self, fname):
17652  */
17653   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error)
17654   __Pyx_GOTREF(__pyx_t_1);
17655   __pyx_t_3 = NULL;
17656   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
17657     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
17658     if (likely(__pyx_t_3)) {
17659       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
17660       __Pyx_INCREF(__pyx_t_3);
17661       __Pyx_INCREF(function);
17662       __Pyx_DECREF_SET(__pyx_t_1, function);
17663     }
17664   }
17665   __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
17666   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17667   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error)
17668   __Pyx_GOTREF(__pyx_t_2);
17669   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17670   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17671 
17672   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1269
17673  *         return self._loads(s)
17674  *
17675  *     def save(self, fname):             # <<<<<<<<<<<<<<
17676  *         cdef bytes serial_BAC
17677  *         f = open(fname,'wb')
17678  */
17679 
17680   /* function exit code */
17681   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17682   goto __pyx_L0;
17683   __pyx_L1_error:;
17684   __Pyx_XDECREF(__pyx_t_1);
17685   __Pyx_XDECREF(__pyx_t_2);
17686   __Pyx_XDECREF(__pyx_t_3);
17687   __Pyx_XDECREF(__pyx_t_4);
17688   __Pyx_XDECREF(__pyx_t_5);
17689   __Pyx_XDECREF(__pyx_t_7);
17690   __Pyx_XDECREF(__pyx_t_9);
17691   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.save", __pyx_clineno, __pyx_lineno, __pyx_filename);
17692   __pyx_r = NULL;
17693   __pyx_L0:;
17694   __Pyx_XDECREF(__pyx_v_serial_BAC);
17695   __Pyx_XDECREF(__pyx_v_f);
17696   __Pyx_XGIVEREF(__pyx_r);
17697   __Pyx_RefNannyFinishContext();
17698   return __pyx_r;
17699 }
17700 
17701 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1277
17702  *         f.close()
17703  *
17704  *     def load(self, fname):             # <<<<<<<<<<<<<<
17705  *         cdef np.uint64_t size_serial
17706  *         cdef bint flag_read
17707  */
17708 
17709 /* Python wrapper */
17710 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_47load(PyObject *__pyx_v_self, PyObject *__pyx_v_fname); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_47load(PyObject * __pyx_v_self,PyObject * __pyx_v_fname)17711 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_47load(PyObject *__pyx_v_self, PyObject *__pyx_v_fname) {
17712   PyObject *__pyx_r = 0;
17713   __Pyx_RefNannyDeclarations
17714   __Pyx_RefNannySetupContext("load (wrapper)", 0);
17715   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_46load(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((PyObject *)__pyx_v_fname));
17716 
17717   /* function exit code */
17718   __Pyx_RefNannyFinishContext();
17719   return __pyx_r;
17720 }
17721 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_46load(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_fname)17722 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_46load(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_fname) {
17723   __pyx_t_5numpy_uint64_t __pyx_v_size_serial;
17724   int __pyx_v_flag_read;
17725   PyObject *__pyx_v_f = NULL;
17726   PyObject *__pyx_r = NULL;
17727   __Pyx_RefNannyDeclarations
17728   PyObject *__pyx_t_1 = NULL;
17729   PyObject *__pyx_t_2 = NULL;
17730   PyObject *__pyx_t_3 = NULL;
17731   PyObject *__pyx_t_4 = NULL;
17732   PyObject *__pyx_t_5 = NULL;
17733   PyObject *__pyx_t_6 = NULL;
17734   PyObject *__pyx_t_7 = NULL;
17735   int __pyx_t_8;
17736   PyObject *(*__pyx_t_9)(PyObject *);
17737   __pyx_t_5numpy_uint64_t __pyx_t_10;
17738   __Pyx_RefNannySetupContext("load", 0);
17739 
17740   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1280
17741  *         cdef np.uint64_t size_serial
17742  *         cdef bint flag_read
17743  *         f = open(fname,'rb')             # <<<<<<<<<<<<<<
17744  *         size_serial, = struct.unpack('Q',f.read(struct.calcsize('Q')))
17745  *         flag_read = self._loads(f.read(size_serial))
17746  */
17747   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
17748   __Pyx_GOTREF(__pyx_t_1);
17749   __Pyx_INCREF(__pyx_v_fname);
17750   __Pyx_GIVEREF(__pyx_v_fname);
17751   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fname);
17752   __Pyx_INCREF(__pyx_n_s_rb);
17753   __Pyx_GIVEREF(__pyx_n_s_rb);
17754   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_rb);
17755   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error)
17756   __Pyx_GOTREF(__pyx_t_2);
17757   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17758   __pyx_v_f = __pyx_t_2;
17759   __pyx_t_2 = 0;
17760 
17761   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1281
17762  *         cdef bint flag_read
17763  *         f = open(fname,'rb')
17764  *         size_serial, = struct.unpack('Q',f.read(struct.calcsize('Q')))             # <<<<<<<<<<<<<<
17765  *         flag_read = self._loads(f.read(size_serial))
17766  *         f.close()
17767  */
17768   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
17769   __Pyx_GOTREF(__pyx_t_1);
17770   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unpack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error)
17771   __Pyx_GOTREF(__pyx_t_3);
17772   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17773   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1281, __pyx_L1_error)
17774   __Pyx_GOTREF(__pyx_t_4);
17775   __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_struct); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1281, __pyx_L1_error)
17776   __Pyx_GOTREF(__pyx_t_6);
17777   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_calcsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1281, __pyx_L1_error)
17778   __Pyx_GOTREF(__pyx_t_7);
17779   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17780   __pyx_t_6 = NULL;
17781   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
17782     __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
17783     if (likely(__pyx_t_6)) {
17784       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
17785       __Pyx_INCREF(__pyx_t_6);
17786       __Pyx_INCREF(function);
17787       __Pyx_DECREF_SET(__pyx_t_7, function);
17788     }
17789   }
17790   __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_n_s_Q) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_s_Q);
17791   __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17792   if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1281, __pyx_L1_error)
17793   __Pyx_GOTREF(__pyx_t_5);
17794   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17795   __pyx_t_7 = NULL;
17796   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
17797     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
17798     if (likely(__pyx_t_7)) {
17799       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
17800       __Pyx_INCREF(__pyx_t_7);
17801       __Pyx_INCREF(function);
17802       __Pyx_DECREF_SET(__pyx_t_4, function);
17803     }
17804   }
17805   __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
17806   __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17807   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17808   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
17809   __Pyx_GOTREF(__pyx_t_1);
17810   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17811   __pyx_t_4 = NULL;
17812   __pyx_t_8 = 0;
17813   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
17814     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
17815     if (likely(__pyx_t_4)) {
17816       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17817       __Pyx_INCREF(__pyx_t_4);
17818       __Pyx_INCREF(function);
17819       __Pyx_DECREF_SET(__pyx_t_3, function);
17820       __pyx_t_8 = 1;
17821     }
17822   }
17823   #if CYTHON_FAST_PYCALL
17824   if (PyFunction_Check(__pyx_t_3)) {
17825     PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_Q, __pyx_t_1};
17826     __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
17827     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17828     __Pyx_GOTREF(__pyx_t_2);
17829     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17830   } else
17831   #endif
17832   #if CYTHON_FAST_PYCCALL
17833   if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
17834     PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_Q, __pyx_t_1};
17835     __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
17836     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17837     __Pyx_GOTREF(__pyx_t_2);
17838     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17839   } else
17840   #endif
17841   {
17842     __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1281, __pyx_L1_error)
17843     __Pyx_GOTREF(__pyx_t_5);
17844     if (__pyx_t_4) {
17845       __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
17846     }
17847     __Pyx_INCREF(__pyx_n_s_Q);
17848     __Pyx_GIVEREF(__pyx_n_s_Q);
17849     PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_n_s_Q);
17850     __Pyx_GIVEREF(__pyx_t_1);
17851     PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_t_1);
17852     __pyx_t_1 = 0;
17853     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
17854     __Pyx_GOTREF(__pyx_t_2);
17855     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17856   }
17857   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17858   if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
17859     PyObject* sequence = __pyx_t_2;
17860     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17861     if (unlikely(size != 1)) {
17862       if (size > 1) __Pyx_RaiseTooManyValuesError(1);
17863       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17864       __PYX_ERR(0, 1281, __pyx_L1_error)
17865     }
17866     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17867     if (likely(PyTuple_CheckExact(sequence))) {
17868       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
17869     } else {
17870       __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
17871     }
17872     __Pyx_INCREF(__pyx_t_3);
17873     #else
17874     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error)
17875     __Pyx_GOTREF(__pyx_t_3);
17876     #endif
17877     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17878   } else {
17879     Py_ssize_t index = -1;
17880     __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1281, __pyx_L1_error)
17881     __Pyx_GOTREF(__pyx_t_5);
17882     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17883     __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext;
17884     index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
17885     __Pyx_GOTREF(__pyx_t_3);
17886     if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_5), 1) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
17887     __pyx_t_9 = NULL;
17888     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17889     goto __pyx_L4_unpacking_done;
17890     __pyx_L3_unpacking_failed:;
17891     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17892     __pyx_t_9 = NULL;
17893     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17894     __PYX_ERR(0, 1281, __pyx_L1_error)
17895     __pyx_L4_unpacking_done:;
17896   }
17897   __pyx_t_10 = __Pyx_PyInt_As_npy_uint64(__pyx_t_3); if (unlikely((__pyx_t_10 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1281, __pyx_L1_error)
17898   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17899   __pyx_v_size_serial = __pyx_t_10;
17900 
17901   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1282
17902  *         f = open(fname,'rb')
17903  *         size_serial, = struct.unpack('Q',f.read(struct.calcsize('Q')))
17904  *         flag_read = self._loads(f.read(size_serial))             # <<<<<<<<<<<<<<
17905  *         f.close()
17906  *         return flag_read
17907  */
17908   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L1_error)
17909   __Pyx_GOTREF(__pyx_t_3);
17910   __pyx_t_5 = __Pyx_PyInt_From_npy_uint64(__pyx_v_size_serial); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1282, __pyx_L1_error)
17911   __Pyx_GOTREF(__pyx_t_5);
17912   __pyx_t_1 = NULL;
17913   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
17914     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
17915     if (likely(__pyx_t_1)) {
17916       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17917       __Pyx_INCREF(__pyx_t_1);
17918       __Pyx_INCREF(function);
17919       __Pyx_DECREF_SET(__pyx_t_3, function);
17920     }
17921   }
17922   __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
17923   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17924   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17925   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
17926   __Pyx_GOTREF(__pyx_t_2);
17927   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17928   if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1282, __pyx_L1_error)
17929   __pyx_v_flag_read = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_loads(__pyx_v_self, ((PyObject*)__pyx_t_2));
17930   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17931 
17932   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1283
17933  *         size_serial, = struct.unpack('Q',f.read(struct.calcsize('Q')))
17934  *         flag_read = self._loads(f.read(size_serial))
17935  *         f.close()             # <<<<<<<<<<<<<<
17936  *         return flag_read
17937  *
17938  */
17939   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1283, __pyx_L1_error)
17940   __Pyx_GOTREF(__pyx_t_3);
17941   __pyx_t_5 = NULL;
17942   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
17943     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
17944     if (likely(__pyx_t_5)) {
17945       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17946       __Pyx_INCREF(__pyx_t_5);
17947       __Pyx_INCREF(function);
17948       __Pyx_DECREF_SET(__pyx_t_3, function);
17949     }
17950   }
17951   __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
17952   __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17953   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __pyx_L1_error)
17954   __Pyx_GOTREF(__pyx_t_2);
17955   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17956   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17957 
17958   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1284
17959  *         flag_read = self._loads(f.read(size_serial))
17960  *         f.close()
17961  *         return flag_read             # <<<<<<<<<<<<<<
17962  *
17963  *     cdef bint _check(self):
17964  */
17965   __Pyx_XDECREF(__pyx_r);
17966   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_flag_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1284, __pyx_L1_error)
17967   __Pyx_GOTREF(__pyx_t_2);
17968   __pyx_r = __pyx_t_2;
17969   __pyx_t_2 = 0;
17970   goto __pyx_L0;
17971 
17972   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1277
17973  *         f.close()
17974  *
17975  *     def load(self, fname):             # <<<<<<<<<<<<<<
17976  *         cdef np.uint64_t size_serial
17977  *         cdef bint flag_read
17978  */
17979 
17980   /* function exit code */
17981   __pyx_L1_error:;
17982   __Pyx_XDECREF(__pyx_t_1);
17983   __Pyx_XDECREF(__pyx_t_2);
17984   __Pyx_XDECREF(__pyx_t_3);
17985   __Pyx_XDECREF(__pyx_t_4);
17986   __Pyx_XDECREF(__pyx_t_5);
17987   __Pyx_XDECREF(__pyx_t_6);
17988   __Pyx_XDECREF(__pyx_t_7);
17989   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
17990   __pyx_r = NULL;
17991   __pyx_L0:;
17992   __Pyx_XDECREF(__pyx_v_f);
17993   __Pyx_XGIVEREF(__pyx_r);
17994   __Pyx_RefNannyFinishContext();
17995   return __pyx_r;
17996 }
17997 
17998 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1286
17999  *         return flag_read
18000  *
18001  *     cdef bint _check(self):             # <<<<<<<<<<<<<<
18002  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
18003  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
18004  */
18005 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)18006 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__check(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
18007   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
18008   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
18009   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_tmp1;
18010   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_tmp2;
18011   __pyx_t_5numpy_uint64_t __pyx_v_nchk;
18012   PyObject *__pyx_v_msg = 0;
18013   int __pyx_r;
18014   __Pyx_RefNannyDeclarations
18015   int __pyx_t_1;
18016   PyObject *__pyx_t_2 = NULL;
18017   PyObject *__pyx_t_3 = NULL;
18018   PyObject *__pyx_t_4 = NULL;
18019   PyObject *__pyx_t_5 = NULL;
18020   __Pyx_RefNannySetupContext("_check", 0);
18021 
18022   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1287
18023  *
18024  *     cdef bint _check(self):
18025  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
18026  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
18027  *         cdef ewah_bool_array tmp1, tmp2
18028  */
18029   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
18030 
18031   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1288
18032  *     cdef bint _check(self):
18033  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
18034  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
18035  *         cdef ewah_bool_array tmp1, tmp2
18036  *         cdef np.uint64_t nchk
18037  */
18038   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
18039 
18040   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1293
18041  *         cdef str msg
18042  *         # Check that there are not any refn that are not keys
18043  *         ewah_keys[0].logicalxor(ewah_refn[0], tmp1)             # <<<<<<<<<<<<<<
18044  *         ewah_refn[0].logicaland(tmp1, tmp2)
18045  *         nchk = tmp2.numberOfOnes()
18046  */
18047   (__pyx_v_ewah_keys[0]).logicalxor((__pyx_v_ewah_refn[0]), __pyx_v_tmp1);
18048 
18049   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1294
18050  *         # Check that there are not any refn that are not keys
18051  *         ewah_keys[0].logicalxor(ewah_refn[0], tmp1)
18052  *         ewah_refn[0].logicaland(tmp1, tmp2)             # <<<<<<<<<<<<<<
18053  *         nchk = tmp2.numberOfOnes()
18054  *         if nchk > 0:
18055  */
18056   (__pyx_v_ewah_refn[0]).logicaland(__pyx_v_tmp1, __pyx_v_tmp2);
18057 
18058   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1295
18059  *         ewah_keys[0].logicalxor(ewah_refn[0], tmp1)
18060  *         ewah_refn[0].logicaland(tmp1, tmp2)
18061  *         nchk = tmp2.numberOfOnes()             # <<<<<<<<<<<<<<
18062  *         if nchk > 0:
18063  *             msg = "There are {} refined cells that are not set on coarse level.".format(nchk)
18064  */
18065   __pyx_v_nchk = __pyx_v_tmp2.numberOfOnes();
18066 
18067   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1296
18068  *         ewah_refn[0].logicaland(tmp1, tmp2)
18069  *         nchk = tmp2.numberOfOnes()
18070  *         if nchk > 0:             # <<<<<<<<<<<<<<
18071  *             msg = "There are {} refined cells that are not set on coarse level.".format(nchk)
18072  *             print(msg)
18073  */
18074   __pyx_t_1 = ((__pyx_v_nchk > 0) != 0);
18075   if (__pyx_t_1) {
18076 
18077     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1297
18078  *         nchk = tmp2.numberOfOnes()
18079  *         if nchk > 0:
18080  *             msg = "There are {} refined cells that are not set on coarse level.".format(nchk)             # <<<<<<<<<<<<<<
18081  *             print(msg)
18082  *             return 0
18083  */
18084     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_There_are_refined_cells_that_are, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __pyx_L1_error)
18085     __Pyx_GOTREF(__pyx_t_3);
18086     __pyx_t_4 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nchk); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error)
18087     __Pyx_GOTREF(__pyx_t_4);
18088     __pyx_t_5 = NULL;
18089     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
18090       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
18091       if (likely(__pyx_t_5)) {
18092         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
18093         __Pyx_INCREF(__pyx_t_5);
18094         __Pyx_INCREF(function);
18095         __Pyx_DECREF_SET(__pyx_t_3, function);
18096       }
18097     }
18098     __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
18099     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18100     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18101     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L1_error)
18102     __Pyx_GOTREF(__pyx_t_2);
18103     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18104     if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1297, __pyx_L1_error)
18105     __pyx_v_msg = ((PyObject*)__pyx_t_2);
18106     __pyx_t_2 = 0;
18107 
18108     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1298
18109  *         if nchk > 0:
18110  *             msg = "There are {} refined cells that are not set on coarse level.".format(nchk)
18111  *             print(msg)             # <<<<<<<<<<<<<<
18112  *             return 0
18113  *             # raise Exception(msg)
18114  */
18115     if (__Pyx_PrintOne(0, __pyx_v_msg) < 0) __PYX_ERR(0, 1298, __pyx_L1_error)
18116 
18117     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1299
18118  *             msg = "There are {} refined cells that are not set on coarse level.".format(nchk)
18119  *             print(msg)
18120  *             return 0             # <<<<<<<<<<<<<<
18121  *             # raise Exception(msg)
18122  *         return 1
18123  */
18124     __pyx_r = 0;
18125     goto __pyx_L0;
18126 
18127     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1296
18128  *         ewah_refn[0].logicaland(tmp1, tmp2)
18129  *         nchk = tmp2.numberOfOnes()
18130  *         if nchk > 0:             # <<<<<<<<<<<<<<
18131  *             msg = "There are {} refined cells that are not set on coarse level.".format(nchk)
18132  *             print(msg)
18133  */
18134   }
18135 
18136   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1301
18137  *             return 0
18138  *             # raise Exception(msg)
18139  *         return 1             # <<<<<<<<<<<<<<
18140  *
18141  *     def __dealloc__(self):
18142  */
18143   __pyx_r = 1;
18144   goto __pyx_L0;
18145 
18146   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1286
18147  *         return flag_read
18148  *
18149  *     cdef bint _check(self):             # <<<<<<<<<<<<<<
18150  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
18151  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
18152  */
18153 
18154   /* function exit code */
18155   __pyx_L1_error:;
18156   __Pyx_XDECREF(__pyx_t_2);
18157   __Pyx_XDECREF(__pyx_t_3);
18158   __Pyx_XDECREF(__pyx_t_4);
18159   __Pyx_XDECREF(__pyx_t_5);
18160   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection._check", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
18161   __pyx_r = 0;
18162   __pyx_L0:;
18163   __Pyx_XDECREF(__pyx_v_msg);
18164   __Pyx_RefNannyFinishContext();
18165   return __pyx_r;
18166 }
18167 
18168 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1303
18169  *         return 1
18170  *
18171  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
18172  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
18173  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
18174  */
18175 
18176 /* Python wrapper */
18177 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_49__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_49__dealloc__(PyObject * __pyx_v_self)18178 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_49__dealloc__(PyObject *__pyx_v_self) {
18179   __Pyx_RefNannyDeclarations
18180   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
18181   __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_48__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self));
18182 
18183   /* function exit code */
18184   __Pyx_RefNannyFinishContext();
18185 }
18186 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_48__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)18187 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_48__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
18188   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
18189   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
18190   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_coar;
18191   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
18192   __Pyx_RefNannyDeclarations
18193   __Pyx_RefNannySetupContext("__dealloc__", 0);
18194 
18195   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1304
18196  *
18197  *     def __dealloc__(self):
18198  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys             # <<<<<<<<<<<<<<
18199  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
18200  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
18201  */
18202   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_keys);
18203 
18204   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1305
18205  *     def __dealloc__(self):
18206  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
18207  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn             # <<<<<<<<<<<<<<
18208  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
18209  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
18210  */
18211   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_refn);
18212 
18213   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1306
18214  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
18215  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
18216  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar             # <<<<<<<<<<<<<<
18217  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
18218  *         del ewah_keys
18219  */
18220   __pyx_v_ewah_coar = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_self->ewah_coar);
18221 
18222   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1307
18223  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
18224  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
18225  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
18226  *         del ewah_keys
18227  *         del ewah_refn
18228  */
18229   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
18230 
18231   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1308
18232  *         cdef ewah_bool_array *ewah_coar = <ewah_bool_array *> self.ewah_coar
18233  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
18234  *         del ewah_keys             # <<<<<<<<<<<<<<
18235  *         del ewah_refn
18236  *         del ewah_coar
18237  */
18238   delete __pyx_v_ewah_keys;
18239 
18240   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1309
18241  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
18242  *         del ewah_keys
18243  *         del ewah_refn             # <<<<<<<<<<<<<<
18244  *         del ewah_coar
18245  *         del ewah_coll
18246  */
18247   delete __pyx_v_ewah_refn;
18248 
18249   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1310
18250  *         del ewah_keys
18251  *         del ewah_refn
18252  *         del ewah_coar             # <<<<<<<<<<<<<<
18253  *         del ewah_coll
18254  *
18255  */
18256   delete __pyx_v_ewah_coar;
18257 
18258   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1311
18259  *         del ewah_refn
18260  *         del ewah_coar
18261  *         del ewah_coll             # <<<<<<<<<<<<<<
18262  *
18263  *     def print_info(self, prefix=''):
18264  */
18265   delete __pyx_v_ewah_coll;
18266 
18267   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1303
18268  *         return 1
18269  *
18270  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
18271  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
18272  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
18273  */
18274 
18275   /* function exit code */
18276   __Pyx_RefNannyFinishContext();
18277 }
18278 
18279 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1313
18280  *         del ewah_coll
18281  *
18282  *     def print_info(self, prefix=''):             # <<<<<<<<<<<<<<
18283  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,
18284  *                                                                      self._count_coarse(),
18285  */
18286 
18287 /* Python wrapper */
18288 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_51print_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_51print_info(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)18289 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_51print_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18290   PyObject *__pyx_v_prefix = 0;
18291   PyObject *__pyx_r = 0;
18292   __Pyx_RefNannyDeclarations
18293   __Pyx_RefNannySetupContext("print_info (wrapper)", 0);
18294   {
18295     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
18296     PyObject* values[1] = {0};
18297     values[0] = ((PyObject *)__pyx_kp_s__5);
18298     if (unlikely(__pyx_kwds)) {
18299       Py_ssize_t kw_args;
18300       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18301       switch (pos_args) {
18302         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18303         CYTHON_FALLTHROUGH;
18304         case  0: break;
18305         default: goto __pyx_L5_argtuple_error;
18306       }
18307       kw_args = PyDict_Size(__pyx_kwds);
18308       switch (pos_args) {
18309         case  0:
18310         if (kw_args > 0) {
18311           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prefix);
18312           if (value) { values[0] = value; kw_args--; }
18313         }
18314       }
18315       if (unlikely(kw_args > 0)) {
18316         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "print_info") < 0)) __PYX_ERR(0, 1313, __pyx_L3_error)
18317       }
18318     } else {
18319       switch (PyTuple_GET_SIZE(__pyx_args)) {
18320         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18321         CYTHON_FALLTHROUGH;
18322         case  0: break;
18323         default: goto __pyx_L5_argtuple_error;
18324       }
18325     }
18326     __pyx_v_prefix = values[0];
18327   }
18328   goto __pyx_L4_argument_unpacking_done;
18329   __pyx_L5_argtuple_error:;
18330   __Pyx_RaiseArgtupleInvalid("print_info", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1313, __pyx_L3_error)
18331   __pyx_L3_error:;
18332   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.print_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
18333   __Pyx_RefNannyFinishContext();
18334   return NULL;
18335   __pyx_L4_argument_unpacking_done:;
18336   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_50print_info(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), __pyx_v_prefix);
18337 
18338   /* function exit code */
18339   __Pyx_RefNannyFinishContext();
18340   return __pyx_r;
18341 }
18342 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_50print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,PyObject * __pyx_v_prefix)18343 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_50print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, PyObject *__pyx_v_prefix) {
18344   PyObject *__pyx_r = NULL;
18345   __Pyx_RefNannyDeclarations
18346   PyObject *__pyx_t_1 = NULL;
18347   PyObject *__pyx_t_2 = NULL;
18348   PyObject *__pyx_t_3 = NULL;
18349   PyObject *__pyx_t_4 = NULL;
18350   PyObject *__pyx_t_5 = NULL;
18351   PyObject *__pyx_t_6 = NULL;
18352   int __pyx_t_7;
18353   PyObject *__pyx_t_8 = NULL;
18354   __Pyx_RefNannySetupContext("print_info", 0);
18355 
18356   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1314
18357  *
18358  *     def print_info(self, prefix=''):
18359  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,             # <<<<<<<<<<<<<<
18360  *                                                                      self._count_coarse(),
18361  *                                                                      self._count_refined(),
18362  */
18363   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_8d_coarse_8d_refined_8d_total, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
18364   __Pyx_GOTREF(__pyx_t_2);
18365 
18366   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1315
18367  *     def print_info(self, prefix=''):
18368  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,
18369  *                                                                      self._count_coarse(),             # <<<<<<<<<<<<<<
18370  *                                                                      self._count_refined(),
18371  *                                                                      self._count_total()))
18372  */
18373   __pyx_t_3 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_count_coarse(__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1315, __pyx_L1_error)
18374   __Pyx_GOTREF(__pyx_t_3);
18375 
18376   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1316
18377  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,
18378  *                                                                      self._count_coarse(),
18379  *                                                                      self._count_refined(),             # <<<<<<<<<<<<<<
18380  *                                                                      self._count_total()))
18381  *
18382  */
18383   __pyx_t_4 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_count_refined(__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L1_error)
18384   __Pyx_GOTREF(__pyx_t_4);
18385 
18386   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1317
18387  *                                                                      self._count_coarse(),
18388  *                                                                      self._count_refined(),
18389  *                                                                      self._count_total()))             # <<<<<<<<<<<<<<
18390  *
18391  * cdef class BoolArrayCollectionUncompressed:
18392  */
18393   __pyx_t_5 = __Pyx_PyInt_From_npy_uint64(((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self->__pyx_vtab)->_count_total(__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1317, __pyx_L1_error)
18394   __Pyx_GOTREF(__pyx_t_5);
18395   __pyx_t_6 = NULL;
18396   __pyx_t_7 = 0;
18397   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18398     __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
18399     if (likely(__pyx_t_6)) {
18400       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18401       __Pyx_INCREF(__pyx_t_6);
18402       __Pyx_INCREF(function);
18403       __Pyx_DECREF_SET(__pyx_t_2, function);
18404       __pyx_t_7 = 1;
18405     }
18406   }
18407   #if CYTHON_FAST_PYCALL
18408   if (PyFunction_Check(__pyx_t_2)) {
18409     PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_prefix, __pyx_t_3, __pyx_t_4, __pyx_t_5};
18410     __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
18411     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18412     __Pyx_GOTREF(__pyx_t_1);
18413     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18414     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18415     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18416   } else
18417   #endif
18418   #if CYTHON_FAST_PYCCALL
18419   if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18420     PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_prefix, __pyx_t_3, __pyx_t_4, __pyx_t_5};
18421     __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
18422     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18423     __Pyx_GOTREF(__pyx_t_1);
18424     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18425     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18426     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18427   } else
18428   #endif
18429   {
18430     __pyx_t_8 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1314, __pyx_L1_error)
18431     __Pyx_GOTREF(__pyx_t_8);
18432     if (__pyx_t_6) {
18433       __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
18434     }
18435     __Pyx_INCREF(__pyx_v_prefix);
18436     __Pyx_GIVEREF(__pyx_v_prefix);
18437     PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_prefix);
18438     __Pyx_GIVEREF(__pyx_t_3);
18439     PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
18440     __Pyx_GIVEREF(__pyx_t_4);
18441     PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_4);
18442     __Pyx_GIVEREF(__pyx_t_5);
18443     PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_5);
18444     __pyx_t_3 = 0;
18445     __pyx_t_4 = 0;
18446     __pyx_t_5 = 0;
18447     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
18448     __Pyx_GOTREF(__pyx_t_1);
18449     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18450   }
18451   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18452   if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
18453   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18454 
18455   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1313
18456  *         del ewah_coll
18457  *
18458  *     def print_info(self, prefix=''):             # <<<<<<<<<<<<<<
18459  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,
18460  *                                                                      self._count_coarse(),
18461  */
18462 
18463   /* function exit code */
18464   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18465   goto __pyx_L0;
18466   __pyx_L1_error:;
18467   __Pyx_XDECREF(__pyx_t_1);
18468   __Pyx_XDECREF(__pyx_t_2);
18469   __Pyx_XDECREF(__pyx_t_3);
18470   __Pyx_XDECREF(__pyx_t_4);
18471   __Pyx_XDECREF(__pyx_t_5);
18472   __Pyx_XDECREF(__pyx_t_6);
18473   __Pyx_XDECREF(__pyx_t_8);
18474   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.print_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
18475   __pyx_r = NULL;
18476   __pyx_L0:;
18477   __Pyx_XGIVEREF(__pyx_r);
18478   __Pyx_RefNannyFinishContext();
18479   return __pyx_r;
18480 }
18481 
18482 /* "(tree fragment)":1
18483  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
18484  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
18485  * def __setstate_cython__(self, __pyx_state):
18486  */
18487 
18488 /* Python wrapper */
18489 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_53__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_53__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)18490 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_53__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
18491   PyObject *__pyx_r = 0;
18492   __Pyx_RefNannyDeclarations
18493   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
18494   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_52__reduce_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self));
18495 
18496   /* function exit code */
18497   __Pyx_RefNannyFinishContext();
18498   return __pyx_r;
18499 }
18500 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_52__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self)18501 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_52__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self) {
18502   PyObject *__pyx_r = NULL;
18503   __Pyx_RefNannyDeclarations
18504   PyObject *__pyx_t_1 = NULL;
18505   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
18506 
18507   /* "(tree fragment)":2
18508  * def __reduce_cython__(self):
18509  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
18510  * def __setstate_cython__(self, __pyx_state):
18511  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
18512  */
18513   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
18514   __Pyx_GOTREF(__pyx_t_1);
18515   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
18516   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18517   __PYX_ERR(1, 2, __pyx_L1_error)
18518 
18519   /* "(tree fragment)":1
18520  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
18521  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
18522  * def __setstate_cython__(self, __pyx_state):
18523  */
18524 
18525   /* function exit code */
18526   __pyx_L1_error:;
18527   __Pyx_XDECREF(__pyx_t_1);
18528   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
18529   __pyx_r = NULL;
18530   __Pyx_XGIVEREF(__pyx_r);
18531   __Pyx_RefNannyFinishContext();
18532   return __pyx_r;
18533 }
18534 
18535 /* "(tree fragment)":3
18536  * def __reduce_cython__(self):
18537  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
18538  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
18539  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
18540  */
18541 
18542 /* Python wrapper */
18543 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_55__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_55__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)18544 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_55__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
18545   PyObject *__pyx_r = 0;
18546   __Pyx_RefNannyDeclarations
18547   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
18548   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_54__setstate_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
18549 
18550   /* function exit code */
18551   __Pyx_RefNannyFinishContext();
18552   return __pyx_r;
18553 }
18554 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_54__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)18555 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_54__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
18556   PyObject *__pyx_r = NULL;
18557   __Pyx_RefNannyDeclarations
18558   PyObject *__pyx_t_1 = NULL;
18559   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
18560 
18561   /* "(tree fragment)":4
18562  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
18563  * def __setstate_cython__(self, __pyx_state):
18564  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
18565  */
18566   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
18567   __Pyx_GOTREF(__pyx_t_1);
18568   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
18569   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18570   __PYX_ERR(1, 4, __pyx_L1_error)
18571 
18572   /* "(tree fragment)":3
18573  * def __reduce_cython__(self):
18574  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
18575  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
18576  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
18577  */
18578 
18579   /* function exit code */
18580   __pyx_L1_error:;
18581   __Pyx_XDECREF(__pyx_t_1);
18582   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
18583   __pyx_r = NULL;
18584   __Pyx_XGIVEREF(__pyx_r);
18585   __Pyx_RefNannyFinishContext();
18586   return __pyx_r;
18587 }
18588 
18589 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1321
18590  * cdef class BoolArrayCollectionUncompressed:
18591  *
18592  *     def __cinit__(self, np.uint64_t nele1, np.uint64_t nele2):             # <<<<<<<<<<<<<<
18593  *         self.nele1 = <int>nele1
18594  *         self.nele2 = <int>nele2
18595  */
18596 
18597 /* Python wrapper */
18598 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_1__cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)18599 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18600   __pyx_t_5numpy_uint64_t __pyx_v_nele1;
18601   __pyx_t_5numpy_uint64_t __pyx_v_nele2;
18602   int __pyx_r;
18603   __Pyx_RefNannyDeclarations
18604   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
18605   {
18606     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nele1,&__pyx_n_s_nele2,0};
18607     PyObject* values[2] = {0,0};
18608     if (unlikely(__pyx_kwds)) {
18609       Py_ssize_t kw_args;
18610       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18611       switch (pos_args) {
18612         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18613         CYTHON_FALLTHROUGH;
18614         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18615         CYTHON_FALLTHROUGH;
18616         case  0: break;
18617         default: goto __pyx_L5_argtuple_error;
18618       }
18619       kw_args = PyDict_Size(__pyx_kwds);
18620       switch (pos_args) {
18621         case  0:
18622         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nele1)) != 0)) kw_args--;
18623         else goto __pyx_L5_argtuple_error;
18624         CYTHON_FALLTHROUGH;
18625         case  1:
18626         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nele2)) != 0)) kw_args--;
18627         else {
18628           __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 1321, __pyx_L3_error)
18629         }
18630       }
18631       if (unlikely(kw_args > 0)) {
18632         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1321, __pyx_L3_error)
18633       }
18634     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18635       goto __pyx_L5_argtuple_error;
18636     } else {
18637       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18638       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18639     }
18640     __pyx_v_nele1 = __Pyx_PyInt_As_npy_uint64(values[0]); if (unlikely((__pyx_v_nele1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1321, __pyx_L3_error)
18641     __pyx_v_nele2 = __Pyx_PyInt_As_npy_uint64(values[1]); if (unlikely((__pyx_v_nele2 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1321, __pyx_L3_error)
18642   }
18643   goto __pyx_L4_argument_unpacking_done;
18644   __pyx_L5_argtuple_error:;
18645   __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1321, __pyx_L3_error)
18646   __pyx_L3_error:;
18647   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollectionUncompressed.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
18648   __Pyx_RefNannyFinishContext();
18649   return -1;
18650   __pyx_L4_argument_unpacking_done:;
18651   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_self), __pyx_v_nele1, __pyx_v_nele2);
18652 
18653   /* function exit code */
18654   __Pyx_RefNannyFinishContext();
18655   return __pyx_r;
18656 }
18657 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_nele1,__pyx_t_5numpy_uint64_t __pyx_v_nele2)18658 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_nele1, __pyx_t_5numpy_uint64_t __pyx_v_nele2) {
18659   __pyx_t_5numpy_uint64_t __pyx_v_i;
18660   int __pyx_r;
18661   __Pyx_RefNannyDeclarations
18662   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_t_1;
18663   __pyx_t_5numpy_uint64_t __pyx_t_2;
18664   __pyx_t_5numpy_uint64_t __pyx_t_3;
18665   __pyx_t_5numpy_uint64_t __pyx_t_4;
18666   __Pyx_RefNannySetupContext("__cinit__", 0);
18667 
18668   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1322
18669  *
18670  *     def __cinit__(self, np.uint64_t nele1, np.uint64_t nele2):
18671  *         self.nele1 = <int>nele1             # <<<<<<<<<<<<<<
18672  *         self.nele2 = <int>nele2
18673  *         self.ewah_coll = new ewah_map()
18674  */
18675   __pyx_v_self->nele1 = ((int)__pyx_v_nele1);
18676 
18677   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1323
18678  *     def __cinit__(self, np.uint64_t nele1, np.uint64_t nele2):
18679  *         self.nele1 = <int>nele1
18680  *         self.nele2 = <int>nele2             # <<<<<<<<<<<<<<
18681  *         self.ewah_coll = new ewah_map()
18682  *         cdef np.uint64_t i
18683  */
18684   __pyx_v_self->nele2 = ((int)__pyx_v_nele2);
18685 
18686   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1324
18687  *         self.nele1 = <int>nele1
18688  *         self.nele2 = <int>nele2
18689  *         self.ewah_coll = new ewah_map()             # <<<<<<<<<<<<<<
18690  *         cdef np.uint64_t i
18691  *         self.ewah_keys = <bitarrtype *>malloc(sizeof(bitarrtype)*nele1)
18692  */
18693   try {
18694     __pyx_t_1 = new __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map();
18695   } catch(...) {
18696     __Pyx_CppExn2PyErr();
18697     __PYX_ERR(0, 1324, __pyx_L1_error)
18698   }
18699   __pyx_v_self->ewah_coll = __pyx_t_1;
18700 
18701   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1326
18702  *         self.ewah_coll = new ewah_map()
18703  *         cdef np.uint64_t i
18704  *         self.ewah_keys = <bitarrtype *>malloc(sizeof(bitarrtype)*nele1)             # <<<<<<<<<<<<<<
18705  *         self.ewah_refn = <bitarrtype *>malloc(sizeof(bitarrtype)*nele1)
18706  *         for i in range(nele1):
18707  */
18708   __pyx_v_self->ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)malloc(((sizeof(__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype)) * __pyx_v_nele1)));
18709 
18710   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1327
18711  *         cdef np.uint64_t i
18712  *         self.ewah_keys = <bitarrtype *>malloc(sizeof(bitarrtype)*nele1)
18713  *         self.ewah_refn = <bitarrtype *>malloc(sizeof(bitarrtype)*nele1)             # <<<<<<<<<<<<<<
18714  *         for i in range(nele1):
18715  *             self.ewah_keys[i] = 0
18716  */
18717   __pyx_v_self->ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)malloc(((sizeof(__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype)) * __pyx_v_nele1)));
18718 
18719   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1328
18720  *         self.ewah_keys = <bitarrtype *>malloc(sizeof(bitarrtype)*nele1)
18721  *         self.ewah_refn = <bitarrtype *>malloc(sizeof(bitarrtype)*nele1)
18722  *         for i in range(nele1):             # <<<<<<<<<<<<<<
18723  *             self.ewah_keys[i] = 0
18724  *             self.ewah_refn[i] = 0
18725  */
18726   __pyx_t_2 = __pyx_v_nele1;
18727   __pyx_t_3 = __pyx_t_2;
18728   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18729     __pyx_v_i = __pyx_t_4;
18730 
18731     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1329
18732  *         self.ewah_refn = <bitarrtype *>malloc(sizeof(bitarrtype)*nele1)
18733  *         for i in range(nele1):
18734  *             self.ewah_keys[i] = 0             # <<<<<<<<<<<<<<
18735  *             self.ewah_refn[i] = 0
18736  *
18737  */
18738     (__pyx_v_self->ewah_keys[__pyx_v_i]) = 0;
18739 
18740     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1330
18741  *         for i in range(nele1):
18742  *             self.ewah_keys[i] = 0
18743  *             self.ewah_refn[i] = 0             # <<<<<<<<<<<<<<
18744  *
18745  *     def reset(self):
18746  */
18747     (__pyx_v_self->ewah_refn[__pyx_v_i]) = 0;
18748   }
18749 
18750   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1321
18751  * cdef class BoolArrayCollectionUncompressed:
18752  *
18753  *     def __cinit__(self, np.uint64_t nele1, np.uint64_t nele2):             # <<<<<<<<<<<<<<
18754  *         self.nele1 = <int>nele1
18755  *         self.nele2 = <int>nele2
18756  */
18757 
18758   /* function exit code */
18759   __pyx_r = 0;
18760   goto __pyx_L0;
18761   __pyx_L1_error:;
18762   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollectionUncompressed.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
18763   __pyx_r = -1;
18764   __pyx_L0:;
18765   __Pyx_RefNannyFinishContext();
18766   return __pyx_r;
18767 }
18768 
18769 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1332
18770  *             self.ewah_refn[i] = 0
18771  *
18772  *     def reset(self):             # <<<<<<<<<<<<<<
18773  *         self.__dealloc__()
18774  *         self.__init__(self.nele1,self.nele2)
18775  */
18776 
18777 /* Python wrapper */
18778 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_3reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_3reset(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)18779 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_3reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
18780   PyObject *__pyx_r = 0;
18781   __Pyx_RefNannyDeclarations
18782   __Pyx_RefNannySetupContext("reset (wrapper)", 0);
18783   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_2reset(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_self));
18784 
18785   /* function exit code */
18786   __Pyx_RefNannyFinishContext();
18787   return __pyx_r;
18788 }
18789 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_2reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self)18790 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_2reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self) {
18791   PyObject *__pyx_r = NULL;
18792   __Pyx_RefNannyDeclarations
18793   PyObject *__pyx_t_1 = NULL;
18794   PyObject *__pyx_t_2 = NULL;
18795   PyObject *__pyx_t_3 = NULL;
18796   PyObject *__pyx_t_4 = NULL;
18797   PyObject *__pyx_t_5 = NULL;
18798   int __pyx_t_6;
18799   PyObject *__pyx_t_7 = NULL;
18800   __Pyx_RefNannySetupContext("reset", 0);
18801 
18802   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1333
18803  *
18804  *     def reset(self):
18805  *         self.__dealloc__()             # <<<<<<<<<<<<<<
18806  *         self.__init__(self.nele1,self.nele2)
18807  *
18808  */
18809   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dealloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error)
18810   __Pyx_GOTREF(__pyx_t_2);
18811   __pyx_t_3 = NULL;
18812   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18813     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18814     if (likely(__pyx_t_3)) {
18815       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18816       __Pyx_INCREF(__pyx_t_3);
18817       __Pyx_INCREF(function);
18818       __Pyx_DECREF_SET(__pyx_t_2, function);
18819     }
18820   }
18821   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
18822   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18823   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error)
18824   __Pyx_GOTREF(__pyx_t_1);
18825   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18826   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18827 
18828   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1334
18829  *     def reset(self):
18830  *         self.__dealloc__()
18831  *         self.__init__(self.nele1,self.nele2)             # <<<<<<<<<<<<<<
18832  *
18833  *     cdef void _compress(self, BoolArrayCollection solf):
18834  */
18835   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
18836   __Pyx_GOTREF(__pyx_t_2);
18837   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nele1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error)
18838   __Pyx_GOTREF(__pyx_t_3);
18839   __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->nele2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1334, __pyx_L1_error)
18840   __Pyx_GOTREF(__pyx_t_4);
18841   __pyx_t_5 = NULL;
18842   __pyx_t_6 = 0;
18843   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18844     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
18845     if (likely(__pyx_t_5)) {
18846       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18847       __Pyx_INCREF(__pyx_t_5);
18848       __Pyx_INCREF(function);
18849       __Pyx_DECREF_SET(__pyx_t_2, function);
18850       __pyx_t_6 = 1;
18851     }
18852   }
18853   #if CYTHON_FAST_PYCALL
18854   if (PyFunction_Check(__pyx_t_2)) {
18855     PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
18856     __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
18857     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18858     __Pyx_GOTREF(__pyx_t_1);
18859     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18860     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18861   } else
18862   #endif
18863   #if CYTHON_FAST_PYCCALL
18864   if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18865     PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
18866     __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
18867     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18868     __Pyx_GOTREF(__pyx_t_1);
18869     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18870     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18871   } else
18872   #endif
18873   {
18874     __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1334, __pyx_L1_error)
18875     __Pyx_GOTREF(__pyx_t_7);
18876     if (__pyx_t_5) {
18877       __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
18878     }
18879     __Pyx_GIVEREF(__pyx_t_3);
18880     PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
18881     __Pyx_GIVEREF(__pyx_t_4);
18882     PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
18883     __pyx_t_3 = 0;
18884     __pyx_t_4 = 0;
18885     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
18886     __Pyx_GOTREF(__pyx_t_1);
18887     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18888   }
18889   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18890   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18891 
18892   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1332
18893  *             self.ewah_refn[i] = 0
18894  *
18895  *     def reset(self):             # <<<<<<<<<<<<<<
18896  *         self.__dealloc__()
18897  *         self.__init__(self.nele1,self.nele2)
18898  */
18899 
18900   /* function exit code */
18901   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18902   goto __pyx_L0;
18903   __pyx_L1_error:;
18904   __Pyx_XDECREF(__pyx_t_1);
18905   __Pyx_XDECREF(__pyx_t_2);
18906   __Pyx_XDECREF(__pyx_t_3);
18907   __Pyx_XDECREF(__pyx_t_4);
18908   __Pyx_XDECREF(__pyx_t_5);
18909   __Pyx_XDECREF(__pyx_t_7);
18910   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollectionUncompressed.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
18911   __pyx_r = NULL;
18912   __pyx_L0:;
18913   __Pyx_XGIVEREF(__pyx_r);
18914   __Pyx_RefNannyFinishContext();
18915   return __pyx_r;
18916 }
18917 
18918 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1336
18919  *         self.__init__(self.nele1,self.nele2)
18920  *
18921  *     cdef void _compress(self, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
18922  *         cdef np.uint64_t i
18923  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> solf.ewah_keys
18924  */
18925 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__compress(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_solf)18926 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__compress(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_solf) {
18927   __pyx_t_5numpy_uint64_t __pyx_v_i;
18928   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_keys;
18929   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_ewah_refn;
18930   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_bool_keys;
18931   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_bool_refn;
18932   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll1;
18933   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll2;
18934   __Pyx_RefNannyDeclarations
18935   int __pyx_t_1;
18936   int __pyx_t_2;
18937   __pyx_t_5numpy_uint64_t __pyx_t_3;
18938   int __pyx_t_4;
18939   __Pyx_RefNannySetupContext("_compress", 0);
18940 
18941   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1338
18942  *     cdef void _compress(self, BoolArrayCollection solf):
18943  *         cdef np.uint64_t i
18944  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> solf.ewah_keys             # <<<<<<<<<<<<<<
18945  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> solf.ewah_refn
18946  *         cdef bitarrtype *bool_keys = <bitarrtype *> self.ewah_keys
18947  */
18948   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_keys);
18949 
18950   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1339
18951  *         cdef np.uint64_t i
18952  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> solf.ewah_keys
18953  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> solf.ewah_refn             # <<<<<<<<<<<<<<
18954  *         cdef bitarrtype *bool_keys = <bitarrtype *> self.ewah_keys
18955  *         cdef bitarrtype *bool_refn = <bitarrtype *> self.ewah_refn
18956  */
18957   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *)__pyx_v_solf->ewah_refn);
18958 
18959   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1340
18960  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> solf.ewah_keys
18961  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> solf.ewah_refn
18962  *         cdef bitarrtype *bool_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
18963  *         cdef bitarrtype *bool_refn = <bitarrtype *> self.ewah_refn
18964  *         for i in range(self.nele1):
18965  */
18966   __pyx_v_bool_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
18967 
18968   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1341
18969  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> solf.ewah_refn
18970  *         cdef bitarrtype *bool_keys = <bitarrtype *> self.ewah_keys
18971  *         cdef bitarrtype *bool_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
18972  *         for i in range(self.nele1):
18973  *             if bool_keys[i] == 1:
18974  */
18975   __pyx_v_bool_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
18976 
18977   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1342
18978  *         cdef bitarrtype *bool_keys = <bitarrtype *> self.ewah_keys
18979  *         cdef bitarrtype *bool_refn = <bitarrtype *> self.ewah_refn
18980  *         for i in range(self.nele1):             # <<<<<<<<<<<<<<
18981  *             if bool_keys[i] == 1:
18982  *                 ewah_keys[0].set(i)
18983  */
18984   __pyx_t_1 = __pyx_v_self->nele1;
18985   __pyx_t_2 = __pyx_t_1;
18986   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
18987     __pyx_v_i = __pyx_t_3;
18988 
18989     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1343
18990  *         cdef bitarrtype *bool_refn = <bitarrtype *> self.ewah_refn
18991  *         for i in range(self.nele1):
18992  *             if bool_keys[i] == 1:             # <<<<<<<<<<<<<<
18993  *                 ewah_keys[0].set(i)
18994  *             if bool_refn[i] == 1:
18995  */
18996     __pyx_t_4 = (((__pyx_v_bool_keys[__pyx_v_i]) == 1) != 0);
18997     if (__pyx_t_4) {
18998 
18999       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1344
19000  *         for i in range(self.nele1):
19001  *             if bool_keys[i] == 1:
19002  *                 ewah_keys[0].set(i)             # <<<<<<<<<<<<<<
19003  *             if bool_refn[i] == 1:
19004  *                 ewah_refn[0].set(i)
19005  */
19006       (void)((__pyx_v_ewah_keys[0]).set(__pyx_v_i));
19007 
19008       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1343
19009  *         cdef bitarrtype *bool_refn = <bitarrtype *> self.ewah_refn
19010  *         for i in range(self.nele1):
19011  *             if bool_keys[i] == 1:             # <<<<<<<<<<<<<<
19012  *                 ewah_keys[0].set(i)
19013  *             if bool_refn[i] == 1:
19014  */
19015     }
19016 
19017     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1345
19018  *             if bool_keys[i] == 1:
19019  *                 ewah_keys[0].set(i)
19020  *             if bool_refn[i] == 1:             # <<<<<<<<<<<<<<
19021  *                 ewah_refn[0].set(i)
19022  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
19023  */
19024     __pyx_t_4 = (((__pyx_v_bool_refn[__pyx_v_i]) == 1) != 0);
19025     if (__pyx_t_4) {
19026 
19027       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1346
19028  *                 ewah_keys[0].set(i)
19029  *             if bool_refn[i] == 1:
19030  *                 ewah_refn[0].set(i)             # <<<<<<<<<<<<<<
19031  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
19032  *         cdef ewah_map *ewah_coll2 = <ewah_map *> solf.ewah_coll
19033  */
19034       (void)((__pyx_v_ewah_refn[0]).set(__pyx_v_i));
19035 
19036       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1345
19037  *             if bool_keys[i] == 1:
19038  *                 ewah_keys[0].set(i)
19039  *             if bool_refn[i] == 1:             # <<<<<<<<<<<<<<
19040  *                 ewah_refn[0].set(i)
19041  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
19042  */
19043     }
19044   }
19045 
19046   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1347
19047  *             if bool_refn[i] == 1:
19048  *                 ewah_refn[0].set(i)
19049  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
19050  *         cdef ewah_map *ewah_coll2 = <ewah_map *> solf.ewah_coll
19051  *         ewah_coll2[0] = ewah_coll1[0]
19052  */
19053   __pyx_v_ewah_coll1 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
19054 
19055   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1348
19056  *                 ewah_refn[0].set(i)
19057  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
19058  *         cdef ewah_map *ewah_coll2 = <ewah_map *> solf.ewah_coll             # <<<<<<<<<<<<<<
19059  *         ewah_coll2[0] = ewah_coll1[0]
19060  *
19061  */
19062   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_solf->ewah_coll);
19063 
19064   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1349
19065  *         cdef ewah_map *ewah_coll1 = <ewah_map *> self.ewah_coll
19066  *         cdef ewah_map *ewah_coll2 = <ewah_map *> solf.ewah_coll
19067  *         ewah_coll2[0] = ewah_coll1[0]             # <<<<<<<<<<<<<<
19068  *
19069  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
19070  */
19071   (__pyx_v_ewah_coll2[0]) = (__pyx_v_ewah_coll1[0]);
19072 
19073   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1336
19074  *         self.__init__(self.nele1,self.nele2)
19075  *
19076  *     cdef void _compress(self, BoolArrayCollection solf):             # <<<<<<<<<<<<<<
19077  *         cdef np.uint64_t i
19078  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> solf.ewah_keys
19079  */
19080 
19081   /* function exit code */
19082   __Pyx_RefNannyFinishContext();
19083 }
19084 
19085 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1351
19086  *         ewah_coll2[0] = ewah_coll1[0]
19087  *
19088  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
19089  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19090  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19091  */
19092 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set * __pyx_optional_args)19093 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set *__pyx_optional_args) {
19094   __pyx_t_5numpy_uint64_t __pyx_v_i2 = __pyx_k__14;
19095   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys;
19096   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
19097   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
19098   __Pyx_RefNannyDeclarations
19099   int __pyx_t_1;
19100   __Pyx_RefNannySetupContext("_set", 0);
19101   if (__pyx_optional_args) {
19102     if (__pyx_optional_args->__pyx_n > 0) {
19103       __pyx_v_i2 = __pyx_optional_args->i2;
19104     }
19105   }
19106 
19107   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1352
19108  *
19109  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
19110  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
19111  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19112  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19113  */
19114   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
19115 
19116   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1353
19117  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
19118  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19119  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
19120  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19121  *         ewah_keys[i1] = 1
19122  */
19123   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
19124 
19125   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1354
19126  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19127  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19128  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
19129  *         ewah_keys[i1] = 1
19130  *         # Note the 0 here, for dereferencing
19131  */
19132   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
19133 
19134   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1355
19135  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19136  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19137  *         ewah_keys[i1] = 1             # <<<<<<<<<<<<<<
19138  *         # Note the 0 here, for dereferencing
19139  *         if i2 != FLAG:
19140  */
19141   (__pyx_v_ewah_keys[__pyx_v_i1]) = 1;
19142 
19143   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1357
19144  *         ewah_keys[i1] = 1
19145  *         # Note the 0 here, for dereferencing
19146  *         if i2 != FLAG:             # <<<<<<<<<<<<<<
19147  *             ewah_refn[i1] = 1
19148  *             ewah_coll[0][i1].set(i2)
19149  */
19150   __pyx_t_1 = ((__pyx_v_i2 != __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG) != 0);
19151   if (__pyx_t_1) {
19152 
19153     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1358
19154  *         # Note the 0 here, for dereferencing
19155  *         if i2 != FLAG:
19156  *             ewah_refn[i1] = 1             # <<<<<<<<<<<<<<
19157  *             ewah_coll[0][i1].set(i2)
19158  *
19159  */
19160     (__pyx_v_ewah_refn[__pyx_v_i1]) = 1;
19161 
19162     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1359
19163  *         if i2 != FLAG:
19164  *             ewah_refn[i1] = 1
19165  *             ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
19166  *
19167  *     cdef void _set_coarse(self, np.uint64_t i1):
19168  */
19169     (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
19170 
19171     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1357
19172  *         ewah_keys[i1] = 1
19173  *         # Note the 0 here, for dereferencing
19174  *         if i2 != FLAG:             # <<<<<<<<<<<<<<
19175  *             ewah_refn[i1] = 1
19176  *             ewah_coll[0][i1].set(i2)
19177  */
19178   }
19179 
19180   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1351
19181  *         ewah_coll2[0] = ewah_coll1[0]
19182  *
19183  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
19184  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19185  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19186  */
19187 
19188   /* function exit code */
19189   __Pyx_RefNannyFinishContext();
19190 }
19191 
19192 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1361
19193  *             ewah_coll[0][i1].set(i2)
19194  *
19195  *     cdef void _set_coarse(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
19196  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19197  *         ewah_keys[i1] = 1
19198  */
19199 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1)19200 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
19201   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys;
19202   __Pyx_RefNannyDeclarations
19203   __Pyx_RefNannySetupContext("_set_coarse", 0);
19204 
19205   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1362
19206  *
19207  *     cdef void _set_coarse(self, np.uint64_t i1):
19208  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
19209  *         ewah_keys[i1] = 1
19210  *
19211  */
19212   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
19213 
19214   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1363
19215  *     cdef void _set_coarse(self, np.uint64_t i1):
19216  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19217  *         ewah_keys[i1] = 1             # <<<<<<<<<<<<<<
19218  *
19219  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):
19220  */
19221   (__pyx_v_ewah_keys[__pyx_v_i1]) = 1;
19222 
19223   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1361
19224  *             ewah_coll[0][i1].set(i2)
19225  *
19226  *     cdef void _set_coarse(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
19227  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19228  *         ewah_keys[i1] = 1
19229  */
19230 
19231   /* function exit code */
19232   __Pyx_RefNannyFinishContext();
19233 }
19234 
19235 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1365
19236  *         ewah_keys[i1] = 1
19237  *
19238  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
19239  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19240  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19241  */
19242 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,__pyx_t_5numpy_uint64_t __pyx_v_i2)19243 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2) {
19244   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
19245   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
19246   __Pyx_RefNannyDeclarations
19247   __Pyx_RefNannySetupContext("_set_refined", 0);
19248 
19249   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1366
19250  *
19251  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):
19252  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
19253  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19254  *         # Note the 0 here, for dereferencing
19255  */
19256   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
19257 
19258   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1367
19259  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):
19260  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19261  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
19262  *         # Note the 0 here, for dereferencing
19263  *         ewah_refn[i1] = 1
19264  */
19265   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
19266 
19267   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1369
19268  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19269  *         # Note the 0 here, for dereferencing
19270  *         ewah_refn[i1] = 1             # <<<<<<<<<<<<<<
19271  *         ewah_coll[0][i1].set(i2)
19272  *
19273  */
19274   (__pyx_v_ewah_refn[__pyx_v_i1]) = 1;
19275 
19276   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1370
19277  *         # Note the 0 here, for dereferencing
19278  *         ewah_refn[i1] = 1
19279  *         ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
19280  *
19281  *     @cython.boundscheck(False)
19282  */
19283   (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
19284 
19285   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1365
19286  *         ewah_keys[i1] = 1
19287  *
19288  *     cdef void _set_refined(self, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
19289  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19290  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19291  */
19292 
19293   /* function exit code */
19294   __Pyx_RefNannyFinishContext();
19295 }
19296 
19297 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1376
19298  *     @cython.cdivision(True)
19299  *     @cython.initializedcheck(False)
19300  *     cdef void _set_coarse_array(self, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
19301  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19302  *         cdef np.uint64_t i1
19303  */
19304 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__Pyx_memviewslice __pyx_v_arr)19305 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __Pyx_memviewslice __pyx_v_arr) {
19306   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys;
19307   __pyx_t_5numpy_uint64_t __pyx_v_i1;
19308   __Pyx_RefNannyDeclarations
19309   Py_ssize_t __pyx_t_1;
19310   Py_ssize_t __pyx_t_2;
19311   __pyx_t_5numpy_uint64_t __pyx_t_3;
19312   __pyx_t_5numpy_uint64_t __pyx_t_4;
19313   int __pyx_t_5;
19314   __Pyx_RefNannySetupContext("_set_coarse_array", 0);
19315 
19316   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1377
19317  *     @cython.initializedcheck(False)
19318  *     cdef void _set_coarse_array(self, np.uint8_t[:] arr):
19319  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
19320  *         cdef np.uint64_t i1
19321  *         for i1 in range(arr.shape[0]):
19322  */
19323   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
19324 
19325   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1379
19326  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19327  *         cdef np.uint64_t i1
19328  *         for i1 in range(arr.shape[0]):             # <<<<<<<<<<<<<<
19329  *             if arr[i1] == 1:
19330  *                 ewah_keys[i1] = 1
19331  */
19332   __pyx_t_1 = (__pyx_v_arr.shape[0]);
19333   __pyx_t_2 = __pyx_t_1;
19334   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
19335     __pyx_v_i1 = __pyx_t_3;
19336 
19337     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1380
19338  *         cdef np.uint64_t i1
19339  *         for i1 in range(arr.shape[0]):
19340  *             if arr[i1] == 1:             # <<<<<<<<<<<<<<
19341  *                 ewah_keys[i1] = 1
19342  *
19343  */
19344     __pyx_t_4 = __pyx_v_i1;
19345     __pyx_t_5 = (((*((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_arr.data + __pyx_t_4 * __pyx_v_arr.strides[0]) ))) == 1) != 0);
19346     if (__pyx_t_5) {
19347 
19348       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1381
19349  *         for i1 in range(arr.shape[0]):
19350  *             if arr[i1] == 1:
19351  *                 ewah_keys[i1] = 1             # <<<<<<<<<<<<<<
19352  *
19353  *     @cython.boundscheck(False)
19354  */
19355       (__pyx_v_ewah_keys[__pyx_v_i1]) = 1;
19356 
19357       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1380
19358  *         cdef np.uint64_t i1
19359  *         for i1 in range(arr.shape[0]):
19360  *             if arr[i1] == 1:             # <<<<<<<<<<<<<<
19361  *                 ewah_keys[i1] = 1
19362  *
19363  */
19364     }
19365   }
19366 
19367   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1376
19368  *     @cython.cdivision(True)
19369  *     @cython.initializedcheck(False)
19370  *     cdef void _set_coarse_array(self, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
19371  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19372  *         cdef np.uint64_t i1
19373  */
19374 
19375   /* function exit code */
19376   __Pyx_RefNannyFinishContext();
19377 }
19378 
19379 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1387
19380  *     @cython.cdivision(True)
19381  *     @cython.initializedcheck(False)
19382  *     cdef void _set_coarse_array_ptr(self, np.uint8_t *arr):             # <<<<<<<<<<<<<<
19383  *         # TODO: memcpy?
19384  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19385  */
19386 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse_array_ptr(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint8_t * __pyx_v_arr)19387 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse_array_ptr(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint8_t *__pyx_v_arr) {
19388   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys;
19389   __pyx_t_5numpy_uint64_t __pyx_v_i1;
19390   __Pyx_RefNannyDeclarations
19391   int __pyx_t_1;
19392   int __pyx_t_2;
19393   __pyx_t_5numpy_uint64_t __pyx_t_3;
19394   int __pyx_t_4;
19395   __Pyx_RefNannySetupContext("_set_coarse_array_ptr", 0);
19396 
19397   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1389
19398  *     cdef void _set_coarse_array_ptr(self, np.uint8_t *arr):
19399  *         # TODO: memcpy?
19400  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
19401  *         cdef np.uint64_t i1
19402  *         for i1 in range(self.nele1):
19403  */
19404   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
19405 
19406   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1391
19407  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19408  *         cdef np.uint64_t i1
19409  *         for i1 in range(self.nele1):             # <<<<<<<<<<<<<<
19410  *             if arr[i1] == 1:
19411  *                 ewah_keys[i1] = 1
19412  */
19413   __pyx_t_1 = __pyx_v_self->nele1;
19414   __pyx_t_2 = __pyx_t_1;
19415   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
19416     __pyx_v_i1 = __pyx_t_3;
19417 
19418     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1392
19419  *         cdef np.uint64_t i1
19420  *         for i1 in range(self.nele1):
19421  *             if arr[i1] == 1:             # <<<<<<<<<<<<<<
19422  *                 ewah_keys[i1] = 1
19423  *
19424  */
19425     __pyx_t_4 = (((__pyx_v_arr[__pyx_v_i1]) == 1) != 0);
19426     if (__pyx_t_4) {
19427 
19428       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1393
19429  *         for i1 in range(self.nele1):
19430  *             if arr[i1] == 1:
19431  *                 ewah_keys[i1] = 1             # <<<<<<<<<<<<<<
19432  *
19433  *     @cython.boundscheck(False)
19434  */
19435       (__pyx_v_ewah_keys[__pyx_v_i1]) = 1;
19436 
19437       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1392
19438  *         cdef np.uint64_t i1
19439  *         for i1 in range(self.nele1):
19440  *             if arr[i1] == 1:             # <<<<<<<<<<<<<<
19441  *                 ewah_keys[i1] = 1
19442  *
19443  */
19444     }
19445   }
19446 
19447   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1387
19448  *     @cython.cdivision(True)
19449  *     @cython.initializedcheck(False)
19450  *     cdef void _set_coarse_array_ptr(self, np.uint8_t *arr):             # <<<<<<<<<<<<<<
19451  *         # TODO: memcpy?
19452  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19453  */
19454 
19455   /* function exit code */
19456   __Pyx_RefNannyFinishContext();
19457 }
19458 
19459 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1399
19460  *     @cython.cdivision(True)
19461  *     @cython.initializedcheck(False)
19462  *     cdef void _set_refined_array(self, np.uint64_t i1, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
19463  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19464  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19465  */
19466 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,__Pyx_memviewslice __pyx_v_arr)19467 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __Pyx_memviewslice __pyx_v_arr) {
19468   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
19469   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
19470   __pyx_t_5numpy_uint64_t __pyx_v_i2;
19471   __Pyx_RefNannyDeclarations
19472   Py_ssize_t __pyx_t_1;
19473   Py_ssize_t __pyx_t_2;
19474   __pyx_t_5numpy_uint64_t __pyx_t_3;
19475   __pyx_t_5numpy_uint64_t __pyx_t_4;
19476   int __pyx_t_5;
19477   __Pyx_RefNannySetupContext("_set_refined_array", 0);
19478 
19479   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1400
19480  *     @cython.initializedcheck(False)
19481  *     cdef void _set_refined_array(self, np.uint64_t i1, np.uint8_t[:] arr):
19482  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
19483  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19484  *         cdef np.uint64_t i2
19485  */
19486   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
19487 
19488   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1401
19489  *     cdef void _set_refined_array(self, np.uint64_t i1, np.uint8_t[:] arr):
19490  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19491  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
19492  *         cdef np.uint64_t i2
19493  *         for i2 in range(arr.shape[0]):
19494  */
19495   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
19496 
19497   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1403
19498  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19499  *         cdef np.uint64_t i2
19500  *         for i2 in range(arr.shape[0]):             # <<<<<<<<<<<<<<
19501  *             if arr[i2] == 1:
19502  *                 ewah_refn[i1] = 1
19503  */
19504   __pyx_t_1 = (__pyx_v_arr.shape[0]);
19505   __pyx_t_2 = __pyx_t_1;
19506   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
19507     __pyx_v_i2 = __pyx_t_3;
19508 
19509     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1404
19510  *         cdef np.uint64_t i2
19511  *         for i2 in range(arr.shape[0]):
19512  *             if arr[i2] == 1:             # <<<<<<<<<<<<<<
19513  *                 ewah_refn[i1] = 1
19514  *                 ewah_coll[0][i1].set(i2)
19515  */
19516     __pyx_t_4 = __pyx_v_i2;
19517     __pyx_t_5 = (((*((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_arr.data + __pyx_t_4 * __pyx_v_arr.strides[0]) ))) == 1) != 0);
19518     if (__pyx_t_5) {
19519 
19520       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1405
19521  *         for i2 in range(arr.shape[0]):
19522  *             if arr[i2] == 1:
19523  *                 ewah_refn[i1] = 1             # <<<<<<<<<<<<<<
19524  *                 ewah_coll[0][i1].set(i2)
19525  *
19526  */
19527       (__pyx_v_ewah_refn[__pyx_v_i1]) = 1;
19528 
19529       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1406
19530  *             if arr[i2] == 1:
19531  *                 ewah_refn[i1] = 1
19532  *                 ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
19533  *
19534  *     @cython.boundscheck(False)
19535  */
19536       (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
19537 
19538       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1404
19539  *         cdef np.uint64_t i2
19540  *         for i2 in range(arr.shape[0]):
19541  *             if arr[i2] == 1:             # <<<<<<<<<<<<<<
19542  *                 ewah_refn[i1] = 1
19543  *                 ewah_coll[0][i1].set(i2)
19544  */
19545     }
19546   }
19547 
19548   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1399
19549  *     @cython.cdivision(True)
19550  *     @cython.initializedcheck(False)
19551  *     cdef void _set_refined_array(self, np.uint64_t i1, np.uint8_t[:] arr):             # <<<<<<<<<<<<<<
19552  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19553  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19554  */
19555 
19556   /* function exit code */
19557   __Pyx_RefNannyFinishContext();
19558 }
19559 
19560 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1412
19561  *     @cython.cdivision(True)
19562  *     @cython.initializedcheck(False)
19563  *     cdef void _set_refined_array_ptr(self, np.uint64_t i1, np.uint8_t *arr):             # <<<<<<<<<<<<<<
19564  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19565  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19566  */
19567 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined_array_ptr(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,__pyx_t_5numpy_uint8_t * __pyx_v_arr)19568 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined_array_ptr(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint8_t *__pyx_v_arr) {
19569   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
19570   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
19571   __pyx_t_5numpy_uint64_t __pyx_v_i2;
19572   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array *__pyx_v_barr;
19573   __Pyx_RefNannyDeclarations
19574   int __pyx_t_1;
19575   int __pyx_t_2;
19576   __pyx_t_5numpy_uint64_t __pyx_t_3;
19577   int __pyx_t_4;
19578   __Pyx_RefNannySetupContext("_set_refined_array_ptr", 0);
19579 
19580   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1413
19581  *     @cython.initializedcheck(False)
19582  *     cdef void _set_refined_array_ptr(self, np.uint64_t i1, np.uint8_t *arr):
19583  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
19584  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19585  *         cdef np.uint64_t i2
19586  */
19587   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
19588 
19589   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1414
19590  *     cdef void _set_refined_array_ptr(self, np.uint64_t i1, np.uint8_t *arr):
19591  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19592  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
19593  *         cdef np.uint64_t i2
19594  *         cdef ewah_bool_array *barr = &ewah_coll[0][i1]
19595  */
19596   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
19597 
19598   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1416
19599  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19600  *         cdef np.uint64_t i2
19601  *         cdef ewah_bool_array *barr = &ewah_coll[0][i1]             # <<<<<<<<<<<<<<
19602  *         for i2 in range(self.nele2):
19603  *             if arr[i2] == 1:
19604  */
19605   __pyx_v_barr = (&((__pyx_v_ewah_coll[0])[__pyx_v_i1]));
19606 
19607   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1417
19608  *         cdef np.uint64_t i2
19609  *         cdef ewah_bool_array *barr = &ewah_coll[0][i1]
19610  *         for i2 in range(self.nele2):             # <<<<<<<<<<<<<<
19611  *             if arr[i2] == 1:
19612  *                 ewah_refn[i1] = 1
19613  */
19614   __pyx_t_1 = __pyx_v_self->nele2;
19615   __pyx_t_2 = __pyx_t_1;
19616   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
19617     __pyx_v_i2 = __pyx_t_3;
19618 
19619     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1418
19620  *         cdef ewah_bool_array *barr = &ewah_coll[0][i1]
19621  *         for i2 in range(self.nele2):
19622  *             if arr[i2] == 1:             # <<<<<<<<<<<<<<
19623  *                 ewah_refn[i1] = 1
19624  *                 barr.set(i2)
19625  */
19626     __pyx_t_4 = (((__pyx_v_arr[__pyx_v_i2]) == 1) != 0);
19627     if (__pyx_t_4) {
19628 
19629       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1419
19630  *         for i2 in range(self.nele2):
19631  *             if arr[i2] == 1:
19632  *                 ewah_refn[i1] = 1             # <<<<<<<<<<<<<<
19633  *                 barr.set(i2)
19634  *
19635  */
19636       (__pyx_v_ewah_refn[__pyx_v_i1]) = 1;
19637 
19638       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1420
19639  *             if arr[i2] == 1:
19640  *                 ewah_refn[i1] = 1
19641  *                 barr.set(i2)             # <<<<<<<<<<<<<<
19642  *
19643  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):
19644  */
19645       (void)(__pyx_v_barr->set(__pyx_v_i2));
19646 
19647       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1418
19648  *         cdef ewah_bool_array *barr = &ewah_coll[0][i1]
19649  *         for i2 in range(self.nele2):
19650  *             if arr[i2] == 1:             # <<<<<<<<<<<<<<
19651  *                 ewah_refn[i1] = 1
19652  *                 barr.set(i2)
19653  */
19654     }
19655   }
19656 
19657   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1412
19658  *     @cython.cdivision(True)
19659  *     @cython.initializedcheck(False)
19660  *     cdef void _set_refined_array_ptr(self, np.uint64_t i1, np.uint8_t *arr):             # <<<<<<<<<<<<<<
19661  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19662  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19663  */
19664 
19665   /* function exit code */
19666   __Pyx_RefNannyFinishContext();
19667 }
19668 
19669 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1422
19670  *                 barr.set(i2)
19671  *
19672  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
19673  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19674  *         ewah_coll[0][i1].set(i2)
19675  */
19676 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,__pyx_t_5numpy_uint64_t __pyx_v_i2)19677 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_map(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, __pyx_t_5numpy_uint64_t __pyx_v_i2) {
19678   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
19679   __Pyx_RefNannyDeclarations
19680   __Pyx_RefNannySetupContext("_set_map", 0);
19681 
19682   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1423
19683  *
19684  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):
19685  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
19686  *         ewah_coll[0][i1].set(i2)
19687  *
19688  */
19689   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
19690 
19691   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1424
19692  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):
19693  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19694  *         ewah_coll[0][i1].set(i2)             # <<<<<<<<<<<<<<
19695  *
19696  *     cdef void _set_refn(self, np.uint64_t i1):
19697  */
19698   (void)(((__pyx_v_ewah_coll[0])[__pyx_v_i1]).set(__pyx_v_i2));
19699 
19700   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1422
19701  *                 barr.set(i2)
19702  *
19703  *     cdef void _set_map(self, np.uint64_t i1, np.uint64_t i2):             # <<<<<<<<<<<<<<
19704  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19705  *         ewah_coll[0][i1].set(i2)
19706  */
19707 
19708   /* function exit code */
19709   __Pyx_RefNannyFinishContext();
19710 }
19711 
19712 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1426
19713  *         ewah_coll[0][i1].set(i2)
19714  *
19715  *     cdef void _set_refn(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
19716  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19717  *         ewah_refn[i1] = 1
19718  */
19719 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1)19720 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refn(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
19721   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
19722   __Pyx_RefNannyDeclarations
19723   __Pyx_RefNannySetupContext("_set_refn", 0);
19724 
19725   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1427
19726  *
19727  *     cdef void _set_refn(self, np.uint64_t i1):
19728  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
19729  *         ewah_refn[i1] = 1
19730  *
19731  */
19732   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
19733 
19734   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1428
19735  *     cdef void _set_refn(self, np.uint64_t i1):
19736  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19737  *         ewah_refn[i1] = 1             # <<<<<<<<<<<<<<
19738  *
19739  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
19740  */
19741   (__pyx_v_ewah_refn[__pyx_v_i1]) = 1;
19742 
19743   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1426
19744  *         ewah_coll[0][i1].set(i2)
19745  *
19746  *     cdef void _set_refn(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
19747  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19748  *         ewah_refn[i1] = 1
19749  */
19750 
19751   /* function exit code */
19752   __Pyx_RefNannyFinishContext();
19753 }
19754 
19755 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1430
19756  *         ewah_refn[i1] = 1
19757  *
19758  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
19759  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19760  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19761  */
19762 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1,struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get * __pyx_optional_args)19763 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get *__pyx_optional_args) {
19764   __pyx_t_5numpy_uint64_t __pyx_v_i2 = __pyx_k__15;
19765   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys;
19766   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
19767   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
19768   int __pyx_r;
19769   __Pyx_RefNannyDeclarations
19770   int __pyx_t_1;
19771   int __pyx_t_2;
19772   __Pyx_RefNannySetupContext("_get", 0);
19773   if (__pyx_optional_args) {
19774     if (__pyx_optional_args->__pyx_n > 0) {
19775       __pyx_v_i2 = __pyx_optional_args->i2;
19776     }
19777   }
19778 
19779   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1431
19780  *
19781  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
19782  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
19783  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19784  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19785  */
19786   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
19787 
19788   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1432
19789  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):
19790  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19791  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
19792  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19793  *         # Note the 0 here, for dereferencing
19794  */
19795   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
19796 
19797   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1433
19798  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19799  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19800  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
19801  *         # Note the 0 here, for dereferencing
19802  *         if ewah_keys[i1] == 0: return 0
19803  */
19804   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
19805 
19806   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1435
19807  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
19808  *         # Note the 0 here, for dereferencing
19809  *         if ewah_keys[i1] == 0: return 0             # <<<<<<<<<<<<<<
19810  *         if (ewah_refn[i1] == 0) or (i2 == FLAG):
19811  *             return 1
19812  */
19813   __pyx_t_1 = (((__pyx_v_ewah_keys[__pyx_v_i1]) == 0) != 0);
19814   if (__pyx_t_1) {
19815     __pyx_r = 0;
19816     goto __pyx_L0;
19817   }
19818 
19819   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1436
19820  *         # Note the 0 here, for dereferencing
19821  *         if ewah_keys[i1] == 0: return 0
19822  *         if (ewah_refn[i1] == 0) or (i2 == FLAG):             # <<<<<<<<<<<<<<
19823  *             return 1
19824  *         return ewah_coll[0][i1].get(i2)
19825  */
19826   __pyx_t_2 = (((__pyx_v_ewah_refn[__pyx_v_i1]) == 0) != 0);
19827   if (!__pyx_t_2) {
19828   } else {
19829     __pyx_t_1 = __pyx_t_2;
19830     goto __pyx_L5_bool_binop_done;
19831   }
19832   __pyx_t_2 = ((__pyx_v_i2 == __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG) != 0);
19833   __pyx_t_1 = __pyx_t_2;
19834   __pyx_L5_bool_binop_done:;
19835   if (__pyx_t_1) {
19836 
19837     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1437
19838  *         if ewah_keys[i1] == 0: return 0
19839  *         if (ewah_refn[i1] == 0) or (i2 == FLAG):
19840  *             return 1             # <<<<<<<<<<<<<<
19841  *         return ewah_coll[0][i1].get(i2)
19842  *
19843  */
19844     __pyx_r = 1;
19845     goto __pyx_L0;
19846 
19847     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1436
19848  *         # Note the 0 here, for dereferencing
19849  *         if ewah_keys[i1] == 0: return 0
19850  *         if (ewah_refn[i1] == 0) or (i2 == FLAG):             # <<<<<<<<<<<<<<
19851  *             return 1
19852  *         return ewah_coll[0][i1].get(i2)
19853  */
19854   }
19855 
19856   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1438
19857  *         if (ewah_refn[i1] == 0) or (i2 == FLAG):
19858  *             return 1
19859  *         return ewah_coll[0][i1].get(i2)             # <<<<<<<<<<<<<<
19860  *
19861  *     cdef bint _get_coarse(self, np.uint64_t i1):
19862  */
19863   __pyx_r = ((__pyx_v_ewah_coll[0])[__pyx_v_i1]).get(__pyx_v_i2);
19864   goto __pyx_L0;
19865 
19866   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1430
19867  *         ewah_refn[i1] = 1
19868  *
19869  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
19870  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19871  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19872  */
19873 
19874   /* function exit code */
19875   __pyx_L0:;
19876   __Pyx_RefNannyFinishContext();
19877   return __pyx_r;
19878 }
19879 
19880 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1440
19881  *         return ewah_coll[0][i1].get(i2)
19882  *
19883  *     cdef bint _get_coarse(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
19884  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19885  *         return <bint>ewah_keys[i1]
19886  */
19887 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i1)19888 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get_coarse(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i1) {
19889   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys;
19890   int __pyx_r;
19891   __Pyx_RefNannyDeclarations
19892   __Pyx_RefNannySetupContext("_get_coarse", 0);
19893 
19894   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1441
19895  *
19896  *     cdef bint _get_coarse(self, np.uint64_t i1):
19897  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
19898  *         return <bint>ewah_keys[i1]
19899  *         # if (ewah_keys[i1] == 0): return 0
19900  */
19901   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
19902 
19903   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1442
19904  *     cdef bint _get_coarse(self, np.uint64_t i1):
19905  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19906  *         return <bint>ewah_keys[i1]             # <<<<<<<<<<<<<<
19907  *         # if (ewah_keys[i1] == 0): return 0
19908  *         # return 1
19909  */
19910   __pyx_r = ((__pyx_v_ewah_keys[__pyx_v_i1]) != 0);
19911   goto __pyx_L0;
19912 
19913   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1440
19914  *         return ewah_coll[0][i1].get(i2)
19915  *
19916  *     cdef bint _get_coarse(self, np.uint64_t i1):             # <<<<<<<<<<<<<<
19917  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19918  *         return <bint>ewah_keys[i1]
19919  */
19920 
19921   /* function exit code */
19922   __pyx_L0:;
19923   __Pyx_RefNannyFinishContext();
19924   return __pyx_r;
19925 }
19926 
19927 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1446
19928  *         # return 1
19929  *
19930  *     cdef bint _isref(self, np.uint64_t i):             # <<<<<<<<<<<<<<
19931  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19932  *         return <bint>ewah_refn[i]
19933  */
19934 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_i)19935 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__isref(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_i) {
19936   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
19937   int __pyx_r;
19938   __Pyx_RefNannyDeclarations
19939   __Pyx_RefNannySetupContext("_isref", 0);
19940 
19941   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1447
19942  *
19943  *     cdef bint _isref(self, np.uint64_t i):
19944  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
19945  *         return <bint>ewah_refn[i]
19946  *
19947  */
19948   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
19949 
19950   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1448
19951  *     cdef bint _isref(self, np.uint64_t i):
19952  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19953  *         return <bint>ewah_refn[i]             # <<<<<<<<<<<<<<
19954  *
19955  *     cdef np.uint64_t _count_total(self):
19956  */
19957   __pyx_r = ((__pyx_v_ewah_refn[__pyx_v_i]) != 0);
19958   goto __pyx_L0;
19959 
19960   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1446
19961  *         # return 1
19962  *
19963  *     cdef bint _isref(self, np.uint64_t i):             # <<<<<<<<<<<<<<
19964  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
19965  *         return <bint>ewah_refn[i]
19966  */
19967 
19968   /* function exit code */
19969   __pyx_L0:;
19970   __Pyx_RefNannyFinishContext();
19971   return __pyx_r;
19972 }
19973 
19974 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1450
19975  *         return <bint>ewah_refn[i]
19976  *
19977  *     cdef np.uint64_t _count_total(self):             # <<<<<<<<<<<<<<
19978  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
19979  *         cdef np.uint64_t i
19980  */
19981 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self)19982 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__count_total(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self) {
19983   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys;
19984   __pyx_t_5numpy_uint64_t __pyx_v_i;
19985   __pyx_t_5numpy_uint64_t __pyx_v_out;
19986   __pyx_t_5numpy_uint64_t __pyx_r;
19987   __Pyx_RefNannyDeclarations
19988   int __pyx_t_1;
19989   int __pyx_t_2;
19990   __pyx_t_5numpy_uint64_t __pyx_t_3;
19991   __Pyx_RefNannySetupContext("_count_total", 0);
19992 
19993   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1451
19994  *
19995  *     cdef np.uint64_t _count_total(self):
19996  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
19997  *         cdef np.uint64_t i
19998  *         cdef np.uint64_t out = 0
19999  */
20000   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
20001 
20002   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1453
20003  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
20004  *         cdef np.uint64_t i
20005  *         cdef np.uint64_t out = 0             # <<<<<<<<<<<<<<
20006  *         for i in range(self.nele1):
20007  *             out += ewah_keys[i]
20008  */
20009   __pyx_v_out = 0;
20010 
20011   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1454
20012  *         cdef np.uint64_t i
20013  *         cdef np.uint64_t out = 0
20014  *         for i in range(self.nele1):             # <<<<<<<<<<<<<<
20015  *             out += ewah_keys[i]
20016  *         return out
20017  */
20018   __pyx_t_1 = __pyx_v_self->nele1;
20019   __pyx_t_2 = __pyx_t_1;
20020   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
20021     __pyx_v_i = __pyx_t_3;
20022 
20023     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1455
20024  *         cdef np.uint64_t out = 0
20025  *         for i in range(self.nele1):
20026  *             out += ewah_keys[i]             # <<<<<<<<<<<<<<
20027  *         return out
20028  *
20029  */
20030     __pyx_v_out = (__pyx_v_out + (__pyx_v_ewah_keys[__pyx_v_i]));
20031   }
20032 
20033   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1456
20034  *         for i in range(self.nele1):
20035  *             out += ewah_keys[i]
20036  *         return out             # <<<<<<<<<<<<<<
20037  *
20038  *     cdef np.uint64_t _count_refined(self):
20039  */
20040   __pyx_r = __pyx_v_out;
20041   goto __pyx_L0;
20042 
20043   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1450
20044  *         return <bint>ewah_refn[i]
20045  *
20046  *     cdef np.uint64_t _count_total(self):             # <<<<<<<<<<<<<<
20047  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
20048  *         cdef np.uint64_t i
20049  */
20050 
20051   /* function exit code */
20052   __pyx_L0:;
20053   __Pyx_RefNannyFinishContext();
20054   return __pyx_r;
20055 }
20056 
20057 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1458
20058  *         return out
20059  *
20060  *     cdef np.uint64_t _count_refined(self):             # <<<<<<<<<<<<<<
20061  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
20062  *         cdef np.uint64_t i
20063  */
20064 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self)20065 static __pyx_t_5numpy_uint64_t __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__count_refined(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self) {
20066   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
20067   __pyx_t_5numpy_uint64_t __pyx_v_i;
20068   __pyx_t_5numpy_uint64_t __pyx_v_out;
20069   __pyx_t_5numpy_uint64_t __pyx_r;
20070   __Pyx_RefNannyDeclarations
20071   int __pyx_t_1;
20072   int __pyx_t_2;
20073   __pyx_t_5numpy_uint64_t __pyx_t_3;
20074   __Pyx_RefNannySetupContext("_count_refined", 0);
20075 
20076   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1459
20077  *
20078  *     cdef np.uint64_t _count_refined(self):
20079  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
20080  *         cdef np.uint64_t i
20081  *         cdef np.uint64_t out = 0
20082  */
20083   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
20084 
20085   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1461
20086  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
20087  *         cdef np.uint64_t i
20088  *         cdef np.uint64_t out = 0             # <<<<<<<<<<<<<<
20089  *         for i in range(self.nele1):
20090  *             out += ewah_refn[i]
20091  */
20092   __pyx_v_out = 0;
20093 
20094   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1462
20095  *         cdef np.uint64_t i
20096  *         cdef np.uint64_t out = 0
20097  *         for i in range(self.nele1):             # <<<<<<<<<<<<<<
20098  *             out += ewah_refn[i]
20099  *         return out
20100  */
20101   __pyx_t_1 = __pyx_v_self->nele1;
20102   __pyx_t_2 = __pyx_t_1;
20103   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
20104     __pyx_v_i = __pyx_t_3;
20105 
20106     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1463
20107  *         cdef np.uint64_t out = 0
20108  *         for i in range(self.nele1):
20109  *             out += ewah_refn[i]             # <<<<<<<<<<<<<<
20110  *         return out
20111  *
20112  */
20113     __pyx_v_out = (__pyx_v_out + (__pyx_v_ewah_refn[__pyx_v_i]));
20114   }
20115 
20116   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1464
20117  *         for i in range(self.nele1):
20118  *             out += ewah_refn[i]
20119  *         return out             # <<<<<<<<<<<<<<
20120  *
20121  *     cdef void _append(self, BoolArrayCollectionUncompressed solf):
20122  */
20123   __pyx_r = __pyx_v_out;
20124   goto __pyx_L0;
20125 
20126   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1458
20127  *         return out
20128  *
20129  *     cdef np.uint64_t _count_refined(self):             # <<<<<<<<<<<<<<
20130  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
20131  *         cdef np.uint64_t i
20132  */
20133 
20134   /* function exit code */
20135   __pyx_L0:;
20136   __Pyx_RefNannyFinishContext();
20137   return __pyx_r;
20138 }
20139 
20140 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1466
20141  *         return out
20142  *
20143  *     cdef void _append(self, BoolArrayCollectionUncompressed solf):             # <<<<<<<<<<<<<<
20144  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys
20145  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20146  */
20147 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_solf)20148 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__append(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_solf) {
20149   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys1;
20150   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn1;
20151   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys2;
20152   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn2;
20153   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll1;
20154   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
20155   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
20156   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
20157   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_swap;
20158   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
20159   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
20160   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
20161   __Pyx_RefNannyDeclarations
20162   int __pyx_t_1;
20163   int __pyx_t_2;
20164   __pyx_t_5numpy_uint64_t __pyx_t_3;
20165   int __pyx_t_4;
20166   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_5;
20167   __Pyx_RefNannySetupContext("_append", 0);
20168 
20169   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1467
20170  *
20171  *     cdef void _append(self, BoolArrayCollectionUncompressed solf):
20172  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
20173  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20174  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys
20175  */
20176   __pyx_v_ewah_keys1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
20177 
20178   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1468
20179  *     cdef void _append(self, BoolArrayCollectionUncompressed solf):
20180  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys
20181  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
20182  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys
20183  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn
20184  */
20185   __pyx_v_ewah_refn1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
20186 
20187   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1469
20188  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys
20189  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20190  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys             # <<<<<<<<<<<<<<
20191  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn
20192  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
20193  */
20194   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_solf->ewah_keys);
20195 
20196   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1470
20197  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20198  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys
20199  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn             # <<<<<<<<<<<<<<
20200  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
20201  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
20202  */
20203   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_solf->ewah_refn);
20204 
20205   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1471
20206  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys
20207  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn
20208  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll             # <<<<<<<<<<<<<<
20209  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
20210  *         cdef ewahmap_it it_map1, it_map2
20211  */
20212   __pyx_v_ewah_coll1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_self->ewah_coll);
20213 
20214   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1472
20215  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn
20216  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
20217  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
20218  *         cdef ewahmap_it it_map1, it_map2
20219  *         cdef ewah_bool_array swap, mi1_ewah1, mi1_ewah2
20220  */
20221   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
20222 
20223   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1478
20224  *         # TODO: Check if nele1 is equal?
20225  *         # Keys
20226  *         for mi1 in range(solf.nele1):             # <<<<<<<<<<<<<<
20227  *             if ewah_keys2[mi1] == 1:
20228  *                 ewah_keys1[mi1] = 1
20229  */
20230   __pyx_t_1 = __pyx_v_solf->nele1;
20231   __pyx_t_2 = __pyx_t_1;
20232   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
20233     __pyx_v_mi1 = __pyx_t_3;
20234 
20235     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1479
20236  *         # Keys
20237  *         for mi1 in range(solf.nele1):
20238  *             if ewah_keys2[mi1] == 1:             # <<<<<<<<<<<<<<
20239  *                 ewah_keys1[mi1] = 1
20240  *         # Refined
20241  */
20242     __pyx_t_4 = (((__pyx_v_ewah_keys2[__pyx_v_mi1]) == 1) != 0);
20243     if (__pyx_t_4) {
20244 
20245       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1480
20246  *         for mi1 in range(solf.nele1):
20247  *             if ewah_keys2[mi1] == 1:
20248  *                 ewah_keys1[mi1] = 1             # <<<<<<<<<<<<<<
20249  *         # Refined
20250  *         for mi1 in range(solf.nele1):
20251  */
20252       (__pyx_v_ewah_keys1[__pyx_v_mi1]) = 1;
20253 
20254       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1479
20255  *         # Keys
20256  *         for mi1 in range(solf.nele1):
20257  *             if ewah_keys2[mi1] == 1:             # <<<<<<<<<<<<<<
20258  *                 ewah_keys1[mi1] = 1
20259  *         # Refined
20260  */
20261     }
20262   }
20263 
20264   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1482
20265  *                 ewah_keys1[mi1] = 1
20266  *         # Refined
20267  *         for mi1 in range(solf.nele1):             # <<<<<<<<<<<<<<
20268  *             if ewah_refn2[mi1] == 1:
20269  *                 ewah_refn1[mi1] = 1
20270  */
20271   __pyx_t_1 = __pyx_v_solf->nele1;
20272   __pyx_t_2 = __pyx_t_1;
20273   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
20274     __pyx_v_mi1 = __pyx_t_3;
20275 
20276     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1483
20277  *         # Refined
20278  *         for mi1 in range(solf.nele1):
20279  *             if ewah_refn2[mi1] == 1:             # <<<<<<<<<<<<<<
20280  *                 ewah_refn1[mi1] = 1
20281  *         # Map
20282  */
20283     __pyx_t_4 = (((__pyx_v_ewah_refn2[__pyx_v_mi1]) == 1) != 0);
20284     if (__pyx_t_4) {
20285 
20286       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1484
20287  *         for mi1 in range(solf.nele1):
20288  *             if ewah_refn2[mi1] == 1:
20289  *                 ewah_refn1[mi1] = 1             # <<<<<<<<<<<<<<
20290  *         # Map
20291  *         it_map2 = ewah_coll2[0].begin()
20292  */
20293       (__pyx_v_ewah_refn1[__pyx_v_mi1]) = 1;
20294 
20295       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1483
20296  *         # Refined
20297  *         for mi1 in range(solf.nele1):
20298  *             if ewah_refn2[mi1] == 1:             # <<<<<<<<<<<<<<
20299  *                 ewah_refn1[mi1] = 1
20300  *         # Map
20301  */
20302     }
20303   }
20304 
20305   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1486
20306  *                 ewah_refn1[mi1] = 1
20307  *         # Map
20308  *         it_map2 = ewah_coll2[0].begin()             # <<<<<<<<<<<<<<
20309  *         while it_map2 != ewah_coll2[0].end():
20310  *             mi1 = dereference(it_map2).first
20311  */
20312   __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).begin();
20313 
20314   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1487
20315  *         # Map
20316  *         it_map2 = ewah_coll2[0].begin()
20317  *         while it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
20318  *             mi1 = dereference(it_map2).first
20319  *             mi1_ewah2 = dereference(it_map2).second
20320  */
20321   while (1) {
20322     __pyx_t_4 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
20323     if (!__pyx_t_4) break;
20324 
20325     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1488
20326  *         it_map2 = ewah_coll2[0].begin()
20327  *         while it_map2 != ewah_coll2[0].end():
20328  *             mi1 = dereference(it_map2).first             # <<<<<<<<<<<<<<
20329  *             mi1_ewah2 = dereference(it_map2).second
20330  *             it_map1 = ewah_coll1[0].find(mi1)
20331  */
20332     __pyx_t_3 = (*__pyx_v_it_map2).first;
20333     __pyx_v_mi1 = __pyx_t_3;
20334 
20335     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1489
20336  *         while it_map2 != ewah_coll2[0].end():
20337  *             mi1 = dereference(it_map2).first
20338  *             mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
20339  *             it_map1 = ewah_coll1[0].find(mi1)
20340  *             if it_map1 == ewah_coll1[0].end():
20341  */
20342     __pyx_t_5 = (*__pyx_v_it_map2).second;
20343     __pyx_v_mi1_ewah2 = __pyx_t_5;
20344 
20345     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1490
20346  *             mi1 = dereference(it_map2).first
20347  *             mi1_ewah2 = dereference(it_map2).second
20348  *             it_map1 = ewah_coll1[0].find(mi1)             # <<<<<<<<<<<<<<
20349  *             if it_map1 == ewah_coll1[0].end():
20350  *                 ewah_coll1[0][mi1] = mi1_ewah2
20351  */
20352     __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).find(__pyx_v_mi1);
20353 
20354     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1491
20355  *             mi1_ewah2 = dereference(it_map2).second
20356  *             it_map1 = ewah_coll1[0].find(mi1)
20357  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
20358  *                 ewah_coll1[0][mi1] = mi1_ewah2
20359  *             else:
20360  */
20361     __pyx_t_4 = ((__pyx_v_it_map1 == (__pyx_v_ewah_coll1[0]).end()) != 0);
20362     if (__pyx_t_4) {
20363 
20364       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1492
20365  *             it_map1 = ewah_coll1[0].find(mi1)
20366  *             if it_map1 == ewah_coll1[0].end():
20367  *                 ewah_coll1[0][mi1] = mi1_ewah2             # <<<<<<<<<<<<<<
20368  *             else:
20369  *                 mi1_ewah1 = dereference(it_map1).second
20370  */
20371       ((__pyx_v_ewah_coll1[0])[__pyx_v_mi1]) = __pyx_v_mi1_ewah2;
20372 
20373       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1491
20374  *             mi1_ewah2 = dereference(it_map2).second
20375  *             it_map1 = ewah_coll1[0].find(mi1)
20376  *             if it_map1 == ewah_coll1[0].end():             # <<<<<<<<<<<<<<
20377  *                 ewah_coll1[0][mi1] = mi1_ewah2
20378  *             else:
20379  */
20380       goto __pyx_L11;
20381     }
20382 
20383     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1494
20384  *                 ewah_coll1[0][mi1] = mi1_ewah2
20385  *             else:
20386  *                 mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
20387  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
20388  *                 mi1_ewah1.swap(swap)
20389  */
20390     /*else*/ {
20391       __pyx_t_5 = (*__pyx_v_it_map1).second;
20392       __pyx_v_mi1_ewah1 = __pyx_t_5;
20393 
20394       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1495
20395  *             else:
20396  *                 mi1_ewah1 = dereference(it_map1).second
20397  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)             # <<<<<<<<<<<<<<
20398  *                 mi1_ewah1.swap(swap)
20399  *             preincrement(it_map2)
20400  */
20401       __pyx_v_mi1_ewah1.logicalor(__pyx_v_mi1_ewah2, __pyx_v_swap);
20402 
20403       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1496
20404  *                 mi1_ewah1 = dereference(it_map1).second
20405  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
20406  *                 mi1_ewah1.swap(swap)             # <<<<<<<<<<<<<<
20407  *             preincrement(it_map2)
20408  *
20409  */
20410       __pyx_v_mi1_ewah1.swap(__pyx_v_swap);
20411     }
20412     __pyx_L11:;
20413 
20414     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1497
20415  *                 mi1_ewah1.logicalor(mi1_ewah2, swap)
20416  *                 mi1_ewah1.swap(swap)
20417  *             preincrement(it_map2)             # <<<<<<<<<<<<<<
20418  *
20419  *     cdef bint _intersects(self, BoolArrayCollectionUncompressed solf):
20420  */
20421     (void)((++__pyx_v_it_map2));
20422   }
20423 
20424   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1466
20425  *         return out
20426  *
20427  *     cdef void _append(self, BoolArrayCollectionUncompressed solf):             # <<<<<<<<<<<<<<
20428  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys
20429  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20430  */
20431 
20432   /* function exit code */
20433   __Pyx_RefNannyFinishContext();
20434 }
20435 
20436 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1499
20437  *             preincrement(it_map2)
20438  *
20439  *     cdef bint _intersects(self, BoolArrayCollectionUncompressed solf):             # <<<<<<<<<<<<<<
20440  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys
20441  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20442  */
20443 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_solf)20444 static int __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__intersects(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_solf) {
20445   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys1;
20446   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn1;
20447   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys2;
20448   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn2;
20449   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll1;
20450   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *__pyx_v_ewah_coll2;
20451   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map1;
20452   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap_it __pyx_v_it_map2;
20453   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah1;
20454   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_v_mi1_ewah2;
20455   __pyx_t_5numpy_uint64_t __pyx_v_mi1;
20456   int __pyx_r;
20457   __Pyx_RefNannyDeclarations
20458   int __pyx_t_1;
20459   int __pyx_t_2;
20460   __pyx_t_5numpy_uint64_t __pyx_t_3;
20461   int __pyx_t_4;
20462   int __pyx_t_5;
20463   __pyx_t_5numpy_uint64_t __pyx_t_6;
20464   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_bool_array __pyx_t_7;
20465   __Pyx_RefNannySetupContext("_intersects", 0);
20466 
20467   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1500
20468  *
20469  *     cdef bint _intersects(self, BoolArrayCollectionUncompressed solf):
20470  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
20471  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20472  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys
20473  */
20474   __pyx_v_ewah_keys1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
20475 
20476   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1501
20477  *     cdef bint _intersects(self, BoolArrayCollectionUncompressed solf):
20478  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys
20479  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
20480  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys
20481  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn
20482  */
20483   __pyx_v_ewah_refn1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
20484 
20485   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1502
20486  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys
20487  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20488  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys             # <<<<<<<<<<<<<<
20489  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn
20490  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
20491  */
20492   __pyx_v_ewah_keys2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_solf->ewah_keys);
20493 
20494   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1503
20495  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20496  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys
20497  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn             # <<<<<<<<<<<<<<
20498  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
20499  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
20500  */
20501   __pyx_v_ewah_refn2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_solf->ewah_refn);
20502 
20503   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1504
20504  *         cdef bitarrtype *ewah_keys2 = <bitarrtype *> solf.ewah_keys
20505  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn
20506  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll             # <<<<<<<<<<<<<<
20507  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll
20508  *         cdef ewahmap_it it_map1, it_map2
20509  */
20510   __pyx_v_ewah_coll1 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_self->ewah_coll);
20511 
20512   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1505
20513  *         cdef bitarrtype *ewah_refn2 = <bitarrtype *> solf.ewah_refn
20514  *         cdef ewahmap *ewah_coll1 = <ewahmap *> self.ewah_coll
20515  *         cdef ewahmap *ewah_coll2 = <ewahmap *> solf.ewah_coll             # <<<<<<<<<<<<<<
20516  *         cdef ewahmap_it it_map1, it_map2
20517  *         cdef ewah_bool_array mi1_ewah1, mi1_ewah2
20518  */
20519   __pyx_v_ewah_coll2 = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ewahmap *)__pyx_v_solf->ewah_coll);
20520 
20521   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1510
20522  *         cdef np.uint64_t mi1
20523  *         # No intersection
20524  *         for mi1 in range(self.nele1):             # <<<<<<<<<<<<<<
20525  *             if (ewah_keys1[mi1] == 1) and (ewah_keys2[mi1] == 1):
20526  *                 break
20527  */
20528   __pyx_t_1 = __pyx_v_self->nele1;
20529   __pyx_t_2 = __pyx_t_1;
20530   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
20531     __pyx_v_mi1 = __pyx_t_3;
20532 
20533     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1511
20534  *         # No intersection
20535  *         for mi1 in range(self.nele1):
20536  *             if (ewah_keys1[mi1] == 1) and (ewah_keys2[mi1] == 1):             # <<<<<<<<<<<<<<
20537  *                 break
20538  *         if (mi1 < self.nele1):
20539  */
20540     __pyx_t_5 = (((__pyx_v_ewah_keys1[__pyx_v_mi1]) == 1) != 0);
20541     if (__pyx_t_5) {
20542     } else {
20543       __pyx_t_4 = __pyx_t_5;
20544       goto __pyx_L6_bool_binop_done;
20545     }
20546     __pyx_t_5 = (((__pyx_v_ewah_keys2[__pyx_v_mi1]) == 1) != 0);
20547     __pyx_t_4 = __pyx_t_5;
20548     __pyx_L6_bool_binop_done:;
20549     if (__pyx_t_4) {
20550 
20551       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1512
20552  *         for mi1 in range(self.nele1):
20553  *             if (ewah_keys1[mi1] == 1) and (ewah_keys2[mi1] == 1):
20554  *                 break             # <<<<<<<<<<<<<<
20555  *         if (mi1 < self.nele1):
20556  *             return 0
20557  */
20558       goto __pyx_L4_break;
20559 
20560       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1511
20561  *         # No intersection
20562  *         for mi1 in range(self.nele1):
20563  *             if (ewah_keys1[mi1] == 1) and (ewah_keys2[mi1] == 1):             # <<<<<<<<<<<<<<
20564  *                 break
20565  *         if (mi1 < self.nele1):
20566  */
20567     }
20568   }
20569   __pyx_L4_break:;
20570 
20571   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1513
20572  *             if (ewah_keys1[mi1] == 1) and (ewah_keys2[mi1] == 1):
20573  *                 break
20574  *         if (mi1 < self.nele1):             # <<<<<<<<<<<<<<
20575  *             return 0
20576  *         mi1 = self.nele1 # This is to get rid of a warning
20577  */
20578   __pyx_t_4 = ((__pyx_v_mi1 < __pyx_v_self->nele1) != 0);
20579   if (__pyx_t_4) {
20580 
20581     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1514
20582  *                 break
20583  *         if (mi1 < self.nele1):
20584  *             return 0             # <<<<<<<<<<<<<<
20585  *         mi1 = self.nele1 # This is to get rid of a warning
20586  *         # Intersection at refined level
20587  */
20588     __pyx_r = 0;
20589     goto __pyx_L0;
20590 
20591     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1513
20592  *             if (ewah_keys1[mi1] == 1) and (ewah_keys2[mi1] == 1):
20593  *                 break
20594  *         if (mi1 < self.nele1):             # <<<<<<<<<<<<<<
20595  *             return 0
20596  *         mi1 = self.nele1 # This is to get rid of a warning
20597  */
20598   }
20599 
20600   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1515
20601  *         if (mi1 < self.nele1):
20602  *             return 0
20603  *         mi1 = self.nele1 # This is to get rid of a warning             # <<<<<<<<<<<<<<
20604  *         # Intersection at refined level
20605  *         for mi1 in range(self.nele1):
20606  */
20607   __pyx_t_1 = __pyx_v_self->nele1;
20608   __pyx_v_mi1 = __pyx_t_1;
20609 
20610   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1517
20611  *         mi1 = self.nele1 # This is to get rid of a warning
20612  *         # Intersection at refined level
20613  *         for mi1 in range(self.nele1):             # <<<<<<<<<<<<<<
20614  *             if (ewah_refn1[mi1] == 1) and (ewah_refn2[mi1] == 1):
20615  *                 it_map1 = ewah_coll1[0].begin()
20616  */
20617   __pyx_t_1 = __pyx_v_self->nele1;
20618   __pyx_t_2 = __pyx_t_1;
20619   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
20620     __pyx_v_mi1 = __pyx_t_3;
20621 
20622     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1518
20623  *         # Intersection at refined level
20624  *         for mi1 in range(self.nele1):
20625  *             if (ewah_refn1[mi1] == 1) and (ewah_refn2[mi1] == 1):             # <<<<<<<<<<<<<<
20626  *                 it_map1 = ewah_coll1[0].begin()
20627  *                 while (it_map1 != ewah_coll1[0].end()):
20628  */
20629     __pyx_t_5 = (((__pyx_v_ewah_refn1[__pyx_v_mi1]) == 1) != 0);
20630     if (__pyx_t_5) {
20631     } else {
20632       __pyx_t_4 = __pyx_t_5;
20633       goto __pyx_L12_bool_binop_done;
20634     }
20635     __pyx_t_5 = (((__pyx_v_ewah_refn2[__pyx_v_mi1]) == 1) != 0);
20636     __pyx_t_4 = __pyx_t_5;
20637     __pyx_L12_bool_binop_done:;
20638     if (__pyx_t_4) {
20639 
20640       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1519
20641  *         for mi1 in range(self.nele1):
20642  *             if (ewah_refn1[mi1] == 1) and (ewah_refn2[mi1] == 1):
20643  *                 it_map1 = ewah_coll1[0].begin()             # <<<<<<<<<<<<<<
20644  *                 while (it_map1 != ewah_coll1[0].end()):
20645  *                     mi1 = dereference(it_map1).first
20646  */
20647       __pyx_v_it_map1 = (__pyx_v_ewah_coll1[0]).begin();
20648 
20649       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1520
20650  *             if (ewah_refn1[mi1] == 1) and (ewah_refn2[mi1] == 1):
20651  *                 it_map1 = ewah_coll1[0].begin()
20652  *                 while (it_map1 != ewah_coll1[0].end()):             # <<<<<<<<<<<<<<
20653  *                     mi1 = dereference(it_map1).first
20654  *                     it_map2 = ewah_coll2[0].find(mi1)
20655  */
20656       while (1) {
20657         __pyx_t_4 = ((__pyx_v_it_map1 != (__pyx_v_ewah_coll1[0]).end()) != 0);
20658         if (!__pyx_t_4) break;
20659 
20660         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1521
20661  *                 it_map1 = ewah_coll1[0].begin()
20662  *                 while (it_map1 != ewah_coll1[0].end()):
20663  *                     mi1 = dereference(it_map1).first             # <<<<<<<<<<<<<<
20664  *                     it_map2 = ewah_coll2[0].find(mi1)
20665  *                     if it_map2 != ewah_coll2[0].end():
20666  */
20667         __pyx_t_6 = (*__pyx_v_it_map1).first;
20668         __pyx_v_mi1 = __pyx_t_6;
20669 
20670         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1522
20671  *                 while (it_map1 != ewah_coll1[0].end()):
20672  *                     mi1 = dereference(it_map1).first
20673  *                     it_map2 = ewah_coll2[0].find(mi1)             # <<<<<<<<<<<<<<
20674  *                     if it_map2 != ewah_coll2[0].end():
20675  *                         mi1_ewah1 = dereference(it_map1).second
20676  */
20677         __pyx_v_it_map2 = (__pyx_v_ewah_coll2[0]).find(__pyx_v_mi1);
20678 
20679         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1523
20680  *                     mi1 = dereference(it_map1).first
20681  *                     it_map2 = ewah_coll2[0].find(mi1)
20682  *                     if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
20683  *                         mi1_ewah1 = dereference(it_map1).second
20684  *                         mi1_ewah2 = dereference(it_map2).second
20685  */
20686         __pyx_t_4 = ((__pyx_v_it_map2 != (__pyx_v_ewah_coll2[0]).end()) != 0);
20687         if (__pyx_t_4) {
20688 
20689           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1524
20690  *                     it_map2 = ewah_coll2[0].find(mi1)
20691  *                     if it_map2 != ewah_coll2[0].end():
20692  *                         mi1_ewah1 = dereference(it_map1).second             # <<<<<<<<<<<<<<
20693  *                         mi1_ewah2 = dereference(it_map2).second
20694  *                         if mi1_ewah1.intersects(mi1_ewah2):
20695  */
20696           __pyx_t_7 = (*__pyx_v_it_map1).second;
20697           __pyx_v_mi1_ewah1 = __pyx_t_7;
20698 
20699           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1525
20700  *                     if it_map2 != ewah_coll2[0].end():
20701  *                         mi1_ewah1 = dereference(it_map1).second
20702  *                         mi1_ewah2 = dereference(it_map2).second             # <<<<<<<<<<<<<<
20703  *                         if mi1_ewah1.intersects(mi1_ewah2):
20704  *                             return 1
20705  */
20706           __pyx_t_7 = (*__pyx_v_it_map2).second;
20707           __pyx_v_mi1_ewah2 = __pyx_t_7;
20708 
20709           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1526
20710  *                         mi1_ewah1 = dereference(it_map1).second
20711  *                         mi1_ewah2 = dereference(it_map2).second
20712  *                         if mi1_ewah1.intersects(mi1_ewah2):             # <<<<<<<<<<<<<<
20713  *                             return 1
20714  *                     preincrement(it_map1)
20715  */
20716           __pyx_t_4 = (__pyx_v_mi1_ewah1.intersects(__pyx_v_mi1_ewah2) != 0);
20717           if (__pyx_t_4) {
20718 
20719             /* "yt/utilities/lib/ewah_bool_wrap.pyx":1527
20720  *                         mi1_ewah2 = dereference(it_map2).second
20721  *                         if mi1_ewah1.intersects(mi1_ewah2):
20722  *                             return 1             # <<<<<<<<<<<<<<
20723  *                     preincrement(it_map1)
20724  *                 break
20725  */
20726             __pyx_r = 1;
20727             goto __pyx_L0;
20728 
20729             /* "yt/utilities/lib/ewah_bool_wrap.pyx":1526
20730  *                         mi1_ewah1 = dereference(it_map1).second
20731  *                         mi1_ewah2 = dereference(it_map2).second
20732  *                         if mi1_ewah1.intersects(mi1_ewah2):             # <<<<<<<<<<<<<<
20733  *                             return 1
20734  *                     preincrement(it_map1)
20735  */
20736           }
20737 
20738           /* "yt/utilities/lib/ewah_bool_wrap.pyx":1523
20739  *                     mi1 = dereference(it_map1).first
20740  *                     it_map2 = ewah_coll2[0].find(mi1)
20741  *                     if it_map2 != ewah_coll2[0].end():             # <<<<<<<<<<<<<<
20742  *                         mi1_ewah1 = dereference(it_map1).second
20743  *                         mi1_ewah2 = dereference(it_map2).second
20744  */
20745         }
20746 
20747         /* "yt/utilities/lib/ewah_bool_wrap.pyx":1528
20748  *                         if mi1_ewah1.intersects(mi1_ewah2):
20749  *                             return 1
20750  *                     preincrement(it_map1)             # <<<<<<<<<<<<<<
20751  *                 break
20752  *         # Intersection at coarse level or refined inside coarse
20753  */
20754         (void)((++__pyx_v_it_map1));
20755       }
20756 
20757       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1529
20758  *                             return 1
20759  *                     preincrement(it_map1)
20760  *                 break             # <<<<<<<<<<<<<<
20761  *         # Intersection at coarse level or refined inside coarse
20762  *         if mi1 == self.nele1:
20763  */
20764       goto __pyx_L10_break;
20765 
20766       /* "yt/utilities/lib/ewah_bool_wrap.pyx":1518
20767  *         # Intersection at refined level
20768  *         for mi1 in range(self.nele1):
20769  *             if (ewah_refn1[mi1] == 1) and (ewah_refn2[mi1] == 1):             # <<<<<<<<<<<<<<
20770  *                 it_map1 = ewah_coll1[0].begin()
20771  *                 while (it_map1 != ewah_coll1[0].end()):
20772  */
20773     }
20774   }
20775   __pyx_L10_break:;
20776 
20777   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1531
20778  *                 break
20779  *         # Intersection at coarse level or refined inside coarse
20780  *         if mi1 == self.nele1:             # <<<<<<<<<<<<<<
20781  *             return 1
20782  *         return 0
20783  */
20784   __pyx_t_4 = ((__pyx_v_mi1 == __pyx_v_self->nele1) != 0);
20785   if (__pyx_t_4) {
20786 
20787     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1532
20788  *         # Intersection at coarse level or refined inside coarse
20789  *         if mi1 == self.nele1:
20790  *             return 1             # <<<<<<<<<<<<<<
20791  *         return 0
20792  *
20793  */
20794     __pyx_r = 1;
20795     goto __pyx_L0;
20796 
20797     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1531
20798  *                 break
20799  *         # Intersection at coarse level or refined inside coarse
20800  *         if mi1 == self.nele1:             # <<<<<<<<<<<<<<
20801  *             return 1
20802  *         return 0
20803  */
20804   }
20805 
20806   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1533
20807  *         if mi1 == self.nele1:
20808  *             return 1
20809  *         return 0             # <<<<<<<<<<<<<<
20810  *
20811  *     def __dealloc__(self):
20812  */
20813   __pyx_r = 0;
20814   goto __pyx_L0;
20815 
20816   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1499
20817  *             preincrement(it_map2)
20818  *
20819  *     cdef bint _intersects(self, BoolArrayCollectionUncompressed solf):             # <<<<<<<<<<<<<<
20820  *         cdef bitarrtype *ewah_keys1 = <bitarrtype *> self.ewah_keys
20821  *         cdef bitarrtype *ewah_refn1 = <bitarrtype *> self.ewah_refn
20822  */
20823 
20824   /* function exit code */
20825   __pyx_L0:;
20826   __Pyx_RefNannyFinishContext();
20827   return __pyx_r;
20828 }
20829 
20830 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1535
20831  *         return 0
20832  *
20833  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
20834  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
20835  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
20836  */
20837 
20838 /* Python wrapper */
20839 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_5__dealloc__(PyObject * __pyx_v_self)20840 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_5__dealloc__(PyObject *__pyx_v_self) {
20841   __Pyx_RefNannyDeclarations
20842   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
20843   __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_4__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_self));
20844 
20845   /* function exit code */
20846   __Pyx_RefNannyFinishContext();
20847 }
20848 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self)20849 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self) {
20850   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_keys;
20851   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *__pyx_v_ewah_refn;
20852   __pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *__pyx_v_ewah_coll;
20853   __Pyx_RefNannyDeclarations
20854   __Pyx_RefNannySetupContext("__dealloc__", 0);
20855 
20856   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1536
20857  *
20858  *     def __dealloc__(self):
20859  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys             # <<<<<<<<<<<<<<
20860  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
20861  *         free(ewah_keys)
20862  */
20863   __pyx_v_ewah_keys = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_keys);
20864 
20865   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1537
20866  *     def __dealloc__(self):
20867  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
20868  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn             # <<<<<<<<<<<<<<
20869  *         free(ewah_keys)
20870  *         free(ewah_refn)
20871  */
20872   __pyx_v_ewah_refn = ((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_bitarrtype *)__pyx_v_self->ewah_refn);
20873 
20874   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1538
20875  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
20876  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
20877  *         free(ewah_keys)             # <<<<<<<<<<<<<<
20878  *         free(ewah_refn)
20879  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
20880  */
20881   free(__pyx_v_ewah_keys);
20882 
20883   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1539
20884  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
20885  *         free(ewah_keys)
20886  *         free(ewah_refn)             # <<<<<<<<<<<<<<
20887  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
20888  *         del ewah_coll
20889  */
20890   free(__pyx_v_ewah_refn);
20891 
20892   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1540
20893  *         free(ewah_keys)
20894  *         free(ewah_refn)
20895  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll             # <<<<<<<<<<<<<<
20896  *         del ewah_coll
20897  *
20898  */
20899   __pyx_v_ewah_coll = ((__pyx_t_2yt_9utilities_3lib_15ewah_bool_array_ewah_map *)__pyx_v_self->ewah_coll);
20900 
20901   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1541
20902  *         free(ewah_refn)
20903  *         cdef ewah_map *ewah_coll = <ewah_map *> self.ewah_coll
20904  *         del ewah_coll             # <<<<<<<<<<<<<<
20905  *
20906  *     def print_info(self, prefix=''):
20907  */
20908   delete __pyx_v_ewah_coll;
20909 
20910   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1535
20911  *         return 0
20912  *
20913  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
20914  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
20915  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
20916  */
20917 
20918   /* function exit code */
20919   __Pyx_RefNannyFinishContext();
20920 }
20921 
20922 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1543
20923  *         del ewah_coll
20924  *
20925  *     def print_info(self, prefix=''):             # <<<<<<<<<<<<<<
20926  *         cdef np.uint64_t nrefn = self._count_refined()
20927  *         cdef np.uint64_t nkeys = self._count_total()
20928  */
20929 
20930 /* Python wrapper */
20931 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_7print_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_7print_info(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)20932 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_7print_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20933   PyObject *__pyx_v_prefix = 0;
20934   PyObject *__pyx_r = 0;
20935   __Pyx_RefNannyDeclarations
20936   __Pyx_RefNannySetupContext("print_info (wrapper)", 0);
20937   {
20938     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
20939     PyObject* values[1] = {0};
20940     values[0] = ((PyObject *)__pyx_kp_s__5);
20941     if (unlikely(__pyx_kwds)) {
20942       Py_ssize_t kw_args;
20943       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20944       switch (pos_args) {
20945         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20946         CYTHON_FALLTHROUGH;
20947         case  0: break;
20948         default: goto __pyx_L5_argtuple_error;
20949       }
20950       kw_args = PyDict_Size(__pyx_kwds);
20951       switch (pos_args) {
20952         case  0:
20953         if (kw_args > 0) {
20954           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prefix);
20955           if (value) { values[0] = value; kw_args--; }
20956         }
20957       }
20958       if (unlikely(kw_args > 0)) {
20959         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "print_info") < 0)) __PYX_ERR(0, 1543, __pyx_L3_error)
20960       }
20961     } else {
20962       switch (PyTuple_GET_SIZE(__pyx_args)) {
20963         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20964         CYTHON_FALLTHROUGH;
20965         case  0: break;
20966         default: goto __pyx_L5_argtuple_error;
20967       }
20968     }
20969     __pyx_v_prefix = values[0];
20970   }
20971   goto __pyx_L4_argument_unpacking_done;
20972   __pyx_L5_argtuple_error:;
20973   __Pyx_RaiseArgtupleInvalid("print_info", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1543, __pyx_L3_error)
20974   __pyx_L3_error:;
20975   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollectionUncompressed.print_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
20976   __Pyx_RefNannyFinishContext();
20977   return NULL;
20978   __pyx_L4_argument_unpacking_done:;
20979   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_6print_info(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_self), __pyx_v_prefix);
20980 
20981   /* function exit code */
20982   __Pyx_RefNannyFinishContext();
20983   return __pyx_r;
20984 }
20985 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_6print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,PyObject * __pyx_v_prefix)20986 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_6print_info(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, PyObject *__pyx_v_prefix) {
20987   __pyx_t_5numpy_uint64_t __pyx_v_nrefn;
20988   __pyx_t_5numpy_uint64_t __pyx_v_nkeys;
20989   PyObject *__pyx_r = NULL;
20990   __Pyx_RefNannyDeclarations
20991   PyObject *__pyx_t_1 = NULL;
20992   PyObject *__pyx_t_2 = NULL;
20993   PyObject *__pyx_t_3 = NULL;
20994   PyObject *__pyx_t_4 = NULL;
20995   PyObject *__pyx_t_5 = NULL;
20996   PyObject *__pyx_t_6 = NULL;
20997   int __pyx_t_7;
20998   PyObject *__pyx_t_8 = NULL;
20999   __Pyx_RefNannySetupContext("print_info", 0);
21000 
21001   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1544
21002  *
21003  *     def print_info(self, prefix=''):
21004  *         cdef np.uint64_t nrefn = self._count_refined()             # <<<<<<<<<<<<<<
21005  *         cdef np.uint64_t nkeys = self._count_total()
21006  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,
21007  */
21008   __pyx_v_nrefn = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_self->__pyx_vtab)->_count_refined(__pyx_v_self);
21009 
21010   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1545
21011  *     def print_info(self, prefix=''):
21012  *         cdef np.uint64_t nrefn = self._count_refined()
21013  *         cdef np.uint64_t nkeys = self._count_total()             # <<<<<<<<<<<<<<
21014  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,
21015  *                                                                      nkeys - nrefn,
21016  */
21017   __pyx_v_nkeys = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_self->__pyx_vtab)->_count_total(__pyx_v_self);
21018 
21019   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1546
21020  *         cdef np.uint64_t nrefn = self._count_refined()
21021  *         cdef np.uint64_t nkeys = self._count_total()
21022  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,             # <<<<<<<<<<<<<<
21023  *                                                                      nkeys - nrefn,
21024  *                                                                      nrefn,
21025  */
21026   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_8d_coarse_8d_refined_8d_total, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1546, __pyx_L1_error)
21027   __Pyx_GOTREF(__pyx_t_2);
21028 
21029   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1547
21030  *         cdef np.uint64_t nkeys = self._count_total()
21031  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,
21032  *                                                                      nkeys - nrefn,             # <<<<<<<<<<<<<<
21033  *                                                                      nrefn,
21034  *                                                                      nkeys))
21035  */
21036   __pyx_t_3 = __Pyx_PyInt_From_npy_uint64((__pyx_v_nkeys - __pyx_v_nrefn)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
21037   __Pyx_GOTREF(__pyx_t_3);
21038 
21039   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1548
21040  *         print("{}{: 8d} coarse, {: 8d} refined, {: 8d} total".format(prefix,
21041  *                                                                      nkeys - nrefn,
21042  *                                                                      nrefn,             # <<<<<<<<<<<<<<
21043  *                                                                      nkeys))
21044  *
21045  */
21046   __pyx_t_4 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nrefn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1548, __pyx_L1_error)
21047   __Pyx_GOTREF(__pyx_t_4);
21048 
21049   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1549
21050  *                                                                      nkeys - nrefn,
21051  *                                                                      nrefn,
21052  *                                                                      nkeys))             # <<<<<<<<<<<<<<
21053  *
21054  *
21055  */
21056   __pyx_t_5 = __Pyx_PyInt_From_npy_uint64(__pyx_v_nkeys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1549, __pyx_L1_error)
21057   __Pyx_GOTREF(__pyx_t_5);
21058   __pyx_t_6 = NULL;
21059   __pyx_t_7 = 0;
21060   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
21061     __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
21062     if (likely(__pyx_t_6)) {
21063       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21064       __Pyx_INCREF(__pyx_t_6);
21065       __Pyx_INCREF(function);
21066       __Pyx_DECREF_SET(__pyx_t_2, function);
21067       __pyx_t_7 = 1;
21068     }
21069   }
21070   #if CYTHON_FAST_PYCALL
21071   if (PyFunction_Check(__pyx_t_2)) {
21072     PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_prefix, __pyx_t_3, __pyx_t_4, __pyx_t_5};
21073     __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error)
21074     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21075     __Pyx_GOTREF(__pyx_t_1);
21076     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21077     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21078     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21079   } else
21080   #endif
21081   #if CYTHON_FAST_PYCCALL
21082   if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
21083     PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_prefix, __pyx_t_3, __pyx_t_4, __pyx_t_5};
21084     __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error)
21085     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21086     __Pyx_GOTREF(__pyx_t_1);
21087     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21088     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21089     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21090   } else
21091   #endif
21092   {
21093     __pyx_t_8 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1546, __pyx_L1_error)
21094     __Pyx_GOTREF(__pyx_t_8);
21095     if (__pyx_t_6) {
21096       __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
21097     }
21098     __Pyx_INCREF(__pyx_v_prefix);
21099     __Pyx_GIVEREF(__pyx_v_prefix);
21100     PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_prefix);
21101     __Pyx_GIVEREF(__pyx_t_3);
21102     PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
21103     __Pyx_GIVEREF(__pyx_t_4);
21104     PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_4);
21105     __Pyx_GIVEREF(__pyx_t_5);
21106     PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_t_5);
21107     __pyx_t_3 = 0;
21108     __pyx_t_4 = 0;
21109     __pyx_t_5 = 0;
21110     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error)
21111     __Pyx_GOTREF(__pyx_t_1);
21112     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21113   }
21114   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21115   if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 1546, __pyx_L1_error)
21116   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21117 
21118   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1543
21119  *         del ewah_coll
21120  *
21121  *     def print_info(self, prefix=''):             # <<<<<<<<<<<<<<
21122  *         cdef np.uint64_t nrefn = self._count_refined()
21123  *         cdef np.uint64_t nkeys = self._count_total()
21124  */
21125 
21126   /* function exit code */
21127   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21128   goto __pyx_L0;
21129   __pyx_L1_error:;
21130   __Pyx_XDECREF(__pyx_t_1);
21131   __Pyx_XDECREF(__pyx_t_2);
21132   __Pyx_XDECREF(__pyx_t_3);
21133   __Pyx_XDECREF(__pyx_t_4);
21134   __Pyx_XDECREF(__pyx_t_5);
21135   __Pyx_XDECREF(__pyx_t_6);
21136   __Pyx_XDECREF(__pyx_t_8);
21137   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollectionUncompressed.print_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
21138   __pyx_r = NULL;
21139   __pyx_L0:;
21140   __Pyx_XGIVEREF(__pyx_r);
21141   __Pyx_RefNannyFinishContext();
21142   return __pyx_r;
21143 }
21144 
21145 /* "(tree fragment)":1
21146  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
21147  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21148  * def __setstate_cython__(self, __pyx_state):
21149  */
21150 
21151 /* Python wrapper */
21152 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_9__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)21153 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
21154   PyObject *__pyx_r = 0;
21155   __Pyx_RefNannyDeclarations
21156   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
21157   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_8__reduce_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_self));
21158 
21159   /* function exit code */
21160   __Pyx_RefNannyFinishContext();
21161   return __pyx_r;
21162 }
21163 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self)21164 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self) {
21165   PyObject *__pyx_r = NULL;
21166   __Pyx_RefNannyDeclarations
21167   PyObject *__pyx_t_1 = NULL;
21168   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
21169 
21170   /* "(tree fragment)":2
21171  * def __reduce_cython__(self):
21172  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
21173  * def __setstate_cython__(self, __pyx_state):
21174  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21175  */
21176   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
21177   __Pyx_GOTREF(__pyx_t_1);
21178   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
21179   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21180   __PYX_ERR(1, 2, __pyx_L1_error)
21181 
21182   /* "(tree fragment)":1
21183  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
21184  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21185  * def __setstate_cython__(self, __pyx_state):
21186  */
21187 
21188   /* function exit code */
21189   __pyx_L1_error:;
21190   __Pyx_XDECREF(__pyx_t_1);
21191   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollectionUncompressed.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21192   __pyx_r = NULL;
21193   __Pyx_XGIVEREF(__pyx_r);
21194   __Pyx_RefNannyFinishContext();
21195   return __pyx_r;
21196 }
21197 
21198 /* "(tree fragment)":3
21199  * def __reduce_cython__(self):
21200  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21201  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
21202  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21203  */
21204 
21205 /* Python wrapper */
21206 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_11__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)21207 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
21208   PyObject *__pyx_r = 0;
21209   __Pyx_RefNannyDeclarations
21210   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
21211   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_10__setstate_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
21212 
21213   /* function exit code */
21214   __Pyx_RefNannyFinishContext();
21215   return __pyx_r;
21216 }
21217 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)21218 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
21219   PyObject *__pyx_r = NULL;
21220   __Pyx_RefNannyDeclarations
21221   PyObject *__pyx_t_1 = NULL;
21222   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
21223 
21224   /* "(tree fragment)":4
21225  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21226  * def __setstate_cython__(self, __pyx_state):
21227  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
21228  */
21229   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
21230   __Pyx_GOTREF(__pyx_t_1);
21231   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
21232   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21233   __PYX_ERR(1, 4, __pyx_L1_error)
21234 
21235   /* "(tree fragment)":3
21236  * def __reduce_cython__(self):
21237  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21238  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
21239  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21240  */
21241 
21242   /* function exit code */
21243   __pyx_L1_error:;
21244   __Pyx_XDECREF(__pyx_t_1);
21245   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.BoolArrayCollectionUncompressed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21246   __pyx_r = NULL;
21247   __Pyx_XGIVEREF(__pyx_r);
21248   __Pyx_RefNannyFinishContext();
21249   return __pyx_r;
21250 }
21251 
21252 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1555
21253  * # Vector version
21254  * cdef class SparseUnorderedBitmaskVector:
21255  *     def __cinit__(self):             # <<<<<<<<<<<<<<
21256  *         self.total = 0
21257  *
21258  */
21259 
21260 /* Python wrapper */
21261 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_1__cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)21262 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21263   int __pyx_r;
21264   __Pyx_RefNannyDeclarations
21265   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
21266   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
21267     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
21268   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
21269   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self));
21270 
21271   /* function exit code */
21272   __Pyx_RefNannyFinishContext();
21273   return __pyx_r;
21274 }
21275 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self)21276 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self) {
21277   int __pyx_r;
21278   __Pyx_RefNannyDeclarations
21279   __Pyx_RefNannySetupContext("__cinit__", 0);
21280 
21281   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1556
21282  * cdef class SparseUnorderedBitmaskVector:
21283  *     def __cinit__(self):
21284  *         self.total = 0             # <<<<<<<<<<<<<<
21285  *
21286  *     cdef void _set(self, np.uint64_t ind):
21287  */
21288   __pyx_v_self->total = 0;
21289 
21290   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1555
21291  * # Vector version
21292  * cdef class SparseUnorderedBitmaskVector:
21293  *     def __cinit__(self):             # <<<<<<<<<<<<<<
21294  *         self.total = 0
21295  *
21296  */
21297 
21298   /* function exit code */
21299   __pyx_r = 0;
21300   __Pyx_RefNannyFinishContext();
21301   return __pyx_r;
21302 }
21303 
21304 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1558
21305  *         self.total = 0
21306  *
21307  *     cdef void _set(self, np.uint64_t ind):             # <<<<<<<<<<<<<<
21308  *         self.entries.push_back(ind)
21309  *         self.total += 1
21310  */
21311 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_ind)21312 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_ind) {
21313   __Pyx_RefNannyDeclarations
21314   __Pyx_RefNannySetupContext("_set", 0);
21315 
21316   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1559
21317  *
21318  *     cdef void _set(self, np.uint64_t ind):
21319  *         self.entries.push_back(ind)             # <<<<<<<<<<<<<<
21320  *         self.total += 1
21321  *
21322  */
21323   try {
21324     __pyx_v_self->entries.push_back(__pyx_v_ind);
21325   } catch(...) {
21326     __Pyx_CppExn2PyErr();
21327     __PYX_ERR(0, 1559, __pyx_L1_error)
21328   }
21329 
21330   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1560
21331  *     cdef void _set(self, np.uint64_t ind):
21332  *         self.entries.push_back(ind)
21333  *         self.total += 1             # <<<<<<<<<<<<<<
21334  *
21335  *     def set(self, ind):
21336  */
21337   __pyx_v_self->total = (__pyx_v_self->total + 1);
21338 
21339   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1558
21340  *         self.total = 0
21341  *
21342  *     cdef void _set(self, np.uint64_t ind):             # <<<<<<<<<<<<<<
21343  *         self.entries.push_back(ind)
21344  *         self.total += 1
21345  */
21346 
21347   /* function exit code */
21348   goto __pyx_L0;
21349   __pyx_L1_error:;
21350   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskVector._set", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
21351   __pyx_L0:;
21352   __Pyx_RefNannyFinishContext();
21353 }
21354 
21355 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1562
21356  *         self.total += 1
21357  *
21358  *     def set(self, ind):             # <<<<<<<<<<<<<<
21359  *         self._set(ind)
21360  *
21361  */
21362 
21363 /* Python wrapper */
21364 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_v_ind); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_3set(PyObject * __pyx_v_self,PyObject * __pyx_v_ind)21365 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_v_ind) {
21366   PyObject *__pyx_r = 0;
21367   __Pyx_RefNannyDeclarations
21368   __Pyx_RefNannySetupContext("set (wrapper)", 0);
21369   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_2set(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self), ((PyObject *)__pyx_v_ind));
21370 
21371   /* function exit code */
21372   __Pyx_RefNannyFinishContext();
21373   return __pyx_r;
21374 }
21375 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_2set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self,PyObject * __pyx_v_ind)21376 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_2set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, PyObject *__pyx_v_ind) {
21377   PyObject *__pyx_r = NULL;
21378   __Pyx_RefNannyDeclarations
21379   __pyx_t_5numpy_uint64_t __pyx_t_1;
21380   __Pyx_RefNannySetupContext("set", 0);
21381 
21382   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1563
21383  *
21384  *     def set(self, ind):
21385  *         self._set(ind)             # <<<<<<<<<<<<<<
21386  *
21387  *     cdef void _fill(self, np.uint8_t[:] mask):
21388  */
21389   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_ind); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1563, __pyx_L1_error)
21390   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_t_1);
21391 
21392   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1562
21393  *         self.total += 1
21394  *
21395  *     def set(self, ind):             # <<<<<<<<<<<<<<
21396  *         self._set(ind)
21397  *
21398  */
21399 
21400   /* function exit code */
21401   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21402   goto __pyx_L0;
21403   __pyx_L1_error:;
21404   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskVector.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
21405   __pyx_r = NULL;
21406   __pyx_L0:;
21407   __Pyx_XGIVEREF(__pyx_r);
21408   __Pyx_RefNannyFinishContext();
21409   return __pyx_r;
21410 }
21411 
21412 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1565
21413  *         self._set(ind)
21414  *
21415  *     cdef void _fill(self, np.uint8_t[:] mask):             # <<<<<<<<<<<<<<
21416  *         cdef np.uint64_t i, ind
21417  *         for i in range(self.entries.size()):
21418  */
21419 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self,__Pyx_memviewslice __pyx_v_mask)21420 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, __Pyx_memviewslice __pyx_v_mask) {
21421   __pyx_t_5numpy_uint64_t __pyx_v_i;
21422   __pyx_t_5numpy_uint64_t __pyx_v_ind;
21423   __Pyx_RefNannyDeclarations
21424   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_1;
21425   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_2;
21426   __pyx_t_5numpy_uint64_t __pyx_t_3;
21427   __pyx_t_5numpy_uint64_t __pyx_t_4;
21428   int __pyx_t_5;
21429   __Pyx_RefNannySetupContext("_fill", 0);
21430 
21431   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1567
21432  *     cdef void _fill(self, np.uint8_t[:] mask):
21433  *         cdef np.uint64_t i, ind
21434  *         for i in range(self.entries.size()):             # <<<<<<<<<<<<<<
21435  *             ind = self.entries[i]
21436  *             mask[ind] = 1
21437  */
21438   __pyx_t_1 = __pyx_v_self->entries.size();
21439   __pyx_t_2 = __pyx_t_1;
21440   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
21441     __pyx_v_i = __pyx_t_3;
21442 
21443     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1568
21444  *         cdef np.uint64_t i, ind
21445  *         for i in range(self.entries.size()):
21446  *             ind = self.entries[i]             # <<<<<<<<<<<<<<
21447  *             mask[ind] = 1
21448  *
21449  */
21450     __pyx_v_ind = (__pyx_v_self->entries[__pyx_v_i]);
21451 
21452     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1569
21453  *         for i in range(self.entries.size()):
21454  *             ind = self.entries[i]
21455  *             mask[ind] = 1             # <<<<<<<<<<<<<<
21456  *
21457  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
21458  */
21459     __pyx_t_4 = __pyx_v_ind;
21460     __pyx_t_5 = -1;
21461     if (unlikely(__pyx_t_4 >= (size_t)__pyx_v_mask.shape[0])) __pyx_t_5 = 0;
21462     if (unlikely(__pyx_t_5 != -1)) {
21463       __Pyx_RaiseBufferIndexError(__pyx_t_5);
21464       __PYX_ERR(0, 1569, __pyx_L1_error)
21465     }
21466     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_mask.data + __pyx_t_4 * __pyx_v_mask.strides[0]) )) = 1;
21467   }
21468 
21469   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1565
21470  *         self._set(ind)
21471  *
21472  *     cdef void _fill(self, np.uint8_t[:] mask):             # <<<<<<<<<<<<<<
21473  *         cdef np.uint64_t i, ind
21474  *         for i in range(self.entries.size()):
21475  */
21476 
21477   /* function exit code */
21478   goto __pyx_L0;
21479   __pyx_L1_error:;
21480   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskVector._fill", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
21481   __pyx_L0:;
21482   __Pyx_RefNannyFinishContext();
21483 }
21484 
21485 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1571
21486  *             mask[ind] = 1
21487  *
21488  *     cdef void _fill_ewah(self, BoolArrayCollection mm):             # <<<<<<<<<<<<<<
21489  *         self._remove_duplicates()
21490  *         cdef np.uint64_t i, ind
21491  */
21492 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_mm)21493 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mm) {
21494   __pyx_t_5numpy_uint64_t __pyx_v_i;
21495   __pyx_t_5numpy_uint64_t __pyx_v_ind;
21496   __Pyx_RefNannyDeclarations
21497   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_1;
21498   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_2;
21499   __pyx_t_5numpy_uint64_t __pyx_t_3;
21500   __Pyx_RefNannySetupContext("_fill_ewah", 0);
21501 
21502   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1572
21503  *
21504  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
21505  *         self._remove_duplicates()             # <<<<<<<<<<<<<<
21506  *         cdef np.uint64_t i, ind
21507  *         for i in range(self.entries.size()):
21508  */
21509   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_remove_duplicates(__pyx_v_self);
21510 
21511   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1574
21512  *         self._remove_duplicates()
21513  *         cdef np.uint64_t i, ind
21514  *         for i in range(self.entries.size()):             # <<<<<<<<<<<<<<
21515  *             ind = self.entries[i]
21516  *             mm._set_coarse(ind)
21517  */
21518   __pyx_t_1 = __pyx_v_self->entries.size();
21519   __pyx_t_2 = __pyx_t_1;
21520   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
21521     __pyx_v_i = __pyx_t_3;
21522 
21523     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1575
21524  *         cdef np.uint64_t i, ind
21525  *         for i in range(self.entries.size()):
21526  *             ind = self.entries[i]             # <<<<<<<<<<<<<<
21527  *             mm._set_coarse(ind)
21528  *
21529  */
21530     __pyx_v_ind = (__pyx_v_self->entries[__pyx_v_i]);
21531 
21532     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1576
21533  *         for i in range(self.entries.size()):
21534  *             ind = self.entries[i]
21535  *             mm._set_coarse(ind)             # <<<<<<<<<<<<<<
21536  *
21537  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
21538  */
21539     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_mm->__pyx_vtab)->_set_coarse(__pyx_v_mm, __pyx_v_ind);
21540   }
21541 
21542   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1571
21543  *             mask[ind] = 1
21544  *
21545  *     cdef void _fill_ewah(self, BoolArrayCollection mm):             # <<<<<<<<<<<<<<
21546  *         self._remove_duplicates()
21547  *         cdef np.uint64_t i, ind
21548  */
21549 
21550   /* function exit code */
21551   __Pyx_RefNannyFinishContext();
21552 }
21553 
21554 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1578
21555  *             mm._set_coarse(ind)
21556  *
21557  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):             # <<<<<<<<<<<<<<
21558  *         self._remove_duplicates()
21559  *         cdef np.uint64_t i, ind
21560  */
21561 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_mm)21562 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_mm) {
21563   __pyx_t_5numpy_uint64_t __pyx_v_i;
21564   __pyx_t_5numpy_uint64_t __pyx_v_ind;
21565   __Pyx_RefNannyDeclarations
21566   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_1;
21567   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_2;
21568   __pyx_t_5numpy_uint64_t __pyx_t_3;
21569   __Pyx_RefNannySetupContext("_fill_bool", 0);
21570 
21571   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1579
21572  *
21573  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
21574  *         self._remove_duplicates()             # <<<<<<<<<<<<<<
21575  *         cdef np.uint64_t i, ind
21576  *         for i in range(self.entries.size()):
21577  */
21578   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_remove_duplicates(__pyx_v_self);
21579 
21580   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1581
21581  *         self._remove_duplicates()
21582  *         cdef np.uint64_t i, ind
21583  *         for i in range(self.entries.size()):             # <<<<<<<<<<<<<<
21584  *             ind = self.entries[i]
21585  *             mm._set_coarse(ind)
21586  */
21587   __pyx_t_1 = __pyx_v_self->entries.size();
21588   __pyx_t_2 = __pyx_t_1;
21589   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
21590     __pyx_v_i = __pyx_t_3;
21591 
21592     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1582
21593  *         cdef np.uint64_t i, ind
21594  *         for i in range(self.entries.size()):
21595  *             ind = self.entries[i]             # <<<<<<<<<<<<<<
21596  *             mm._set_coarse(ind)
21597  *
21598  */
21599     __pyx_v_ind = (__pyx_v_self->entries[__pyx_v_i]);
21600 
21601     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1583
21602  *         for i in range(self.entries.size()):
21603  *             ind = self.entries[i]
21604  *             mm._set_coarse(ind)             # <<<<<<<<<<<<<<
21605  *
21606  *     cdef void _reset(self):
21607  */
21608     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_mm->__pyx_vtab)->_set_coarse(__pyx_v_mm, __pyx_v_ind);
21609   }
21610 
21611   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1578
21612  *             mm._set_coarse(ind)
21613  *
21614  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):             # <<<<<<<<<<<<<<
21615  *         self._remove_duplicates()
21616  *         cdef np.uint64_t i, ind
21617  */
21618 
21619   /* function exit code */
21620   __Pyx_RefNannyFinishContext();
21621 }
21622 
21623 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1585
21624  *             mm._set_coarse(ind)
21625  *
21626  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
21627  *         self.entries.erase(self.entries.begin(), self.entries.end())
21628  *         self.total = 0
21629  */
21630 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self)21631 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self) {
21632   __Pyx_RefNannyDeclarations
21633   __Pyx_RefNannySetupContext("_reset", 0);
21634 
21635   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1586
21636  *
21637  *     cdef void _reset(self):
21638  *         self.entries.erase(self.entries.begin(), self.entries.end())             # <<<<<<<<<<<<<<
21639  *         self.total = 0
21640  *
21641  */
21642   (void)(__pyx_v_self->entries.erase(__pyx_v_self->entries.begin(), __pyx_v_self->entries.end()));
21643 
21644   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1587
21645  *     cdef void _reset(self):
21646  *         self.entries.erase(self.entries.begin(), self.entries.end())
21647  *         self.total = 0             # <<<<<<<<<<<<<<
21648  *
21649  *     cdef to_array(self):
21650  */
21651   __pyx_v_self->total = 0;
21652 
21653   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1585
21654  *             mm._set_coarse(ind)
21655  *
21656  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
21657  *         self.entries.erase(self.entries.begin(), self.entries.end())
21658  *         self.total = 0
21659  */
21660 
21661   /* function exit code */
21662   __Pyx_RefNannyFinishContext();
21663 }
21664 
21665 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1589
21666  *         self.total = 0
21667  *
21668  *     cdef to_array(self):             # <<<<<<<<<<<<<<
21669  *         self._remove_duplicates()
21670  *         cdef np.ndarray[np.uint64_t, ndim=1] rv
21671  */
21672 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self)21673 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self) {
21674   PyArrayObject *__pyx_v_rv = 0;
21675   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_v_i;
21676   __Pyx_LocalBuf_ND __pyx_pybuffernd_rv;
21677   __Pyx_Buffer __pyx_pybuffer_rv;
21678   PyObject *__pyx_r = NULL;
21679   __Pyx_RefNannyDeclarations
21680   PyObject *__pyx_t_1 = NULL;
21681   PyObject *__pyx_t_2 = NULL;
21682   PyObject *__pyx_t_3 = NULL;
21683   PyObject *__pyx_t_4 = NULL;
21684   PyArrayObject *__pyx_t_5 = NULL;
21685   int __pyx_t_6;
21686   PyObject *__pyx_t_7 = NULL;
21687   PyObject *__pyx_t_8 = NULL;
21688   PyObject *__pyx_t_9 = NULL;
21689   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_10;
21690   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_11;
21691   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_12;
21692   std::vector<__pyx_t_5numpy_uint64_t> ::size_type __pyx_t_13;
21693   __Pyx_RefNannySetupContext("to_array", 0);
21694   __pyx_pybuffer_rv.pybuffer.buf = NULL;
21695   __pyx_pybuffer_rv.refcount = 0;
21696   __pyx_pybuffernd_rv.data = NULL;
21697   __pyx_pybuffernd_rv.rcbuffer = &__pyx_pybuffer_rv;
21698 
21699   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1590
21700  *
21701  *     cdef to_array(self):
21702  *         self._remove_duplicates()             # <<<<<<<<<<<<<<
21703  *         cdef np.ndarray[np.uint64_t, ndim=1] rv
21704  *         rv = np.empty(self.entries.size(), dtype='uint64')
21705  */
21706   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_remove_duplicates(__pyx_v_self);
21707 
21708   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1592
21709  *         self._remove_duplicates()
21710  *         cdef np.ndarray[np.uint64_t, ndim=1] rv
21711  *         rv = np.empty(self.entries.size(), dtype='uint64')             # <<<<<<<<<<<<<<
21712  *         for i in range(self.entries.size()):
21713  *             rv[i] = self.entries[i]
21714  */
21715   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error)
21716   __Pyx_GOTREF(__pyx_t_1);
21717   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error)
21718   __Pyx_GOTREF(__pyx_t_2);
21719   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21720   __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->entries.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error)
21721   __Pyx_GOTREF(__pyx_t_1);
21722   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1592, __pyx_L1_error)
21723   __Pyx_GOTREF(__pyx_t_3);
21724   __Pyx_GIVEREF(__pyx_t_1);
21725   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
21726   __pyx_t_1 = 0;
21727   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error)
21728   __Pyx_GOTREF(__pyx_t_1);
21729   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_uint64) < 0) __PYX_ERR(0, 1592, __pyx_L1_error)
21730   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1592, __pyx_L1_error)
21731   __Pyx_GOTREF(__pyx_t_4);
21732   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21733   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21734   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21735   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1592, __pyx_L1_error)
21736   __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
21737   {
21738     __Pyx_BufFmt_StackElem __pyx_stack[1];
21739     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
21740     __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rv.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
21741     if (unlikely(__pyx_t_6 < 0)) {
21742       PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
21743       if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rv.rcbuffer->pybuffer, (PyObject*)__pyx_v_rv, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
21744         Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
21745         __Pyx_RaiseBufferFallbackError();
21746       } else {
21747         PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
21748       }
21749       __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
21750     }
21751     __pyx_pybuffernd_rv.diminfo[0].strides = __pyx_pybuffernd_rv.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rv.diminfo[0].shape = __pyx_pybuffernd_rv.rcbuffer->pybuffer.shape[0];
21752     if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1592, __pyx_L1_error)
21753   }
21754   __pyx_t_5 = 0;
21755   __pyx_v_rv = ((PyArrayObject *)__pyx_t_4);
21756   __pyx_t_4 = 0;
21757 
21758   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1593
21759  *         cdef np.ndarray[np.uint64_t, ndim=1] rv
21760  *         rv = np.empty(self.entries.size(), dtype='uint64')
21761  *         for i in range(self.entries.size()):             # <<<<<<<<<<<<<<
21762  *             rv[i] = self.entries[i]
21763  *         return rv
21764  */
21765   __pyx_t_10 = __pyx_v_self->entries.size();
21766   __pyx_t_11 = __pyx_t_10;
21767   for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
21768     __pyx_v_i = __pyx_t_12;
21769 
21770     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1594
21771  *         rv = np.empty(self.entries.size(), dtype='uint64')
21772  *         for i in range(self.entries.size()):
21773  *             rv[i] = self.entries[i]             # <<<<<<<<<<<<<<
21774  *         return rv
21775  *
21776  */
21777     __pyx_t_13 = __pyx_v_i;
21778     __pyx_t_6 = -1;
21779     if (unlikely(__pyx_t_13 >= (size_t)__pyx_pybuffernd_rv.diminfo[0].shape)) __pyx_t_6 = 0;
21780     if (unlikely(__pyx_t_6 != -1)) {
21781       __Pyx_RaiseBufferIndexError(__pyx_t_6);
21782       __PYX_ERR(0, 1594, __pyx_L1_error)
21783     }
21784     *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_rv.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_rv.diminfo[0].strides) = (__pyx_v_self->entries[__pyx_v_i]);
21785   }
21786 
21787   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1595
21788  *         for i in range(self.entries.size()):
21789  *             rv[i] = self.entries[i]
21790  *         return rv             # <<<<<<<<<<<<<<
21791  *
21792  *     cdef void _remove_duplicates(self):
21793  */
21794   __Pyx_XDECREF(__pyx_r);
21795   __Pyx_INCREF(((PyObject *)__pyx_v_rv));
21796   __pyx_r = ((PyObject *)__pyx_v_rv);
21797   goto __pyx_L0;
21798 
21799   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1589
21800  *         self.total = 0
21801  *
21802  *     cdef to_array(self):             # <<<<<<<<<<<<<<
21803  *         self._remove_duplicates()
21804  *         cdef np.ndarray[np.uint64_t, ndim=1] rv
21805  */
21806 
21807   /* function exit code */
21808   __pyx_L1_error:;
21809   __Pyx_XDECREF(__pyx_t_1);
21810   __Pyx_XDECREF(__pyx_t_2);
21811   __Pyx_XDECREF(__pyx_t_3);
21812   __Pyx_XDECREF(__pyx_t_4);
21813   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
21814     __Pyx_PyThreadState_declare
21815     __Pyx_PyThreadState_assign
21816     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
21817     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
21818   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
21819   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskVector.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
21820   __pyx_r = 0;
21821   goto __pyx_L2;
21822   __pyx_L0:;
21823   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
21824   __pyx_L2:;
21825   __Pyx_XDECREF((PyObject *)__pyx_v_rv);
21826   __Pyx_XGIVEREF(__pyx_r);
21827   __Pyx_RefNannyFinishContext();
21828   return __pyx_r;
21829 }
21830 
21831 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1597
21832  *         return rv
21833  *
21834  *     cdef void _remove_duplicates(self):             # <<<<<<<<<<<<<<
21835  *         cdef vector[np.uint64_t].iterator last
21836  *         sort(self.entries.begin(), self.entries.end())
21837  */
21838 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__remove_duplicates(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self)21839 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__remove_duplicates(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self) {
21840   std::vector<__pyx_t_5numpy_uint64_t> ::iterator __pyx_v_last;
21841   __Pyx_RefNannyDeclarations
21842   __Pyx_RefNannySetupContext("_remove_duplicates", 0);
21843 
21844   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1599
21845  *     cdef void _remove_duplicates(self):
21846  *         cdef vector[np.uint64_t].iterator last
21847  *         sort(self.entries.begin(), self.entries.end())             # <<<<<<<<<<<<<<
21848  *         last = unique(self.entries.begin(), self.entries.end())
21849  *         self.entries.erase(last, self.entries.end())
21850  */
21851   std::sort<std::vector<__pyx_t_5numpy_uint64_t> ::iterator>(__pyx_v_self->entries.begin(), __pyx_v_self->entries.end());
21852 
21853   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1600
21854  *         cdef vector[np.uint64_t].iterator last
21855  *         sort(self.entries.begin(), self.entries.end())
21856  *         last = unique(self.entries.begin(), self.entries.end())             # <<<<<<<<<<<<<<
21857  *         self.entries.erase(last, self.entries.end())
21858  *
21859  */
21860   __pyx_v_last = std::unique<std::vector<__pyx_t_5numpy_uint64_t> ::iterator>(__pyx_v_self->entries.begin(), __pyx_v_self->entries.end());
21861 
21862   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1601
21863  *         sort(self.entries.begin(), self.entries.end())
21864  *         last = unique(self.entries.begin(), self.entries.end())
21865  *         self.entries.erase(last, self.entries.end())             # <<<<<<<<<<<<<<
21866  *
21867  *     cdef void _prune(self):
21868  */
21869   (void)(__pyx_v_self->entries.erase(__pyx_v_last, __pyx_v_self->entries.end()));
21870 
21871   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1597
21872  *         return rv
21873  *
21874  *     cdef void _remove_duplicates(self):             # <<<<<<<<<<<<<<
21875  *         cdef vector[np.uint64_t].iterator last
21876  *         sort(self.entries.begin(), self.entries.end())
21877  */
21878 
21879   /* function exit code */
21880   __Pyx_RefNannyFinishContext();
21881 }
21882 
21883 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1603
21884  *         self.entries.erase(last, self.entries.end())
21885  *
21886  *     cdef void _prune(self):             # <<<<<<<<<<<<<<
21887  *         if self.total > MAX_VECTOR_SIZE:
21888  *             self._remove_duplicates()
21889  */
21890 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__prune(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self)21891 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__prune(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self) {
21892   __Pyx_RefNannyDeclarations
21893   int __pyx_t_1;
21894   __Pyx_RefNannySetupContext("_prune", 0);
21895 
21896   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1604
21897  *
21898  *     cdef void _prune(self):
21899  *         if self.total > MAX_VECTOR_SIZE:             # <<<<<<<<<<<<<<
21900  *             self._remove_duplicates()
21901  *             self.total = 0
21902  */
21903   __pyx_t_1 = ((__pyx_v_self->total > __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_MAX_VECTOR_SIZE) != 0);
21904   if (__pyx_t_1) {
21905 
21906     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1605
21907  *     cdef void _prune(self):
21908  *         if self.total > MAX_VECTOR_SIZE:
21909  *             self._remove_duplicates()             # <<<<<<<<<<<<<<
21910  *             self.total = 0
21911  *
21912  */
21913     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_remove_duplicates(__pyx_v_self);
21914 
21915     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1606
21916  *         if self.total > MAX_VECTOR_SIZE:
21917  *             self._remove_duplicates()
21918  *             self.total = 0             # <<<<<<<<<<<<<<
21919  *
21920  *     def __dealloc__(self):
21921  */
21922     __pyx_v_self->total = 0;
21923 
21924     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1604
21925  *
21926  *     cdef void _prune(self):
21927  *         if self.total > MAX_VECTOR_SIZE:             # <<<<<<<<<<<<<<
21928  *             self._remove_duplicates()
21929  *             self.total = 0
21930  */
21931   }
21932 
21933   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1603
21934  *         self.entries.erase(last, self.entries.end())
21935  *
21936  *     cdef void _prune(self):             # <<<<<<<<<<<<<<
21937  *         if self.total > MAX_VECTOR_SIZE:
21938  *             self._remove_duplicates()
21939  */
21940 
21941   /* function exit code */
21942   __Pyx_RefNannyFinishContext();
21943 }
21944 
21945 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1608
21946  *             self.total = 0
21947  *
21948  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
21949  *         self.entries.clear()
21950  *
21951  */
21952 
21953 /* Python wrapper */
21954 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_5__dealloc__(PyObject * __pyx_v_self)21955 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_5__dealloc__(PyObject *__pyx_v_self) {
21956   __Pyx_RefNannyDeclarations
21957   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
21958   __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_4__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self));
21959 
21960   /* function exit code */
21961   __Pyx_RefNannyFinishContext();
21962 }
21963 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self)21964 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self) {
21965   __Pyx_RefNannyDeclarations
21966   __Pyx_RefNannySetupContext("__dealloc__", 0);
21967 
21968   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1609
21969  *
21970  *     def __dealloc__(self):
21971  *         self.entries.clear()             # <<<<<<<<<<<<<<
21972  *
21973  * # Set version
21974  */
21975   __pyx_v_self->entries.clear();
21976 
21977   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1608
21978  *             self.total = 0
21979  *
21980  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
21981  *         self.entries.clear()
21982  *
21983  */
21984 
21985   /* function exit code */
21986   __Pyx_RefNannyFinishContext();
21987 }
21988 
21989 /* "(tree fragment)":1
21990  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
21991  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21992  * def __setstate_cython__(self, __pyx_state):
21993  */
21994 
21995 /* Python wrapper */
21996 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_7__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)21997 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
21998   PyObject *__pyx_r = 0;
21999   __Pyx_RefNannyDeclarations
22000   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
22001   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_6__reduce_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self));
22002 
22003   /* function exit code */
22004   __Pyx_RefNannyFinishContext();
22005   return __pyx_r;
22006 }
22007 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self)22008 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self) {
22009   PyObject *__pyx_r = NULL;
22010   __Pyx_RefNannyDeclarations
22011   PyObject *__pyx_t_1 = NULL;
22012   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
22013 
22014   /* "(tree fragment)":2
22015  * def __reduce_cython__(self):
22016  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
22017  * def __setstate_cython__(self, __pyx_state):
22018  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22019  */
22020   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
22021   __Pyx_GOTREF(__pyx_t_1);
22022   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
22023   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22024   __PYX_ERR(1, 2, __pyx_L1_error)
22025 
22026   /* "(tree fragment)":1
22027  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
22028  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22029  * def __setstate_cython__(self, __pyx_state):
22030  */
22031 
22032   /* function exit code */
22033   __pyx_L1_error:;
22034   __Pyx_XDECREF(__pyx_t_1);
22035   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskVector.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22036   __pyx_r = NULL;
22037   __Pyx_XGIVEREF(__pyx_r);
22038   __Pyx_RefNannyFinishContext();
22039   return __pyx_r;
22040 }
22041 
22042 /* "(tree fragment)":3
22043  * def __reduce_cython__(self):
22044  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22045  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
22046  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22047  */
22048 
22049 /* Python wrapper */
22050 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_9__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)22051 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22052   PyObject *__pyx_r = 0;
22053   __Pyx_RefNannyDeclarations
22054   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
22055   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_8__setstate_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
22056 
22057   /* function exit code */
22058   __Pyx_RefNannyFinishContext();
22059   return __pyx_r;
22060 }
22061 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)22062 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
22063   PyObject *__pyx_r = NULL;
22064   __Pyx_RefNannyDeclarations
22065   PyObject *__pyx_t_1 = NULL;
22066   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
22067 
22068   /* "(tree fragment)":4
22069  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22070  * def __setstate_cython__(self, __pyx_state):
22071  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
22072  */
22073   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
22074   __Pyx_GOTREF(__pyx_t_1);
22075   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
22076   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22077   __PYX_ERR(1, 4, __pyx_L1_error)
22078 
22079   /* "(tree fragment)":3
22080  * def __reduce_cython__(self):
22081  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22082  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
22083  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22084  */
22085 
22086   /* function exit code */
22087   __pyx_L1_error:;
22088   __Pyx_XDECREF(__pyx_t_1);
22089   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskVector.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22090   __pyx_r = NULL;
22091   __Pyx_XGIVEREF(__pyx_r);
22092   __Pyx_RefNannyFinishContext();
22093   return __pyx_r;
22094 }
22095 
22096 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1613
22097  * # Set version
22098  * cdef class SparseUnorderedBitmaskSet:
22099  *     cdef void _set(self, np.uint64_t ind):             # <<<<<<<<<<<<<<
22100  *         self.entries.insert(ind)
22101  *
22102  */
22103 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_ind)22104 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_ind) {
22105   __Pyx_RefNannyDeclarations
22106   __Pyx_RefNannySetupContext("_set", 0);
22107 
22108   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1614
22109  * cdef class SparseUnorderedBitmaskSet:
22110  *     cdef void _set(self, np.uint64_t ind):
22111  *         self.entries.insert(ind)             # <<<<<<<<<<<<<<
22112  *
22113  *     def set(self, ind):
22114  */
22115   try {
22116     __pyx_v_self->entries.insert(__pyx_v_ind);
22117   } catch(...) {
22118     __Pyx_CppExn2PyErr();
22119     __PYX_ERR(0, 1614, __pyx_L1_error)
22120   }
22121 
22122   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1613
22123  * # Set version
22124  * cdef class SparseUnorderedBitmaskSet:
22125  *     cdef void _set(self, np.uint64_t ind):             # <<<<<<<<<<<<<<
22126  *         self.entries.insert(ind)
22127  *
22128  */
22129 
22130   /* function exit code */
22131   goto __pyx_L0;
22132   __pyx_L1_error:;
22133   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskSet._set", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
22134   __pyx_L0:;
22135   __Pyx_RefNannyFinishContext();
22136 }
22137 
22138 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1616
22139  *         self.entries.insert(ind)
22140  *
22141  *     def set(self, ind):             # <<<<<<<<<<<<<<
22142  *         self._set(ind)
22143  *
22144  */
22145 
22146 /* Python wrapper */
22147 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_1set(PyObject *__pyx_v_self, PyObject *__pyx_v_ind); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_1set(PyObject * __pyx_v_self,PyObject * __pyx_v_ind)22148 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_1set(PyObject *__pyx_v_self, PyObject *__pyx_v_ind) {
22149   PyObject *__pyx_r = 0;
22150   __Pyx_RefNannyDeclarations
22151   __Pyx_RefNannySetupContext("set (wrapper)", 0);
22152   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_set(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *)__pyx_v_self), ((PyObject *)__pyx_v_ind));
22153 
22154   /* function exit code */
22155   __Pyx_RefNannyFinishContext();
22156   return __pyx_r;
22157 }
22158 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self,PyObject * __pyx_v_ind)22159 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, PyObject *__pyx_v_ind) {
22160   PyObject *__pyx_r = NULL;
22161   __Pyx_RefNannyDeclarations
22162   __pyx_t_5numpy_uint64_t __pyx_t_1;
22163   __Pyx_RefNannySetupContext("set", 0);
22164 
22165   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1617
22166  *
22167  *     def set(self, ind):
22168  *         self._set(ind)             # <<<<<<<<<<<<<<
22169  *
22170  *     cdef void _fill(self, np.uint8_t[:] mask):
22171  */
22172   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_ind); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1617, __pyx_L1_error)
22173   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_t_1);
22174 
22175   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1616
22176  *         self.entries.insert(ind)
22177  *
22178  *     def set(self, ind):             # <<<<<<<<<<<<<<
22179  *         self._set(ind)
22180  *
22181  */
22182 
22183   /* function exit code */
22184   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22185   goto __pyx_L0;
22186   __pyx_L1_error:;
22187   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskSet.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
22188   __pyx_r = NULL;
22189   __pyx_L0:;
22190   __Pyx_XGIVEREF(__pyx_r);
22191   __Pyx_RefNannyFinishContext();
22192   return __pyx_r;
22193 }
22194 
22195 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1619
22196  *         self._set(ind)
22197  *
22198  *     cdef void _fill(self, np.uint8_t[:] mask):             # <<<<<<<<<<<<<<
22199  *         for it in self.entries:
22200  *             mask[it] = 1
22201  */
22202 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self,__Pyx_memviewslice __pyx_v_mask)22203 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, __Pyx_memviewslice __pyx_v_mask) {
22204   __pyx_t_5numpy_uint64_t __pyx_v_it;
22205   __Pyx_RefNannyDeclarations
22206   std::set<__pyx_t_5numpy_uint64_t> ::iterator __pyx_t_1;
22207   std::set<__pyx_t_5numpy_uint64_t>  *__pyx_t_2;
22208   __pyx_t_5numpy_uint64_t __pyx_t_3;
22209   int __pyx_t_4;
22210   __Pyx_RefNannySetupContext("_fill", 0);
22211 
22212   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1620
22213  *
22214  *     cdef void _fill(self, np.uint8_t[:] mask):
22215  *         for it in self.entries:             # <<<<<<<<<<<<<<
22216  *             mask[it] = 1
22217  *
22218  */
22219   __pyx_t_2 = &__pyx_v_self->entries;
22220   __pyx_t_1 = __pyx_t_2->begin();
22221   for (;;) {
22222     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
22223     __pyx_t_3 = *__pyx_t_1;
22224     ++__pyx_t_1;
22225     __pyx_v_it = __pyx_t_3;
22226 
22227     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1621
22228  *     cdef void _fill(self, np.uint8_t[:] mask):
22229  *         for it in self.entries:
22230  *             mask[it] = 1             # <<<<<<<<<<<<<<
22231  *
22232  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
22233  */
22234     __pyx_t_3 = __pyx_v_it;
22235     __pyx_t_4 = -1;
22236     if (unlikely(__pyx_t_3 >= (size_t)__pyx_v_mask.shape[0])) __pyx_t_4 = 0;
22237     if (unlikely(__pyx_t_4 != -1)) {
22238       __Pyx_RaiseBufferIndexError(__pyx_t_4);
22239       __PYX_ERR(0, 1621, __pyx_L1_error)
22240     }
22241     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_mask.data + __pyx_t_3 * __pyx_v_mask.strides[0]) )) = 1;
22242 
22243     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1620
22244  *
22245  *     cdef void _fill(self, np.uint8_t[:] mask):
22246  *         for it in self.entries:             # <<<<<<<<<<<<<<
22247  *             mask[it] = 1
22248  *
22249  */
22250   }
22251 
22252   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1619
22253  *         self._set(ind)
22254  *
22255  *     cdef void _fill(self, np.uint8_t[:] mask):             # <<<<<<<<<<<<<<
22256  *         for it in self.entries:
22257  *             mask[it] = 1
22258  */
22259 
22260   /* function exit code */
22261   goto __pyx_L0;
22262   __pyx_L1_error:;
22263   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskSet._fill", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
22264   __pyx_L0:;
22265   __Pyx_RefNannyFinishContext();
22266 }
22267 
22268 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1623
22269  *             mask[it] = 1
22270  *
22271  *     cdef void _fill_ewah(self, BoolArrayCollection mm):             # <<<<<<<<<<<<<<
22272  *         for it in self.entries:
22273  *             mm._set_coarse(it)
22274  */
22275 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_mm)22276 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mm) {
22277   __pyx_t_5numpy_uint64_t __pyx_v_it;
22278   __Pyx_RefNannyDeclarations
22279   std::set<__pyx_t_5numpy_uint64_t> ::iterator __pyx_t_1;
22280   std::set<__pyx_t_5numpy_uint64_t>  *__pyx_t_2;
22281   __pyx_t_5numpy_uint64_t __pyx_t_3;
22282   __Pyx_RefNannySetupContext("_fill_ewah", 0);
22283 
22284   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1624
22285  *
22286  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
22287  *         for it in self.entries:             # <<<<<<<<<<<<<<
22288  *             mm._set_coarse(it)
22289  *
22290  */
22291   __pyx_t_2 = &__pyx_v_self->entries;
22292   __pyx_t_1 = __pyx_t_2->begin();
22293   for (;;) {
22294     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
22295     __pyx_t_3 = *__pyx_t_1;
22296     ++__pyx_t_1;
22297     __pyx_v_it = __pyx_t_3;
22298 
22299     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1625
22300  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
22301  *         for it in self.entries:
22302  *             mm._set_coarse(it)             # <<<<<<<<<<<<<<
22303  *
22304  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
22305  */
22306     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_mm->__pyx_vtab)->_set_coarse(__pyx_v_mm, __pyx_v_it);
22307 
22308     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1624
22309  *
22310  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
22311  *         for it in self.entries:             # <<<<<<<<<<<<<<
22312  *             mm._set_coarse(it)
22313  *
22314  */
22315   }
22316 
22317   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1623
22318  *             mask[it] = 1
22319  *
22320  *     cdef void _fill_ewah(self, BoolArrayCollection mm):             # <<<<<<<<<<<<<<
22321  *         for it in self.entries:
22322  *             mm._set_coarse(it)
22323  */
22324 
22325   /* function exit code */
22326   __Pyx_RefNannyFinishContext();
22327 }
22328 
22329 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1627
22330  *             mm._set_coarse(it)
22331  *
22332  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):             # <<<<<<<<<<<<<<
22333  *         for it in self.entries:
22334  *             mm._set_coarse(it)
22335  */
22336 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_mm)22337 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_mm) {
22338   __pyx_t_5numpy_uint64_t __pyx_v_it;
22339   __Pyx_RefNannyDeclarations
22340   std::set<__pyx_t_5numpy_uint64_t> ::iterator __pyx_t_1;
22341   std::set<__pyx_t_5numpy_uint64_t>  *__pyx_t_2;
22342   __pyx_t_5numpy_uint64_t __pyx_t_3;
22343   __Pyx_RefNannySetupContext("_fill_bool", 0);
22344 
22345   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1628
22346  *
22347  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
22348  *         for it in self.entries:             # <<<<<<<<<<<<<<
22349  *             mm._set_coarse(it)
22350  *
22351  */
22352   __pyx_t_2 = &__pyx_v_self->entries;
22353   __pyx_t_1 = __pyx_t_2->begin();
22354   for (;;) {
22355     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
22356     __pyx_t_3 = *__pyx_t_1;
22357     ++__pyx_t_1;
22358     __pyx_v_it = __pyx_t_3;
22359 
22360     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1629
22361  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
22362  *         for it in self.entries:
22363  *             mm._set_coarse(it)             # <<<<<<<<<<<<<<
22364  *
22365  *     cdef void _reset(self):
22366  */
22367     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_mm->__pyx_vtab)->_set_coarse(__pyx_v_mm, __pyx_v_it);
22368 
22369     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1628
22370  *
22371  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
22372  *         for it in self.entries:             # <<<<<<<<<<<<<<
22373  *             mm._set_coarse(it)
22374  *
22375  */
22376   }
22377 
22378   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1627
22379  *             mm._set_coarse(it)
22380  *
22381  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):             # <<<<<<<<<<<<<<
22382  *         for it in self.entries:
22383  *             mm._set_coarse(it)
22384  */
22385 
22386   /* function exit code */
22387   __Pyx_RefNannyFinishContext();
22388 }
22389 
22390 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1631
22391  *             mm._set_coarse(it)
22392  *
22393  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
22394  *         self.entries.clear()
22395  *
22396  */
22397 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self)22398 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self) {
22399   __Pyx_RefNannyDeclarations
22400   __Pyx_RefNannySetupContext("_reset", 0);
22401 
22402   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1632
22403  *
22404  *     cdef void _reset(self):
22405  *         self.entries.clear()             # <<<<<<<<<<<<<<
22406  *
22407  *     cdef to_array(self):
22408  */
22409   __pyx_v_self->entries.clear();
22410 
22411   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1631
22412  *             mm._set_coarse(it)
22413  *
22414  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
22415  *         self.entries.clear()
22416  *
22417  */
22418 
22419   /* function exit code */
22420   __Pyx_RefNannyFinishContext();
22421 }
22422 
22423 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1634
22424  *         self.entries.clear()
22425  *
22426  *     cdef to_array(self):             # <<<<<<<<<<<<<<
22427  *         cdef np.uint64_t ind
22428  *         cdef np.ndarray[np.uint64_t, ndim=1] rv
22429  */
22430 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self)22431 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self) {
22432   __pyx_t_5numpy_uint64_t __pyx_v_ind;
22433   PyArrayObject *__pyx_v_rv = 0;
22434   std::set<__pyx_t_5numpy_uint64_t> ::iterator __pyx_v_it;
22435   PyObject *__pyx_v_i = NULL;
22436   __Pyx_LocalBuf_ND __pyx_pybuffernd_rv;
22437   __Pyx_Buffer __pyx_pybuffer_rv;
22438   PyObject *__pyx_r = NULL;
22439   __Pyx_RefNannyDeclarations
22440   PyObject *__pyx_t_1 = NULL;
22441   PyObject *__pyx_t_2 = NULL;
22442   PyObject *__pyx_t_3 = NULL;
22443   PyObject *__pyx_t_4 = NULL;
22444   PyArrayObject *__pyx_t_5 = NULL;
22445   int __pyx_t_6;
22446   PyObject *__pyx_t_7 = NULL;
22447   PyObject *__pyx_t_8 = NULL;
22448   PyObject *__pyx_t_9 = NULL;
22449   int __pyx_t_10;
22450   __Pyx_RefNannySetupContext("to_array", 0);
22451   __pyx_pybuffer_rv.pybuffer.buf = NULL;
22452   __pyx_pybuffer_rv.refcount = 0;
22453   __pyx_pybuffernd_rv.data = NULL;
22454   __pyx_pybuffernd_rv.rcbuffer = &__pyx_pybuffer_rv;
22455 
22456   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1638
22457  *         cdef np.ndarray[np.uint64_t, ndim=1] rv
22458  *         cdef cset[np.uint64_t].iterator it
22459  *         rv = np.empty(self.entries.size(), dtype='uint64')             # <<<<<<<<<<<<<<
22460  *         it = self.entries.begin()
22461  *         i = 0
22462  */
22463   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1638, __pyx_L1_error)
22464   __Pyx_GOTREF(__pyx_t_1);
22465   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1638, __pyx_L1_error)
22466   __Pyx_GOTREF(__pyx_t_2);
22467   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22468   __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->entries.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1638, __pyx_L1_error)
22469   __Pyx_GOTREF(__pyx_t_1);
22470   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1638, __pyx_L1_error)
22471   __Pyx_GOTREF(__pyx_t_3);
22472   __Pyx_GIVEREF(__pyx_t_1);
22473   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
22474   __pyx_t_1 = 0;
22475   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1638, __pyx_L1_error)
22476   __Pyx_GOTREF(__pyx_t_1);
22477   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_uint64) < 0) __PYX_ERR(0, 1638, __pyx_L1_error)
22478   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1638, __pyx_L1_error)
22479   __Pyx_GOTREF(__pyx_t_4);
22480   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22481   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22482   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22483   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1638, __pyx_L1_error)
22484   __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
22485   {
22486     __Pyx_BufFmt_StackElem __pyx_stack[1];
22487     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
22488     __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rv.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
22489     if (unlikely(__pyx_t_6 < 0)) {
22490       PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
22491       if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rv.rcbuffer->pybuffer, (PyObject*)__pyx_v_rv, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
22492         Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
22493         __Pyx_RaiseBufferFallbackError();
22494       } else {
22495         PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
22496       }
22497       __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
22498     }
22499     __pyx_pybuffernd_rv.diminfo[0].strides = __pyx_pybuffernd_rv.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rv.diminfo[0].shape = __pyx_pybuffernd_rv.rcbuffer->pybuffer.shape[0];
22500     if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1638, __pyx_L1_error)
22501   }
22502   __pyx_t_5 = 0;
22503   __pyx_v_rv = ((PyArrayObject *)__pyx_t_4);
22504   __pyx_t_4 = 0;
22505 
22506   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1639
22507  *         cdef cset[np.uint64_t].iterator it
22508  *         rv = np.empty(self.entries.size(), dtype='uint64')
22509  *         it = self.entries.begin()             # <<<<<<<<<<<<<<
22510  *         i = 0
22511  *         while it != self.entries.end():
22512  */
22513   __pyx_v_it = __pyx_v_self->entries.begin();
22514 
22515   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1640
22516  *         rv = np.empty(self.entries.size(), dtype='uint64')
22517  *         it = self.entries.begin()
22518  *         i = 0             # <<<<<<<<<<<<<<
22519  *         while it != self.entries.end():
22520  *             ind = dereference(it)
22521  */
22522   __Pyx_INCREF(__pyx_int_0);
22523   __pyx_v_i = __pyx_int_0;
22524 
22525   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1641
22526  *         it = self.entries.begin()
22527  *         i = 0
22528  *         while it != self.entries.end():             # <<<<<<<<<<<<<<
22529  *             ind = dereference(it)
22530  *             rv[i] = ind
22531  */
22532   while (1) {
22533     __pyx_t_10 = ((__pyx_v_it != __pyx_v_self->entries.end()) != 0);
22534     if (!__pyx_t_10) break;
22535 
22536     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1642
22537  *         i = 0
22538  *         while it != self.entries.end():
22539  *             ind = dereference(it)             # <<<<<<<<<<<<<<
22540  *             rv[i] = ind
22541  *             preincrement(it)
22542  */
22543     __pyx_v_ind = (*__pyx_v_it);
22544 
22545     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1643
22546  *         while it != self.entries.end():
22547  *             ind = dereference(it)
22548  *             rv[i] = ind             # <<<<<<<<<<<<<<
22549  *             preincrement(it)
22550  *             i += 1
22551  */
22552     __pyx_t_4 = __Pyx_PyInt_From_npy_uint64(__pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error)
22553     __Pyx_GOTREF(__pyx_t_4);
22554     if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_rv), __pyx_v_i, __pyx_t_4) < 0)) __PYX_ERR(0, 1643, __pyx_L1_error)
22555     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22556 
22557     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1644
22558  *             ind = dereference(it)
22559  *             rv[i] = ind
22560  *             preincrement(it)             # <<<<<<<<<<<<<<
22561  *             i += 1
22562  *         return rv
22563  */
22564     (void)((++__pyx_v_it));
22565 
22566     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1645
22567  *             rv[i] = ind
22568  *             preincrement(it)
22569  *             i += 1             # <<<<<<<<<<<<<<
22570  *         return rv
22571  *
22572  */
22573     __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1645, __pyx_L1_error)
22574     __Pyx_GOTREF(__pyx_t_4);
22575     __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_4);
22576     __pyx_t_4 = 0;
22577   }
22578 
22579   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1646
22580  *             preincrement(it)
22581  *             i += 1
22582  *         return rv             # <<<<<<<<<<<<<<
22583  *
22584  *     def __dealloc__(self):
22585  */
22586   __Pyx_XDECREF(__pyx_r);
22587   __Pyx_INCREF(((PyObject *)__pyx_v_rv));
22588   __pyx_r = ((PyObject *)__pyx_v_rv);
22589   goto __pyx_L0;
22590 
22591   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1634
22592  *         self.entries.clear()
22593  *
22594  *     cdef to_array(self):             # <<<<<<<<<<<<<<
22595  *         cdef np.uint64_t ind
22596  *         cdef np.ndarray[np.uint64_t, ndim=1] rv
22597  */
22598 
22599   /* function exit code */
22600   __pyx_L1_error:;
22601   __Pyx_XDECREF(__pyx_t_1);
22602   __Pyx_XDECREF(__pyx_t_2);
22603   __Pyx_XDECREF(__pyx_t_3);
22604   __Pyx_XDECREF(__pyx_t_4);
22605   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
22606     __Pyx_PyThreadState_declare
22607     __Pyx_PyThreadState_assign
22608     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
22609     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
22610   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
22611   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskSet.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
22612   __pyx_r = 0;
22613   goto __pyx_L2;
22614   __pyx_L0:;
22615   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
22616   __pyx_L2:;
22617   __Pyx_XDECREF((PyObject *)__pyx_v_rv);
22618   __Pyx_XDECREF(__pyx_v_i);
22619   __Pyx_XGIVEREF(__pyx_r);
22620   __Pyx_RefNannyFinishContext();
22621   return __pyx_r;
22622 }
22623 
22624 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1648
22625  *         return rv
22626  *
22627  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
22628  *         self.entries.clear()
22629  *
22630  */
22631 
22632 /* Python wrapper */
22633 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_3__dealloc__(PyObject * __pyx_v_self)22634 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_3__dealloc__(PyObject *__pyx_v_self) {
22635   __Pyx_RefNannyDeclarations
22636   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
22637   __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_2__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *)__pyx_v_self));
22638 
22639   /* function exit code */
22640   __Pyx_RefNannyFinishContext();
22641 }
22642 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_2__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self)22643 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_2__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self) {
22644   __Pyx_RefNannyDeclarations
22645   __Pyx_RefNannySetupContext("__dealloc__", 0);
22646 
22647   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1649
22648  *
22649  *     def __dealloc__(self):
22650  *         self.entries.clear()             # <<<<<<<<<<<<<<
22651  *
22652  * # vector version
22653  */
22654   __pyx_v_self->entries.clear();
22655 
22656   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1648
22657  *         return rv
22658  *
22659  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
22660  *         self.entries.clear()
22661  *
22662  */
22663 
22664   /* function exit code */
22665   __Pyx_RefNannyFinishContext();
22666 }
22667 
22668 /* "(tree fragment)":1
22669  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
22670  *     cdef tuple state
22671  *     cdef object _dict
22672  */
22673 
22674 /* Python wrapper */
22675 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)22676 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
22677   PyObject *__pyx_r = 0;
22678   __Pyx_RefNannyDeclarations
22679   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
22680   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_4__reduce_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *)__pyx_v_self));
22681 
22682   /* function exit code */
22683   __Pyx_RefNannyFinishContext();
22684   return __pyx_r;
22685 }
22686 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_4__reduce_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self)22687 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_4__reduce_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self) {
22688   PyObject *__pyx_v_state = 0;
22689   PyObject *__pyx_v__dict = 0;
22690   int __pyx_v_use_setstate;
22691   PyObject *__pyx_r = NULL;
22692   __Pyx_RefNannyDeclarations
22693   PyObject *__pyx_t_1 = NULL;
22694   PyObject *__pyx_t_2 = NULL;
22695   int __pyx_t_3;
22696   int __pyx_t_4;
22697   PyObject *__pyx_t_5 = NULL;
22698   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
22699 
22700   /* "(tree fragment)":5
22701  *     cdef object _dict
22702  *     cdef bint use_setstate
22703  *     state = (self.entries,)             # <<<<<<<<<<<<<<
22704  *     _dict = getattr(self, '__dict__', None)
22705  *     if _dict is not None:
22706  */
22707   __pyx_t_1 = __pyx_convert_set_to_py___pyx_t_5numpy_uint64_t(__pyx_v_self->entries); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
22708   __Pyx_GOTREF(__pyx_t_1);
22709   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
22710   __Pyx_GOTREF(__pyx_t_2);
22711   __Pyx_GIVEREF(__pyx_t_1);
22712   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
22713   __pyx_t_1 = 0;
22714   __pyx_v_state = ((PyObject*)__pyx_t_2);
22715   __pyx_t_2 = 0;
22716 
22717   /* "(tree fragment)":6
22718  *     cdef bint use_setstate
22719  *     state = (self.entries,)
22720  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
22721  *     if _dict is not None:
22722  *         state += (_dict,)
22723  */
22724   __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
22725   __Pyx_GOTREF(__pyx_t_2);
22726   __pyx_v__dict = __pyx_t_2;
22727   __pyx_t_2 = 0;
22728 
22729   /* "(tree fragment)":7
22730  *     state = (self.entries,)
22731  *     _dict = getattr(self, '__dict__', None)
22732  *     if _dict is not None:             # <<<<<<<<<<<<<<
22733  *         state += (_dict,)
22734  *         use_setstate = True
22735  */
22736   __pyx_t_3 = (__pyx_v__dict != Py_None);
22737   __pyx_t_4 = (__pyx_t_3 != 0);
22738   if (__pyx_t_4) {
22739 
22740     /* "(tree fragment)":8
22741  *     _dict = getattr(self, '__dict__', None)
22742  *     if _dict is not None:
22743  *         state += (_dict,)             # <<<<<<<<<<<<<<
22744  *         use_setstate = True
22745  *     else:
22746  */
22747     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
22748     __Pyx_GOTREF(__pyx_t_2);
22749     __Pyx_INCREF(__pyx_v__dict);
22750     __Pyx_GIVEREF(__pyx_v__dict);
22751     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
22752     __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
22753     __Pyx_GOTREF(__pyx_t_1);
22754     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22755     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
22756     __pyx_t_1 = 0;
22757 
22758     /* "(tree fragment)":9
22759  *     if _dict is not None:
22760  *         state += (_dict,)
22761  *         use_setstate = True             # <<<<<<<<<<<<<<
22762  *     else:
22763  *         use_setstate = False
22764  */
22765     __pyx_v_use_setstate = 1;
22766 
22767     /* "(tree fragment)":7
22768  *     state = (self.entries,)
22769  *     _dict = getattr(self, '__dict__', None)
22770  *     if _dict is not None:             # <<<<<<<<<<<<<<
22771  *         state += (_dict,)
22772  *         use_setstate = True
22773  */
22774     goto __pyx_L3;
22775   }
22776 
22777   /* "(tree fragment)":11
22778  *         use_setstate = True
22779  *     else:
22780  *         use_setstate = False             # <<<<<<<<<<<<<<
22781  *     if use_setstate:
22782  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, None), state
22783  */
22784   /*else*/ {
22785     __pyx_v_use_setstate = 0;
22786   }
22787   __pyx_L3:;
22788 
22789   /* "(tree fragment)":12
22790  *     else:
22791  *         use_setstate = False
22792  *     if use_setstate:             # <<<<<<<<<<<<<<
22793  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, None), state
22794  *     else:
22795  */
22796   __pyx_t_4 = (__pyx_v_use_setstate != 0);
22797   if (__pyx_t_4) {
22798 
22799     /* "(tree fragment)":13
22800  *         use_setstate = False
22801  *     if use_setstate:
22802  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, None), state             # <<<<<<<<<<<<<<
22803  *     else:
22804  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, state)
22805  */
22806     __Pyx_XDECREF(__pyx_r);
22807     __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_SparseUnorderedBi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
22808     __Pyx_GOTREF(__pyx_t_1);
22809     __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
22810     __Pyx_GOTREF(__pyx_t_2);
22811     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22812     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22813     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22814     __Pyx_INCREF(__pyx_int_100460822);
22815     __Pyx_GIVEREF(__pyx_int_100460822);
22816     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_100460822);
22817     __Pyx_INCREF(Py_None);
22818     __Pyx_GIVEREF(Py_None);
22819     PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
22820     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
22821     __Pyx_GOTREF(__pyx_t_5);
22822     __Pyx_GIVEREF(__pyx_t_1);
22823     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
22824     __Pyx_GIVEREF(__pyx_t_2);
22825     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
22826     __Pyx_INCREF(__pyx_v_state);
22827     __Pyx_GIVEREF(__pyx_v_state);
22828     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
22829     __pyx_t_1 = 0;
22830     __pyx_t_2 = 0;
22831     __pyx_r = __pyx_t_5;
22832     __pyx_t_5 = 0;
22833     goto __pyx_L0;
22834 
22835     /* "(tree fragment)":12
22836  *     else:
22837  *         use_setstate = False
22838  *     if use_setstate:             # <<<<<<<<<<<<<<
22839  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, None), state
22840  *     else:
22841  */
22842   }
22843 
22844   /* "(tree fragment)":15
22845  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, None), state
22846  *     else:
22847  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, state)             # <<<<<<<<<<<<<<
22848  * def __setstate_cython__(self, __pyx_state):
22849  *     __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(self, __pyx_state)
22850  */
22851   /*else*/ {
22852     __Pyx_XDECREF(__pyx_r);
22853     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_SparseUnorderedBi); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
22854     __Pyx_GOTREF(__pyx_t_5);
22855     __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
22856     __Pyx_GOTREF(__pyx_t_2);
22857     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22858     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22859     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22860     __Pyx_INCREF(__pyx_int_100460822);
22861     __Pyx_GIVEREF(__pyx_int_100460822);
22862     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_100460822);
22863     __Pyx_INCREF(__pyx_v_state);
22864     __Pyx_GIVEREF(__pyx_v_state);
22865     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
22866     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
22867     __Pyx_GOTREF(__pyx_t_1);
22868     __Pyx_GIVEREF(__pyx_t_5);
22869     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
22870     __Pyx_GIVEREF(__pyx_t_2);
22871     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
22872     __pyx_t_5 = 0;
22873     __pyx_t_2 = 0;
22874     __pyx_r = __pyx_t_1;
22875     __pyx_t_1 = 0;
22876     goto __pyx_L0;
22877   }
22878 
22879   /* "(tree fragment)":1
22880  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
22881  *     cdef tuple state
22882  *     cdef object _dict
22883  */
22884 
22885   /* function exit code */
22886   __pyx_L1_error:;
22887   __Pyx_XDECREF(__pyx_t_1);
22888   __Pyx_XDECREF(__pyx_t_2);
22889   __Pyx_XDECREF(__pyx_t_5);
22890   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22891   __pyx_r = NULL;
22892   __pyx_L0:;
22893   __Pyx_XDECREF(__pyx_v_state);
22894   __Pyx_XDECREF(__pyx_v__dict);
22895   __Pyx_XGIVEREF(__pyx_r);
22896   __Pyx_RefNannyFinishContext();
22897   return __pyx_r;
22898 }
22899 
22900 /* "(tree fragment)":16
22901  *     else:
22902  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, state)
22903  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
22904  *     __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(self, __pyx_state)
22905  */
22906 
22907 /* Python wrapper */
22908 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)22909 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22910   PyObject *__pyx_r = 0;
22911   __Pyx_RefNannyDeclarations
22912   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
22913   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_6__setstate_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
22914 
22915   /* function exit code */
22916   __Pyx_RefNannyFinishContext();
22917   return __pyx_r;
22918 }
22919 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_6__setstate_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v_self,PyObject * __pyx_v___pyx_state)22920 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_6__setstate_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22921   PyObject *__pyx_r = NULL;
22922   __Pyx_RefNannyDeclarations
22923   PyObject *__pyx_t_1 = NULL;
22924   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
22925 
22926   /* "(tree fragment)":17
22927  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, state)
22928  * def __setstate_cython__(self, __pyx_state):
22929  *     __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
22930  */
22931   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(1, 17, __pyx_L1_error)
22932   __pyx_t_1 = __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
22933   __Pyx_GOTREF(__pyx_t_1);
22934   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22935 
22936   /* "(tree fragment)":16
22937  *     else:
22938  *         return __pyx_unpickle_SparseUnorderedBitmaskSet, (type(self), 0x5fce916, state)
22939  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
22940  *     __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(self, __pyx_state)
22941  */
22942 
22943   /* function exit code */
22944   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22945   goto __pyx_L0;
22946   __pyx_L1_error:;
22947   __Pyx_XDECREF(__pyx_t_1);
22948   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22949   __pyx_r = NULL;
22950   __pyx_L0:;
22951   __Pyx_XGIVEREF(__pyx_r);
22952   __Pyx_RefNannyFinishContext();
22953   return __pyx_r;
22954 }
22955 
22956 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1653
22957  * # vector version
22958  * cdef class SparseUnorderedRefinedBitmaskVector:
22959  *     def __cinit__(self):             # <<<<<<<<<<<<<<
22960  *         self.total = 0
22961  *
22962  */
22963 
22964 /* Python wrapper */
22965 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_1__cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)22966 static int __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22967   int __pyx_r;
22968   __Pyx_RefNannyDeclarations
22969   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
22970   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
22971     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
22972   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
22973   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self));
22974 
22975   /* function exit code */
22976   __Pyx_RefNannyFinishContext();
22977   return __pyx_r;
22978 }
22979 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self)22980 static int __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector___cinit__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self) {
22981   int __pyx_r;
22982   __Pyx_RefNannyDeclarations
22983   __Pyx_RefNannySetupContext("__cinit__", 0);
22984 
22985   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1654
22986  * cdef class SparseUnorderedRefinedBitmaskVector:
22987  *     def __cinit__(self):
22988  *         self.total = 0             # <<<<<<<<<<<<<<
22989  *
22990  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2):
22991  */
22992   __pyx_v_self->total = 0;
22993 
22994   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1653
22995  * # vector version
22996  * cdef class SparseUnorderedRefinedBitmaskVector:
22997  *     def __cinit__(self):             # <<<<<<<<<<<<<<
22998  *         self.total = 0
22999  *
23000  */
23001 
23002   /* function exit code */
23003   __pyx_r = 0;
23004   __Pyx_RefNannyFinishContext();
23005   return __pyx_r;
23006 }
23007 
23008 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1656
23009  *         self.total = 0
23010  *
23011  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2):             # <<<<<<<<<<<<<<
23012  *         cdef ind_pair ind
23013  *         ind.first = ind1
23014  */
23015 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_ind1,__pyx_t_5numpy_uint64_t __pyx_v_ind2)23016 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_ind1, __pyx_t_5numpy_uint64_t __pyx_v_ind2) {
23017   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_ind;
23018   __Pyx_RefNannyDeclarations
23019   __Pyx_RefNannySetupContext("_set", 0);
23020 
23021   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1658
23022  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2):
23023  *         cdef ind_pair ind
23024  *         ind.first = ind1             # <<<<<<<<<<<<<<
23025  *         ind.second = ind2
23026  *         self.entries.push_back(ind)
23027  */
23028   __pyx_v_ind.first = __pyx_v_ind1;
23029 
23030   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1659
23031  *         cdef ind_pair ind
23032  *         ind.first = ind1
23033  *         ind.second = ind2             # <<<<<<<<<<<<<<
23034  *         self.entries.push_back(ind)
23035  *         self.total += 1
23036  */
23037   __pyx_v_ind.second = __pyx_v_ind2;
23038 
23039   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1660
23040  *         ind.first = ind1
23041  *         ind.second = ind2
23042  *         self.entries.push_back(ind)             # <<<<<<<<<<<<<<
23043  *         self.total += 1
23044  *
23045  */
23046   try {
23047     __pyx_v_self->entries.push_back(__pyx_v_ind);
23048   } catch(...) {
23049     __Pyx_CppExn2PyErr();
23050     __PYX_ERR(0, 1660, __pyx_L1_error)
23051   }
23052 
23053   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1661
23054  *         ind.second = ind2
23055  *         self.entries.push_back(ind)
23056  *         self.total += 1             # <<<<<<<<<<<<<<
23057  *
23058  *     def set(self, ind1, ind2):
23059  */
23060   __pyx_v_self->total = (__pyx_v_self->total + 1);
23061 
23062   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1656
23063  *         self.total = 0
23064  *
23065  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2):             # <<<<<<<<<<<<<<
23066  *         cdef ind_pair ind
23067  *         ind.first = ind1
23068  */
23069 
23070   /* function exit code */
23071   goto __pyx_L0;
23072   __pyx_L1_error:;
23073   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskVector._set", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
23074   __pyx_L0:;
23075   __Pyx_RefNannyFinishContext();
23076 }
23077 
23078 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1663
23079  *         self.total += 1
23080  *
23081  *     def set(self, ind1, ind2):             # <<<<<<<<<<<<<<
23082  *         self._set(ind1, ind2)
23083  *
23084  */
23085 
23086 /* Python wrapper */
23087 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_3set(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)23088 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23089   PyObject *__pyx_v_ind1 = 0;
23090   PyObject *__pyx_v_ind2 = 0;
23091   PyObject *__pyx_r = 0;
23092   __Pyx_RefNannyDeclarations
23093   __Pyx_RefNannySetupContext("set (wrapper)", 0);
23094   {
23095     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind1,&__pyx_n_s_ind2,0};
23096     PyObject* values[2] = {0,0};
23097     if (unlikely(__pyx_kwds)) {
23098       Py_ssize_t kw_args;
23099       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23100       switch (pos_args) {
23101         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23102         CYTHON_FALLTHROUGH;
23103         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23104         CYTHON_FALLTHROUGH;
23105         case  0: break;
23106         default: goto __pyx_L5_argtuple_error;
23107       }
23108       kw_args = PyDict_Size(__pyx_kwds);
23109       switch (pos_args) {
23110         case  0:
23111         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ind1)) != 0)) kw_args--;
23112         else goto __pyx_L5_argtuple_error;
23113         CYTHON_FALLTHROUGH;
23114         case  1:
23115         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ind2)) != 0)) kw_args--;
23116         else {
23117           __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1663, __pyx_L3_error)
23118         }
23119       }
23120       if (unlikely(kw_args > 0)) {
23121         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1663, __pyx_L3_error)
23122       }
23123     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
23124       goto __pyx_L5_argtuple_error;
23125     } else {
23126       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23127       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23128     }
23129     __pyx_v_ind1 = values[0];
23130     __pyx_v_ind2 = values[1];
23131   }
23132   goto __pyx_L4_argument_unpacking_done;
23133   __pyx_L5_argtuple_error:;
23134   __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1663, __pyx_L3_error)
23135   __pyx_L3_error:;
23136   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskVector.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
23137   __Pyx_RefNannyFinishContext();
23138   return NULL;
23139   __pyx_L4_argument_unpacking_done:;
23140   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_2set(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self), __pyx_v_ind1, __pyx_v_ind2);
23141 
23142   /* function exit code */
23143   __Pyx_RefNannyFinishContext();
23144   return __pyx_r;
23145 }
23146 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_2set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self,PyObject * __pyx_v_ind1,PyObject * __pyx_v_ind2)23147 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_2set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, PyObject *__pyx_v_ind1, PyObject *__pyx_v_ind2) {
23148   PyObject *__pyx_r = NULL;
23149   __Pyx_RefNannyDeclarations
23150   __pyx_t_5numpy_uint64_t __pyx_t_1;
23151   __pyx_t_5numpy_uint64_t __pyx_t_2;
23152   __Pyx_RefNannySetupContext("set", 0);
23153 
23154   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1664
23155  *
23156  *     def set(self, ind1, ind2):
23157  *         self._set(ind1, ind2)             # <<<<<<<<<<<<<<
23158  *
23159  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):
23160  */
23161   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_ind1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1664, __pyx_L1_error)
23162   __pyx_t_2 = __Pyx_PyInt_As_npy_uint64(__pyx_v_ind2); if (unlikely((__pyx_t_2 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1664, __pyx_L1_error)
23163   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_t_1, __pyx_t_2);
23164 
23165   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1663
23166  *         self.total += 1
23167  *
23168  *     def set(self, ind1, ind2):             # <<<<<<<<<<<<<<
23169  *         self._set(ind1, ind2)
23170  *
23171  */
23172 
23173   /* function exit code */
23174   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23175   goto __pyx_L0;
23176   __pyx_L1_error:;
23177   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskVector.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
23178   __pyx_r = NULL;
23179   __pyx_L0:;
23180   __Pyx_XGIVEREF(__pyx_r);
23181   __Pyx_RefNannyFinishContext();
23182   return __pyx_r;
23183 }
23184 
23185 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1666
23186  *         self._set(ind1, ind2)
23187  *
23188  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):             # <<<<<<<<<<<<<<
23189  *         for it in self.entries:
23190  *             mask1[it.first] = mask2[it.second] = 1
23191  */
23192 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self,__Pyx_memviewslice __pyx_v_mask1,__Pyx_memviewslice __pyx_v_mask2)23193 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, __Pyx_memviewslice __pyx_v_mask1, __Pyx_memviewslice __pyx_v_mask2) {
23194   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_it;
23195   __Pyx_RefNannyDeclarations
23196   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_t_1;
23197   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  *__pyx_t_2;
23198   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_3;
23199   __pyx_t_5numpy_uint64_t __pyx_t_4;
23200   int __pyx_t_5;
23201   __pyx_t_5numpy_uint64_t __pyx_t_6;
23202   __Pyx_RefNannySetupContext("_fill", 0);
23203 
23204   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1667
23205  *
23206  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):
23207  *         for it in self.entries:             # <<<<<<<<<<<<<<
23208  *             mask1[it.first] = mask2[it.second] = 1
23209  *
23210  */
23211   __pyx_t_2 = &__pyx_v_self->entries;
23212   __pyx_t_1 = __pyx_t_2->begin();
23213   for (;;) {
23214     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
23215     __pyx_t_3 = *__pyx_t_1;
23216     ++__pyx_t_1;
23217     __pyx_v_it = __pyx_t_3;
23218 
23219     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1668
23220  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):
23221  *         for it in self.entries:
23222  *             mask1[it.first] = mask2[it.second] = 1             # <<<<<<<<<<<<<<
23223  *
23224  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
23225  */
23226     __pyx_t_4 = __pyx_v_it.first;
23227     __pyx_t_5 = -1;
23228     if (unlikely(__pyx_t_4 >= (size_t)__pyx_v_mask1.shape[0])) __pyx_t_5 = 0;
23229     if (unlikely(__pyx_t_5 != -1)) {
23230       __Pyx_RaiseBufferIndexError(__pyx_t_5);
23231       __PYX_ERR(0, 1668, __pyx_L1_error)
23232     }
23233     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_mask1.data + __pyx_t_4 * __pyx_v_mask1.strides[0]) )) = 1;
23234     __pyx_t_6 = __pyx_v_it.second;
23235     __pyx_t_5 = -1;
23236     if (unlikely(__pyx_t_6 >= (size_t)__pyx_v_mask2.shape[0])) __pyx_t_5 = 0;
23237     if (unlikely(__pyx_t_5 != -1)) {
23238       __Pyx_RaiseBufferIndexError(__pyx_t_5);
23239       __PYX_ERR(0, 1668, __pyx_L1_error)
23240     }
23241     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_mask2.data + __pyx_t_6 * __pyx_v_mask2.strides[0]) )) = 1;
23242 
23243     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1667
23244  *
23245  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):
23246  *         for it in self.entries:             # <<<<<<<<<<<<<<
23247  *             mask1[it.first] = mask2[it.second] = 1
23248  *
23249  */
23250   }
23251 
23252   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1666
23253  *         self._set(ind1, ind2)
23254  *
23255  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):             # <<<<<<<<<<<<<<
23256  *         for it in self.entries:
23257  *             mask1[it.first] = mask2[it.second] = 1
23258  */
23259 
23260   /* function exit code */
23261   goto __pyx_L0;
23262   __pyx_L1_error:;
23263   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskVector._fill", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
23264   __pyx_L0:;
23265   __Pyx_RefNannyFinishContext();
23266 }
23267 
23268 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1670
23269  *             mask1[it.first] = mask2[it.second] = 1
23270  *
23271  *     cdef void _fill_ewah(self, BoolArrayCollection mm):             # <<<<<<<<<<<<<<
23272  *         self._remove_duplicates()
23273  *         for it in self.entries:
23274  */
23275 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_mm)23276 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mm) {
23277   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_it;
23278   __Pyx_RefNannyDeclarations
23279   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_t_1;
23280   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  *__pyx_t_2;
23281   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_3;
23282   __Pyx_RefNannySetupContext("_fill_ewah", 0);
23283 
23284   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1671
23285  *
23286  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
23287  *         self._remove_duplicates()             # <<<<<<<<<<<<<<
23288  *         for it in self.entries:
23289  *             mm._set_refined(it.first, it.second)
23290  */
23291   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_remove_duplicates(__pyx_v_self);
23292 
23293   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1672
23294  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
23295  *         self._remove_duplicates()
23296  *         for it in self.entries:             # <<<<<<<<<<<<<<
23297  *             mm._set_refined(it.first, it.second)
23298  *
23299  */
23300   __pyx_t_2 = &__pyx_v_self->entries;
23301   __pyx_t_1 = __pyx_t_2->begin();
23302   for (;;) {
23303     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
23304     __pyx_t_3 = *__pyx_t_1;
23305     ++__pyx_t_1;
23306     __pyx_v_it = __pyx_t_3;
23307 
23308     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1673
23309  *         self._remove_duplicates()
23310  *         for it in self.entries:
23311  *             mm._set_refined(it.first, it.second)             # <<<<<<<<<<<<<<
23312  *
23313  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
23314  */
23315     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_mm->__pyx_vtab)->_set_refined(__pyx_v_mm, __pyx_v_it.first, __pyx_v_it.second);
23316 
23317     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1672
23318  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
23319  *         self._remove_duplicates()
23320  *         for it in self.entries:             # <<<<<<<<<<<<<<
23321  *             mm._set_refined(it.first, it.second)
23322  *
23323  */
23324   }
23325 
23326   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1670
23327  *             mask1[it.first] = mask2[it.second] = 1
23328  *
23329  *     cdef void _fill_ewah(self, BoolArrayCollection mm):             # <<<<<<<<<<<<<<
23330  *         self._remove_duplicates()
23331  *         for it in self.entries:
23332  */
23333 
23334   /* function exit code */
23335   __Pyx_RefNannyFinishContext();
23336 }
23337 
23338 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1675
23339  *             mm._set_refined(it.first, it.second)
23340  *
23341  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):             # <<<<<<<<<<<<<<
23342  *         self._remove_duplicates()
23343  *         for it in self.entries:
23344  */
23345 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_mm)23346 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_mm) {
23347   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_it;
23348   __Pyx_RefNannyDeclarations
23349   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_t_1;
23350   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  *__pyx_t_2;
23351   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_3;
23352   __Pyx_RefNannySetupContext("_fill_bool", 0);
23353 
23354   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1676
23355  *
23356  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
23357  *         self._remove_duplicates()             # <<<<<<<<<<<<<<
23358  *         for it in self.entries:
23359  *             mm._set_refined(it.first, it.second)
23360  */
23361   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_remove_duplicates(__pyx_v_self);
23362 
23363   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1677
23364  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
23365  *         self._remove_duplicates()
23366  *         for it in self.entries:             # <<<<<<<<<<<<<<
23367  *             mm._set_refined(it.first, it.second)
23368  *
23369  */
23370   __pyx_t_2 = &__pyx_v_self->entries;
23371   __pyx_t_1 = __pyx_t_2->begin();
23372   for (;;) {
23373     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
23374     __pyx_t_3 = *__pyx_t_1;
23375     ++__pyx_t_1;
23376     __pyx_v_it = __pyx_t_3;
23377 
23378     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1678
23379  *         self._remove_duplicates()
23380  *         for it in self.entries:
23381  *             mm._set_refined(it.first, it.second)             # <<<<<<<<<<<<<<
23382  *
23383  *     cdef void _reset(self):
23384  */
23385     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_mm->__pyx_vtab)->_set_refined(__pyx_v_mm, __pyx_v_it.first, __pyx_v_it.second);
23386 
23387     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1677
23388  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
23389  *         self._remove_duplicates()
23390  *         for it in self.entries:             # <<<<<<<<<<<<<<
23391  *             mm._set_refined(it.first, it.second)
23392  *
23393  */
23394   }
23395 
23396   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1675
23397  *             mm._set_refined(it.first, it.second)
23398  *
23399  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):             # <<<<<<<<<<<<<<
23400  *         self._remove_duplicates()
23401  *         for it in self.entries:
23402  */
23403 
23404   /* function exit code */
23405   __Pyx_RefNannyFinishContext();
23406 }
23407 
23408 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1680
23409  *             mm._set_refined(it.first, it.second)
23410  *
23411  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
23412  *         self.entries.erase(self.entries.begin(), self.entries.end())
23413  *         self.total = 0
23414  */
23415 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self)23416 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self) {
23417   __Pyx_RefNannyDeclarations
23418   __Pyx_RefNannySetupContext("_reset", 0);
23419 
23420   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1681
23421  *
23422  *     cdef void _reset(self):
23423  *         self.entries.erase(self.entries.begin(), self.entries.end())             # <<<<<<<<<<<<<<
23424  *         self.total = 0
23425  *
23426  */
23427   (void)(__pyx_v_self->entries.erase(__pyx_v_self->entries.begin(), __pyx_v_self->entries.end()));
23428 
23429   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1682
23430  *     cdef void _reset(self):
23431  *         self.entries.erase(self.entries.begin(), self.entries.end())
23432  *         self.total = 0             # <<<<<<<<<<<<<<
23433  *
23434  *     cdef to_array(self):
23435  */
23436   __pyx_v_self->total = 0;
23437 
23438   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1680
23439  *             mm._set_refined(it.first, it.second)
23440  *
23441  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
23442  *         self.entries.erase(self.entries.begin(), self.entries.end())
23443  *         self.total = 0
23444  */
23445 
23446   /* function exit code */
23447   __Pyx_RefNannyFinishContext();
23448 }
23449 
23450 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1684
23451  *         self.total = 0
23452  *
23453  *     cdef to_array(self):             # <<<<<<<<<<<<<<
23454  *         cdef np.uint64_t i
23455  *         cdef np.ndarray[np.uint64_t, ndim=2] rv
23456  */
23457 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self)23458 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self) {
23459   __pyx_t_5numpy_uint64_t __pyx_v_i;
23460   PyArrayObject *__pyx_v_rv = 0;
23461   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_it;
23462   __Pyx_LocalBuf_ND __pyx_pybuffernd_rv;
23463   __Pyx_Buffer __pyx_pybuffer_rv;
23464   PyObject *__pyx_r = NULL;
23465   __Pyx_RefNannyDeclarations
23466   PyObject *__pyx_t_1 = NULL;
23467   PyObject *__pyx_t_2 = NULL;
23468   PyObject *__pyx_t_3 = NULL;
23469   PyObject *__pyx_t_4 = NULL;
23470   PyArrayObject *__pyx_t_5 = NULL;
23471   int __pyx_t_6;
23472   PyObject *__pyx_t_7 = NULL;
23473   PyObject *__pyx_t_8 = NULL;
23474   PyObject *__pyx_t_9 = NULL;
23475   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_t_10;
23476   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  *__pyx_t_11;
23477   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_12;
23478   __pyx_t_5numpy_uint64_t __pyx_t_13;
23479   __pyx_t_5numpy_uint64_t __pyx_t_14;
23480   Py_ssize_t __pyx_t_15;
23481   __pyx_t_5numpy_uint64_t __pyx_t_16;
23482   Py_ssize_t __pyx_t_17;
23483   __Pyx_RefNannySetupContext("to_array", 0);
23484   __pyx_pybuffer_rv.pybuffer.buf = NULL;
23485   __pyx_pybuffer_rv.refcount = 0;
23486   __pyx_pybuffernd_rv.data = NULL;
23487   __pyx_pybuffernd_rv.rcbuffer = &__pyx_pybuffer_rv;
23488 
23489   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1687
23490  *         cdef np.uint64_t i
23491  *         cdef np.ndarray[np.uint64_t, ndim=2] rv
23492  *         self._remove_duplicates()             # <<<<<<<<<<<<<<
23493  *         rv = np.empty((self.entries.size(),2),dtype='uint64')
23494  *         i = 0
23495  */
23496   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_remove_duplicates(__pyx_v_self);
23497 
23498   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1688
23499  *         cdef np.ndarray[np.uint64_t, ndim=2] rv
23500  *         self._remove_duplicates()
23501  *         rv = np.empty((self.entries.size(),2),dtype='uint64')             # <<<<<<<<<<<<<<
23502  *         i = 0
23503  *         for it in self.entries:
23504  */
23505   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error)
23506   __Pyx_GOTREF(__pyx_t_1);
23507   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
23508   __Pyx_GOTREF(__pyx_t_2);
23509   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23510   __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->entries.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error)
23511   __Pyx_GOTREF(__pyx_t_1);
23512   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error)
23513   __Pyx_GOTREF(__pyx_t_3);
23514   __Pyx_GIVEREF(__pyx_t_1);
23515   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
23516   __Pyx_INCREF(__pyx_int_2);
23517   __Pyx_GIVEREF(__pyx_int_2);
23518   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
23519   __pyx_t_1 = 0;
23520   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error)
23521   __Pyx_GOTREF(__pyx_t_1);
23522   __Pyx_GIVEREF(__pyx_t_3);
23523   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
23524   __pyx_t_3 = 0;
23525   __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error)
23526   __Pyx_GOTREF(__pyx_t_3);
23527   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_uint64) < 0) __PYX_ERR(0, 1688, __pyx_L1_error)
23528   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1688, __pyx_L1_error)
23529   __Pyx_GOTREF(__pyx_t_4);
23530   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23531   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23532   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23533   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1688, __pyx_L1_error)
23534   __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
23535   {
23536     __Pyx_BufFmt_StackElem __pyx_stack[1];
23537     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
23538     __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rv.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
23539     if (unlikely(__pyx_t_6 < 0)) {
23540       PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
23541       if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rv.rcbuffer->pybuffer, (PyObject*)__pyx_v_rv, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
23542         Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
23543         __Pyx_RaiseBufferFallbackError();
23544       } else {
23545         PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
23546       }
23547       __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
23548     }
23549     __pyx_pybuffernd_rv.diminfo[0].strides = __pyx_pybuffernd_rv.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rv.diminfo[0].shape = __pyx_pybuffernd_rv.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_rv.diminfo[1].strides = __pyx_pybuffernd_rv.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_rv.diminfo[1].shape = __pyx_pybuffernd_rv.rcbuffer->pybuffer.shape[1];
23550     if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1688, __pyx_L1_error)
23551   }
23552   __pyx_t_5 = 0;
23553   __pyx_v_rv = ((PyArrayObject *)__pyx_t_4);
23554   __pyx_t_4 = 0;
23555 
23556   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1689
23557  *         self._remove_duplicates()
23558  *         rv = np.empty((self.entries.size(),2),dtype='uint64')
23559  *         i = 0             # <<<<<<<<<<<<<<
23560  *         for it in self.entries:
23561  *             rv[i,0] = it.first
23562  */
23563   __pyx_v_i = 0;
23564 
23565   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1690
23566  *         rv = np.empty((self.entries.size(),2),dtype='uint64')
23567  *         i = 0
23568  *         for it in self.entries:             # <<<<<<<<<<<<<<
23569  *             rv[i,0] = it.first
23570  *             rv[i,1] = it.second
23571  */
23572   __pyx_t_11 = &__pyx_v_self->entries;
23573   __pyx_t_10 = __pyx_t_11->begin();
23574   for (;;) {
23575     if (!(__pyx_t_10 != __pyx_t_11->end())) break;
23576     __pyx_t_12 = *__pyx_t_10;
23577     ++__pyx_t_10;
23578     __pyx_v_it = __pyx_t_12;
23579 
23580     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1691
23581  *         i = 0
23582  *         for it in self.entries:
23583  *             rv[i,0] = it.first             # <<<<<<<<<<<<<<
23584  *             rv[i,1] = it.second
23585  *             i += 1
23586  */
23587     __pyx_t_13 = __pyx_v_it.first;
23588     __pyx_t_14 = __pyx_v_i;
23589     __pyx_t_15 = 0;
23590     __pyx_t_6 = -1;
23591     if (unlikely(__pyx_t_14 >= (size_t)__pyx_pybuffernd_rv.diminfo[0].shape)) __pyx_t_6 = 0;
23592     if (__pyx_t_15 < 0) {
23593       __pyx_t_15 += __pyx_pybuffernd_rv.diminfo[1].shape;
23594       if (unlikely(__pyx_t_15 < 0)) __pyx_t_6 = 1;
23595     } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_rv.diminfo[1].shape)) __pyx_t_6 = 1;
23596     if (unlikely(__pyx_t_6 != -1)) {
23597       __Pyx_RaiseBufferIndexError(__pyx_t_6);
23598       __PYX_ERR(0, 1691, __pyx_L1_error)
23599     }
23600     *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_rv.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_rv.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_rv.diminfo[1].strides) = __pyx_t_13;
23601 
23602     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1692
23603  *         for it in self.entries:
23604  *             rv[i,0] = it.first
23605  *             rv[i,1] = it.second             # <<<<<<<<<<<<<<
23606  *             i += 1
23607  *         return rv
23608  */
23609     __pyx_t_13 = __pyx_v_it.second;
23610     __pyx_t_16 = __pyx_v_i;
23611     __pyx_t_17 = 1;
23612     __pyx_t_6 = -1;
23613     if (unlikely(__pyx_t_16 >= (size_t)__pyx_pybuffernd_rv.diminfo[0].shape)) __pyx_t_6 = 0;
23614     if (__pyx_t_17 < 0) {
23615       __pyx_t_17 += __pyx_pybuffernd_rv.diminfo[1].shape;
23616       if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 1;
23617     } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_rv.diminfo[1].shape)) __pyx_t_6 = 1;
23618     if (unlikely(__pyx_t_6 != -1)) {
23619       __Pyx_RaiseBufferIndexError(__pyx_t_6);
23620       __PYX_ERR(0, 1692, __pyx_L1_error)
23621     }
23622     *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_rv.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_rv.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_rv.diminfo[1].strides) = __pyx_t_13;
23623 
23624     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1693
23625  *             rv[i,0] = it.first
23626  *             rv[i,1] = it.second
23627  *             i += 1             # <<<<<<<<<<<<<<
23628  *         return rv
23629  *
23630  */
23631     __pyx_v_i = (__pyx_v_i + 1);
23632 
23633     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1690
23634  *         rv = np.empty((self.entries.size(),2),dtype='uint64')
23635  *         i = 0
23636  *         for it in self.entries:             # <<<<<<<<<<<<<<
23637  *             rv[i,0] = it.first
23638  *             rv[i,1] = it.second
23639  */
23640   }
23641 
23642   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1694
23643  *             rv[i,1] = it.second
23644  *             i += 1
23645  *         return rv             # <<<<<<<<<<<<<<
23646  *
23647  *     cdef void _remove_duplicates(self):
23648  */
23649   __Pyx_XDECREF(__pyx_r);
23650   __Pyx_INCREF(((PyObject *)__pyx_v_rv));
23651   __pyx_r = ((PyObject *)__pyx_v_rv);
23652   goto __pyx_L0;
23653 
23654   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1684
23655  *         self.total = 0
23656  *
23657  *     cdef to_array(self):             # <<<<<<<<<<<<<<
23658  *         cdef np.uint64_t i
23659  *         cdef np.ndarray[np.uint64_t, ndim=2] rv
23660  */
23661 
23662   /* function exit code */
23663   __pyx_L1_error:;
23664   __Pyx_XDECREF(__pyx_t_1);
23665   __Pyx_XDECREF(__pyx_t_2);
23666   __Pyx_XDECREF(__pyx_t_3);
23667   __Pyx_XDECREF(__pyx_t_4);
23668   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
23669     __Pyx_PyThreadState_declare
23670     __Pyx_PyThreadState_assign
23671     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
23672     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
23673   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
23674   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskVector.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
23675   __pyx_r = 0;
23676   goto __pyx_L2;
23677   __pyx_L0:;
23678   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
23679   __pyx_L2:;
23680   __Pyx_XDECREF((PyObject *)__pyx_v_rv);
23681   __Pyx_XGIVEREF(__pyx_r);
23682   __Pyx_RefNannyFinishContext();
23683   return __pyx_r;
23684 }
23685 
23686 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1696
23687  *         return rv
23688  *
23689  *     cdef void _remove_duplicates(self):             # <<<<<<<<<<<<<<
23690  *         cdef vector[ind_pair].iterator last
23691  *         sort(self.entries.begin(), self.entries.end())
23692  */
23693 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__remove_duplicates(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self)23694 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__remove_duplicates(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self) {
23695   std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_v_last;
23696   __Pyx_RefNannyDeclarations
23697   __Pyx_RefNannySetupContext("_remove_duplicates", 0);
23698 
23699   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1698
23700  *     cdef void _remove_duplicates(self):
23701  *         cdef vector[ind_pair].iterator last
23702  *         sort(self.entries.begin(), self.entries.end())             # <<<<<<<<<<<<<<
23703  *         last = unique(self.entries.begin(), self.entries.end())
23704  *         self.entries.erase(last, self.entries.end())
23705  */
23706   std::sort<std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator>(__pyx_v_self->entries.begin(), __pyx_v_self->entries.end());
23707 
23708   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1699
23709  *         cdef vector[ind_pair].iterator last
23710  *         sort(self.entries.begin(), self.entries.end())
23711  *         last = unique(self.entries.begin(), self.entries.end())             # <<<<<<<<<<<<<<
23712  *         self.entries.erase(last, self.entries.end())
23713  *         # http://stackoverflow.com/questions/16970982/find-unique-rows-in-numpy-array
23714  */
23715   __pyx_v_last = std::unique<std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator>(__pyx_v_self->entries.begin(), __pyx_v_self->entries.end());
23716 
23717   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1700
23718  *         sort(self.entries.begin(), self.entries.end())
23719  *         last = unique(self.entries.begin(), self.entries.end())
23720  *         self.entries.erase(last, self.entries.end())             # <<<<<<<<<<<<<<
23721  *         # http://stackoverflow.com/questions/16970982/find-unique-rows-in-numpy-array
23722  *         # cdef np.ndarray[np.uint64_t, ndim=2] rv
23723  */
23724   (void)(__pyx_v_self->entries.erase(__pyx_v_last, __pyx_v_self->entries.end()));
23725 
23726   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1696
23727  *         return rv
23728  *
23729  *     cdef void _remove_duplicates(self):             # <<<<<<<<<<<<<<
23730  *         cdef vector[ind_pair].iterator last
23731  *         sort(self.entries.begin(), self.entries.end())
23732  */
23733 
23734   /* function exit code */
23735   __Pyx_RefNannyFinishContext();
23736 }
23737 
23738 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1723
23739  *         # entries2[0].erase(last2, entries2[0].end())
23740  *
23741  *     cdef void _prune(self):             # <<<<<<<<<<<<<<
23742  *         if self.total > MAX_VECTOR_SIZE:
23743  *             self._remove_duplicates()
23744  */
23745 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__prune(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self)23746 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__prune(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self) {
23747   __Pyx_RefNannyDeclarations
23748   int __pyx_t_1;
23749   __Pyx_RefNannySetupContext("_prune", 0);
23750 
23751   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1724
23752  *
23753  *     cdef void _prune(self):
23754  *         if self.total > MAX_VECTOR_SIZE:             # <<<<<<<<<<<<<<
23755  *             self._remove_duplicates()
23756  *             self.total = 0
23757  */
23758   __pyx_t_1 = ((__pyx_v_self->total > __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_MAX_VECTOR_SIZE) != 0);
23759   if (__pyx_t_1) {
23760 
23761     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1725
23762  *     cdef void _prune(self):
23763  *         if self.total > MAX_VECTOR_SIZE:
23764  *             self._remove_duplicates()             # <<<<<<<<<<<<<<
23765  *             self.total = 0
23766  *
23767  */
23768     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self->__pyx_vtab)->_remove_duplicates(__pyx_v_self);
23769 
23770     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1726
23771  *         if self.total > MAX_VECTOR_SIZE:
23772  *             self._remove_duplicates()
23773  *             self.total = 0             # <<<<<<<<<<<<<<
23774  *
23775  *     def __dealloc__(self):
23776  */
23777     __pyx_v_self->total = 0;
23778 
23779     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1724
23780  *
23781  *     cdef void _prune(self):
23782  *         if self.total > MAX_VECTOR_SIZE:             # <<<<<<<<<<<<<<
23783  *             self._remove_duplicates()
23784  *             self.total = 0
23785  */
23786   }
23787 
23788   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1723
23789  *         # entries2[0].erase(last2, entries2[0].end())
23790  *
23791  *     cdef void _prune(self):             # <<<<<<<<<<<<<<
23792  *         if self.total > MAX_VECTOR_SIZE:
23793  *             self._remove_duplicates()
23794  */
23795 
23796   /* function exit code */
23797   __Pyx_RefNannyFinishContext();
23798 }
23799 
23800 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1728
23801  *             self.total = 0
23802  *
23803  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
23804  *         self.entries.clear()
23805  *
23806  */
23807 
23808 /* Python wrapper */
23809 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_5__dealloc__(PyObject * __pyx_v_self)23810 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_5__dealloc__(PyObject *__pyx_v_self) {
23811   __Pyx_RefNannyDeclarations
23812   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
23813   __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_4__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self));
23814 
23815   /* function exit code */
23816   __Pyx_RefNannyFinishContext();
23817 }
23818 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self)23819 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self) {
23820   __Pyx_RefNannyDeclarations
23821   __Pyx_RefNannySetupContext("__dealloc__", 0);
23822 
23823   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1729
23824  *
23825  *     def __dealloc__(self):
23826  *         self.entries.clear()             # <<<<<<<<<<<<<<
23827  *
23828  * # Set version
23829  */
23830   __pyx_v_self->entries.clear();
23831 
23832   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1728
23833  *             self.total = 0
23834  *
23835  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
23836  *         self.entries.clear()
23837  *
23838  */
23839 
23840   /* function exit code */
23841   __Pyx_RefNannyFinishContext();
23842 }
23843 
23844 /* "(tree fragment)":1
23845  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
23846  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
23847  * def __setstate_cython__(self, __pyx_state):
23848  */
23849 
23850 /* Python wrapper */
23851 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_7__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)23852 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
23853   PyObject *__pyx_r = 0;
23854   __Pyx_RefNannyDeclarations
23855   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
23856   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_6__reduce_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self));
23857 
23858   /* function exit code */
23859   __Pyx_RefNannyFinishContext();
23860   return __pyx_r;
23861 }
23862 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self)23863 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self) {
23864   PyObject *__pyx_r = NULL;
23865   __Pyx_RefNannyDeclarations
23866   PyObject *__pyx_t_1 = NULL;
23867   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
23868 
23869   /* "(tree fragment)":2
23870  * def __reduce_cython__(self):
23871  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
23872  * def __setstate_cython__(self, __pyx_state):
23873  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
23874  */
23875   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
23876   __Pyx_GOTREF(__pyx_t_1);
23877   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
23878   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23879   __PYX_ERR(1, 2, __pyx_L1_error)
23880 
23881   /* "(tree fragment)":1
23882  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
23883  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
23884  * def __setstate_cython__(self, __pyx_state):
23885  */
23886 
23887   /* function exit code */
23888   __pyx_L1_error:;
23889   __Pyx_XDECREF(__pyx_t_1);
23890   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskVector.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23891   __pyx_r = NULL;
23892   __Pyx_XGIVEREF(__pyx_r);
23893   __Pyx_RefNannyFinishContext();
23894   return __pyx_r;
23895 }
23896 
23897 /* "(tree fragment)":3
23898  * def __reduce_cython__(self):
23899  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
23900  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
23901  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
23902  */
23903 
23904 /* Python wrapper */
23905 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_9__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)23906 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
23907   PyObject *__pyx_r = 0;
23908   __Pyx_RefNannyDeclarations
23909   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
23910   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_8__setstate_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
23911 
23912   /* function exit code */
23913   __Pyx_RefNannyFinishContext();
23914   return __pyx_r;
23915 }
23916 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)23917 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
23918   PyObject *__pyx_r = NULL;
23919   __Pyx_RefNannyDeclarations
23920   PyObject *__pyx_t_1 = NULL;
23921   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
23922 
23923   /* "(tree fragment)":4
23924  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
23925  * def __setstate_cython__(self, __pyx_state):
23926  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
23927  */
23928   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
23929   __Pyx_GOTREF(__pyx_t_1);
23930   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
23931   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23932   __PYX_ERR(1, 4, __pyx_L1_error)
23933 
23934   /* "(tree fragment)":3
23935  * def __reduce_cython__(self):
23936  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
23937  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
23938  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
23939  */
23940 
23941   /* function exit code */
23942   __pyx_L1_error:;
23943   __Pyx_XDECREF(__pyx_t_1);
23944   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskVector.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23945   __pyx_r = NULL;
23946   __Pyx_XGIVEREF(__pyx_r);
23947   __Pyx_RefNannyFinishContext();
23948   return __pyx_r;
23949 }
23950 
23951 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1733
23952  * # Set version
23953  * cdef class SparseUnorderedRefinedBitmaskSet:
23954  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2):             # <<<<<<<<<<<<<<
23955  *         cdef ind_pair ind
23956  *         ind.first = ind1
23957  */
23958 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self,__pyx_t_5numpy_uint64_t __pyx_v_ind1,__pyx_t_5numpy_uint64_t __pyx_v_ind2)23959 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, __pyx_t_5numpy_uint64_t __pyx_v_ind1, __pyx_t_5numpy_uint64_t __pyx_v_ind2) {
23960   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_ind;
23961   __Pyx_RefNannyDeclarations
23962   __Pyx_RefNannySetupContext("_set", 0);
23963 
23964   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1735
23965  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2):
23966  *         cdef ind_pair ind
23967  *         ind.first = ind1             # <<<<<<<<<<<<<<
23968  *         ind.second = ind2
23969  *         self.entries.insert(ind)
23970  */
23971   __pyx_v_ind.first = __pyx_v_ind1;
23972 
23973   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1736
23974  *         cdef ind_pair ind
23975  *         ind.first = ind1
23976  *         ind.second = ind2             # <<<<<<<<<<<<<<
23977  *         self.entries.insert(ind)
23978  *
23979  */
23980   __pyx_v_ind.second = __pyx_v_ind2;
23981 
23982   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1737
23983  *         ind.first = ind1
23984  *         ind.second = ind2
23985  *         self.entries.insert(ind)             # <<<<<<<<<<<<<<
23986  *
23987  *     def set(self, ind1, ind2):
23988  */
23989   try {
23990     __pyx_v_self->entries.insert(__pyx_v_ind);
23991   } catch(...) {
23992     __Pyx_CppExn2PyErr();
23993     __PYX_ERR(0, 1737, __pyx_L1_error)
23994   }
23995 
23996   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1733
23997  * # Set version
23998  * cdef class SparseUnorderedRefinedBitmaskSet:
23999  *     cdef void _set(self, np.uint64_t ind1, np.uint64_t ind2):             # <<<<<<<<<<<<<<
24000  *         cdef ind_pair ind
24001  *         ind.first = ind1
24002  */
24003 
24004   /* function exit code */
24005   goto __pyx_L0;
24006   __pyx_L1_error:;
24007   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskSet._set", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
24008   __pyx_L0:;
24009   __Pyx_RefNannyFinishContext();
24010 }
24011 
24012 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1739
24013  *         self.entries.insert(ind)
24014  *
24015  *     def set(self, ind1, ind2):             # <<<<<<<<<<<<<<
24016  *         self._set(ind1, ind2)
24017  *
24018  */
24019 
24020 /* Python wrapper */
24021 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_1set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_1set(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)24022 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_1set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24023   PyObject *__pyx_v_ind1 = 0;
24024   PyObject *__pyx_v_ind2 = 0;
24025   PyObject *__pyx_r = 0;
24026   __Pyx_RefNannyDeclarations
24027   __Pyx_RefNannySetupContext("set (wrapper)", 0);
24028   {
24029     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind1,&__pyx_n_s_ind2,0};
24030     PyObject* values[2] = {0,0};
24031     if (unlikely(__pyx_kwds)) {
24032       Py_ssize_t kw_args;
24033       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
24034       switch (pos_args) {
24035         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24036         CYTHON_FALLTHROUGH;
24037         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24038         CYTHON_FALLTHROUGH;
24039         case  0: break;
24040         default: goto __pyx_L5_argtuple_error;
24041       }
24042       kw_args = PyDict_Size(__pyx_kwds);
24043       switch (pos_args) {
24044         case  0:
24045         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ind1)) != 0)) kw_args--;
24046         else goto __pyx_L5_argtuple_error;
24047         CYTHON_FALLTHROUGH;
24048         case  1:
24049         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ind2)) != 0)) kw_args--;
24050         else {
24051           __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1739, __pyx_L3_error)
24052         }
24053       }
24054       if (unlikely(kw_args > 0)) {
24055         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1739, __pyx_L3_error)
24056       }
24057     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
24058       goto __pyx_L5_argtuple_error;
24059     } else {
24060       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24061       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24062     }
24063     __pyx_v_ind1 = values[0];
24064     __pyx_v_ind2 = values[1];
24065   }
24066   goto __pyx_L4_argument_unpacking_done;
24067   __pyx_L5_argtuple_error:;
24068   __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1739, __pyx_L3_error)
24069   __pyx_L3_error:;
24070   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskSet.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
24071   __Pyx_RefNannyFinishContext();
24072   return NULL;
24073   __pyx_L4_argument_unpacking_done:;
24074   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_set(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_v_self), __pyx_v_ind1, __pyx_v_ind2);
24075 
24076   /* function exit code */
24077   __Pyx_RefNannyFinishContext();
24078   return __pyx_r;
24079 }
24080 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self,PyObject * __pyx_v_ind1,PyObject * __pyx_v_ind2)24081 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_set(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, PyObject *__pyx_v_ind1, PyObject *__pyx_v_ind2) {
24082   PyObject *__pyx_r = NULL;
24083   __Pyx_RefNannyDeclarations
24084   __pyx_t_5numpy_uint64_t __pyx_t_1;
24085   __pyx_t_5numpy_uint64_t __pyx_t_2;
24086   __Pyx_RefNannySetupContext("set", 0);
24087 
24088   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1740
24089  *
24090  *     def set(self, ind1, ind2):
24091  *         self._set(ind1, ind2)             # <<<<<<<<<<<<<<
24092  *
24093  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):
24094  */
24095   __pyx_t_1 = __Pyx_PyInt_As_npy_uint64(__pyx_v_ind1); if (unlikely((__pyx_t_1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1740, __pyx_L1_error)
24096   __pyx_t_2 = __Pyx_PyInt_As_npy_uint64(__pyx_v_ind2); if (unlikely((__pyx_t_2 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1740, __pyx_L1_error)
24097   ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_t_1, __pyx_t_2);
24098 
24099   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1739
24100  *         self.entries.insert(ind)
24101  *
24102  *     def set(self, ind1, ind2):             # <<<<<<<<<<<<<<
24103  *         self._set(ind1, ind2)
24104  *
24105  */
24106 
24107   /* function exit code */
24108   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24109   goto __pyx_L0;
24110   __pyx_L1_error:;
24111   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskSet.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
24112   __pyx_r = NULL;
24113   __pyx_L0:;
24114   __Pyx_XGIVEREF(__pyx_r);
24115   __Pyx_RefNannyFinishContext();
24116   return __pyx_r;
24117 }
24118 
24119 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1742
24120  *         self._set(ind1, ind2)
24121  *
24122  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):             # <<<<<<<<<<<<<<
24123  *         for p in self.entries:
24124  *             mask1[p.first] = mask2[p.second] = 1
24125  */
24126 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self,__Pyx_memviewslice __pyx_v_mask1,__Pyx_memviewslice __pyx_v_mask2)24127 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, __Pyx_memviewslice __pyx_v_mask1, __Pyx_memviewslice __pyx_v_mask2) {
24128   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_p;
24129   __Pyx_RefNannyDeclarations
24130   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_t_1;
24131   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  *__pyx_t_2;
24132   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_3;
24133   __pyx_t_5numpy_uint64_t __pyx_t_4;
24134   int __pyx_t_5;
24135   __pyx_t_5numpy_uint64_t __pyx_t_6;
24136   __Pyx_RefNannySetupContext("_fill", 0);
24137 
24138   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1743
24139  *
24140  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):
24141  *         for p in self.entries:             # <<<<<<<<<<<<<<
24142  *             mask1[p.first] = mask2[p.second] = 1
24143  *
24144  */
24145   __pyx_t_2 = &__pyx_v_self->entries;
24146   __pyx_t_1 = __pyx_t_2->begin();
24147   for (;;) {
24148     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
24149     __pyx_t_3 = *__pyx_t_1;
24150     ++__pyx_t_1;
24151     __pyx_v_p = __pyx_t_3;
24152 
24153     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1744
24154  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):
24155  *         for p in self.entries:
24156  *             mask1[p.first] = mask2[p.second] = 1             # <<<<<<<<<<<<<<
24157  *
24158  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
24159  */
24160     __pyx_t_4 = __pyx_v_p.first;
24161     __pyx_t_5 = -1;
24162     if (unlikely(__pyx_t_4 >= (size_t)__pyx_v_mask1.shape[0])) __pyx_t_5 = 0;
24163     if (unlikely(__pyx_t_5 != -1)) {
24164       __Pyx_RaiseBufferIndexError(__pyx_t_5);
24165       __PYX_ERR(0, 1744, __pyx_L1_error)
24166     }
24167     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_mask1.data + __pyx_t_4 * __pyx_v_mask1.strides[0]) )) = 1;
24168     __pyx_t_6 = __pyx_v_p.second;
24169     __pyx_t_5 = -1;
24170     if (unlikely(__pyx_t_6 >= (size_t)__pyx_v_mask2.shape[0])) __pyx_t_5 = 0;
24171     if (unlikely(__pyx_t_5 != -1)) {
24172       __Pyx_RaiseBufferIndexError(__pyx_t_5);
24173       __PYX_ERR(0, 1744, __pyx_L1_error)
24174     }
24175     *((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_mask2.data + __pyx_t_6 * __pyx_v_mask2.strides[0]) )) = 1;
24176 
24177     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1743
24178  *
24179  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):
24180  *         for p in self.entries:             # <<<<<<<<<<<<<<
24181  *             mask1[p.first] = mask2[p.second] = 1
24182  *
24183  */
24184   }
24185 
24186   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1742
24187  *         self._set(ind1, ind2)
24188  *
24189  *     cdef void _fill(self, np.uint8_t[:] mask1, np.uint8_t[:] mask2):             # <<<<<<<<<<<<<<
24190  *         for p in self.entries:
24191  *             mask1[p.first] = mask2[p.second] = 1
24192  */
24193 
24194   /* function exit code */
24195   goto __pyx_L0;
24196   __pyx_L1_error:;
24197   __Pyx_WriteUnraisable("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskSet._fill", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
24198   __pyx_L0:;
24199   __Pyx_RefNannyFinishContext();
24200 }
24201 
24202 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1746
24203  *             mask1[p.first] = mask2[p.second] = 1
24204  *
24205  *     cdef void _fill_ewah(self, BoolArrayCollection mm):             # <<<<<<<<<<<<<<
24206  *         for it in self.entries:
24207  *             mm._set_refined(it.first, it.second)
24208  */
24209 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection * __pyx_v_mm)24210 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill_ewah(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *__pyx_v_mm) {
24211   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_it;
24212   __Pyx_RefNannyDeclarations
24213   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_t_1;
24214   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  *__pyx_t_2;
24215   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_3;
24216   __Pyx_RefNannySetupContext("_fill_ewah", 0);
24217 
24218   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1747
24219  *
24220  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
24221  *         for it in self.entries:             # <<<<<<<<<<<<<<
24222  *             mm._set_refined(it.first, it.second)
24223  *
24224  */
24225   __pyx_t_2 = &__pyx_v_self->entries;
24226   __pyx_t_1 = __pyx_t_2->begin();
24227   for (;;) {
24228     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
24229     __pyx_t_3 = *__pyx_t_1;
24230     ++__pyx_t_1;
24231     __pyx_v_it = __pyx_t_3;
24232 
24233     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1748
24234  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
24235  *         for it in self.entries:
24236  *             mm._set_refined(it.first, it.second)             # <<<<<<<<<<<<<<
24237  *
24238  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
24239  */
24240     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)__pyx_v_mm->__pyx_vtab)->_set_refined(__pyx_v_mm, __pyx_v_it.first, __pyx_v_it.second);
24241 
24242     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1747
24243  *
24244  *     cdef void _fill_ewah(self, BoolArrayCollection mm):
24245  *         for it in self.entries:             # <<<<<<<<<<<<<<
24246  *             mm._set_refined(it.first, it.second)
24247  *
24248  */
24249   }
24250 
24251   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1746
24252  *             mask1[p.first] = mask2[p.second] = 1
24253  *
24254  *     cdef void _fill_ewah(self, BoolArrayCollection mm):             # <<<<<<<<<<<<<<
24255  *         for it in self.entries:
24256  *             mm._set_refined(it.first, it.second)
24257  */
24258 
24259   /* function exit code */
24260   __Pyx_RefNannyFinishContext();
24261 }
24262 
24263 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1750
24264  *             mm._set_refined(it.first, it.second)
24265  *
24266  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):             # <<<<<<<<<<<<<<
24267  *         for it in self.entries:
24268  *             mm._set_refined(it.first, it.second)
24269  */
24270 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self,struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed * __pyx_v_mm)24271 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill_bool(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *__pyx_v_mm) {
24272   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_it;
24273   __Pyx_RefNannyDeclarations
24274   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_t_1;
24275   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  *__pyx_t_2;
24276   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_3;
24277   __Pyx_RefNannySetupContext("_fill_bool", 0);
24278 
24279   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1751
24280  *
24281  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
24282  *         for it in self.entries:             # <<<<<<<<<<<<<<
24283  *             mm._set_refined(it.first, it.second)
24284  *
24285  */
24286   __pyx_t_2 = &__pyx_v_self->entries;
24287   __pyx_t_1 = __pyx_t_2->begin();
24288   for (;;) {
24289     if (!(__pyx_t_1 != __pyx_t_2->end())) break;
24290     __pyx_t_3 = *__pyx_t_1;
24291     ++__pyx_t_1;
24292     __pyx_v_it = __pyx_t_3;
24293 
24294     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1752
24295  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
24296  *         for it in self.entries:
24297  *             mm._set_refined(it.first, it.second)             # <<<<<<<<<<<<<<
24298  *
24299  *     cdef void _reset(self):
24300  */
24301     ((struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)__pyx_v_mm->__pyx_vtab)->_set_refined(__pyx_v_mm, __pyx_v_it.first, __pyx_v_it.second);
24302 
24303     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1751
24304  *
24305  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):
24306  *         for it in self.entries:             # <<<<<<<<<<<<<<
24307  *             mm._set_refined(it.first, it.second)
24308  *
24309  */
24310   }
24311 
24312   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1750
24313  *             mm._set_refined(it.first, it.second)
24314  *
24315  *     cdef void _fill_bool(self, BoolArrayCollectionUncompressed mm):             # <<<<<<<<<<<<<<
24316  *         for it in self.entries:
24317  *             mm._set_refined(it.first, it.second)
24318  */
24319 
24320   /* function exit code */
24321   __Pyx_RefNannyFinishContext();
24322 }
24323 
24324 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1754
24325  *             mm._set_refined(it.first, it.second)
24326  *
24327  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
24328  *         self.entries.clear()
24329  *
24330  */
24331 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self)24332 static void __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__reset(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self) {
24333   __Pyx_RefNannyDeclarations
24334   __Pyx_RefNannySetupContext("_reset", 0);
24335 
24336   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1755
24337  *
24338  *     cdef void _reset(self):
24339  *         self.entries.clear()             # <<<<<<<<<<<<<<
24340  *
24341  *     cdef to_array(self):
24342  */
24343   __pyx_v_self->entries.clear();
24344 
24345   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1754
24346  *             mm._set_refined(it.first, it.second)
24347  *
24348  *     cdef void _reset(self):             # <<<<<<<<<<<<<<
24349  *         self.entries.clear()
24350  *
24351  */
24352 
24353   /* function exit code */
24354   __Pyx_RefNannyFinishContext();
24355 }
24356 
24357 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1757
24358  *         self.entries.clear()
24359  *
24360  *     cdef to_array(self):             # <<<<<<<<<<<<<<
24361  *         cdef np.uint64_t i
24362  *         cdef np.ndarray[np.uint64_t, ndim=2] rv
24363  */
24364 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self)24365 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_to_array(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self) {
24366   __pyx_t_5numpy_uint64_t __pyx_v_i;
24367   PyArrayObject *__pyx_v_rv = 0;
24368   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_v_it;
24369   __Pyx_LocalBuf_ND __pyx_pybuffernd_rv;
24370   __Pyx_Buffer __pyx_pybuffer_rv;
24371   PyObject *__pyx_r = NULL;
24372   __Pyx_RefNannyDeclarations
24373   PyObject *__pyx_t_1 = NULL;
24374   PyObject *__pyx_t_2 = NULL;
24375   PyObject *__pyx_t_3 = NULL;
24376   PyObject *__pyx_t_4 = NULL;
24377   PyArrayObject *__pyx_t_5 = NULL;
24378   int __pyx_t_6;
24379   PyObject *__pyx_t_7 = NULL;
24380   PyObject *__pyx_t_8 = NULL;
24381   PyObject *__pyx_t_9 = NULL;
24382   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::iterator __pyx_t_10;
24383   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  *__pyx_t_11;
24384   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_12;
24385   __pyx_t_5numpy_uint64_t __pyx_t_13;
24386   __pyx_t_5numpy_uint64_t __pyx_t_14;
24387   Py_ssize_t __pyx_t_15;
24388   __pyx_t_5numpy_uint64_t __pyx_t_16;
24389   Py_ssize_t __pyx_t_17;
24390   __Pyx_RefNannySetupContext("to_array", 0);
24391   __pyx_pybuffer_rv.pybuffer.buf = NULL;
24392   __pyx_pybuffer_rv.refcount = 0;
24393   __pyx_pybuffernd_rv.data = NULL;
24394   __pyx_pybuffernd_rv.rcbuffer = &__pyx_pybuffer_rv;
24395 
24396   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1760
24397  *         cdef np.uint64_t i
24398  *         cdef np.ndarray[np.uint64_t, ndim=2] rv
24399  *         rv = np.empty((self.entries.size(),2),dtype='uint64')             # <<<<<<<<<<<<<<
24400  *         i = 0
24401  *         for it in self.entries:
24402  */
24403   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
24404   __Pyx_GOTREF(__pyx_t_1);
24405   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1760, __pyx_L1_error)
24406   __Pyx_GOTREF(__pyx_t_2);
24407   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24408   __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->entries.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
24409   __Pyx_GOTREF(__pyx_t_1);
24410   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1760, __pyx_L1_error)
24411   __Pyx_GOTREF(__pyx_t_3);
24412   __Pyx_GIVEREF(__pyx_t_1);
24413   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
24414   __Pyx_INCREF(__pyx_int_2);
24415   __Pyx_GIVEREF(__pyx_int_2);
24416   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24417   __pyx_t_1 = 0;
24418   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
24419   __Pyx_GOTREF(__pyx_t_1);
24420   __Pyx_GIVEREF(__pyx_t_3);
24421   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
24422   __pyx_t_3 = 0;
24423   __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1760, __pyx_L1_error)
24424   __Pyx_GOTREF(__pyx_t_3);
24425   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_n_s_uint64) < 0) __PYX_ERR(0, 1760, __pyx_L1_error)
24426   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1760, __pyx_L1_error)
24427   __Pyx_GOTREF(__pyx_t_4);
24428   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24429   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24430   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24431   if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1760, __pyx_L1_error)
24432   __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
24433   {
24434     __Pyx_BufFmt_StackElem __pyx_stack[1];
24435     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
24436     __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rv.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
24437     if (unlikely(__pyx_t_6 < 0)) {
24438       PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
24439       if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rv.rcbuffer->pybuffer, (PyObject*)__pyx_v_rv, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
24440         Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
24441         __Pyx_RaiseBufferFallbackError();
24442       } else {
24443         PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
24444       }
24445       __pyx_t_7 = __pyx_t_8 = __pyx_t_9 = 0;
24446     }
24447     __pyx_pybuffernd_rv.diminfo[0].strides = __pyx_pybuffernd_rv.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rv.diminfo[0].shape = __pyx_pybuffernd_rv.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_rv.diminfo[1].strides = __pyx_pybuffernd_rv.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_rv.diminfo[1].shape = __pyx_pybuffernd_rv.rcbuffer->pybuffer.shape[1];
24448     if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1760, __pyx_L1_error)
24449   }
24450   __pyx_t_5 = 0;
24451   __pyx_v_rv = ((PyArrayObject *)__pyx_t_4);
24452   __pyx_t_4 = 0;
24453 
24454   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1761
24455  *         cdef np.ndarray[np.uint64_t, ndim=2] rv
24456  *         rv = np.empty((self.entries.size(),2),dtype='uint64')
24457  *         i = 0             # <<<<<<<<<<<<<<
24458  *         for it in self.entries:
24459  *             rv[i,0] = it.first
24460  */
24461   __pyx_v_i = 0;
24462 
24463   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1762
24464  *         rv = np.empty((self.entries.size(),2),dtype='uint64')
24465  *         i = 0
24466  *         for it in self.entries:             # <<<<<<<<<<<<<<
24467  *             rv[i,0] = it.first
24468  *             rv[i,1] = it.second
24469  */
24470   __pyx_t_11 = &__pyx_v_self->entries;
24471   __pyx_t_10 = __pyx_t_11->begin();
24472   for (;;) {
24473     if (!(__pyx_t_10 != __pyx_t_11->end())) break;
24474     __pyx_t_12 = *__pyx_t_10;
24475     ++__pyx_t_10;
24476     __pyx_v_it = __pyx_t_12;
24477 
24478     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1763
24479  *         i = 0
24480  *         for it in self.entries:
24481  *             rv[i,0] = it.first             # <<<<<<<<<<<<<<
24482  *             rv[i,1] = it.second
24483  *             i += 1
24484  */
24485     __pyx_t_13 = __pyx_v_it.first;
24486     __pyx_t_14 = __pyx_v_i;
24487     __pyx_t_15 = 0;
24488     __pyx_t_6 = -1;
24489     if (unlikely(__pyx_t_14 >= (size_t)__pyx_pybuffernd_rv.diminfo[0].shape)) __pyx_t_6 = 0;
24490     if (__pyx_t_15 < 0) {
24491       __pyx_t_15 += __pyx_pybuffernd_rv.diminfo[1].shape;
24492       if (unlikely(__pyx_t_15 < 0)) __pyx_t_6 = 1;
24493     } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_rv.diminfo[1].shape)) __pyx_t_6 = 1;
24494     if (unlikely(__pyx_t_6 != -1)) {
24495       __Pyx_RaiseBufferIndexError(__pyx_t_6);
24496       __PYX_ERR(0, 1763, __pyx_L1_error)
24497     }
24498     *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_rv.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_rv.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_rv.diminfo[1].strides) = __pyx_t_13;
24499 
24500     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1764
24501  *         for it in self.entries:
24502  *             rv[i,0] = it.first
24503  *             rv[i,1] = it.second             # <<<<<<<<<<<<<<
24504  *             i += 1
24505  *         return rv
24506  */
24507     __pyx_t_13 = __pyx_v_it.second;
24508     __pyx_t_16 = __pyx_v_i;
24509     __pyx_t_17 = 1;
24510     __pyx_t_6 = -1;
24511     if (unlikely(__pyx_t_16 >= (size_t)__pyx_pybuffernd_rv.diminfo[0].shape)) __pyx_t_6 = 0;
24512     if (__pyx_t_17 < 0) {
24513       __pyx_t_17 += __pyx_pybuffernd_rv.diminfo[1].shape;
24514       if (unlikely(__pyx_t_17 < 0)) __pyx_t_6 = 1;
24515     } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_rv.diminfo[1].shape)) __pyx_t_6 = 1;
24516     if (unlikely(__pyx_t_6 != -1)) {
24517       __Pyx_RaiseBufferIndexError(__pyx_t_6);
24518       __PYX_ERR(0, 1764, __pyx_L1_error)
24519     }
24520     *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint64_t *, __pyx_pybuffernd_rv.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_rv.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_rv.diminfo[1].strides) = __pyx_t_13;
24521 
24522     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1765
24523  *             rv[i,0] = it.first
24524  *             rv[i,1] = it.second
24525  *             i += 1             # <<<<<<<<<<<<<<
24526  *         return rv
24527  *
24528  */
24529     __pyx_v_i = (__pyx_v_i + 1);
24530 
24531     /* "yt/utilities/lib/ewah_bool_wrap.pyx":1762
24532  *         rv = np.empty((self.entries.size(),2),dtype='uint64')
24533  *         i = 0
24534  *         for it in self.entries:             # <<<<<<<<<<<<<<
24535  *             rv[i,0] = it.first
24536  *             rv[i,1] = it.second
24537  */
24538   }
24539 
24540   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1766
24541  *             rv[i,1] = it.second
24542  *             i += 1
24543  *         return rv             # <<<<<<<<<<<<<<
24544  *
24545  *     def __dealloc__(self):
24546  */
24547   __Pyx_XDECREF(__pyx_r);
24548   __Pyx_INCREF(((PyObject *)__pyx_v_rv));
24549   __pyx_r = ((PyObject *)__pyx_v_rv);
24550   goto __pyx_L0;
24551 
24552   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1757
24553  *         self.entries.clear()
24554  *
24555  *     cdef to_array(self):             # <<<<<<<<<<<<<<
24556  *         cdef np.uint64_t i
24557  *         cdef np.ndarray[np.uint64_t, ndim=2] rv
24558  */
24559 
24560   /* function exit code */
24561   __pyx_L1_error:;
24562   __Pyx_XDECREF(__pyx_t_1);
24563   __Pyx_XDECREF(__pyx_t_2);
24564   __Pyx_XDECREF(__pyx_t_3);
24565   __Pyx_XDECREF(__pyx_t_4);
24566   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
24567     __Pyx_PyThreadState_declare
24568     __Pyx_PyThreadState_assign
24569     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
24570     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
24571   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
24572   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskSet.to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
24573   __pyx_r = 0;
24574   goto __pyx_L2;
24575   __pyx_L0:;
24576   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rv.rcbuffer->pybuffer);
24577   __pyx_L2:;
24578   __Pyx_XDECREF((PyObject *)__pyx_v_rv);
24579   __Pyx_XGIVEREF(__pyx_r);
24580   __Pyx_RefNannyFinishContext();
24581   return __pyx_r;
24582 }
24583 
24584 /* "yt/utilities/lib/ewah_bool_wrap.pyx":1768
24585  *         return rv
24586  *
24587  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
24588  *         self.entries.clear()
24589  */
24590 
24591 /* Python wrapper */
24592 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_3__dealloc__(PyObject * __pyx_v_self)24593 static void __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_3__dealloc__(PyObject *__pyx_v_self) {
24594   __Pyx_RefNannyDeclarations
24595   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
24596   __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_2__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_v_self));
24597 
24598   /* function exit code */
24599   __Pyx_RefNannyFinishContext();
24600 }
24601 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_2__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self)24602 static void __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_2__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self) {
24603   __Pyx_RefNannyDeclarations
24604   __Pyx_RefNannySetupContext("__dealloc__", 0);
24605 
24606   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1769
24607  *
24608  *     def __dealloc__(self):
24609  *         self.entries.clear()             # <<<<<<<<<<<<<<
24610  */
24611   __pyx_v_self->entries.clear();
24612 
24613   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1768
24614  *         return rv
24615  *
24616  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
24617  *         self.entries.clear()
24618  */
24619 
24620   /* function exit code */
24621   __Pyx_RefNannyFinishContext();
24622 }
24623 
24624 /* "(tree fragment)":1
24625  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
24626  *     cdef tuple state
24627  *     cdef object _dict
24628  */
24629 
24630 /* Python wrapper */
24631 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)24632 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
24633   PyObject *__pyx_r = 0;
24634   __Pyx_RefNannyDeclarations
24635   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
24636   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_4__reduce_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_v_self));
24637 
24638   /* function exit code */
24639   __Pyx_RefNannyFinishContext();
24640   return __pyx_r;
24641 }
24642 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_4__reduce_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self)24643 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_4__reduce_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self) {
24644   PyObject *__pyx_v_state = 0;
24645   PyObject *__pyx_v__dict = 0;
24646   int __pyx_v_use_setstate;
24647   PyObject *__pyx_r = NULL;
24648   __Pyx_RefNannyDeclarations
24649   PyObject *__pyx_t_1 = NULL;
24650   PyObject *__pyx_t_2 = NULL;
24651   int __pyx_t_3;
24652   int __pyx_t_4;
24653   PyObject *__pyx_t_5 = NULL;
24654   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
24655 
24656   /* "(tree fragment)":5
24657  *     cdef object _dict
24658  *     cdef bint use_setstate
24659  *     state = (self.entries,)             # <<<<<<<<<<<<<<
24660  *     _dict = getattr(self, '__dict__', None)
24661  *     if _dict is not None:
24662  */
24663   __pyx_t_1 = __pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(__pyx_v_self->entries); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
24664   __Pyx_GOTREF(__pyx_t_1);
24665   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
24666   __Pyx_GOTREF(__pyx_t_2);
24667   __Pyx_GIVEREF(__pyx_t_1);
24668   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
24669   __pyx_t_1 = 0;
24670   __pyx_v_state = ((PyObject*)__pyx_t_2);
24671   __pyx_t_2 = 0;
24672 
24673   /* "(tree fragment)":6
24674  *     cdef bint use_setstate
24675  *     state = (self.entries,)
24676  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
24677  *     if _dict is not None:
24678  *         state += (_dict,)
24679  */
24680   __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
24681   __Pyx_GOTREF(__pyx_t_2);
24682   __pyx_v__dict = __pyx_t_2;
24683   __pyx_t_2 = 0;
24684 
24685   /* "(tree fragment)":7
24686  *     state = (self.entries,)
24687  *     _dict = getattr(self, '__dict__', None)
24688  *     if _dict is not None:             # <<<<<<<<<<<<<<
24689  *         state += (_dict,)
24690  *         use_setstate = True
24691  */
24692   __pyx_t_3 = (__pyx_v__dict != Py_None);
24693   __pyx_t_4 = (__pyx_t_3 != 0);
24694   if (__pyx_t_4) {
24695 
24696     /* "(tree fragment)":8
24697  *     _dict = getattr(self, '__dict__', None)
24698  *     if _dict is not None:
24699  *         state += (_dict,)             # <<<<<<<<<<<<<<
24700  *         use_setstate = True
24701  *     else:
24702  */
24703     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
24704     __Pyx_GOTREF(__pyx_t_2);
24705     __Pyx_INCREF(__pyx_v__dict);
24706     __Pyx_GIVEREF(__pyx_v__dict);
24707     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
24708     __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
24709     __Pyx_GOTREF(__pyx_t_1);
24710     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24711     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
24712     __pyx_t_1 = 0;
24713 
24714     /* "(tree fragment)":9
24715  *     if _dict is not None:
24716  *         state += (_dict,)
24717  *         use_setstate = True             # <<<<<<<<<<<<<<
24718  *     else:
24719  *         use_setstate = False
24720  */
24721     __pyx_v_use_setstate = 1;
24722 
24723     /* "(tree fragment)":7
24724  *     state = (self.entries,)
24725  *     _dict = getattr(self, '__dict__', None)
24726  *     if _dict is not None:             # <<<<<<<<<<<<<<
24727  *         state += (_dict,)
24728  *         use_setstate = True
24729  */
24730     goto __pyx_L3;
24731   }
24732 
24733   /* "(tree fragment)":11
24734  *         use_setstate = True
24735  *     else:
24736  *         use_setstate = False             # <<<<<<<<<<<<<<
24737  *     if use_setstate:
24738  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, None), state
24739  */
24740   /*else*/ {
24741     __pyx_v_use_setstate = 0;
24742   }
24743   __pyx_L3:;
24744 
24745   /* "(tree fragment)":12
24746  *     else:
24747  *         use_setstate = False
24748  *     if use_setstate:             # <<<<<<<<<<<<<<
24749  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, None), state
24750  *     else:
24751  */
24752   __pyx_t_4 = (__pyx_v_use_setstate != 0);
24753   if (__pyx_t_4) {
24754 
24755     /* "(tree fragment)":13
24756  *         use_setstate = False
24757  *     if use_setstate:
24758  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, None), state             # <<<<<<<<<<<<<<
24759  *     else:
24760  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, state)
24761  */
24762     __Pyx_XDECREF(__pyx_r);
24763     __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_SparseUnorderedRe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
24764     __Pyx_GOTREF(__pyx_t_1);
24765     __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
24766     __Pyx_GOTREF(__pyx_t_2);
24767     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
24768     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
24769     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
24770     __Pyx_INCREF(__pyx_int_100460822);
24771     __Pyx_GIVEREF(__pyx_int_100460822);
24772     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_100460822);
24773     __Pyx_INCREF(Py_None);
24774     __Pyx_GIVEREF(Py_None);
24775     PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
24776     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
24777     __Pyx_GOTREF(__pyx_t_5);
24778     __Pyx_GIVEREF(__pyx_t_1);
24779     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
24780     __Pyx_GIVEREF(__pyx_t_2);
24781     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
24782     __Pyx_INCREF(__pyx_v_state);
24783     __Pyx_GIVEREF(__pyx_v_state);
24784     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
24785     __pyx_t_1 = 0;
24786     __pyx_t_2 = 0;
24787     __pyx_r = __pyx_t_5;
24788     __pyx_t_5 = 0;
24789     goto __pyx_L0;
24790 
24791     /* "(tree fragment)":12
24792  *     else:
24793  *         use_setstate = False
24794  *     if use_setstate:             # <<<<<<<<<<<<<<
24795  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, None), state
24796  *     else:
24797  */
24798   }
24799 
24800   /* "(tree fragment)":15
24801  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, None), state
24802  *     else:
24803  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, state)             # <<<<<<<<<<<<<<
24804  * def __setstate_cython__(self, __pyx_state):
24805  *     __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(self, __pyx_state)
24806  */
24807   /*else*/ {
24808     __Pyx_XDECREF(__pyx_r);
24809     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_SparseUnorderedRe); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
24810     __Pyx_GOTREF(__pyx_t_5);
24811     __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
24812     __Pyx_GOTREF(__pyx_t_2);
24813     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
24814     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
24815     PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
24816     __Pyx_INCREF(__pyx_int_100460822);
24817     __Pyx_GIVEREF(__pyx_int_100460822);
24818     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_100460822);
24819     __Pyx_INCREF(__pyx_v_state);
24820     __Pyx_GIVEREF(__pyx_v_state);
24821     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
24822     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
24823     __Pyx_GOTREF(__pyx_t_1);
24824     __Pyx_GIVEREF(__pyx_t_5);
24825     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
24826     __Pyx_GIVEREF(__pyx_t_2);
24827     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
24828     __pyx_t_5 = 0;
24829     __pyx_t_2 = 0;
24830     __pyx_r = __pyx_t_1;
24831     __pyx_t_1 = 0;
24832     goto __pyx_L0;
24833   }
24834 
24835   /* "(tree fragment)":1
24836  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
24837  *     cdef tuple state
24838  *     cdef object _dict
24839  */
24840 
24841   /* function exit code */
24842   __pyx_L1_error:;
24843   __Pyx_XDECREF(__pyx_t_1);
24844   __Pyx_XDECREF(__pyx_t_2);
24845   __Pyx_XDECREF(__pyx_t_5);
24846   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskSet.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24847   __pyx_r = NULL;
24848   __pyx_L0:;
24849   __Pyx_XDECREF(__pyx_v_state);
24850   __Pyx_XDECREF(__pyx_v__dict);
24851   __Pyx_XGIVEREF(__pyx_r);
24852   __Pyx_RefNannyFinishContext();
24853   return __pyx_r;
24854 }
24855 
24856 /* "(tree fragment)":16
24857  *     else:
24858  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, state)
24859  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
24860  *     __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(self, __pyx_state)
24861  */
24862 
24863 /* Python wrapper */
24864 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)24865 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
24866   PyObject *__pyx_r = 0;
24867   __Pyx_RefNannyDeclarations
24868   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
24869   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_6__setstate_cython__(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
24870 
24871   /* function exit code */
24872   __Pyx_RefNannyFinishContext();
24873   return __pyx_r;
24874 }
24875 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_6__setstate_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v_self,PyObject * __pyx_v___pyx_state)24876 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_6__setstate_cython__(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
24877   PyObject *__pyx_r = NULL;
24878   __Pyx_RefNannyDeclarations
24879   PyObject *__pyx_t_1 = NULL;
24880   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
24881 
24882   /* "(tree fragment)":17
24883  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, state)
24884  * def __setstate_cython__(self, __pyx_state):
24885  *     __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
24886  */
24887   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(1, 17, __pyx_L1_error)
24888   __pyx_t_1 = __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
24889   __Pyx_GOTREF(__pyx_t_1);
24890   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24891 
24892   /* "(tree fragment)":16
24893  *     else:
24894  *         return __pyx_unpickle_SparseUnorderedRefinedBitmaskSet, (type(self), 0x5fce916, state)
24895  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
24896  *     __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(self, __pyx_state)
24897  */
24898 
24899   /* function exit code */
24900   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24901   goto __pyx_L0;
24902   __pyx_L1_error:;
24903   __Pyx_XDECREF(__pyx_t_1);
24904   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskSet.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24905   __pyx_r = NULL;
24906   __pyx_L0:;
24907   __Pyx_XGIVEREF(__pyx_r);
24908   __Pyx_RefNannyFinishContext();
24909   return __pyx_r;
24910 }
24911 
24912 /* "(tree fragment)":1
24913  * def __pyx_unpickle_SparseUnorderedBitmaskSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
24914  *     cdef object __pyx_PickleError
24915  *     cdef object __pyx_result
24916  */
24917 
24918 /* Python wrapper */
24919 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_1__pyx_unpickle_SparseUnorderedBitmaskSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24920 static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_14ewah_bool_wrap_1__pyx_unpickle_SparseUnorderedBitmaskSet = {"__pyx_unpickle_SparseUnorderedBitmaskSet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_1__pyx_unpickle_SparseUnorderedBitmaskSet, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_1__pyx_unpickle_SparseUnorderedBitmaskSet(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)24921 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_1__pyx_unpickle_SparseUnorderedBitmaskSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24922   PyObject *__pyx_v___pyx_type = 0;
24923   long __pyx_v___pyx_checksum;
24924   PyObject *__pyx_v___pyx_state = 0;
24925   PyObject *__pyx_r = 0;
24926   __Pyx_RefNannyDeclarations
24927   __Pyx_RefNannySetupContext("__pyx_unpickle_SparseUnorderedBitmaskSet (wrapper)", 0);
24928   {
24929     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
24930     PyObject* values[3] = {0,0,0};
24931     if (unlikely(__pyx_kwds)) {
24932       Py_ssize_t kw_args;
24933       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
24934       switch (pos_args) {
24935         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24936         CYTHON_FALLTHROUGH;
24937         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24938         CYTHON_FALLTHROUGH;
24939         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24940         CYTHON_FALLTHROUGH;
24941         case  0: break;
24942         default: goto __pyx_L5_argtuple_error;
24943       }
24944       kw_args = PyDict_Size(__pyx_kwds);
24945       switch (pos_args) {
24946         case  0:
24947         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
24948         else goto __pyx_L5_argtuple_error;
24949         CYTHON_FALLTHROUGH;
24950         case  1:
24951         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
24952         else {
24953           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseUnorderedBitmaskSet", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
24954         }
24955         CYTHON_FALLTHROUGH;
24956         case  2:
24957         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
24958         else {
24959           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseUnorderedBitmaskSet", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
24960         }
24961       }
24962       if (unlikely(kw_args > 0)) {
24963         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SparseUnorderedBitmaskSet") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
24964       }
24965     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
24966       goto __pyx_L5_argtuple_error;
24967     } else {
24968       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24969       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24970       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24971     }
24972     __pyx_v___pyx_type = values[0];
24973     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
24974     __pyx_v___pyx_state = values[2];
24975   }
24976   goto __pyx_L4_argument_unpacking_done;
24977   __pyx_L5_argtuple_error:;
24978   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseUnorderedBitmaskSet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
24979   __pyx_L3_error:;
24980   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.__pyx_unpickle_SparseUnorderedBitmaskSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
24981   __Pyx_RefNannyFinishContext();
24982   return NULL;
24983   __pyx_L4_argument_unpacking_done:;
24984   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
24985 
24986   /* function exit code */
24987   __Pyx_RefNannyFinishContext();
24988   return __pyx_r;
24989 }
24990 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)24991 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
24992   PyObject *__pyx_v___pyx_PickleError = 0;
24993   PyObject *__pyx_v___pyx_result = 0;
24994   PyObject *__pyx_r = NULL;
24995   __Pyx_RefNannyDeclarations
24996   int __pyx_t_1;
24997   PyObject *__pyx_t_2 = NULL;
24998   PyObject *__pyx_t_3 = NULL;
24999   PyObject *__pyx_t_4 = NULL;
25000   PyObject *__pyx_t_5 = NULL;
25001   int __pyx_t_6;
25002   __Pyx_RefNannySetupContext("__pyx_unpickle_SparseUnorderedBitmaskSet", 0);
25003 
25004   /* "(tree fragment)":4
25005  *     cdef object __pyx_PickleError
25006  *     cdef object __pyx_result
25007  *     if __pyx_checksum != 0x5fce916:             # <<<<<<<<<<<<<<
25008  *         from pickle import PickleError as __pyx_PickleError
25009  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25010  */
25011   __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5fce916) != 0);
25012   if (__pyx_t_1) {
25013 
25014     /* "(tree fragment)":5
25015  *     cdef object __pyx_result
25016  *     if __pyx_checksum != 0x5fce916:
25017  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
25018  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25019  *     __pyx_result = SparseUnorderedBitmaskSet.__new__(__pyx_type)
25020  */
25021     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
25022     __Pyx_GOTREF(__pyx_t_2);
25023     __Pyx_INCREF(__pyx_n_s_PickleError);
25024     __Pyx_GIVEREF(__pyx_n_s_PickleError);
25025     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
25026     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
25027     __Pyx_GOTREF(__pyx_t_3);
25028     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25029     __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
25030     __Pyx_GOTREF(__pyx_t_2);
25031     __Pyx_INCREF(__pyx_t_2);
25032     __pyx_v___pyx_PickleError = __pyx_t_2;
25033     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25034     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25035 
25036     /* "(tree fragment)":6
25037  *     if __pyx_checksum != 0x5fce916:
25038  *         from pickle import PickleError as __pyx_PickleError
25039  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)             # <<<<<<<<<<<<<<
25040  *     __pyx_result = SparseUnorderedBitmaskSet.__new__(__pyx_type)
25041  *     if __pyx_state is not None:
25042  */
25043     __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
25044     __Pyx_GOTREF(__pyx_t_2);
25045     __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
25046     __Pyx_GOTREF(__pyx_t_4);
25047     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25048     __Pyx_INCREF(__pyx_v___pyx_PickleError);
25049     __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
25050     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
25051       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
25052       if (likely(__pyx_t_5)) {
25053         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25054         __Pyx_INCREF(__pyx_t_5);
25055         __Pyx_INCREF(function);
25056         __Pyx_DECREF_SET(__pyx_t_2, function);
25057       }
25058     }
25059     __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);
25060     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25061     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25062     if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
25063     __Pyx_GOTREF(__pyx_t_3);
25064     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25065     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25066     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25067     __PYX_ERR(1, 6, __pyx_L1_error)
25068 
25069     /* "(tree fragment)":4
25070  *     cdef object __pyx_PickleError
25071  *     cdef object __pyx_result
25072  *     if __pyx_checksum != 0x5fce916:             # <<<<<<<<<<<<<<
25073  *         from pickle import PickleError as __pyx_PickleError
25074  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25075  */
25076   }
25077 
25078   /* "(tree fragment)":7
25079  *         from pickle import PickleError as __pyx_PickleError
25080  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25081  *     __pyx_result = SparseUnorderedBitmaskSet.__new__(__pyx_type)             # <<<<<<<<<<<<<<
25082  *     if __pyx_state is not None:
25083  *         __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(<SparseUnorderedBitmaskSet> __pyx_result, __pyx_state)
25084  */
25085   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
25086   __Pyx_GOTREF(__pyx_t_2);
25087   __pyx_t_4 = NULL;
25088   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25089     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
25090     if (likely(__pyx_t_4)) {
25091       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25092       __Pyx_INCREF(__pyx_t_4);
25093       __Pyx_INCREF(function);
25094       __Pyx_DECREF_SET(__pyx_t_2, function);
25095     }
25096   }
25097   __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);
25098   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25099   if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
25100   __Pyx_GOTREF(__pyx_t_3);
25101   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25102   __pyx_v___pyx_result = __pyx_t_3;
25103   __pyx_t_3 = 0;
25104 
25105   /* "(tree fragment)":8
25106  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25107  *     __pyx_result = SparseUnorderedBitmaskSet.__new__(__pyx_type)
25108  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
25109  *         __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(<SparseUnorderedBitmaskSet> __pyx_result, __pyx_state)
25110  *     return __pyx_result
25111  */
25112   __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
25113   __pyx_t_6 = (__pyx_t_1 != 0);
25114   if (__pyx_t_6) {
25115 
25116     /* "(tree fragment)":9
25117  *     __pyx_result = SparseUnorderedBitmaskSet.__new__(__pyx_type)
25118  *     if __pyx_state is not None:
25119  *         __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(<SparseUnorderedBitmaskSet> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
25120  *     return __pyx_result
25121  * cdef __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(SparseUnorderedBitmaskSet __pyx_result, tuple __pyx_state):
25122  */
25123     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(1, 9, __pyx_L1_error)
25124     __pyx_t_3 = __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet__set_state(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
25125     __Pyx_GOTREF(__pyx_t_3);
25126     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25127 
25128     /* "(tree fragment)":8
25129  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25130  *     __pyx_result = SparseUnorderedBitmaskSet.__new__(__pyx_type)
25131  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
25132  *         __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(<SparseUnorderedBitmaskSet> __pyx_result, __pyx_state)
25133  *     return __pyx_result
25134  */
25135   }
25136 
25137   /* "(tree fragment)":10
25138  *     if __pyx_state is not None:
25139  *         __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(<SparseUnorderedBitmaskSet> __pyx_result, __pyx_state)
25140  *     return __pyx_result             # <<<<<<<<<<<<<<
25141  * cdef __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(SparseUnorderedBitmaskSet __pyx_result, tuple __pyx_state):
25142  *     __pyx_result.entries = __pyx_state[0]
25143  */
25144   __Pyx_XDECREF(__pyx_r);
25145   __Pyx_INCREF(__pyx_v___pyx_result);
25146   __pyx_r = __pyx_v___pyx_result;
25147   goto __pyx_L0;
25148 
25149   /* "(tree fragment)":1
25150  * def __pyx_unpickle_SparseUnorderedBitmaskSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
25151  *     cdef object __pyx_PickleError
25152  *     cdef object __pyx_result
25153  */
25154 
25155   /* function exit code */
25156   __pyx_L1_error:;
25157   __Pyx_XDECREF(__pyx_t_2);
25158   __Pyx_XDECREF(__pyx_t_3);
25159   __Pyx_XDECREF(__pyx_t_4);
25160   __Pyx_XDECREF(__pyx_t_5);
25161   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.__pyx_unpickle_SparseUnorderedBitmaskSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
25162   __pyx_r = NULL;
25163   __pyx_L0:;
25164   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
25165   __Pyx_XDECREF(__pyx_v___pyx_result);
25166   __Pyx_XGIVEREF(__pyx_r);
25167   __Pyx_RefNannyFinishContext();
25168   return __pyx_r;
25169 }
25170 
25171 /* "(tree fragment)":11
25172  *         __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(<SparseUnorderedBitmaskSet> __pyx_result, __pyx_state)
25173  *     return __pyx_result
25174  * cdef __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(SparseUnorderedBitmaskSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
25175  *     __pyx_result.entries = __pyx_state[0]
25176  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
25177  */
25178 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet__set_state(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)25179 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedBitmaskSet__set_state(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
25180   PyObject *__pyx_r = NULL;
25181   __Pyx_RefNannyDeclarations
25182   PyObject *__pyx_t_1 = NULL;
25183   std::set<__pyx_t_5numpy_uint64_t>  __pyx_t_2;
25184   int __pyx_t_3;
25185   Py_ssize_t __pyx_t_4;
25186   int __pyx_t_5;
25187   int __pyx_t_6;
25188   PyObject *__pyx_t_7 = NULL;
25189   PyObject *__pyx_t_8 = NULL;
25190   PyObject *__pyx_t_9 = NULL;
25191   __Pyx_RefNannySetupContext("__pyx_unpickle_SparseUnorderedBitmaskSet__set_state", 0);
25192 
25193   /* "(tree fragment)":12
25194  *     return __pyx_result
25195  * cdef __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(SparseUnorderedBitmaskSet __pyx_result, tuple __pyx_state):
25196  *     __pyx_result.entries = __pyx_state[0]             # <<<<<<<<<<<<<<
25197  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
25198  *         __pyx_result.__dict__.update(__pyx_state[1])
25199  */
25200   if (unlikely(__pyx_v___pyx_state == Py_None)) {
25201     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
25202     __PYX_ERR(1, 12, __pyx_L1_error)
25203   }
25204   __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(1, 12, __pyx_L1_error)
25205   __Pyx_GOTREF(__pyx_t_1);
25206   __pyx_t_2 = __pyx_convert_set_from_py___pyx_t_5numpy_uint64_t(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
25207   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25208   __pyx_v___pyx_result->entries = __pyx_t_2;
25209 
25210   /* "(tree fragment)":13
25211  * cdef __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(SparseUnorderedBitmaskSet __pyx_result, tuple __pyx_state):
25212  *     __pyx_result.entries = __pyx_state[0]
25213  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
25214  *         __pyx_result.__dict__.update(__pyx_state[1])
25215  */
25216   if (unlikely(__pyx_v___pyx_state == Py_None)) {
25217     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
25218     __PYX_ERR(1, 13, __pyx_L1_error)
25219   }
25220   __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
25221   __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
25222   if (__pyx_t_5) {
25223   } else {
25224     __pyx_t_3 = __pyx_t_5;
25225     goto __pyx_L4_bool_binop_done;
25226   }
25227   __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
25228   __pyx_t_6 = (__pyx_t_5 != 0);
25229   __pyx_t_3 = __pyx_t_6;
25230   __pyx_L4_bool_binop_done:;
25231   if (__pyx_t_3) {
25232 
25233     /* "(tree fragment)":14
25234  *     __pyx_result.entries = __pyx_state[0]
25235  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
25236  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
25237  */
25238     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
25239     __Pyx_GOTREF(__pyx_t_7);
25240     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
25241     __Pyx_GOTREF(__pyx_t_8);
25242     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25243     if (unlikely(__pyx_v___pyx_state == Py_None)) {
25244       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
25245       __PYX_ERR(1, 14, __pyx_L1_error)
25246     }
25247     __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
25248     __Pyx_GOTREF(__pyx_t_7);
25249     __pyx_t_9 = NULL;
25250     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
25251       __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
25252       if (likely(__pyx_t_9)) {
25253         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
25254         __Pyx_INCREF(__pyx_t_9);
25255         __Pyx_INCREF(function);
25256         __Pyx_DECREF_SET(__pyx_t_8, function);
25257       }
25258     }
25259     __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
25260     __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
25261     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25262     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
25263     __Pyx_GOTREF(__pyx_t_1);
25264     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
25265     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25266 
25267     /* "(tree fragment)":13
25268  * cdef __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(SparseUnorderedBitmaskSet __pyx_result, tuple __pyx_state):
25269  *     __pyx_result.entries = __pyx_state[0]
25270  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
25271  *         __pyx_result.__dict__.update(__pyx_state[1])
25272  */
25273   }
25274 
25275   /* "(tree fragment)":11
25276  *         __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(<SparseUnorderedBitmaskSet> __pyx_result, __pyx_state)
25277  *     return __pyx_result
25278  * cdef __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(SparseUnorderedBitmaskSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
25279  *     __pyx_result.entries = __pyx_state[0]
25280  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
25281  */
25282 
25283   /* function exit code */
25284   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25285   goto __pyx_L0;
25286   __pyx_L1_error:;
25287   __Pyx_XDECREF(__pyx_t_1);
25288   __Pyx_XDECREF(__pyx_t_7);
25289   __Pyx_XDECREF(__pyx_t_8);
25290   __Pyx_XDECREF(__pyx_t_9);
25291   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.__pyx_unpickle_SparseUnorderedBitmaskSet__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
25292   __pyx_r = 0;
25293   __pyx_L0:;
25294   __Pyx_XGIVEREF(__pyx_r);
25295   __Pyx_RefNannyFinishContext();
25296   return __pyx_r;
25297 }
25298 
25299 /* "(tree fragment)":1
25300  * def __pyx_unpickle_SparseUnorderedRefinedBitmaskSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
25301  *     cdef object __pyx_PickleError
25302  *     cdef object __pyx_result
25303  */
25304 
25305 /* Python wrapper */
25306 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_3__pyx_unpickle_SparseUnorderedRefinedBitmaskSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25307 static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_14ewah_bool_wrap_3__pyx_unpickle_SparseUnorderedRefinedBitmaskSet = {"__pyx_unpickle_SparseUnorderedRefinedBitmaskSet", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_3__pyx_unpickle_SparseUnorderedRefinedBitmaskSet, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_3__pyx_unpickle_SparseUnorderedRefinedBitmaskSet(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)25308 static PyObject *__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_3__pyx_unpickle_SparseUnorderedRefinedBitmaskSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25309   PyObject *__pyx_v___pyx_type = 0;
25310   long __pyx_v___pyx_checksum;
25311   PyObject *__pyx_v___pyx_state = 0;
25312   PyObject *__pyx_r = 0;
25313   __Pyx_RefNannyDeclarations
25314   __Pyx_RefNannySetupContext("__pyx_unpickle_SparseUnorderedRefinedBitmaskSet (wrapper)", 0);
25315   {
25316     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
25317     PyObject* values[3] = {0,0,0};
25318     if (unlikely(__pyx_kwds)) {
25319       Py_ssize_t kw_args;
25320       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25321       switch (pos_args) {
25322         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25323         CYTHON_FALLTHROUGH;
25324         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25325         CYTHON_FALLTHROUGH;
25326         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25327         CYTHON_FALLTHROUGH;
25328         case  0: break;
25329         default: goto __pyx_L5_argtuple_error;
25330       }
25331       kw_args = PyDict_Size(__pyx_kwds);
25332       switch (pos_args) {
25333         case  0:
25334         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
25335         else goto __pyx_L5_argtuple_error;
25336         CYTHON_FALLTHROUGH;
25337         case  1:
25338         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
25339         else {
25340           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseUnorderedRefinedBitmaskSet", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
25341         }
25342         CYTHON_FALLTHROUGH;
25343         case  2:
25344         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
25345         else {
25346           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseUnorderedRefinedBitmaskSet", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
25347         }
25348       }
25349       if (unlikely(kw_args > 0)) {
25350         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SparseUnorderedRefinedBitmaskSet") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
25351       }
25352     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
25353       goto __pyx_L5_argtuple_error;
25354     } else {
25355       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25356       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25357       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25358     }
25359     __pyx_v___pyx_type = values[0];
25360     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
25361     __pyx_v___pyx_state = values[2];
25362   }
25363   goto __pyx_L4_argument_unpacking_done;
25364   __pyx_L5_argtuple_error:;
25365   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SparseUnorderedRefinedBitmaskSet", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
25366   __pyx_L3_error:;
25367   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.__pyx_unpickle_SparseUnorderedRefinedBitmaskSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
25368   __Pyx_RefNannyFinishContext();
25369   return NULL;
25370   __pyx_L4_argument_unpacking_done:;
25371   __pyx_r = __pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_2__pyx_unpickle_SparseUnorderedRefinedBitmaskSet(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
25372 
25373   /* function exit code */
25374   __Pyx_RefNannyFinishContext();
25375   return __pyx_r;
25376 }
25377 
__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_2__pyx_unpickle_SparseUnorderedRefinedBitmaskSet(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)25378 static PyObject *__pyx_pf_2yt_9utilities_3lib_14ewah_bool_wrap_2__pyx_unpickle_SparseUnorderedRefinedBitmaskSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
25379   PyObject *__pyx_v___pyx_PickleError = 0;
25380   PyObject *__pyx_v___pyx_result = 0;
25381   PyObject *__pyx_r = NULL;
25382   __Pyx_RefNannyDeclarations
25383   int __pyx_t_1;
25384   PyObject *__pyx_t_2 = NULL;
25385   PyObject *__pyx_t_3 = NULL;
25386   PyObject *__pyx_t_4 = NULL;
25387   PyObject *__pyx_t_5 = NULL;
25388   int __pyx_t_6;
25389   __Pyx_RefNannySetupContext("__pyx_unpickle_SparseUnorderedRefinedBitmaskSet", 0);
25390 
25391   /* "(tree fragment)":4
25392  *     cdef object __pyx_PickleError
25393  *     cdef object __pyx_result
25394  *     if __pyx_checksum != 0x5fce916:             # <<<<<<<<<<<<<<
25395  *         from pickle import PickleError as __pyx_PickleError
25396  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25397  */
25398   __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x5fce916) != 0);
25399   if (__pyx_t_1) {
25400 
25401     /* "(tree fragment)":5
25402  *     cdef object __pyx_result
25403  *     if __pyx_checksum != 0x5fce916:
25404  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
25405  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25406  *     __pyx_result = SparseUnorderedRefinedBitmaskSet.__new__(__pyx_type)
25407  */
25408     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
25409     __Pyx_GOTREF(__pyx_t_2);
25410     __Pyx_INCREF(__pyx_n_s_PickleError);
25411     __Pyx_GIVEREF(__pyx_n_s_PickleError);
25412     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
25413     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
25414     __Pyx_GOTREF(__pyx_t_3);
25415     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25416     __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
25417     __Pyx_GOTREF(__pyx_t_2);
25418     __Pyx_INCREF(__pyx_t_2);
25419     __pyx_v___pyx_PickleError = __pyx_t_2;
25420     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25421     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25422 
25423     /* "(tree fragment)":6
25424  *     if __pyx_checksum != 0x5fce916:
25425  *         from pickle import PickleError as __pyx_PickleError
25426  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)             # <<<<<<<<<<<<<<
25427  *     __pyx_result = SparseUnorderedRefinedBitmaskSet.__new__(__pyx_type)
25428  *     if __pyx_state is not None:
25429  */
25430     __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
25431     __Pyx_GOTREF(__pyx_t_2);
25432     __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x5f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
25433     __Pyx_GOTREF(__pyx_t_4);
25434     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25435     __Pyx_INCREF(__pyx_v___pyx_PickleError);
25436     __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
25437     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
25438       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
25439       if (likely(__pyx_t_5)) {
25440         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25441         __Pyx_INCREF(__pyx_t_5);
25442         __Pyx_INCREF(function);
25443         __Pyx_DECREF_SET(__pyx_t_2, function);
25444       }
25445     }
25446     __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);
25447     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25448     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25449     if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
25450     __Pyx_GOTREF(__pyx_t_3);
25451     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25452     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25453     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25454     __PYX_ERR(1, 6, __pyx_L1_error)
25455 
25456     /* "(tree fragment)":4
25457  *     cdef object __pyx_PickleError
25458  *     cdef object __pyx_result
25459  *     if __pyx_checksum != 0x5fce916:             # <<<<<<<<<<<<<<
25460  *         from pickle import PickleError as __pyx_PickleError
25461  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25462  */
25463   }
25464 
25465   /* "(tree fragment)":7
25466  *         from pickle import PickleError as __pyx_PickleError
25467  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25468  *     __pyx_result = SparseUnorderedRefinedBitmaskSet.__new__(__pyx_type)             # <<<<<<<<<<<<<<
25469  *     if __pyx_state is not None:
25470  *         __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(<SparseUnorderedRefinedBitmaskSet> __pyx_result, __pyx_state)
25471  */
25472   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
25473   __Pyx_GOTREF(__pyx_t_2);
25474   __pyx_t_4 = NULL;
25475   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25476     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
25477     if (likely(__pyx_t_4)) {
25478       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25479       __Pyx_INCREF(__pyx_t_4);
25480       __Pyx_INCREF(function);
25481       __Pyx_DECREF_SET(__pyx_t_2, function);
25482     }
25483   }
25484   __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);
25485   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25486   if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
25487   __Pyx_GOTREF(__pyx_t_3);
25488   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25489   __pyx_v___pyx_result = __pyx_t_3;
25490   __pyx_t_3 = 0;
25491 
25492   /* "(tree fragment)":8
25493  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25494  *     __pyx_result = SparseUnorderedRefinedBitmaskSet.__new__(__pyx_type)
25495  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
25496  *         __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(<SparseUnorderedRefinedBitmaskSet> __pyx_result, __pyx_state)
25497  *     return __pyx_result
25498  */
25499   __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
25500   __pyx_t_6 = (__pyx_t_1 != 0);
25501   if (__pyx_t_6) {
25502 
25503     /* "(tree fragment)":9
25504  *     __pyx_result = SparseUnorderedRefinedBitmaskSet.__new__(__pyx_type)
25505  *     if __pyx_state is not None:
25506  *         __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(<SparseUnorderedRefinedBitmaskSet> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
25507  *     return __pyx_result
25508  * cdef __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(SparseUnorderedRefinedBitmaskSet __pyx_result, tuple __pyx_state):
25509  */
25510     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(1, 9, __pyx_L1_error)
25511     __pyx_t_3 = __pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
25512     __Pyx_GOTREF(__pyx_t_3);
25513     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25514 
25515     /* "(tree fragment)":8
25516  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x5fce916 = (entries))" % __pyx_checksum)
25517  *     __pyx_result = SparseUnorderedRefinedBitmaskSet.__new__(__pyx_type)
25518  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
25519  *         __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(<SparseUnorderedRefinedBitmaskSet> __pyx_result, __pyx_state)
25520  *     return __pyx_result
25521  */
25522   }
25523 
25524   /* "(tree fragment)":10
25525  *     if __pyx_state is not None:
25526  *         __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(<SparseUnorderedRefinedBitmaskSet> __pyx_result, __pyx_state)
25527  *     return __pyx_result             # <<<<<<<<<<<<<<
25528  * cdef __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(SparseUnorderedRefinedBitmaskSet __pyx_result, tuple __pyx_state):
25529  *     __pyx_result.entries = __pyx_state[0]
25530  */
25531   __Pyx_XDECREF(__pyx_r);
25532   __Pyx_INCREF(__pyx_v___pyx_result);
25533   __pyx_r = __pyx_v___pyx_result;
25534   goto __pyx_L0;
25535 
25536   /* "(tree fragment)":1
25537  * def __pyx_unpickle_SparseUnorderedRefinedBitmaskSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
25538  *     cdef object __pyx_PickleError
25539  *     cdef object __pyx_result
25540  */
25541 
25542   /* function exit code */
25543   __pyx_L1_error:;
25544   __Pyx_XDECREF(__pyx_t_2);
25545   __Pyx_XDECREF(__pyx_t_3);
25546   __Pyx_XDECREF(__pyx_t_4);
25547   __Pyx_XDECREF(__pyx_t_5);
25548   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.__pyx_unpickle_SparseUnorderedRefinedBitmaskSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
25549   __pyx_r = NULL;
25550   __pyx_L0:;
25551   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
25552   __Pyx_XDECREF(__pyx_v___pyx_result);
25553   __Pyx_XGIVEREF(__pyx_r);
25554   __Pyx_RefNannyFinishContext();
25555   return __pyx_r;
25556 }
25557 
25558 /* "(tree fragment)":11
25559  *         __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(<SparseUnorderedRefinedBitmaskSet> __pyx_result, __pyx_state)
25560  *     return __pyx_result
25561  * cdef __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(SparseUnorderedRefinedBitmaskSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
25562  *     __pyx_result.entries = __pyx_state[0]
25563  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
25564  */
25565 
__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)25566 static PyObject *__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap___pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
25567   PyObject *__pyx_r = NULL;
25568   __Pyx_RefNannyDeclarations
25569   PyObject *__pyx_t_1 = NULL;
25570   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  __pyx_t_2;
25571   int __pyx_t_3;
25572   Py_ssize_t __pyx_t_4;
25573   int __pyx_t_5;
25574   int __pyx_t_6;
25575   PyObject *__pyx_t_7 = NULL;
25576   PyObject *__pyx_t_8 = NULL;
25577   PyObject *__pyx_t_9 = NULL;
25578   __Pyx_RefNannySetupContext("__pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state", 0);
25579 
25580   /* "(tree fragment)":12
25581  *     return __pyx_result
25582  * cdef __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(SparseUnorderedRefinedBitmaskSet __pyx_result, tuple __pyx_state):
25583  *     __pyx_result.entries = __pyx_state[0]             # <<<<<<<<<<<<<<
25584  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
25585  *         __pyx_result.__dict__.update(__pyx_state[1])
25586  */
25587   if (unlikely(__pyx_v___pyx_state == Py_None)) {
25588     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
25589     __PYX_ERR(1, 12, __pyx_L1_error)
25590   }
25591   __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(1, 12, __pyx_L1_error)
25592   __Pyx_GOTREF(__pyx_t_1);
25593   __pyx_t_2 = __pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
25594   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25595   __pyx_v___pyx_result->entries = __pyx_t_2;
25596 
25597   /* "(tree fragment)":13
25598  * cdef __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(SparseUnorderedRefinedBitmaskSet __pyx_result, tuple __pyx_state):
25599  *     __pyx_result.entries = __pyx_state[0]
25600  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
25601  *         __pyx_result.__dict__.update(__pyx_state[1])
25602  */
25603   if (unlikely(__pyx_v___pyx_state == Py_None)) {
25604     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
25605     __PYX_ERR(1, 13, __pyx_L1_error)
25606   }
25607   __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
25608   __pyx_t_5 = ((__pyx_t_4 > 1) != 0);
25609   if (__pyx_t_5) {
25610   } else {
25611     __pyx_t_3 = __pyx_t_5;
25612     goto __pyx_L4_bool_binop_done;
25613   }
25614   __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
25615   __pyx_t_6 = (__pyx_t_5 != 0);
25616   __pyx_t_3 = __pyx_t_6;
25617   __pyx_L4_bool_binop_done:;
25618   if (__pyx_t_3) {
25619 
25620     /* "(tree fragment)":14
25621  *     __pyx_result.entries = __pyx_state[0]
25622  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
25623  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
25624  */
25625     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
25626     __Pyx_GOTREF(__pyx_t_7);
25627     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
25628     __Pyx_GOTREF(__pyx_t_8);
25629     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25630     if (unlikely(__pyx_v___pyx_state == Py_None)) {
25631       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
25632       __PYX_ERR(1, 14, __pyx_L1_error)
25633     }
25634     __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
25635     __Pyx_GOTREF(__pyx_t_7);
25636     __pyx_t_9 = NULL;
25637     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
25638       __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
25639       if (likely(__pyx_t_9)) {
25640         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
25641         __Pyx_INCREF(__pyx_t_9);
25642         __Pyx_INCREF(function);
25643         __Pyx_DECREF_SET(__pyx_t_8, function);
25644       }
25645     }
25646     __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
25647     __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
25648     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25649     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
25650     __Pyx_GOTREF(__pyx_t_1);
25651     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
25652     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25653 
25654     /* "(tree fragment)":13
25655  * cdef __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(SparseUnorderedRefinedBitmaskSet __pyx_result, tuple __pyx_state):
25656  *     __pyx_result.entries = __pyx_state[0]
25657  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
25658  *         __pyx_result.__dict__.update(__pyx_state[1])
25659  */
25660   }
25661 
25662   /* "(tree fragment)":11
25663  *         __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(<SparseUnorderedRefinedBitmaskSet> __pyx_result, __pyx_state)
25664  *     return __pyx_result
25665  * cdef __pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state(SparseUnorderedRefinedBitmaskSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
25666  *     __pyx_result.entries = __pyx_state[0]
25667  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
25668  */
25669 
25670   /* function exit code */
25671   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25672   goto __pyx_L0;
25673   __pyx_L1_error:;
25674   __Pyx_XDECREF(__pyx_t_1);
25675   __Pyx_XDECREF(__pyx_t_7);
25676   __Pyx_XDECREF(__pyx_t_8);
25677   __Pyx_XDECREF(__pyx_t_9);
25678   __Pyx_AddTraceback("yt.utilities.lib.ewah_bool_wrap.__pyx_unpickle_SparseUnorderedRefinedBitmaskSet__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
25679   __pyx_r = 0;
25680   __pyx_L0:;
25681   __Pyx_XGIVEREF(__pyx_r);
25682   __Pyx_RefNannyFinishContext();
25683   return __pyx_r;
25684 }
25685 
25686 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
25687  *         # experimental exception made for __getbuffer__ and __releasebuffer__
25688  *         # -- the details of this may change.
25689  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
25690  *             # This implementation of getbuffer is geared towards Cython
25691  *             # requirements, and does not yet fulfill the PEP.
25692  */
25693 
25694 /* Python wrapper */
25695 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)25696 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25697   int __pyx_r;
25698   __Pyx_RefNannyDeclarations
25699   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
25700   __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
25701 
25702   /* function exit code */
25703   __Pyx_RefNannyFinishContext();
25704   return __pyx_r;
25705 }
25706 
__pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)25707 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25708   int __pyx_v_i;
25709   int __pyx_v_ndim;
25710   int __pyx_v_endian_detector;
25711   int __pyx_v_little_endian;
25712   int __pyx_v_t;
25713   char *__pyx_v_f;
25714   PyArray_Descr *__pyx_v_descr = 0;
25715   int __pyx_v_offset;
25716   int __pyx_r;
25717   __Pyx_RefNannyDeclarations
25718   int __pyx_t_1;
25719   int __pyx_t_2;
25720   PyObject *__pyx_t_3 = NULL;
25721   int __pyx_t_4;
25722   int __pyx_t_5;
25723   int __pyx_t_6;
25724   PyArray_Descr *__pyx_t_7;
25725   PyObject *__pyx_t_8 = NULL;
25726   char *__pyx_t_9;
25727   if (__pyx_v_info == NULL) {
25728     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
25729     return -1;
25730   }
25731   __Pyx_RefNannySetupContext("__getbuffer__", 0);
25732   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
25733   __Pyx_GIVEREF(__pyx_v_info->obj);
25734 
25735   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
25736  *
25737  *             cdef int i, ndim
25738  *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
25739  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25740  *
25741  */
25742   __pyx_v_endian_detector = 1;
25743 
25744   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
25745  *             cdef int i, ndim
25746  *             cdef int endian_detector = 1
25747  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
25748  *
25749  *             ndim = PyArray_NDIM(self)
25750  */
25751   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
25752 
25753   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268
25754  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25755  *
25756  *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
25757  *
25758  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25759  */
25760   __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
25761 
25762   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
25763  *             ndim = PyArray_NDIM(self)
25764  *
25765  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
25766  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25767  *                 raise ValueError(u"ndarray is not C contiguous")
25768  */
25769   __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
25770   if (__pyx_t_2) {
25771   } else {
25772     __pyx_t_1 = __pyx_t_2;
25773     goto __pyx_L4_bool_binop_done;
25774   }
25775 
25776   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271
25777  *
25778  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25779  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
25780  *                 raise ValueError(u"ndarray is not C contiguous")
25781  *
25782  */
25783   __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
25784   __pyx_t_1 = __pyx_t_2;
25785   __pyx_L4_bool_binop_done:;
25786 
25787   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
25788  *             ndim = PyArray_NDIM(self)
25789  *
25790  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
25791  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25792  *                 raise ValueError(u"ndarray is not C contiguous")
25793  */
25794   if (unlikely(__pyx_t_1)) {
25795 
25796     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
25797  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25798  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25799  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
25800  *
25801  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25802  */
25803     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error)
25804     __Pyx_GOTREF(__pyx_t_3);
25805     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25806     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25807     __PYX_ERR(2, 272, __pyx_L1_error)
25808 
25809     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270
25810  *             ndim = PyArray_NDIM(self)
25811  *
25812  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
25813  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25814  *                 raise ValueError(u"ndarray is not C contiguous")
25815  */
25816   }
25817 
25818   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
25819  *                 raise ValueError(u"ndarray is not C contiguous")
25820  *
25821  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
25822  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25823  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25824  */
25825   __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
25826   if (__pyx_t_2) {
25827   } else {
25828     __pyx_t_1 = __pyx_t_2;
25829     goto __pyx_L7_bool_binop_done;
25830   }
25831 
25832   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275
25833  *
25834  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25835  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
25836  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25837  *
25838  */
25839   __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
25840   __pyx_t_1 = __pyx_t_2;
25841   __pyx_L7_bool_binop_done:;
25842 
25843   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
25844  *                 raise ValueError(u"ndarray is not C contiguous")
25845  *
25846  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
25847  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25848  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25849  */
25850   if (unlikely(__pyx_t_1)) {
25851 
25852     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
25853  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25854  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25855  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
25856  *
25857  *             info.buf = PyArray_DATA(self)
25858  */
25859     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error)
25860     __Pyx_GOTREF(__pyx_t_3);
25861     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25862     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25863     __PYX_ERR(2, 276, __pyx_L1_error)
25864 
25865     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274
25866  *                 raise ValueError(u"ndarray is not C contiguous")
25867  *
25868  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
25869  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25870  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25871  */
25872   }
25873 
25874   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278
25875  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25876  *
25877  *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
25878  *             info.ndim = ndim
25879  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
25880  */
25881   __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
25882 
25883   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279
25884  *
25885  *             info.buf = PyArray_DATA(self)
25886  *             info.ndim = ndim             # <<<<<<<<<<<<<<
25887  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
25888  *                 # Allocate new buffer for strides and shape info.
25889  */
25890   __pyx_v_info->ndim = __pyx_v_ndim;
25891 
25892   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
25893  *             info.buf = PyArray_DATA(self)
25894  *             info.ndim = ndim
25895  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
25896  *                 # Allocate new buffer for strides and shape info.
25897  *                 # This is allocated as one block, strides first.
25898  */
25899   __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
25900   if (__pyx_t_1) {
25901 
25902     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283
25903  *                 # Allocate new buffer for strides and shape info.
25904  *                 # This is allocated as one block, strides first.
25905  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)             # <<<<<<<<<<<<<<
25906  *                 info.shape = info.strides + ndim
25907  *                 for i in range(ndim):
25908  */
25909     __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
25910 
25911     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284
25912  *                 # This is allocated as one block, strides first.
25913  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
25914  *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
25915  *                 for i in range(ndim):
25916  *                     info.strides[i] = PyArray_STRIDES(self)[i]
25917  */
25918     __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
25919 
25920     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285
25921  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
25922  *                 info.shape = info.strides + ndim
25923  *                 for i in range(ndim):             # <<<<<<<<<<<<<<
25924  *                     info.strides[i] = PyArray_STRIDES(self)[i]
25925  *                     info.shape[i] = PyArray_DIMS(self)[i]
25926  */
25927     __pyx_t_4 = __pyx_v_ndim;
25928     __pyx_t_5 = __pyx_t_4;
25929     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
25930       __pyx_v_i = __pyx_t_6;
25931 
25932       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286
25933  *                 info.shape = info.strides + ndim
25934  *                 for i in range(ndim):
25935  *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
25936  *                     info.shape[i] = PyArray_DIMS(self)[i]
25937  *             else:
25938  */
25939       (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
25940 
25941       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287
25942  *                 for i in range(ndim):
25943  *                     info.strides[i] = PyArray_STRIDES(self)[i]
25944  *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
25945  *             else:
25946  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25947  */
25948       (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
25949     }
25950 
25951     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280
25952  *             info.buf = PyArray_DATA(self)
25953  *             info.ndim = ndim
25954  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
25955  *                 # Allocate new buffer for strides and shape info.
25956  *                 # This is allocated as one block, strides first.
25957  */
25958     goto __pyx_L9;
25959   }
25960 
25961   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289
25962  *                     info.shape[i] = PyArray_DIMS(self)[i]
25963  *             else:
25964  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
25965  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25966  *             info.suboffsets = NULL
25967  */
25968   /*else*/ {
25969     __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
25970 
25971     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290
25972  *             else:
25973  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25974  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
25975  *             info.suboffsets = NULL
25976  *             info.itemsize = PyArray_ITEMSIZE(self)
25977  */
25978     __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
25979   }
25980   __pyx_L9:;
25981 
25982   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291
25983  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25984  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25985  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
25986  *             info.itemsize = PyArray_ITEMSIZE(self)
25987  *             info.readonly = not PyArray_ISWRITEABLE(self)
25988  */
25989   __pyx_v_info->suboffsets = NULL;
25990 
25991   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292
25992  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25993  *             info.suboffsets = NULL
25994  *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
25995  *             info.readonly = not PyArray_ISWRITEABLE(self)
25996  *
25997  */
25998   __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
25999 
26000   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293
26001  *             info.suboffsets = NULL
26002  *             info.itemsize = PyArray_ITEMSIZE(self)
26003  *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
26004  *
26005  *             cdef int t
26006  */
26007   __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
26008 
26009   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296
26010  *
26011  *             cdef int t
26012  *             cdef char* f = NULL             # <<<<<<<<<<<<<<
26013  *             cdef dtype descr = <dtype>PyArray_DESCR(self)
26014  *             cdef int offset
26015  */
26016   __pyx_v_f = NULL;
26017 
26018   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297
26019  *             cdef int t
26020  *             cdef char* f = NULL
26021  *             cdef dtype descr = <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
26022  *             cdef int offset
26023  *
26024  */
26025   __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
26026   __pyx_t_3 = ((PyObject *)__pyx_t_7);
26027   __Pyx_INCREF(__pyx_t_3);
26028   __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
26029   __pyx_t_3 = 0;
26030 
26031   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300
26032  *             cdef int offset
26033  *
26034  *             info.obj = self             # <<<<<<<<<<<<<<
26035  *
26036  *             if not PyDataType_HASFIELDS(descr):
26037  */
26038   __Pyx_INCREF(((PyObject *)__pyx_v_self));
26039   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
26040   __Pyx_GOTREF(__pyx_v_info->obj);
26041   __Pyx_DECREF(__pyx_v_info->obj);
26042   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
26043 
26044   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
26045  *             info.obj = self
26046  *
26047  *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
26048  *                 t = descr.type_num
26049  *                 if ((descr.byteorder == c'>' and little_endian) or
26050  */
26051   __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
26052   if (__pyx_t_1) {
26053 
26054     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303
26055  *
26056  *             if not PyDataType_HASFIELDS(descr):
26057  *                 t = descr.type_num             # <<<<<<<<<<<<<<
26058  *                 if ((descr.byteorder == c'>' and little_endian) or
26059  *                     (descr.byteorder == c'<' and not little_endian)):
26060  */
26061     __pyx_t_4 = __pyx_v_descr->type_num;
26062     __pyx_v_t = __pyx_t_4;
26063 
26064     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
26065  *             if not PyDataType_HASFIELDS(descr):
26066  *                 t = descr.type_num
26067  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
26068  *                     (descr.byteorder == c'<' and not little_endian)):
26069  *                     raise ValueError(u"Non-native byte order not supported")
26070  */
26071     __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
26072     if (!__pyx_t_2) {
26073       goto __pyx_L15_next_or;
26074     } else {
26075     }
26076     __pyx_t_2 = (__pyx_v_little_endian != 0);
26077     if (!__pyx_t_2) {
26078     } else {
26079       __pyx_t_1 = __pyx_t_2;
26080       goto __pyx_L14_bool_binop_done;
26081     }
26082     __pyx_L15_next_or:;
26083 
26084     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305
26085  *                 t = descr.type_num
26086  *                 if ((descr.byteorder == c'>' and little_endian) or
26087  *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
26088  *                     raise ValueError(u"Non-native byte order not supported")
26089  *                 if   t == NPY_BYTE:        f = "b"
26090  */
26091     __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
26092     if (__pyx_t_2) {
26093     } else {
26094       __pyx_t_1 = __pyx_t_2;
26095       goto __pyx_L14_bool_binop_done;
26096     }
26097     __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
26098     __pyx_t_1 = __pyx_t_2;
26099     __pyx_L14_bool_binop_done:;
26100 
26101     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
26102  *             if not PyDataType_HASFIELDS(descr):
26103  *                 t = descr.type_num
26104  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
26105  *                     (descr.byteorder == c'<' and not little_endian)):
26106  *                     raise ValueError(u"Non-native byte order not supported")
26107  */
26108     if (unlikely(__pyx_t_1)) {
26109 
26110       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
26111  *                 if ((descr.byteorder == c'>' and little_endian) or
26112  *                     (descr.byteorder == c'<' and not little_endian)):
26113  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
26114  *                 if   t == NPY_BYTE:        f = "b"
26115  *                 elif t == NPY_UBYTE:       f = "B"
26116  */
26117       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error)
26118       __Pyx_GOTREF(__pyx_t_3);
26119       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26120       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26121       __PYX_ERR(2, 306, __pyx_L1_error)
26122 
26123       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304
26124  *             if not PyDataType_HASFIELDS(descr):
26125  *                 t = descr.type_num
26126  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
26127  *                     (descr.byteorder == c'<' and not little_endian)):
26128  *                     raise ValueError(u"Non-native byte order not supported")
26129  */
26130     }
26131 
26132     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307
26133  *                     (descr.byteorder == c'<' and not little_endian)):
26134  *                     raise ValueError(u"Non-native byte order not supported")
26135  *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
26136  *                 elif t == NPY_UBYTE:       f = "B"
26137  *                 elif t == NPY_SHORT:       f = "h"
26138  */
26139     switch (__pyx_v_t) {
26140       case NPY_BYTE:
26141       __pyx_v_f = ((char *)"b");
26142       break;
26143       case NPY_UBYTE:
26144 
26145       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308
26146  *                     raise ValueError(u"Non-native byte order not supported")
26147  *                 if   t == NPY_BYTE:        f = "b"
26148  *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
26149  *                 elif t == NPY_SHORT:       f = "h"
26150  *                 elif t == NPY_USHORT:      f = "H"
26151  */
26152       __pyx_v_f = ((char *)"B");
26153       break;
26154       case NPY_SHORT:
26155 
26156       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309
26157  *                 if   t == NPY_BYTE:        f = "b"
26158  *                 elif t == NPY_UBYTE:       f = "B"
26159  *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
26160  *                 elif t == NPY_USHORT:      f = "H"
26161  *                 elif t == NPY_INT:         f = "i"
26162  */
26163       __pyx_v_f = ((char *)"h");
26164       break;
26165       case NPY_USHORT:
26166 
26167       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310
26168  *                 elif t == NPY_UBYTE:       f = "B"
26169  *                 elif t == NPY_SHORT:       f = "h"
26170  *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
26171  *                 elif t == NPY_INT:         f = "i"
26172  *                 elif t == NPY_UINT:        f = "I"
26173  */
26174       __pyx_v_f = ((char *)"H");
26175       break;
26176       case NPY_INT:
26177 
26178       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311
26179  *                 elif t == NPY_SHORT:       f = "h"
26180  *                 elif t == NPY_USHORT:      f = "H"
26181  *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
26182  *                 elif t == NPY_UINT:        f = "I"
26183  *                 elif t == NPY_LONG:        f = "l"
26184  */
26185       __pyx_v_f = ((char *)"i");
26186       break;
26187       case NPY_UINT:
26188 
26189       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312
26190  *                 elif t == NPY_USHORT:      f = "H"
26191  *                 elif t == NPY_INT:         f = "i"
26192  *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
26193  *                 elif t == NPY_LONG:        f = "l"
26194  *                 elif t == NPY_ULONG:       f = "L"
26195  */
26196       __pyx_v_f = ((char *)"I");
26197       break;
26198       case NPY_LONG:
26199 
26200       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313
26201  *                 elif t == NPY_INT:         f = "i"
26202  *                 elif t == NPY_UINT:        f = "I"
26203  *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
26204  *                 elif t == NPY_ULONG:       f = "L"
26205  *                 elif t == NPY_LONGLONG:    f = "q"
26206  */
26207       __pyx_v_f = ((char *)"l");
26208       break;
26209       case NPY_ULONG:
26210 
26211       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314
26212  *                 elif t == NPY_UINT:        f = "I"
26213  *                 elif t == NPY_LONG:        f = "l"
26214  *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
26215  *                 elif t == NPY_LONGLONG:    f = "q"
26216  *                 elif t == NPY_ULONGLONG:   f = "Q"
26217  */
26218       __pyx_v_f = ((char *)"L");
26219       break;
26220       case NPY_LONGLONG:
26221 
26222       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315
26223  *                 elif t == NPY_LONG:        f = "l"
26224  *                 elif t == NPY_ULONG:       f = "L"
26225  *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
26226  *                 elif t == NPY_ULONGLONG:   f = "Q"
26227  *                 elif t == NPY_FLOAT:       f = "f"
26228  */
26229       __pyx_v_f = ((char *)"q");
26230       break;
26231       case NPY_ULONGLONG:
26232 
26233       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316
26234  *                 elif t == NPY_ULONG:       f = "L"
26235  *                 elif t == NPY_LONGLONG:    f = "q"
26236  *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
26237  *                 elif t == NPY_FLOAT:       f = "f"
26238  *                 elif t == NPY_DOUBLE:      f = "d"
26239  */
26240       __pyx_v_f = ((char *)"Q");
26241       break;
26242       case NPY_FLOAT:
26243 
26244       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317
26245  *                 elif t == NPY_LONGLONG:    f = "q"
26246  *                 elif t == NPY_ULONGLONG:   f = "Q"
26247  *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
26248  *                 elif t == NPY_DOUBLE:      f = "d"
26249  *                 elif t == NPY_LONGDOUBLE:  f = "g"
26250  */
26251       __pyx_v_f = ((char *)"f");
26252       break;
26253       case NPY_DOUBLE:
26254 
26255       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318
26256  *                 elif t == NPY_ULONGLONG:   f = "Q"
26257  *                 elif t == NPY_FLOAT:       f = "f"
26258  *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
26259  *                 elif t == NPY_LONGDOUBLE:  f = "g"
26260  *                 elif t == NPY_CFLOAT:      f = "Zf"
26261  */
26262       __pyx_v_f = ((char *)"d");
26263       break;
26264       case NPY_LONGDOUBLE:
26265 
26266       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319
26267  *                 elif t == NPY_FLOAT:       f = "f"
26268  *                 elif t == NPY_DOUBLE:      f = "d"
26269  *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
26270  *                 elif t == NPY_CFLOAT:      f = "Zf"
26271  *                 elif t == NPY_CDOUBLE:     f = "Zd"
26272  */
26273       __pyx_v_f = ((char *)"g");
26274       break;
26275       case NPY_CFLOAT:
26276 
26277       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320
26278  *                 elif t == NPY_DOUBLE:      f = "d"
26279  *                 elif t == NPY_LONGDOUBLE:  f = "g"
26280  *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
26281  *                 elif t == NPY_CDOUBLE:     f = "Zd"
26282  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
26283  */
26284       __pyx_v_f = ((char *)"Zf");
26285       break;
26286       case NPY_CDOUBLE:
26287 
26288       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321
26289  *                 elif t == NPY_LONGDOUBLE:  f = "g"
26290  *                 elif t == NPY_CFLOAT:      f = "Zf"
26291  *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
26292  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
26293  *                 elif t == NPY_OBJECT:      f = "O"
26294  */
26295       __pyx_v_f = ((char *)"Zd");
26296       break;
26297       case NPY_CLONGDOUBLE:
26298 
26299       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322
26300  *                 elif t == NPY_CFLOAT:      f = "Zf"
26301  *                 elif t == NPY_CDOUBLE:     f = "Zd"
26302  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
26303  *                 elif t == NPY_OBJECT:      f = "O"
26304  *                 else:
26305  */
26306       __pyx_v_f = ((char *)"Zg");
26307       break;
26308       case NPY_OBJECT:
26309 
26310       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323
26311  *                 elif t == NPY_CDOUBLE:     f = "Zd"
26312  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
26313  *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
26314  *                 else:
26315  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26316  */
26317       __pyx_v_f = ((char *)"O");
26318       break;
26319       default:
26320 
26321       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325
26322  *                 elif t == NPY_OBJECT:      f = "O"
26323  *                 else:
26324  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
26325  *                 info.format = f
26326  *                 return
26327  */
26328       __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
26329       __Pyx_GOTREF(__pyx_t_3);
26330       __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error)
26331       __Pyx_GOTREF(__pyx_t_8);
26332       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26333       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
26334       __Pyx_GOTREF(__pyx_t_3);
26335       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
26336       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26337       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26338       __PYX_ERR(2, 325, __pyx_L1_error)
26339       break;
26340     }
26341 
26342     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326
26343  *                 else:
26344  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26345  *                 info.format = f             # <<<<<<<<<<<<<<
26346  *                 return
26347  *             else:
26348  */
26349     __pyx_v_info->format = __pyx_v_f;
26350 
26351     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327
26352  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26353  *                 info.format = f
26354  *                 return             # <<<<<<<<<<<<<<
26355  *             else:
26356  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
26357  */
26358     __pyx_r = 0;
26359     goto __pyx_L0;
26360 
26361     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302
26362  *             info.obj = self
26363  *
26364  *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
26365  *                 t = descr.type_num
26366  *                 if ((descr.byteorder == c'>' and little_endian) or
26367  */
26368   }
26369 
26370   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329
26371  *                 return
26372  *             else:
26373  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
26374  *                 info.format[0] = c'^' # Native data types, manual alignment
26375  *                 offset = 0
26376  */
26377   /*else*/ {
26378     __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
26379 
26380     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330
26381  *             else:
26382  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
26383  *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
26384  *                 offset = 0
26385  *                 f = _util_dtypestring(descr, info.format + 1,
26386  */
26387     (__pyx_v_info->format[0]) = '^';
26388 
26389     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331
26390  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
26391  *                 info.format[0] = c'^' # Native data types, manual alignment
26392  *                 offset = 0             # <<<<<<<<<<<<<<
26393  *                 f = _util_dtypestring(descr, info.format + 1,
26394  *                                       info.format + _buffer_format_string_len,
26395  */
26396     __pyx_v_offset = 0;
26397 
26398     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332
26399  *                 info.format[0] = c'^' # Native data types, manual alignment
26400  *                 offset = 0
26401  *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
26402  *                                       info.format + _buffer_format_string_len,
26403  *                                       &offset)
26404  */
26405     __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(2, 332, __pyx_L1_error)
26406     __pyx_v_f = __pyx_t_9;
26407 
26408     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335
26409  *                                       info.format + _buffer_format_string_len,
26410  *                                       &offset)
26411  *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
26412  *
26413  *         def __releasebuffer__(ndarray self, Py_buffer* info):
26414  */
26415     (__pyx_v_f[0]) = '\x00';
26416   }
26417 
26418   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258
26419  *         # experimental exception made for __getbuffer__ and __releasebuffer__
26420  *         # -- the details of this may change.
26421  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
26422  *             # This implementation of getbuffer is geared towards Cython
26423  *             # requirements, and does not yet fulfill the PEP.
26424  */
26425 
26426   /* function exit code */
26427   __pyx_r = 0;
26428   goto __pyx_L0;
26429   __pyx_L1_error:;
26430   __Pyx_XDECREF(__pyx_t_3);
26431   __Pyx_XDECREF(__pyx_t_8);
26432   __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26433   __pyx_r = -1;
26434   if (__pyx_v_info->obj != NULL) {
26435     __Pyx_GOTREF(__pyx_v_info->obj);
26436     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
26437   }
26438   goto __pyx_L2;
26439   __pyx_L0:;
26440   if (__pyx_v_info->obj == Py_None) {
26441     __Pyx_GOTREF(__pyx_v_info->obj);
26442     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
26443   }
26444   __pyx_L2:;
26445   __Pyx_XDECREF((PyObject *)__pyx_v_descr);
26446   __Pyx_RefNannyFinishContext();
26447   return __pyx_r;
26448 }
26449 
26450 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
26451  *                 f[0] = c'\0' # Terminate format string
26452  *
26453  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
26454  *             if PyArray_HASFIELDS(self):
26455  *                 PyObject_Free(info.format)
26456  */
26457 
26458 /* Python wrapper */
26459 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)26460 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
26461   __Pyx_RefNannyDeclarations
26462   __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
26463   __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
26464 
26465   /* function exit code */
26466   __Pyx_RefNannyFinishContext();
26467 }
26468 
__pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info)26469 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
26470   __Pyx_RefNannyDeclarations
26471   int __pyx_t_1;
26472   __Pyx_RefNannySetupContext("__releasebuffer__", 0);
26473 
26474   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
26475  *
26476  *         def __releasebuffer__(ndarray self, Py_buffer* info):
26477  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
26478  *                 PyObject_Free(info.format)
26479  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
26480  */
26481   __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
26482   if (__pyx_t_1) {
26483 
26484     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339
26485  *         def __releasebuffer__(ndarray self, Py_buffer* info):
26486  *             if PyArray_HASFIELDS(self):
26487  *                 PyObject_Free(info.format)             # <<<<<<<<<<<<<<
26488  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
26489  *                 PyObject_Free(info.strides)
26490  */
26491     PyObject_Free(__pyx_v_info->format);
26492 
26493     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338
26494  *
26495  *         def __releasebuffer__(ndarray self, Py_buffer* info):
26496  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
26497  *                 PyObject_Free(info.format)
26498  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
26499  */
26500   }
26501 
26502   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
26503  *             if PyArray_HASFIELDS(self):
26504  *                 PyObject_Free(info.format)
26505  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
26506  *                 PyObject_Free(info.strides)
26507  *                 # info.shape was stored after info.strides in the same block
26508  */
26509   __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
26510   if (__pyx_t_1) {
26511 
26512     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341
26513  *                 PyObject_Free(info.format)
26514  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
26515  *                 PyObject_Free(info.strides)             # <<<<<<<<<<<<<<
26516  *                 # info.shape was stored after info.strides in the same block
26517  *
26518  */
26519     PyObject_Free(__pyx_v_info->strides);
26520 
26521     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340
26522  *             if PyArray_HASFIELDS(self):
26523  *                 PyObject_Free(info.format)
26524  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
26525  *                 PyObject_Free(info.strides)
26526  *                 # info.shape was stored after info.strides in the same block
26527  */
26528   }
26529 
26530   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337
26531  *                 f[0] = c'\0' # Terminate format string
26532  *
26533  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
26534  *             if PyArray_HASFIELDS(self):
26535  *                 PyObject_Free(info.format)
26536  */
26537 
26538   /* function exit code */
26539   __Pyx_RefNannyFinishContext();
26540 }
26541 
26542 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
26543  * ctypedef npy_cdouble     complex_t
26544  *
26545  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
26546  *     return PyArray_MultiIterNew(1, <void*>a)
26547  *
26548  */
26549 
__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject * __pyx_v_a)26550 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
26551   PyObject *__pyx_r = NULL;
26552   __Pyx_RefNannyDeclarations
26553   PyObject *__pyx_t_1 = NULL;
26554   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
26555 
26556   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822
26557  *
26558  * cdef inline object PyArray_MultiIterNew1(a):
26559  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
26560  *
26561  * cdef inline object PyArray_MultiIterNew2(a, b):
26562  */
26563   __Pyx_XDECREF(__pyx_r);
26564   __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error)
26565   __Pyx_GOTREF(__pyx_t_1);
26566   __pyx_r = __pyx_t_1;
26567   __pyx_t_1 = 0;
26568   goto __pyx_L0;
26569 
26570   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821
26571  * ctypedef npy_cdouble     complex_t
26572  *
26573  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
26574  *     return PyArray_MultiIterNew(1, <void*>a)
26575  *
26576  */
26577 
26578   /* function exit code */
26579   __pyx_L1_error:;
26580   __Pyx_XDECREF(__pyx_t_1);
26581   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
26582   __pyx_r = 0;
26583   __pyx_L0:;
26584   __Pyx_XGIVEREF(__pyx_r);
26585   __Pyx_RefNannyFinishContext();
26586   return __pyx_r;
26587 }
26588 
26589 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
26590  *     return PyArray_MultiIterNew(1, <void*>a)
26591  *
26592  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
26593  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26594  *
26595  */
26596 
__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject * __pyx_v_a,PyObject * __pyx_v_b)26597 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
26598   PyObject *__pyx_r = NULL;
26599   __Pyx_RefNannyDeclarations
26600   PyObject *__pyx_t_1 = NULL;
26601   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
26602 
26603   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825
26604  *
26605  * cdef inline object PyArray_MultiIterNew2(a, b):
26606  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
26607  *
26608  * cdef inline object PyArray_MultiIterNew3(a, b, c):
26609  */
26610   __Pyx_XDECREF(__pyx_r);
26611   __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error)
26612   __Pyx_GOTREF(__pyx_t_1);
26613   __pyx_r = __pyx_t_1;
26614   __pyx_t_1 = 0;
26615   goto __pyx_L0;
26616 
26617   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824
26618  *     return PyArray_MultiIterNew(1, <void*>a)
26619  *
26620  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
26621  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26622  *
26623  */
26624 
26625   /* function exit code */
26626   __pyx_L1_error:;
26627   __Pyx_XDECREF(__pyx_t_1);
26628   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
26629   __pyx_r = 0;
26630   __pyx_L0:;
26631   __Pyx_XGIVEREF(__pyx_r);
26632   __Pyx_RefNannyFinishContext();
26633   return __pyx_r;
26634 }
26635 
26636 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
26637  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26638  *
26639  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
26640  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26641  *
26642  */
26643 
__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c)26644 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
26645   PyObject *__pyx_r = NULL;
26646   __Pyx_RefNannyDeclarations
26647   PyObject *__pyx_t_1 = NULL;
26648   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
26649 
26650   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828
26651  *
26652  * cdef inline object PyArray_MultiIterNew3(a, b, c):
26653  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
26654  *
26655  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
26656  */
26657   __Pyx_XDECREF(__pyx_r);
26658   __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error)
26659   __Pyx_GOTREF(__pyx_t_1);
26660   __pyx_r = __pyx_t_1;
26661   __pyx_t_1 = 0;
26662   goto __pyx_L0;
26663 
26664   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827
26665  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26666  *
26667  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
26668  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26669  *
26670  */
26671 
26672   /* function exit code */
26673   __pyx_L1_error:;
26674   __Pyx_XDECREF(__pyx_t_1);
26675   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
26676   __pyx_r = 0;
26677   __pyx_L0:;
26678   __Pyx_XGIVEREF(__pyx_r);
26679   __Pyx_RefNannyFinishContext();
26680   return __pyx_r;
26681 }
26682 
26683 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
26684  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26685  *
26686  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
26687  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26688  *
26689  */
26690 
__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d)26691 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) {
26692   PyObject *__pyx_r = NULL;
26693   __Pyx_RefNannyDeclarations
26694   PyObject *__pyx_t_1 = NULL;
26695   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
26696 
26697   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831
26698  *
26699  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
26700  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
26701  *
26702  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
26703  */
26704   __Pyx_XDECREF(__pyx_r);
26705   __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error)
26706   __Pyx_GOTREF(__pyx_t_1);
26707   __pyx_r = __pyx_t_1;
26708   __pyx_t_1 = 0;
26709   goto __pyx_L0;
26710 
26711   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830
26712  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26713  *
26714  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
26715  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26716  *
26717  */
26718 
26719   /* function exit code */
26720   __pyx_L1_error:;
26721   __Pyx_XDECREF(__pyx_t_1);
26722   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
26723   __pyx_r = 0;
26724   __pyx_L0:;
26725   __Pyx_XGIVEREF(__pyx_r);
26726   __Pyx_RefNannyFinishContext();
26727   return __pyx_r;
26728 }
26729 
26730 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
26731  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26732  *
26733  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
26734  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26735  *
26736  */
26737 
__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)26738 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) {
26739   PyObject *__pyx_r = NULL;
26740   __Pyx_RefNannyDeclarations
26741   PyObject *__pyx_t_1 = NULL;
26742   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
26743 
26744   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834
26745  *
26746  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
26747  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
26748  *
26749  * cdef inline tuple PyDataType_SHAPE(dtype d):
26750  */
26751   __Pyx_XDECREF(__pyx_r);
26752   __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error)
26753   __Pyx_GOTREF(__pyx_t_1);
26754   __pyx_r = __pyx_t_1;
26755   __pyx_t_1 = 0;
26756   goto __pyx_L0;
26757 
26758   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833
26759  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26760  *
26761  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
26762  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26763  *
26764  */
26765 
26766   /* function exit code */
26767   __pyx_L1_error:;
26768   __Pyx_XDECREF(__pyx_t_1);
26769   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
26770   __pyx_r = 0;
26771   __pyx_L0:;
26772   __Pyx_XGIVEREF(__pyx_r);
26773   __Pyx_RefNannyFinishContext();
26774   return __pyx_r;
26775 }
26776 
26777 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
26778  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26779  *
26780  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
26781  *     if PyDataType_HASSUBARRAY(d):
26782  *         return <tuple>d.subarray.shape
26783  */
26784 
__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr * __pyx_v_d)26785 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
26786   PyObject *__pyx_r = NULL;
26787   __Pyx_RefNannyDeclarations
26788   int __pyx_t_1;
26789   __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
26790 
26791   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
26792  *
26793  * cdef inline tuple PyDataType_SHAPE(dtype d):
26794  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
26795  *         return <tuple>d.subarray.shape
26796  *     else:
26797  */
26798   __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
26799   if (__pyx_t_1) {
26800 
26801     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838
26802  * cdef inline tuple PyDataType_SHAPE(dtype d):
26803  *     if PyDataType_HASSUBARRAY(d):
26804  *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
26805  *     else:
26806  *         return ()
26807  */
26808     __Pyx_XDECREF(__pyx_r);
26809     __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
26810     __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
26811     goto __pyx_L0;
26812 
26813     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837
26814  *
26815  * cdef inline tuple PyDataType_SHAPE(dtype d):
26816  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
26817  *         return <tuple>d.subarray.shape
26818  *     else:
26819  */
26820   }
26821 
26822   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840
26823  *         return <tuple>d.subarray.shape
26824  *     else:
26825  *         return ()             # <<<<<<<<<<<<<<
26826  *
26827  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
26828  */
26829   /*else*/ {
26830     __Pyx_XDECREF(__pyx_r);
26831     __Pyx_INCREF(__pyx_empty_tuple);
26832     __pyx_r = __pyx_empty_tuple;
26833     goto __pyx_L0;
26834   }
26835 
26836   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836
26837  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26838  *
26839  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
26840  *     if PyDataType_HASSUBARRAY(d):
26841  *         return <tuple>d.subarray.shape
26842  */
26843 
26844   /* function exit code */
26845   __pyx_L0:;
26846   __Pyx_XGIVEREF(__pyx_r);
26847   __Pyx_RefNannyFinishContext();
26848   return __pyx_r;
26849 }
26850 
26851 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
26852  *         return ()
26853  *
26854  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
26855  *     # Recursive utility function used in __getbuffer__ to get format
26856  *     # string. The new location in the format string is returned.
26857  */
26858 
__pyx_f_5numpy__util_dtypestring(PyArray_Descr * __pyx_v_descr,char * __pyx_v_f,char * __pyx_v_end,int * __pyx_v_offset)26859 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) {
26860   PyArray_Descr *__pyx_v_child = 0;
26861   int __pyx_v_endian_detector;
26862   int __pyx_v_little_endian;
26863   PyObject *__pyx_v_fields = 0;
26864   PyObject *__pyx_v_childname = NULL;
26865   PyObject *__pyx_v_new_offset = NULL;
26866   PyObject *__pyx_v_t = NULL;
26867   char *__pyx_r;
26868   __Pyx_RefNannyDeclarations
26869   PyObject *__pyx_t_1 = NULL;
26870   Py_ssize_t __pyx_t_2;
26871   PyObject *__pyx_t_3 = NULL;
26872   PyObject *__pyx_t_4 = NULL;
26873   int __pyx_t_5;
26874   int __pyx_t_6;
26875   int __pyx_t_7;
26876   long __pyx_t_8;
26877   char *__pyx_t_9;
26878   __Pyx_RefNannySetupContext("_util_dtypestring", 0);
26879 
26880   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847
26881  *
26882  *     cdef dtype child
26883  *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
26884  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
26885  *     cdef tuple fields
26886  */
26887   __pyx_v_endian_detector = 1;
26888 
26889   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848
26890  *     cdef dtype child
26891  *     cdef int endian_detector = 1
26892  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
26893  *     cdef tuple fields
26894  *
26895  */
26896   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
26897 
26898   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
26899  *     cdef tuple fields
26900  *
26901  *     for childname in descr.names:             # <<<<<<<<<<<<<<
26902  *         fields = descr.fields[childname]
26903  *         child, new_offset = fields
26904  */
26905   if (unlikely(__pyx_v_descr->names == Py_None)) {
26906     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
26907     __PYX_ERR(2, 851, __pyx_L1_error)
26908   }
26909   __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
26910   for (;;) {
26911     if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
26912     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26913     __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(2, 851, __pyx_L1_error)
26914     #else
26915     __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error)
26916     __Pyx_GOTREF(__pyx_t_3);
26917     #endif
26918     __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
26919     __pyx_t_3 = 0;
26920 
26921     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852
26922  *
26923  *     for childname in descr.names:
26924  *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
26925  *         child, new_offset = fields
26926  *
26927  */
26928     if (unlikely(__pyx_v_descr->fields == Py_None)) {
26929       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
26930       __PYX_ERR(2, 852, __pyx_L1_error)
26931     }
26932     __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error)
26933     __Pyx_GOTREF(__pyx_t_3);
26934     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(2, 852, __pyx_L1_error)
26935     __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
26936     __pyx_t_3 = 0;
26937 
26938     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853
26939  *     for childname in descr.names:
26940  *         fields = descr.fields[childname]
26941  *         child, new_offset = fields             # <<<<<<<<<<<<<<
26942  *
26943  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
26944  */
26945     if (likely(__pyx_v_fields != Py_None)) {
26946       PyObject* sequence = __pyx_v_fields;
26947       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
26948       if (unlikely(size != 2)) {
26949         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
26950         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
26951         __PYX_ERR(2, 853, __pyx_L1_error)
26952       }
26953       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26954       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
26955       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
26956       __Pyx_INCREF(__pyx_t_3);
26957       __Pyx_INCREF(__pyx_t_4);
26958       #else
26959       __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error)
26960       __Pyx_GOTREF(__pyx_t_3);
26961       __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error)
26962       __Pyx_GOTREF(__pyx_t_4);
26963       #endif
26964     } else {
26965       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error)
26966     }
26967     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error)
26968     __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
26969     __pyx_t_3 = 0;
26970     __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
26971     __pyx_t_4 = 0;
26972 
26973     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
26974  *         child, new_offset = fields
26975  *
26976  *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
26977  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26978  *
26979  */
26980     __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error)
26981     __Pyx_GOTREF(__pyx_t_4);
26982     __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error)
26983     __Pyx_GOTREF(__pyx_t_3);
26984     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26985     __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error)
26986     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26987     __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
26988     if (unlikely(__pyx_t_6)) {
26989 
26990       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
26991  *
26992  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
26993  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
26994  *
26995  *         if ((child.byteorder == c'>' and little_endian) or
26996  */
26997       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error)
26998       __Pyx_GOTREF(__pyx_t_3);
26999       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27000       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27001       __PYX_ERR(2, 856, __pyx_L1_error)
27002 
27003       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855
27004  *         child, new_offset = fields
27005  *
27006  *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
27007  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27008  *
27009  */
27010     }
27011 
27012     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
27013  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27014  *
27015  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
27016  *             (child.byteorder == c'<' and not little_endian)):
27017  *             raise ValueError(u"Non-native byte order not supported")
27018  */
27019     __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
27020     if (!__pyx_t_7) {
27021       goto __pyx_L8_next_or;
27022     } else {
27023     }
27024     __pyx_t_7 = (__pyx_v_little_endian != 0);
27025     if (!__pyx_t_7) {
27026     } else {
27027       __pyx_t_6 = __pyx_t_7;
27028       goto __pyx_L7_bool_binop_done;
27029     }
27030     __pyx_L8_next_or:;
27031 
27032     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859
27033  *
27034  *         if ((child.byteorder == c'>' and little_endian) or
27035  *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
27036  *             raise ValueError(u"Non-native byte order not supported")
27037  *             # One could encode it in the format string and have Cython
27038  */
27039     __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
27040     if (__pyx_t_7) {
27041     } else {
27042       __pyx_t_6 = __pyx_t_7;
27043       goto __pyx_L7_bool_binop_done;
27044     }
27045     __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
27046     __pyx_t_6 = __pyx_t_7;
27047     __pyx_L7_bool_binop_done:;
27048 
27049     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
27050  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27051  *
27052  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
27053  *             (child.byteorder == c'<' and not little_endian)):
27054  *             raise ValueError(u"Non-native byte order not supported")
27055  */
27056     if (unlikely(__pyx_t_6)) {
27057 
27058       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860
27059  *         if ((child.byteorder == c'>' and little_endian) or
27060  *             (child.byteorder == c'<' and not little_endian)):
27061  *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
27062  *             # One could encode it in the format string and have Cython
27063  *             # complain instead, BUT: < and > in format strings also imply
27064  */
27065       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error)
27066       __Pyx_GOTREF(__pyx_t_3);
27067       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27068       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27069       __PYX_ERR(2, 860, __pyx_L1_error)
27070 
27071       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858
27072  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27073  *
27074  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
27075  *             (child.byteorder == c'<' and not little_endian)):
27076  *             raise ValueError(u"Non-native byte order not supported")
27077  */
27078     }
27079 
27080     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870
27081  *
27082  *         # Output padding bytes
27083  *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
27084  *             f[0] = 120 # "x"; pad byte
27085  *             f += 1
27086  */
27087     while (1) {
27088       __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error)
27089       __Pyx_GOTREF(__pyx_t_3);
27090       __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(2, 870, __pyx_L1_error)
27091       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27092       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error)
27093       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27094       if (!__pyx_t_6) break;
27095 
27096       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871
27097  *         # Output padding bytes
27098  *         while offset[0] < new_offset:
27099  *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
27100  *             f += 1
27101  *             offset[0] += 1
27102  */
27103       (__pyx_v_f[0]) = 0x78;
27104 
27105       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872
27106  *         while offset[0] < new_offset:
27107  *             f[0] = 120 # "x"; pad byte
27108  *             f += 1             # <<<<<<<<<<<<<<
27109  *             offset[0] += 1
27110  *
27111  */
27112       __pyx_v_f = (__pyx_v_f + 1);
27113 
27114       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873
27115  *             f[0] = 120 # "x"; pad byte
27116  *             f += 1
27117  *             offset[0] += 1             # <<<<<<<<<<<<<<
27118  *
27119  *         offset[0] += child.itemsize
27120  */
27121       __pyx_t_8 = 0;
27122       (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
27123     }
27124 
27125     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875
27126  *             offset[0] += 1
27127  *
27128  *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
27129  *
27130  *         if not PyDataType_HASFIELDS(child):
27131  */
27132     __pyx_t_8 = 0;
27133     (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
27134 
27135     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
27136  *         offset[0] += child.itemsize
27137  *
27138  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
27139  *             t = child.type_num
27140  *             if end - f < 5:
27141  */
27142     __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
27143     if (__pyx_t_6) {
27144 
27145       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878
27146  *
27147  *         if not PyDataType_HASFIELDS(child):
27148  *             t = child.type_num             # <<<<<<<<<<<<<<
27149  *             if end - f < 5:
27150  *                 raise RuntimeError(u"Format string allocated too short.")
27151  */
27152       __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error)
27153       __Pyx_GOTREF(__pyx_t_4);
27154       __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
27155       __pyx_t_4 = 0;
27156 
27157       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
27158  *         if not PyDataType_HASFIELDS(child):
27159  *             t = child.type_num
27160  *             if end - f < 5:             # <<<<<<<<<<<<<<
27161  *                 raise RuntimeError(u"Format string allocated too short.")
27162  *
27163  */
27164       __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
27165       if (unlikely(__pyx_t_6)) {
27166 
27167         /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
27168  *             t = child.type_num
27169  *             if end - f < 5:
27170  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
27171  *
27172  *             # Until ticket #99 is fixed, use integers to avoid warnings
27173  */
27174         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error)
27175         __Pyx_GOTREF(__pyx_t_4);
27176         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
27177         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27178         __PYX_ERR(2, 880, __pyx_L1_error)
27179 
27180         /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879
27181  *         if not PyDataType_HASFIELDS(child):
27182  *             t = child.type_num
27183  *             if end - f < 5:             # <<<<<<<<<<<<<<
27184  *                 raise RuntimeError(u"Format string allocated too short.")
27185  *
27186  */
27187       }
27188 
27189       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883
27190  *
27191  *             # Until ticket #99 is fixed, use integers to avoid warnings
27192  *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
27193  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
27194  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
27195  */
27196       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error)
27197       __Pyx_GOTREF(__pyx_t_4);
27198       __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(2, 883, __pyx_L1_error)
27199       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27200       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error)
27201       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27202       if (__pyx_t_6) {
27203         (__pyx_v_f[0]) = 98;
27204         goto __pyx_L15;
27205       }
27206 
27207       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884
27208  *             # Until ticket #99 is fixed, use integers to avoid warnings
27209  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
27210  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
27211  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
27212  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
27213  */
27214       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error)
27215       __Pyx_GOTREF(__pyx_t_3);
27216       __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(2, 884, __pyx_L1_error)
27217       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27218       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error)
27219       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27220       if (__pyx_t_6) {
27221         (__pyx_v_f[0]) = 66;
27222         goto __pyx_L15;
27223       }
27224 
27225       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885
27226  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
27227  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
27228  *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
27229  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
27230  *             elif t == NPY_INT:         f[0] = 105 #"i"
27231  */
27232       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error)
27233       __Pyx_GOTREF(__pyx_t_4);
27234       __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(2, 885, __pyx_L1_error)
27235       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27236       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error)
27237       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27238       if (__pyx_t_6) {
27239         (__pyx_v_f[0]) = 0x68;
27240         goto __pyx_L15;
27241       }
27242 
27243       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886
27244  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
27245  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
27246  *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
27247  *             elif t == NPY_INT:         f[0] = 105 #"i"
27248  *             elif t == NPY_UINT:        f[0] =  73 #"I"
27249  */
27250       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error)
27251       __Pyx_GOTREF(__pyx_t_3);
27252       __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(2, 886, __pyx_L1_error)
27253       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27254       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error)
27255       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27256       if (__pyx_t_6) {
27257         (__pyx_v_f[0]) = 72;
27258         goto __pyx_L15;
27259       }
27260 
27261       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887
27262  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
27263  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
27264  *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
27265  *             elif t == NPY_UINT:        f[0] =  73 #"I"
27266  *             elif t == NPY_LONG:        f[0] = 108 #"l"
27267  */
27268       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error)
27269       __Pyx_GOTREF(__pyx_t_4);
27270       __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(2, 887, __pyx_L1_error)
27271       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27272       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error)
27273       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27274       if (__pyx_t_6) {
27275         (__pyx_v_f[0]) = 0x69;
27276         goto __pyx_L15;
27277       }
27278 
27279       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888
27280  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
27281  *             elif t == NPY_INT:         f[0] = 105 #"i"
27282  *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
27283  *             elif t == NPY_LONG:        f[0] = 108 #"l"
27284  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
27285  */
27286       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error)
27287       __Pyx_GOTREF(__pyx_t_3);
27288       __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(2, 888, __pyx_L1_error)
27289       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27290       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error)
27291       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27292       if (__pyx_t_6) {
27293         (__pyx_v_f[0]) = 73;
27294         goto __pyx_L15;
27295       }
27296 
27297       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889
27298  *             elif t == NPY_INT:         f[0] = 105 #"i"
27299  *             elif t == NPY_UINT:        f[0] =  73 #"I"
27300  *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
27301  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
27302  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
27303  */
27304       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error)
27305       __Pyx_GOTREF(__pyx_t_4);
27306       __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(2, 889, __pyx_L1_error)
27307       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27308       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error)
27309       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27310       if (__pyx_t_6) {
27311         (__pyx_v_f[0]) = 0x6C;
27312         goto __pyx_L15;
27313       }
27314 
27315       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890
27316  *             elif t == NPY_UINT:        f[0] =  73 #"I"
27317  *             elif t == NPY_LONG:        f[0] = 108 #"l"
27318  *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
27319  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
27320  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
27321  */
27322       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error)
27323       __Pyx_GOTREF(__pyx_t_3);
27324       __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(2, 890, __pyx_L1_error)
27325       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27326       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error)
27327       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27328       if (__pyx_t_6) {
27329         (__pyx_v_f[0]) = 76;
27330         goto __pyx_L15;
27331       }
27332 
27333       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891
27334  *             elif t == NPY_LONG:        f[0] = 108 #"l"
27335  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
27336  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
27337  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
27338  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
27339  */
27340       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error)
27341       __Pyx_GOTREF(__pyx_t_4);
27342       __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(2, 891, __pyx_L1_error)
27343       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27344       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error)
27345       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27346       if (__pyx_t_6) {
27347         (__pyx_v_f[0]) = 0x71;
27348         goto __pyx_L15;
27349       }
27350 
27351       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892
27352  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
27353  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
27354  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
27355  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
27356  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
27357  */
27358       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error)
27359       __Pyx_GOTREF(__pyx_t_3);
27360       __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(2, 892, __pyx_L1_error)
27361       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27362       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error)
27363       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27364       if (__pyx_t_6) {
27365         (__pyx_v_f[0]) = 81;
27366         goto __pyx_L15;
27367       }
27368 
27369       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893
27370  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
27371  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
27372  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
27373  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
27374  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
27375  */
27376       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error)
27377       __Pyx_GOTREF(__pyx_t_4);
27378       __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(2, 893, __pyx_L1_error)
27379       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27380       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error)
27381       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27382       if (__pyx_t_6) {
27383         (__pyx_v_f[0]) = 0x66;
27384         goto __pyx_L15;
27385       }
27386 
27387       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894
27388  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
27389  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
27390  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
27391  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
27392  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
27393  */
27394       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error)
27395       __Pyx_GOTREF(__pyx_t_3);
27396       __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(2, 894, __pyx_L1_error)
27397       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27398       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error)
27399       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27400       if (__pyx_t_6) {
27401         (__pyx_v_f[0]) = 0x64;
27402         goto __pyx_L15;
27403       }
27404 
27405       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895
27406  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
27407  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
27408  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
27409  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
27410  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
27411  */
27412       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error)
27413       __Pyx_GOTREF(__pyx_t_4);
27414       __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(2, 895, __pyx_L1_error)
27415       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27416       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error)
27417       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27418       if (__pyx_t_6) {
27419         (__pyx_v_f[0]) = 0x67;
27420         goto __pyx_L15;
27421       }
27422 
27423       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896
27424  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
27425  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
27426  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
27427  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
27428  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27429  */
27430       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error)
27431       __Pyx_GOTREF(__pyx_t_3);
27432       __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(2, 896, __pyx_L1_error)
27433       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27434       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error)
27435       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27436       if (__pyx_t_6) {
27437         (__pyx_v_f[0]) = 90;
27438         (__pyx_v_f[1]) = 0x66;
27439         __pyx_v_f = (__pyx_v_f + 1);
27440         goto __pyx_L15;
27441       }
27442 
27443       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897
27444  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
27445  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
27446  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
27447  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27448  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
27449  */
27450       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error)
27451       __Pyx_GOTREF(__pyx_t_4);
27452       __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(2, 897, __pyx_L1_error)
27453       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27454       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error)
27455       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27456       if (__pyx_t_6) {
27457         (__pyx_v_f[0]) = 90;
27458         (__pyx_v_f[1]) = 0x64;
27459         __pyx_v_f = (__pyx_v_f + 1);
27460         goto __pyx_L15;
27461       }
27462 
27463       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898
27464  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
27465  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
27466  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
27467  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
27468  *             else:
27469  */
27470       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error)
27471       __Pyx_GOTREF(__pyx_t_3);
27472       __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(2, 898, __pyx_L1_error)
27473       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27474       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error)
27475       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27476       if (__pyx_t_6) {
27477         (__pyx_v_f[0]) = 90;
27478         (__pyx_v_f[1]) = 0x67;
27479         __pyx_v_f = (__pyx_v_f + 1);
27480         goto __pyx_L15;
27481       }
27482 
27483       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899
27484  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
27485  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27486  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
27487  *             else:
27488  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
27489  */
27490       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error)
27491       __Pyx_GOTREF(__pyx_t_4);
27492       __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(2, 899, __pyx_L1_error)
27493       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27494       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error)
27495       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27496       if (likely(__pyx_t_6)) {
27497         (__pyx_v_f[0]) = 79;
27498         goto __pyx_L15;
27499       }
27500 
27501       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901
27502  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
27503  *             else:
27504  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
27505  *             f += 1
27506  *         else:
27507  */
27508       /*else*/ {
27509         __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(2, 901, __pyx_L1_error)
27510         __Pyx_GOTREF(__pyx_t_3);
27511         __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error)
27512         __Pyx_GOTREF(__pyx_t_4);
27513         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27514         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
27515         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27516         __PYX_ERR(2, 901, __pyx_L1_error)
27517       }
27518       __pyx_L15:;
27519 
27520       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902
27521  *             else:
27522  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
27523  *             f += 1             # <<<<<<<<<<<<<<
27524  *         else:
27525  *             # Cython ignores struct boundary information ("T{...}"),
27526  */
27527       __pyx_v_f = (__pyx_v_f + 1);
27528 
27529       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877
27530  *         offset[0] += child.itemsize
27531  *
27532  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
27533  *             t = child.type_num
27534  *             if end - f < 5:
27535  */
27536       goto __pyx_L13;
27537     }
27538 
27539     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906
27540  *             # Cython ignores struct boundary information ("T{...}"),
27541  *             # so don't output it
27542  *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
27543  *     return f
27544  *
27545  */
27546     /*else*/ {
27547       __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(2, 906, __pyx_L1_error)
27548       __pyx_v_f = __pyx_t_9;
27549     }
27550     __pyx_L13:;
27551 
27552     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851
27553  *     cdef tuple fields
27554  *
27555  *     for childname in descr.names:             # <<<<<<<<<<<<<<
27556  *         fields = descr.fields[childname]
27557  *         child, new_offset = fields
27558  */
27559   }
27560   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27561 
27562   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907
27563  *             # so don't output it
27564  *             f = _util_dtypestring(child, f, end, offset)
27565  *     return f             # <<<<<<<<<<<<<<
27566  *
27567  *
27568  */
27569   __pyx_r = __pyx_v_f;
27570   goto __pyx_L0;
27571 
27572   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842
27573  *         return ()
27574  *
27575  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
27576  *     # Recursive utility function used in __getbuffer__ to get format
27577  *     # string. The new location in the format string is returned.
27578  */
27579 
27580   /* function exit code */
27581   __pyx_L1_error:;
27582   __Pyx_XDECREF(__pyx_t_1);
27583   __Pyx_XDECREF(__pyx_t_3);
27584   __Pyx_XDECREF(__pyx_t_4);
27585   __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
27586   __pyx_r = NULL;
27587   __pyx_L0:;
27588   __Pyx_XDECREF((PyObject *)__pyx_v_child);
27589   __Pyx_XDECREF(__pyx_v_fields);
27590   __Pyx_XDECREF(__pyx_v_childname);
27591   __Pyx_XDECREF(__pyx_v_new_offset);
27592   __Pyx_XDECREF(__pyx_v_t);
27593   __Pyx_RefNannyFinishContext();
27594   return __pyx_r;
27595 }
27596 
27597 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
27598  *     int _import_umath() except -1
27599  *
27600  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
27601  *     Py_INCREF(base) # important to do this before stealing the reference below!
27602  *     PyArray_SetBaseObject(arr, base)
27603  */
27604 
__pyx_f_5numpy_set_array_base(PyArrayObject * __pyx_v_arr,PyObject * __pyx_v_base)27605 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
27606   __Pyx_RefNannyDeclarations
27607   __Pyx_RefNannySetupContext("set_array_base", 0);
27608 
27609   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023
27610  *
27611  * cdef inline void set_array_base(ndarray arr, object base):
27612  *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
27613  *     PyArray_SetBaseObject(arr, base)
27614  *
27615  */
27616   Py_INCREF(__pyx_v_base);
27617 
27618   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024
27619  * cdef inline void set_array_base(ndarray arr, object base):
27620  *     Py_INCREF(base) # important to do this before stealing the reference below!
27621  *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
27622  *
27623  * cdef inline object get_array_base(ndarray arr):
27624  */
27625   (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
27626 
27627   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022
27628  *     int _import_umath() except -1
27629  *
27630  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
27631  *     Py_INCREF(base) # important to do this before stealing the reference below!
27632  *     PyArray_SetBaseObject(arr, base)
27633  */
27634 
27635   /* function exit code */
27636   __Pyx_RefNannyFinishContext();
27637 }
27638 
27639 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
27640  *     PyArray_SetBaseObject(arr, base)
27641  *
27642  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
27643  *     base = PyArray_BASE(arr)
27644  *     if base is NULL:
27645  */
27646 
__pyx_f_5numpy_get_array_base(PyArrayObject * __pyx_v_arr)27647 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
27648   PyObject *__pyx_v_base;
27649   PyObject *__pyx_r = NULL;
27650   __Pyx_RefNannyDeclarations
27651   int __pyx_t_1;
27652   __Pyx_RefNannySetupContext("get_array_base", 0);
27653 
27654   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027
27655  *
27656  * cdef inline object get_array_base(ndarray arr):
27657  *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
27658  *     if base is NULL:
27659  *         return None
27660  */
27661   __pyx_v_base = PyArray_BASE(__pyx_v_arr);
27662 
27663   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
27664  * cdef inline object get_array_base(ndarray arr):
27665  *     base = PyArray_BASE(arr)
27666  *     if base is NULL:             # <<<<<<<<<<<<<<
27667  *         return None
27668  *     return <object>base
27669  */
27670   __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
27671   if (__pyx_t_1) {
27672 
27673     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029
27674  *     base = PyArray_BASE(arr)
27675  *     if base is NULL:
27676  *         return None             # <<<<<<<<<<<<<<
27677  *     return <object>base
27678  *
27679  */
27680     __Pyx_XDECREF(__pyx_r);
27681     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27682     goto __pyx_L0;
27683 
27684     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028
27685  * cdef inline object get_array_base(ndarray arr):
27686  *     base = PyArray_BASE(arr)
27687  *     if base is NULL:             # <<<<<<<<<<<<<<
27688  *         return None
27689  *     return <object>base
27690  */
27691   }
27692 
27693   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030
27694  *     if base is NULL:
27695  *         return None
27696  *     return <object>base             # <<<<<<<<<<<<<<
27697  *
27698  * # Versions of the import_* functions which are more suitable for
27699  */
27700   __Pyx_XDECREF(__pyx_r);
27701   __Pyx_INCREF(((PyObject *)__pyx_v_base));
27702   __pyx_r = ((PyObject *)__pyx_v_base);
27703   goto __pyx_L0;
27704 
27705   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026
27706  *     PyArray_SetBaseObject(arr, base)
27707  *
27708  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
27709  *     base = PyArray_BASE(arr)
27710  *     if base is NULL:
27711  */
27712 
27713   /* function exit code */
27714   __pyx_L0:;
27715   __Pyx_XGIVEREF(__pyx_r);
27716   __Pyx_RefNannyFinishContext();
27717   return __pyx_r;
27718 }
27719 
27720 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
27721  * # Versions of the import_* functions which are more suitable for
27722  * # Cython code.
27723  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
27724  *     try:
27725  *         _import_array()
27726  */
27727 
__pyx_f_5numpy_import_array(void)27728 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
27729   int __pyx_r;
27730   __Pyx_RefNannyDeclarations
27731   PyObject *__pyx_t_1 = NULL;
27732   PyObject *__pyx_t_2 = NULL;
27733   PyObject *__pyx_t_3 = NULL;
27734   int __pyx_t_4;
27735   PyObject *__pyx_t_5 = NULL;
27736   PyObject *__pyx_t_6 = NULL;
27737   PyObject *__pyx_t_7 = NULL;
27738   PyObject *__pyx_t_8 = NULL;
27739   __Pyx_RefNannySetupContext("import_array", 0);
27740 
27741   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
27742  * # Cython code.
27743  * cdef inline int import_array() except -1:
27744  *     try:             # <<<<<<<<<<<<<<
27745  *         _import_array()
27746  *     except Exception:
27747  */
27748   {
27749     __Pyx_PyThreadState_declare
27750     __Pyx_PyThreadState_assign
27751     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27752     __Pyx_XGOTREF(__pyx_t_1);
27753     __Pyx_XGOTREF(__pyx_t_2);
27754     __Pyx_XGOTREF(__pyx_t_3);
27755     /*try:*/ {
27756 
27757       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036
27758  * cdef inline int import_array() except -1:
27759  *     try:
27760  *         _import_array()             # <<<<<<<<<<<<<<
27761  *     except Exception:
27762  *         raise ImportError("numpy.core.multiarray failed to import")
27763  */
27764       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error)
27765 
27766       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
27767  * # Cython code.
27768  * cdef inline int import_array() except -1:
27769  *     try:             # <<<<<<<<<<<<<<
27770  *         _import_array()
27771  *     except Exception:
27772  */
27773     }
27774     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27775     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27776     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27777     goto __pyx_L8_try_end;
27778     __pyx_L3_error:;
27779 
27780     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037
27781  *     try:
27782  *         _import_array()
27783  *     except Exception:             # <<<<<<<<<<<<<<
27784  *         raise ImportError("numpy.core.multiarray failed to import")
27785  *
27786  */
27787     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27788     if (__pyx_t_4) {
27789       __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
27790       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error)
27791       __Pyx_GOTREF(__pyx_t_5);
27792       __Pyx_GOTREF(__pyx_t_6);
27793       __Pyx_GOTREF(__pyx_t_7);
27794 
27795       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
27796  *         _import_array()
27797  *     except Exception:
27798  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
27799  *
27800  * cdef inline int import_umath() except -1:
27801  */
27802       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error)
27803       __Pyx_GOTREF(__pyx_t_8);
27804       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27805       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27806       __PYX_ERR(2, 1038, __pyx_L5_except_error)
27807     }
27808     goto __pyx_L5_except_error;
27809     __pyx_L5_except_error:;
27810 
27811     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035
27812  * # Cython code.
27813  * cdef inline int import_array() except -1:
27814  *     try:             # <<<<<<<<<<<<<<
27815  *         _import_array()
27816  *     except Exception:
27817  */
27818     __Pyx_XGIVEREF(__pyx_t_1);
27819     __Pyx_XGIVEREF(__pyx_t_2);
27820     __Pyx_XGIVEREF(__pyx_t_3);
27821     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27822     goto __pyx_L1_error;
27823     __pyx_L8_try_end:;
27824   }
27825 
27826   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034
27827  * # Versions of the import_* functions which are more suitable for
27828  * # Cython code.
27829  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
27830  *     try:
27831  *         _import_array()
27832  */
27833 
27834   /* function exit code */
27835   __pyx_r = 0;
27836   goto __pyx_L0;
27837   __pyx_L1_error:;
27838   __Pyx_XDECREF(__pyx_t_5);
27839   __Pyx_XDECREF(__pyx_t_6);
27840   __Pyx_XDECREF(__pyx_t_7);
27841   __Pyx_XDECREF(__pyx_t_8);
27842   __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
27843   __pyx_r = -1;
27844   __pyx_L0:;
27845   __Pyx_RefNannyFinishContext();
27846   return __pyx_r;
27847 }
27848 
27849 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
27850  *         raise ImportError("numpy.core.multiarray failed to import")
27851  *
27852  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
27853  *     try:
27854  *         _import_umath()
27855  */
27856 
__pyx_f_5numpy_import_umath(void)27857 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
27858   int __pyx_r;
27859   __Pyx_RefNannyDeclarations
27860   PyObject *__pyx_t_1 = NULL;
27861   PyObject *__pyx_t_2 = NULL;
27862   PyObject *__pyx_t_3 = NULL;
27863   int __pyx_t_4;
27864   PyObject *__pyx_t_5 = NULL;
27865   PyObject *__pyx_t_6 = NULL;
27866   PyObject *__pyx_t_7 = NULL;
27867   PyObject *__pyx_t_8 = NULL;
27868   __Pyx_RefNannySetupContext("import_umath", 0);
27869 
27870   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27871  *
27872  * cdef inline int import_umath() except -1:
27873  *     try:             # <<<<<<<<<<<<<<
27874  *         _import_umath()
27875  *     except Exception:
27876  */
27877   {
27878     __Pyx_PyThreadState_declare
27879     __Pyx_PyThreadState_assign
27880     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27881     __Pyx_XGOTREF(__pyx_t_1);
27882     __Pyx_XGOTREF(__pyx_t_2);
27883     __Pyx_XGOTREF(__pyx_t_3);
27884     /*try:*/ {
27885 
27886       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042
27887  * cdef inline int import_umath() except -1:
27888  *     try:
27889  *         _import_umath()             # <<<<<<<<<<<<<<
27890  *     except Exception:
27891  *         raise ImportError("numpy.core.umath failed to import")
27892  */
27893       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error)
27894 
27895       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27896  *
27897  * cdef inline int import_umath() except -1:
27898  *     try:             # <<<<<<<<<<<<<<
27899  *         _import_umath()
27900  *     except Exception:
27901  */
27902     }
27903     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27904     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27905     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27906     goto __pyx_L8_try_end;
27907     __pyx_L3_error:;
27908 
27909     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043
27910  *     try:
27911  *         _import_umath()
27912  *     except Exception:             # <<<<<<<<<<<<<<
27913  *         raise ImportError("numpy.core.umath failed to import")
27914  *
27915  */
27916     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27917     if (__pyx_t_4) {
27918       __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
27919       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error)
27920       __Pyx_GOTREF(__pyx_t_5);
27921       __Pyx_GOTREF(__pyx_t_6);
27922       __Pyx_GOTREF(__pyx_t_7);
27923 
27924       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
27925  *         _import_umath()
27926  *     except Exception:
27927  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
27928  *
27929  * cdef inline int import_ufunc() except -1:
27930  */
27931       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error)
27932       __Pyx_GOTREF(__pyx_t_8);
27933       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27934       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27935       __PYX_ERR(2, 1044, __pyx_L5_except_error)
27936     }
27937     goto __pyx_L5_except_error;
27938     __pyx_L5_except_error:;
27939 
27940     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27941  *
27942  * cdef inline int import_umath() except -1:
27943  *     try:             # <<<<<<<<<<<<<<
27944  *         _import_umath()
27945  *     except Exception:
27946  */
27947     __Pyx_XGIVEREF(__pyx_t_1);
27948     __Pyx_XGIVEREF(__pyx_t_2);
27949     __Pyx_XGIVEREF(__pyx_t_3);
27950     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27951     goto __pyx_L1_error;
27952     __pyx_L8_try_end:;
27953   }
27954 
27955   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040
27956  *         raise ImportError("numpy.core.multiarray failed to import")
27957  *
27958  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
27959  *     try:
27960  *         _import_umath()
27961  */
27962 
27963   /* function exit code */
27964   __pyx_r = 0;
27965   goto __pyx_L0;
27966   __pyx_L1_error:;
27967   __Pyx_XDECREF(__pyx_t_5);
27968   __Pyx_XDECREF(__pyx_t_6);
27969   __Pyx_XDECREF(__pyx_t_7);
27970   __Pyx_XDECREF(__pyx_t_8);
27971   __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
27972   __pyx_r = -1;
27973   __pyx_L0:;
27974   __Pyx_RefNannyFinishContext();
27975   return __pyx_r;
27976 }
27977 
27978 /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
27979  *         raise ImportError("numpy.core.umath failed to import")
27980  *
27981  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
27982  *     try:
27983  *         _import_umath()
27984  */
27985 
__pyx_f_5numpy_import_ufunc(void)27986 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
27987   int __pyx_r;
27988   __Pyx_RefNannyDeclarations
27989   PyObject *__pyx_t_1 = NULL;
27990   PyObject *__pyx_t_2 = NULL;
27991   PyObject *__pyx_t_3 = NULL;
27992   int __pyx_t_4;
27993   PyObject *__pyx_t_5 = NULL;
27994   PyObject *__pyx_t_6 = NULL;
27995   PyObject *__pyx_t_7 = NULL;
27996   PyObject *__pyx_t_8 = NULL;
27997   __Pyx_RefNannySetupContext("import_ufunc", 0);
27998 
27999   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
28000  *
28001  * cdef inline int import_ufunc() except -1:
28002  *     try:             # <<<<<<<<<<<<<<
28003  *         _import_umath()
28004  *     except Exception:
28005  */
28006   {
28007     __Pyx_PyThreadState_declare
28008     __Pyx_PyThreadState_assign
28009     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
28010     __Pyx_XGOTREF(__pyx_t_1);
28011     __Pyx_XGOTREF(__pyx_t_2);
28012     __Pyx_XGOTREF(__pyx_t_3);
28013     /*try:*/ {
28014 
28015       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048
28016  * cdef inline int import_ufunc() except -1:
28017  *     try:
28018  *         _import_umath()             # <<<<<<<<<<<<<<
28019  *     except Exception:
28020  *         raise ImportError("numpy.core.umath failed to import")
28021  */
28022       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error)
28023 
28024       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
28025  *
28026  * cdef inline int import_ufunc() except -1:
28027  *     try:             # <<<<<<<<<<<<<<
28028  *         _import_umath()
28029  *     except Exception:
28030  */
28031     }
28032     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28033     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28034     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28035     goto __pyx_L8_try_end;
28036     __pyx_L3_error:;
28037 
28038     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049
28039  *     try:
28040  *         _import_umath()
28041  *     except Exception:             # <<<<<<<<<<<<<<
28042  *         raise ImportError("numpy.core.umath failed to import")
28043  */
28044     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
28045     if (__pyx_t_4) {
28046       __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
28047       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error)
28048       __Pyx_GOTREF(__pyx_t_5);
28049       __Pyx_GOTREF(__pyx_t_6);
28050       __Pyx_GOTREF(__pyx_t_7);
28051 
28052       /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050
28053  *         _import_umath()
28054  *     except Exception:
28055  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
28056  */
28057       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error)
28058       __Pyx_GOTREF(__pyx_t_8);
28059       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
28060       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
28061       __PYX_ERR(2, 1050, __pyx_L5_except_error)
28062     }
28063     goto __pyx_L5_except_error;
28064     __pyx_L5_except_error:;
28065 
28066     /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047
28067  *
28068  * cdef inline int import_ufunc() except -1:
28069  *     try:             # <<<<<<<<<<<<<<
28070  *         _import_umath()
28071  *     except Exception:
28072  */
28073     __Pyx_XGIVEREF(__pyx_t_1);
28074     __Pyx_XGIVEREF(__pyx_t_2);
28075     __Pyx_XGIVEREF(__pyx_t_3);
28076     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
28077     goto __pyx_L1_error;
28078     __pyx_L8_try_end:;
28079   }
28080 
28081   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046
28082  *         raise ImportError("numpy.core.umath failed to import")
28083  *
28084  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
28085  *     try:
28086  *         _import_umath()
28087  */
28088 
28089   /* function exit code */
28090   __pyx_r = 0;
28091   goto __pyx_L0;
28092   __pyx_L1_error:;
28093   __Pyx_XDECREF(__pyx_t_5);
28094   __Pyx_XDECREF(__pyx_t_6);
28095   __Pyx_XDECREF(__pyx_t_7);
28096   __Pyx_XDECREF(__pyx_t_8);
28097   __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
28098   __pyx_r = -1;
28099   __pyx_L0:;
28100   __Pyx_RefNannyFinishContext();
28101   return __pyx_r;
28102 }
28103 
28104 /* "yt/utilities/lib/geometry_utils.pxd":24
28105  * @cython.boundscheck(False)
28106  * @cython.wraparound(False)
28107  * cdef inline np.int64_t ifrexp(np.float64_t x, np.int64_t *e):             # <<<<<<<<<<<<<<
28108  *     cdef np.float64_t m
28109  *     cdef int e0 = 0
28110  */
28111 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_ifrexp(__pyx_t_5numpy_float64_t __pyx_v_x,__pyx_t_5numpy_int64_t * __pyx_v_e)28112 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) {
28113   __pyx_t_5numpy_float64_t __pyx_v_m;
28114   int __pyx_v_e0;
28115   __pyx_t_5numpy_int64_t __pyx_r;
28116   __Pyx_RefNannyDeclarations
28117   __Pyx_RefNannySetupContext("ifrexp", 0);
28118 
28119   /* "yt/utilities/lib/geometry_utils.pxd":26
28120  * cdef inline np.int64_t ifrexp(np.float64_t x, np.int64_t *e):
28121  *     cdef np.float64_t m
28122  *     cdef int e0 = 0             # <<<<<<<<<<<<<<
28123  *     m = frexp(x,&e0)
28124  *     e[0] = <np.int64_t>e0
28125  */
28126   __pyx_v_e0 = 0;
28127 
28128   /* "yt/utilities/lib/geometry_utils.pxd":27
28129  *     cdef np.float64_t m
28130  *     cdef int e0 = 0
28131  *     m = frexp(x,&e0)             # <<<<<<<<<<<<<<
28132  *     e[0] = <np.int64_t>e0
28133  *     return <np.int64_t>ldexp(m,<int>DBL_MANT_DIG)
28134  */
28135   __pyx_v_m = frexp(__pyx_v_x, (&__pyx_v_e0));
28136 
28137   /* "yt/utilities/lib/geometry_utils.pxd":28
28138  *     cdef int e0 = 0
28139  *     m = frexp(x,&e0)
28140  *     e[0] = <np.int64_t>e0             # <<<<<<<<<<<<<<
28141  *     return <np.int64_t>ldexp(m,<int>DBL_MANT_DIG)
28142  *
28143  */
28144   (__pyx_v_e[0]) = ((__pyx_t_5numpy_int64_t)__pyx_v_e0);
28145 
28146   /* "yt/utilities/lib/geometry_utils.pxd":29
28147  *     m = frexp(x,&e0)
28148  *     e[0] = <np.int64_t>e0
28149  *     return <np.int64_t>ldexp(m,<int>DBL_MANT_DIG)             # <<<<<<<<<<<<<<
28150  *
28151  * @cython.cdivision(True)
28152  */
28153   __pyx_r = ((__pyx_t_5numpy_int64_t)ldexp(__pyx_v_m, ((int)DBL_MANT_DIG)));
28154   goto __pyx_L0;
28155 
28156   /* "yt/utilities/lib/geometry_utils.pxd":24
28157  * @cython.boundscheck(False)
28158  * @cython.wraparound(False)
28159  * cdef inline np.int64_t ifrexp(np.float64_t x, np.int64_t *e):             # <<<<<<<<<<<<<<
28160  *     cdef np.float64_t m
28161  *     cdef int e0 = 0
28162  */
28163 
28164   /* function exit code */
28165   __pyx_L0:;
28166   __Pyx_RefNannyFinishContext();
28167   return __pyx_r;
28168 }
28169 
28170 /* "yt/utilities/lib/geometry_utils.pxd":34
28171  * @cython.boundscheck(False)
28172  * @cython.wraparound(False)
28173  * cdef inline np.int64_t msdb(np.int64_t a, np.int64_t b):             # <<<<<<<<<<<<<<
28174  *     """Get the most significant differing bit between a and b."""
28175  *     cdef np.int64_t c, ndx
28176  */
28177 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_msdb(__pyx_t_5numpy_int64_t __pyx_v_a,__pyx_t_5numpy_int64_t __pyx_v_b)28178 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) {
28179   __pyx_t_5numpy_int64_t __pyx_v_c;
28180   __pyx_t_5numpy_int64_t __pyx_v_ndx;
28181   __pyx_t_5numpy_int64_t __pyx_r;
28182   __Pyx_RefNannyDeclarations
28183   int __pyx_t_1;
28184   __Pyx_RefNannySetupContext("msdb", 0);
28185 
28186   /* "yt/utilities/lib/geometry_utils.pxd":37
28187  *     """Get the most significant differing bit between a and b."""
28188  *     cdef np.int64_t c, ndx
28189  *     c = a ^ b             # <<<<<<<<<<<<<<
28190  *     ndx = 0
28191  *     while (0 < c):
28192  */
28193   __pyx_v_c = (__pyx_v_a ^ __pyx_v_b);
28194 
28195   /* "yt/utilities/lib/geometry_utils.pxd":38
28196  *     cdef np.int64_t c, ndx
28197  *     c = a ^ b
28198  *     ndx = 0             # <<<<<<<<<<<<<<
28199  *     while (0 < c):
28200  *         c = (c >> 1)
28201  */
28202   __pyx_v_ndx = 0;
28203 
28204   /* "yt/utilities/lib/geometry_utils.pxd":39
28205  *     c = a ^ b
28206  *     ndx = 0
28207  *     while (0 < c):             # <<<<<<<<<<<<<<
28208  *         c = (c >> 1)
28209  *         ndx+=1
28210  */
28211   while (1) {
28212     __pyx_t_1 = ((0 < __pyx_v_c) != 0);
28213     if (!__pyx_t_1) break;
28214 
28215     /* "yt/utilities/lib/geometry_utils.pxd":40
28216  *     ndx = 0
28217  *     while (0 < c):
28218  *         c = (c >> 1)             # <<<<<<<<<<<<<<
28219  *         ndx+=1
28220  *     return ndx
28221  */
28222     __pyx_v_c = (__pyx_v_c >> 1);
28223 
28224     /* "yt/utilities/lib/geometry_utils.pxd":41
28225  *     while (0 < c):
28226  *         c = (c >> 1)
28227  *         ndx+=1             # <<<<<<<<<<<<<<
28228  *     return ndx
28229  *
28230  */
28231     __pyx_v_ndx = (__pyx_v_ndx + 1);
28232   }
28233 
28234   /* "yt/utilities/lib/geometry_utils.pxd":42
28235  *         c = (c >> 1)
28236  *         ndx+=1
28237  *     return ndx             # <<<<<<<<<<<<<<
28238  *
28239  * @cython.cdivision(True)
28240  */
28241   __pyx_r = __pyx_v_ndx;
28242   goto __pyx_L0;
28243 
28244   /* "yt/utilities/lib/geometry_utils.pxd":34
28245  * @cython.boundscheck(False)
28246  * @cython.wraparound(False)
28247  * cdef inline np.int64_t msdb(np.int64_t a, np.int64_t b):             # <<<<<<<<<<<<<<
28248  *     """Get the most significant differing bit between a and b."""
28249  *     cdef np.int64_t c, ndx
28250  */
28251 
28252   /* function exit code */
28253   __pyx_L0:;
28254   __Pyx_RefNannyFinishContext();
28255   return __pyx_r;
28256 }
28257 
28258 /* "yt/utilities/lib/geometry_utils.pxd":47
28259  * @cython.boundscheck(False)
28260  * @cython.wraparound(False)
28261  * cdef inline np.int64_t xor_msb(np.float64_t a, np.float64_t b):             # <<<<<<<<<<<<<<
28262  *     """Get the exponent of the highest differing bit between a and b"""
28263  *     # Get mantissa and exponents for each number
28264  */
28265 
__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)28266 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) {
28267   __pyx_t_5numpy_int64_t __pyx_v_a_m;
28268   __pyx_t_5numpy_int64_t __pyx_v_a_e;
28269   __pyx_t_5numpy_int64_t __pyx_v_b_m;
28270   __pyx_t_5numpy_int64_t __pyx_v_b_e;
28271   __pyx_t_5numpy_int64_t __pyx_v_x;
28272   __pyx_t_5numpy_int64_t __pyx_v_y;
28273   __pyx_t_5numpy_int64_t __pyx_v_z;
28274   __pyx_t_5numpy_int64_t __pyx_r;
28275   __Pyx_RefNannyDeclarations
28276   int __pyx_t_1;
28277   __Pyx_RefNannySetupContext("xor_msb", 0);
28278 
28279   /* "yt/utilities/lib/geometry_utils.pxd":51
28280  *     # Get mantissa and exponents for each number
28281  *     cdef np.int64_t a_m, a_e, b_m, b_e, x, y, z
28282  *     b_e = 0             # <<<<<<<<<<<<<<
28283  *     a_e = 0
28284  *     a_m = ifrexp(a,&a_e)
28285  */
28286   __pyx_v_b_e = 0;
28287 
28288   /* "yt/utilities/lib/geometry_utils.pxd":52
28289  *     cdef np.int64_t a_m, a_e, b_m, b_e, x, y, z
28290  *     b_e = 0
28291  *     a_e = 0             # <<<<<<<<<<<<<<
28292  *     a_m = ifrexp(a,&a_e)
28293  *     b_m = ifrexp(b,&b_e)
28294  */
28295   __pyx_v_a_e = 0;
28296 
28297   /* "yt/utilities/lib/geometry_utils.pxd":53
28298  *     b_e = 0
28299  *     a_e = 0
28300  *     a_m = ifrexp(a,&a_e)             # <<<<<<<<<<<<<<
28301  *     b_m = ifrexp(b,&b_e)
28302  *     x = <np.int64_t> ((a_e+1)*DBL_MANT_DIG)
28303  */
28304   __pyx_v_a_m = __pyx_f_2yt_9utilities_3lib_14geometry_utils_ifrexp(__pyx_v_a, (&__pyx_v_a_e));
28305 
28306   /* "yt/utilities/lib/geometry_utils.pxd":54
28307  *     a_e = 0
28308  *     a_m = ifrexp(a,&a_e)
28309  *     b_m = ifrexp(b,&b_e)             # <<<<<<<<<<<<<<
28310  *     x = <np.int64_t> ((a_e+1)*DBL_MANT_DIG)
28311  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)
28312  */
28313   __pyx_v_b_m = __pyx_f_2yt_9utilities_3lib_14geometry_utils_ifrexp(__pyx_v_b, (&__pyx_v_b_e));
28314 
28315   /* "yt/utilities/lib/geometry_utils.pxd":55
28316  *     a_m = ifrexp(a,&a_e)
28317  *     b_m = ifrexp(b,&b_e)
28318  *     x = <np.int64_t> ((a_e+1)*DBL_MANT_DIG)             # <<<<<<<<<<<<<<
28319  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)
28320  *     # Compare mantissa if exponents equal
28321  */
28322   __pyx_v_x = ((__pyx_t_5numpy_int64_t)((__pyx_v_a_e + 1) * DBL_MANT_DIG));
28323 
28324   /* "yt/utilities/lib/geometry_utils.pxd":56
28325  *     b_m = ifrexp(b,&b_e)
28326  *     x = <np.int64_t> ((a_e+1)*DBL_MANT_DIG)
28327  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)             # <<<<<<<<<<<<<<
28328  *     # Compare mantissa if exponents equal
28329  *     if x == y:
28330  */
28331   __pyx_v_y = ((__pyx_t_5numpy_int64_t)((__pyx_v_b_e + 1) * DBL_MANT_DIG));
28332 
28333   /* "yt/utilities/lib/geometry_utils.pxd":58
28334  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)
28335  *     # Compare mantissa if exponents equal
28336  *     if x == y:             # <<<<<<<<<<<<<<
28337  *         if a_m == b_m: return 0
28338  *         z = msdb(a_m,b_m)
28339  */
28340   __pyx_t_1 = ((__pyx_v_x == __pyx_v_y) != 0);
28341   if (__pyx_t_1) {
28342 
28343     /* "yt/utilities/lib/geometry_utils.pxd":59
28344  *     # Compare mantissa if exponents equal
28345  *     if x == y:
28346  *         if a_m == b_m: return 0             # <<<<<<<<<<<<<<
28347  *         z = msdb(a_m,b_m)
28348  *         #if 1: return z
28349  */
28350     __pyx_t_1 = ((__pyx_v_a_m == __pyx_v_b_m) != 0);
28351     if (__pyx_t_1) {
28352       __pyx_r = 0;
28353       goto __pyx_L0;
28354     }
28355 
28356     /* "yt/utilities/lib/geometry_utils.pxd":60
28357  *     if x == y:
28358  *         if a_m == b_m: return 0
28359  *         z = msdb(a_m,b_m)             # <<<<<<<<<<<<<<
28360  *         #if 1: return z
28361  *         x = x - z
28362  */
28363     __pyx_v_z = __pyx_f_2yt_9utilities_3lib_14geometry_utils_msdb(__pyx_v_a_m, __pyx_v_b_m);
28364 
28365     /* "yt/utilities/lib/geometry_utils.pxd":62
28366  *         z = msdb(a_m,b_m)
28367  *         #if 1: return z
28368  *         x = x - z             # <<<<<<<<<<<<<<
28369  *         return x-1 # required so that xor_msb(0.0,1.0)!=xor_msb(1.0,1.0)
28370  *     # Otherwise return largest exponent
28371  */
28372     __pyx_v_x = (__pyx_v_x - __pyx_v_z);
28373 
28374     /* "yt/utilities/lib/geometry_utils.pxd":63
28375  *         #if 1: return z
28376  *         x = x - z
28377  *         return x-1 # required so that xor_msb(0.0,1.0)!=xor_msb(1.0,1.0)             # <<<<<<<<<<<<<<
28378  *     # Otherwise return largest exponent
28379  *     if y < x:
28380  */
28381     __pyx_r = (__pyx_v_x - 1);
28382     goto __pyx_L0;
28383 
28384     /* "yt/utilities/lib/geometry_utils.pxd":58
28385  *     y = <np.int64_t> ((b_e+1)*DBL_MANT_DIG)
28386  *     # Compare mantissa if exponents equal
28387  *     if x == y:             # <<<<<<<<<<<<<<
28388  *         if a_m == b_m: return 0
28389  *         z = msdb(a_m,b_m)
28390  */
28391   }
28392 
28393   /* "yt/utilities/lib/geometry_utils.pxd":65
28394  *         return x-1 # required so that xor_msb(0.0,1.0)!=xor_msb(1.0,1.0)
28395  *     # Otherwise return largest exponent
28396  *     if y < x:             # <<<<<<<<<<<<<<
28397  *         return x
28398  *     else:
28399  */
28400   __pyx_t_1 = ((__pyx_v_y < __pyx_v_x) != 0);
28401   if (__pyx_t_1) {
28402 
28403     /* "yt/utilities/lib/geometry_utils.pxd":66
28404  *     # Otherwise return largest exponent
28405  *     if y < x:
28406  *         return x             # <<<<<<<<<<<<<<
28407  *     else:
28408  *         return y
28409  */
28410     __pyx_r = __pyx_v_x;
28411     goto __pyx_L0;
28412 
28413     /* "yt/utilities/lib/geometry_utils.pxd":65
28414  *         return x-1 # required so that xor_msb(0.0,1.0)!=xor_msb(1.0,1.0)
28415  *     # Otherwise return largest exponent
28416  *     if y < x:             # <<<<<<<<<<<<<<
28417  *         return x
28418  *     else:
28419  */
28420   }
28421 
28422   /* "yt/utilities/lib/geometry_utils.pxd":68
28423  *         return x
28424  *     else:
28425  *         return y             # <<<<<<<<<<<<<<
28426  *
28427  * @cython.cdivision(True)
28428  */
28429   /*else*/ {
28430     __pyx_r = __pyx_v_y;
28431     goto __pyx_L0;
28432   }
28433 
28434   /* "yt/utilities/lib/geometry_utils.pxd":47
28435  * @cython.boundscheck(False)
28436  * @cython.wraparound(False)
28437  * cdef inline np.int64_t xor_msb(np.float64_t a, np.float64_t b):             # <<<<<<<<<<<<<<
28438  *     """Get the exponent of the highest differing bit between a and b"""
28439  *     # Get mantissa and exponents for each number
28440  */
28441 
28442   /* function exit code */
28443   __pyx_L0:;
28444   __Pyx_RefNannyFinishContext();
28445   return __pyx_r;
28446 }
28447 
28448 /* "yt/utilities/lib/geometry_utils.pxd":73
28449  * @cython.boundscheck(False)
28450  * @cython.wraparound(False)
28451  * cdef inline int compare_floats_morton(np.float64_t p[3], np.float64_t q[3]):             # <<<<<<<<<<<<<<
28452  *     cdef int j, out, dim
28453  *     cdef np.int64_t x, y
28454  */
28455 
__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)28456 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) {
28457   int __pyx_v_j;
28458   int __pyx_v_out;
28459   int __pyx_v_dim;
28460   __pyx_t_5numpy_int64_t __pyx_v_x;
28461   __pyx_t_5numpy_int64_t __pyx_v_y;
28462   int __pyx_r;
28463   __Pyx_RefNannyDeclarations
28464   int __pyx_t_1;
28465   int __pyx_t_2;
28466   __Pyx_RefNannySetupContext("compare_floats_morton", 0);
28467 
28468   /* "yt/utilities/lib/geometry_utils.pxd":76
28469  *     cdef int j, out, dim
28470  *     cdef np.int64_t x, y
28471  *     x = -9999999999             # <<<<<<<<<<<<<<
28472  *     y = 0
28473  *     dim = 0
28474  */
28475   __pyx_v_x = -9999999999LL;
28476 
28477   /* "yt/utilities/lib/geometry_utils.pxd":77
28478  *     cdef np.int64_t x, y
28479  *     x = -9999999999
28480  *     y = 0             # <<<<<<<<<<<<<<
28481  *     dim = 0
28482  *     for j in range(3):#[::-1]:
28483  */
28484   __pyx_v_y = 0;
28485 
28486   /* "yt/utilities/lib/geometry_utils.pxd":78
28487  *     x = -9999999999
28488  *     y = 0
28489  *     dim = 0             # <<<<<<<<<<<<<<
28490  *     for j in range(3):#[::-1]:
28491  *         y = xor_msb(p[j],q[j])
28492  */
28493   __pyx_v_dim = 0;
28494 
28495   /* "yt/utilities/lib/geometry_utils.pxd":79
28496  *     y = 0
28497  *     dim = 0
28498  *     for j in range(3):#[::-1]:             # <<<<<<<<<<<<<<
28499  *         y = xor_msb(p[j],q[j])
28500  *         if x < y:
28501  */
28502   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
28503     __pyx_v_j = __pyx_t_1;
28504 
28505     /* "yt/utilities/lib/geometry_utils.pxd":80
28506  *     dim = 0
28507  *     for j in range(3):#[::-1]:
28508  *         y = xor_msb(p[j],q[j])             # <<<<<<<<<<<<<<
28509  *         if x < y:
28510  *            x = y
28511  */
28512     __pyx_v_y = __pyx_f_2yt_9utilities_3lib_14geometry_utils_xor_msb((__pyx_v_p[__pyx_v_j]), (__pyx_v_q[__pyx_v_j]));
28513 
28514     /* "yt/utilities/lib/geometry_utils.pxd":81
28515  *     for j in range(3):#[::-1]:
28516  *         y = xor_msb(p[j],q[j])
28517  *         if x < y:             # <<<<<<<<<<<<<<
28518  *            x = y
28519  *            dim = j
28520  */
28521     __pyx_t_2 = ((__pyx_v_x < __pyx_v_y) != 0);
28522     if (__pyx_t_2) {
28523 
28524       /* "yt/utilities/lib/geometry_utils.pxd":82
28525  *         y = xor_msb(p[j],q[j])
28526  *         if x < y:
28527  *            x = y             # <<<<<<<<<<<<<<
28528  *            dim = j
28529  *     if p[dim] < q[dim]:
28530  */
28531       __pyx_v_x = __pyx_v_y;
28532 
28533       /* "yt/utilities/lib/geometry_utils.pxd":83
28534  *         if x < y:
28535  *            x = y
28536  *            dim = j             # <<<<<<<<<<<<<<
28537  *     if p[dim] < q[dim]:
28538  *         out = 1
28539  */
28540       __pyx_v_dim = __pyx_v_j;
28541 
28542       /* "yt/utilities/lib/geometry_utils.pxd":81
28543  *     for j in range(3):#[::-1]:
28544  *         y = xor_msb(p[j],q[j])
28545  *         if x < y:             # <<<<<<<<<<<<<<
28546  *            x = y
28547  *            dim = j
28548  */
28549     }
28550   }
28551 
28552   /* "yt/utilities/lib/geometry_utils.pxd":84
28553  *            x = y
28554  *            dim = j
28555  *     if p[dim] < q[dim]:             # <<<<<<<<<<<<<<
28556  *         out = 1
28557  *     else:
28558  */
28559   __pyx_t_2 = (((__pyx_v_p[__pyx_v_dim]) < (__pyx_v_q[__pyx_v_dim])) != 0);
28560   if (__pyx_t_2) {
28561 
28562     /* "yt/utilities/lib/geometry_utils.pxd":85
28563  *            dim = j
28564  *     if p[dim] < q[dim]:
28565  *         out = 1             # <<<<<<<<<<<<<<
28566  *     else:
28567  *         out = 0
28568  */
28569     __pyx_v_out = 1;
28570 
28571     /* "yt/utilities/lib/geometry_utils.pxd":84
28572  *            x = y
28573  *            dim = j
28574  *     if p[dim] < q[dim]:             # <<<<<<<<<<<<<<
28575  *         out = 1
28576  *     else:
28577  */
28578     goto __pyx_L6;
28579   }
28580 
28581   /* "yt/utilities/lib/geometry_utils.pxd":87
28582  *         out = 1
28583  *     else:
28584  *         out = 0             # <<<<<<<<<<<<<<
28585  *     return out
28586  *
28587  */
28588   /*else*/ {
28589     __pyx_v_out = 0;
28590   }
28591   __pyx_L6:;
28592 
28593   /* "yt/utilities/lib/geometry_utils.pxd":88
28594  *     else:
28595  *         out = 0
28596  *     return out             # <<<<<<<<<<<<<<
28597  *
28598  * @cython.cdivision(True)
28599  */
28600   __pyx_r = __pyx_v_out;
28601   goto __pyx_L0;
28602 
28603   /* "yt/utilities/lib/geometry_utils.pxd":73
28604  * @cython.boundscheck(False)
28605  * @cython.wraparound(False)
28606  * cdef inline int compare_floats_morton(np.float64_t p[3], np.float64_t q[3]):             # <<<<<<<<<<<<<<
28607  *     cdef int j, out, dim
28608  *     cdef np.int64_t x, y
28609  */
28610 
28611   /* function exit code */
28612   __pyx_L0:;
28613   __Pyx_RefNannyFinishContext();
28614   return __pyx_r;
28615 }
28616 
28617 /* "yt/utilities/lib/geometry_utils.pxd":93
28618  * @cython.boundscheck(False)
28619  * @cython.wraparound(False)
28620  * cdef inline np.float64_t euclidean_distance(np.float64_t[:] p, np.float64_t[:] q):             # <<<<<<<<<<<<<<
28621  *     cdef int j
28622  *     cdef np.float64_t d
28623  */
28624 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_euclidean_distance(__Pyx_memviewslice __pyx_v_p,__Pyx_memviewslice __pyx_v_q)28625 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) {
28626   int __pyx_v_j;
28627   __pyx_t_5numpy_float64_t __pyx_v_d;
28628   __pyx_t_5numpy_float64_t __pyx_r;
28629   __Pyx_RefNannyDeclarations
28630   int __pyx_t_1;
28631   Py_ssize_t __pyx_t_2;
28632   int __pyx_t_3;
28633   Py_ssize_t __pyx_t_4;
28634   __Pyx_RefNannySetupContext("euclidean_distance", 0);
28635 
28636   /* "yt/utilities/lib/geometry_utils.pxd":96
28637  *     cdef int j
28638  *     cdef np.float64_t d
28639  *     d = 0.0             # <<<<<<<<<<<<<<
28640  *     for j in range(3):
28641  *         d+=(p[j]-q[j])**2
28642  */
28643   __pyx_v_d = 0.0;
28644 
28645   /* "yt/utilities/lib/geometry_utils.pxd":97
28646  *     cdef np.float64_t d
28647  *     d = 0.0
28648  *     for j in range(3):             # <<<<<<<<<<<<<<
28649  *         d+=(p[j]-q[j])**2
28650  *     return sqrt(d)
28651  */
28652   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
28653     __pyx_v_j = __pyx_t_1;
28654 
28655     /* "yt/utilities/lib/geometry_utils.pxd":98
28656  *     d = 0.0
28657  *     for j in range(3):
28658  *         d+=(p[j]-q[j])**2             # <<<<<<<<<<<<<<
28659  *     return sqrt(d)
28660  *
28661  */
28662     __pyx_t_2 = __pyx_v_j;
28663     __pyx_t_3 = -1;
28664     if (__pyx_t_2 < 0) {
28665       __pyx_t_2 += __pyx_v_p.shape[0];
28666       if (unlikely(__pyx_t_2 < 0)) __pyx_t_3 = 0;
28667     } else if (unlikely(__pyx_t_2 >= __pyx_v_p.shape[0])) __pyx_t_3 = 0;
28668     if (unlikely(__pyx_t_3 != -1)) {
28669       __Pyx_RaiseBufferIndexError(__pyx_t_3);
28670       __PYX_ERR(3, 98, __pyx_L1_error)
28671     }
28672     __pyx_t_4 = __pyx_v_j;
28673     __pyx_t_3 = -1;
28674     if (__pyx_t_4 < 0) {
28675       __pyx_t_4 += __pyx_v_q.shape[0];
28676       if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0;
28677     } else if (unlikely(__pyx_t_4 >= __pyx_v_q.shape[0])) __pyx_t_3 = 0;
28678     if (unlikely(__pyx_t_3 != -1)) {
28679       __Pyx_RaiseBufferIndexError(__pyx_t_3);
28680       __PYX_ERR(3, 98, __pyx_L1_error)
28681     }
28682     __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));
28683   }
28684 
28685   /* "yt/utilities/lib/geometry_utils.pxd":99
28686  *     for j in range(3):
28687  *         d+=(p[j]-q[j])**2
28688  *     return sqrt(d)             # <<<<<<<<<<<<<<
28689  *
28690  * # Todo: allow radius reported independently in each dimension for rectangular domain
28691  */
28692   __pyx_r = sqrt(__pyx_v_d);
28693   goto __pyx_L0;
28694 
28695   /* "yt/utilities/lib/geometry_utils.pxd":93
28696  * @cython.boundscheck(False)
28697  * @cython.wraparound(False)
28698  * cdef inline np.float64_t euclidean_distance(np.float64_t[:] p, np.float64_t[:] q):             # <<<<<<<<<<<<<<
28699  *     cdef int j
28700  *     cdef np.float64_t d
28701  */
28702 
28703   /* function exit code */
28704   __pyx_L1_error:;
28705   __Pyx_WriteUnraisable("yt.utilities.lib.geometry_utils.euclidean_distance", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
28706   __pyx_r = 0;
28707   __pyx_L0:;
28708   __Pyx_RefNannyFinishContext();
28709   return __pyx_r;
28710 }
28711 
28712 /* "yt/utilities/lib/geometry_utils.pxd":105
28713  * @cython.boundscheck(False)
28714  * @cython.wraparound(False)
28715  * cdef inline np.float64_t smallest_quadtree_box(np.float64_t p[3], np.float64_t q[3], np.int32_t order,             # <<<<<<<<<<<<<<
28716  *                                                np.float64_t DLE[3], np.float64_t DRE[3],
28717  *                                                np.float64_t *cx, np.float64_t *cy, np.float64_t *cz):
28718  */
28719 
__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)28720 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) {
28721   int __pyx_v_j;
28722   __pyx_t_5numpy_float64_t __pyx_v_c[3];
28723   __pyx_t_5numpy_uint64_t __pyx_v_pidx[3];
28724   __pyx_t_5numpy_uint64_t __pyx_v_pidx_next[3];
28725   __pyx_t_5numpy_uint64_t __pyx_v_qidx_next[3];
28726   __pyx_t_5numpy_float64_t __pyx_v_dds[3];
28727   __pyx_t_5numpy_float64_t __pyx_v_rad;
28728   int __pyx_v_lvl;
28729   int __pyx_v_done;
28730   __pyx_t_5numpy_float64_t __pyx_r;
28731   __Pyx_RefNannyDeclarations
28732   int __pyx_t_1;
28733   int __pyx_t_2;
28734   __Pyx_RefNannySetupContext("smallest_quadtree_box", 0);
28735 
28736   /* "yt/utilities/lib/geometry_utils.pxd":112
28737  *     cdef np.uint64_t pidx[3]
28738  *     # cdef np.uint64_t qidx[3]
28739  *     for j in range(3):             # <<<<<<<<<<<<<<
28740  *         pidx[j] = 0
28741  *         # qidx[j] = 0
28742  */
28743   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
28744     __pyx_v_j = __pyx_t_1;
28745 
28746     /* "yt/utilities/lib/geometry_utils.pxd":113
28747  *     # cdef np.uint64_t qidx[3]
28748  *     for j in range(3):
28749  *         pidx[j] = 0             # <<<<<<<<<<<<<<
28750  *         # qidx[j] = 0
28751  *     cdef np.uint64_t pidx_next[3]
28752  */
28753     (__pyx_v_pidx[__pyx_v_j]) = 0;
28754   }
28755 
28756   /* "yt/utilities/lib/geometry_utils.pxd":119
28757  *     cdef np.float64_t dds[3]
28758  *     cdef np.float64_t rad
28759  *     cdef int lvl = 0             # <<<<<<<<<<<<<<
28760  *     cdef int done = 0
28761  *     while not done:
28762  */
28763   __pyx_v_lvl = 0;
28764 
28765   /* "yt/utilities/lib/geometry_utils.pxd":120
28766  *     cdef np.float64_t rad
28767  *     cdef int lvl = 0
28768  *     cdef int done = 0             # <<<<<<<<<<<<<<
28769  *     while not done:
28770  *         if (lvl+1 >= order):
28771  */
28772   __pyx_v_done = 0;
28773 
28774   /* "yt/utilities/lib/geometry_utils.pxd":121
28775  *     cdef int lvl = 0
28776  *     cdef int done = 0
28777  *     while not done:             # <<<<<<<<<<<<<<
28778  *         if (lvl+1 >= order):
28779  *             done = 1
28780  */
28781   while (1) {
28782     __pyx_t_2 = ((!(__pyx_v_done != 0)) != 0);
28783     if (!__pyx_t_2) break;
28784 
28785     /* "yt/utilities/lib/geometry_utils.pxd":122
28786  *     cdef int done = 0
28787  *     while not done:
28788  *         if (lvl+1 >= order):             # <<<<<<<<<<<<<<
28789  *             done = 1
28790  *         for j in range(3):
28791  */
28792     __pyx_t_2 = (((__pyx_v_lvl + 1) >= __pyx_v_order) != 0);
28793     if (__pyx_t_2) {
28794 
28795       /* "yt/utilities/lib/geometry_utils.pxd":123
28796  *     while not done:
28797  *         if (lvl+1 >= order):
28798  *             done = 1             # <<<<<<<<<<<<<<
28799  *         for j in range(3):
28800  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))
28801  */
28802       __pyx_v_done = 1;
28803 
28804       /* "yt/utilities/lib/geometry_utils.pxd":122
28805  *     cdef int done = 0
28806  *     while not done:
28807  *         if (lvl+1 >= order):             # <<<<<<<<<<<<<<
28808  *             done = 1
28809  *         for j in range(3):
28810  */
28811     }
28812 
28813     /* "yt/utilities/lib/geometry_utils.pxd":124
28814  *         if (lvl+1 >= order):
28815  *             done = 1
28816  *         for j in range(3):             # <<<<<<<<<<<<<<
28817  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))
28818  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])
28819  */
28820     for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
28821       __pyx_v_j = __pyx_t_1;
28822 
28823       /* "yt/utilities/lib/geometry_utils.pxd":125
28824  *             done = 1
28825  *         for j in range(3):
28826  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))             # <<<<<<<<<<<<<<
28827  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])
28828  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
28829  */
28830       (__pyx_v_dds[__pyx_v_j]) = (((__pyx_v_DRE[__pyx_v_j]) - (__pyx_v_DLE[__pyx_v_j])) / (1 << (((int)__pyx_v_lvl) + 1)));
28831 
28832       /* "yt/utilities/lib/geometry_utils.pxd":126
28833  *         for j in range(3):
28834  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))
28835  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])             # <<<<<<<<<<<<<<
28836  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
28837  *         for j in range(3):
28838  */
28839       (__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])));
28840 
28841       /* "yt/utilities/lib/geometry_utils.pxd":127
28842  *             dds[j] = (DRE[j] - DLE[j])/(1 << (<int> lvl+1))
28843  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])
28844  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])             # <<<<<<<<<<<<<<
28845  *         for j in range(3):
28846  *             if pidx_next[j]!=qidx_next[j]:
28847  */
28848       (__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])));
28849     }
28850 
28851     /* "yt/utilities/lib/geometry_utils.pxd":128
28852  *             pidx_next[j] = <np.uint64_t>((p[j] - DLE[j])/dds[j])
28853  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
28854  *         for j in range(3):             # <<<<<<<<<<<<<<
28855  *             if pidx_next[j]!=qidx_next[j]:
28856  *                 done = 1
28857  */
28858     for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
28859       __pyx_v_j = __pyx_t_1;
28860 
28861       /* "yt/utilities/lib/geometry_utils.pxd":129
28862  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
28863  *         for j in range(3):
28864  *             if pidx_next[j]!=qidx_next[j]:             # <<<<<<<<<<<<<<
28865  *                 done = 1
28866  *                 break
28867  */
28868       __pyx_t_2 = (((__pyx_v_pidx_next[__pyx_v_j]) != (__pyx_v_qidx_next[__pyx_v_j])) != 0);
28869       if (__pyx_t_2) {
28870 
28871         /* "yt/utilities/lib/geometry_utils.pxd":130
28872  *         for j in range(3):
28873  *             if pidx_next[j]!=qidx_next[j]:
28874  *                 done = 1             # <<<<<<<<<<<<<<
28875  *                 break
28876  *         if not done:
28877  */
28878         __pyx_v_done = 1;
28879 
28880         /* "yt/utilities/lib/geometry_utils.pxd":131
28881  *             if pidx_next[j]!=qidx_next[j]:
28882  *                 done = 1
28883  *                 break             # <<<<<<<<<<<<<<
28884  *         if not done:
28885  *             for j in range(3):
28886  */
28887         goto __pyx_L11_break;
28888 
28889         /* "yt/utilities/lib/geometry_utils.pxd":129
28890  *             qidx_next[j] = <np.uint64_t>((q[j] - DLE[j])/dds[j])
28891  *         for j in range(3):
28892  *             if pidx_next[j]!=qidx_next[j]:             # <<<<<<<<<<<<<<
28893  *                 done = 1
28894  *                 break
28895  */
28896       }
28897     }
28898     __pyx_L11_break:;
28899 
28900     /* "yt/utilities/lib/geometry_utils.pxd":132
28901  *                 done = 1
28902  *                 break
28903  *         if not done:             # <<<<<<<<<<<<<<
28904  *             for j in range(3):
28905  *                 pidx[j] = pidx_next[j]
28906  */
28907     __pyx_t_2 = ((!(__pyx_v_done != 0)) != 0);
28908     if (__pyx_t_2) {
28909 
28910       /* "yt/utilities/lib/geometry_utils.pxd":133
28911  *                 break
28912  *         if not done:
28913  *             for j in range(3):             # <<<<<<<<<<<<<<
28914  *                 pidx[j] = pidx_next[j]
28915  *                 # qidx[j] = qidx_next[j]
28916  */
28917       for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
28918         __pyx_v_j = __pyx_t_1;
28919 
28920         /* "yt/utilities/lib/geometry_utils.pxd":134
28921  *         if not done:
28922  *             for j in range(3):
28923  *                 pidx[j] = pidx_next[j]             # <<<<<<<<<<<<<<
28924  *                 # qidx[j] = qidx_next[j]
28925  *             lvl+=1
28926  */
28927         (__pyx_v_pidx[__pyx_v_j]) = (__pyx_v_pidx_next[__pyx_v_j]);
28928       }
28929 
28930       /* "yt/utilities/lib/geometry_utils.pxd":136
28931  *                 pidx[j] = pidx_next[j]
28932  *                 # qidx[j] = qidx_next[j]
28933  *             lvl+=1             # <<<<<<<<<<<<<<
28934  *     rad = 0.0
28935  *     for j in range(3):
28936  */
28937       __pyx_v_lvl = (__pyx_v_lvl + 1);
28938 
28939       /* "yt/utilities/lib/geometry_utils.pxd":132
28940  *                 done = 1
28941  *                 break
28942  *         if not done:             # <<<<<<<<<<<<<<
28943  *             for j in range(3):
28944  *                 pidx[j] = pidx_next[j]
28945  */
28946     }
28947   }
28948 
28949   /* "yt/utilities/lib/geometry_utils.pxd":137
28950  *                 # qidx[j] = qidx_next[j]
28951  *             lvl+=1
28952  *     rad = 0.0             # <<<<<<<<<<<<<<
28953  *     for j in range(3):
28954  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)
28955  */
28956   __pyx_v_rad = 0.0;
28957 
28958   /* "yt/utilities/lib/geometry_utils.pxd":138
28959  *             lvl+=1
28960  *     rad = 0.0
28961  *     for j in range(3):             # <<<<<<<<<<<<<<
28962  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)
28963  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)
28964  */
28965   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
28966     __pyx_v_j = __pyx_t_1;
28967 
28968     /* "yt/utilities/lib/geometry_utils.pxd":139
28969  *     rad = 0.0
28970  *     for j in range(3):
28971  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)             # <<<<<<<<<<<<<<
28972  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)
28973  *         rad+=((dds[j]/2.0)**2)
28974  */
28975     (__pyx_v_dds[__pyx_v_j]) = (((__pyx_v_DRE[__pyx_v_j]) - (__pyx_v_DLE[__pyx_v_j])) / (1 << __pyx_v_lvl));
28976 
28977     /* "yt/utilities/lib/geometry_utils.pxd":140
28978  *     for j in range(3):
28979  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)
28980  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)             # <<<<<<<<<<<<<<
28981  *         rad+=((dds[j]/2.0)**2)
28982  *     cx[0] = c[0]
28983  */
28984     (__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));
28985 
28986     /* "yt/utilities/lib/geometry_utils.pxd":141
28987  *         dds[j] = (DRE[j] - DLE[j])/(1 << lvl)
28988  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)
28989  *         rad+=((dds[j]/2.0)**2)             # <<<<<<<<<<<<<<
28990  *     cx[0] = c[0]
28991  *     cy[0] = c[1]
28992  */
28993     __pyx_v_rad = (__pyx_v_rad + pow(((__pyx_v_dds[__pyx_v_j]) / 2.0), 2.0));
28994   }
28995 
28996   /* "yt/utilities/lib/geometry_utils.pxd":142
28997  *         c[j] = dds[j]*(<np.float64_t>pidx[j]+0.5)
28998  *         rad+=((dds[j]/2.0)**2)
28999  *     cx[0] = c[0]             # <<<<<<<<<<<<<<
29000  *     cy[0] = c[1]
29001  *     cz[0] = c[2]
29002  */
29003   (__pyx_v_cx[0]) = (__pyx_v_c[0]);
29004 
29005   /* "yt/utilities/lib/geometry_utils.pxd":143
29006  *         rad+=((dds[j]/2.0)**2)
29007  *     cx[0] = c[0]
29008  *     cy[0] = c[1]             # <<<<<<<<<<<<<<
29009  *     cz[0] = c[2]
29010  *     return sqrt(rad)
29011  */
29012   (__pyx_v_cy[0]) = (__pyx_v_c[1]);
29013 
29014   /* "yt/utilities/lib/geometry_utils.pxd":144
29015  *     cx[0] = c[0]
29016  *     cy[0] = c[1]
29017  *     cz[0] = c[2]             # <<<<<<<<<<<<<<
29018  *     return sqrt(rad)
29019  *
29020  */
29021   (__pyx_v_cz[0]) = (__pyx_v_c[2]);
29022 
29023   /* "yt/utilities/lib/geometry_utils.pxd":145
29024  *     cy[0] = c[1]
29025  *     cz[0] = c[2]
29026  *     return sqrt(rad)             # <<<<<<<<<<<<<<
29027  *
29028  * #-----------------------------------------------------------------------------
29029  */
29030   __pyx_r = sqrt(__pyx_v_rad);
29031   goto __pyx_L0;
29032 
29033   /* "yt/utilities/lib/geometry_utils.pxd":105
29034  * @cython.boundscheck(False)
29035  * @cython.wraparound(False)
29036  * cdef inline np.float64_t smallest_quadtree_box(np.float64_t p[3], np.float64_t q[3], np.int32_t order,             # <<<<<<<<<<<<<<
29037  *                                                np.float64_t DLE[3], np.float64_t DRE[3],
29038  *                                                np.float64_t *cx, np.float64_t *cy, np.float64_t *cz):
29039  */
29040 
29041   /* function exit code */
29042   __pyx_L0:;
29043   __Pyx_RefNannyFinishContext();
29044   return __pyx_r;
29045 }
29046 
29047 /* "yt/utilities/lib/geometry_utils.pxd":152
29048  * @cython.boundscheck(False)
29049  * @cython.wraparound(False)
29050  * cdef inline np.uint64_t spread_64bits_by3(np.uint64_t x):             # <<<<<<<<<<<<<<
29051  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))
29052  *     x=(x|(x<<20))*(<np.uint64_t>0x000001FFC00003FF)
29053  */
29054 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by3(__pyx_t_5numpy_uint64_t __pyx_v_x)29055 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) {
29056   __pyx_t_5numpy_uint64_t __pyx_r;
29057   __Pyx_RefNannyDeclarations
29058   __Pyx_RefNannySetupContext("spread_64bits_by3", 0);
29059 
29060   /* "yt/utilities/lib/geometry_utils.pxd":153
29061  * @cython.wraparound(False)
29062  * cdef inline np.uint64_t spread_64bits_by3(np.uint64_t x):
29063  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))             # <<<<<<<<<<<<<<
29064  *     x=(x|(x<<20))*(<np.uint64_t>0x000001FFC00003FF)
29065  *
29066  */
29067   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint64_t)0x00000000001FFFFF));
29068 
29069   /* "yt/utilities/lib/geometry_utils.pxd":154
29070  * cdef inline np.uint64_t spread_64bits_by3(np.uint64_t x):
29071  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))
29072  *     x=(x|(x<<20))*(<np.uint64_t>0x000001FFC00003FF)             # <<<<<<<<<<<<<<
29073  *
29074  * #-----------------------------------------------------------------------------
29075  */
29076   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 20)) * ((__pyx_t_5numpy_uint64_t)0x000001FFC00003FF));
29077 
29078   /* "yt/utilities/lib/geometry_utils.pxd":152
29079  * @cython.boundscheck(False)
29080  * @cython.wraparound(False)
29081  * cdef inline np.uint64_t spread_64bits_by3(np.uint64_t x):             # <<<<<<<<<<<<<<
29082  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))
29083  *     x=(x|(x<<20))*(<np.uint64_t>0x000001FFC00003FF)
29084  */
29085 
29086   /* function exit code */
29087   __pyx_r = 0;
29088   __Pyx_RefNannyFinishContext();
29089   return __pyx_r;
29090 }
29091 
29092 /* "yt/utilities/lib/geometry_utils.pxd":161
29093  * @cython.boundscheck(False)
29094  * @cython.wraparound(False)
29095  * cdef inline np.uint64_t spread_64bits_by2(np.uint64_t x):             # <<<<<<<<<<<<<<
29096  *     # This magic comes from http://stackoverflow.com/questions/1024754/how-to-compute-a-3d-morton-number-interleave-the-bits-of-3-ints
29097  *     # Only reversible up to 2097151
29098  */
29099 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_t_5numpy_uint64_t __pyx_v_x)29100 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) {
29101   __pyx_t_5numpy_uint64_t __pyx_r;
29102   __Pyx_RefNannyDeclarations
29103   __Pyx_RefNannySetupContext("spread_64bits_by2", 0);
29104 
29105   /* "yt/utilities/lib/geometry_utils.pxd":166
29106  *     # Select highest 21 bits (Required to be reversible to 21st bit)
29107  *     # x = ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---k jihg fedc ba98 7654 3210
29108  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))             # <<<<<<<<<<<<<<
29109  *     # x = ---- ---- ---- ---- ---- ---k jihg fedc ba-- ---- ---- ---- ---- --98 7654 3210
29110  *     x=(x|(x<<20))&(<np.uint64_t>0x000001FFC00003FF)
29111  */
29112   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint64_t)0x00000000001FFFFF));
29113 
29114   /* "yt/utilities/lib/geometry_utils.pxd":168
29115  *     x=(x&(<np.uint64_t>0x00000000001FFFFF))
29116  *     # x = ---- ---- ---- ---- ---- ---k jihg fedc ba-- ---- ---- ---- ---- --98 7654 3210
29117  *     x=(x|(x<<20))&(<np.uint64_t>0x000001FFC00003FF)             # <<<<<<<<<<<<<<
29118  *     # x = ---- ---- ---- -kji hgf- ---- ---- -edc ba-- ---- ---- 9876 5--- ---- ---4 3210
29119  *     x=(x|(x<<10))&(<np.uint64_t>0x0007E007C00F801F)
29120  */
29121   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 20)) & ((__pyx_t_5numpy_uint64_t)0x000001FFC00003FF));
29122 
29123   /* "yt/utilities/lib/geometry_utils.pxd":170
29124  *     x=(x|(x<<20))&(<np.uint64_t>0x000001FFC00003FF)
29125  *     # x = ---- ---- ---- -kji hgf- ---- ---- -edc ba-- ---- ---- 9876 5--- ---- ---4 3210
29126  *     x=(x|(x<<10))&(<np.uint64_t>0x0007E007C00F801F)             # <<<<<<<<<<<<<<
29127  *     # x = ---- ---- -kji h--- -gf- ---- -edc ---- ba-- ---- 987- ---6 5--- ---4 32-- --10
29128  *     x=(x|(x<<4))&(<np.uint64_t>0x00786070C0E181C3)
29129  */
29130   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 10)) & ((__pyx_t_5numpy_uint64_t)0x0007E007C00F801F));
29131 
29132   /* "yt/utilities/lib/geometry_utils.pxd":172
29133  *     x=(x|(x<<10))&(<np.uint64_t>0x0007E007C00F801F)
29134  *     # x = ---- ---- -kji h--- -gf- ---- -edc ---- ba-- ---- 987- ---6 5--- ---4 32-- --10
29135  *     x=(x|(x<<4))&(<np.uint64_t>0x00786070C0E181C3)             # <<<<<<<<<<<<<<
29136  *     # x = ---- ---k ji-- h--g --f- ---e d--c --b- -a-- --98 --7- -6-- 5--- -43- -2-- 1--0
29137  *     x=(x|(x<<2))&(<np.uint64_t>0x0199219243248649)
29138  */
29139   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 4)) & ((__pyx_t_5numpy_uint64_t)0x00786070C0E181C3));
29140 
29141   /* "yt/utilities/lib/geometry_utils.pxd":174
29142  *     x=(x|(x<<4))&(<np.uint64_t>0x00786070C0E181C3)
29143  *     # x = ---- ---k ji-- h--g --f- ---e d--c --b- -a-- --98 --7- -6-- 5--- -43- -2-- 1--0
29144  *     x=(x|(x<<2))&(<np.uint64_t>0x0199219243248649)             # <<<<<<<<<<<<<<
29145  *     # x = ---- -kj- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
29146  *     x=(x|(x<<2))&(<np.uint64_t>0x0649249249249249)
29147  */
29148   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 2)) & ((__pyx_t_5numpy_uint64_t)0x0199219243248649));
29149 
29150   /* "yt/utilities/lib/geometry_utils.pxd":176
29151  *     x=(x|(x<<2))&(<np.uint64_t>0x0199219243248649)
29152  *     # x = ---- -kj- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
29153  *     x=(x|(x<<2))&(<np.uint64_t>0x0649249249249249)             # <<<<<<<<<<<<<<
29154  *     # x = ---k --j- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
29155  *     x=(x|(x<<2))&(<np.uint64_t>0x1249249249249249)
29156  */
29157   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 2)) & ((__pyx_t_5numpy_uint64_t)0x0649249249249249));
29158 
29159   /* "yt/utilities/lib/geometry_utils.pxd":178
29160  *     x=(x|(x<<2))&(<np.uint64_t>0x0649249249249249)
29161  *     # x = ---k --j- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
29162  *     x=(x|(x<<2))&(<np.uint64_t>0x1249249249249249)             # <<<<<<<<<<<<<<
29163  *     return x
29164  *
29165  */
29166   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 2)) & ((__pyx_t_5numpy_uint64_t)0x1249249249249249));
29167 
29168   /* "yt/utilities/lib/geometry_utils.pxd":179
29169  *     # x = ---k --j- -i-- h--g --f- -e-- d--c --b- -a-- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
29170  *     x=(x|(x<<2))&(<np.uint64_t>0x1249249249249249)
29171  *     return x             # <<<<<<<<<<<<<<
29172  *
29173  * @cython.cdivision(True)
29174  */
29175   __pyx_r = __pyx_v_x;
29176   goto __pyx_L0;
29177 
29178   /* "yt/utilities/lib/geometry_utils.pxd":161
29179  * @cython.boundscheck(False)
29180  * @cython.wraparound(False)
29181  * cdef inline np.uint64_t spread_64bits_by2(np.uint64_t x):             # <<<<<<<<<<<<<<
29182  *     # This magic comes from http://stackoverflow.com/questions/1024754/how-to-compute-a-3d-morton-number-interleave-the-bits-of-3-ints
29183  *     # Only reversible up to 2097151
29184  */
29185 
29186   /* function exit code */
29187   __pyx_L0:;
29188   __Pyx_RefNannyFinishContext();
29189   return __pyx_r;
29190 }
29191 
29192 /* "yt/utilities/lib/geometry_utils.pxd":184
29193  * @cython.boundscheck(False)
29194  * @cython.wraparound(False)
29195  * cdef inline np.uint64_t compact_64bits_by2(np.uint64_t x):             # <<<<<<<<<<<<<<
29196  *     # Reversed magic
29197  *     x=x&(<np.uint64_t>0x1249249249249249)
29198  */
29199 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2(__pyx_t_5numpy_uint64_t __pyx_v_x)29200 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) {
29201   __pyx_t_5numpy_uint64_t __pyx_r;
29202   __Pyx_RefNannyDeclarations
29203   __Pyx_RefNannySetupContext("compact_64bits_by2", 0);
29204 
29205   /* "yt/utilities/lib/geometry_utils.pxd":186
29206  * cdef inline np.uint64_t compact_64bits_by2(np.uint64_t x):
29207  *     # Reversed magic
29208  *     x=x&(<np.uint64_t>0x1249249249249249)             # <<<<<<<<<<<<<<
29209  *     x=(x|(x>>2))&(<np.uint64_t>0x0649249249249249)
29210  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)
29211  */
29212   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint64_t)0x1249249249249249));
29213 
29214   /* "yt/utilities/lib/geometry_utils.pxd":187
29215  *     # Reversed magic
29216  *     x=x&(<np.uint64_t>0x1249249249249249)
29217  *     x=(x|(x>>2))&(<np.uint64_t>0x0649249249249249)             # <<<<<<<<<<<<<<
29218  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)
29219  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)
29220  */
29221   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 2)) & ((__pyx_t_5numpy_uint64_t)0x0649249249249249));
29222 
29223   /* "yt/utilities/lib/geometry_utils.pxd":188
29224  *     x=x&(<np.uint64_t>0x1249249249249249)
29225  *     x=(x|(x>>2))&(<np.uint64_t>0x0649249249249249)
29226  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)             # <<<<<<<<<<<<<<
29227  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)
29228  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)
29229  */
29230   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 2)) & ((__pyx_t_5numpy_uint64_t)0x0199219243248649));
29231 
29232   /* "yt/utilities/lib/geometry_utils.pxd":189
29233  *     x=(x|(x>>2))&(<np.uint64_t>0x0649249249249249)
29234  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)
29235  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)             # <<<<<<<<<<<<<<
29236  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)
29237  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)
29238  */
29239   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 2)) & ((__pyx_t_5numpy_uint64_t)0x00786070C0E181C3));
29240 
29241   /* "yt/utilities/lib/geometry_utils.pxd":190
29242  *     x=(x|(x>>2))&(<np.uint64_t>0x0199219243248649)
29243  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)
29244  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)             # <<<<<<<<<<<<<<
29245  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)
29246  *     x=(x|(x>>20))&(<np.uint64_t>0x00000000001FFFFF)
29247  */
29248   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 4)) & ((__pyx_t_5numpy_uint64_t)0x0007E007C00F801F));
29249 
29250   /* "yt/utilities/lib/geometry_utils.pxd":191
29251  *     x=(x|(x>>2))&(<np.uint64_t>0x00786070C0E181C3)
29252  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)
29253  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)             # <<<<<<<<<<<<<<
29254  *     x=(x|(x>>20))&(<np.uint64_t>0x00000000001FFFFF)
29255  *     return x
29256  */
29257   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 10)) & ((__pyx_t_5numpy_uint64_t)0x000001FFC00003FF));
29258 
29259   /* "yt/utilities/lib/geometry_utils.pxd":192
29260  *     x=(x|(x>>4))&(<np.uint64_t>0x0007E007C00F801F)
29261  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)
29262  *     x=(x|(x>>20))&(<np.uint64_t>0x00000000001FFFFF)             # <<<<<<<<<<<<<<
29263  *     return x
29264  *
29265  */
29266   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 20)) & ((__pyx_t_5numpy_uint64_t)0x00000000001FFFFF));
29267 
29268   /* "yt/utilities/lib/geometry_utils.pxd":193
29269  *     x=(x|(x>>10))&(<np.uint64_t>0x000001FFC00003FF)
29270  *     x=(x|(x>>20))&(<np.uint64_t>0x00000000001FFFFF)
29271  *     return x             # <<<<<<<<<<<<<<
29272  *
29273  * #-----------------------------------------------------------------------------
29274  */
29275   __pyx_r = __pyx_v_x;
29276   goto __pyx_L0;
29277 
29278   /* "yt/utilities/lib/geometry_utils.pxd":184
29279  * @cython.boundscheck(False)
29280  * @cython.wraparound(False)
29281  * cdef inline np.uint64_t compact_64bits_by2(np.uint64_t x):             # <<<<<<<<<<<<<<
29282  *     # Reversed magic
29283  *     x=x&(<np.uint64_t>0x1249249249249249)
29284  */
29285 
29286   /* function exit code */
29287   __pyx_L0:;
29288   __Pyx_RefNannyFinishContext();
29289   return __pyx_r;
29290 }
29291 
29292 /* "yt/utilities/lib/geometry_utils.pxd":200
29293  * @cython.boundscheck(False)
29294  * @cython.wraparound(False)
29295  * cdef inline np.uint32_t spread_32bits_by2(np.uint32_t x):             # <<<<<<<<<<<<<<
29296  *     # Only reversible up to 1023
29297  *     # Select highest 10 bits (Required to be reversible to 10st bit)
29298  */
29299 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_32bits_by2(__pyx_t_5numpy_uint32_t __pyx_v_x)29300 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) {
29301   __pyx_t_5numpy_uint32_t __pyx_r;
29302   __Pyx_RefNannyDeclarations
29303   __Pyx_RefNannySetupContext("spread_32bits_by2", 0);
29304 
29305   /* "yt/utilities/lib/geometry_utils.pxd":204
29306  *     # Select highest 10 bits (Required to be reversible to 10st bit)
29307  *     # x = ---- ---- ---- ---- ---- --98 7654 3210
29308  *     x=(x&(<np.uint32_t>0x000003FF))             # <<<<<<<<<<<<<<
29309  *     # x = ---- --98 ---- ---- ---- ---- 7654 3210
29310  *     x=(x|(x<<16))&(<np.uint32_t>0xFF0000FF)
29311  */
29312   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint32_t)0x000003FF));
29313 
29314   /* "yt/utilities/lib/geometry_utils.pxd":206
29315  *     x=(x&(<np.uint32_t>0x000003FF))
29316  *     # x = ---- --98 ---- ---- ---- ---- 7654 3210
29317  *     x=(x|(x<<16))&(<np.uint32_t>0xFF0000FF)             # <<<<<<<<<<<<<<
29318  *     # x = ---- --98 ---- ---- 7654 ---- ---- 3210
29319  *     x=(x|(x<<8))&(<np.uint32_t>0x0300F00F)
29320  */
29321   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 16)) & ((__pyx_t_5numpy_uint32_t)0xFF0000FF));
29322 
29323   /* "yt/utilities/lib/geometry_utils.pxd":208
29324  *     x=(x|(x<<16))&(<np.uint32_t>0xFF0000FF)
29325  *     # x = ---- --98 ---- ---- 7654 ---- ---- 3210
29326  *     x=(x|(x<<8))&(<np.uint32_t>0x0300F00F)             # <<<<<<<<<<<<<<
29327  *     # x = ---- --98 ---- 76-- --54 ---- 32-- --10
29328  *     x=(x|(x<<4))&(<np.uint32_t>0x030C30C3)
29329  */
29330   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 8)) & ((__pyx_t_5numpy_uint32_t)0x0300F00F));
29331 
29332   /* "yt/utilities/lib/geometry_utils.pxd":210
29333  *     x=(x|(x<<8))&(<np.uint32_t>0x0300F00F)
29334  *     # x = ---- --98 ---- 76-- --54 ---- 32-- --10
29335  *     x=(x|(x<<4))&(<np.uint32_t>0x030C30C3)             # <<<<<<<<<<<<<<
29336  *     # x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
29337  *     x=(x|(x<<2))&(<np.uint32_t>0x09249249)
29338  */
29339   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 4)) & ((__pyx_t_5numpy_uint32_t)0x030C30C3));
29340 
29341   /* "yt/utilities/lib/geometry_utils.pxd":212
29342  *     x=(x|(x<<4))&(<np.uint32_t>0x030C30C3)
29343  *     # x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
29344  *     x=(x|(x<<2))&(<np.uint32_t>0x09249249)             # <<<<<<<<<<<<<<
29345  *     return x
29346  *
29347  */
29348   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x << 2)) & ((__pyx_t_5numpy_uint32_t)0x09249249));
29349 
29350   /* "yt/utilities/lib/geometry_utils.pxd":213
29351  *     # x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0
29352  *     x=(x|(x<<2))&(<np.uint32_t>0x09249249)
29353  *     return x             # <<<<<<<<<<<<<<
29354  *
29355  * @cython.cdivision(True)
29356  */
29357   __pyx_r = __pyx_v_x;
29358   goto __pyx_L0;
29359 
29360   /* "yt/utilities/lib/geometry_utils.pxd":200
29361  * @cython.boundscheck(False)
29362  * @cython.wraparound(False)
29363  * cdef inline np.uint32_t spread_32bits_by2(np.uint32_t x):             # <<<<<<<<<<<<<<
29364  *     # Only reversible up to 1023
29365  *     # Select highest 10 bits (Required to be reversible to 10st bit)
29366  */
29367 
29368   /* function exit code */
29369   __pyx_L0:;
29370   __Pyx_RefNannyFinishContext();
29371   return __pyx_r;
29372 }
29373 
29374 /* "yt/utilities/lib/geometry_utils.pxd":218
29375  * @cython.boundscheck(False)
29376  * @cython.wraparound(False)
29377  * cdef inline np.uint32_t compact_32bits_by2(np.uint32_t x):             # <<<<<<<<<<<<<<
29378  *     # Reversed magic
29379  *     x=x&(<np.uint32_t>0x09249249)
29380  */
29381 
__pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_32bits_by2(__pyx_t_5numpy_uint32_t __pyx_v_x)29382 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) {
29383   __pyx_t_5numpy_uint32_t __pyx_r;
29384   __Pyx_RefNannyDeclarations
29385   __Pyx_RefNannySetupContext("compact_32bits_by2", 0);
29386 
29387   /* "yt/utilities/lib/geometry_utils.pxd":220
29388  * cdef inline np.uint32_t compact_32bits_by2(np.uint32_t x):
29389  *     # Reversed magic
29390  *     x=x&(<np.uint32_t>0x09249249)             # <<<<<<<<<<<<<<
29391  *     x=(x|(x>>2))&(<np.uint32_t>0x030C30C3)
29392  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)
29393  */
29394   __pyx_v_x = (__pyx_v_x & ((__pyx_t_5numpy_uint32_t)0x09249249));
29395 
29396   /* "yt/utilities/lib/geometry_utils.pxd":221
29397  *     # Reversed magic
29398  *     x=x&(<np.uint32_t>0x09249249)
29399  *     x=(x|(x>>2))&(<np.uint32_t>0x030C30C3)             # <<<<<<<<<<<<<<
29400  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)
29401  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)
29402  */
29403   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 2)) & ((__pyx_t_5numpy_uint32_t)0x030C30C3));
29404 
29405   /* "yt/utilities/lib/geometry_utils.pxd":222
29406  *     x=x&(<np.uint32_t>0x09249249)
29407  *     x=(x|(x>>2))&(<np.uint32_t>0x030C30C3)
29408  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)             # <<<<<<<<<<<<<<
29409  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)
29410  *     x=(x|(x>>16))&(<np.uint32_t>0x000003FF)
29411  */
29412   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 4)) & ((__pyx_t_5numpy_uint32_t)0x0300F00F));
29413 
29414   /* "yt/utilities/lib/geometry_utils.pxd":223
29415  *     x=(x|(x>>2))&(<np.uint32_t>0x030C30C3)
29416  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)
29417  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)             # <<<<<<<<<<<<<<
29418  *     x=(x|(x>>16))&(<np.uint32_t>0x000003FF)
29419  *     return x
29420  */
29421   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 8)) & ((__pyx_t_5numpy_uint32_t)0xFF0000FF));
29422 
29423   /* "yt/utilities/lib/geometry_utils.pxd":224
29424  *     x=(x|(x>>4))&(<np.uint32_t>0x0300F00F)
29425  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)
29426  *     x=(x|(x>>16))&(<np.uint32_t>0x000003FF)             # <<<<<<<<<<<<<<
29427  *     return x
29428  *
29429  */
29430   __pyx_v_x = ((__pyx_v_x | (__pyx_v_x >> 16)) & ((__pyx_t_5numpy_uint32_t)0x000003FF));
29431 
29432   /* "yt/utilities/lib/geometry_utils.pxd":225
29433  *     x=(x|(x>>8))&(<np.uint32_t>0xFF0000FF)
29434  *     x=(x|(x>>16))&(<np.uint32_t>0x000003FF)
29435  *     return x             # <<<<<<<<<<<<<<
29436  *
29437  * @cython.cdivision(True)
29438  */
29439   __pyx_r = __pyx_v_x;
29440   goto __pyx_L0;
29441 
29442   /* "yt/utilities/lib/geometry_utils.pxd":218
29443  * @cython.boundscheck(False)
29444  * @cython.wraparound(False)
29445  * cdef inline np.uint32_t compact_32bits_by2(np.uint32_t x):             # <<<<<<<<<<<<<<
29446  *     # Reversed magic
29447  *     x=x&(<np.uint32_t>0x09249249)
29448  */
29449 
29450   /* function exit code */
29451   __pyx_L0:;
29452   __Pyx_RefNannyFinishContext();
29453   return __pyx_r;
29454 }
29455 
29456 /* "yt/utilities/lib/geometry_utils.pxd":230
29457  * @cython.boundscheck(False)
29458  * @cython.wraparound(False)
29459  * cdef inline np.uint64_t masked_merge_64bit(np.uint64_t a, np.uint64_t b, np.uint64_t mask):             # <<<<<<<<<<<<<<
29460  *     # https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
29461  *     return a ^ ((a ^ b) & mask)
29462  */
29463 
__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)29464 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) {
29465   __pyx_t_5numpy_uint64_t __pyx_r;
29466   __Pyx_RefNannyDeclarations
29467   __Pyx_RefNannySetupContext("masked_merge_64bit", 0);
29468 
29469   /* "yt/utilities/lib/geometry_utils.pxd":232
29470  * cdef inline np.uint64_t masked_merge_64bit(np.uint64_t a, np.uint64_t b, np.uint64_t mask):
29471  *     # https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
29472  *     return a ^ ((a ^ b) & mask)             # <<<<<<<<<<<<<<
29473  *
29474  * @cython.cdivision(True)
29475  */
29476   __pyx_r = (__pyx_v_a ^ ((__pyx_v_a ^ __pyx_v_b) & __pyx_v_mask));
29477   goto __pyx_L0;
29478 
29479   /* "yt/utilities/lib/geometry_utils.pxd":230
29480  * @cython.boundscheck(False)
29481  * @cython.wraparound(False)
29482  * cdef inline np.uint64_t masked_merge_64bit(np.uint64_t a, np.uint64_t b, np.uint64_t mask):             # <<<<<<<<<<<<<<
29483  *     # https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge
29484  *     return a ^ ((a ^ b) & mask)
29485  */
29486 
29487   /* function exit code */
29488   __pyx_L0:;
29489   __Pyx_RefNannyFinishContext();
29490   return __pyx_r;
29491 }
29492 
29493 /* "yt/utilities/lib/geometry_utils.pxd":235
29494  *
29495  * @cython.cdivision(True)
29496  * cdef inline np.uint64_t encode_morton_64bit(np.uint64_t x_ind, np.uint64_t y_ind, np.uint64_t z_ind):             # <<<<<<<<<<<<<<
29497  *     cdef np.uint64_t mi
29498  *     mi = 0
29499  */
29500 
__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)29501 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) {
29502   __pyx_t_5numpy_uint64_t __pyx_v_mi;
29503   __pyx_t_5numpy_uint64_t __pyx_r;
29504   __Pyx_RefNannyDeclarations
29505   __Pyx_RefNannySetupContext("encode_morton_64bit", 0);
29506 
29507   /* "yt/utilities/lib/geometry_utils.pxd":237
29508  * cdef inline np.uint64_t encode_morton_64bit(np.uint64_t x_ind, np.uint64_t y_ind, np.uint64_t z_ind):
29509  *     cdef np.uint64_t mi
29510  *     mi = 0             # <<<<<<<<<<<<<<
29511  *     mi |= spread_64bits_by2(z_ind)<<ZSHIFT
29512  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT
29513  */
29514   __pyx_v_mi = 0;
29515 
29516   /* "yt/utilities/lib/geometry_utils.pxd":238
29517  *     cdef np.uint64_t mi
29518  *     mi = 0
29519  *     mi |= spread_64bits_by2(z_ind)<<ZSHIFT             # <<<<<<<<<<<<<<
29520  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT
29521  *     mi |= spread_64bits_by2(x_ind)<<XSHIFT
29522  */
29523   __pyx_v_mi = (__pyx_v_mi | (__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_v_z_ind) << 0));
29524 
29525   /* "yt/utilities/lib/geometry_utils.pxd":239
29526  *     mi = 0
29527  *     mi |= spread_64bits_by2(z_ind)<<ZSHIFT
29528  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT             # <<<<<<<<<<<<<<
29529  *     mi |= spread_64bits_by2(x_ind)<<XSHIFT
29530  *     return mi
29531  */
29532   __pyx_v_mi = (__pyx_v_mi | (__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_v_y_ind) << 1));
29533 
29534   /* "yt/utilities/lib/geometry_utils.pxd":240
29535  *     mi |= spread_64bits_by2(z_ind)<<ZSHIFT
29536  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT
29537  *     mi |= spread_64bits_by2(x_ind)<<XSHIFT             # <<<<<<<<<<<<<<
29538  *     return mi
29539  *
29540  */
29541   __pyx_v_mi = (__pyx_v_mi | (__pyx_f_2yt_9utilities_3lib_14geometry_utils_spread_64bits_by2(__pyx_v_x_ind) << 2));
29542 
29543   /* "yt/utilities/lib/geometry_utils.pxd":241
29544  *     mi |= spread_64bits_by2(y_ind)<<YSHIFT
29545  *     mi |= spread_64bits_by2(x_ind)<<XSHIFT
29546  *     return mi             # <<<<<<<<<<<<<<
29547  *
29548  * @cython.cdivision(True)
29549  */
29550   __pyx_r = __pyx_v_mi;
29551   goto __pyx_L0;
29552 
29553   /* "yt/utilities/lib/geometry_utils.pxd":235
29554  *
29555  * @cython.cdivision(True)
29556  * cdef inline np.uint64_t encode_morton_64bit(np.uint64_t x_ind, np.uint64_t y_ind, np.uint64_t z_ind):             # <<<<<<<<<<<<<<
29557  *     cdef np.uint64_t mi
29558  *     mi = 0
29559  */
29560 
29561   /* function exit code */
29562   __pyx_L0:;
29563   __Pyx_RefNannyFinishContext();
29564   return __pyx_r;
29565 }
29566 
29567 /* "yt/utilities/lib/geometry_utils.pxd":244
29568  *
29569  * @cython.cdivision(True)
29570  * cdef inline void decode_morton_64bit(np.uint64_t mi, np.uint64_t *p):             # <<<<<<<<<<<<<<
29571  *     p[0] = compact_64bits_by2(mi>>XSHIFT)
29572  *     p[1] = compact_64bits_by2(mi>>YSHIFT)
29573  */
29574 
__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)29575 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) {
29576   __Pyx_RefNannyDeclarations
29577   __Pyx_RefNannySetupContext("decode_morton_64bit", 0);
29578 
29579   /* "yt/utilities/lib/geometry_utils.pxd":245
29580  * @cython.cdivision(True)
29581  * cdef inline void decode_morton_64bit(np.uint64_t mi, np.uint64_t *p):
29582  *     p[0] = compact_64bits_by2(mi>>XSHIFT)             # <<<<<<<<<<<<<<
29583  *     p[1] = compact_64bits_by2(mi>>YSHIFT)
29584  *     p[2] = compact_64bits_by2(mi>>ZSHIFT)
29585  */
29586   (__pyx_v_p[0]) = __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2((__pyx_v_mi >> 2));
29587 
29588   /* "yt/utilities/lib/geometry_utils.pxd":246
29589  * cdef inline void decode_morton_64bit(np.uint64_t mi, np.uint64_t *p):
29590  *     p[0] = compact_64bits_by2(mi>>XSHIFT)
29591  *     p[1] = compact_64bits_by2(mi>>YSHIFT)             # <<<<<<<<<<<<<<
29592  *     p[2] = compact_64bits_by2(mi>>ZSHIFT)
29593  *
29594  */
29595   (__pyx_v_p[1]) = __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2((__pyx_v_mi >> 1));
29596 
29597   /* "yt/utilities/lib/geometry_utils.pxd":247
29598  *     p[0] = compact_64bits_by2(mi>>XSHIFT)
29599  *     p[1] = compact_64bits_by2(mi>>YSHIFT)
29600  *     p[2] = compact_64bits_by2(mi>>ZSHIFT)             # <<<<<<<<<<<<<<
29601  *
29602  * @cython.cdivision(True)
29603  */
29604   (__pyx_v_p[2]) = __pyx_f_2yt_9utilities_3lib_14geometry_utils_compact_64bits_by2((__pyx_v_mi >> 0));
29605 
29606   /* "yt/utilities/lib/geometry_utils.pxd":244
29607  *
29608  * @cython.cdivision(True)
29609  * cdef inline void decode_morton_64bit(np.uint64_t mi, np.uint64_t *p):             # <<<<<<<<<<<<<<
29610  *     p[0] = compact_64bits_by2(mi>>XSHIFT)
29611  *     p[1] = compact_64bits_by2(mi>>YSHIFT)
29612  */
29613 
29614   /* function exit code */
29615   __Pyx_RefNannyFinishContext();
29616 }
29617 
29618 /* "yt/utilities/lib/geometry_utils.pxd":250
29619  *
29620  * @cython.cdivision(True)
29621  * cdef inline np.uint64_t bounded_morton(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
29622  *                                np.float64_t *DLE, np.float64_t *DRE, np.int32_t order):
29623  *     cdef int i
29624  */
29625 
__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)29626 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) {
29627   int __pyx_v_i;
29628   __pyx_t_5numpy_float64_t __pyx_v_dds[3];
29629   __pyx_t_5numpy_uint64_t __pyx_v_x_ind;
29630   __pyx_t_5numpy_uint64_t __pyx_v_y_ind;
29631   __pyx_t_5numpy_uint64_t __pyx_v_z_ind;
29632   __pyx_t_5numpy_uint64_t __pyx_v_mi;
29633   __pyx_t_5numpy_uint64_t __pyx_r;
29634   __Pyx_RefNannyDeclarations
29635   int __pyx_t_1;
29636   __Pyx_RefNannySetupContext("bounded_morton", 0);
29637 
29638   /* "yt/utilities/lib/geometry_utils.pxd":256
29639  *     cdef np.uint64_t x_ind, y_ind, z_ind
29640  *     cdef np.uint64_t mi
29641  *     for i in range(3):             # <<<<<<<<<<<<<<
29642  *         dds[i] = (DRE[i] - DLE[i]) / (1 << order)
29643  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
29644  */
29645   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
29646     __pyx_v_i = __pyx_t_1;
29647 
29648     /* "yt/utilities/lib/geometry_utils.pxd":257
29649  *     cdef np.uint64_t mi
29650  *     for i in range(3):
29651  *         dds[i] = (DRE[i] - DLE[i]) / (1 << order)             # <<<<<<<<<<<<<<
29652  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
29653  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
29654  */
29655     (__pyx_v_dds[__pyx_v_i]) = (((__pyx_v_DRE[__pyx_v_i]) - (__pyx_v_DLE[__pyx_v_i])) / (1 << __pyx_v_order));
29656   }
29657 
29658   /* "yt/utilities/lib/geometry_utils.pxd":258
29659  *     for i in range(3):
29660  *         dds[i] = (DRE[i] - DLE[i]) / (1 << order)
29661  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])             # <<<<<<<<<<<<<<
29662  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
29663  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
29664  */
29665   __pyx_v_x_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds[0])));
29666 
29667   /* "yt/utilities/lib/geometry_utils.pxd":259
29668  *         dds[i] = (DRE[i] - DLE[i]) / (1 << order)
29669  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
29670  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])             # <<<<<<<<<<<<<<
29671  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
29672  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
29673  */
29674   __pyx_v_y_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds[1])));
29675 
29676   /* "yt/utilities/lib/geometry_utils.pxd":260
29677  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
29678  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
29679  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])             # <<<<<<<<<<<<<<
29680  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
29681  *     return mi
29682  */
29683   __pyx_v_z_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds[2])));
29684 
29685   /* "yt/utilities/lib/geometry_utils.pxd":261
29686  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
29687  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
29688  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)             # <<<<<<<<<<<<<<
29689  *     return mi
29690  *
29691  */
29692   __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);
29693 
29694   /* "yt/utilities/lib/geometry_utils.pxd":262
29695  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
29696  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
29697  *     return mi             # <<<<<<<<<<<<<<
29698  *
29699  * @cython.cdivision(True)
29700  */
29701   __pyx_r = __pyx_v_mi;
29702   goto __pyx_L0;
29703 
29704   /* "yt/utilities/lib/geometry_utils.pxd":250
29705  *
29706  * @cython.cdivision(True)
29707  * cdef inline np.uint64_t bounded_morton(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
29708  *                                np.float64_t *DLE, np.float64_t *DRE, np.int32_t order):
29709  *     cdef int i
29710  */
29711 
29712   /* function exit code */
29713   __pyx_L0:;
29714   __Pyx_RefNannyFinishContext();
29715   return __pyx_r;
29716 }
29717 
29718 /* "yt/utilities/lib/geometry_utils.pxd":265
29719  *
29720  * @cython.cdivision(True)
29721  * cdef inline np.uint64_t bounded_morton_relative(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
29722  *                                np.float64_t *DLE, np.float64_t *DRE,
29723  *                                np.int32_t order1, np.int32_t order2):
29724  */
29725 
__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)29726 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) {
29727   int __pyx_v_i;
29728   __pyx_t_5numpy_float64_t __pyx_v_dds1[3];
29729   __pyx_t_5numpy_float64_t __pyx_v_dds2[3];
29730   __pyx_t_5numpy_float64_t __pyx_v_DLE2[3];
29731   __pyx_t_5numpy_uint64_t __pyx_v_x_ind;
29732   __pyx_t_5numpy_uint64_t __pyx_v_y_ind;
29733   __pyx_t_5numpy_uint64_t __pyx_v_z_ind;
29734   __pyx_t_5numpy_uint64_t __pyx_v_mi2;
29735   __pyx_t_5numpy_uint64_t __pyx_r;
29736   __Pyx_RefNannyDeclarations
29737   int __pyx_t_1;
29738   __Pyx_RefNannySetupContext("bounded_morton_relative", 0);
29739 
29740   /* "yt/utilities/lib/geometry_utils.pxd":274
29741  *     cdef np.uint64_t x_ind, y_ind, z_ind
29742  *     cdef np.uint64_t mi2
29743  *     for i in range(3):             # <<<<<<<<<<<<<<
29744  *         dds1[i] = (DRE[i] - DLE[i]) / (1 << order1)
29745  *         dds2[i] = dds1[i] / (1 << order2)
29746  */
29747   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
29748     __pyx_v_i = __pyx_t_1;
29749 
29750     /* "yt/utilities/lib/geometry_utils.pxd":275
29751  *     cdef np.uint64_t mi2
29752  *     for i in range(3):
29753  *         dds1[i] = (DRE[i] - DLE[i]) / (1 << order1)             # <<<<<<<<<<<<<<
29754  *         dds2[i] = dds1[i] / (1 << order2)
29755  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
29756  */
29757     (__pyx_v_dds1[__pyx_v_i]) = (((__pyx_v_DRE[__pyx_v_i]) - (__pyx_v_DLE[__pyx_v_i])) / (1 << __pyx_v_order1));
29758 
29759     /* "yt/utilities/lib/geometry_utils.pxd":276
29760  *     for i in range(3):
29761  *         dds1[i] = (DRE[i] - DLE[i]) / (1 << order1)
29762  *         dds2[i] = dds1[i] / (1 << order2)             # <<<<<<<<<<<<<<
29763  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
29764  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
29765  */
29766     (__pyx_v_dds2[__pyx_v_i]) = ((__pyx_v_dds1[__pyx_v_i]) / (1 << __pyx_v_order2));
29767   }
29768 
29769   /* "yt/utilities/lib/geometry_utils.pxd":277
29770  *         dds1[i] = (DRE[i] - DLE[i]) / (1 << order1)
29771  *         dds2[i] = dds1[i] / (1 << order2)
29772  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]             # <<<<<<<<<<<<<<
29773  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
29774  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
29775  */
29776   (__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]));
29777 
29778   /* "yt/utilities/lib/geometry_utils.pxd":278
29779  *         dds2[i] = dds1[i] / (1 << order2)
29780  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
29781  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]             # <<<<<<<<<<<<<<
29782  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
29783  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
29784  */
29785   (__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]));
29786 
29787   /* "yt/utilities/lib/geometry_utils.pxd":279
29788  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
29789  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
29790  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]             # <<<<<<<<<<<<<<
29791  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
29792  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
29793  */
29794   (__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]));
29795 
29796   /* "yt/utilities/lib/geometry_utils.pxd":280
29797  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
29798  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
29799  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])             # <<<<<<<<<<<<<<
29800  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
29801  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
29802  */
29803   __pyx_v_x_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE2[0])) / (__pyx_v_dds2[0])));
29804 
29805   /* "yt/utilities/lib/geometry_utils.pxd":281
29806  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
29807  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
29808  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])             # <<<<<<<<<<<<<<
29809  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
29810  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
29811  */
29812   __pyx_v_y_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE2[1])) / (__pyx_v_dds2[1])));
29813 
29814   /* "yt/utilities/lib/geometry_utils.pxd":282
29815  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
29816  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
29817  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])             # <<<<<<<<<<<<<<
29818  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
29819  *     return mi2
29820  */
29821   __pyx_v_z_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE2[2])) / (__pyx_v_dds2[2])));
29822 
29823   /* "yt/utilities/lib/geometry_utils.pxd":283
29824  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
29825  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
29826  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)             # <<<<<<<<<<<<<<
29827  *     return mi2
29828  *
29829  */
29830   __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);
29831 
29832   /* "yt/utilities/lib/geometry_utils.pxd":284
29833  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
29834  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
29835  *     return mi2             # <<<<<<<<<<<<<<
29836  *
29837  *
29838  */
29839   __pyx_r = __pyx_v_mi2;
29840   goto __pyx_L0;
29841 
29842   /* "yt/utilities/lib/geometry_utils.pxd":265
29843  *
29844  * @cython.cdivision(True)
29845  * cdef inline np.uint64_t bounded_morton_relative(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
29846  *                                np.float64_t *DLE, np.float64_t *DRE,
29847  *                                np.int32_t order1, np.int32_t order2):
29848  */
29849 
29850   /* function exit code */
29851   __pyx_L0:;
29852   __Pyx_RefNannyFinishContext();
29853   return __pyx_r;
29854 }
29855 
29856 /* "yt/utilities/lib/geometry_utils.pxd":289
29857  * # This dosn't seem to be much, if at all, faster...
29858  * @cython.cdivision(True)
29859  * cdef inline np.uint64_t bounded_morton_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
29860  *                                np.float64_t *DLE, np.float64_t *dds):
29861  *     cdef np.uint64_t x_ind, y_ind, z_ind
29862  */
29863 
__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)29864 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) {
29865   __pyx_t_5numpy_uint64_t __pyx_v_x_ind;
29866   __pyx_t_5numpy_uint64_t __pyx_v_y_ind;
29867   __pyx_t_5numpy_uint64_t __pyx_v_z_ind;
29868   __pyx_t_5numpy_uint64_t __pyx_v_mi;
29869   __pyx_t_5numpy_uint64_t __pyx_r;
29870   __Pyx_RefNannyDeclarations
29871   __Pyx_RefNannySetupContext("bounded_morton_dds", 0);
29872 
29873   /* "yt/utilities/lib/geometry_utils.pxd":293
29874  *     cdef np.uint64_t x_ind, y_ind, z_ind
29875  *     cdef np.uint64_t mi
29876  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])             # <<<<<<<<<<<<<<
29877  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
29878  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
29879  */
29880   __pyx_v_x_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds[0])));
29881 
29882   /* "yt/utilities/lib/geometry_utils.pxd":294
29883  *     cdef np.uint64_t mi
29884  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
29885  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])             # <<<<<<<<<<<<<<
29886  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
29887  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
29888  */
29889   __pyx_v_y_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds[1])));
29890 
29891   /* "yt/utilities/lib/geometry_utils.pxd":295
29892  *     x_ind = <np.uint64_t> ((x - DLE[0])/dds[0])
29893  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
29894  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])             # <<<<<<<<<<<<<<
29895  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
29896  *     return mi
29897  */
29898   __pyx_v_z_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds[2])));
29899 
29900   /* "yt/utilities/lib/geometry_utils.pxd":296
29901  *     y_ind = <np.uint64_t> ((y - DLE[1])/dds[1])
29902  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
29903  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)             # <<<<<<<<<<<<<<
29904  *     return mi
29905  *
29906  */
29907   __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);
29908 
29909   /* "yt/utilities/lib/geometry_utils.pxd":297
29910  *     z_ind = <np.uint64_t> ((z - DLE[2])/dds[2])
29911  *     mi = encode_morton_64bit(x_ind,y_ind,z_ind)
29912  *     return mi             # <<<<<<<<<<<<<<
29913  *
29914  * @cython.cdivision(True)
29915  */
29916   __pyx_r = __pyx_v_mi;
29917   goto __pyx_L0;
29918 
29919   /* "yt/utilities/lib/geometry_utils.pxd":289
29920  * # This dosn't seem to be much, if at all, faster...
29921  * @cython.cdivision(True)
29922  * cdef inline np.uint64_t bounded_morton_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
29923  *                                np.float64_t *DLE, np.float64_t *dds):
29924  *     cdef np.uint64_t x_ind, y_ind, z_ind
29925  */
29926 
29927   /* function exit code */
29928   __pyx_L0:;
29929   __Pyx_RefNannyFinishContext();
29930   return __pyx_r;
29931 }
29932 
29933 /* "yt/utilities/lib/geometry_utils.pxd":300
29934  *
29935  * @cython.cdivision(True)
29936  * cdef inline np.uint64_t bounded_morton_relative_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
29937  *                                np.float64_t *DLE, np.float64_t *dds1, np.float64_t *dds2):
29938  *     cdef np.float64_t DLE2[3]
29939  */
29940 
__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)29941 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) {
29942   __pyx_t_5numpy_float64_t __pyx_v_DLE2[3];
29943   __pyx_t_5numpy_uint64_t __pyx_v_x_ind;
29944   __pyx_t_5numpy_uint64_t __pyx_v_y_ind;
29945   __pyx_t_5numpy_uint64_t __pyx_v_z_ind;
29946   __pyx_t_5numpy_uint64_t __pyx_v_mi2;
29947   __pyx_t_5numpy_uint64_t __pyx_r;
29948   __Pyx_RefNannyDeclarations
29949   __Pyx_RefNannySetupContext("bounded_morton_relative_dds", 0);
29950 
29951   /* "yt/utilities/lib/geometry_utils.pxd":305
29952  *     cdef np.uint64_t x_ind, y_ind, z_ind
29953  *     cdef np.uint64_t mi2
29954  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]             # <<<<<<<<<<<<<<
29955  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
29956  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
29957  */
29958   (__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]));
29959 
29960   /* "yt/utilities/lib/geometry_utils.pxd":306
29961  *     cdef np.uint64_t mi2
29962  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
29963  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]             # <<<<<<<<<<<<<<
29964  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
29965  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
29966  */
29967   (__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]));
29968 
29969   /* "yt/utilities/lib/geometry_utils.pxd":307
29970  *     DLE2[0] = <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
29971  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
29972  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]             # <<<<<<<<<<<<<<
29973  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
29974  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
29975  */
29976   (__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]));
29977 
29978   /* "yt/utilities/lib/geometry_utils.pxd":308
29979  *     DLE2[1] = <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
29980  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
29981  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])             # <<<<<<<<<<<<<<
29982  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
29983  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
29984  */
29985   __pyx_v_x_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE2[0])) / (__pyx_v_dds2[0])));
29986 
29987   /* "yt/utilities/lib/geometry_utils.pxd":309
29988  *     DLE2[2] = <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
29989  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
29990  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])             # <<<<<<<<<<<<<<
29991  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
29992  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
29993  */
29994   __pyx_v_y_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE2[1])) / (__pyx_v_dds2[1])));
29995 
29996   /* "yt/utilities/lib/geometry_utils.pxd":310
29997  *     x_ind = <np.uint64_t> ((x - DLE2[0])/dds2[0])
29998  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
29999  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])             # <<<<<<<<<<<<<<
30000  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
30001  *     return mi2
30002  */
30003   __pyx_v_z_ind = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE2[2])) / (__pyx_v_dds2[2])));
30004 
30005   /* "yt/utilities/lib/geometry_utils.pxd":311
30006  *     y_ind = <np.uint64_t> ((y - DLE2[1])/dds2[1])
30007  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
30008  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)             # <<<<<<<<<<<<<<
30009  *     return mi2
30010  *
30011  */
30012   __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);
30013 
30014   /* "yt/utilities/lib/geometry_utils.pxd":312
30015  *     z_ind = <np.uint64_t> ((z - DLE2[2])/dds2[2])
30016  *     mi2 = encode_morton_64bit(x_ind,y_ind,z_ind)
30017  *     return mi2             # <<<<<<<<<<<<<<
30018  *
30019  *
30020  */
30021   __pyx_r = __pyx_v_mi2;
30022   goto __pyx_L0;
30023 
30024   /* "yt/utilities/lib/geometry_utils.pxd":300
30025  *
30026  * @cython.cdivision(True)
30027  * cdef inline np.uint64_t bounded_morton_relative_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
30028  *                                np.float64_t *DLE, np.float64_t *dds1, np.float64_t *dds2):
30029  *     cdef np.float64_t DLE2[3]
30030  */
30031 
30032   /* function exit code */
30033   __pyx_L0:;
30034   __Pyx_RefNannyFinishContext();
30035   return __pyx_r;
30036 }
30037 
30038 /* "yt/utilities/lib/geometry_utils.pxd":316
30039  *
30040  * @cython.cdivision(True)
30041  * cdef inline np.uint64_t bounded_morton_split_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
30042  *                                np.float64_t *DLE, np.float64_t *dds, np.uint64_t *p):
30043  *     cdef np.uint64_t mi
30044  */
30045 
__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)30046 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) {
30047   __pyx_t_5numpy_uint64_t __pyx_v_mi;
30048   __pyx_t_5numpy_uint64_t __pyx_r;
30049   __Pyx_RefNannyDeclarations
30050   __Pyx_RefNannySetupContext("bounded_morton_split_dds", 0);
30051 
30052   /* "yt/utilities/lib/geometry_utils.pxd":319
30053  *                                np.float64_t *DLE, np.float64_t *dds, np.uint64_t *p):
30054  *     cdef np.uint64_t mi
30055  *     p[0] = <np.uint64_t> ((x - DLE[0])/dds[0])             # <<<<<<<<<<<<<<
30056  *     p[1] = <np.uint64_t> ((y - DLE[1])/dds[1])
30057  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])
30058  */
30059   (__pyx_v_p[0]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE[0])) / (__pyx_v_dds[0])));
30060 
30061   /* "yt/utilities/lib/geometry_utils.pxd":320
30062  *     cdef np.uint64_t mi
30063  *     p[0] = <np.uint64_t> ((x - DLE[0])/dds[0])
30064  *     p[1] = <np.uint64_t> ((y - DLE[1])/dds[1])             # <<<<<<<<<<<<<<
30065  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])
30066  *     mi = encode_morton_64bit(p[0], p[1], p[2])
30067  */
30068   (__pyx_v_p[1]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE[1])) / (__pyx_v_dds[1])));
30069 
30070   /* "yt/utilities/lib/geometry_utils.pxd":321
30071  *     p[0] = <np.uint64_t> ((x - DLE[0])/dds[0])
30072  *     p[1] = <np.uint64_t> ((y - DLE[1])/dds[1])
30073  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])             # <<<<<<<<<<<<<<
30074  *     mi = encode_morton_64bit(p[0], p[1], p[2])
30075  *     return mi
30076  */
30077   (__pyx_v_p[2]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE[2])) / (__pyx_v_dds[2])));
30078 
30079   /* "yt/utilities/lib/geometry_utils.pxd":322
30080  *     p[1] = <np.uint64_t> ((y - DLE[1])/dds[1])
30081  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])
30082  *     mi = encode_morton_64bit(p[0], p[1], p[2])             # <<<<<<<<<<<<<<
30083  *     return mi
30084  *
30085  */
30086   __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]));
30087 
30088   /* "yt/utilities/lib/geometry_utils.pxd":323
30089  *     p[2] = <np.uint64_t> ((z - DLE[2])/dds[2])
30090  *     mi = encode_morton_64bit(p[0], p[1], p[2])
30091  *     return mi             # <<<<<<<<<<<<<<
30092  *
30093  * @cython.cdivision(True)
30094  */
30095   __pyx_r = __pyx_v_mi;
30096   goto __pyx_L0;
30097 
30098   /* "yt/utilities/lib/geometry_utils.pxd":316
30099  *
30100  * @cython.cdivision(True)
30101  * cdef inline np.uint64_t bounded_morton_split_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
30102  *                                np.float64_t *DLE, np.float64_t *dds, np.uint64_t *p):
30103  *     cdef np.uint64_t mi
30104  */
30105 
30106   /* function exit code */
30107   __pyx_L0:;
30108   __Pyx_RefNannyFinishContext();
30109   return __pyx_r;
30110 }
30111 
30112 /* "yt/utilities/lib/geometry_utils.pxd":326
30113  *
30114  * @cython.cdivision(True)
30115  * cdef inline np.uint64_t bounded_morton_split_relative_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
30116  *                                np.float64_t *DLE, np.float64_t *dds1, np.float64_t *dds2,
30117  *                                np.uint64_t *p2):
30118  */
30119 
__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)30120 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) {
30121   __pyx_t_5numpy_float64_t __pyx_v_DLE2[3];
30122   __pyx_t_5numpy_uint64_t __pyx_v_mi2;
30123   __pyx_t_5numpy_uint64_t __pyx_r;
30124   __Pyx_RefNannyDeclarations
30125   __Pyx_RefNannySetupContext("bounded_morton_split_relative_dds", 0);
30126 
30127   /* "yt/utilities/lib/geometry_utils.pxd":331
30128  *     cdef np.float64_t DLE2[3]
30129  *     cdef np.uint64_t mi2
30130  *     DLE2[0] = DLE[0] + <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]             # <<<<<<<<<<<<<<
30131  *     DLE2[1] = DLE[1] + <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
30132  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
30133  */
30134   (__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])));
30135 
30136   /* "yt/utilities/lib/geometry_utils.pxd":332
30137  *     cdef np.uint64_t mi2
30138  *     DLE2[0] = DLE[0] + <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
30139  *     DLE2[1] = DLE[1] + <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]             # <<<<<<<<<<<<<<
30140  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
30141  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])
30142  */
30143   (__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])));
30144 
30145   /* "yt/utilities/lib/geometry_utils.pxd":333
30146  *     DLE2[0] = DLE[0] + <np.float64_t> (<np.uint64_t> ((x - DLE[0])/dds1[0])) * dds1[0]
30147  *     DLE2[1] = DLE[1] + <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
30148  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]             # <<<<<<<<<<<<<<
30149  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])
30150  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])
30151  */
30152   (__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])));
30153 
30154   /* "yt/utilities/lib/geometry_utils.pxd":334
30155  *     DLE2[1] = DLE[1] + <np.float64_t> (<np.uint64_t> ((y - DLE[1])/dds1[1])) * dds1[1]
30156  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
30157  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])             # <<<<<<<<<<<<<<
30158  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])
30159  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])
30160  */
30161   (__pyx_v_p2[0]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_x - (__pyx_v_DLE2[0])) / (__pyx_v_dds2[0])));
30162 
30163   /* "yt/utilities/lib/geometry_utils.pxd":335
30164  *     DLE2[2] = DLE[2] + <np.float64_t> (<np.uint64_t> ((z - DLE[2])/dds1[2])) * dds1[2]
30165  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])
30166  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])             # <<<<<<<<<<<<<<
30167  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])
30168  *     mi2 = encode_morton_64bit(p2[0], p2[1], p2[2])
30169  */
30170   (__pyx_v_p2[1]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_y - (__pyx_v_DLE2[1])) / (__pyx_v_dds2[1])));
30171 
30172   /* "yt/utilities/lib/geometry_utils.pxd":336
30173  *     p2[0] = <np.uint64_t> ((x - DLE2[0])/dds2[0])
30174  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])
30175  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])             # <<<<<<<<<<<<<<
30176  *     mi2 = encode_morton_64bit(p2[0], p2[1], p2[2])
30177  *     return mi2
30178  */
30179   (__pyx_v_p2[2]) = ((__pyx_t_5numpy_uint64_t)((__pyx_v_z - (__pyx_v_DLE2[2])) / (__pyx_v_dds2[2])));
30180 
30181   /* "yt/utilities/lib/geometry_utils.pxd":337
30182  *     p2[1] = <np.uint64_t> ((y - DLE2[1])/dds2[1])
30183  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])
30184  *     mi2 = encode_morton_64bit(p2[0], p2[1], p2[2])             # <<<<<<<<<<<<<<
30185  *     return mi2
30186  *
30187  */
30188   __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]));
30189 
30190   /* "yt/utilities/lib/geometry_utils.pxd":338
30191  *     p2[2] = <np.uint64_t> ((z - DLE2[2])/dds2[2])
30192  *     mi2 = encode_morton_64bit(p2[0], p2[1], p2[2])
30193  *     return mi2             # <<<<<<<<<<<<<<
30194  *
30195  *
30196  */
30197   __pyx_r = __pyx_v_mi2;
30198   goto __pyx_L0;
30199 
30200   /* "yt/utilities/lib/geometry_utils.pxd":326
30201  *
30202  * @cython.cdivision(True)
30203  * cdef inline np.uint64_t bounded_morton_split_relative_dds(np.float64_t x, np.float64_t y, np.float64_t z,             # <<<<<<<<<<<<<<
30204  *                                np.float64_t *DLE, np.float64_t *dds1, np.float64_t *dds2,
30205  *                                np.uint64_t *p2):
30206  */
30207 
30208   /* function exit code */
30209   __pyx_L0:;
30210   __Pyx_RefNannyFinishContext();
30211   return __pyx_r;
30212 }
30213 
30214 /* "set.to_py":129
30215  *
30216  * @cname("__pyx_convert_set_to_py___pyx_t_5numpy_uint64_t")
30217  * cdef object __pyx_convert_set_to_py___pyx_t_5numpy_uint64_t(const cpp_set[X]& s):             # <<<<<<<<<<<<<<
30218  *     o = set()
30219  *     cdef cpp_set[X].const_iterator iter = s.begin()
30220  */
30221 
__pyx_convert_set_to_py___pyx_t_5numpy_uint64_t(std::set<__pyx_t_5numpy_uint64_t> const & __pyx_v_s)30222 static PyObject *__pyx_convert_set_to_py___pyx_t_5numpy_uint64_t(std::set<__pyx_t_5numpy_uint64_t>  const &__pyx_v_s) {
30223   PyObject *__pyx_v_o = NULL;
30224   std::set<__pyx_t_5numpy_uint64_t> ::const_iterator __pyx_v_iter;
30225   PyObject *__pyx_r = NULL;
30226   __Pyx_RefNannyDeclarations
30227   PyObject *__pyx_t_1 = NULL;
30228   int __pyx_t_2;
30229   int __pyx_t_3;
30230   __Pyx_RefNannySetupContext("__pyx_convert_set_to_py___pyx_t_5numpy_uint64_t", 0);
30231 
30232   /* "set.to_py":130
30233  * @cname("__pyx_convert_set_to_py___pyx_t_5numpy_uint64_t")
30234  * cdef object __pyx_convert_set_to_py___pyx_t_5numpy_uint64_t(const cpp_set[X]& s):
30235  *     o = set()             # <<<<<<<<<<<<<<
30236  *     cdef cpp_set[X].const_iterator iter = s.begin()
30237  *     while iter != s.end():
30238  */
30239   __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 130, __pyx_L1_error)
30240   __Pyx_GOTREF(__pyx_t_1);
30241   __pyx_v_o = ((PyObject*)__pyx_t_1);
30242   __pyx_t_1 = 0;
30243 
30244   /* "set.to_py":131
30245  * cdef object __pyx_convert_set_to_py___pyx_t_5numpy_uint64_t(const cpp_set[X]& s):
30246  *     o = set()
30247  *     cdef cpp_set[X].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
30248  *     while iter != s.end():
30249  *         o.add(cython.operator.dereference(iter))
30250  */
30251   __pyx_v_iter = __pyx_v_s.begin();
30252 
30253   /* "set.to_py":132
30254  *     o = set()
30255  *     cdef cpp_set[X].const_iterator iter = s.begin()
30256  *     while iter != s.end():             # <<<<<<<<<<<<<<
30257  *         o.add(cython.operator.dereference(iter))
30258  *         cython.operator.preincrement(iter)
30259  */
30260   while (1) {
30261     __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
30262     if (!__pyx_t_2) break;
30263 
30264     /* "set.to_py":133
30265  *     cdef cpp_set[X].const_iterator iter = s.begin()
30266  *     while iter != s.end():
30267  *         o.add(cython.operator.dereference(iter))             # <<<<<<<<<<<<<<
30268  *         cython.operator.preincrement(iter)
30269  *     return o
30270  */
30271     __pyx_t_1 = __Pyx_PyInt_From_npy_uint64((*__pyx_v_iter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 133, __pyx_L1_error)
30272     __Pyx_GOTREF(__pyx_t_1);
30273     __pyx_t_3 = PySet_Add(__pyx_v_o, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 133, __pyx_L1_error)
30274     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30275 
30276     /* "set.to_py":134
30277  *     while iter != s.end():
30278  *         o.add(cython.operator.dereference(iter))
30279  *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
30280  *     return o
30281  *
30282  */
30283     (void)((++__pyx_v_iter));
30284   }
30285 
30286   /* "set.to_py":135
30287  *         o.add(cython.operator.dereference(iter))
30288  *         cython.operator.preincrement(iter)
30289  *     return o             # <<<<<<<<<<<<<<
30290  *
30291  */
30292   __Pyx_XDECREF(__pyx_r);
30293   __Pyx_INCREF(__pyx_v_o);
30294   __pyx_r = __pyx_v_o;
30295   goto __pyx_L0;
30296 
30297   /* "set.to_py":129
30298  *
30299  * @cname("__pyx_convert_set_to_py___pyx_t_5numpy_uint64_t")
30300  * cdef object __pyx_convert_set_to_py___pyx_t_5numpy_uint64_t(const cpp_set[X]& s):             # <<<<<<<<<<<<<<
30301  *     o = set()
30302  *     cdef cpp_set[X].const_iterator iter = s.begin()
30303  */
30304 
30305   /* function exit code */
30306   __pyx_L1_error:;
30307   __Pyx_XDECREF(__pyx_t_1);
30308   __Pyx_AddTraceback("set.to_py.__pyx_convert_set_to_py___pyx_t_5numpy_uint64_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
30309   __pyx_r = 0;
30310   __pyx_L0:;
30311   __Pyx_XDECREF(__pyx_v_o);
30312   __Pyx_XGIVEREF(__pyx_r);
30313   __Pyx_RefNannyFinishContext();
30314   return __pyx_r;
30315 }
30316 
30317 /* "set.from_py":108
30318  *
30319  * @cname("__pyx_convert_set_from_py___pyx_t_5numpy_uint64_t")
30320  * cdef set[X] __pyx_convert_set_from_py___pyx_t_5numpy_uint64_t(object o) except *:             # <<<<<<<<<<<<<<
30321  *     cdef set[X] s
30322  *     for item in o:
30323  */
30324 
__pyx_convert_set_from_py___pyx_t_5numpy_uint64_t(PyObject * __pyx_v_o)30325 static std::set<__pyx_t_5numpy_uint64_t>  __pyx_convert_set_from_py___pyx_t_5numpy_uint64_t(PyObject *__pyx_v_o) {
30326   std::set<__pyx_t_5numpy_uint64_t>  __pyx_v_s;
30327   PyObject *__pyx_v_item = NULL;
30328   std::set<__pyx_t_5numpy_uint64_t>  __pyx_r;
30329   __Pyx_RefNannyDeclarations
30330   PyObject *__pyx_t_1 = NULL;
30331   Py_ssize_t __pyx_t_2;
30332   PyObject *(*__pyx_t_3)(PyObject *);
30333   PyObject *__pyx_t_4 = NULL;
30334   __pyx_t_5numpy_uint64_t __pyx_t_5;
30335   __Pyx_RefNannySetupContext("__pyx_convert_set_from_py___pyx_t_5numpy_uint64_t", 0);
30336 
30337   /* "set.from_py":110
30338  * cdef set[X] __pyx_convert_set_from_py___pyx_t_5numpy_uint64_t(object o) except *:
30339  *     cdef set[X] s
30340  *     for item in o:             # <<<<<<<<<<<<<<
30341  *         s.insert(<X>item)
30342  *     return s
30343  */
30344   if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
30345     __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
30346     __pyx_t_3 = NULL;
30347   } else {
30348     __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error)
30349     __Pyx_GOTREF(__pyx_t_1);
30350     __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 110, __pyx_L1_error)
30351   }
30352   for (;;) {
30353     if (likely(!__pyx_t_3)) {
30354       if (likely(PyList_CheckExact(__pyx_t_1))) {
30355         if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
30356         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30357         __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 110, __pyx_L1_error)
30358         #else
30359         __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 110, __pyx_L1_error)
30360         __Pyx_GOTREF(__pyx_t_4);
30361         #endif
30362       } else {
30363         if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
30364         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30365         __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 110, __pyx_L1_error)
30366         #else
30367         __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 110, __pyx_L1_error)
30368         __Pyx_GOTREF(__pyx_t_4);
30369         #endif
30370       }
30371     } else {
30372       __pyx_t_4 = __pyx_t_3(__pyx_t_1);
30373       if (unlikely(!__pyx_t_4)) {
30374         PyObject* exc_type = PyErr_Occurred();
30375         if (exc_type) {
30376           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
30377           else __PYX_ERR(1, 110, __pyx_L1_error)
30378         }
30379         break;
30380       }
30381       __Pyx_GOTREF(__pyx_t_4);
30382     }
30383     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
30384     __pyx_t_4 = 0;
30385 
30386     /* "set.from_py":111
30387  *     cdef set[X] s
30388  *     for item in o:
30389  *         s.insert(<X>item)             # <<<<<<<<<<<<<<
30390  *     return s
30391  *
30392  */
30393     __pyx_t_5 = __Pyx_PyInt_As_npy_uint64(__pyx_v_item); if (unlikely((__pyx_t_5 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(1, 111, __pyx_L1_error)
30394     __pyx_v_s.insert(((__pyx_t_5numpy_uint64_t)__pyx_t_5));
30395 
30396     /* "set.from_py":110
30397  * cdef set[X] __pyx_convert_set_from_py___pyx_t_5numpy_uint64_t(object o) except *:
30398  *     cdef set[X] s
30399  *     for item in o:             # <<<<<<<<<<<<<<
30400  *         s.insert(<X>item)
30401  *     return s
30402  */
30403   }
30404   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30405 
30406   /* "set.from_py":112
30407  *     for item in o:
30408  *         s.insert(<X>item)
30409  *     return s             # <<<<<<<<<<<<<<
30410  *
30411  *
30412  */
30413   __pyx_r = __pyx_v_s;
30414   goto __pyx_L0;
30415 
30416   /* "set.from_py":108
30417  *
30418  * @cname("__pyx_convert_set_from_py___pyx_t_5numpy_uint64_t")
30419  * cdef set[X] __pyx_convert_set_from_py___pyx_t_5numpy_uint64_t(object o) except *:             # <<<<<<<<<<<<<<
30420  *     cdef set[X] s
30421  *     for item in o:
30422  */
30423 
30424   /* function exit code */
30425   __pyx_L1_error:;
30426   __Pyx_XDECREF(__pyx_t_1);
30427   __Pyx_XDECREF(__pyx_t_4);
30428   __Pyx_AddTraceback("set.from_py.__pyx_convert_set_from_py___pyx_t_5numpy_uint64_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
30429   __Pyx_pretend_to_initialize(&__pyx_r);
30430   __pyx_L0:;
30431   __Pyx_XDECREF(__pyx_v_item);
30432   __Pyx_RefNannyFinishContext();
30433   return __pyx_r;
30434 }
30435 
30436 /* "pair.to_py":158
30437  *
30438  * @cname("__pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t")
30439  * cdef object __pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t(const pair[X,Y]& p):             # <<<<<<<<<<<<<<
30440  *     return p.first, p.second
30441  *
30442  */
30443 
__pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t(std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_5numpy_uint64_t> const & __pyx_v_p)30444 static PyObject *__pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t(std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_5numpy_uint64_t>  const &__pyx_v_p) {
30445   PyObject *__pyx_r = NULL;
30446   __Pyx_RefNannyDeclarations
30447   PyObject *__pyx_t_1 = NULL;
30448   PyObject *__pyx_t_2 = NULL;
30449   PyObject *__pyx_t_3 = NULL;
30450   __Pyx_RefNannySetupContext("__pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t", 0);
30451 
30452   /* "pair.to_py":159
30453  * @cname("__pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t")
30454  * cdef object __pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t(const pair[X,Y]& p):
30455  *     return p.first, p.second             # <<<<<<<<<<<<<<
30456  *
30457  *
30458  */
30459   __Pyx_XDECREF(__pyx_r);
30460   __pyx_t_1 = __Pyx_PyInt_From_npy_uint64(__pyx_v_p.first); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 159, __pyx_L1_error)
30461   __Pyx_GOTREF(__pyx_t_1);
30462   __pyx_t_2 = __Pyx_PyInt_From_npy_uint64(__pyx_v_p.second); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 159, __pyx_L1_error)
30463   __Pyx_GOTREF(__pyx_t_2);
30464   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 159, __pyx_L1_error)
30465   __Pyx_GOTREF(__pyx_t_3);
30466   __Pyx_GIVEREF(__pyx_t_1);
30467   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
30468   __Pyx_GIVEREF(__pyx_t_2);
30469   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
30470   __pyx_t_1 = 0;
30471   __pyx_t_2 = 0;
30472   __pyx_r = __pyx_t_3;
30473   __pyx_t_3 = 0;
30474   goto __pyx_L0;
30475 
30476   /* "pair.to_py":158
30477  *
30478  * @cname("__pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t")
30479  * cdef object __pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t(const pair[X,Y]& p):             # <<<<<<<<<<<<<<
30480  *     return p.first, p.second
30481  *
30482  */
30483 
30484   /* function exit code */
30485   __pyx_L1_error:;
30486   __Pyx_XDECREF(__pyx_t_1);
30487   __Pyx_XDECREF(__pyx_t_2);
30488   __Pyx_XDECREF(__pyx_t_3);
30489   __Pyx_AddTraceback("pair.to_py.__pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
30490   __pyx_r = 0;
30491   __pyx_L0:;
30492   __Pyx_XGIVEREF(__pyx_r);
30493   __Pyx_RefNannyFinishContext();
30494   return __pyx_r;
30495 }
30496 
30497 /* "set.to_py":129
30498  *
30499  * @cname("__pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair")
30500  * cdef object __pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(const cpp_set[X]& s):             # <<<<<<<<<<<<<<
30501  *     o = set()
30502  *     cdef cpp_set[X].const_iterator iter = s.begin()
30503  */
30504 
__pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> const & __pyx_v_s)30505 static PyObject *__pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  const &__pyx_v_s) {
30506   PyObject *__pyx_v_o = NULL;
30507   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ::const_iterator __pyx_v_iter;
30508   PyObject *__pyx_r = NULL;
30509   __Pyx_RefNannyDeclarations
30510   PyObject *__pyx_t_1 = NULL;
30511   int __pyx_t_2;
30512   int __pyx_t_3;
30513   __Pyx_RefNannySetupContext("__pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair", 0);
30514 
30515   /* "set.to_py":130
30516  * @cname("__pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair")
30517  * cdef object __pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(const cpp_set[X]& s):
30518  *     o = set()             # <<<<<<<<<<<<<<
30519  *     cdef cpp_set[X].const_iterator iter = s.begin()
30520  *     while iter != s.end():
30521  */
30522   __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 130, __pyx_L1_error)
30523   __Pyx_GOTREF(__pyx_t_1);
30524   __pyx_v_o = ((PyObject*)__pyx_t_1);
30525   __pyx_t_1 = 0;
30526 
30527   /* "set.to_py":131
30528  * cdef object __pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(const cpp_set[X]& s):
30529  *     o = set()
30530  *     cdef cpp_set[X].const_iterator iter = s.begin()             # <<<<<<<<<<<<<<
30531  *     while iter != s.end():
30532  *         o.add(cython.operator.dereference(iter))
30533  */
30534   __pyx_v_iter = __pyx_v_s.begin();
30535 
30536   /* "set.to_py":132
30537  *     o = set()
30538  *     cdef cpp_set[X].const_iterator iter = s.begin()
30539  *     while iter != s.end():             # <<<<<<<<<<<<<<
30540  *         o.add(cython.operator.dereference(iter))
30541  *         cython.operator.preincrement(iter)
30542  */
30543   while (1) {
30544     __pyx_t_2 = ((__pyx_v_iter != __pyx_v_s.end()) != 0);
30545     if (!__pyx_t_2) break;
30546 
30547     /* "set.to_py":133
30548  *     cdef cpp_set[X].const_iterator iter = s.begin()
30549  *     while iter != s.end():
30550  *         o.add(cython.operator.dereference(iter))             # <<<<<<<<<<<<<<
30551  *         cython.operator.preincrement(iter)
30552  *     return o
30553  */
30554     __pyx_t_1 = __pyx_convert_pair_to_py___pyx_t_5numpy_uint64_t______pyx_t_5numpy_uint64_t((*__pyx_v_iter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 133, __pyx_L1_error)
30555     __Pyx_GOTREF(__pyx_t_1);
30556     __pyx_t_3 = PySet_Add(__pyx_v_o, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 133, __pyx_L1_error)
30557     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30558 
30559     /* "set.to_py":134
30560  *     while iter != s.end():
30561  *         o.add(cython.operator.dereference(iter))
30562  *         cython.operator.preincrement(iter)             # <<<<<<<<<<<<<<
30563  *     return o
30564  *
30565  */
30566     (void)((++__pyx_v_iter));
30567   }
30568 
30569   /* "set.to_py":135
30570  *         o.add(cython.operator.dereference(iter))
30571  *         cython.operator.preincrement(iter)
30572  *     return o             # <<<<<<<<<<<<<<
30573  *
30574  */
30575   __Pyx_XDECREF(__pyx_r);
30576   __Pyx_INCREF(__pyx_v_o);
30577   __pyx_r = __pyx_v_o;
30578   goto __pyx_L0;
30579 
30580   /* "set.to_py":129
30581  *
30582  * @cname("__pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair")
30583  * cdef object __pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(const cpp_set[X]& s):             # <<<<<<<<<<<<<<
30584  *     o = set()
30585  *     cdef cpp_set[X].const_iterator iter = s.begin()
30586  */
30587 
30588   /* function exit code */
30589   __pyx_L1_error:;
30590   __Pyx_XDECREF(__pyx_t_1);
30591   __Pyx_AddTraceback("set.to_py.__pyx_convert_set_to_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair", __pyx_clineno, __pyx_lineno, __pyx_filename);
30592   __pyx_r = 0;
30593   __pyx_L0:;
30594   __Pyx_XDECREF(__pyx_v_o);
30595   __Pyx_XGIVEREF(__pyx_r);
30596   __Pyx_RefNannyFinishContext();
30597   return __pyx_r;
30598 }
30599 
30600 /* "pair.from_py":145
30601  *
30602  * @cname("__pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t")
30603  * cdef pair[X,Y] __pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t(object o) except *:             # <<<<<<<<<<<<<<
30604  *     x, y = o
30605  *     return pair[X,Y](<X>x, <Y>y)
30606  */
30607 
__pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t(PyObject * __pyx_v_o)30608 static std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_5numpy_uint64_t>  __pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t(PyObject *__pyx_v_o) {
30609   PyObject *__pyx_v_x = NULL;
30610   PyObject *__pyx_v_y = NULL;
30611   std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_5numpy_uint64_t>  __pyx_r;
30612   __Pyx_RefNannyDeclarations
30613   PyObject *__pyx_t_1 = NULL;
30614   PyObject *__pyx_t_2 = NULL;
30615   PyObject *__pyx_t_3 = NULL;
30616   PyObject *(*__pyx_t_4)(PyObject *);
30617   __pyx_t_5numpy_uint64_t __pyx_t_5;
30618   __pyx_t_5numpy_uint64_t __pyx_t_6;
30619   __Pyx_RefNannySetupContext("__pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t", 0);
30620 
30621   /* "pair.from_py":146
30622  * @cname("__pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t")
30623  * cdef pair[X,Y] __pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t(object o) except *:
30624  *     x, y = o             # <<<<<<<<<<<<<<
30625  *     return pair[X,Y](<X>x, <Y>y)
30626  *
30627  */
30628   if ((likely(PyTuple_CheckExact(__pyx_v_o))) || (PyList_CheckExact(__pyx_v_o))) {
30629     PyObject* sequence = __pyx_v_o;
30630     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
30631     if (unlikely(size != 2)) {
30632       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
30633       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
30634       __PYX_ERR(1, 146, __pyx_L1_error)
30635     }
30636     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30637     if (likely(PyTuple_CheckExact(sequence))) {
30638       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
30639       __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
30640     } else {
30641       __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
30642       __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
30643     }
30644     __Pyx_INCREF(__pyx_t_1);
30645     __Pyx_INCREF(__pyx_t_2);
30646     #else
30647     __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error)
30648     __Pyx_GOTREF(__pyx_t_1);
30649     __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 146, __pyx_L1_error)
30650     __Pyx_GOTREF(__pyx_t_2);
30651     #endif
30652   } else {
30653     Py_ssize_t index = -1;
30654     __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 146, __pyx_L1_error)
30655     __Pyx_GOTREF(__pyx_t_3);
30656     __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
30657     index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
30658     __Pyx_GOTREF(__pyx_t_1);
30659     index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
30660     __Pyx_GOTREF(__pyx_t_2);
30661     if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(1, 146, __pyx_L1_error)
30662     __pyx_t_4 = NULL;
30663     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30664     goto __pyx_L4_unpacking_done;
30665     __pyx_L3_unpacking_failed:;
30666     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30667     __pyx_t_4 = NULL;
30668     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
30669     __PYX_ERR(1, 146, __pyx_L1_error)
30670     __pyx_L4_unpacking_done:;
30671   }
30672   __pyx_v_x = __pyx_t_1;
30673   __pyx_t_1 = 0;
30674   __pyx_v_y = __pyx_t_2;
30675   __pyx_t_2 = 0;
30676 
30677   /* "pair.from_py":147
30678  * cdef pair[X,Y] __pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t(object o) except *:
30679  *     x, y = o
30680  *     return pair[X,Y](<X>x, <Y>y)             # <<<<<<<<<<<<<<
30681  *
30682  *
30683  */
30684   __pyx_t_5 = __Pyx_PyInt_As_npy_uint64(__pyx_v_x); if (unlikely((__pyx_t_5 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L1_error)
30685   __pyx_t_6 = __Pyx_PyInt_As_npy_uint64(__pyx_v_y); if (unlikely((__pyx_t_6 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L1_error)
30686   __pyx_r = std::pair<__pyx_t_5numpy_uint64_t,__pyx_t_5numpy_uint64_t> (((__pyx_t_5numpy_uint64_t)__pyx_t_5), ((__pyx_t_5numpy_uint64_t)__pyx_t_6));
30687   goto __pyx_L0;
30688 
30689   /* "pair.from_py":145
30690  *
30691  * @cname("__pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t")
30692  * cdef pair[X,Y] __pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t(object o) except *:             # <<<<<<<<<<<<<<
30693  *     x, y = o
30694  *     return pair[X,Y](<X>x, <Y>y)
30695  */
30696 
30697   /* function exit code */
30698   __pyx_L1_error:;
30699   __Pyx_XDECREF(__pyx_t_1);
30700   __Pyx_XDECREF(__pyx_t_2);
30701   __Pyx_XDECREF(__pyx_t_3);
30702   __Pyx_AddTraceback("pair.from_py.__pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
30703   __Pyx_pretend_to_initialize(&__pyx_r);
30704   __pyx_L0:;
30705   __Pyx_XDECREF(__pyx_v_x);
30706   __Pyx_XDECREF(__pyx_v_y);
30707   __Pyx_RefNannyFinishContext();
30708   return __pyx_r;
30709 }
30710 
30711 /* "set.from_py":108
30712  *
30713  * @cname("__pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair")
30714  * cdef set[X] __pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(object o) except *:             # <<<<<<<<<<<<<<
30715  *     cdef set[X] s
30716  *     for item in o:
30717  */
30718 
__pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(PyObject * __pyx_v_o)30719 static std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  __pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(PyObject *__pyx_v_o) {
30720   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  __pyx_v_s;
30721   PyObject *__pyx_v_item = NULL;
30722   std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair>  __pyx_r;
30723   __Pyx_RefNannyDeclarations
30724   PyObject *__pyx_t_1 = NULL;
30725   Py_ssize_t __pyx_t_2;
30726   PyObject *(*__pyx_t_3)(PyObject *);
30727   PyObject *__pyx_t_4 = NULL;
30728   __pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair __pyx_t_5;
30729   __Pyx_RefNannySetupContext("__pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair", 0);
30730 
30731   /* "set.from_py":110
30732  * cdef set[X] __pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(object o) except *:
30733  *     cdef set[X] s
30734  *     for item in o:             # <<<<<<<<<<<<<<
30735  *         s.insert(<X>item)
30736  *     return s
30737  */
30738   if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
30739     __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
30740     __pyx_t_3 = NULL;
30741   } else {
30742     __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error)
30743     __Pyx_GOTREF(__pyx_t_1);
30744     __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 110, __pyx_L1_error)
30745   }
30746   for (;;) {
30747     if (likely(!__pyx_t_3)) {
30748       if (likely(PyList_CheckExact(__pyx_t_1))) {
30749         if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
30750         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30751         __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 110, __pyx_L1_error)
30752         #else
30753         __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 110, __pyx_L1_error)
30754         __Pyx_GOTREF(__pyx_t_4);
30755         #endif
30756       } else {
30757         if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
30758         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30759         __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 110, __pyx_L1_error)
30760         #else
30761         __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 110, __pyx_L1_error)
30762         __Pyx_GOTREF(__pyx_t_4);
30763         #endif
30764       }
30765     } else {
30766       __pyx_t_4 = __pyx_t_3(__pyx_t_1);
30767       if (unlikely(!__pyx_t_4)) {
30768         PyObject* exc_type = PyErr_Occurred();
30769         if (exc_type) {
30770           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
30771           else __PYX_ERR(1, 110, __pyx_L1_error)
30772         }
30773         break;
30774       }
30775       __Pyx_GOTREF(__pyx_t_4);
30776     }
30777     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
30778     __pyx_t_4 = 0;
30779 
30780     /* "set.from_py":111
30781  *     cdef set[X] s
30782  *     for item in o:
30783  *         s.insert(<X>item)             # <<<<<<<<<<<<<<
30784  *     return s
30785  *
30786  */
30787     __pyx_t_5 = __pyx_convert_pair_from_py___pyx_t_5numpy_uint64_t__and___pyx_t_5numpy_uint64_t(__pyx_v_item); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 111, __pyx_L1_error)
30788     __pyx_v_s.insert(((__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair)__pyx_t_5));
30789 
30790     /* "set.from_py":110
30791  * cdef set[X] __pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(object o) except *:
30792  *     cdef set[X] s
30793  *     for item in o:             # <<<<<<<<<<<<<<
30794  *         s.insert(<X>item)
30795  *     return s
30796  */
30797   }
30798   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30799 
30800   /* "set.from_py":112
30801  *     for item in o:
30802  *         s.insert(<X>item)
30803  *     return s             # <<<<<<<<<<<<<<
30804  *
30805  *
30806  */
30807   __pyx_r = __pyx_v_s;
30808   goto __pyx_L0;
30809 
30810   /* "set.from_py":108
30811  *
30812  * @cname("__pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair")
30813  * cdef set[X] __pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair(object o) except *:             # <<<<<<<<<<<<<<
30814  *     cdef set[X] s
30815  *     for item in o:
30816  */
30817 
30818   /* function exit code */
30819   __pyx_L1_error:;
30820   __Pyx_XDECREF(__pyx_t_1);
30821   __Pyx_XDECREF(__pyx_t_4);
30822   __Pyx_AddTraceback("set.from_py.__pyx_convert_set_from_py___pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair", __pyx_clineno, __pyx_lineno, __pyx_filename);
30823   __Pyx_pretend_to_initialize(&__pyx_r);
30824   __pyx_L0:;
30825   __Pyx_XDECREF(__pyx_v_item);
30826   __Pyx_RefNannyFinishContext();
30827   return __pyx_r;
30828 }
30829 
30830 /* "string.to_py":31
30831  *
30832  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
30833  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
30834  *     return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
30835  * cdef extern from *:
30836  */
30837 
__pyx_convert_PyObject_string_to_py_std__in_string(std::string const & __pyx_v_s)30838 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) {
30839   PyObject *__pyx_r = NULL;
30840   __Pyx_RefNannyDeclarations
30841   PyObject *__pyx_t_1 = NULL;
30842   __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0);
30843 
30844   /* "string.to_py":32
30845  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
30846  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):
30847  *     return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
30848  * cdef extern from *:
30849  *     cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
30850  */
30851   __Pyx_XDECREF(__pyx_r);
30852   __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error)
30853   __Pyx_GOTREF(__pyx_t_1);
30854   __pyx_r = __pyx_t_1;
30855   __pyx_t_1 = 0;
30856   goto __pyx_L0;
30857 
30858   /* "string.to_py":31
30859  *
30860  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
30861  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
30862  *     return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
30863  * cdef extern from *:
30864  */
30865 
30866   /* function exit code */
30867   __pyx_L1_error:;
30868   __Pyx_XDECREF(__pyx_t_1);
30869   __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
30870   __pyx_r = 0;
30871   __pyx_L0:;
30872   __Pyx_XGIVEREF(__pyx_r);
30873   __Pyx_RefNannyFinishContext();
30874   return __pyx_r;
30875 }
30876 
30877 /* "string.to_py":37
30878  *
30879  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
30880  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
30881  *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
30882  * cdef extern from *:
30883  */
30884 
__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const & __pyx_v_s)30885 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) {
30886   PyObject *__pyx_r = NULL;
30887   __Pyx_RefNannyDeclarations
30888   PyObject *__pyx_t_1 = NULL;
30889   __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0);
30890 
30891   /* "string.to_py":38
30892  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
30893  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):
30894  *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
30895  * cdef extern from *:
30896  *     cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t)
30897  */
30898   __Pyx_XDECREF(__pyx_r);
30899   __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error)
30900   __Pyx_GOTREF(__pyx_t_1);
30901   __pyx_r = __pyx_t_1;
30902   __pyx_t_1 = 0;
30903   goto __pyx_L0;
30904 
30905   /* "string.to_py":37
30906  *
30907  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
30908  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
30909  *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
30910  * cdef extern from *:
30911  */
30912 
30913   /* function exit code */
30914   __pyx_L1_error:;
30915   __Pyx_XDECREF(__pyx_t_1);
30916   __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
30917   __pyx_r = 0;
30918   __pyx_L0:;
30919   __Pyx_XGIVEREF(__pyx_r);
30920   __Pyx_RefNannyFinishContext();
30921   return __pyx_r;
30922 }
30923 
30924 /* "string.to_py":43
30925  *
30926  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
30927  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
30928  *     return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
30929  * cdef extern from *:
30930  */
30931 
__pyx_convert_PyStr_string_to_py_std__in_string(std::string const & __pyx_v_s)30932 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) {
30933   PyObject *__pyx_r = NULL;
30934   __Pyx_RefNannyDeclarations
30935   PyObject *__pyx_t_1 = NULL;
30936   __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0);
30937 
30938   /* "string.to_py":44
30939  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
30940  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):
30941  *     return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
30942  * cdef extern from *:
30943  *     cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
30944  */
30945   __Pyx_XDECREF(__pyx_r);
30946   __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error)
30947   __Pyx_GOTREF(__pyx_t_1);
30948   __pyx_r = __pyx_t_1;
30949   __pyx_t_1 = 0;
30950   goto __pyx_L0;
30951 
30952   /* "string.to_py":43
30953  *
30954  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
30955  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
30956  *     return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
30957  * cdef extern from *:
30958  */
30959 
30960   /* function exit code */
30961   __pyx_L1_error:;
30962   __Pyx_XDECREF(__pyx_t_1);
30963   __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
30964   __pyx_r = 0;
30965   __pyx_L0:;
30966   __Pyx_XGIVEREF(__pyx_r);
30967   __Pyx_RefNannyFinishContext();
30968   return __pyx_r;
30969 }
30970 
30971 /* "string.to_py":49
30972  *
30973  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
30974  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
30975  *     return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
30976  * cdef extern from *:
30977  */
30978 
__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const & __pyx_v_s)30979 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) {
30980   PyObject *__pyx_r = NULL;
30981   __Pyx_RefNannyDeclarations
30982   PyObject *__pyx_t_1 = NULL;
30983   __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0);
30984 
30985   /* "string.to_py":50
30986  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
30987  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):
30988  *     return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
30989  * cdef extern from *:
30990  *     cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
30991  */
30992   __Pyx_XDECREF(__pyx_r);
30993   __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error)
30994   __Pyx_GOTREF(__pyx_t_1);
30995   __pyx_r = __pyx_t_1;
30996   __pyx_t_1 = 0;
30997   goto __pyx_L0;
30998 
30999   /* "string.to_py":49
31000  *
31001  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
31002  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
31003  *     return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
31004  * cdef extern from *:
31005  */
31006 
31007   /* function exit code */
31008   __pyx_L1_error:;
31009   __Pyx_XDECREF(__pyx_t_1);
31010   __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
31011   __pyx_r = 0;
31012   __pyx_L0:;
31013   __Pyx_XGIVEREF(__pyx_r);
31014   __Pyx_RefNannyFinishContext();
31015   return __pyx_r;
31016 }
31017 
31018 /* "string.to_py":55
31019  *
31020  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
31021  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
31022  *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
31023  *
31024  */
31025 
__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const & __pyx_v_s)31026 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) {
31027   PyObject *__pyx_r = NULL;
31028   __Pyx_RefNannyDeclarations
31029   PyObject *__pyx_t_1 = NULL;
31030   __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0);
31031 
31032   /* "string.to_py":56
31033  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
31034  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):
31035  *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())             # <<<<<<<<<<<<<<
31036  *
31037  */
31038   __Pyx_XDECREF(__pyx_r);
31039   __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
31040   __Pyx_GOTREF(__pyx_t_1);
31041   __pyx_r = __pyx_t_1;
31042   __pyx_t_1 = 0;
31043   goto __pyx_L0;
31044 
31045   /* "string.to_py":55
31046  *
31047  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
31048  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):             # <<<<<<<<<<<<<<
31049  *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
31050  *
31051  */
31052 
31053   /* function exit code */
31054   __pyx_L1_error:;
31055   __Pyx_XDECREF(__pyx_t_1);
31056   __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
31057   __pyx_r = 0;
31058   __pyx_L0:;
31059   __Pyx_XGIVEREF(__pyx_r);
31060   __Pyx_RefNannyFinishContext();
31061   return __pyx_r;
31062 }
31063 
31064 /* "View.MemoryView":122
31065  *         cdef bint dtype_is_object
31066  *
31067  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
31068  *                   mode="c", bint allocate_buffer=True):
31069  *
31070  */
31071 
31072 /* Python wrapper */
31073 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)31074 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31075   PyObject *__pyx_v_shape = 0;
31076   Py_ssize_t __pyx_v_itemsize;
31077   PyObject *__pyx_v_format = 0;
31078   PyObject *__pyx_v_mode = 0;
31079   int __pyx_v_allocate_buffer;
31080   int __pyx_r;
31081   __Pyx_RefNannyDeclarations
31082   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
31083   {
31084     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};
31085     PyObject* values[5] = {0,0,0,0,0};
31086     values[3] = ((PyObject *)__pyx_n_s_c);
31087     if (unlikely(__pyx_kwds)) {
31088       Py_ssize_t kw_args;
31089       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
31090       switch (pos_args) {
31091         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31092         CYTHON_FALLTHROUGH;
31093         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31094         CYTHON_FALLTHROUGH;
31095         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31096         CYTHON_FALLTHROUGH;
31097         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31098         CYTHON_FALLTHROUGH;
31099         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31100         CYTHON_FALLTHROUGH;
31101         case  0: break;
31102         default: goto __pyx_L5_argtuple_error;
31103       }
31104       kw_args = PyDict_Size(__pyx_kwds);
31105       switch (pos_args) {
31106         case  0:
31107         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
31108         else goto __pyx_L5_argtuple_error;
31109         CYTHON_FALLTHROUGH;
31110         case  1:
31111         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
31112         else {
31113           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 122, __pyx_L3_error)
31114         }
31115         CYTHON_FALLTHROUGH;
31116         case  2:
31117         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
31118         else {
31119           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 122, __pyx_L3_error)
31120         }
31121         CYTHON_FALLTHROUGH;
31122         case  3:
31123         if (kw_args > 0) {
31124           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
31125           if (value) { values[3] = value; kw_args--; }
31126         }
31127         CYTHON_FALLTHROUGH;
31128         case  4:
31129         if (kw_args > 0) {
31130           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
31131           if (value) { values[4] = value; kw_args--; }
31132         }
31133       }
31134       if (unlikely(kw_args > 0)) {
31135         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 122, __pyx_L3_error)
31136       }
31137     } else {
31138       switch (PyTuple_GET_SIZE(__pyx_args)) {
31139         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
31140         CYTHON_FALLTHROUGH;
31141         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
31142         CYTHON_FALLTHROUGH;
31143         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
31144         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
31145         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31146         break;
31147         default: goto __pyx_L5_argtuple_error;
31148       }
31149     }
31150     __pyx_v_shape = ((PyObject*)values[0]);
31151     __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 122, __pyx_L3_error)
31152     __pyx_v_format = values[2];
31153     __pyx_v_mode = values[3];
31154     if (values[4]) {
31155       __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error)
31156     } else {
31157 
31158       /* "View.MemoryView":123
31159  *
31160  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
31161  *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
31162  *
31163  *         cdef int idx
31164  */
31165       __pyx_v_allocate_buffer = ((int)1);
31166     }
31167   }
31168   goto __pyx_L4_argument_unpacking_done;
31169   __pyx_L5_argtuple_error:;
31170   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 122, __pyx_L3_error)
31171   __pyx_L3_error:;
31172   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31173   __Pyx_RefNannyFinishContext();
31174   return -1;
31175   __pyx_L4_argument_unpacking_done:;
31176   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 122, __pyx_L1_error)
31177   if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
31178     PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 122, __pyx_L1_error)
31179   }
31180   __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);
31181 
31182   /* "View.MemoryView":122
31183  *         cdef bint dtype_is_object
31184  *
31185  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
31186  *                   mode="c", bint allocate_buffer=True):
31187  *
31188  */
31189 
31190   /* function exit code */
31191   goto __pyx_L0;
31192   __pyx_L1_error:;
31193   __pyx_r = -1;
31194   __pyx_L0:;
31195   __Pyx_RefNannyFinishContext();
31196   return __pyx_r;
31197 }
31198 
__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)31199 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) {
31200   int __pyx_v_idx;
31201   Py_ssize_t __pyx_v_i;
31202   Py_ssize_t __pyx_v_dim;
31203   PyObject **__pyx_v_p;
31204   char __pyx_v_order;
31205   int __pyx_r;
31206   __Pyx_RefNannyDeclarations
31207   Py_ssize_t __pyx_t_1;
31208   int __pyx_t_2;
31209   PyObject *__pyx_t_3 = NULL;
31210   int __pyx_t_4;
31211   PyObject *__pyx_t_5 = NULL;
31212   PyObject *__pyx_t_6 = NULL;
31213   char *__pyx_t_7;
31214   int __pyx_t_8;
31215   Py_ssize_t __pyx_t_9;
31216   PyObject *__pyx_t_10 = NULL;
31217   Py_ssize_t __pyx_t_11;
31218   __Pyx_RefNannySetupContext("__cinit__", 0);
31219   __Pyx_INCREF(__pyx_v_format);
31220 
31221   /* "View.MemoryView":129
31222  *         cdef PyObject **p
31223  *
31224  *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
31225  *         self.itemsize = itemsize
31226  *
31227  */
31228   if (unlikely(__pyx_v_shape == Py_None)) {
31229     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
31230     __PYX_ERR(1, 129, __pyx_L1_error)
31231   }
31232   __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 129, __pyx_L1_error)
31233   __pyx_v_self->ndim = ((int)__pyx_t_1);
31234 
31235   /* "View.MemoryView":130
31236  *
31237  *         self.ndim = <int> len(shape)
31238  *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
31239  *
31240  *         if not self.ndim:
31241  */
31242   __pyx_v_self->itemsize = __pyx_v_itemsize;
31243 
31244   /* "View.MemoryView":132
31245  *         self.itemsize = itemsize
31246  *
31247  *         if not self.ndim:             # <<<<<<<<<<<<<<
31248  *             raise ValueError("Empty shape tuple for cython.array")
31249  *
31250  */
31251   __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
31252   if (unlikely(__pyx_t_2)) {
31253 
31254     /* "View.MemoryView":133
31255  *
31256  *         if not self.ndim:
31257  *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
31258  *
31259  *         if itemsize <= 0:
31260  */
31261     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error)
31262     __Pyx_GOTREF(__pyx_t_3);
31263     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31264     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31265     __PYX_ERR(1, 133, __pyx_L1_error)
31266 
31267     /* "View.MemoryView":132
31268  *         self.itemsize = itemsize
31269  *
31270  *         if not self.ndim:             # <<<<<<<<<<<<<<
31271  *             raise ValueError("Empty shape tuple for cython.array")
31272  *
31273  */
31274   }
31275 
31276   /* "View.MemoryView":135
31277  *             raise ValueError("Empty shape tuple for cython.array")
31278  *
31279  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
31280  *             raise ValueError("itemsize <= 0 for cython.array")
31281  *
31282  */
31283   __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
31284   if (unlikely(__pyx_t_2)) {
31285 
31286     /* "View.MemoryView":136
31287  *
31288  *         if itemsize <= 0:
31289  *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
31290  *
31291  *         if not isinstance(format, bytes):
31292  */
31293     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error)
31294     __Pyx_GOTREF(__pyx_t_3);
31295     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31296     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31297     __PYX_ERR(1, 136, __pyx_L1_error)
31298 
31299     /* "View.MemoryView":135
31300  *             raise ValueError("Empty shape tuple for cython.array")
31301  *
31302  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
31303  *             raise ValueError("itemsize <= 0 for cython.array")
31304  *
31305  */
31306   }
31307 
31308   /* "View.MemoryView":138
31309  *             raise ValueError("itemsize <= 0 for cython.array")
31310  *
31311  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
31312  *             format = format.encode('ASCII')
31313  *         self._format = format  # keep a reference to the byte string
31314  */
31315   __pyx_t_2 = PyBytes_Check(__pyx_v_format);
31316   __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
31317   if (__pyx_t_4) {
31318 
31319     /* "View.MemoryView":139
31320  *
31321  *         if not isinstance(format, bytes):
31322  *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
31323  *         self._format = format  # keep a reference to the byte string
31324  *         self.format = self._format
31325  */
31326     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error)
31327     __Pyx_GOTREF(__pyx_t_5);
31328     __pyx_t_6 = NULL;
31329     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
31330       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
31331       if (likely(__pyx_t_6)) {
31332         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
31333         __Pyx_INCREF(__pyx_t_6);
31334         __Pyx_INCREF(function);
31335         __Pyx_DECREF_SET(__pyx_t_5, function);
31336       }
31337     }
31338     __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);
31339     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
31340     if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error)
31341     __Pyx_GOTREF(__pyx_t_3);
31342     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31343     __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
31344     __pyx_t_3 = 0;
31345 
31346     /* "View.MemoryView":138
31347  *             raise ValueError("itemsize <= 0 for cython.array")
31348  *
31349  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
31350  *             format = format.encode('ASCII')
31351  *         self._format = format  # keep a reference to the byte string
31352  */
31353   }
31354 
31355   /* "View.MemoryView":140
31356  *         if not isinstance(format, bytes):
31357  *             format = format.encode('ASCII')
31358  *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
31359  *         self.format = self._format
31360  *
31361  */
31362   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(1, 140, __pyx_L1_error)
31363   __pyx_t_3 = __pyx_v_format;
31364   __Pyx_INCREF(__pyx_t_3);
31365   __Pyx_GIVEREF(__pyx_t_3);
31366   __Pyx_GOTREF(__pyx_v_self->_format);
31367   __Pyx_DECREF(__pyx_v_self->_format);
31368   __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
31369   __pyx_t_3 = 0;
31370 
31371   /* "View.MemoryView":141
31372  *             format = format.encode('ASCII')
31373  *         self._format = format  # keep a reference to the byte string
31374  *         self.format = self._format             # <<<<<<<<<<<<<<
31375  *
31376  *
31377  */
31378   if (unlikely(__pyx_v_self->_format == Py_None)) {
31379     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
31380     __PYX_ERR(1, 141, __pyx_L1_error)
31381   }
31382   __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 141, __pyx_L1_error)
31383   __pyx_v_self->format = __pyx_t_7;
31384 
31385   /* "View.MemoryView":144
31386  *
31387  *
31388  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
31389  *         self._strides = self._shape + self.ndim
31390  *
31391  */
31392   __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
31393 
31394   /* "View.MemoryView":145
31395  *
31396  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
31397  *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
31398  *
31399  *         if not self._shape:
31400  */
31401   __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
31402 
31403   /* "View.MemoryView":147
31404  *         self._strides = self._shape + self.ndim
31405  *
31406  *         if not self._shape:             # <<<<<<<<<<<<<<
31407  *             raise MemoryError("unable to allocate shape and strides.")
31408  *
31409  */
31410   __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
31411   if (unlikely(__pyx_t_4)) {
31412 
31413     /* "View.MemoryView":148
31414  *
31415  *         if not self._shape:
31416  *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
31417  *
31418  *
31419  */
31420     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 148, __pyx_L1_error)
31421     __Pyx_GOTREF(__pyx_t_3);
31422     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31423     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31424     __PYX_ERR(1, 148, __pyx_L1_error)
31425 
31426     /* "View.MemoryView":147
31427  *         self._strides = self._shape + self.ndim
31428  *
31429  *         if not self._shape:             # <<<<<<<<<<<<<<
31430  *             raise MemoryError("unable to allocate shape and strides.")
31431  *
31432  */
31433   }
31434 
31435   /* "View.MemoryView":151
31436  *
31437  *
31438  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
31439  *             if dim <= 0:
31440  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
31441  */
31442   __pyx_t_8 = 0;
31443   __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
31444   for (;;) {
31445     if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
31446     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
31447     __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(1, 151, __pyx_L1_error)
31448     #else
31449     __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error)
31450     __Pyx_GOTREF(__pyx_t_5);
31451     #endif
31452     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error)
31453     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31454     __pyx_v_dim = __pyx_t_9;
31455     __pyx_v_idx = __pyx_t_8;
31456     __pyx_t_8 = (__pyx_t_8 + 1);
31457 
31458     /* "View.MemoryView":152
31459  *
31460  *         for idx, dim in enumerate(shape):
31461  *             if dim <= 0:             # <<<<<<<<<<<<<<
31462  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
31463  *             self._shape[idx] = dim
31464  */
31465     __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
31466     if (unlikely(__pyx_t_4)) {
31467 
31468       /* "View.MemoryView":153
31469  *         for idx, dim in enumerate(shape):
31470  *             if dim <= 0:
31471  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))             # <<<<<<<<<<<<<<
31472  *             self._shape[idx] = dim
31473  *
31474  */
31475       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 153, __pyx_L1_error)
31476       __Pyx_GOTREF(__pyx_t_5);
31477       __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error)
31478       __Pyx_GOTREF(__pyx_t_6);
31479       __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)
31480       __Pyx_GOTREF(__pyx_t_10);
31481       __Pyx_GIVEREF(__pyx_t_5);
31482       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
31483       __Pyx_GIVEREF(__pyx_t_6);
31484       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
31485       __pyx_t_5 = 0;
31486       __pyx_t_6 = 0;
31487       __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(1, 153, __pyx_L1_error)
31488       __Pyx_GOTREF(__pyx_t_6);
31489       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
31490       __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)
31491       __Pyx_GOTREF(__pyx_t_10);
31492       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
31493       __Pyx_Raise(__pyx_t_10, 0, 0, 0);
31494       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
31495       __PYX_ERR(1, 153, __pyx_L1_error)
31496 
31497       /* "View.MemoryView":152
31498  *
31499  *         for idx, dim in enumerate(shape):
31500  *             if dim <= 0:             # <<<<<<<<<<<<<<
31501  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
31502  *             self._shape[idx] = dim
31503  */
31504     }
31505 
31506     /* "View.MemoryView":154
31507  *             if dim <= 0:
31508  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
31509  *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
31510  *
31511  *         cdef char order
31512  */
31513     (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
31514 
31515     /* "View.MemoryView":151
31516  *
31517  *
31518  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
31519  *             if dim <= 0:
31520  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
31521  */
31522   }
31523   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31524 
31525   /* "View.MemoryView":157
31526  *
31527  *         cdef char order
31528  *         if mode == 'fortran':             # <<<<<<<<<<<<<<
31529  *             order = b'F'
31530  *             self.mode = u'fortran'
31531  */
31532   __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 157, __pyx_L1_error)
31533   if (__pyx_t_4) {
31534 
31535     /* "View.MemoryView":158
31536  *         cdef char order
31537  *         if mode == 'fortran':
31538  *             order = b'F'             # <<<<<<<<<<<<<<
31539  *             self.mode = u'fortran'
31540  *         elif mode == 'c':
31541  */
31542     __pyx_v_order = 'F';
31543 
31544     /* "View.MemoryView":159
31545  *         if mode == 'fortran':
31546  *             order = b'F'
31547  *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
31548  *         elif mode == 'c':
31549  *             order = b'C'
31550  */
31551     __Pyx_INCREF(__pyx_n_u_fortran);
31552     __Pyx_GIVEREF(__pyx_n_u_fortran);
31553     __Pyx_GOTREF(__pyx_v_self->mode);
31554     __Pyx_DECREF(__pyx_v_self->mode);
31555     __pyx_v_self->mode = __pyx_n_u_fortran;
31556 
31557     /* "View.MemoryView":157
31558  *
31559  *         cdef char order
31560  *         if mode == 'fortran':             # <<<<<<<<<<<<<<
31561  *             order = b'F'
31562  *             self.mode = u'fortran'
31563  */
31564     goto __pyx_L10;
31565   }
31566 
31567   /* "View.MemoryView":160
31568  *             order = b'F'
31569  *             self.mode = u'fortran'
31570  *         elif mode == 'c':             # <<<<<<<<<<<<<<
31571  *             order = b'C'
31572  *             self.mode = u'c'
31573  */
31574   __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 160, __pyx_L1_error)
31575   if (likely(__pyx_t_4)) {
31576 
31577     /* "View.MemoryView":161
31578  *             self.mode = u'fortran'
31579  *         elif mode == 'c':
31580  *             order = b'C'             # <<<<<<<<<<<<<<
31581  *             self.mode = u'c'
31582  *         else:
31583  */
31584     __pyx_v_order = 'C';
31585 
31586     /* "View.MemoryView":162
31587  *         elif mode == 'c':
31588  *             order = b'C'
31589  *             self.mode = u'c'             # <<<<<<<<<<<<<<
31590  *         else:
31591  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
31592  */
31593     __Pyx_INCREF(__pyx_n_u_c);
31594     __Pyx_GIVEREF(__pyx_n_u_c);
31595     __Pyx_GOTREF(__pyx_v_self->mode);
31596     __Pyx_DECREF(__pyx_v_self->mode);
31597     __pyx_v_self->mode = __pyx_n_u_c;
31598 
31599     /* "View.MemoryView":160
31600  *             order = b'F'
31601  *             self.mode = u'fortran'
31602  *         elif mode == 'c':             # <<<<<<<<<<<<<<
31603  *             order = b'C'
31604  *             self.mode = u'c'
31605  */
31606     goto __pyx_L10;
31607   }
31608 
31609   /* "View.MemoryView":164
31610  *             self.mode = u'c'
31611  *         else:
31612  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)             # <<<<<<<<<<<<<<
31613  *
31614  *         self.len = fill_contig_strides_array(self._shape, self._strides,
31615  */
31616   /*else*/ {
31617     __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(1, 164, __pyx_L1_error)
31618     __Pyx_GOTREF(__pyx_t_3);
31619     __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 164, __pyx_L1_error)
31620     __Pyx_GOTREF(__pyx_t_10);
31621     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31622     __Pyx_Raise(__pyx_t_10, 0, 0, 0);
31623     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
31624     __PYX_ERR(1, 164, __pyx_L1_error)
31625   }
31626   __pyx_L10:;
31627 
31628   /* "View.MemoryView":166
31629  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
31630  *
31631  *         self.len = fill_contig_strides_array(self._shape, self._strides,             # <<<<<<<<<<<<<<
31632  *                                              itemsize, self.ndim, order)
31633  *
31634  */
31635   __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);
31636 
31637   /* "View.MemoryView":169
31638  *                                              itemsize, self.ndim, order)
31639  *
31640  *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
31641  *         self.dtype_is_object = format == b'O'
31642  *         if allocate_buffer:
31643  */
31644   __pyx_v_self->free_data = __pyx_v_allocate_buffer;
31645 
31646   /* "View.MemoryView":170
31647  *
31648  *         self.free_data = allocate_buffer
31649  *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
31650  *         if allocate_buffer:
31651  *
31652  */
31653   __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(1, 170, __pyx_L1_error)
31654   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 170, __pyx_L1_error)
31655   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
31656   __pyx_v_self->dtype_is_object = __pyx_t_4;
31657 
31658   /* "View.MemoryView":171
31659  *         self.free_data = allocate_buffer
31660  *         self.dtype_is_object = format == b'O'
31661  *         if allocate_buffer:             # <<<<<<<<<<<<<<
31662  *
31663  *
31664  */
31665   __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
31666   if (__pyx_t_4) {
31667 
31668     /* "View.MemoryView":174
31669  *
31670  *
31671  *             self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
31672  *             if not self.data:
31673  *                 raise MemoryError("unable to allocate array data.")
31674  */
31675     __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
31676 
31677     /* "View.MemoryView":175
31678  *
31679  *             self.data = <char *>malloc(self.len)
31680  *             if not self.data:             # <<<<<<<<<<<<<<
31681  *                 raise MemoryError("unable to allocate array data.")
31682  *
31683  */
31684     __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
31685     if (unlikely(__pyx_t_4)) {
31686 
31687       /* "View.MemoryView":176
31688  *             self.data = <char *>malloc(self.len)
31689  *             if not self.data:
31690  *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
31691  *
31692  *             if self.dtype_is_object:
31693  */
31694       __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error)
31695       __Pyx_GOTREF(__pyx_t_10);
31696       __Pyx_Raise(__pyx_t_10, 0, 0, 0);
31697       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
31698       __PYX_ERR(1, 176, __pyx_L1_error)
31699 
31700       /* "View.MemoryView":175
31701  *
31702  *             self.data = <char *>malloc(self.len)
31703  *             if not self.data:             # <<<<<<<<<<<<<<
31704  *                 raise MemoryError("unable to allocate array data.")
31705  *
31706  */
31707     }
31708 
31709     /* "View.MemoryView":178
31710  *                 raise MemoryError("unable to allocate array data.")
31711  *
31712  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
31713  *                 p = <PyObject **> self.data
31714  *                 for i in range(self.len / itemsize):
31715  */
31716     __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
31717     if (__pyx_t_4) {
31718 
31719       /* "View.MemoryView":179
31720  *
31721  *             if self.dtype_is_object:
31722  *                 p = <PyObject **> self.data             # <<<<<<<<<<<<<<
31723  *                 for i in range(self.len / itemsize):
31724  *                     p[i] = Py_None
31725  */
31726       __pyx_v_p = ((PyObject **)__pyx_v_self->data);
31727 
31728       /* "View.MemoryView":180
31729  *             if self.dtype_is_object:
31730  *                 p = <PyObject **> self.data
31731  *                 for i in range(self.len / itemsize):             # <<<<<<<<<<<<<<
31732  *                     p[i] = Py_None
31733  *                     Py_INCREF(Py_None)
31734  */
31735       if (unlikely(__pyx_v_itemsize == 0)) {
31736         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
31737         __PYX_ERR(1, 180, __pyx_L1_error)
31738       }
31739       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))) {
31740         PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
31741         __PYX_ERR(1, 180, __pyx_L1_error)
31742       }
31743       __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
31744       __pyx_t_9 = __pyx_t_1;
31745       for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
31746         __pyx_v_i = __pyx_t_11;
31747 
31748         /* "View.MemoryView":181
31749  *                 p = <PyObject **> self.data
31750  *                 for i in range(self.len / itemsize):
31751  *                     p[i] = Py_None             # <<<<<<<<<<<<<<
31752  *                     Py_INCREF(Py_None)
31753  *
31754  */
31755         (__pyx_v_p[__pyx_v_i]) = Py_None;
31756 
31757         /* "View.MemoryView":182
31758  *                 for i in range(self.len / itemsize):
31759  *                     p[i] = Py_None
31760  *                     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
31761  *
31762  *     @cname('getbuffer')
31763  */
31764         Py_INCREF(Py_None);
31765       }
31766 
31767       /* "View.MemoryView":178
31768  *                 raise MemoryError("unable to allocate array data.")
31769  *
31770  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
31771  *                 p = <PyObject **> self.data
31772  *                 for i in range(self.len / itemsize):
31773  */
31774     }
31775 
31776     /* "View.MemoryView":171
31777  *         self.free_data = allocate_buffer
31778  *         self.dtype_is_object = format == b'O'
31779  *         if allocate_buffer:             # <<<<<<<<<<<<<<
31780  *
31781  *
31782  */
31783   }
31784 
31785   /* "View.MemoryView":122
31786  *         cdef bint dtype_is_object
31787  *
31788  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
31789  *                   mode="c", bint allocate_buffer=True):
31790  *
31791  */
31792 
31793   /* function exit code */
31794   __pyx_r = 0;
31795   goto __pyx_L0;
31796   __pyx_L1_error:;
31797   __Pyx_XDECREF(__pyx_t_3);
31798   __Pyx_XDECREF(__pyx_t_5);
31799   __Pyx_XDECREF(__pyx_t_6);
31800   __Pyx_XDECREF(__pyx_t_10);
31801   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31802   __pyx_r = -1;
31803   __pyx_L0:;
31804   __Pyx_XDECREF(__pyx_v_format);
31805   __Pyx_RefNannyFinishContext();
31806   return __pyx_r;
31807 }
31808 
31809 /* "View.MemoryView":185
31810  *
31811  *     @cname('getbuffer')
31812  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
31813  *         cdef int bufmode = -1
31814  *         if self.mode == u"c":
31815  */
31816 
31817 /* Python wrapper */
31818 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)31819 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
31820   int __pyx_r;
31821   __Pyx_RefNannyDeclarations
31822   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
31823   __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));
31824 
31825   /* function exit code */
31826   __Pyx_RefNannyFinishContext();
31827   return __pyx_r;
31828 }
31829 
__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)31830 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) {
31831   int __pyx_v_bufmode;
31832   int __pyx_r;
31833   __Pyx_RefNannyDeclarations
31834   int __pyx_t_1;
31835   int __pyx_t_2;
31836   PyObject *__pyx_t_3 = NULL;
31837   char *__pyx_t_4;
31838   Py_ssize_t __pyx_t_5;
31839   int __pyx_t_6;
31840   Py_ssize_t *__pyx_t_7;
31841   if (__pyx_v_info == NULL) {
31842     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
31843     return -1;
31844   }
31845   __Pyx_RefNannySetupContext("__getbuffer__", 0);
31846   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
31847   __Pyx_GIVEREF(__pyx_v_info->obj);
31848 
31849   /* "View.MemoryView":186
31850  *     @cname('getbuffer')
31851  *     def __getbuffer__(self, Py_buffer *info, int flags):
31852  *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
31853  *         if self.mode == u"c":
31854  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31855  */
31856   __pyx_v_bufmode = -1;
31857 
31858   /* "View.MemoryView":187
31859  *     def __getbuffer__(self, Py_buffer *info, int flags):
31860  *         cdef int bufmode = -1
31861  *         if self.mode == u"c":             # <<<<<<<<<<<<<<
31862  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31863  *         elif self.mode == u"fortran":
31864  */
31865   __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 187, __pyx_L1_error)
31866   __pyx_t_2 = (__pyx_t_1 != 0);
31867   if (__pyx_t_2) {
31868 
31869     /* "View.MemoryView":188
31870  *         cdef int bufmode = -1
31871  *         if self.mode == u"c":
31872  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
31873  *         elif self.mode == u"fortran":
31874  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31875  */
31876     __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
31877 
31878     /* "View.MemoryView":187
31879  *     def __getbuffer__(self, Py_buffer *info, int flags):
31880  *         cdef int bufmode = -1
31881  *         if self.mode == u"c":             # <<<<<<<<<<<<<<
31882  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31883  *         elif self.mode == u"fortran":
31884  */
31885     goto __pyx_L3;
31886   }
31887 
31888   /* "View.MemoryView":189
31889  *         if self.mode == u"c":
31890  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31891  *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
31892  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31893  *         if not (flags & bufmode):
31894  */
31895   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 189, __pyx_L1_error)
31896   __pyx_t_1 = (__pyx_t_2 != 0);
31897   if (__pyx_t_1) {
31898 
31899     /* "View.MemoryView":190
31900  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31901  *         elif self.mode == u"fortran":
31902  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
31903  *         if not (flags & bufmode):
31904  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
31905  */
31906     __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
31907 
31908     /* "View.MemoryView":189
31909  *         if self.mode == u"c":
31910  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31911  *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
31912  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31913  *         if not (flags & bufmode):
31914  */
31915   }
31916   __pyx_L3:;
31917 
31918   /* "View.MemoryView":191
31919  *         elif self.mode == u"fortran":
31920  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31921  *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
31922  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
31923  *         info.buf = self.data
31924  */
31925   __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
31926   if (unlikely(__pyx_t_1)) {
31927 
31928     /* "View.MemoryView":192
31929  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31930  *         if not (flags & bufmode):
31931  *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
31932  *         info.buf = self.data
31933  *         info.len = self.len
31934  */
31935     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error)
31936     __Pyx_GOTREF(__pyx_t_3);
31937     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31938     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31939     __PYX_ERR(1, 192, __pyx_L1_error)
31940 
31941     /* "View.MemoryView":191
31942  *         elif self.mode == u"fortran":
31943  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
31944  *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
31945  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
31946  *         info.buf = self.data
31947  */
31948   }
31949 
31950   /* "View.MemoryView":193
31951  *         if not (flags & bufmode):
31952  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
31953  *         info.buf = self.data             # <<<<<<<<<<<<<<
31954  *         info.len = self.len
31955  *         info.ndim = self.ndim
31956  */
31957   __pyx_t_4 = __pyx_v_self->data;
31958   __pyx_v_info->buf = __pyx_t_4;
31959 
31960   /* "View.MemoryView":194
31961  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
31962  *         info.buf = self.data
31963  *         info.len = self.len             # <<<<<<<<<<<<<<
31964  *         info.ndim = self.ndim
31965  *         info.shape = self._shape
31966  */
31967   __pyx_t_5 = __pyx_v_self->len;
31968   __pyx_v_info->len = __pyx_t_5;
31969 
31970   /* "View.MemoryView":195
31971  *         info.buf = self.data
31972  *         info.len = self.len
31973  *         info.ndim = self.ndim             # <<<<<<<<<<<<<<
31974  *         info.shape = self._shape
31975  *         info.strides = self._strides
31976  */
31977   __pyx_t_6 = __pyx_v_self->ndim;
31978   __pyx_v_info->ndim = __pyx_t_6;
31979 
31980   /* "View.MemoryView":196
31981  *         info.len = self.len
31982  *         info.ndim = self.ndim
31983  *         info.shape = self._shape             # <<<<<<<<<<<<<<
31984  *         info.strides = self._strides
31985  *         info.suboffsets = NULL
31986  */
31987   __pyx_t_7 = __pyx_v_self->_shape;
31988   __pyx_v_info->shape = __pyx_t_7;
31989 
31990   /* "View.MemoryView":197
31991  *         info.ndim = self.ndim
31992  *         info.shape = self._shape
31993  *         info.strides = self._strides             # <<<<<<<<<<<<<<
31994  *         info.suboffsets = NULL
31995  *         info.itemsize = self.itemsize
31996  */
31997   __pyx_t_7 = __pyx_v_self->_strides;
31998   __pyx_v_info->strides = __pyx_t_7;
31999 
32000   /* "View.MemoryView":198
32001  *         info.shape = self._shape
32002  *         info.strides = self._strides
32003  *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
32004  *         info.itemsize = self.itemsize
32005  *         info.readonly = 0
32006  */
32007   __pyx_v_info->suboffsets = NULL;
32008 
32009   /* "View.MemoryView":199
32010  *         info.strides = self._strides
32011  *         info.suboffsets = NULL
32012  *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
32013  *         info.readonly = 0
32014  *
32015  */
32016   __pyx_t_5 = __pyx_v_self->itemsize;
32017   __pyx_v_info->itemsize = __pyx_t_5;
32018 
32019   /* "View.MemoryView":200
32020  *         info.suboffsets = NULL
32021  *         info.itemsize = self.itemsize
32022  *         info.readonly = 0             # <<<<<<<<<<<<<<
32023  *
32024  *         if flags & PyBUF_FORMAT:
32025  */
32026   __pyx_v_info->readonly = 0;
32027 
32028   /* "View.MemoryView":202
32029  *         info.readonly = 0
32030  *
32031  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
32032  *             info.format = self.format
32033  *         else:
32034  */
32035   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
32036   if (__pyx_t_1) {
32037 
32038     /* "View.MemoryView":203
32039  *
32040  *         if flags & PyBUF_FORMAT:
32041  *             info.format = self.format             # <<<<<<<<<<<<<<
32042  *         else:
32043  *             info.format = NULL
32044  */
32045     __pyx_t_4 = __pyx_v_self->format;
32046     __pyx_v_info->format = __pyx_t_4;
32047 
32048     /* "View.MemoryView":202
32049  *         info.readonly = 0
32050  *
32051  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
32052  *             info.format = self.format
32053  *         else:
32054  */
32055     goto __pyx_L5;
32056   }
32057 
32058   /* "View.MemoryView":205
32059  *             info.format = self.format
32060  *         else:
32061  *             info.format = NULL             # <<<<<<<<<<<<<<
32062  *
32063  *         info.obj = self
32064  */
32065   /*else*/ {
32066     __pyx_v_info->format = NULL;
32067   }
32068   __pyx_L5:;
32069 
32070   /* "View.MemoryView":207
32071  *             info.format = NULL
32072  *
32073  *         info.obj = self             # <<<<<<<<<<<<<<
32074  *
32075  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
32076  */
32077   __Pyx_INCREF(((PyObject *)__pyx_v_self));
32078   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
32079   __Pyx_GOTREF(__pyx_v_info->obj);
32080   __Pyx_DECREF(__pyx_v_info->obj);
32081   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
32082 
32083   /* "View.MemoryView":185
32084  *
32085  *     @cname('getbuffer')
32086  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
32087  *         cdef int bufmode = -1
32088  *         if self.mode == u"c":
32089  */
32090 
32091   /* function exit code */
32092   __pyx_r = 0;
32093   goto __pyx_L0;
32094   __pyx_L1_error:;
32095   __Pyx_XDECREF(__pyx_t_3);
32096   __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32097   __pyx_r = -1;
32098   if (__pyx_v_info->obj != NULL) {
32099     __Pyx_GOTREF(__pyx_v_info->obj);
32100     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
32101   }
32102   goto __pyx_L2;
32103   __pyx_L0:;
32104   if (__pyx_v_info->obj == Py_None) {
32105     __Pyx_GOTREF(__pyx_v_info->obj);
32106     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
32107   }
32108   __pyx_L2:;
32109   __Pyx_RefNannyFinishContext();
32110   return __pyx_r;
32111 }
32112 
32113 /* "View.MemoryView":211
32114  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
32115  *
32116  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
32117  *         if self.callback_free_data != NULL:
32118  *             self.callback_free_data(self.data)
32119  */
32120 
32121 /* Python wrapper */
32122 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_array___dealloc__(PyObject * __pyx_v_self)32123 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
32124   __Pyx_RefNannyDeclarations
32125   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
32126   __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
32127 
32128   /* function exit code */
32129   __Pyx_RefNannyFinishContext();
32130 }
32131 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj * __pyx_v_self)32132 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
32133   __Pyx_RefNannyDeclarations
32134   int __pyx_t_1;
32135   __Pyx_RefNannySetupContext("__dealloc__", 0);
32136 
32137   /* "View.MemoryView":212
32138  *
32139  *     def __dealloc__(array self):
32140  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
32141  *             self.callback_free_data(self.data)
32142  *         elif self.free_data:
32143  */
32144   __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
32145   if (__pyx_t_1) {
32146 
32147     /* "View.MemoryView":213
32148  *     def __dealloc__(array self):
32149  *         if self.callback_free_data != NULL:
32150  *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
32151  *         elif self.free_data:
32152  *             if self.dtype_is_object:
32153  */
32154     __pyx_v_self->callback_free_data(__pyx_v_self->data);
32155 
32156     /* "View.MemoryView":212
32157  *
32158  *     def __dealloc__(array self):
32159  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
32160  *             self.callback_free_data(self.data)
32161  *         elif self.free_data:
32162  */
32163     goto __pyx_L3;
32164   }
32165 
32166   /* "View.MemoryView":214
32167  *         if self.callback_free_data != NULL:
32168  *             self.callback_free_data(self.data)
32169  *         elif self.free_data:             # <<<<<<<<<<<<<<
32170  *             if self.dtype_is_object:
32171  *                 refcount_objects_in_slice(self.data, self._shape,
32172  */
32173   __pyx_t_1 = (__pyx_v_self->free_data != 0);
32174   if (__pyx_t_1) {
32175 
32176     /* "View.MemoryView":215
32177  *             self.callback_free_data(self.data)
32178  *         elif self.free_data:
32179  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
32180  *                 refcount_objects_in_slice(self.data, self._shape,
32181  *                                           self._strides, self.ndim, False)
32182  */
32183     __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
32184     if (__pyx_t_1) {
32185 
32186       /* "View.MemoryView":216
32187  *         elif self.free_data:
32188  *             if self.dtype_is_object:
32189  *                 refcount_objects_in_slice(self.data, self._shape,             # <<<<<<<<<<<<<<
32190  *                                           self._strides, self.ndim, False)
32191  *             free(self.data)
32192  */
32193       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
32194 
32195       /* "View.MemoryView":215
32196  *             self.callback_free_data(self.data)
32197  *         elif self.free_data:
32198  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
32199  *                 refcount_objects_in_slice(self.data, self._shape,
32200  *                                           self._strides, self.ndim, False)
32201  */
32202     }
32203 
32204     /* "View.MemoryView":218
32205  *                 refcount_objects_in_slice(self.data, self._shape,
32206  *                                           self._strides, self.ndim, False)
32207  *             free(self.data)             # <<<<<<<<<<<<<<
32208  *         PyObject_Free(self._shape)
32209  *
32210  */
32211     free(__pyx_v_self->data);
32212 
32213     /* "View.MemoryView":214
32214  *         if self.callback_free_data != NULL:
32215  *             self.callback_free_data(self.data)
32216  *         elif self.free_data:             # <<<<<<<<<<<<<<
32217  *             if self.dtype_is_object:
32218  *                 refcount_objects_in_slice(self.data, self._shape,
32219  */
32220   }
32221   __pyx_L3:;
32222 
32223   /* "View.MemoryView":219
32224  *                                           self._strides, self.ndim, False)
32225  *             free(self.data)
32226  *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
32227  *
32228  *     @property
32229  */
32230   PyObject_Free(__pyx_v_self->_shape);
32231 
32232   /* "View.MemoryView":211
32233  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
32234  *
32235  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
32236  *         if self.callback_free_data != NULL:
32237  *             self.callback_free_data(self.data)
32238  */
32239 
32240   /* function exit code */
32241   __Pyx_RefNannyFinishContext();
32242 }
32243 
32244 /* "View.MemoryView":222
32245  *
32246  *     @property
32247  *     def memview(self):             # <<<<<<<<<<<<<<
32248  *         return self.get_memview()
32249  *
32250  */
32251 
32252 /* Python wrapper */
32253 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)32254 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
32255   PyObject *__pyx_r = 0;
32256   __Pyx_RefNannyDeclarations
32257   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32258   __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
32259 
32260   /* function exit code */
32261   __Pyx_RefNannyFinishContext();
32262   return __pyx_r;
32263 }
32264 
__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj * __pyx_v_self)32265 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
32266   PyObject *__pyx_r = NULL;
32267   __Pyx_RefNannyDeclarations
32268   PyObject *__pyx_t_1 = NULL;
32269   __Pyx_RefNannySetupContext("__get__", 0);
32270 
32271   /* "View.MemoryView":223
32272  *     @property
32273  *     def memview(self):
32274  *         return self.get_memview()             # <<<<<<<<<<<<<<
32275  *
32276  *     @cname('get_memview')
32277  */
32278   __Pyx_XDECREF(__pyx_r);
32279   __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error)
32280   __Pyx_GOTREF(__pyx_t_1);
32281   __pyx_r = __pyx_t_1;
32282   __pyx_t_1 = 0;
32283   goto __pyx_L0;
32284 
32285   /* "View.MemoryView":222
32286  *
32287  *     @property
32288  *     def memview(self):             # <<<<<<<<<<<<<<
32289  *         return self.get_memview()
32290  *
32291  */
32292 
32293   /* function exit code */
32294   __pyx_L1_error:;
32295   __Pyx_XDECREF(__pyx_t_1);
32296   __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32297   __pyx_r = NULL;
32298   __pyx_L0:;
32299   __Pyx_XGIVEREF(__pyx_r);
32300   __Pyx_RefNannyFinishContext();
32301   return __pyx_r;
32302 }
32303 
32304 /* "View.MemoryView":226
32305  *
32306  *     @cname('get_memview')
32307  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
32308  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
32309  *         return  memoryview(self, flags, self.dtype_is_object)
32310  */
32311 
__pyx_array_get_memview(struct __pyx_array_obj * __pyx_v_self)32312 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
32313   int __pyx_v_flags;
32314   PyObject *__pyx_r = NULL;
32315   __Pyx_RefNannyDeclarations
32316   PyObject *__pyx_t_1 = NULL;
32317   PyObject *__pyx_t_2 = NULL;
32318   PyObject *__pyx_t_3 = NULL;
32319   __Pyx_RefNannySetupContext("get_memview", 0);
32320 
32321   /* "View.MemoryView":227
32322  *     @cname('get_memview')
32323  *     cdef get_memview(self):
32324  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
32325  *         return  memoryview(self, flags, self.dtype_is_object)
32326  *
32327  */
32328   __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
32329 
32330   /* "View.MemoryView":228
32331  *     cdef get_memview(self):
32332  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
32333  *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
32334  *
32335  *     def __len__(self):
32336  */
32337   __Pyx_XDECREF(__pyx_r);
32338   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)
32339   __Pyx_GOTREF(__pyx_t_1);
32340   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)
32341   __Pyx_GOTREF(__pyx_t_2);
32342   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error)
32343   __Pyx_GOTREF(__pyx_t_3);
32344   __Pyx_INCREF(((PyObject *)__pyx_v_self));
32345   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
32346   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
32347   __Pyx_GIVEREF(__pyx_t_1);
32348   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
32349   __Pyx_GIVEREF(__pyx_t_2);
32350   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
32351   __pyx_t_1 = 0;
32352   __pyx_t_2 = 0;
32353   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)
32354   __Pyx_GOTREF(__pyx_t_2);
32355   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
32356   __pyx_r = __pyx_t_2;
32357   __pyx_t_2 = 0;
32358   goto __pyx_L0;
32359 
32360   /* "View.MemoryView":226
32361  *
32362  *     @cname('get_memview')
32363  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
32364  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
32365  *         return  memoryview(self, flags, self.dtype_is_object)
32366  */
32367 
32368   /* function exit code */
32369   __pyx_L1_error:;
32370   __Pyx_XDECREF(__pyx_t_1);
32371   __Pyx_XDECREF(__pyx_t_2);
32372   __Pyx_XDECREF(__pyx_t_3);
32373   __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
32374   __pyx_r = 0;
32375   __pyx_L0:;
32376   __Pyx_XGIVEREF(__pyx_r);
32377   __Pyx_RefNannyFinishContext();
32378   return __pyx_r;
32379 }
32380 
32381 /* "View.MemoryView":230
32382  *         return  memoryview(self, flags, self.dtype_is_object)
32383  *
32384  *     def __len__(self):             # <<<<<<<<<<<<<<
32385  *         return self._shape[0]
32386  *
32387  */
32388 
32389 /* Python wrapper */
32390 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
__pyx_array___len__(PyObject * __pyx_v_self)32391 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
32392   Py_ssize_t __pyx_r;
32393   __Pyx_RefNannyDeclarations
32394   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
32395   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
32396 
32397   /* function exit code */
32398   __Pyx_RefNannyFinishContext();
32399   return __pyx_r;
32400 }
32401 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj * __pyx_v_self)32402 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
32403   Py_ssize_t __pyx_r;
32404   __Pyx_RefNannyDeclarations
32405   __Pyx_RefNannySetupContext("__len__", 0);
32406 
32407   /* "View.MemoryView":231
32408  *
32409  *     def __len__(self):
32410  *         return self._shape[0]             # <<<<<<<<<<<<<<
32411  *
32412  *     def __getattr__(self, attr):
32413  */
32414   __pyx_r = (__pyx_v_self->_shape[0]);
32415   goto __pyx_L0;
32416 
32417   /* "View.MemoryView":230
32418  *         return  memoryview(self, flags, self.dtype_is_object)
32419  *
32420  *     def __len__(self):             # <<<<<<<<<<<<<<
32421  *         return self._shape[0]
32422  *
32423  */
32424 
32425   /* function exit code */
32426   __pyx_L0:;
32427   __Pyx_RefNannyFinishContext();
32428   return __pyx_r;
32429 }
32430 
32431 /* "View.MemoryView":233
32432  *         return self._shape[0]
32433  *
32434  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
32435  *         return getattr(self.memview, attr)
32436  *
32437  */
32438 
32439 /* Python wrapper */
32440 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)32441 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
32442   PyObject *__pyx_r = 0;
32443   __Pyx_RefNannyDeclarations
32444   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
32445   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
32446 
32447   /* function exit code */
32448   __Pyx_RefNannyFinishContext();
32449   return __pyx_r;
32450 }
32451 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj * __pyx_v_self,PyObject * __pyx_v_attr)32452 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
32453   PyObject *__pyx_r = NULL;
32454   __Pyx_RefNannyDeclarations
32455   PyObject *__pyx_t_1 = NULL;
32456   PyObject *__pyx_t_2 = NULL;
32457   __Pyx_RefNannySetupContext("__getattr__", 0);
32458 
32459   /* "View.MemoryView":234
32460  *
32461  *     def __getattr__(self, attr):
32462  *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
32463  *
32464  *     def __getitem__(self, item):
32465  */
32466   __Pyx_XDECREF(__pyx_r);
32467   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error)
32468   __Pyx_GOTREF(__pyx_t_1);
32469   __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error)
32470   __Pyx_GOTREF(__pyx_t_2);
32471   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32472   __pyx_r = __pyx_t_2;
32473   __pyx_t_2 = 0;
32474   goto __pyx_L0;
32475 
32476   /* "View.MemoryView":233
32477  *         return self._shape[0]
32478  *
32479  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
32480  *         return getattr(self.memview, attr)
32481  *
32482  */
32483 
32484   /* function exit code */
32485   __pyx_L1_error:;
32486   __Pyx_XDECREF(__pyx_t_1);
32487   __Pyx_XDECREF(__pyx_t_2);
32488   __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32489   __pyx_r = NULL;
32490   __pyx_L0:;
32491   __Pyx_XGIVEREF(__pyx_r);
32492   __Pyx_RefNannyFinishContext();
32493   return __pyx_r;
32494 }
32495 
32496 /* "View.MemoryView":236
32497  *         return getattr(self.memview, attr)
32498  *
32499  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
32500  *         return self.memview[item]
32501  *
32502  */
32503 
32504 /* Python wrapper */
32505 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)32506 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
32507   PyObject *__pyx_r = 0;
32508   __Pyx_RefNannyDeclarations
32509   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
32510   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
32511 
32512   /* function exit code */
32513   __Pyx_RefNannyFinishContext();
32514   return __pyx_r;
32515 }
32516 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj * __pyx_v_self,PyObject * __pyx_v_item)32517 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
32518   PyObject *__pyx_r = NULL;
32519   __Pyx_RefNannyDeclarations
32520   PyObject *__pyx_t_1 = NULL;
32521   PyObject *__pyx_t_2 = NULL;
32522   __Pyx_RefNannySetupContext("__getitem__", 0);
32523 
32524   /* "View.MemoryView":237
32525  *
32526  *     def __getitem__(self, item):
32527  *         return self.memview[item]             # <<<<<<<<<<<<<<
32528  *
32529  *     def __setitem__(self, item, value):
32530  */
32531   __Pyx_XDECREF(__pyx_r);
32532   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error)
32533   __Pyx_GOTREF(__pyx_t_1);
32534   __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error)
32535   __Pyx_GOTREF(__pyx_t_2);
32536   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32537   __pyx_r = __pyx_t_2;
32538   __pyx_t_2 = 0;
32539   goto __pyx_L0;
32540 
32541   /* "View.MemoryView":236
32542  *         return getattr(self.memview, attr)
32543  *
32544  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
32545  *         return self.memview[item]
32546  *
32547  */
32548 
32549   /* function exit code */
32550   __pyx_L1_error:;
32551   __Pyx_XDECREF(__pyx_t_1);
32552   __Pyx_XDECREF(__pyx_t_2);
32553   __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32554   __pyx_r = NULL;
32555   __pyx_L0:;
32556   __Pyx_XGIVEREF(__pyx_r);
32557   __Pyx_RefNannyFinishContext();
32558   return __pyx_r;
32559 }
32560 
32561 /* "View.MemoryView":239
32562  *         return self.memview[item]
32563  *
32564  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
32565  *         self.memview[item] = value
32566  *
32567  */
32568 
32569 /* Python wrapper */
32570 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)32571 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
32572   int __pyx_r;
32573   __Pyx_RefNannyDeclarations
32574   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
32575   __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));
32576 
32577   /* function exit code */
32578   __Pyx_RefNannyFinishContext();
32579   return __pyx_r;
32580 }
32581 
__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)32582 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) {
32583   int __pyx_r;
32584   __Pyx_RefNannyDeclarations
32585   PyObject *__pyx_t_1 = NULL;
32586   __Pyx_RefNannySetupContext("__setitem__", 0);
32587 
32588   /* "View.MemoryView":240
32589  *
32590  *     def __setitem__(self, item, value):
32591  *         self.memview[item] = value             # <<<<<<<<<<<<<<
32592  *
32593  *
32594  */
32595   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 240, __pyx_L1_error)
32596   __Pyx_GOTREF(__pyx_t_1);
32597   if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 240, __pyx_L1_error)
32598   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32599 
32600   /* "View.MemoryView":239
32601  *         return self.memview[item]
32602  *
32603  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
32604  *         self.memview[item] = value
32605  *
32606  */
32607 
32608   /* function exit code */
32609   __pyx_r = 0;
32610   goto __pyx_L0;
32611   __pyx_L1_error:;
32612   __Pyx_XDECREF(__pyx_t_1);
32613   __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32614   __pyx_r = -1;
32615   __pyx_L0:;
32616   __Pyx_RefNannyFinishContext();
32617   return __pyx_r;
32618 }
32619 
32620 /* "(tree fragment)":1
32621  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
32622  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
32623  * def __setstate_cython__(self, __pyx_state):
32624  */
32625 
32626 /* Python wrapper */
32627 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)32628 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
32629   PyObject *__pyx_r = 0;
32630   __Pyx_RefNannyDeclarations
32631   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
32632   __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
32633 
32634   /* function exit code */
32635   __Pyx_RefNannyFinishContext();
32636   return __pyx_r;
32637 }
32638 
__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj * __pyx_v_self)32639 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
32640   PyObject *__pyx_r = NULL;
32641   __Pyx_RefNannyDeclarations
32642   PyObject *__pyx_t_1 = NULL;
32643   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
32644 
32645   /* "(tree fragment)":2
32646  * def __reduce_cython__(self):
32647  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
32648  * def __setstate_cython__(self, __pyx_state):
32649  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
32650  */
32651   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
32652   __Pyx_GOTREF(__pyx_t_1);
32653   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
32654   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32655   __PYX_ERR(1, 2, __pyx_L1_error)
32656 
32657   /* "(tree fragment)":1
32658  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
32659  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
32660  * def __setstate_cython__(self, __pyx_state):
32661  */
32662 
32663   /* function exit code */
32664   __pyx_L1_error:;
32665   __Pyx_XDECREF(__pyx_t_1);
32666   __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32667   __pyx_r = NULL;
32668   __Pyx_XGIVEREF(__pyx_r);
32669   __Pyx_RefNannyFinishContext();
32670   return __pyx_r;
32671 }
32672 
32673 /* "(tree fragment)":3
32674  * def __reduce_cython__(self):
32675  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
32676  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
32677  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
32678  */
32679 
32680 /* Python wrapper */
32681 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)32682 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
32683   PyObject *__pyx_r = 0;
32684   __Pyx_RefNannyDeclarations
32685   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
32686   __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
32687 
32688   /* function exit code */
32689   __Pyx_RefNannyFinishContext();
32690   return __pyx_r;
32691 }
32692 
__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)32693 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) {
32694   PyObject *__pyx_r = NULL;
32695   __Pyx_RefNannyDeclarations
32696   PyObject *__pyx_t_1 = NULL;
32697   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
32698 
32699   /* "(tree fragment)":4
32700  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
32701  * def __setstate_cython__(self, __pyx_state):
32702  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
32703  */
32704   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
32705   __Pyx_GOTREF(__pyx_t_1);
32706   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
32707   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32708   __PYX_ERR(1, 4, __pyx_L1_error)
32709 
32710   /* "(tree fragment)":3
32711  * def __reduce_cython__(self):
32712  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
32713  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
32714  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
32715  */
32716 
32717   /* function exit code */
32718   __pyx_L1_error:;
32719   __Pyx_XDECREF(__pyx_t_1);
32720   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32721   __pyx_r = NULL;
32722   __Pyx_XGIVEREF(__pyx_r);
32723   __Pyx_RefNannyFinishContext();
32724   return __pyx_r;
32725 }
32726 
32727 /* "View.MemoryView":244
32728  *
32729  * @cname("__pyx_array_new")
32730  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
32731  *                           char *mode, char *buf):
32732  *     cdef array result
32733  */
32734 
__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)32735 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) {
32736   struct __pyx_array_obj *__pyx_v_result = 0;
32737   struct __pyx_array_obj *__pyx_r = NULL;
32738   __Pyx_RefNannyDeclarations
32739   int __pyx_t_1;
32740   PyObject *__pyx_t_2 = NULL;
32741   PyObject *__pyx_t_3 = NULL;
32742   PyObject *__pyx_t_4 = NULL;
32743   PyObject *__pyx_t_5 = NULL;
32744   __Pyx_RefNannySetupContext("array_cwrapper", 0);
32745 
32746   /* "View.MemoryView":248
32747  *     cdef array result
32748  *
32749  *     if buf == NULL:             # <<<<<<<<<<<<<<
32750  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
32751  *     else:
32752  */
32753   __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
32754   if (__pyx_t_1) {
32755 
32756     /* "View.MemoryView":249
32757  *
32758  *     if buf == NULL:
32759  *         result = array(shape, itemsize, format, mode.decode('ASCII'))             # <<<<<<<<<<<<<<
32760  *     else:
32761  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
32762  */
32763     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 249, __pyx_L1_error)
32764     __Pyx_GOTREF(__pyx_t_2);
32765     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error)
32766     __Pyx_GOTREF(__pyx_t_3);
32767     __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(1, 249, __pyx_L1_error)
32768     __Pyx_GOTREF(__pyx_t_4);
32769     __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 249, __pyx_L1_error)
32770     __Pyx_GOTREF(__pyx_t_5);
32771     __Pyx_INCREF(__pyx_v_shape);
32772     __Pyx_GIVEREF(__pyx_v_shape);
32773     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
32774     __Pyx_GIVEREF(__pyx_t_2);
32775     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
32776     __Pyx_GIVEREF(__pyx_t_3);
32777     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
32778     __Pyx_GIVEREF(__pyx_t_4);
32779     PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
32780     __pyx_t_2 = 0;
32781     __pyx_t_3 = 0;
32782     __pyx_t_4 = 0;
32783     __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error)
32784     __Pyx_GOTREF(__pyx_t_4);
32785     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
32786     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
32787     __pyx_t_4 = 0;
32788 
32789     /* "View.MemoryView":248
32790  *     cdef array result
32791  *
32792  *     if buf == NULL:             # <<<<<<<<<<<<<<
32793  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
32794  *     else:
32795  */
32796     goto __pyx_L3;
32797   }
32798 
32799   /* "View.MemoryView":251
32800  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
32801  *     else:
32802  *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
32803  *                        allocate_buffer=False)
32804  *         result.data = buf
32805  */
32806   /*else*/ {
32807     __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error)
32808     __Pyx_GOTREF(__pyx_t_4);
32809     __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)
32810     __Pyx_GOTREF(__pyx_t_5);
32811     __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(1, 251, __pyx_L1_error)
32812     __Pyx_GOTREF(__pyx_t_3);
32813     __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error)
32814     __Pyx_GOTREF(__pyx_t_2);
32815     __Pyx_INCREF(__pyx_v_shape);
32816     __Pyx_GIVEREF(__pyx_v_shape);
32817     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
32818     __Pyx_GIVEREF(__pyx_t_4);
32819     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
32820     __Pyx_GIVEREF(__pyx_t_5);
32821     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
32822     __Pyx_GIVEREF(__pyx_t_3);
32823     PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
32824     __pyx_t_4 = 0;
32825     __pyx_t_5 = 0;
32826     __pyx_t_3 = 0;
32827 
32828     /* "View.MemoryView":252
32829  *     else:
32830  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
32831  *                        allocate_buffer=False)             # <<<<<<<<<<<<<<
32832  *         result.data = buf
32833  *
32834  */
32835     __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)
32836     __Pyx_GOTREF(__pyx_t_3);
32837     if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 252, __pyx_L1_error)
32838 
32839     /* "View.MemoryView":251
32840  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
32841  *     else:
32842  *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
32843  *                        allocate_buffer=False)
32844  *         result.data = buf
32845  */
32846     __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)
32847     __Pyx_GOTREF(__pyx_t_5);
32848     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32849     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
32850     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
32851     __pyx_t_5 = 0;
32852 
32853     /* "View.MemoryView":253
32854  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
32855  *                        allocate_buffer=False)
32856  *         result.data = buf             # <<<<<<<<<<<<<<
32857  *
32858  *     return result
32859  */
32860     __pyx_v_result->data = __pyx_v_buf;
32861   }
32862   __pyx_L3:;
32863 
32864   /* "View.MemoryView":255
32865  *         result.data = buf
32866  *
32867  *     return result             # <<<<<<<<<<<<<<
32868  *
32869  *
32870  */
32871   __Pyx_XDECREF(((PyObject *)__pyx_r));
32872   __Pyx_INCREF(((PyObject *)__pyx_v_result));
32873   __pyx_r = __pyx_v_result;
32874   goto __pyx_L0;
32875 
32876   /* "View.MemoryView":244
32877  *
32878  * @cname("__pyx_array_new")
32879  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
32880  *                           char *mode, char *buf):
32881  *     cdef array result
32882  */
32883 
32884   /* function exit code */
32885   __pyx_L1_error:;
32886   __Pyx_XDECREF(__pyx_t_2);
32887   __Pyx_XDECREF(__pyx_t_3);
32888   __Pyx_XDECREF(__pyx_t_4);
32889   __Pyx_XDECREF(__pyx_t_5);
32890   __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
32891   __pyx_r = 0;
32892   __pyx_L0:;
32893   __Pyx_XDECREF((PyObject *)__pyx_v_result);
32894   __Pyx_XGIVEREF((PyObject *)__pyx_r);
32895   __Pyx_RefNannyFinishContext();
32896   return __pyx_r;
32897 }
32898 
32899 /* "View.MemoryView":281
32900  * cdef class Enum(object):
32901  *     cdef object name
32902  *     def __init__(self, name):             # <<<<<<<<<<<<<<
32903  *         self.name = name
32904  *     def __repr__(self):
32905  */
32906 
32907 /* Python wrapper */
32908 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)32909 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32910   PyObject *__pyx_v_name = 0;
32911   int __pyx_r;
32912   __Pyx_RefNannyDeclarations
32913   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
32914   {
32915     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
32916     PyObject* values[1] = {0};
32917     if (unlikely(__pyx_kwds)) {
32918       Py_ssize_t kw_args;
32919       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
32920       switch (pos_args) {
32921         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32922         CYTHON_FALLTHROUGH;
32923         case  0: break;
32924         default: goto __pyx_L5_argtuple_error;
32925       }
32926       kw_args = PyDict_Size(__pyx_kwds);
32927       switch (pos_args) {
32928         case  0:
32929         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
32930         else goto __pyx_L5_argtuple_error;
32931       }
32932       if (unlikely(kw_args > 0)) {
32933         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 281, __pyx_L3_error)
32934       }
32935     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
32936       goto __pyx_L5_argtuple_error;
32937     } else {
32938       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32939     }
32940     __pyx_v_name = values[0];
32941   }
32942   goto __pyx_L4_argument_unpacking_done;
32943   __pyx_L5_argtuple_error:;
32944   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 281, __pyx_L3_error)
32945   __pyx_L3_error:;
32946   __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32947   __Pyx_RefNannyFinishContext();
32948   return -1;
32949   __pyx_L4_argument_unpacking_done:;
32950   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
32951 
32952   /* function exit code */
32953   __Pyx_RefNannyFinishContext();
32954   return __pyx_r;
32955 }
32956 
__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj * __pyx_v_self,PyObject * __pyx_v_name)32957 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
32958   int __pyx_r;
32959   __Pyx_RefNannyDeclarations
32960   __Pyx_RefNannySetupContext("__init__", 0);
32961 
32962   /* "View.MemoryView":282
32963  *     cdef object name
32964  *     def __init__(self, name):
32965  *         self.name = name             # <<<<<<<<<<<<<<
32966  *     def __repr__(self):
32967  *         return self.name
32968  */
32969   __Pyx_INCREF(__pyx_v_name);
32970   __Pyx_GIVEREF(__pyx_v_name);
32971   __Pyx_GOTREF(__pyx_v_self->name);
32972   __Pyx_DECREF(__pyx_v_self->name);
32973   __pyx_v_self->name = __pyx_v_name;
32974 
32975   /* "View.MemoryView":281
32976  * cdef class Enum(object):
32977  *     cdef object name
32978  *     def __init__(self, name):             # <<<<<<<<<<<<<<
32979  *         self.name = name
32980  *     def __repr__(self):
32981  */
32982 
32983   /* function exit code */
32984   __pyx_r = 0;
32985   __Pyx_RefNannyFinishContext();
32986   return __pyx_r;
32987 }
32988 
32989 /* "View.MemoryView":283
32990  *     def __init__(self, name):
32991  *         self.name = name
32992  *     def __repr__(self):             # <<<<<<<<<<<<<<
32993  *         return self.name
32994  *
32995  */
32996 
32997 /* Python wrapper */
32998 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
__pyx_MemviewEnum___repr__(PyObject * __pyx_v_self)32999 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
33000   PyObject *__pyx_r = 0;
33001   __Pyx_RefNannyDeclarations
33002   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
33003   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
33004 
33005   /* function exit code */
33006   __Pyx_RefNannyFinishContext();
33007   return __pyx_r;
33008 }
33009 
__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj * __pyx_v_self)33010 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
33011   PyObject *__pyx_r = NULL;
33012   __Pyx_RefNannyDeclarations
33013   __Pyx_RefNannySetupContext("__repr__", 0);
33014 
33015   /* "View.MemoryView":284
33016  *         self.name = name
33017  *     def __repr__(self):
33018  *         return self.name             # <<<<<<<<<<<<<<
33019  *
33020  * cdef generic = Enum("<strided and direct or indirect>")
33021  */
33022   __Pyx_XDECREF(__pyx_r);
33023   __Pyx_INCREF(__pyx_v_self->name);
33024   __pyx_r = __pyx_v_self->name;
33025   goto __pyx_L0;
33026 
33027   /* "View.MemoryView":283
33028  *     def __init__(self, name):
33029  *         self.name = name
33030  *     def __repr__(self):             # <<<<<<<<<<<<<<
33031  *         return self.name
33032  *
33033  */
33034 
33035   /* function exit code */
33036   __pyx_L0:;
33037   __Pyx_XGIVEREF(__pyx_r);
33038   __Pyx_RefNannyFinishContext();
33039   return __pyx_r;
33040 }
33041 
33042 /* "(tree fragment)":1
33043  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
33044  *     cdef tuple state
33045  *     cdef object _dict
33046  */
33047 
33048 /* Python wrapper */
33049 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)33050 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
33051   PyObject *__pyx_r = 0;
33052   __Pyx_RefNannyDeclarations
33053   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
33054   __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
33055 
33056   /* function exit code */
33057   __Pyx_RefNannyFinishContext();
33058   return __pyx_r;
33059 }
33060 
__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj * __pyx_v_self)33061 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
33062   PyObject *__pyx_v_state = 0;
33063   PyObject *__pyx_v__dict = 0;
33064   int __pyx_v_use_setstate;
33065   PyObject *__pyx_r = NULL;
33066   __Pyx_RefNannyDeclarations
33067   PyObject *__pyx_t_1 = NULL;
33068   int __pyx_t_2;
33069   int __pyx_t_3;
33070   PyObject *__pyx_t_4 = NULL;
33071   PyObject *__pyx_t_5 = NULL;
33072   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
33073 
33074   /* "(tree fragment)":5
33075  *     cdef object _dict
33076  *     cdef bint use_setstate
33077  *     state = (self.name,)             # <<<<<<<<<<<<<<
33078  *     _dict = getattr(self, '__dict__', None)
33079  *     if _dict is not None:
33080  */
33081   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
33082   __Pyx_GOTREF(__pyx_t_1);
33083   __Pyx_INCREF(__pyx_v_self->name);
33084   __Pyx_GIVEREF(__pyx_v_self->name);
33085   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
33086   __pyx_v_state = ((PyObject*)__pyx_t_1);
33087   __pyx_t_1 = 0;
33088 
33089   /* "(tree fragment)":6
33090  *     cdef bint use_setstate
33091  *     state = (self.name,)
33092  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
33093  *     if _dict is not None:
33094  *         state += (_dict,)
33095  */
33096   __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
33097   __Pyx_GOTREF(__pyx_t_1);
33098   __pyx_v__dict = __pyx_t_1;
33099   __pyx_t_1 = 0;
33100 
33101   /* "(tree fragment)":7
33102  *     state = (self.name,)
33103  *     _dict = getattr(self, '__dict__', None)
33104  *     if _dict is not None:             # <<<<<<<<<<<<<<
33105  *         state += (_dict,)
33106  *         use_setstate = True
33107  */
33108   __pyx_t_2 = (__pyx_v__dict != Py_None);
33109   __pyx_t_3 = (__pyx_t_2 != 0);
33110   if (__pyx_t_3) {
33111 
33112     /* "(tree fragment)":8
33113  *     _dict = getattr(self, '__dict__', None)
33114  *     if _dict is not None:
33115  *         state += (_dict,)             # <<<<<<<<<<<<<<
33116  *         use_setstate = True
33117  *     else:
33118  */
33119     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
33120     __Pyx_GOTREF(__pyx_t_1);
33121     __Pyx_INCREF(__pyx_v__dict);
33122     __Pyx_GIVEREF(__pyx_v__dict);
33123     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
33124     __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
33125     __Pyx_GOTREF(__pyx_t_4);
33126     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
33127     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
33128     __pyx_t_4 = 0;
33129 
33130     /* "(tree fragment)":9
33131  *     if _dict is not None:
33132  *         state += (_dict,)
33133  *         use_setstate = True             # <<<<<<<<<<<<<<
33134  *     else:
33135  *         use_setstate = self.name is not None
33136  */
33137     __pyx_v_use_setstate = 1;
33138 
33139     /* "(tree fragment)":7
33140  *     state = (self.name,)
33141  *     _dict = getattr(self, '__dict__', None)
33142  *     if _dict is not None:             # <<<<<<<<<<<<<<
33143  *         state += (_dict,)
33144  *         use_setstate = True
33145  */
33146     goto __pyx_L3;
33147   }
33148 
33149   /* "(tree fragment)":11
33150  *         use_setstate = True
33151  *     else:
33152  *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
33153  *     if use_setstate:
33154  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
33155  */
33156   /*else*/ {
33157     __pyx_t_3 = (__pyx_v_self->name != Py_None);
33158     __pyx_v_use_setstate = __pyx_t_3;
33159   }
33160   __pyx_L3:;
33161 
33162   /* "(tree fragment)":12
33163  *     else:
33164  *         use_setstate = self.name is not None
33165  *     if use_setstate:             # <<<<<<<<<<<<<<
33166  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
33167  *     else:
33168  */
33169   __pyx_t_3 = (__pyx_v_use_setstate != 0);
33170   if (__pyx_t_3) {
33171 
33172     /* "(tree fragment)":13
33173  *         use_setstate = self.name is not None
33174  *     if use_setstate:
33175  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state             # <<<<<<<<<<<<<<
33176  *     else:
33177  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
33178  */
33179     __Pyx_XDECREF(__pyx_r);
33180     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
33181     __Pyx_GOTREF(__pyx_t_4);
33182     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
33183     __Pyx_GOTREF(__pyx_t_1);
33184     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
33185     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
33186     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
33187     __Pyx_INCREF(__pyx_int_184977713);
33188     __Pyx_GIVEREF(__pyx_int_184977713);
33189     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
33190     __Pyx_INCREF(Py_None);
33191     __Pyx_GIVEREF(Py_None);
33192     PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
33193     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
33194     __Pyx_GOTREF(__pyx_t_5);
33195     __Pyx_GIVEREF(__pyx_t_4);
33196     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
33197     __Pyx_GIVEREF(__pyx_t_1);
33198     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
33199     __Pyx_INCREF(__pyx_v_state);
33200     __Pyx_GIVEREF(__pyx_v_state);
33201     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
33202     __pyx_t_4 = 0;
33203     __pyx_t_1 = 0;
33204     __pyx_r = __pyx_t_5;
33205     __pyx_t_5 = 0;
33206     goto __pyx_L0;
33207 
33208     /* "(tree fragment)":12
33209  *     else:
33210  *         use_setstate = self.name is not None
33211  *     if use_setstate:             # <<<<<<<<<<<<<<
33212  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
33213  *     else:
33214  */
33215   }
33216 
33217   /* "(tree fragment)":15
33218  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
33219  *     else:
33220  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)             # <<<<<<<<<<<<<<
33221  * def __setstate_cython__(self, __pyx_state):
33222  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
33223  */
33224   /*else*/ {
33225     __Pyx_XDECREF(__pyx_r);
33226     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
33227     __Pyx_GOTREF(__pyx_t_5);
33228     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
33229     __Pyx_GOTREF(__pyx_t_1);
33230     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
33231     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
33232     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
33233     __Pyx_INCREF(__pyx_int_184977713);
33234     __Pyx_GIVEREF(__pyx_int_184977713);
33235     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
33236     __Pyx_INCREF(__pyx_v_state);
33237     __Pyx_GIVEREF(__pyx_v_state);
33238     PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
33239     __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
33240     __Pyx_GOTREF(__pyx_t_4);
33241     __Pyx_GIVEREF(__pyx_t_5);
33242     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
33243     __Pyx_GIVEREF(__pyx_t_1);
33244     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
33245     __pyx_t_5 = 0;
33246     __pyx_t_1 = 0;
33247     __pyx_r = __pyx_t_4;
33248     __pyx_t_4 = 0;
33249     goto __pyx_L0;
33250   }
33251 
33252   /* "(tree fragment)":1
33253  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
33254  *     cdef tuple state
33255  *     cdef object _dict
33256  */
33257 
33258   /* function exit code */
33259   __pyx_L1_error:;
33260   __Pyx_XDECREF(__pyx_t_1);
33261   __Pyx_XDECREF(__pyx_t_4);
33262   __Pyx_XDECREF(__pyx_t_5);
33263   __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33264   __pyx_r = NULL;
33265   __pyx_L0:;
33266   __Pyx_XDECREF(__pyx_v_state);
33267   __Pyx_XDECREF(__pyx_v__dict);
33268   __Pyx_XGIVEREF(__pyx_r);
33269   __Pyx_RefNannyFinishContext();
33270   return __pyx_r;
33271 }
33272 
33273 /* "(tree fragment)":16
33274  *     else:
33275  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
33276  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
33277  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
33278  */
33279 
33280 /* Python wrapper */
33281 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)33282 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
33283   PyObject *__pyx_r = 0;
33284   __Pyx_RefNannyDeclarations
33285   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
33286   __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
33287 
33288   /* function exit code */
33289   __Pyx_RefNannyFinishContext();
33290   return __pyx_r;
33291 }
33292 
__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj * __pyx_v_self,PyObject * __pyx_v___pyx_state)33293 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
33294   PyObject *__pyx_r = NULL;
33295   __Pyx_RefNannyDeclarations
33296   PyObject *__pyx_t_1 = NULL;
33297   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
33298 
33299   /* "(tree fragment)":17
33300  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
33301  * def __setstate_cython__(self, __pyx_state):
33302  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
33303  */
33304   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(1, 17, __pyx_L1_error)
33305   __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
33306   __Pyx_GOTREF(__pyx_t_1);
33307   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
33308 
33309   /* "(tree fragment)":16
33310  *     else:
33311  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
33312  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
33313  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
33314  */
33315 
33316   /* function exit code */
33317   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
33318   goto __pyx_L0;
33319   __pyx_L1_error:;
33320   __Pyx_XDECREF(__pyx_t_1);
33321   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33322   __pyx_r = NULL;
33323   __pyx_L0:;
33324   __Pyx_XGIVEREF(__pyx_r);
33325   __Pyx_RefNannyFinishContext();
33326   return __pyx_r;
33327 }
33328 
33329 /* "View.MemoryView":298
33330  *
33331  * @cname('__pyx_align_pointer')
33332  * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
33333  *     "Align pointer memory on a given boundary"
33334  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
33335  */
33336 
__pyx_align_pointer(void * __pyx_v_memory,size_t __pyx_v_alignment)33337 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
33338   Py_intptr_t __pyx_v_aligned_p;
33339   size_t __pyx_v_offset;
33340   void *__pyx_r;
33341   int __pyx_t_1;
33342 
33343   /* "View.MemoryView":300
33344  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
33345  *     "Align pointer memory on a given boundary"
33346  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory             # <<<<<<<<<<<<<<
33347  *     cdef size_t offset
33348  *
33349  */
33350   __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
33351 
33352   /* "View.MemoryView":304
33353  *
33354  *     with cython.cdivision(True):
33355  *         offset = aligned_p % alignment             # <<<<<<<<<<<<<<
33356  *
33357  *     if offset > 0:
33358  */
33359   __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
33360 
33361   /* "View.MemoryView":306
33362  *         offset = aligned_p % alignment
33363  *
33364  *     if offset > 0:             # <<<<<<<<<<<<<<
33365  *         aligned_p += alignment - offset
33366  *
33367  */
33368   __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
33369   if (__pyx_t_1) {
33370 
33371     /* "View.MemoryView":307
33372  *
33373  *     if offset > 0:
33374  *         aligned_p += alignment - offset             # <<<<<<<<<<<<<<
33375  *
33376  *     return <void *> aligned_p
33377  */
33378     __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
33379 
33380     /* "View.MemoryView":306
33381  *         offset = aligned_p % alignment
33382  *
33383  *     if offset > 0:             # <<<<<<<<<<<<<<
33384  *         aligned_p += alignment - offset
33385  *
33386  */
33387   }
33388 
33389   /* "View.MemoryView":309
33390  *         aligned_p += alignment - offset
33391  *
33392  *     return <void *> aligned_p             # <<<<<<<<<<<<<<
33393  *
33394  *
33395  */
33396   __pyx_r = ((void *)__pyx_v_aligned_p);
33397   goto __pyx_L0;
33398 
33399   /* "View.MemoryView":298
33400  *
33401  * @cname('__pyx_align_pointer')
33402  * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
33403  *     "Align pointer memory on a given boundary"
33404  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
33405  */
33406 
33407   /* function exit code */
33408   __pyx_L0:;
33409   return __pyx_r;
33410 }
33411 
33412 /* "View.MemoryView":345
33413  *     cdef __Pyx_TypeInfo *typeinfo
33414  *
33415  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
33416  *         self.obj = obj
33417  *         self.flags = flags
33418  */
33419 
33420 /* Python wrapper */
33421 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)33422 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33423   PyObject *__pyx_v_obj = 0;
33424   int __pyx_v_flags;
33425   int __pyx_v_dtype_is_object;
33426   int __pyx_r;
33427   __Pyx_RefNannyDeclarations
33428   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
33429   {
33430     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
33431     PyObject* values[3] = {0,0,0};
33432     if (unlikely(__pyx_kwds)) {
33433       Py_ssize_t kw_args;
33434       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
33435       switch (pos_args) {
33436         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33437         CYTHON_FALLTHROUGH;
33438         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33439         CYTHON_FALLTHROUGH;
33440         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33441         CYTHON_FALLTHROUGH;
33442         case  0: break;
33443         default: goto __pyx_L5_argtuple_error;
33444       }
33445       kw_args = PyDict_Size(__pyx_kwds);
33446       switch (pos_args) {
33447         case  0:
33448         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
33449         else goto __pyx_L5_argtuple_error;
33450         CYTHON_FALLTHROUGH;
33451         case  1:
33452         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
33453         else {
33454           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 345, __pyx_L3_error)
33455         }
33456         CYTHON_FALLTHROUGH;
33457         case  2:
33458         if (kw_args > 0) {
33459           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
33460           if (value) { values[2] = value; kw_args--; }
33461         }
33462       }
33463       if (unlikely(kw_args > 0)) {
33464         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 345, __pyx_L3_error)
33465       }
33466     } else {
33467       switch (PyTuple_GET_SIZE(__pyx_args)) {
33468         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33469         CYTHON_FALLTHROUGH;
33470         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33471         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33472         break;
33473         default: goto __pyx_L5_argtuple_error;
33474       }
33475     }
33476     __pyx_v_obj = values[0];
33477     __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error)
33478     if (values[2]) {
33479       __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error)
33480     } else {
33481       __pyx_v_dtype_is_object = ((int)0);
33482     }
33483   }
33484   goto __pyx_L4_argument_unpacking_done;
33485   __pyx_L5_argtuple_error:;
33486   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 345, __pyx_L3_error)
33487   __pyx_L3_error:;
33488   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33489   __Pyx_RefNannyFinishContext();
33490   return -1;
33491   __pyx_L4_argument_unpacking_done:;
33492   __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);
33493 
33494   /* function exit code */
33495   __Pyx_RefNannyFinishContext();
33496   return __pyx_r;
33497 }
33498 
__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)33499 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) {
33500   int __pyx_r;
33501   __Pyx_RefNannyDeclarations
33502   int __pyx_t_1;
33503   int __pyx_t_2;
33504   int __pyx_t_3;
33505   int __pyx_t_4;
33506   __Pyx_RefNannySetupContext("__cinit__", 0);
33507 
33508   /* "View.MemoryView":346
33509  *
33510  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
33511  *         self.obj = obj             # <<<<<<<<<<<<<<
33512  *         self.flags = flags
33513  *         if type(self) is memoryview or obj is not None:
33514  */
33515   __Pyx_INCREF(__pyx_v_obj);
33516   __Pyx_GIVEREF(__pyx_v_obj);
33517   __Pyx_GOTREF(__pyx_v_self->obj);
33518   __Pyx_DECREF(__pyx_v_self->obj);
33519   __pyx_v_self->obj = __pyx_v_obj;
33520 
33521   /* "View.MemoryView":347
33522  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
33523  *         self.obj = obj
33524  *         self.flags = flags             # <<<<<<<<<<<<<<
33525  *         if type(self) is memoryview or obj is not None:
33526  *             __Pyx_GetBuffer(obj, &self.view, flags)
33527  */
33528   __pyx_v_self->flags = __pyx_v_flags;
33529 
33530   /* "View.MemoryView":348
33531  *         self.obj = obj
33532  *         self.flags = flags
33533  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
33534  *             __Pyx_GetBuffer(obj, &self.view, flags)
33535  *             if <PyObject *> self.view.obj == NULL:
33536  */
33537   __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
33538   __pyx_t_3 = (__pyx_t_2 != 0);
33539   if (!__pyx_t_3) {
33540   } else {
33541     __pyx_t_1 = __pyx_t_3;
33542     goto __pyx_L4_bool_binop_done;
33543   }
33544   __pyx_t_3 = (__pyx_v_obj != Py_None);
33545   __pyx_t_2 = (__pyx_t_3 != 0);
33546   __pyx_t_1 = __pyx_t_2;
33547   __pyx_L4_bool_binop_done:;
33548   if (__pyx_t_1) {
33549 
33550     /* "View.MemoryView":349
33551  *         self.flags = flags
33552  *         if type(self) is memoryview or obj is not None:
33553  *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
33554  *             if <PyObject *> self.view.obj == NULL:
33555  *                 (<__pyx_buffer *> &self.view).obj = Py_None
33556  */
33557     __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 349, __pyx_L1_error)
33558 
33559     /* "View.MemoryView":350
33560  *         if type(self) is memoryview or obj is not None:
33561  *             __Pyx_GetBuffer(obj, &self.view, flags)
33562  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
33563  *                 (<__pyx_buffer *> &self.view).obj = Py_None
33564  *                 Py_INCREF(Py_None)
33565  */
33566     __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
33567     if (__pyx_t_1) {
33568 
33569       /* "View.MemoryView":351
33570  *             __Pyx_GetBuffer(obj, &self.view, flags)
33571  *             if <PyObject *> self.view.obj == NULL:
33572  *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
33573  *                 Py_INCREF(Py_None)
33574  *
33575  */
33576       ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
33577 
33578       /* "View.MemoryView":352
33579  *             if <PyObject *> self.view.obj == NULL:
33580  *                 (<__pyx_buffer *> &self.view).obj = Py_None
33581  *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
33582  *
33583  *         global __pyx_memoryview_thread_locks_used
33584  */
33585       Py_INCREF(Py_None);
33586 
33587       /* "View.MemoryView":350
33588  *         if type(self) is memoryview or obj is not None:
33589  *             __Pyx_GetBuffer(obj, &self.view, flags)
33590  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
33591  *                 (<__pyx_buffer *> &self.view).obj = Py_None
33592  *                 Py_INCREF(Py_None)
33593  */
33594     }
33595 
33596     /* "View.MemoryView":348
33597  *         self.obj = obj
33598  *         self.flags = flags
33599  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
33600  *             __Pyx_GetBuffer(obj, &self.view, flags)
33601  *             if <PyObject *> self.view.obj == NULL:
33602  */
33603   }
33604 
33605   /* "View.MemoryView":355
33606  *
33607  *         global __pyx_memoryview_thread_locks_used
33608  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
33609  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
33610  *             __pyx_memoryview_thread_locks_used += 1
33611  */
33612   __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
33613   if (__pyx_t_1) {
33614 
33615     /* "View.MemoryView":356
33616  *         global __pyx_memoryview_thread_locks_used
33617  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
33618  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
33619  *             __pyx_memoryview_thread_locks_used += 1
33620  *         if self.lock is NULL:
33621  */
33622     __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
33623 
33624     /* "View.MemoryView":357
33625  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
33626  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
33627  *             __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
33628  *         if self.lock is NULL:
33629  *             self.lock = PyThread_allocate_lock()
33630  */
33631     __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
33632 
33633     /* "View.MemoryView":355
33634  *
33635  *         global __pyx_memoryview_thread_locks_used
33636  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
33637  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
33638  *             __pyx_memoryview_thread_locks_used += 1
33639  */
33640   }
33641 
33642   /* "View.MemoryView":358
33643  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
33644  *             __pyx_memoryview_thread_locks_used += 1
33645  *         if self.lock is NULL:             # <<<<<<<<<<<<<<
33646  *             self.lock = PyThread_allocate_lock()
33647  *             if self.lock is NULL:
33648  */
33649   __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
33650   if (__pyx_t_1) {
33651 
33652     /* "View.MemoryView":359
33653  *             __pyx_memoryview_thread_locks_used += 1
33654  *         if self.lock is NULL:
33655  *             self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
33656  *             if self.lock is NULL:
33657  *                 raise MemoryError
33658  */
33659     __pyx_v_self->lock = PyThread_allocate_lock();
33660 
33661     /* "View.MemoryView":360
33662  *         if self.lock is NULL:
33663  *             self.lock = PyThread_allocate_lock()
33664  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
33665  *                 raise MemoryError
33666  *
33667  */
33668     __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
33669     if (unlikely(__pyx_t_1)) {
33670 
33671       /* "View.MemoryView":361
33672  *             self.lock = PyThread_allocate_lock()
33673  *             if self.lock is NULL:
33674  *                 raise MemoryError             # <<<<<<<<<<<<<<
33675  *
33676  *         if flags & PyBUF_FORMAT:
33677  */
33678       PyErr_NoMemory(); __PYX_ERR(1, 361, __pyx_L1_error)
33679 
33680       /* "View.MemoryView":360
33681  *         if self.lock is NULL:
33682  *             self.lock = PyThread_allocate_lock()
33683  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
33684  *                 raise MemoryError
33685  *
33686  */
33687     }
33688 
33689     /* "View.MemoryView":358
33690  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
33691  *             __pyx_memoryview_thread_locks_used += 1
33692  *         if self.lock is NULL:             # <<<<<<<<<<<<<<
33693  *             self.lock = PyThread_allocate_lock()
33694  *             if self.lock is NULL:
33695  */
33696   }
33697 
33698   /* "View.MemoryView":363
33699  *                 raise MemoryError
33700  *
33701  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
33702  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
33703  *         else:
33704  */
33705   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
33706   if (__pyx_t_1) {
33707 
33708     /* "View.MemoryView":364
33709  *
33710  *         if flags & PyBUF_FORMAT:
33711  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
33712  *         else:
33713  *             self.dtype_is_object = dtype_is_object
33714  */
33715     __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
33716     if (__pyx_t_2) {
33717     } else {
33718       __pyx_t_1 = __pyx_t_2;
33719       goto __pyx_L11_bool_binop_done;
33720     }
33721     __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
33722     __pyx_t_1 = __pyx_t_2;
33723     __pyx_L11_bool_binop_done:;
33724     __pyx_v_self->dtype_is_object = __pyx_t_1;
33725 
33726     /* "View.MemoryView":363
33727  *                 raise MemoryError
33728  *
33729  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
33730  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
33731  *         else:
33732  */
33733     goto __pyx_L10;
33734   }
33735 
33736   /* "View.MemoryView":366
33737  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
33738  *         else:
33739  *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
33740  *
33741  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
33742  */
33743   /*else*/ {
33744     __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
33745   }
33746   __pyx_L10:;
33747 
33748   /* "View.MemoryView":368
33749  *             self.dtype_is_object = dtype_is_object
33750  *
33751  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(             # <<<<<<<<<<<<<<
33752  *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
33753  *         self.typeinfo = NULL
33754  */
33755   __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
33756 
33757   /* "View.MemoryView":370
33758  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
33759  *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
33760  *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
33761  *
33762  *     def __dealloc__(memoryview self):
33763  */
33764   __pyx_v_self->typeinfo = NULL;
33765 
33766   /* "View.MemoryView":345
33767  *     cdef __Pyx_TypeInfo *typeinfo
33768  *
33769  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
33770  *         self.obj = obj
33771  *         self.flags = flags
33772  */
33773 
33774   /* function exit code */
33775   __pyx_r = 0;
33776   goto __pyx_L0;
33777   __pyx_L1_error:;
33778   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33779   __pyx_r = -1;
33780   __pyx_L0:;
33781   __Pyx_RefNannyFinishContext();
33782   return __pyx_r;
33783 }
33784 
33785 /* "View.MemoryView":372
33786  *         self.typeinfo = NULL
33787  *
33788  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
33789  *         if self.obj is not None:
33790  *             __Pyx_ReleaseBuffer(&self.view)
33791  */
33792 
33793 /* Python wrapper */
33794 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___dealloc__(PyObject * __pyx_v_self)33795 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
33796   __Pyx_RefNannyDeclarations
33797   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
33798   __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
33799 
33800   /* function exit code */
33801   __Pyx_RefNannyFinishContext();
33802 }
33803 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj * __pyx_v_self)33804 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
33805   int __pyx_v_i;
33806   __Pyx_RefNannyDeclarations
33807   int __pyx_t_1;
33808   int __pyx_t_2;
33809   int __pyx_t_3;
33810   int __pyx_t_4;
33811   int __pyx_t_5;
33812   PyThread_type_lock __pyx_t_6;
33813   PyThread_type_lock __pyx_t_7;
33814   __Pyx_RefNannySetupContext("__dealloc__", 0);
33815 
33816   /* "View.MemoryView":373
33817  *
33818  *     def __dealloc__(memoryview self):
33819  *         if self.obj is not None:             # <<<<<<<<<<<<<<
33820  *             __Pyx_ReleaseBuffer(&self.view)
33821  *
33822  */
33823   __pyx_t_1 = (__pyx_v_self->obj != Py_None);
33824   __pyx_t_2 = (__pyx_t_1 != 0);
33825   if (__pyx_t_2) {
33826 
33827     /* "View.MemoryView":374
33828  *     def __dealloc__(memoryview self):
33829  *         if self.obj is not None:
33830  *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
33831  *
33832  *         cdef int i
33833  */
33834     __Pyx_ReleaseBuffer((&__pyx_v_self->view));
33835 
33836     /* "View.MemoryView":373
33837  *
33838  *     def __dealloc__(memoryview self):
33839  *         if self.obj is not None:             # <<<<<<<<<<<<<<
33840  *             __Pyx_ReleaseBuffer(&self.view)
33841  *
33842  */
33843   }
33844 
33845   /* "View.MemoryView":378
33846  *         cdef int i
33847  *         global __pyx_memoryview_thread_locks_used
33848  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
33849  *             for i in range(__pyx_memoryview_thread_locks_used):
33850  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
33851  */
33852   __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
33853   if (__pyx_t_2) {
33854 
33855     /* "View.MemoryView":379
33856  *         global __pyx_memoryview_thread_locks_used
33857  *         if self.lock != NULL:
33858  *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
33859  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
33860  *                     __pyx_memoryview_thread_locks_used -= 1
33861  */
33862     __pyx_t_3 = __pyx_memoryview_thread_locks_used;
33863     __pyx_t_4 = __pyx_t_3;
33864     for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
33865       __pyx_v_i = __pyx_t_5;
33866 
33867       /* "View.MemoryView":380
33868  *         if self.lock != NULL:
33869  *             for i in range(__pyx_memoryview_thread_locks_used):
33870  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
33871  *                     __pyx_memoryview_thread_locks_used -= 1
33872  *                     if i != __pyx_memoryview_thread_locks_used:
33873  */
33874       __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
33875       if (__pyx_t_2) {
33876 
33877         /* "View.MemoryView":381
33878  *             for i in range(__pyx_memoryview_thread_locks_used):
33879  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
33880  *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
33881  *                     if i != __pyx_memoryview_thread_locks_used:
33882  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
33883  */
33884         __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
33885 
33886         /* "View.MemoryView":382
33887  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
33888  *                     __pyx_memoryview_thread_locks_used -= 1
33889  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
33890  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
33891  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
33892  */
33893         __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
33894         if (__pyx_t_2) {
33895 
33896           /* "View.MemoryView":384
33897  *                     if i != __pyx_memoryview_thread_locks_used:
33898  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
33899  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
33900  *                     break
33901  *             else:
33902  */
33903           __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
33904           __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
33905 
33906           /* "View.MemoryView":383
33907  *                     __pyx_memoryview_thread_locks_used -= 1
33908  *                     if i != __pyx_memoryview_thread_locks_used:
33909  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
33910  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
33911  *                     break
33912  */
33913           (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
33914           (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
33915 
33916           /* "View.MemoryView":382
33917  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
33918  *                     __pyx_memoryview_thread_locks_used -= 1
33919  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
33920  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
33921  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
33922  */
33923         }
33924 
33925         /* "View.MemoryView":385
33926  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
33927  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
33928  *                     break             # <<<<<<<<<<<<<<
33929  *             else:
33930  *                 PyThread_free_lock(self.lock)
33931  */
33932         goto __pyx_L6_break;
33933 
33934         /* "View.MemoryView":380
33935  *         if self.lock != NULL:
33936  *             for i in range(__pyx_memoryview_thread_locks_used):
33937  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
33938  *                     __pyx_memoryview_thread_locks_used -= 1
33939  *                     if i != __pyx_memoryview_thread_locks_used:
33940  */
33941       }
33942     }
33943     /*else*/ {
33944 
33945       /* "View.MemoryView":387
33946  *                     break
33947  *             else:
33948  *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
33949  *
33950  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
33951  */
33952       PyThread_free_lock(__pyx_v_self->lock);
33953     }
33954     __pyx_L6_break:;
33955 
33956     /* "View.MemoryView":378
33957  *         cdef int i
33958  *         global __pyx_memoryview_thread_locks_used
33959  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
33960  *             for i in range(__pyx_memoryview_thread_locks_used):
33961  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
33962  */
33963   }
33964 
33965   /* "View.MemoryView":372
33966  *         self.typeinfo = NULL
33967  *
33968  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
33969  *         if self.obj is not None:
33970  *             __Pyx_ReleaseBuffer(&self.view)
33971  */
33972 
33973   /* function exit code */
33974   __Pyx_RefNannyFinishContext();
33975 }
33976 
33977 /* "View.MemoryView":389
33978  *                 PyThread_free_lock(self.lock)
33979  *
33980  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
33981  *         cdef Py_ssize_t dim
33982  *         cdef char *itemp = <char *> self.view.buf
33983  */
33984 
__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index)33985 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
33986   Py_ssize_t __pyx_v_dim;
33987   char *__pyx_v_itemp;
33988   PyObject *__pyx_v_idx = NULL;
33989   char *__pyx_r;
33990   __Pyx_RefNannyDeclarations
33991   Py_ssize_t __pyx_t_1;
33992   PyObject *__pyx_t_2 = NULL;
33993   Py_ssize_t __pyx_t_3;
33994   PyObject *(*__pyx_t_4)(PyObject *);
33995   PyObject *__pyx_t_5 = NULL;
33996   Py_ssize_t __pyx_t_6;
33997   char *__pyx_t_7;
33998   __Pyx_RefNannySetupContext("get_item_pointer", 0);
33999 
34000   /* "View.MemoryView":391
34001  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
34002  *         cdef Py_ssize_t dim
34003  *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
34004  *
34005  *         for dim, idx in enumerate(index):
34006  */
34007   __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
34008 
34009   /* "View.MemoryView":393
34010  *         cdef char *itemp = <char *> self.view.buf
34011  *
34012  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
34013  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
34014  *
34015  */
34016   __pyx_t_1 = 0;
34017   if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
34018     __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
34019     __pyx_t_4 = NULL;
34020   } else {
34021     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 393, __pyx_L1_error)
34022     __Pyx_GOTREF(__pyx_t_2);
34023     __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 393, __pyx_L1_error)
34024   }
34025   for (;;) {
34026     if (likely(!__pyx_t_4)) {
34027       if (likely(PyList_CheckExact(__pyx_t_2))) {
34028         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
34029         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
34030         __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(1, 393, __pyx_L1_error)
34031         #else
34032         __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 393, __pyx_L1_error)
34033         __Pyx_GOTREF(__pyx_t_5);
34034         #endif
34035       } else {
34036         if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
34037         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
34038         __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(1, 393, __pyx_L1_error)
34039         #else
34040         __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 393, __pyx_L1_error)
34041         __Pyx_GOTREF(__pyx_t_5);
34042         #endif
34043       }
34044     } else {
34045       __pyx_t_5 = __pyx_t_4(__pyx_t_2);
34046       if (unlikely(!__pyx_t_5)) {
34047         PyObject* exc_type = PyErr_Occurred();
34048         if (exc_type) {
34049           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
34050           else __PYX_ERR(1, 393, __pyx_L1_error)
34051         }
34052         break;
34053       }
34054       __Pyx_GOTREF(__pyx_t_5);
34055     }
34056     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
34057     __pyx_t_5 = 0;
34058     __pyx_v_dim = __pyx_t_1;
34059     __pyx_t_1 = (__pyx_t_1 + 1);
34060 
34061     /* "View.MemoryView":394
34062  *
34063  *         for dim, idx in enumerate(index):
34064  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
34065  *
34066  *         return itemp
34067  */
34068     __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 394, __pyx_L1_error)
34069     __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(1, 394, __pyx_L1_error)
34070     __pyx_v_itemp = __pyx_t_7;
34071 
34072     /* "View.MemoryView":393
34073  *         cdef char *itemp = <char *> self.view.buf
34074  *
34075  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
34076  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
34077  *
34078  */
34079   }
34080   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
34081 
34082   /* "View.MemoryView":396
34083  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
34084  *
34085  *         return itemp             # <<<<<<<<<<<<<<
34086  *
34087  *
34088  */
34089   __pyx_r = __pyx_v_itemp;
34090   goto __pyx_L0;
34091 
34092   /* "View.MemoryView":389
34093  *                 PyThread_free_lock(self.lock)
34094  *
34095  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
34096  *         cdef Py_ssize_t dim
34097  *         cdef char *itemp = <char *> self.view.buf
34098  */
34099 
34100   /* function exit code */
34101   __pyx_L1_error:;
34102   __Pyx_XDECREF(__pyx_t_2);
34103   __Pyx_XDECREF(__pyx_t_5);
34104   __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
34105   __pyx_r = NULL;
34106   __pyx_L0:;
34107   __Pyx_XDECREF(__pyx_v_idx);
34108   __Pyx_RefNannyFinishContext();
34109   return __pyx_r;
34110 }
34111 
34112 /* "View.MemoryView":399
34113  *
34114  *
34115  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
34116  *         if index is Ellipsis:
34117  *             return self
34118  */
34119 
34120 /* Python wrapper */
34121 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)34122 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
34123   PyObject *__pyx_r = 0;
34124   __Pyx_RefNannyDeclarations
34125   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
34126   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
34127 
34128   /* function exit code */
34129   __Pyx_RefNannyFinishContext();
34130   return __pyx_r;
34131 }
34132 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index)34133 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
34134   PyObject *__pyx_v_have_slices = NULL;
34135   PyObject *__pyx_v_indices = NULL;
34136   char *__pyx_v_itemp;
34137   PyObject *__pyx_r = NULL;
34138   __Pyx_RefNannyDeclarations
34139   int __pyx_t_1;
34140   int __pyx_t_2;
34141   PyObject *__pyx_t_3 = NULL;
34142   PyObject *__pyx_t_4 = NULL;
34143   PyObject *__pyx_t_5 = NULL;
34144   char *__pyx_t_6;
34145   __Pyx_RefNannySetupContext("__getitem__", 0);
34146 
34147   /* "View.MemoryView":400
34148  *
34149  *     def __getitem__(memoryview self, object index):
34150  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
34151  *             return self
34152  *
34153  */
34154   __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
34155   __pyx_t_2 = (__pyx_t_1 != 0);
34156   if (__pyx_t_2) {
34157 
34158     /* "View.MemoryView":401
34159  *     def __getitem__(memoryview self, object index):
34160  *         if index is Ellipsis:
34161  *             return self             # <<<<<<<<<<<<<<
34162  *
34163  *         have_slices, indices = _unellipsify(index, self.view.ndim)
34164  */
34165     __Pyx_XDECREF(__pyx_r);
34166     __Pyx_INCREF(((PyObject *)__pyx_v_self));
34167     __pyx_r = ((PyObject *)__pyx_v_self);
34168     goto __pyx_L0;
34169 
34170     /* "View.MemoryView":400
34171  *
34172  *     def __getitem__(memoryview self, object index):
34173  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
34174  *             return self
34175  *
34176  */
34177   }
34178 
34179   /* "View.MemoryView":403
34180  *             return self
34181  *
34182  *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
34183  *
34184  *         cdef char *itemp
34185  */
34186   __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 403, __pyx_L1_error)
34187   __Pyx_GOTREF(__pyx_t_3);
34188   if (likely(__pyx_t_3 != Py_None)) {
34189     PyObject* sequence = __pyx_t_3;
34190     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
34191     if (unlikely(size != 2)) {
34192       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
34193       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
34194       __PYX_ERR(1, 403, __pyx_L1_error)
34195     }
34196     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
34197     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
34198     __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
34199     __Pyx_INCREF(__pyx_t_4);
34200     __Pyx_INCREF(__pyx_t_5);
34201     #else
34202     __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 403, __pyx_L1_error)
34203     __Pyx_GOTREF(__pyx_t_4);
34204     __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 403, __pyx_L1_error)
34205     __Pyx_GOTREF(__pyx_t_5);
34206     #endif
34207     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
34208   } else {
34209     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 403, __pyx_L1_error)
34210   }
34211   __pyx_v_have_slices = __pyx_t_4;
34212   __pyx_t_4 = 0;
34213   __pyx_v_indices = __pyx_t_5;
34214   __pyx_t_5 = 0;
34215 
34216   /* "View.MemoryView":406
34217  *
34218  *         cdef char *itemp
34219  *         if have_slices:             # <<<<<<<<<<<<<<
34220  *             return memview_slice(self, indices)
34221  *         else:
34222  */
34223   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 406, __pyx_L1_error)
34224   if (__pyx_t_2) {
34225 
34226     /* "View.MemoryView":407
34227  *         cdef char *itemp
34228  *         if have_slices:
34229  *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
34230  *         else:
34231  *             itemp = self.get_item_pointer(indices)
34232  */
34233     __Pyx_XDECREF(__pyx_r);
34234     __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error)
34235     __Pyx_GOTREF(__pyx_t_3);
34236     __pyx_r = __pyx_t_3;
34237     __pyx_t_3 = 0;
34238     goto __pyx_L0;
34239 
34240     /* "View.MemoryView":406
34241  *
34242  *         cdef char *itemp
34243  *         if have_slices:             # <<<<<<<<<<<<<<
34244  *             return memview_slice(self, indices)
34245  *         else:
34246  */
34247   }
34248 
34249   /* "View.MemoryView":409
34250  *             return memview_slice(self, indices)
34251  *         else:
34252  *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
34253  *             return self.convert_item_to_object(itemp)
34254  *
34255  */
34256   /*else*/ {
34257     __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(1, 409, __pyx_L1_error)
34258     __pyx_v_itemp = __pyx_t_6;
34259 
34260     /* "View.MemoryView":410
34261  *         else:
34262  *             itemp = self.get_item_pointer(indices)
34263  *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
34264  *
34265  *     def __setitem__(memoryview self, object index, object value):
34266  */
34267     __Pyx_XDECREF(__pyx_r);
34268     __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(1, 410, __pyx_L1_error)
34269     __Pyx_GOTREF(__pyx_t_3);
34270     __pyx_r = __pyx_t_3;
34271     __pyx_t_3 = 0;
34272     goto __pyx_L0;
34273   }
34274 
34275   /* "View.MemoryView":399
34276  *
34277  *
34278  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
34279  *         if index is Ellipsis:
34280  *             return self
34281  */
34282 
34283   /* function exit code */
34284   __pyx_L1_error:;
34285   __Pyx_XDECREF(__pyx_t_3);
34286   __Pyx_XDECREF(__pyx_t_4);
34287   __Pyx_XDECREF(__pyx_t_5);
34288   __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34289   __pyx_r = NULL;
34290   __pyx_L0:;
34291   __Pyx_XDECREF(__pyx_v_have_slices);
34292   __Pyx_XDECREF(__pyx_v_indices);
34293   __Pyx_XGIVEREF(__pyx_r);
34294   __Pyx_RefNannyFinishContext();
34295   return __pyx_r;
34296 }
34297 
34298 /* "View.MemoryView":412
34299  *             return self.convert_item_to_object(itemp)
34300  *
34301  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
34302  *         if self.view.readonly:
34303  *             raise TypeError("Cannot assign to read-only memoryview")
34304  */
34305 
34306 /* Python wrapper */
34307 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)34308 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
34309   int __pyx_r;
34310   __Pyx_RefNannyDeclarations
34311   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
34312   __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));
34313 
34314   /* function exit code */
34315   __Pyx_RefNannyFinishContext();
34316   return __pyx_r;
34317 }
34318 
__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)34319 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) {
34320   PyObject *__pyx_v_have_slices = NULL;
34321   PyObject *__pyx_v_obj = NULL;
34322   int __pyx_r;
34323   __Pyx_RefNannyDeclarations
34324   int __pyx_t_1;
34325   PyObject *__pyx_t_2 = NULL;
34326   PyObject *__pyx_t_3 = NULL;
34327   PyObject *__pyx_t_4 = NULL;
34328   __Pyx_RefNannySetupContext("__setitem__", 0);
34329   __Pyx_INCREF(__pyx_v_index);
34330 
34331   /* "View.MemoryView":413
34332  *
34333  *     def __setitem__(memoryview self, object index, object value):
34334  *         if self.view.readonly:             # <<<<<<<<<<<<<<
34335  *             raise TypeError("Cannot assign to read-only memoryview")
34336  *
34337  */
34338   __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
34339   if (unlikely(__pyx_t_1)) {
34340 
34341     /* "View.MemoryView":414
34342  *     def __setitem__(memoryview self, object index, object value):
34343  *         if self.view.readonly:
34344  *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
34345  *
34346  *         have_slices, index = _unellipsify(index, self.view.ndim)
34347  */
34348     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 414, __pyx_L1_error)
34349     __Pyx_GOTREF(__pyx_t_2);
34350     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
34351     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
34352     __PYX_ERR(1, 414, __pyx_L1_error)
34353 
34354     /* "View.MemoryView":413
34355  *
34356  *     def __setitem__(memoryview self, object index, object value):
34357  *         if self.view.readonly:             # <<<<<<<<<<<<<<
34358  *             raise TypeError("Cannot assign to read-only memoryview")
34359  *
34360  */
34361   }
34362 
34363   /* "View.MemoryView":416
34364  *             raise TypeError("Cannot assign to read-only memoryview")
34365  *
34366  *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
34367  *
34368  *         if have_slices:
34369  */
34370   __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 416, __pyx_L1_error)
34371   __Pyx_GOTREF(__pyx_t_2);
34372   if (likely(__pyx_t_2 != Py_None)) {
34373     PyObject* sequence = __pyx_t_2;
34374     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
34375     if (unlikely(size != 2)) {
34376       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
34377       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
34378       __PYX_ERR(1, 416, __pyx_L1_error)
34379     }
34380     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
34381     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
34382     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
34383     __Pyx_INCREF(__pyx_t_3);
34384     __Pyx_INCREF(__pyx_t_4);
34385     #else
34386     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error)
34387     __Pyx_GOTREF(__pyx_t_3);
34388     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 416, __pyx_L1_error)
34389     __Pyx_GOTREF(__pyx_t_4);
34390     #endif
34391     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
34392   } else {
34393     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 416, __pyx_L1_error)
34394   }
34395   __pyx_v_have_slices = __pyx_t_3;
34396   __pyx_t_3 = 0;
34397   __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
34398   __pyx_t_4 = 0;
34399 
34400   /* "View.MemoryView":418
34401  *         have_slices, index = _unellipsify(index, self.view.ndim)
34402  *
34403  *         if have_slices:             # <<<<<<<<<<<<<<
34404  *             obj = self.is_slice(value)
34405  *             if obj:
34406  */
34407   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 418, __pyx_L1_error)
34408   if (__pyx_t_1) {
34409 
34410     /* "View.MemoryView":419
34411  *
34412  *         if have_slices:
34413  *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
34414  *             if obj:
34415  *                 self.setitem_slice_assignment(self[index], obj)
34416  */
34417     __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(1, 419, __pyx_L1_error)
34418     __Pyx_GOTREF(__pyx_t_2);
34419     __pyx_v_obj = __pyx_t_2;
34420     __pyx_t_2 = 0;
34421 
34422     /* "View.MemoryView":420
34423  *         if have_slices:
34424  *             obj = self.is_slice(value)
34425  *             if obj:             # <<<<<<<<<<<<<<
34426  *                 self.setitem_slice_assignment(self[index], obj)
34427  *             else:
34428  */
34429     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 420, __pyx_L1_error)
34430     if (__pyx_t_1) {
34431 
34432       /* "View.MemoryView":421
34433  *             obj = self.is_slice(value)
34434  *             if obj:
34435  *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
34436  *             else:
34437  *                 self.setitem_slice_assign_scalar(self[index], value)
34438  */
34439       __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 421, __pyx_L1_error)
34440       __Pyx_GOTREF(__pyx_t_2);
34441       __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(1, 421, __pyx_L1_error)
34442       __Pyx_GOTREF(__pyx_t_4);
34443       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
34444       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
34445 
34446       /* "View.MemoryView":420
34447  *         if have_slices:
34448  *             obj = self.is_slice(value)
34449  *             if obj:             # <<<<<<<<<<<<<<
34450  *                 self.setitem_slice_assignment(self[index], obj)
34451  *             else:
34452  */
34453       goto __pyx_L5;
34454     }
34455 
34456     /* "View.MemoryView":423
34457  *                 self.setitem_slice_assignment(self[index], obj)
34458  *             else:
34459  *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
34460  *         else:
34461  *             self.setitem_indexed(index, value)
34462  */
34463     /*else*/ {
34464       __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 423, __pyx_L1_error)
34465       __Pyx_GOTREF(__pyx_t_4);
34466       if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 423, __pyx_L1_error)
34467       __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(1, 423, __pyx_L1_error)
34468       __Pyx_GOTREF(__pyx_t_2);
34469       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
34470       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
34471     }
34472     __pyx_L5:;
34473 
34474     /* "View.MemoryView":418
34475  *         have_slices, index = _unellipsify(index, self.view.ndim)
34476  *
34477  *         if have_slices:             # <<<<<<<<<<<<<<
34478  *             obj = self.is_slice(value)
34479  *             if obj:
34480  */
34481     goto __pyx_L4;
34482   }
34483 
34484   /* "View.MemoryView":425
34485  *                 self.setitem_slice_assign_scalar(self[index], value)
34486  *         else:
34487  *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
34488  *
34489  *     cdef is_slice(self, obj):
34490  */
34491   /*else*/ {
34492     __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(1, 425, __pyx_L1_error)
34493     __Pyx_GOTREF(__pyx_t_2);
34494     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
34495   }
34496   __pyx_L4:;
34497 
34498   /* "View.MemoryView":412
34499  *             return self.convert_item_to_object(itemp)
34500  *
34501  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
34502  *         if self.view.readonly:
34503  *             raise TypeError("Cannot assign to read-only memoryview")
34504  */
34505 
34506   /* function exit code */
34507   __pyx_r = 0;
34508   goto __pyx_L0;
34509   __pyx_L1_error:;
34510   __Pyx_XDECREF(__pyx_t_2);
34511   __Pyx_XDECREF(__pyx_t_3);
34512   __Pyx_XDECREF(__pyx_t_4);
34513   __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34514   __pyx_r = -1;
34515   __pyx_L0:;
34516   __Pyx_XDECREF(__pyx_v_have_slices);
34517   __Pyx_XDECREF(__pyx_v_obj);
34518   __Pyx_XDECREF(__pyx_v_index);
34519   __Pyx_RefNannyFinishContext();
34520   return __pyx_r;
34521 }
34522 
34523 /* "View.MemoryView":427
34524  *             self.setitem_indexed(index, value)
34525  *
34526  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
34527  *         if not isinstance(obj, memoryview):
34528  *             try:
34529  */
34530 
__pyx_memoryview_is_slice(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_obj)34531 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
34532   PyObject *__pyx_r = NULL;
34533   __Pyx_RefNannyDeclarations
34534   int __pyx_t_1;
34535   int __pyx_t_2;
34536   PyObject *__pyx_t_3 = NULL;
34537   PyObject *__pyx_t_4 = NULL;
34538   PyObject *__pyx_t_5 = NULL;
34539   PyObject *__pyx_t_6 = NULL;
34540   PyObject *__pyx_t_7 = NULL;
34541   PyObject *__pyx_t_8 = NULL;
34542   int __pyx_t_9;
34543   __Pyx_RefNannySetupContext("is_slice", 0);
34544   __Pyx_INCREF(__pyx_v_obj);
34545 
34546   /* "View.MemoryView":428
34547  *
34548  *     cdef is_slice(self, obj):
34549  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
34550  *             try:
34551  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
34552  */
34553   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
34554   __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
34555   if (__pyx_t_2) {
34556 
34557     /* "View.MemoryView":429
34558  *     cdef is_slice(self, obj):
34559  *         if not isinstance(obj, memoryview):
34560  *             try:             # <<<<<<<<<<<<<<
34561  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
34562  *                                  self.dtype_is_object)
34563  */
34564     {
34565       __Pyx_PyThreadState_declare
34566       __Pyx_PyThreadState_assign
34567       __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
34568       __Pyx_XGOTREF(__pyx_t_3);
34569       __Pyx_XGOTREF(__pyx_t_4);
34570       __Pyx_XGOTREF(__pyx_t_5);
34571       /*try:*/ {
34572 
34573         /* "View.MemoryView":430
34574  *         if not isinstance(obj, memoryview):
34575  *             try:
34576  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
34577  *                                  self.dtype_is_object)
34578  *             except TypeError:
34579  */
34580         __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 430, __pyx_L4_error)
34581         __Pyx_GOTREF(__pyx_t_6);
34582 
34583         /* "View.MemoryView":431
34584  *             try:
34585  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
34586  *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
34587  *             except TypeError:
34588  *                 return None
34589  */
34590         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 431, __pyx_L4_error)
34591         __Pyx_GOTREF(__pyx_t_7);
34592 
34593         /* "View.MemoryView":430
34594  *         if not isinstance(obj, memoryview):
34595  *             try:
34596  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
34597  *                                  self.dtype_is_object)
34598  *             except TypeError:
34599  */
34600         __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 430, __pyx_L4_error)
34601         __Pyx_GOTREF(__pyx_t_8);
34602         __Pyx_INCREF(__pyx_v_obj);
34603         __Pyx_GIVEREF(__pyx_v_obj);
34604         PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
34605         __Pyx_GIVEREF(__pyx_t_6);
34606         PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
34607         __Pyx_GIVEREF(__pyx_t_7);
34608         PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
34609         __pyx_t_6 = 0;
34610         __pyx_t_7 = 0;
34611         __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 430, __pyx_L4_error)
34612         __Pyx_GOTREF(__pyx_t_7);
34613         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
34614         __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
34615         __pyx_t_7 = 0;
34616 
34617         /* "View.MemoryView":429
34618  *     cdef is_slice(self, obj):
34619  *         if not isinstance(obj, memoryview):
34620  *             try:             # <<<<<<<<<<<<<<
34621  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
34622  *                                  self.dtype_is_object)
34623  */
34624       }
34625       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
34626       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
34627       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
34628       goto __pyx_L9_try_end;
34629       __pyx_L4_error:;
34630       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
34631       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
34632       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
34633 
34634       /* "View.MemoryView":432
34635  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
34636  *                                  self.dtype_is_object)
34637  *             except TypeError:             # <<<<<<<<<<<<<<
34638  *                 return None
34639  *
34640  */
34641       __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
34642       if (__pyx_t_9) {
34643         __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
34644         if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 432, __pyx_L6_except_error)
34645         __Pyx_GOTREF(__pyx_t_7);
34646         __Pyx_GOTREF(__pyx_t_8);
34647         __Pyx_GOTREF(__pyx_t_6);
34648 
34649         /* "View.MemoryView":433
34650  *                                  self.dtype_is_object)
34651  *             except TypeError:
34652  *                 return None             # <<<<<<<<<<<<<<
34653  *
34654  *         return obj
34655  */
34656         __Pyx_XDECREF(__pyx_r);
34657         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
34658         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
34659         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
34660         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
34661         goto __pyx_L7_except_return;
34662       }
34663       goto __pyx_L6_except_error;
34664       __pyx_L6_except_error:;
34665 
34666       /* "View.MemoryView":429
34667  *     cdef is_slice(self, obj):
34668  *         if not isinstance(obj, memoryview):
34669  *             try:             # <<<<<<<<<<<<<<
34670  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
34671  *                                  self.dtype_is_object)
34672  */
34673       __Pyx_XGIVEREF(__pyx_t_3);
34674       __Pyx_XGIVEREF(__pyx_t_4);
34675       __Pyx_XGIVEREF(__pyx_t_5);
34676       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
34677       goto __pyx_L1_error;
34678       __pyx_L7_except_return:;
34679       __Pyx_XGIVEREF(__pyx_t_3);
34680       __Pyx_XGIVEREF(__pyx_t_4);
34681       __Pyx_XGIVEREF(__pyx_t_5);
34682       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
34683       goto __pyx_L0;
34684       __pyx_L9_try_end:;
34685     }
34686 
34687     /* "View.MemoryView":428
34688  *
34689  *     cdef is_slice(self, obj):
34690  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
34691  *             try:
34692  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
34693  */
34694   }
34695 
34696   /* "View.MemoryView":435
34697  *                 return None
34698  *
34699  *         return obj             # <<<<<<<<<<<<<<
34700  *
34701  *     cdef setitem_slice_assignment(self, dst, src):
34702  */
34703   __Pyx_XDECREF(__pyx_r);
34704   __Pyx_INCREF(__pyx_v_obj);
34705   __pyx_r = __pyx_v_obj;
34706   goto __pyx_L0;
34707 
34708   /* "View.MemoryView":427
34709  *             self.setitem_indexed(index, value)
34710  *
34711  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
34712  *         if not isinstance(obj, memoryview):
34713  *             try:
34714  */
34715 
34716   /* function exit code */
34717   __pyx_L1_error:;
34718   __Pyx_XDECREF(__pyx_t_6);
34719   __Pyx_XDECREF(__pyx_t_7);
34720   __Pyx_XDECREF(__pyx_t_8);
34721   __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
34722   __pyx_r = 0;
34723   __pyx_L0:;
34724   __Pyx_XDECREF(__pyx_v_obj);
34725   __Pyx_XGIVEREF(__pyx_r);
34726   __Pyx_RefNannyFinishContext();
34727   return __pyx_r;
34728 }
34729 
34730 /* "View.MemoryView":437
34731  *         return obj
34732  *
34733  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
34734  *         cdef __Pyx_memviewslice dst_slice
34735  *         cdef __Pyx_memviewslice src_slice
34736  */
34737 
__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_dst,PyObject * __pyx_v_src)34738 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
34739   __Pyx_memviewslice __pyx_v_dst_slice;
34740   __Pyx_memviewslice __pyx_v_src_slice;
34741   PyObject *__pyx_r = NULL;
34742   __Pyx_RefNannyDeclarations
34743   PyObject *__pyx_t_1 = NULL;
34744   int __pyx_t_2;
34745   int __pyx_t_3;
34746   int __pyx_t_4;
34747   __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
34748 
34749   /* "View.MemoryView":441
34750  *         cdef __Pyx_memviewslice src_slice
34751  *
34752  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
34753  *                                  get_slice_from_memview(dst, &dst_slice)[0],
34754  *                                  src.ndim, dst.ndim, self.dtype_is_object)
34755  */
34756   if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 441, __pyx_L1_error)
34757 
34758   /* "View.MemoryView":442
34759  *
34760  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
34761  *                                  get_slice_from_memview(dst, &dst_slice)[0],             # <<<<<<<<<<<<<<
34762  *                                  src.ndim, dst.ndim, self.dtype_is_object)
34763  *
34764  */
34765   if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 442, __pyx_L1_error)
34766 
34767   /* "View.MemoryView":443
34768  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
34769  *                                  get_slice_from_memview(dst, &dst_slice)[0],
34770  *                                  src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
34771  *
34772  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
34773  */
34774   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error)
34775   __Pyx_GOTREF(__pyx_t_1);
34776   __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L1_error)
34777   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34778   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error)
34779   __Pyx_GOTREF(__pyx_t_1);
34780   __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L1_error)
34781   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
34782 
34783   /* "View.MemoryView":441
34784  *         cdef __Pyx_memviewslice src_slice
34785  *
34786  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
34787  *                                  get_slice_from_memview(dst, &dst_slice)[0],
34788  *                                  src.ndim, dst.ndim, self.dtype_is_object)
34789  */
34790   __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(1, 441, __pyx_L1_error)
34791 
34792   /* "View.MemoryView":437
34793  *         return obj
34794  *
34795  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
34796  *         cdef __Pyx_memviewslice dst_slice
34797  *         cdef __Pyx_memviewslice src_slice
34798  */
34799 
34800   /* function exit code */
34801   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
34802   goto __pyx_L0;
34803   __pyx_L1_error:;
34804   __Pyx_XDECREF(__pyx_t_1);
34805   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
34806   __pyx_r = 0;
34807   __pyx_L0:;
34808   __Pyx_XGIVEREF(__pyx_r);
34809   __Pyx_RefNannyFinishContext();
34810   return __pyx_r;
34811 }
34812 
34813 /* "View.MemoryView":445
34814  *                                  src.ndim, dst.ndim, self.dtype_is_object)
34815  *
34816  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
34817  *         cdef int array[128]
34818  *         cdef void *tmp = NULL
34819  */
34820 
__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj * __pyx_v_self,struct __pyx_memoryview_obj * __pyx_v_dst,PyObject * __pyx_v_value)34821 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) {
34822   int __pyx_v_array[0x80];
34823   void *__pyx_v_tmp;
34824   void *__pyx_v_item;
34825   __Pyx_memviewslice *__pyx_v_dst_slice;
34826   __Pyx_memviewslice __pyx_v_tmp_slice;
34827   PyObject *__pyx_r = NULL;
34828   __Pyx_RefNannyDeclarations
34829   int __pyx_t_1;
34830   PyObject *__pyx_t_2 = NULL;
34831   int __pyx_t_3;
34832   int __pyx_t_4;
34833   char const *__pyx_t_5;
34834   PyObject *__pyx_t_6 = NULL;
34835   PyObject *__pyx_t_7 = NULL;
34836   PyObject *__pyx_t_8 = NULL;
34837   PyObject *__pyx_t_9 = NULL;
34838   PyObject *__pyx_t_10 = NULL;
34839   PyObject *__pyx_t_11 = NULL;
34840   __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
34841 
34842   /* "View.MemoryView":447
34843  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
34844  *         cdef int array[128]
34845  *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
34846  *         cdef void *item
34847  *
34848  */
34849   __pyx_v_tmp = NULL;
34850 
34851   /* "View.MemoryView":452
34852  *         cdef __Pyx_memviewslice *dst_slice
34853  *         cdef __Pyx_memviewslice tmp_slice
34854  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
34855  *
34856  *         if <size_t>self.view.itemsize > sizeof(array):
34857  */
34858   __pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice));
34859 
34860   /* "View.MemoryView":454
34861  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
34862  *
34863  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
34864  *             tmp = PyMem_Malloc(self.view.itemsize)
34865  *             if tmp == NULL:
34866  */
34867   __pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
34868   if (__pyx_t_1) {
34869 
34870     /* "View.MemoryView":455
34871  *
34872  *         if <size_t>self.view.itemsize > sizeof(array):
34873  *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
34874  *             if tmp == NULL:
34875  *                 raise MemoryError
34876  */
34877     __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
34878 
34879     /* "View.MemoryView":456
34880  *         if <size_t>self.view.itemsize > sizeof(array):
34881  *             tmp = PyMem_Malloc(self.view.itemsize)
34882  *             if tmp == NULL:             # <<<<<<<<<<<<<<
34883  *                 raise MemoryError
34884  *             item = tmp
34885  */
34886     __pyx_t_1 = ((__pyx_v_tmp == NULL) != 0);
34887     if (unlikely(__pyx_t_1)) {
34888 
34889       /* "View.MemoryView":457
34890  *             tmp = PyMem_Malloc(self.view.itemsize)
34891  *             if tmp == NULL:
34892  *                 raise MemoryError             # <<<<<<<<<<<<<<
34893  *             item = tmp
34894  *         else:
34895  */
34896       PyErr_NoMemory(); __PYX_ERR(1, 457, __pyx_L1_error)
34897 
34898       /* "View.MemoryView":456
34899  *         if <size_t>self.view.itemsize > sizeof(array):
34900  *             tmp = PyMem_Malloc(self.view.itemsize)
34901  *             if tmp == NULL:             # <<<<<<<<<<<<<<
34902  *                 raise MemoryError
34903  *             item = tmp
34904  */
34905     }
34906 
34907     /* "View.MemoryView":458
34908  *             if tmp == NULL:
34909  *                 raise MemoryError
34910  *             item = tmp             # <<<<<<<<<<<<<<
34911  *         else:
34912  *             item = <void *> array
34913  */
34914     __pyx_v_item = __pyx_v_tmp;
34915 
34916     /* "View.MemoryView":454
34917  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
34918  *
34919  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
34920  *             tmp = PyMem_Malloc(self.view.itemsize)
34921  *             if tmp == NULL:
34922  */
34923     goto __pyx_L3;
34924   }
34925 
34926   /* "View.MemoryView":460
34927  *             item = tmp
34928  *         else:
34929  *             item = <void *> array             # <<<<<<<<<<<<<<
34930  *
34931  *         try:
34932  */
34933   /*else*/ {
34934     __pyx_v_item = ((void *)__pyx_v_array);
34935   }
34936   __pyx_L3:;
34937 
34938   /* "View.MemoryView":462
34939  *             item = <void *> array
34940  *
34941  *         try:             # <<<<<<<<<<<<<<
34942  *             if self.dtype_is_object:
34943  *                 (<PyObject **> item)[0] = <PyObject *> value
34944  */
34945   /*try:*/ {
34946 
34947     /* "View.MemoryView":463
34948  *
34949  *         try:
34950  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
34951  *                 (<PyObject **> item)[0] = <PyObject *> value
34952  *             else:
34953  */
34954     __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
34955     if (__pyx_t_1) {
34956 
34957       /* "View.MemoryView":464
34958  *         try:
34959  *             if self.dtype_is_object:
34960  *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
34961  *             else:
34962  *                 self.assign_item_from_object(<char *> item, value)
34963  */
34964       (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
34965 
34966       /* "View.MemoryView":463
34967  *
34968  *         try:
34969  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
34970  *                 (<PyObject **> item)[0] = <PyObject *> value
34971  *             else:
34972  */
34973       goto __pyx_L8;
34974     }
34975 
34976     /* "View.MemoryView":466
34977  *                 (<PyObject **> item)[0] = <PyObject *> value
34978  *             else:
34979  *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
34980  *
34981  *
34982  */
34983     /*else*/ {
34984       __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(1, 466, __pyx_L6_error)
34985       __Pyx_GOTREF(__pyx_t_2);
34986       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
34987     }
34988     __pyx_L8:;
34989 
34990     /* "View.MemoryView":470
34991  *
34992  *
34993  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
34994  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
34995  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
34996  */
34997     __pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
34998     if (__pyx_t_1) {
34999 
35000       /* "View.MemoryView":471
35001  *
35002  *             if self.view.suboffsets != NULL:
35003  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
35004  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
35005  *                                 item, self.dtype_is_object)
35006  */
35007       __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 471, __pyx_L6_error)
35008       __Pyx_GOTREF(__pyx_t_2);
35009       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35010 
35011       /* "View.MemoryView":470
35012  *
35013  *
35014  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
35015  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
35016  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
35017  */
35018     }
35019 
35020     /* "View.MemoryView":472
35021  *             if self.view.suboffsets != NULL:
35022  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
35023  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
35024  *                                 item, self.dtype_is_object)
35025  *         finally:
35026  */
35027     __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);
35028   }
35029 
35030   /* "View.MemoryView":475
35031  *                                 item, self.dtype_is_object)
35032  *         finally:
35033  *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
35034  *
35035  *     cdef setitem_indexed(self, index, value):
35036  */
35037   /*finally:*/ {
35038     /*normal exit:*/{
35039       PyMem_Free(__pyx_v_tmp);
35040       goto __pyx_L7;
35041     }
35042     __pyx_L6_error:;
35043     /*exception exit:*/{
35044       __Pyx_PyThreadState_declare
35045       __Pyx_PyThreadState_assign
35046       __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
35047       __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
35048       if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
35049       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);
35050       __Pyx_XGOTREF(__pyx_t_6);
35051       __Pyx_XGOTREF(__pyx_t_7);
35052       __Pyx_XGOTREF(__pyx_t_8);
35053       __Pyx_XGOTREF(__pyx_t_9);
35054       __Pyx_XGOTREF(__pyx_t_10);
35055       __Pyx_XGOTREF(__pyx_t_11);
35056       __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
35057       {
35058         PyMem_Free(__pyx_v_tmp);
35059       }
35060       if (PY_MAJOR_VERSION >= 3) {
35061         __Pyx_XGIVEREF(__pyx_t_9);
35062         __Pyx_XGIVEREF(__pyx_t_10);
35063         __Pyx_XGIVEREF(__pyx_t_11);
35064         __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
35065       }
35066       __Pyx_XGIVEREF(__pyx_t_6);
35067       __Pyx_XGIVEREF(__pyx_t_7);
35068       __Pyx_XGIVEREF(__pyx_t_8);
35069       __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
35070       __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
35071       __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
35072       goto __pyx_L1_error;
35073     }
35074     __pyx_L7:;
35075   }
35076 
35077   /* "View.MemoryView":445
35078  *                                  src.ndim, dst.ndim, self.dtype_is_object)
35079  *
35080  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
35081  *         cdef int array[128]
35082  *         cdef void *tmp = NULL
35083  */
35084 
35085   /* function exit code */
35086   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
35087   goto __pyx_L0;
35088   __pyx_L1_error:;
35089   __Pyx_XDECREF(__pyx_t_2);
35090   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
35091   __pyx_r = 0;
35092   __pyx_L0:;
35093   __Pyx_XGIVEREF(__pyx_r);
35094   __Pyx_RefNannyFinishContext();
35095   return __pyx_r;
35096 }
35097 
35098 /* "View.MemoryView":477
35099  *             PyMem_Free(tmp)
35100  *
35101  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
35102  *         cdef char *itemp = self.get_item_pointer(index)
35103  *         self.assign_item_from_object(itemp, value)
35104  */
35105 
__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index,PyObject * __pyx_v_value)35106 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
35107   char *__pyx_v_itemp;
35108   PyObject *__pyx_r = NULL;
35109   __Pyx_RefNannyDeclarations
35110   char *__pyx_t_1;
35111   PyObject *__pyx_t_2 = NULL;
35112   __Pyx_RefNannySetupContext("setitem_indexed", 0);
35113 
35114   /* "View.MemoryView":478
35115  *
35116  *     cdef setitem_indexed(self, index, value):
35117  *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
35118  *         self.assign_item_from_object(itemp, value)
35119  *
35120  */
35121   __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(1, 478, __pyx_L1_error)
35122   __pyx_v_itemp = __pyx_t_1;
35123 
35124   /* "View.MemoryView":479
35125  *     cdef setitem_indexed(self, index, value):
35126  *         cdef char *itemp = self.get_item_pointer(index)
35127  *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
35128  *
35129  *     cdef convert_item_to_object(self, char *itemp):
35130  */
35131   __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(1, 479, __pyx_L1_error)
35132   __Pyx_GOTREF(__pyx_t_2);
35133   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
35134 
35135   /* "View.MemoryView":477
35136  *             PyMem_Free(tmp)
35137  *
35138  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
35139  *         cdef char *itemp = self.get_item_pointer(index)
35140  *         self.assign_item_from_object(itemp, value)
35141  */
35142 
35143   /* function exit code */
35144   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
35145   goto __pyx_L0;
35146   __pyx_L1_error:;
35147   __Pyx_XDECREF(__pyx_t_2);
35148   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
35149   __pyx_r = 0;
35150   __pyx_L0:;
35151   __Pyx_XGIVEREF(__pyx_r);
35152   __Pyx_RefNannyFinishContext();
35153   return __pyx_r;
35154 }
35155 
35156 /* "View.MemoryView":481
35157  *         self.assign_item_from_object(itemp, value)
35158  *
35159  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
35160  *         """Only used if instantiated manually by the user, or if Cython doesn't
35161  *         know how to convert the type"""
35162  */
35163 
__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj * __pyx_v_self,char * __pyx_v_itemp)35164 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
35165   PyObject *__pyx_v_struct = NULL;
35166   PyObject *__pyx_v_bytesitem = 0;
35167   PyObject *__pyx_v_result = NULL;
35168   PyObject *__pyx_r = NULL;
35169   __Pyx_RefNannyDeclarations
35170   PyObject *__pyx_t_1 = NULL;
35171   PyObject *__pyx_t_2 = NULL;
35172   PyObject *__pyx_t_3 = NULL;
35173   PyObject *__pyx_t_4 = NULL;
35174   PyObject *__pyx_t_5 = NULL;
35175   PyObject *__pyx_t_6 = NULL;
35176   PyObject *__pyx_t_7 = NULL;
35177   int __pyx_t_8;
35178   PyObject *__pyx_t_9 = NULL;
35179   size_t __pyx_t_10;
35180   int __pyx_t_11;
35181   __Pyx_RefNannySetupContext("convert_item_to_object", 0);
35182 
35183   /* "View.MemoryView":484
35184  *         """Only used if instantiated manually by the user, or if Cython doesn't
35185  *         know how to convert the type"""
35186  *         import struct             # <<<<<<<<<<<<<<
35187  *         cdef bytes bytesitem
35188  *
35189  */
35190   __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 484, __pyx_L1_error)
35191   __Pyx_GOTREF(__pyx_t_1);
35192   __pyx_v_struct = __pyx_t_1;
35193   __pyx_t_1 = 0;
35194 
35195   /* "View.MemoryView":487
35196  *         cdef bytes bytesitem
35197  *
35198  *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
35199  *         try:
35200  *             result = struct.unpack(self.view.format, bytesitem)
35201  */
35202   __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 487, __pyx_L1_error)
35203   __Pyx_GOTREF(__pyx_t_1);
35204   __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
35205   __pyx_t_1 = 0;
35206 
35207   /* "View.MemoryView":488
35208  *
35209  *         bytesitem = itemp[:self.view.itemsize]
35210  *         try:             # <<<<<<<<<<<<<<
35211  *             result = struct.unpack(self.view.format, bytesitem)
35212  *         except struct.error:
35213  */
35214   {
35215     __Pyx_PyThreadState_declare
35216     __Pyx_PyThreadState_assign
35217     __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
35218     __Pyx_XGOTREF(__pyx_t_2);
35219     __Pyx_XGOTREF(__pyx_t_3);
35220     __Pyx_XGOTREF(__pyx_t_4);
35221     /*try:*/ {
35222 
35223       /* "View.MemoryView":489
35224  *         bytesitem = itemp[:self.view.itemsize]
35225  *         try:
35226  *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
35227  *         except struct.error:
35228  *             raise ValueError("Unable to convert item to object")
35229  */
35230       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 489, __pyx_L3_error)
35231       __Pyx_GOTREF(__pyx_t_5);
35232       __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 489, __pyx_L3_error)
35233       __Pyx_GOTREF(__pyx_t_6);
35234       __pyx_t_7 = NULL;
35235       __pyx_t_8 = 0;
35236       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
35237         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
35238         if (likely(__pyx_t_7)) {
35239           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
35240           __Pyx_INCREF(__pyx_t_7);
35241           __Pyx_INCREF(function);
35242           __Pyx_DECREF_SET(__pyx_t_5, function);
35243           __pyx_t_8 = 1;
35244         }
35245       }
35246       #if CYTHON_FAST_PYCALL
35247       if (PyFunction_Check(__pyx_t_5)) {
35248         PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
35249         __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(1, 489, __pyx_L3_error)
35250         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
35251         __Pyx_GOTREF(__pyx_t_1);
35252         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
35253       } else
35254       #endif
35255       #if CYTHON_FAST_PYCCALL
35256       if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
35257         PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
35258         __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(1, 489, __pyx_L3_error)
35259         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
35260         __Pyx_GOTREF(__pyx_t_1);
35261         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
35262       } else
35263       #endif
35264       {
35265         __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 489, __pyx_L3_error)
35266         __Pyx_GOTREF(__pyx_t_9);
35267         if (__pyx_t_7) {
35268           __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
35269         }
35270         __Pyx_GIVEREF(__pyx_t_6);
35271         PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
35272         __Pyx_INCREF(__pyx_v_bytesitem);
35273         __Pyx_GIVEREF(__pyx_v_bytesitem);
35274         PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
35275         __pyx_t_6 = 0;
35276         __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L3_error)
35277         __Pyx_GOTREF(__pyx_t_1);
35278         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
35279       }
35280       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
35281       __pyx_v_result = __pyx_t_1;
35282       __pyx_t_1 = 0;
35283 
35284       /* "View.MemoryView":488
35285  *
35286  *         bytesitem = itemp[:self.view.itemsize]
35287  *         try:             # <<<<<<<<<<<<<<
35288  *             result = struct.unpack(self.view.format, bytesitem)
35289  *         except struct.error:
35290  */
35291     }
35292 
35293     /* "View.MemoryView":493
35294  *             raise ValueError("Unable to convert item to object")
35295  *         else:
35296  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
35297  *                 return result[0]
35298  *             return result
35299  */
35300     /*else:*/ {
35301       __pyx_t_10 = strlen(__pyx_v_self->view.format);
35302       __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
35303       if (__pyx_t_11) {
35304 
35305         /* "View.MemoryView":494
35306  *         else:
35307  *             if len(self.view.format) == 1:
35308  *                 return result[0]             # <<<<<<<<<<<<<<
35309  *             return result
35310  *
35311  */
35312         __Pyx_XDECREF(__pyx_r);
35313         __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(1, 494, __pyx_L5_except_error)
35314         __Pyx_GOTREF(__pyx_t_1);
35315         __pyx_r = __pyx_t_1;
35316         __pyx_t_1 = 0;
35317         goto __pyx_L6_except_return;
35318 
35319         /* "View.MemoryView":493
35320  *             raise ValueError("Unable to convert item to object")
35321  *         else:
35322  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
35323  *                 return result[0]
35324  *             return result
35325  */
35326       }
35327 
35328       /* "View.MemoryView":495
35329  *             if len(self.view.format) == 1:
35330  *                 return result[0]
35331  *             return result             # <<<<<<<<<<<<<<
35332  *
35333  *     cdef assign_item_from_object(self, char *itemp, object value):
35334  */
35335       __Pyx_XDECREF(__pyx_r);
35336       __Pyx_INCREF(__pyx_v_result);
35337       __pyx_r = __pyx_v_result;
35338       goto __pyx_L6_except_return;
35339     }
35340     __pyx_L3_error:;
35341     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
35342     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
35343     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
35344     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
35345     __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
35346 
35347     /* "View.MemoryView":490
35348  *         try:
35349  *             result = struct.unpack(self.view.format, bytesitem)
35350  *         except struct.error:             # <<<<<<<<<<<<<<
35351  *             raise ValueError("Unable to convert item to object")
35352  *         else:
35353  */
35354     __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
35355     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 490, __pyx_L5_except_error)
35356     __Pyx_GOTREF(__pyx_t_6);
35357     __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
35358     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
35359     __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
35360     __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
35361     if (__pyx_t_8) {
35362       __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
35363       if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 490, __pyx_L5_except_error)
35364       __Pyx_GOTREF(__pyx_t_9);
35365       __Pyx_GOTREF(__pyx_t_5);
35366       __Pyx_GOTREF(__pyx_t_1);
35367 
35368       /* "View.MemoryView":491
35369  *             result = struct.unpack(self.view.format, bytesitem)
35370  *         except struct.error:
35371  *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
35372  *         else:
35373  *             if len(self.view.format) == 1:
35374  */
35375       __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 491, __pyx_L5_except_error)
35376       __Pyx_GOTREF(__pyx_t_6);
35377       __Pyx_Raise(__pyx_t_6, 0, 0, 0);
35378       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
35379       __PYX_ERR(1, 491, __pyx_L5_except_error)
35380     }
35381     goto __pyx_L5_except_error;
35382     __pyx_L5_except_error:;
35383 
35384     /* "View.MemoryView":488
35385  *
35386  *         bytesitem = itemp[:self.view.itemsize]
35387  *         try:             # <<<<<<<<<<<<<<
35388  *             result = struct.unpack(self.view.format, bytesitem)
35389  *         except struct.error:
35390  */
35391     __Pyx_XGIVEREF(__pyx_t_2);
35392     __Pyx_XGIVEREF(__pyx_t_3);
35393     __Pyx_XGIVEREF(__pyx_t_4);
35394     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
35395     goto __pyx_L1_error;
35396     __pyx_L6_except_return:;
35397     __Pyx_XGIVEREF(__pyx_t_2);
35398     __Pyx_XGIVEREF(__pyx_t_3);
35399     __Pyx_XGIVEREF(__pyx_t_4);
35400     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
35401     goto __pyx_L0;
35402   }
35403 
35404   /* "View.MemoryView":481
35405  *         self.assign_item_from_object(itemp, value)
35406  *
35407  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
35408  *         """Only used if instantiated manually by the user, or if Cython doesn't
35409  *         know how to convert the type"""
35410  */
35411 
35412   /* function exit code */
35413   __pyx_L1_error:;
35414   __Pyx_XDECREF(__pyx_t_1);
35415   __Pyx_XDECREF(__pyx_t_5);
35416   __Pyx_XDECREF(__pyx_t_6);
35417   __Pyx_XDECREF(__pyx_t_7);
35418   __Pyx_XDECREF(__pyx_t_9);
35419   __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
35420   __pyx_r = 0;
35421   __pyx_L0:;
35422   __Pyx_XDECREF(__pyx_v_struct);
35423   __Pyx_XDECREF(__pyx_v_bytesitem);
35424   __Pyx_XDECREF(__pyx_v_result);
35425   __Pyx_XGIVEREF(__pyx_r);
35426   __Pyx_RefNannyFinishContext();
35427   return __pyx_r;
35428 }
35429 
35430 /* "View.MemoryView":497
35431  *             return result
35432  *
35433  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
35434  *         """Only used if instantiated manually by the user, or if Cython doesn't
35435  *         know how to convert the type"""
35436  */
35437 
__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj * __pyx_v_self,char * __pyx_v_itemp,PyObject * __pyx_v_value)35438 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
35439   PyObject *__pyx_v_struct = NULL;
35440   char __pyx_v_c;
35441   PyObject *__pyx_v_bytesvalue = 0;
35442   Py_ssize_t __pyx_v_i;
35443   PyObject *__pyx_r = NULL;
35444   __Pyx_RefNannyDeclarations
35445   PyObject *__pyx_t_1 = NULL;
35446   int __pyx_t_2;
35447   int __pyx_t_3;
35448   PyObject *__pyx_t_4 = NULL;
35449   PyObject *__pyx_t_5 = NULL;
35450   PyObject *__pyx_t_6 = NULL;
35451   int __pyx_t_7;
35452   PyObject *__pyx_t_8 = NULL;
35453   Py_ssize_t __pyx_t_9;
35454   PyObject *__pyx_t_10 = NULL;
35455   char *__pyx_t_11;
35456   char *__pyx_t_12;
35457   char *__pyx_t_13;
35458   char *__pyx_t_14;
35459   __Pyx_RefNannySetupContext("assign_item_from_object", 0);
35460 
35461   /* "View.MemoryView":500
35462  *         """Only used if instantiated manually by the user, or if Cython doesn't
35463  *         know how to convert the type"""
35464  *         import struct             # <<<<<<<<<<<<<<
35465  *         cdef char c
35466  *         cdef bytes bytesvalue
35467  */
35468   __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error)
35469   __Pyx_GOTREF(__pyx_t_1);
35470   __pyx_v_struct = __pyx_t_1;
35471   __pyx_t_1 = 0;
35472 
35473   /* "View.MemoryView":505
35474  *         cdef Py_ssize_t i
35475  *
35476  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
35477  *             bytesvalue = struct.pack(self.view.format, *value)
35478  *         else:
35479  */
35480   __pyx_t_2 = PyTuple_Check(__pyx_v_value);
35481   __pyx_t_3 = (__pyx_t_2 != 0);
35482   if (__pyx_t_3) {
35483 
35484     /* "View.MemoryView":506
35485  *
35486  *         if isinstance(value, tuple):
35487  *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
35488  *         else:
35489  *             bytesvalue = struct.pack(self.view.format, value)
35490  */
35491     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error)
35492     __Pyx_GOTREF(__pyx_t_1);
35493     __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error)
35494     __Pyx_GOTREF(__pyx_t_4);
35495     __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 506, __pyx_L1_error)
35496     __Pyx_GOTREF(__pyx_t_5);
35497     __Pyx_GIVEREF(__pyx_t_4);
35498     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
35499     __pyx_t_4 = 0;
35500     __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error)
35501     __Pyx_GOTREF(__pyx_t_4);
35502     __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 506, __pyx_L1_error)
35503     __Pyx_GOTREF(__pyx_t_6);
35504     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
35505     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
35506     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 506, __pyx_L1_error)
35507     __Pyx_GOTREF(__pyx_t_4);
35508     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
35509     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
35510     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(1, 506, __pyx_L1_error)
35511     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
35512     __pyx_t_4 = 0;
35513 
35514     /* "View.MemoryView":505
35515  *         cdef Py_ssize_t i
35516  *
35517  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
35518  *             bytesvalue = struct.pack(self.view.format, *value)
35519  *         else:
35520  */
35521     goto __pyx_L3;
35522   }
35523 
35524   /* "View.MemoryView":508
35525  *             bytesvalue = struct.pack(self.view.format, *value)
35526  *         else:
35527  *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
35528  *
35529  *         for i, c in enumerate(bytesvalue):
35530  */
35531   /*else*/ {
35532     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 508, __pyx_L1_error)
35533     __Pyx_GOTREF(__pyx_t_6);
35534     __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
35535     __Pyx_GOTREF(__pyx_t_1);
35536     __pyx_t_5 = NULL;
35537     __pyx_t_7 = 0;
35538     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
35539       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
35540       if (likely(__pyx_t_5)) {
35541         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
35542         __Pyx_INCREF(__pyx_t_5);
35543         __Pyx_INCREF(function);
35544         __Pyx_DECREF_SET(__pyx_t_6, function);
35545         __pyx_t_7 = 1;
35546       }
35547     }
35548     #if CYTHON_FAST_PYCALL
35549     if (PyFunction_Check(__pyx_t_6)) {
35550       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
35551       __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(1, 508, __pyx_L1_error)
35552       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
35553       __Pyx_GOTREF(__pyx_t_4);
35554       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
35555     } else
35556     #endif
35557     #if CYTHON_FAST_PYCCALL
35558     if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
35559       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
35560       __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(1, 508, __pyx_L1_error)
35561       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
35562       __Pyx_GOTREF(__pyx_t_4);
35563       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
35564     } else
35565     #endif
35566     {
35567       __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 508, __pyx_L1_error)
35568       __Pyx_GOTREF(__pyx_t_8);
35569       if (__pyx_t_5) {
35570         __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
35571       }
35572       __Pyx_GIVEREF(__pyx_t_1);
35573       PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
35574       __Pyx_INCREF(__pyx_v_value);
35575       __Pyx_GIVEREF(__pyx_v_value);
35576       PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
35577       __pyx_t_1 = 0;
35578       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 508, __pyx_L1_error)
35579       __Pyx_GOTREF(__pyx_t_4);
35580       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
35581     }
35582     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
35583     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(1, 508, __pyx_L1_error)
35584     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
35585     __pyx_t_4 = 0;
35586   }
35587   __pyx_L3:;
35588 
35589   /* "View.MemoryView":510
35590  *             bytesvalue = struct.pack(self.view.format, value)
35591  *
35592  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
35593  *             itemp[i] = c
35594  *
35595  */
35596   __pyx_t_9 = 0;
35597   if (unlikely(__pyx_v_bytesvalue == Py_None)) {
35598     PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
35599     __PYX_ERR(1, 510, __pyx_L1_error)
35600   }
35601   __Pyx_INCREF(__pyx_v_bytesvalue);
35602   __pyx_t_10 = __pyx_v_bytesvalue;
35603   __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
35604   __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
35605   for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
35606     __pyx_t_11 = __pyx_t_14;
35607     __pyx_v_c = (__pyx_t_11[0]);
35608 
35609     /* "View.MemoryView":511
35610  *
35611  *         for i, c in enumerate(bytesvalue):
35612  *             itemp[i] = c             # <<<<<<<<<<<<<<
35613  *
35614  *     @cname('getbuffer')
35615  */
35616     __pyx_v_i = __pyx_t_9;
35617 
35618     /* "View.MemoryView":510
35619  *             bytesvalue = struct.pack(self.view.format, value)
35620  *
35621  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
35622  *             itemp[i] = c
35623  *
35624  */
35625     __pyx_t_9 = (__pyx_t_9 + 1);
35626 
35627     /* "View.MemoryView":511
35628  *
35629  *         for i, c in enumerate(bytesvalue):
35630  *             itemp[i] = c             # <<<<<<<<<<<<<<
35631  *
35632  *     @cname('getbuffer')
35633  */
35634     (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
35635   }
35636   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35637 
35638   /* "View.MemoryView":497
35639  *             return result
35640  *
35641  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
35642  *         """Only used if instantiated manually by the user, or if Cython doesn't
35643  *         know how to convert the type"""
35644  */
35645 
35646   /* function exit code */
35647   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
35648   goto __pyx_L0;
35649   __pyx_L1_error:;
35650   __Pyx_XDECREF(__pyx_t_1);
35651   __Pyx_XDECREF(__pyx_t_4);
35652   __Pyx_XDECREF(__pyx_t_5);
35653   __Pyx_XDECREF(__pyx_t_6);
35654   __Pyx_XDECREF(__pyx_t_8);
35655   __Pyx_XDECREF(__pyx_t_10);
35656   __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
35657   __pyx_r = 0;
35658   __pyx_L0:;
35659   __Pyx_XDECREF(__pyx_v_struct);
35660   __Pyx_XDECREF(__pyx_v_bytesvalue);
35661   __Pyx_XGIVEREF(__pyx_r);
35662   __Pyx_RefNannyFinishContext();
35663   return __pyx_r;
35664 }
35665 
35666 /* "View.MemoryView":514
35667  *
35668  *     @cname('getbuffer')
35669  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
35670  *         if flags & PyBUF_WRITABLE and self.view.readonly:
35671  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
35672  */
35673 
35674 /* Python wrapper */
35675 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)35676 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
35677   int __pyx_r;
35678   __Pyx_RefNannyDeclarations
35679   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
35680   __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));
35681 
35682   /* function exit code */
35683   __Pyx_RefNannyFinishContext();
35684   return __pyx_r;
35685 }
35686 
__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)35687 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) {
35688   int __pyx_r;
35689   __Pyx_RefNannyDeclarations
35690   int __pyx_t_1;
35691   int __pyx_t_2;
35692   PyObject *__pyx_t_3 = NULL;
35693   Py_ssize_t *__pyx_t_4;
35694   char *__pyx_t_5;
35695   void *__pyx_t_6;
35696   int __pyx_t_7;
35697   Py_ssize_t __pyx_t_8;
35698   if (__pyx_v_info == NULL) {
35699     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
35700     return -1;
35701   }
35702   __Pyx_RefNannySetupContext("__getbuffer__", 0);
35703   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
35704   __Pyx_GIVEREF(__pyx_v_info->obj);
35705 
35706   /* "View.MemoryView":515
35707  *     @cname('getbuffer')
35708  *     def __getbuffer__(self, Py_buffer *info, int flags):
35709  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
35710  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
35711  *
35712  */
35713   __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
35714   if (__pyx_t_2) {
35715   } else {
35716     __pyx_t_1 = __pyx_t_2;
35717     goto __pyx_L4_bool_binop_done;
35718   }
35719   __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
35720   __pyx_t_1 = __pyx_t_2;
35721   __pyx_L4_bool_binop_done:;
35722   if (unlikely(__pyx_t_1)) {
35723 
35724     /* "View.MemoryView":516
35725  *     def __getbuffer__(self, Py_buffer *info, int flags):
35726  *         if flags & PyBUF_WRITABLE and self.view.readonly:
35727  *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
35728  *
35729  *         if flags & PyBUF_ND:
35730  */
35731     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
35732     __Pyx_GOTREF(__pyx_t_3);
35733     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
35734     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35735     __PYX_ERR(1, 516, __pyx_L1_error)
35736 
35737     /* "View.MemoryView":515
35738  *     @cname('getbuffer')
35739  *     def __getbuffer__(self, Py_buffer *info, int flags):
35740  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
35741  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
35742  *
35743  */
35744   }
35745 
35746   /* "View.MemoryView":518
35747  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
35748  *
35749  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
35750  *             info.shape = self.view.shape
35751  *         else:
35752  */
35753   __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
35754   if (__pyx_t_1) {
35755 
35756     /* "View.MemoryView":519
35757  *
35758  *         if flags & PyBUF_ND:
35759  *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
35760  *         else:
35761  *             info.shape = NULL
35762  */
35763     __pyx_t_4 = __pyx_v_self->view.shape;
35764     __pyx_v_info->shape = __pyx_t_4;
35765 
35766     /* "View.MemoryView":518
35767  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
35768  *
35769  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
35770  *             info.shape = self.view.shape
35771  *         else:
35772  */
35773     goto __pyx_L6;
35774   }
35775 
35776   /* "View.MemoryView":521
35777  *             info.shape = self.view.shape
35778  *         else:
35779  *             info.shape = NULL             # <<<<<<<<<<<<<<
35780  *
35781  *         if flags & PyBUF_STRIDES:
35782  */
35783   /*else*/ {
35784     __pyx_v_info->shape = NULL;
35785   }
35786   __pyx_L6:;
35787 
35788   /* "View.MemoryView":523
35789  *             info.shape = NULL
35790  *
35791  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
35792  *             info.strides = self.view.strides
35793  *         else:
35794  */
35795   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
35796   if (__pyx_t_1) {
35797 
35798     /* "View.MemoryView":524
35799  *
35800  *         if flags & PyBUF_STRIDES:
35801  *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
35802  *         else:
35803  *             info.strides = NULL
35804  */
35805     __pyx_t_4 = __pyx_v_self->view.strides;
35806     __pyx_v_info->strides = __pyx_t_4;
35807 
35808     /* "View.MemoryView":523
35809  *             info.shape = NULL
35810  *
35811  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
35812  *             info.strides = self.view.strides
35813  *         else:
35814  */
35815     goto __pyx_L7;
35816   }
35817 
35818   /* "View.MemoryView":526
35819  *             info.strides = self.view.strides
35820  *         else:
35821  *             info.strides = NULL             # <<<<<<<<<<<<<<
35822  *
35823  *         if flags & PyBUF_INDIRECT:
35824  */
35825   /*else*/ {
35826     __pyx_v_info->strides = NULL;
35827   }
35828   __pyx_L7:;
35829 
35830   /* "View.MemoryView":528
35831  *             info.strides = NULL
35832  *
35833  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
35834  *             info.suboffsets = self.view.suboffsets
35835  *         else:
35836  */
35837   __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
35838   if (__pyx_t_1) {
35839 
35840     /* "View.MemoryView":529
35841  *
35842  *         if flags & PyBUF_INDIRECT:
35843  *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
35844  *         else:
35845  *             info.suboffsets = NULL
35846  */
35847     __pyx_t_4 = __pyx_v_self->view.suboffsets;
35848     __pyx_v_info->suboffsets = __pyx_t_4;
35849 
35850     /* "View.MemoryView":528
35851  *             info.strides = NULL
35852  *
35853  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
35854  *             info.suboffsets = self.view.suboffsets
35855  *         else:
35856  */
35857     goto __pyx_L8;
35858   }
35859 
35860   /* "View.MemoryView":531
35861  *             info.suboffsets = self.view.suboffsets
35862  *         else:
35863  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
35864  *
35865  *         if flags & PyBUF_FORMAT:
35866  */
35867   /*else*/ {
35868     __pyx_v_info->suboffsets = NULL;
35869   }
35870   __pyx_L8:;
35871 
35872   /* "View.MemoryView":533
35873  *             info.suboffsets = NULL
35874  *
35875  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
35876  *             info.format = self.view.format
35877  *         else:
35878  */
35879   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
35880   if (__pyx_t_1) {
35881 
35882     /* "View.MemoryView":534
35883  *
35884  *         if flags & PyBUF_FORMAT:
35885  *             info.format = self.view.format             # <<<<<<<<<<<<<<
35886  *         else:
35887  *             info.format = NULL
35888  */
35889     __pyx_t_5 = __pyx_v_self->view.format;
35890     __pyx_v_info->format = __pyx_t_5;
35891 
35892     /* "View.MemoryView":533
35893  *             info.suboffsets = NULL
35894  *
35895  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
35896  *             info.format = self.view.format
35897  *         else:
35898  */
35899     goto __pyx_L9;
35900   }
35901 
35902   /* "View.MemoryView":536
35903  *             info.format = self.view.format
35904  *         else:
35905  *             info.format = NULL             # <<<<<<<<<<<<<<
35906  *
35907  *         info.buf = self.view.buf
35908  */
35909   /*else*/ {
35910     __pyx_v_info->format = NULL;
35911   }
35912   __pyx_L9:;
35913 
35914   /* "View.MemoryView":538
35915  *             info.format = NULL
35916  *
35917  *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
35918  *         info.ndim = self.view.ndim
35919  *         info.itemsize = self.view.itemsize
35920  */
35921   __pyx_t_6 = __pyx_v_self->view.buf;
35922   __pyx_v_info->buf = __pyx_t_6;
35923 
35924   /* "View.MemoryView":539
35925  *
35926  *         info.buf = self.view.buf
35927  *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
35928  *         info.itemsize = self.view.itemsize
35929  *         info.len = self.view.len
35930  */
35931   __pyx_t_7 = __pyx_v_self->view.ndim;
35932   __pyx_v_info->ndim = __pyx_t_7;
35933 
35934   /* "View.MemoryView":540
35935  *         info.buf = self.view.buf
35936  *         info.ndim = self.view.ndim
35937  *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
35938  *         info.len = self.view.len
35939  *         info.readonly = self.view.readonly
35940  */
35941   __pyx_t_8 = __pyx_v_self->view.itemsize;
35942   __pyx_v_info->itemsize = __pyx_t_8;
35943 
35944   /* "View.MemoryView":541
35945  *         info.ndim = self.view.ndim
35946  *         info.itemsize = self.view.itemsize
35947  *         info.len = self.view.len             # <<<<<<<<<<<<<<
35948  *         info.readonly = self.view.readonly
35949  *         info.obj = self
35950  */
35951   __pyx_t_8 = __pyx_v_self->view.len;
35952   __pyx_v_info->len = __pyx_t_8;
35953 
35954   /* "View.MemoryView":542
35955  *         info.itemsize = self.view.itemsize
35956  *         info.len = self.view.len
35957  *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
35958  *         info.obj = self
35959  *
35960  */
35961   __pyx_t_1 = __pyx_v_self->view.readonly;
35962   __pyx_v_info->readonly = __pyx_t_1;
35963 
35964   /* "View.MemoryView":543
35965  *         info.len = self.view.len
35966  *         info.readonly = self.view.readonly
35967  *         info.obj = self             # <<<<<<<<<<<<<<
35968  *
35969  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
35970  */
35971   __Pyx_INCREF(((PyObject *)__pyx_v_self));
35972   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
35973   __Pyx_GOTREF(__pyx_v_info->obj);
35974   __Pyx_DECREF(__pyx_v_info->obj);
35975   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
35976 
35977   /* "View.MemoryView":514
35978  *
35979  *     @cname('getbuffer')
35980  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
35981  *         if flags & PyBUF_WRITABLE and self.view.readonly:
35982  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
35983  */
35984 
35985   /* function exit code */
35986   __pyx_r = 0;
35987   goto __pyx_L0;
35988   __pyx_L1_error:;
35989   __Pyx_XDECREF(__pyx_t_3);
35990   __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35991   __pyx_r = -1;
35992   if (__pyx_v_info->obj != NULL) {
35993     __Pyx_GOTREF(__pyx_v_info->obj);
35994     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
35995   }
35996   goto __pyx_L2;
35997   __pyx_L0:;
35998   if (__pyx_v_info->obj == Py_None) {
35999     __Pyx_GOTREF(__pyx_v_info->obj);
36000     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
36001   }
36002   __pyx_L2:;
36003   __Pyx_RefNannyFinishContext();
36004   return __pyx_r;
36005 }
36006 
36007 /* "View.MemoryView":549
36008  *
36009  *     @property
36010  *     def T(self):             # <<<<<<<<<<<<<<
36011  *         cdef _memoryviewslice result = memoryview_copy(self)
36012  *         transpose_memslice(&result.from_slice)
36013  */
36014 
36015 /* Python wrapper */
36016 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)36017 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
36018   PyObject *__pyx_r = 0;
36019   __Pyx_RefNannyDeclarations
36020   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36021   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36022 
36023   /* function exit code */
36024   __Pyx_RefNannyFinishContext();
36025   return __pyx_r;
36026 }
36027 
__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj * __pyx_v_self)36028 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36029   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
36030   PyObject *__pyx_r = NULL;
36031   __Pyx_RefNannyDeclarations
36032   PyObject *__pyx_t_1 = NULL;
36033   int __pyx_t_2;
36034   __Pyx_RefNannySetupContext("__get__", 0);
36035 
36036   /* "View.MemoryView":550
36037  *     @property
36038  *     def T(self):
36039  *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
36040  *         transpose_memslice(&result.from_slice)
36041  *         return result
36042  */
36043   __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 550, __pyx_L1_error)
36044   __Pyx_GOTREF(__pyx_t_1);
36045   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 550, __pyx_L1_error)
36046   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
36047   __pyx_t_1 = 0;
36048 
36049   /* "View.MemoryView":551
36050  *     def T(self):
36051  *         cdef _memoryviewslice result = memoryview_copy(self)
36052  *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
36053  *         return result
36054  *
36055  */
36056   __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 551, __pyx_L1_error)
36057 
36058   /* "View.MemoryView":552
36059  *         cdef _memoryviewslice result = memoryview_copy(self)
36060  *         transpose_memslice(&result.from_slice)
36061  *         return result             # <<<<<<<<<<<<<<
36062  *
36063  *     @property
36064  */
36065   __Pyx_XDECREF(__pyx_r);
36066   __Pyx_INCREF(((PyObject *)__pyx_v_result));
36067   __pyx_r = ((PyObject *)__pyx_v_result);
36068   goto __pyx_L0;
36069 
36070   /* "View.MemoryView":549
36071  *
36072  *     @property
36073  *     def T(self):             # <<<<<<<<<<<<<<
36074  *         cdef _memoryviewslice result = memoryview_copy(self)
36075  *         transpose_memslice(&result.from_slice)
36076  */
36077 
36078   /* function exit code */
36079   __pyx_L1_error:;
36080   __Pyx_XDECREF(__pyx_t_1);
36081   __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36082   __pyx_r = NULL;
36083   __pyx_L0:;
36084   __Pyx_XDECREF((PyObject *)__pyx_v_result);
36085   __Pyx_XGIVEREF(__pyx_r);
36086   __Pyx_RefNannyFinishContext();
36087   return __pyx_r;
36088 }
36089 
36090 /* "View.MemoryView":555
36091  *
36092  *     @property
36093  *     def base(self):             # <<<<<<<<<<<<<<
36094  *         return self.obj
36095  *
36096  */
36097 
36098 /* Python wrapper */
36099 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)36100 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
36101   PyObject *__pyx_r = 0;
36102   __Pyx_RefNannyDeclarations
36103   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36104   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36105 
36106   /* function exit code */
36107   __Pyx_RefNannyFinishContext();
36108   return __pyx_r;
36109 }
36110 
__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj * __pyx_v_self)36111 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36112   PyObject *__pyx_r = NULL;
36113   __Pyx_RefNannyDeclarations
36114   __Pyx_RefNannySetupContext("__get__", 0);
36115 
36116   /* "View.MemoryView":556
36117  *     @property
36118  *     def base(self):
36119  *         return self.obj             # <<<<<<<<<<<<<<
36120  *
36121  *     @property
36122  */
36123   __Pyx_XDECREF(__pyx_r);
36124   __Pyx_INCREF(__pyx_v_self->obj);
36125   __pyx_r = __pyx_v_self->obj;
36126   goto __pyx_L0;
36127 
36128   /* "View.MemoryView":555
36129  *
36130  *     @property
36131  *     def base(self):             # <<<<<<<<<<<<<<
36132  *         return self.obj
36133  *
36134  */
36135 
36136   /* function exit code */
36137   __pyx_L0:;
36138   __Pyx_XGIVEREF(__pyx_r);
36139   __Pyx_RefNannyFinishContext();
36140   return __pyx_r;
36141 }
36142 
36143 /* "View.MemoryView":559
36144  *
36145  *     @property
36146  *     def shape(self):             # <<<<<<<<<<<<<<
36147  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
36148  *
36149  */
36150 
36151 /* Python wrapper */
36152 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)36153 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
36154   PyObject *__pyx_r = 0;
36155   __Pyx_RefNannyDeclarations
36156   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36157   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36158 
36159   /* function exit code */
36160   __Pyx_RefNannyFinishContext();
36161   return __pyx_r;
36162 }
36163 
__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj * __pyx_v_self)36164 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36165   Py_ssize_t __pyx_v_length;
36166   PyObject *__pyx_r = NULL;
36167   __Pyx_RefNannyDeclarations
36168   PyObject *__pyx_t_1 = NULL;
36169   Py_ssize_t *__pyx_t_2;
36170   Py_ssize_t *__pyx_t_3;
36171   Py_ssize_t *__pyx_t_4;
36172   PyObject *__pyx_t_5 = NULL;
36173   __Pyx_RefNannySetupContext("__get__", 0);
36174 
36175   /* "View.MemoryView":560
36176  *     @property
36177  *     def shape(self):
36178  *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
36179  *
36180  *     @property
36181  */
36182   __Pyx_XDECREF(__pyx_r);
36183   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 560, __pyx_L1_error)
36184   __Pyx_GOTREF(__pyx_t_1);
36185   __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
36186   for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
36187     __pyx_t_2 = __pyx_t_4;
36188     __pyx_v_length = (__pyx_t_2[0]);
36189     __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 560, __pyx_L1_error)
36190     __Pyx_GOTREF(__pyx_t_5);
36191     if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 560, __pyx_L1_error)
36192     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
36193   }
36194   __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 560, __pyx_L1_error)
36195   __Pyx_GOTREF(__pyx_t_5);
36196   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36197   __pyx_r = __pyx_t_5;
36198   __pyx_t_5 = 0;
36199   goto __pyx_L0;
36200 
36201   /* "View.MemoryView":559
36202  *
36203  *     @property
36204  *     def shape(self):             # <<<<<<<<<<<<<<
36205  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
36206  *
36207  */
36208 
36209   /* function exit code */
36210   __pyx_L1_error:;
36211   __Pyx_XDECREF(__pyx_t_1);
36212   __Pyx_XDECREF(__pyx_t_5);
36213   __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36214   __pyx_r = NULL;
36215   __pyx_L0:;
36216   __Pyx_XGIVEREF(__pyx_r);
36217   __Pyx_RefNannyFinishContext();
36218   return __pyx_r;
36219 }
36220 
36221 /* "View.MemoryView":563
36222  *
36223  *     @property
36224  *     def strides(self):             # <<<<<<<<<<<<<<
36225  *         if self.view.strides == NULL:
36226  *
36227  */
36228 
36229 /* Python wrapper */
36230 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)36231 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
36232   PyObject *__pyx_r = 0;
36233   __Pyx_RefNannyDeclarations
36234   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36235   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36236 
36237   /* function exit code */
36238   __Pyx_RefNannyFinishContext();
36239   return __pyx_r;
36240 }
36241 
__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj * __pyx_v_self)36242 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36243   Py_ssize_t __pyx_v_stride;
36244   PyObject *__pyx_r = NULL;
36245   __Pyx_RefNannyDeclarations
36246   int __pyx_t_1;
36247   PyObject *__pyx_t_2 = NULL;
36248   Py_ssize_t *__pyx_t_3;
36249   Py_ssize_t *__pyx_t_4;
36250   Py_ssize_t *__pyx_t_5;
36251   PyObject *__pyx_t_6 = NULL;
36252   __Pyx_RefNannySetupContext("__get__", 0);
36253 
36254   /* "View.MemoryView":564
36255  *     @property
36256  *     def strides(self):
36257  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
36258  *
36259  *             raise ValueError("Buffer view does not expose strides")
36260  */
36261   __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
36262   if (unlikely(__pyx_t_1)) {
36263 
36264     /* "View.MemoryView":566
36265  *         if self.view.strides == NULL:
36266  *
36267  *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
36268  *
36269  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
36270  */
36271     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error)
36272     __Pyx_GOTREF(__pyx_t_2);
36273     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
36274     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36275     __PYX_ERR(1, 566, __pyx_L1_error)
36276 
36277     /* "View.MemoryView":564
36278  *     @property
36279  *     def strides(self):
36280  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
36281  *
36282  *             raise ValueError("Buffer view does not expose strides")
36283  */
36284   }
36285 
36286   /* "View.MemoryView":568
36287  *             raise ValueError("Buffer view does not expose strides")
36288  *
36289  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
36290  *
36291  *     @property
36292  */
36293   __Pyx_XDECREF(__pyx_r);
36294   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 568, __pyx_L1_error)
36295   __Pyx_GOTREF(__pyx_t_2);
36296   __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
36297   for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
36298     __pyx_t_3 = __pyx_t_5;
36299     __pyx_v_stride = (__pyx_t_3[0]);
36300     __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L1_error)
36301     __Pyx_GOTREF(__pyx_t_6);
36302     if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 568, __pyx_L1_error)
36303     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
36304   }
36305   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 568, __pyx_L1_error)
36306   __Pyx_GOTREF(__pyx_t_6);
36307   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36308   __pyx_r = __pyx_t_6;
36309   __pyx_t_6 = 0;
36310   goto __pyx_L0;
36311 
36312   /* "View.MemoryView":563
36313  *
36314  *     @property
36315  *     def strides(self):             # <<<<<<<<<<<<<<
36316  *         if self.view.strides == NULL:
36317  *
36318  */
36319 
36320   /* function exit code */
36321   __pyx_L1_error:;
36322   __Pyx_XDECREF(__pyx_t_2);
36323   __Pyx_XDECREF(__pyx_t_6);
36324   __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36325   __pyx_r = NULL;
36326   __pyx_L0:;
36327   __Pyx_XGIVEREF(__pyx_r);
36328   __Pyx_RefNannyFinishContext();
36329   return __pyx_r;
36330 }
36331 
36332 /* "View.MemoryView":571
36333  *
36334  *     @property
36335  *     def suboffsets(self):             # <<<<<<<<<<<<<<
36336  *         if self.view.suboffsets == NULL:
36337  *             return (-1,) * self.view.ndim
36338  */
36339 
36340 /* Python wrapper */
36341 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)36342 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
36343   PyObject *__pyx_r = 0;
36344   __Pyx_RefNannyDeclarations
36345   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36346   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36347 
36348   /* function exit code */
36349   __Pyx_RefNannyFinishContext();
36350   return __pyx_r;
36351 }
36352 
__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj * __pyx_v_self)36353 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36354   Py_ssize_t __pyx_v_suboffset;
36355   PyObject *__pyx_r = NULL;
36356   __Pyx_RefNannyDeclarations
36357   int __pyx_t_1;
36358   PyObject *__pyx_t_2 = NULL;
36359   PyObject *__pyx_t_3 = NULL;
36360   Py_ssize_t *__pyx_t_4;
36361   Py_ssize_t *__pyx_t_5;
36362   Py_ssize_t *__pyx_t_6;
36363   __Pyx_RefNannySetupContext("__get__", 0);
36364 
36365   /* "View.MemoryView":572
36366  *     @property
36367  *     def suboffsets(self):
36368  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
36369  *             return (-1,) * self.view.ndim
36370  *
36371  */
36372   __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
36373   if (__pyx_t_1) {
36374 
36375     /* "View.MemoryView":573
36376  *     def suboffsets(self):
36377  *         if self.view.suboffsets == NULL:
36378  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
36379  *
36380  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
36381  */
36382     __Pyx_XDECREF(__pyx_r);
36383     __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 573, __pyx_L1_error)
36384     __Pyx_GOTREF(__pyx_t_2);
36385     __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__40, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 573, __pyx_L1_error)
36386     __Pyx_GOTREF(__pyx_t_3);
36387     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36388     __pyx_r = __pyx_t_3;
36389     __pyx_t_3 = 0;
36390     goto __pyx_L0;
36391 
36392     /* "View.MemoryView":572
36393  *     @property
36394  *     def suboffsets(self):
36395  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
36396  *             return (-1,) * self.view.ndim
36397  *
36398  */
36399   }
36400 
36401   /* "View.MemoryView":575
36402  *             return (-1,) * self.view.ndim
36403  *
36404  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
36405  *
36406  *     @property
36407  */
36408   __Pyx_XDECREF(__pyx_r);
36409   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 575, __pyx_L1_error)
36410   __Pyx_GOTREF(__pyx_t_3);
36411   __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
36412   for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
36413     __pyx_t_4 = __pyx_t_6;
36414     __pyx_v_suboffset = (__pyx_t_4[0]);
36415     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error)
36416     __Pyx_GOTREF(__pyx_t_2);
36417     if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 575, __pyx_L1_error)
36418     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36419   }
36420   __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 575, __pyx_L1_error)
36421   __Pyx_GOTREF(__pyx_t_2);
36422   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
36423   __pyx_r = __pyx_t_2;
36424   __pyx_t_2 = 0;
36425   goto __pyx_L0;
36426 
36427   /* "View.MemoryView":571
36428  *
36429  *     @property
36430  *     def suboffsets(self):             # <<<<<<<<<<<<<<
36431  *         if self.view.suboffsets == NULL:
36432  *             return (-1,) * self.view.ndim
36433  */
36434 
36435   /* function exit code */
36436   __pyx_L1_error:;
36437   __Pyx_XDECREF(__pyx_t_2);
36438   __Pyx_XDECREF(__pyx_t_3);
36439   __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36440   __pyx_r = NULL;
36441   __pyx_L0:;
36442   __Pyx_XGIVEREF(__pyx_r);
36443   __Pyx_RefNannyFinishContext();
36444   return __pyx_r;
36445 }
36446 
36447 /* "View.MemoryView":578
36448  *
36449  *     @property
36450  *     def ndim(self):             # <<<<<<<<<<<<<<
36451  *         return self.view.ndim
36452  *
36453  */
36454 
36455 /* Python wrapper */
36456 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)36457 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
36458   PyObject *__pyx_r = 0;
36459   __Pyx_RefNannyDeclarations
36460   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36461   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36462 
36463   /* function exit code */
36464   __Pyx_RefNannyFinishContext();
36465   return __pyx_r;
36466 }
36467 
__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj * __pyx_v_self)36468 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36469   PyObject *__pyx_r = NULL;
36470   __Pyx_RefNannyDeclarations
36471   PyObject *__pyx_t_1 = NULL;
36472   __Pyx_RefNannySetupContext("__get__", 0);
36473 
36474   /* "View.MemoryView":579
36475  *     @property
36476  *     def ndim(self):
36477  *         return self.view.ndim             # <<<<<<<<<<<<<<
36478  *
36479  *     @property
36480  */
36481   __Pyx_XDECREF(__pyx_r);
36482   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 579, __pyx_L1_error)
36483   __Pyx_GOTREF(__pyx_t_1);
36484   __pyx_r = __pyx_t_1;
36485   __pyx_t_1 = 0;
36486   goto __pyx_L0;
36487 
36488   /* "View.MemoryView":578
36489  *
36490  *     @property
36491  *     def ndim(self):             # <<<<<<<<<<<<<<
36492  *         return self.view.ndim
36493  *
36494  */
36495 
36496   /* function exit code */
36497   __pyx_L1_error:;
36498   __Pyx_XDECREF(__pyx_t_1);
36499   __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36500   __pyx_r = NULL;
36501   __pyx_L0:;
36502   __Pyx_XGIVEREF(__pyx_r);
36503   __Pyx_RefNannyFinishContext();
36504   return __pyx_r;
36505 }
36506 
36507 /* "View.MemoryView":582
36508  *
36509  *     @property
36510  *     def itemsize(self):             # <<<<<<<<<<<<<<
36511  *         return self.view.itemsize
36512  *
36513  */
36514 
36515 /* Python wrapper */
36516 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)36517 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
36518   PyObject *__pyx_r = 0;
36519   __Pyx_RefNannyDeclarations
36520   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36521   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36522 
36523   /* function exit code */
36524   __Pyx_RefNannyFinishContext();
36525   return __pyx_r;
36526 }
36527 
__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj * __pyx_v_self)36528 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36529   PyObject *__pyx_r = NULL;
36530   __Pyx_RefNannyDeclarations
36531   PyObject *__pyx_t_1 = NULL;
36532   __Pyx_RefNannySetupContext("__get__", 0);
36533 
36534   /* "View.MemoryView":583
36535  *     @property
36536  *     def itemsize(self):
36537  *         return self.view.itemsize             # <<<<<<<<<<<<<<
36538  *
36539  *     @property
36540  */
36541   __Pyx_XDECREF(__pyx_r);
36542   __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error)
36543   __Pyx_GOTREF(__pyx_t_1);
36544   __pyx_r = __pyx_t_1;
36545   __pyx_t_1 = 0;
36546   goto __pyx_L0;
36547 
36548   /* "View.MemoryView":582
36549  *
36550  *     @property
36551  *     def itemsize(self):             # <<<<<<<<<<<<<<
36552  *         return self.view.itemsize
36553  *
36554  */
36555 
36556   /* function exit code */
36557   __pyx_L1_error:;
36558   __Pyx_XDECREF(__pyx_t_1);
36559   __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36560   __pyx_r = NULL;
36561   __pyx_L0:;
36562   __Pyx_XGIVEREF(__pyx_r);
36563   __Pyx_RefNannyFinishContext();
36564   return __pyx_r;
36565 }
36566 
36567 /* "View.MemoryView":586
36568  *
36569  *     @property
36570  *     def nbytes(self):             # <<<<<<<<<<<<<<
36571  *         return self.size * self.view.itemsize
36572  *
36573  */
36574 
36575 /* Python wrapper */
36576 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)36577 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
36578   PyObject *__pyx_r = 0;
36579   __Pyx_RefNannyDeclarations
36580   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36581   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36582 
36583   /* function exit code */
36584   __Pyx_RefNannyFinishContext();
36585   return __pyx_r;
36586 }
36587 
__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj * __pyx_v_self)36588 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36589   PyObject *__pyx_r = NULL;
36590   __Pyx_RefNannyDeclarations
36591   PyObject *__pyx_t_1 = NULL;
36592   PyObject *__pyx_t_2 = NULL;
36593   PyObject *__pyx_t_3 = NULL;
36594   __Pyx_RefNannySetupContext("__get__", 0);
36595 
36596   /* "View.MemoryView":587
36597  *     @property
36598  *     def nbytes(self):
36599  *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
36600  *
36601  *     @property
36602  */
36603   __Pyx_XDECREF(__pyx_r);
36604   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 587, __pyx_L1_error)
36605   __Pyx_GOTREF(__pyx_t_1);
36606   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 587, __pyx_L1_error)
36607   __Pyx_GOTREF(__pyx_t_2);
36608   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 587, __pyx_L1_error)
36609   __Pyx_GOTREF(__pyx_t_3);
36610   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36611   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36612   __pyx_r = __pyx_t_3;
36613   __pyx_t_3 = 0;
36614   goto __pyx_L0;
36615 
36616   /* "View.MemoryView":586
36617  *
36618  *     @property
36619  *     def nbytes(self):             # <<<<<<<<<<<<<<
36620  *         return self.size * self.view.itemsize
36621  *
36622  */
36623 
36624   /* function exit code */
36625   __pyx_L1_error:;
36626   __Pyx_XDECREF(__pyx_t_1);
36627   __Pyx_XDECREF(__pyx_t_2);
36628   __Pyx_XDECREF(__pyx_t_3);
36629   __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36630   __pyx_r = NULL;
36631   __pyx_L0:;
36632   __Pyx_XGIVEREF(__pyx_r);
36633   __Pyx_RefNannyFinishContext();
36634   return __pyx_r;
36635 }
36636 
36637 /* "View.MemoryView":590
36638  *
36639  *     @property
36640  *     def size(self):             # <<<<<<<<<<<<<<
36641  *         if self._size is None:
36642  *             result = 1
36643  */
36644 
36645 /* Python wrapper */
36646 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)36647 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
36648   PyObject *__pyx_r = 0;
36649   __Pyx_RefNannyDeclarations
36650   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36651   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36652 
36653   /* function exit code */
36654   __Pyx_RefNannyFinishContext();
36655   return __pyx_r;
36656 }
36657 
__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj * __pyx_v_self)36658 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
36659   PyObject *__pyx_v_result = NULL;
36660   PyObject *__pyx_v_length = NULL;
36661   PyObject *__pyx_r = NULL;
36662   __Pyx_RefNannyDeclarations
36663   int __pyx_t_1;
36664   int __pyx_t_2;
36665   Py_ssize_t *__pyx_t_3;
36666   Py_ssize_t *__pyx_t_4;
36667   Py_ssize_t *__pyx_t_5;
36668   PyObject *__pyx_t_6 = NULL;
36669   __Pyx_RefNannySetupContext("__get__", 0);
36670 
36671   /* "View.MemoryView":591
36672  *     @property
36673  *     def size(self):
36674  *         if self._size is None:             # <<<<<<<<<<<<<<
36675  *             result = 1
36676  *
36677  */
36678   __pyx_t_1 = (__pyx_v_self->_size == Py_None);
36679   __pyx_t_2 = (__pyx_t_1 != 0);
36680   if (__pyx_t_2) {
36681 
36682     /* "View.MemoryView":592
36683  *     def size(self):
36684  *         if self._size is None:
36685  *             result = 1             # <<<<<<<<<<<<<<
36686  *
36687  *             for length in self.view.shape[:self.view.ndim]:
36688  */
36689     __Pyx_INCREF(__pyx_int_1);
36690     __pyx_v_result = __pyx_int_1;
36691 
36692     /* "View.MemoryView":594
36693  *             result = 1
36694  *
36695  *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
36696  *                 result *= length
36697  *
36698  */
36699     __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
36700     for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
36701       __pyx_t_3 = __pyx_t_5;
36702       __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 594, __pyx_L1_error)
36703       __Pyx_GOTREF(__pyx_t_6);
36704       __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
36705       __pyx_t_6 = 0;
36706 
36707       /* "View.MemoryView":595
36708  *
36709  *             for length in self.view.shape[:self.view.ndim]:
36710  *                 result *= length             # <<<<<<<<<<<<<<
36711  *
36712  *             self._size = result
36713  */
36714       __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 595, __pyx_L1_error)
36715       __Pyx_GOTREF(__pyx_t_6);
36716       __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
36717       __pyx_t_6 = 0;
36718     }
36719 
36720     /* "View.MemoryView":597
36721  *                 result *= length
36722  *
36723  *             self._size = result             # <<<<<<<<<<<<<<
36724  *
36725  *         return self._size
36726  */
36727     __Pyx_INCREF(__pyx_v_result);
36728     __Pyx_GIVEREF(__pyx_v_result);
36729     __Pyx_GOTREF(__pyx_v_self->_size);
36730     __Pyx_DECREF(__pyx_v_self->_size);
36731     __pyx_v_self->_size = __pyx_v_result;
36732 
36733     /* "View.MemoryView":591
36734  *     @property
36735  *     def size(self):
36736  *         if self._size is None:             # <<<<<<<<<<<<<<
36737  *             result = 1
36738  *
36739  */
36740   }
36741 
36742   /* "View.MemoryView":599
36743  *             self._size = result
36744  *
36745  *         return self._size             # <<<<<<<<<<<<<<
36746  *
36747  *     def __len__(self):
36748  */
36749   __Pyx_XDECREF(__pyx_r);
36750   __Pyx_INCREF(__pyx_v_self->_size);
36751   __pyx_r = __pyx_v_self->_size;
36752   goto __pyx_L0;
36753 
36754   /* "View.MemoryView":590
36755  *
36756  *     @property
36757  *     def size(self):             # <<<<<<<<<<<<<<
36758  *         if self._size is None:
36759  *             result = 1
36760  */
36761 
36762   /* function exit code */
36763   __pyx_L1_error:;
36764   __Pyx_XDECREF(__pyx_t_6);
36765   __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36766   __pyx_r = NULL;
36767   __pyx_L0:;
36768   __Pyx_XDECREF(__pyx_v_result);
36769   __Pyx_XDECREF(__pyx_v_length);
36770   __Pyx_XGIVEREF(__pyx_r);
36771   __Pyx_RefNannyFinishContext();
36772   return __pyx_r;
36773 }
36774 
36775 /* "View.MemoryView":601
36776  *         return self._size
36777  *
36778  *     def __len__(self):             # <<<<<<<<<<<<<<
36779  *         if self.view.ndim >= 1:
36780  *             return self.view.shape[0]
36781  */
36782 
36783 /* Python wrapper */
36784 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___len__(PyObject * __pyx_v_self)36785 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
36786   Py_ssize_t __pyx_r;
36787   __Pyx_RefNannyDeclarations
36788   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
36789   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36790 
36791   /* function exit code */
36792   __Pyx_RefNannyFinishContext();
36793   return __pyx_r;
36794 }
36795 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj * __pyx_v_self)36796 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
36797   Py_ssize_t __pyx_r;
36798   __Pyx_RefNannyDeclarations
36799   int __pyx_t_1;
36800   __Pyx_RefNannySetupContext("__len__", 0);
36801 
36802   /* "View.MemoryView":602
36803  *
36804  *     def __len__(self):
36805  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
36806  *             return self.view.shape[0]
36807  *
36808  */
36809   __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
36810   if (__pyx_t_1) {
36811 
36812     /* "View.MemoryView":603
36813  *     def __len__(self):
36814  *         if self.view.ndim >= 1:
36815  *             return self.view.shape[0]             # <<<<<<<<<<<<<<
36816  *
36817  *         return 0
36818  */
36819     __pyx_r = (__pyx_v_self->view.shape[0]);
36820     goto __pyx_L0;
36821 
36822     /* "View.MemoryView":602
36823  *
36824  *     def __len__(self):
36825  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
36826  *             return self.view.shape[0]
36827  *
36828  */
36829   }
36830 
36831   /* "View.MemoryView":605
36832  *             return self.view.shape[0]
36833  *
36834  *         return 0             # <<<<<<<<<<<<<<
36835  *
36836  *     def __repr__(self):
36837  */
36838   __pyx_r = 0;
36839   goto __pyx_L0;
36840 
36841   /* "View.MemoryView":601
36842  *         return self._size
36843  *
36844  *     def __len__(self):             # <<<<<<<<<<<<<<
36845  *         if self.view.ndim >= 1:
36846  *             return self.view.shape[0]
36847  */
36848 
36849   /* function exit code */
36850   __pyx_L0:;
36851   __Pyx_RefNannyFinishContext();
36852   return __pyx_r;
36853 }
36854 
36855 /* "View.MemoryView":607
36856  *         return 0
36857  *
36858  *     def __repr__(self):             # <<<<<<<<<<<<<<
36859  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
36860  *                                                id(self))
36861  */
36862 
36863 /* Python wrapper */
36864 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___repr__(PyObject * __pyx_v_self)36865 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
36866   PyObject *__pyx_r = 0;
36867   __Pyx_RefNannyDeclarations
36868   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
36869   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36870 
36871   /* function exit code */
36872   __Pyx_RefNannyFinishContext();
36873   return __pyx_r;
36874 }
36875 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj * __pyx_v_self)36876 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
36877   PyObject *__pyx_r = NULL;
36878   __Pyx_RefNannyDeclarations
36879   PyObject *__pyx_t_1 = NULL;
36880   PyObject *__pyx_t_2 = NULL;
36881   PyObject *__pyx_t_3 = NULL;
36882   __Pyx_RefNannySetupContext("__repr__", 0);
36883 
36884   /* "View.MemoryView":608
36885  *
36886  *     def __repr__(self):
36887  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
36888  *                                                id(self))
36889  *
36890  */
36891   __Pyx_XDECREF(__pyx_r);
36892   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 608, __pyx_L1_error)
36893   __Pyx_GOTREF(__pyx_t_1);
36894   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 608, __pyx_L1_error)
36895   __Pyx_GOTREF(__pyx_t_2);
36896   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36897   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 608, __pyx_L1_error)
36898   __Pyx_GOTREF(__pyx_t_1);
36899   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36900 
36901   /* "View.MemoryView":609
36902  *     def __repr__(self):
36903  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
36904  *                                                id(self))             # <<<<<<<<<<<<<<
36905  *
36906  *     def __str__(self):
36907  */
36908   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 609, __pyx_L1_error)
36909   __Pyx_GOTREF(__pyx_t_2);
36910 
36911   /* "View.MemoryView":608
36912  *
36913  *     def __repr__(self):
36914  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
36915  *                                                id(self))
36916  *
36917  */
36918   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 608, __pyx_L1_error)
36919   __Pyx_GOTREF(__pyx_t_3);
36920   __Pyx_GIVEREF(__pyx_t_1);
36921   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
36922   __Pyx_GIVEREF(__pyx_t_2);
36923   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
36924   __pyx_t_1 = 0;
36925   __pyx_t_2 = 0;
36926   __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(1, 608, __pyx_L1_error)
36927   __Pyx_GOTREF(__pyx_t_2);
36928   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
36929   __pyx_r = __pyx_t_2;
36930   __pyx_t_2 = 0;
36931   goto __pyx_L0;
36932 
36933   /* "View.MemoryView":607
36934  *         return 0
36935  *
36936  *     def __repr__(self):             # <<<<<<<<<<<<<<
36937  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
36938  *                                                id(self))
36939  */
36940 
36941   /* function exit code */
36942   __pyx_L1_error:;
36943   __Pyx_XDECREF(__pyx_t_1);
36944   __Pyx_XDECREF(__pyx_t_2);
36945   __Pyx_XDECREF(__pyx_t_3);
36946   __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36947   __pyx_r = NULL;
36948   __pyx_L0:;
36949   __Pyx_XGIVEREF(__pyx_r);
36950   __Pyx_RefNannyFinishContext();
36951   return __pyx_r;
36952 }
36953 
36954 /* "View.MemoryView":611
36955  *                                                id(self))
36956  *
36957  *     def __str__(self):             # <<<<<<<<<<<<<<
36958  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
36959  *
36960  */
36961 
36962 /* Python wrapper */
36963 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___str__(PyObject * __pyx_v_self)36964 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
36965   PyObject *__pyx_r = 0;
36966   __Pyx_RefNannyDeclarations
36967   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
36968   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
36969 
36970   /* function exit code */
36971   __Pyx_RefNannyFinishContext();
36972   return __pyx_r;
36973 }
36974 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj * __pyx_v_self)36975 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
36976   PyObject *__pyx_r = NULL;
36977   __Pyx_RefNannyDeclarations
36978   PyObject *__pyx_t_1 = NULL;
36979   PyObject *__pyx_t_2 = NULL;
36980   __Pyx_RefNannySetupContext("__str__", 0);
36981 
36982   /* "View.MemoryView":612
36983  *
36984  *     def __str__(self):
36985  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
36986  *
36987  *
36988  */
36989   __Pyx_XDECREF(__pyx_r);
36990   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
36991   __Pyx_GOTREF(__pyx_t_1);
36992   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
36993   __Pyx_GOTREF(__pyx_t_2);
36994   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36995   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
36996   __Pyx_GOTREF(__pyx_t_1);
36997   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36998   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
36999   __Pyx_GOTREF(__pyx_t_2);
37000   __Pyx_GIVEREF(__pyx_t_1);
37001   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
37002   __pyx_t_1 = 0;
37003   __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
37004   __Pyx_GOTREF(__pyx_t_1);
37005   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37006   __pyx_r = __pyx_t_1;
37007   __pyx_t_1 = 0;
37008   goto __pyx_L0;
37009 
37010   /* "View.MemoryView":611
37011  *                                                id(self))
37012  *
37013  *     def __str__(self):             # <<<<<<<<<<<<<<
37014  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
37015  *
37016  */
37017 
37018   /* function exit code */
37019   __pyx_L1_error:;
37020   __Pyx_XDECREF(__pyx_t_1);
37021   __Pyx_XDECREF(__pyx_t_2);
37022   __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37023   __pyx_r = NULL;
37024   __pyx_L0:;
37025   __Pyx_XGIVEREF(__pyx_r);
37026   __Pyx_RefNannyFinishContext();
37027   return __pyx_r;
37028 }
37029 
37030 /* "View.MemoryView":615
37031  *
37032  *
37033  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
37034  *         cdef __Pyx_memviewslice *mslice
37035  *         cdef __Pyx_memviewslice tmp
37036  */
37037 
37038 /* Python wrapper */
37039 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)37040 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
37041   PyObject *__pyx_r = 0;
37042   __Pyx_RefNannyDeclarations
37043   __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
37044   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
37045 
37046   /* function exit code */
37047   __Pyx_RefNannyFinishContext();
37048   return __pyx_r;
37049 }
37050 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj * __pyx_v_self)37051 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
37052   __Pyx_memviewslice *__pyx_v_mslice;
37053   __Pyx_memviewslice __pyx_v_tmp;
37054   PyObject *__pyx_r = NULL;
37055   __Pyx_RefNannyDeclarations
37056   PyObject *__pyx_t_1 = NULL;
37057   __Pyx_RefNannySetupContext("is_c_contig", 0);
37058 
37059   /* "View.MemoryView":618
37060  *         cdef __Pyx_memviewslice *mslice
37061  *         cdef __Pyx_memviewslice tmp
37062  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
37063  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
37064  *
37065  */
37066   __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
37067 
37068   /* "View.MemoryView":619
37069  *         cdef __Pyx_memviewslice tmp
37070  *         mslice = get_slice_from_memview(self, &tmp)
37071  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
37072  *
37073  *     def is_f_contig(self):
37074  */
37075   __Pyx_XDECREF(__pyx_r);
37076   __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(1, 619, __pyx_L1_error)
37077   __Pyx_GOTREF(__pyx_t_1);
37078   __pyx_r = __pyx_t_1;
37079   __pyx_t_1 = 0;
37080   goto __pyx_L0;
37081 
37082   /* "View.MemoryView":615
37083  *
37084  *
37085  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
37086  *         cdef __Pyx_memviewslice *mslice
37087  *         cdef __Pyx_memviewslice tmp
37088  */
37089 
37090   /* function exit code */
37091   __pyx_L1_error:;
37092   __Pyx_XDECREF(__pyx_t_1);
37093   __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
37094   __pyx_r = NULL;
37095   __pyx_L0:;
37096   __Pyx_XGIVEREF(__pyx_r);
37097   __Pyx_RefNannyFinishContext();
37098   return __pyx_r;
37099 }
37100 
37101 /* "View.MemoryView":621
37102  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
37103  *
37104  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
37105  *         cdef __Pyx_memviewslice *mslice
37106  *         cdef __Pyx_memviewslice tmp
37107  */
37108 
37109 /* Python wrapper */
37110 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)37111 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
37112   PyObject *__pyx_r = 0;
37113   __Pyx_RefNannyDeclarations
37114   __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
37115   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
37116 
37117   /* function exit code */
37118   __Pyx_RefNannyFinishContext();
37119   return __pyx_r;
37120 }
37121 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj * __pyx_v_self)37122 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
37123   __Pyx_memviewslice *__pyx_v_mslice;
37124   __Pyx_memviewslice __pyx_v_tmp;
37125   PyObject *__pyx_r = NULL;
37126   __Pyx_RefNannyDeclarations
37127   PyObject *__pyx_t_1 = NULL;
37128   __Pyx_RefNannySetupContext("is_f_contig", 0);
37129 
37130   /* "View.MemoryView":624
37131  *         cdef __Pyx_memviewslice *mslice
37132  *         cdef __Pyx_memviewslice tmp
37133  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
37134  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
37135  *
37136  */
37137   __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
37138 
37139   /* "View.MemoryView":625
37140  *         cdef __Pyx_memviewslice tmp
37141  *         mslice = get_slice_from_memview(self, &tmp)
37142  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
37143  *
37144  *     def copy(self):
37145  */
37146   __Pyx_XDECREF(__pyx_r);
37147   __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(1, 625, __pyx_L1_error)
37148   __Pyx_GOTREF(__pyx_t_1);
37149   __pyx_r = __pyx_t_1;
37150   __pyx_t_1 = 0;
37151   goto __pyx_L0;
37152 
37153   /* "View.MemoryView":621
37154  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
37155  *
37156  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
37157  *         cdef __Pyx_memviewslice *mslice
37158  *         cdef __Pyx_memviewslice tmp
37159  */
37160 
37161   /* function exit code */
37162   __pyx_L1_error:;
37163   __Pyx_XDECREF(__pyx_t_1);
37164   __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
37165   __pyx_r = NULL;
37166   __pyx_L0:;
37167   __Pyx_XGIVEREF(__pyx_r);
37168   __Pyx_RefNannyFinishContext();
37169   return __pyx_r;
37170 }
37171 
37172 /* "View.MemoryView":627
37173  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
37174  *
37175  *     def copy(self):             # <<<<<<<<<<<<<<
37176  *         cdef __Pyx_memviewslice mslice
37177  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
37178  */
37179 
37180 /* Python wrapper */
37181 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)37182 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
37183   PyObject *__pyx_r = 0;
37184   __Pyx_RefNannyDeclarations
37185   __Pyx_RefNannySetupContext("copy (wrapper)", 0);
37186   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
37187 
37188   /* function exit code */
37189   __Pyx_RefNannyFinishContext();
37190   return __pyx_r;
37191 }
37192 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj * __pyx_v_self)37193 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
37194   __Pyx_memviewslice __pyx_v_mslice;
37195   int __pyx_v_flags;
37196   PyObject *__pyx_r = NULL;
37197   __Pyx_RefNannyDeclarations
37198   __Pyx_memviewslice __pyx_t_1;
37199   PyObject *__pyx_t_2 = NULL;
37200   __Pyx_RefNannySetupContext("copy", 0);
37201 
37202   /* "View.MemoryView":629
37203  *     def copy(self):
37204  *         cdef __Pyx_memviewslice mslice
37205  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
37206  *
37207  *         slice_copy(self, &mslice)
37208  */
37209   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
37210 
37211   /* "View.MemoryView":631
37212  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
37213  *
37214  *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
37215  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
37216  *                                    self.view.itemsize,
37217  */
37218   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
37219 
37220   /* "View.MemoryView":632
37221  *
37222  *         slice_copy(self, &mslice)
37223  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
37224  *                                    self.view.itemsize,
37225  *                                    flags|PyBUF_C_CONTIGUOUS,
37226  */
37227   __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(1, 632, __pyx_L1_error)
37228   __pyx_v_mslice = __pyx_t_1;
37229 
37230   /* "View.MemoryView":637
37231  *                                    self.dtype_is_object)
37232  *
37233  *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
37234  *
37235  *     def copy_fortran(self):
37236  */
37237   __Pyx_XDECREF(__pyx_r);
37238   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 637, __pyx_L1_error)
37239   __Pyx_GOTREF(__pyx_t_2);
37240   __pyx_r = __pyx_t_2;
37241   __pyx_t_2 = 0;
37242   goto __pyx_L0;
37243 
37244   /* "View.MemoryView":627
37245  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
37246  *
37247  *     def copy(self):             # <<<<<<<<<<<<<<
37248  *         cdef __Pyx_memviewslice mslice
37249  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
37250  */
37251 
37252   /* function exit code */
37253   __pyx_L1_error:;
37254   __Pyx_XDECREF(__pyx_t_2);
37255   __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
37256   __pyx_r = NULL;
37257   __pyx_L0:;
37258   __Pyx_XGIVEREF(__pyx_r);
37259   __Pyx_RefNannyFinishContext();
37260   return __pyx_r;
37261 }
37262 
37263 /* "View.MemoryView":639
37264  *         return memoryview_copy_from_slice(self, &mslice)
37265  *
37266  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
37267  *         cdef __Pyx_memviewslice src, dst
37268  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
37269  */
37270 
37271 /* Python wrapper */
37272 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)37273 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
37274   PyObject *__pyx_r = 0;
37275   __Pyx_RefNannyDeclarations
37276   __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
37277   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
37278 
37279   /* function exit code */
37280   __Pyx_RefNannyFinishContext();
37281   return __pyx_r;
37282 }
37283 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj * __pyx_v_self)37284 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
37285   __Pyx_memviewslice __pyx_v_src;
37286   __Pyx_memviewslice __pyx_v_dst;
37287   int __pyx_v_flags;
37288   PyObject *__pyx_r = NULL;
37289   __Pyx_RefNannyDeclarations
37290   __Pyx_memviewslice __pyx_t_1;
37291   PyObject *__pyx_t_2 = NULL;
37292   __Pyx_RefNannySetupContext("copy_fortran", 0);
37293 
37294   /* "View.MemoryView":641
37295  *     def copy_fortran(self):
37296  *         cdef __Pyx_memviewslice src, dst
37297  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
37298  *
37299  *         slice_copy(self, &src)
37300  */
37301   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
37302 
37303   /* "View.MemoryView":643
37304  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
37305  *
37306  *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
37307  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
37308  *                                 self.view.itemsize,
37309  */
37310   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
37311 
37312   /* "View.MemoryView":644
37313  *
37314  *         slice_copy(self, &src)
37315  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
37316  *                                 self.view.itemsize,
37317  *                                 flags|PyBUF_F_CONTIGUOUS,
37318  */
37319   __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(1, 644, __pyx_L1_error)
37320   __pyx_v_dst = __pyx_t_1;
37321 
37322   /* "View.MemoryView":649
37323  *                                 self.dtype_is_object)
37324  *
37325  *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
37326  *
37327  *
37328  */
37329   __Pyx_XDECREF(__pyx_r);
37330   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 649, __pyx_L1_error)
37331   __Pyx_GOTREF(__pyx_t_2);
37332   __pyx_r = __pyx_t_2;
37333   __pyx_t_2 = 0;
37334   goto __pyx_L0;
37335 
37336   /* "View.MemoryView":639
37337  *         return memoryview_copy_from_slice(self, &mslice)
37338  *
37339  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
37340  *         cdef __Pyx_memviewslice src, dst
37341  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
37342  */
37343 
37344   /* function exit code */
37345   __pyx_L1_error:;
37346   __Pyx_XDECREF(__pyx_t_2);
37347   __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
37348   __pyx_r = NULL;
37349   __pyx_L0:;
37350   __Pyx_XGIVEREF(__pyx_r);
37351   __Pyx_RefNannyFinishContext();
37352   return __pyx_r;
37353 }
37354 
37355 /* "(tree fragment)":1
37356  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
37357  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37358  * def __setstate_cython__(self, __pyx_state):
37359  */
37360 
37361 /* Python wrapper */
37362 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)37363 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
37364   PyObject *__pyx_r = 0;
37365   __Pyx_RefNannyDeclarations
37366   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
37367   __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
37368 
37369   /* function exit code */
37370   __Pyx_RefNannyFinishContext();
37371   return __pyx_r;
37372 }
37373 
__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj * __pyx_v_self)37374 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
37375   PyObject *__pyx_r = NULL;
37376   __Pyx_RefNannyDeclarations
37377   PyObject *__pyx_t_1 = NULL;
37378   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
37379 
37380   /* "(tree fragment)":2
37381  * def __reduce_cython__(self):
37382  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
37383  * def __setstate_cython__(self, __pyx_state):
37384  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37385  */
37386   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
37387   __Pyx_GOTREF(__pyx_t_1);
37388   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
37389   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37390   __PYX_ERR(1, 2, __pyx_L1_error)
37391 
37392   /* "(tree fragment)":1
37393  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
37394  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37395  * def __setstate_cython__(self, __pyx_state):
37396  */
37397 
37398   /* function exit code */
37399   __pyx_L1_error:;
37400   __Pyx_XDECREF(__pyx_t_1);
37401   __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37402   __pyx_r = NULL;
37403   __Pyx_XGIVEREF(__pyx_r);
37404   __Pyx_RefNannyFinishContext();
37405   return __pyx_r;
37406 }
37407 
37408 /* "(tree fragment)":3
37409  * def __reduce_cython__(self):
37410  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37411  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
37412  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37413  */
37414 
37415 /* Python wrapper */
37416 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)37417 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
37418   PyObject *__pyx_r = 0;
37419   __Pyx_RefNannyDeclarations
37420   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
37421   __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
37422 
37423   /* function exit code */
37424   __Pyx_RefNannyFinishContext();
37425   return __pyx_r;
37426 }
37427 
__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)37428 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) {
37429   PyObject *__pyx_r = NULL;
37430   __Pyx_RefNannyDeclarations
37431   PyObject *__pyx_t_1 = NULL;
37432   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
37433 
37434   /* "(tree fragment)":4
37435  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37436  * def __setstate_cython__(self, __pyx_state):
37437  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
37438  */
37439   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
37440   __Pyx_GOTREF(__pyx_t_1);
37441   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
37442   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37443   __PYX_ERR(1, 4, __pyx_L1_error)
37444 
37445   /* "(tree fragment)":3
37446  * def __reduce_cython__(self):
37447  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37448  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
37449  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37450  */
37451 
37452   /* function exit code */
37453   __pyx_L1_error:;
37454   __Pyx_XDECREF(__pyx_t_1);
37455   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37456   __pyx_r = NULL;
37457   __Pyx_XGIVEREF(__pyx_r);
37458   __Pyx_RefNannyFinishContext();
37459   return __pyx_r;
37460 }
37461 
37462 /* "View.MemoryView":653
37463  *
37464  * @cname('__pyx_memoryview_new')
37465  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
37466  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
37467  *     result.typeinfo = typeinfo
37468  */
37469 
__pyx_memoryview_new(PyObject * __pyx_v_o,int __pyx_v_flags,int __pyx_v_dtype_is_object,__Pyx_TypeInfo * __pyx_v_typeinfo)37470 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
37471   struct __pyx_memoryview_obj *__pyx_v_result = 0;
37472   PyObject *__pyx_r = NULL;
37473   __Pyx_RefNannyDeclarations
37474   PyObject *__pyx_t_1 = NULL;
37475   PyObject *__pyx_t_2 = NULL;
37476   PyObject *__pyx_t_3 = NULL;
37477   __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
37478 
37479   /* "View.MemoryView":654
37480  * @cname('__pyx_memoryview_new')
37481  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
37482  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
37483  *     result.typeinfo = typeinfo
37484  *     return result
37485  */
37486   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 654, __pyx_L1_error)
37487   __Pyx_GOTREF(__pyx_t_1);
37488   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error)
37489   __Pyx_GOTREF(__pyx_t_2);
37490   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 654, __pyx_L1_error)
37491   __Pyx_GOTREF(__pyx_t_3);
37492   __Pyx_INCREF(__pyx_v_o);
37493   __Pyx_GIVEREF(__pyx_v_o);
37494   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
37495   __Pyx_GIVEREF(__pyx_t_1);
37496   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
37497   __Pyx_GIVEREF(__pyx_t_2);
37498   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
37499   __pyx_t_1 = 0;
37500   __pyx_t_2 = 0;
37501   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error)
37502   __Pyx_GOTREF(__pyx_t_2);
37503   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
37504   __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
37505   __pyx_t_2 = 0;
37506 
37507   /* "View.MemoryView":655
37508  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
37509  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
37510  *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
37511  *     return result
37512  *
37513  */
37514   __pyx_v_result->typeinfo = __pyx_v_typeinfo;
37515 
37516   /* "View.MemoryView":656
37517  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
37518  *     result.typeinfo = typeinfo
37519  *     return result             # <<<<<<<<<<<<<<
37520  *
37521  * @cname('__pyx_memoryview_check')
37522  */
37523   __Pyx_XDECREF(__pyx_r);
37524   __Pyx_INCREF(((PyObject *)__pyx_v_result));
37525   __pyx_r = ((PyObject *)__pyx_v_result);
37526   goto __pyx_L0;
37527 
37528   /* "View.MemoryView":653
37529  *
37530  * @cname('__pyx_memoryview_new')
37531  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
37532  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
37533  *     result.typeinfo = typeinfo
37534  */
37535 
37536   /* function exit code */
37537   __pyx_L1_error:;
37538   __Pyx_XDECREF(__pyx_t_1);
37539   __Pyx_XDECREF(__pyx_t_2);
37540   __Pyx_XDECREF(__pyx_t_3);
37541   __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
37542   __pyx_r = 0;
37543   __pyx_L0:;
37544   __Pyx_XDECREF((PyObject *)__pyx_v_result);
37545   __Pyx_XGIVEREF(__pyx_r);
37546   __Pyx_RefNannyFinishContext();
37547   return __pyx_r;
37548 }
37549 
37550 /* "View.MemoryView":659
37551  *
37552  * @cname('__pyx_memoryview_check')
37553  * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
37554  *     return isinstance(o, memoryview)
37555  *
37556  */
37557 
__pyx_memoryview_check(PyObject * __pyx_v_o)37558 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
37559   int __pyx_r;
37560   __Pyx_RefNannyDeclarations
37561   int __pyx_t_1;
37562   __Pyx_RefNannySetupContext("memoryview_check", 0);
37563 
37564   /* "View.MemoryView":660
37565  * @cname('__pyx_memoryview_check')
37566  * cdef inline bint memoryview_check(object o):
37567  *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
37568  *
37569  * cdef tuple _unellipsify(object index, int ndim):
37570  */
37571   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
37572   __pyx_r = __pyx_t_1;
37573   goto __pyx_L0;
37574 
37575   /* "View.MemoryView":659
37576  *
37577  * @cname('__pyx_memoryview_check')
37578  * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
37579  *     return isinstance(o, memoryview)
37580  *
37581  */
37582 
37583   /* function exit code */
37584   __pyx_L0:;
37585   __Pyx_RefNannyFinishContext();
37586   return __pyx_r;
37587 }
37588 
37589 /* "View.MemoryView":662
37590  *     return isinstance(o, memoryview)
37591  *
37592  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
37593  *     """
37594  *     Replace all ellipses with full slices and fill incomplete indices with
37595  */
37596 
_unellipsify(PyObject * __pyx_v_index,int __pyx_v_ndim)37597 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
37598   PyObject *__pyx_v_tup = NULL;
37599   PyObject *__pyx_v_result = NULL;
37600   int __pyx_v_have_slices;
37601   int __pyx_v_seen_ellipsis;
37602   CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
37603   PyObject *__pyx_v_item = NULL;
37604   Py_ssize_t __pyx_v_nslices;
37605   PyObject *__pyx_r = NULL;
37606   __Pyx_RefNannyDeclarations
37607   int __pyx_t_1;
37608   int __pyx_t_2;
37609   PyObject *__pyx_t_3 = NULL;
37610   PyObject *__pyx_t_4 = NULL;
37611   Py_ssize_t __pyx_t_5;
37612   PyObject *(*__pyx_t_6)(PyObject *);
37613   PyObject *__pyx_t_7 = NULL;
37614   Py_ssize_t __pyx_t_8;
37615   int __pyx_t_9;
37616   int __pyx_t_10;
37617   PyObject *__pyx_t_11 = NULL;
37618   __Pyx_RefNannySetupContext("_unellipsify", 0);
37619 
37620   /* "View.MemoryView":667
37621  *     full slices.
37622  *     """
37623  *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
37624  *         tup = (index,)
37625  *     else:
37626  */
37627   __pyx_t_1 = PyTuple_Check(__pyx_v_index);
37628   __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
37629   if (__pyx_t_2) {
37630 
37631     /* "View.MemoryView":668
37632  *     """
37633  *     if not isinstance(index, tuple):
37634  *         tup = (index,)             # <<<<<<<<<<<<<<
37635  *     else:
37636  *         tup = index
37637  */
37638     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 668, __pyx_L1_error)
37639     __Pyx_GOTREF(__pyx_t_3);
37640     __Pyx_INCREF(__pyx_v_index);
37641     __Pyx_GIVEREF(__pyx_v_index);
37642     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
37643     __pyx_v_tup = __pyx_t_3;
37644     __pyx_t_3 = 0;
37645 
37646     /* "View.MemoryView":667
37647  *     full slices.
37648  *     """
37649  *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
37650  *         tup = (index,)
37651  *     else:
37652  */
37653     goto __pyx_L3;
37654   }
37655 
37656   /* "View.MemoryView":670
37657  *         tup = (index,)
37658  *     else:
37659  *         tup = index             # <<<<<<<<<<<<<<
37660  *
37661  *     result = []
37662  */
37663   /*else*/ {
37664     __Pyx_INCREF(__pyx_v_index);
37665     __pyx_v_tup = __pyx_v_index;
37666   }
37667   __pyx_L3:;
37668 
37669   /* "View.MemoryView":672
37670  *         tup = index
37671  *
37672  *     result = []             # <<<<<<<<<<<<<<
37673  *     have_slices = False
37674  *     seen_ellipsis = False
37675  */
37676   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 672, __pyx_L1_error)
37677   __Pyx_GOTREF(__pyx_t_3);
37678   __pyx_v_result = ((PyObject*)__pyx_t_3);
37679   __pyx_t_3 = 0;
37680 
37681   /* "View.MemoryView":673
37682  *
37683  *     result = []
37684  *     have_slices = False             # <<<<<<<<<<<<<<
37685  *     seen_ellipsis = False
37686  *     for idx, item in enumerate(tup):
37687  */
37688   __pyx_v_have_slices = 0;
37689 
37690   /* "View.MemoryView":674
37691  *     result = []
37692  *     have_slices = False
37693  *     seen_ellipsis = False             # <<<<<<<<<<<<<<
37694  *     for idx, item in enumerate(tup):
37695  *         if item is Ellipsis:
37696  */
37697   __pyx_v_seen_ellipsis = 0;
37698 
37699   /* "View.MemoryView":675
37700  *     have_slices = False
37701  *     seen_ellipsis = False
37702  *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
37703  *         if item is Ellipsis:
37704  *             if not seen_ellipsis:
37705  */
37706   __Pyx_INCREF(__pyx_int_0);
37707   __pyx_t_3 = __pyx_int_0;
37708   if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
37709     __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
37710     __pyx_t_6 = NULL;
37711   } else {
37712     __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 675, __pyx_L1_error)
37713     __Pyx_GOTREF(__pyx_t_4);
37714     __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 675, __pyx_L1_error)
37715   }
37716   for (;;) {
37717     if (likely(!__pyx_t_6)) {
37718       if (likely(PyList_CheckExact(__pyx_t_4))) {
37719         if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
37720         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37721         __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(1, 675, __pyx_L1_error)
37722         #else
37723         __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error)
37724         __Pyx_GOTREF(__pyx_t_7);
37725         #endif
37726       } else {
37727         if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
37728         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
37729         __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(1, 675, __pyx_L1_error)
37730         #else
37731         __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error)
37732         __Pyx_GOTREF(__pyx_t_7);
37733         #endif
37734       }
37735     } else {
37736       __pyx_t_7 = __pyx_t_6(__pyx_t_4);
37737       if (unlikely(!__pyx_t_7)) {
37738         PyObject* exc_type = PyErr_Occurred();
37739         if (exc_type) {
37740           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
37741           else __PYX_ERR(1, 675, __pyx_L1_error)
37742         }
37743         break;
37744       }
37745       __Pyx_GOTREF(__pyx_t_7);
37746     }
37747     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
37748     __pyx_t_7 = 0;
37749     __Pyx_INCREF(__pyx_t_3);
37750     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
37751     __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 675, __pyx_L1_error)
37752     __Pyx_GOTREF(__pyx_t_7);
37753     __Pyx_DECREF(__pyx_t_3);
37754     __pyx_t_3 = __pyx_t_7;
37755     __pyx_t_7 = 0;
37756 
37757     /* "View.MemoryView":676
37758  *     seen_ellipsis = False
37759  *     for idx, item in enumerate(tup):
37760  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
37761  *             if not seen_ellipsis:
37762  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
37763  */
37764     __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
37765     __pyx_t_1 = (__pyx_t_2 != 0);
37766     if (__pyx_t_1) {
37767 
37768       /* "View.MemoryView":677
37769  *     for idx, item in enumerate(tup):
37770  *         if item is Ellipsis:
37771  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
37772  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
37773  *                 seen_ellipsis = True
37774  */
37775       __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
37776       if (__pyx_t_1) {
37777 
37778         /* "View.MemoryView":678
37779  *         if item is Ellipsis:
37780  *             if not seen_ellipsis:
37781  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
37782  *                 seen_ellipsis = True
37783  *             else:
37784  */
37785         __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 678, __pyx_L1_error)
37786         __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(1, 678, __pyx_L1_error)
37787         __Pyx_GOTREF(__pyx_t_7);
37788         { Py_ssize_t __pyx_temp;
37789           for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
37790             __Pyx_INCREF(__pyx_slice__43);
37791             __Pyx_GIVEREF(__pyx_slice__43);
37792             PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__43);
37793           }
37794         }
37795         __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 678, __pyx_L1_error)
37796         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
37797 
37798         /* "View.MemoryView":679
37799  *             if not seen_ellipsis:
37800  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
37801  *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
37802  *             else:
37803  *                 result.append(slice(None))
37804  */
37805         __pyx_v_seen_ellipsis = 1;
37806 
37807         /* "View.MemoryView":677
37808  *     for idx, item in enumerate(tup):
37809  *         if item is Ellipsis:
37810  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
37811  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
37812  *                 seen_ellipsis = True
37813  */
37814         goto __pyx_L7;
37815       }
37816 
37817       /* "View.MemoryView":681
37818  *                 seen_ellipsis = True
37819  *             else:
37820  *                 result.append(slice(None))             # <<<<<<<<<<<<<<
37821  *             have_slices = True
37822  *         else:
37823  */
37824       /*else*/ {
37825         __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__43); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 681, __pyx_L1_error)
37826       }
37827       __pyx_L7:;
37828 
37829       /* "View.MemoryView":682
37830  *             else:
37831  *                 result.append(slice(None))
37832  *             have_slices = True             # <<<<<<<<<<<<<<
37833  *         else:
37834  *             if not isinstance(item, slice) and not PyIndex_Check(item):
37835  */
37836       __pyx_v_have_slices = 1;
37837 
37838       /* "View.MemoryView":676
37839  *     seen_ellipsis = False
37840  *     for idx, item in enumerate(tup):
37841  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
37842  *             if not seen_ellipsis:
37843  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
37844  */
37845       goto __pyx_L6;
37846     }
37847 
37848     /* "View.MemoryView":684
37849  *             have_slices = True
37850  *         else:
37851  *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
37852  *                 raise TypeError("Cannot index with type '%s'" % type(item))
37853  *
37854  */
37855     /*else*/ {
37856       __pyx_t_2 = PySlice_Check(__pyx_v_item);
37857       __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
37858       if (__pyx_t_10) {
37859       } else {
37860         __pyx_t_1 = __pyx_t_10;
37861         goto __pyx_L9_bool_binop_done;
37862       }
37863       __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
37864       __pyx_t_1 = __pyx_t_10;
37865       __pyx_L9_bool_binop_done:;
37866       if (unlikely(__pyx_t_1)) {
37867 
37868         /* "View.MemoryView":685
37869  *         else:
37870  *             if not isinstance(item, slice) and not PyIndex_Check(item):
37871  *                 raise TypeError("Cannot index with type '%s'" % type(item))             # <<<<<<<<<<<<<<
37872  *
37873  *             have_slices = have_slices or isinstance(item, slice)
37874  */
37875         __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(1, 685, __pyx_L1_error)
37876         __Pyx_GOTREF(__pyx_t_7);
37877         __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 685, __pyx_L1_error)
37878         __Pyx_GOTREF(__pyx_t_11);
37879         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
37880         __Pyx_Raise(__pyx_t_11, 0, 0, 0);
37881         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
37882         __PYX_ERR(1, 685, __pyx_L1_error)
37883 
37884         /* "View.MemoryView":684
37885  *             have_slices = True
37886  *         else:
37887  *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
37888  *                 raise TypeError("Cannot index with type '%s'" % type(item))
37889  *
37890  */
37891       }
37892 
37893       /* "View.MemoryView":687
37894  *                 raise TypeError("Cannot index with type '%s'" % type(item))
37895  *
37896  *             have_slices = have_slices or isinstance(item, slice)             # <<<<<<<<<<<<<<
37897  *             result.append(item)
37898  *
37899  */
37900       __pyx_t_10 = (__pyx_v_have_slices != 0);
37901       if (!__pyx_t_10) {
37902       } else {
37903         __pyx_t_1 = __pyx_t_10;
37904         goto __pyx_L11_bool_binop_done;
37905       }
37906       __pyx_t_10 = PySlice_Check(__pyx_v_item);
37907       __pyx_t_2 = (__pyx_t_10 != 0);
37908       __pyx_t_1 = __pyx_t_2;
37909       __pyx_L11_bool_binop_done:;
37910       __pyx_v_have_slices = __pyx_t_1;
37911 
37912       /* "View.MemoryView":688
37913  *
37914  *             have_slices = have_slices or isinstance(item, slice)
37915  *             result.append(item)             # <<<<<<<<<<<<<<
37916  *
37917  *     nslices = ndim - len(result)
37918  */
37919       __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 688, __pyx_L1_error)
37920     }
37921     __pyx_L6:;
37922 
37923     /* "View.MemoryView":675
37924  *     have_slices = False
37925  *     seen_ellipsis = False
37926  *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
37927  *         if item is Ellipsis:
37928  *             if not seen_ellipsis:
37929  */
37930   }
37931   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37932   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
37933 
37934   /* "View.MemoryView":690
37935  *             result.append(item)
37936  *
37937  *     nslices = ndim - len(result)             # <<<<<<<<<<<<<<
37938  *     if nslices:
37939  *         result.extend([slice(None)] * nslices)
37940  */
37941   __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 690, __pyx_L1_error)
37942   __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
37943 
37944   /* "View.MemoryView":691
37945  *
37946  *     nslices = ndim - len(result)
37947  *     if nslices:             # <<<<<<<<<<<<<<
37948  *         result.extend([slice(None)] * nslices)
37949  *
37950  */
37951   __pyx_t_1 = (__pyx_v_nslices != 0);
37952   if (__pyx_t_1) {
37953 
37954     /* "View.MemoryView":692
37955  *     nslices = ndim - len(result)
37956  *     if nslices:
37957  *         result.extend([slice(None)] * nslices)             # <<<<<<<<<<<<<<
37958  *
37959  *     return have_slices or nslices, tuple(result)
37960  */
37961     __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 692, __pyx_L1_error)
37962     __Pyx_GOTREF(__pyx_t_3);
37963     { Py_ssize_t __pyx_temp;
37964       for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
37965         __Pyx_INCREF(__pyx_slice__43);
37966         __Pyx_GIVEREF(__pyx_slice__43);
37967         PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__43);
37968       }
37969     }
37970     __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 692, __pyx_L1_error)
37971     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
37972 
37973     /* "View.MemoryView":691
37974  *
37975  *     nslices = ndim - len(result)
37976  *     if nslices:             # <<<<<<<<<<<<<<
37977  *         result.extend([slice(None)] * nslices)
37978  *
37979  */
37980   }
37981 
37982   /* "View.MemoryView":694
37983  *         result.extend([slice(None)] * nslices)
37984  *
37985  *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
37986  *
37987  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
37988  */
37989   __Pyx_XDECREF(__pyx_r);
37990   if (!__pyx_v_have_slices) {
37991   } else {
37992     __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error)
37993     __Pyx_GOTREF(__pyx_t_4);
37994     __pyx_t_3 = __pyx_t_4;
37995     __pyx_t_4 = 0;
37996     goto __pyx_L14_bool_binop_done;
37997   }
37998   __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error)
37999   __Pyx_GOTREF(__pyx_t_4);
38000   __pyx_t_3 = __pyx_t_4;
38001   __pyx_t_4 = 0;
38002   __pyx_L14_bool_binop_done:;
38003   __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 694, __pyx_L1_error)
38004   __Pyx_GOTREF(__pyx_t_4);
38005   __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 694, __pyx_L1_error)
38006   __Pyx_GOTREF(__pyx_t_11);
38007   __Pyx_GIVEREF(__pyx_t_3);
38008   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
38009   __Pyx_GIVEREF(__pyx_t_4);
38010   PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
38011   __pyx_t_3 = 0;
38012   __pyx_t_4 = 0;
38013   __pyx_r = ((PyObject*)__pyx_t_11);
38014   __pyx_t_11 = 0;
38015   goto __pyx_L0;
38016 
38017   /* "View.MemoryView":662
38018  *     return isinstance(o, memoryview)
38019  *
38020  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
38021  *     """
38022  *     Replace all ellipses with full slices and fill incomplete indices with
38023  */
38024 
38025   /* function exit code */
38026   __pyx_L1_error:;
38027   __Pyx_XDECREF(__pyx_t_3);
38028   __Pyx_XDECREF(__pyx_t_4);
38029   __Pyx_XDECREF(__pyx_t_7);
38030   __Pyx_XDECREF(__pyx_t_11);
38031   __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
38032   __pyx_r = 0;
38033   __pyx_L0:;
38034   __Pyx_XDECREF(__pyx_v_tup);
38035   __Pyx_XDECREF(__pyx_v_result);
38036   __Pyx_XDECREF(__pyx_v_idx);
38037   __Pyx_XDECREF(__pyx_v_item);
38038   __Pyx_XGIVEREF(__pyx_r);
38039   __Pyx_RefNannyFinishContext();
38040   return __pyx_r;
38041 }
38042 
38043 /* "View.MemoryView":696
38044  *     return have_slices or nslices, tuple(result)
38045  *
38046  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
38047  *     for suboffset in suboffsets[:ndim]:
38048  *         if suboffset >= 0:
38049  */
38050 
assert_direct_dimensions(Py_ssize_t * __pyx_v_suboffsets,int __pyx_v_ndim)38051 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
38052   Py_ssize_t __pyx_v_suboffset;
38053   PyObject *__pyx_r = NULL;
38054   __Pyx_RefNannyDeclarations
38055   Py_ssize_t *__pyx_t_1;
38056   Py_ssize_t *__pyx_t_2;
38057   Py_ssize_t *__pyx_t_3;
38058   int __pyx_t_4;
38059   PyObject *__pyx_t_5 = NULL;
38060   __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
38061 
38062   /* "View.MemoryView":697
38063  *
38064  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
38065  *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
38066  *         if suboffset >= 0:
38067  *             raise ValueError("Indirect dimensions not supported")
38068  */
38069   __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
38070   for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
38071     __pyx_t_1 = __pyx_t_3;
38072     __pyx_v_suboffset = (__pyx_t_1[0]);
38073 
38074     /* "View.MemoryView":698
38075  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
38076  *     for suboffset in suboffsets[:ndim]:
38077  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
38078  *             raise ValueError("Indirect dimensions not supported")
38079  *
38080  */
38081     __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
38082     if (unlikely(__pyx_t_4)) {
38083 
38084       /* "View.MemoryView":699
38085  *     for suboffset in suboffsets[:ndim]:
38086  *         if suboffset >= 0:
38087  *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
38088  *
38089  *
38090  */
38091       __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 699, __pyx_L1_error)
38092       __Pyx_GOTREF(__pyx_t_5);
38093       __Pyx_Raise(__pyx_t_5, 0, 0, 0);
38094       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
38095       __PYX_ERR(1, 699, __pyx_L1_error)
38096 
38097       /* "View.MemoryView":698
38098  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
38099  *     for suboffset in suboffsets[:ndim]:
38100  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
38101  *             raise ValueError("Indirect dimensions not supported")
38102  *
38103  */
38104     }
38105   }
38106 
38107   /* "View.MemoryView":696
38108  *     return have_slices or nslices, tuple(result)
38109  *
38110  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
38111  *     for suboffset in suboffsets[:ndim]:
38112  *         if suboffset >= 0:
38113  */
38114 
38115   /* function exit code */
38116   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38117   goto __pyx_L0;
38118   __pyx_L1_error:;
38119   __Pyx_XDECREF(__pyx_t_5);
38120   __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
38121   __pyx_r = 0;
38122   __pyx_L0:;
38123   __Pyx_XGIVEREF(__pyx_r);
38124   __Pyx_RefNannyFinishContext();
38125   return __pyx_r;
38126 }
38127 
38128 /* "View.MemoryView":706
38129  *
38130  * @cname('__pyx_memview_slice')
38131  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
38132  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
38133  *     cdef bint negative_step
38134  */
38135 
__pyx_memview_slice(struct __pyx_memoryview_obj * __pyx_v_memview,PyObject * __pyx_v_indices)38136 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
38137   int __pyx_v_new_ndim;
38138   int __pyx_v_suboffset_dim;
38139   int __pyx_v_dim;
38140   __Pyx_memviewslice __pyx_v_src;
38141   __Pyx_memviewslice __pyx_v_dst;
38142   __Pyx_memviewslice *__pyx_v_p_src;
38143   struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
38144   __Pyx_memviewslice *__pyx_v_p_dst;
38145   int *__pyx_v_p_suboffset_dim;
38146   Py_ssize_t __pyx_v_start;
38147   Py_ssize_t __pyx_v_stop;
38148   Py_ssize_t __pyx_v_step;
38149   int __pyx_v_have_start;
38150   int __pyx_v_have_stop;
38151   int __pyx_v_have_step;
38152   PyObject *__pyx_v_index = NULL;
38153   struct __pyx_memoryview_obj *__pyx_r = NULL;
38154   __Pyx_RefNannyDeclarations
38155   int __pyx_t_1;
38156   int __pyx_t_2;
38157   PyObject *__pyx_t_3 = NULL;
38158   struct __pyx_memoryview_obj *__pyx_t_4;
38159   char *__pyx_t_5;
38160   int __pyx_t_6;
38161   Py_ssize_t __pyx_t_7;
38162   PyObject *(*__pyx_t_8)(PyObject *);
38163   PyObject *__pyx_t_9 = NULL;
38164   Py_ssize_t __pyx_t_10;
38165   int __pyx_t_11;
38166   Py_ssize_t __pyx_t_12;
38167   __Pyx_RefNannySetupContext("memview_slice", 0);
38168 
38169   /* "View.MemoryView":707
38170  * @cname('__pyx_memview_slice')
38171  * cdef memoryview memview_slice(memoryview memview, object indices):
38172  *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
38173  *     cdef bint negative_step
38174  *     cdef __Pyx_memviewslice src, dst
38175  */
38176   __pyx_v_new_ndim = 0;
38177   __pyx_v_suboffset_dim = -1;
38178 
38179   /* "View.MemoryView":714
38180  *
38181  *
38182  *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
38183  *
38184  *     cdef _memoryviewslice memviewsliceobj
38185  */
38186   (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
38187 
38188   /* "View.MemoryView":718
38189  *     cdef _memoryviewslice memviewsliceobj
38190  *
38191  *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
38192  *
38193  *     if isinstance(memview, _memoryviewslice):
38194  */
38195   #ifndef CYTHON_WITHOUT_ASSERTIONS
38196   if (unlikely(!Py_OptimizeFlag)) {
38197     if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
38198       PyErr_SetNone(PyExc_AssertionError);
38199       __PYX_ERR(1, 718, __pyx_L1_error)
38200     }
38201   }
38202   #endif
38203 
38204   /* "View.MemoryView":720
38205  *     assert memview.view.ndim > 0
38206  *
38207  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
38208  *         memviewsliceobj = memview
38209  *         p_src = &memviewsliceobj.from_slice
38210  */
38211   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
38212   __pyx_t_2 = (__pyx_t_1 != 0);
38213   if (__pyx_t_2) {
38214 
38215     /* "View.MemoryView":721
38216  *
38217  *     if isinstance(memview, _memoryviewslice):
38218  *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
38219  *         p_src = &memviewsliceobj.from_slice
38220  *     else:
38221  */
38222     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 721, __pyx_L1_error)
38223     __pyx_t_3 = ((PyObject *)__pyx_v_memview);
38224     __Pyx_INCREF(__pyx_t_3);
38225     __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
38226     __pyx_t_3 = 0;
38227 
38228     /* "View.MemoryView":722
38229  *     if isinstance(memview, _memoryviewslice):
38230  *         memviewsliceobj = memview
38231  *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
38232  *     else:
38233  *         slice_copy(memview, &src)
38234  */
38235     __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
38236 
38237     /* "View.MemoryView":720
38238  *     assert memview.view.ndim > 0
38239  *
38240  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
38241  *         memviewsliceobj = memview
38242  *         p_src = &memviewsliceobj.from_slice
38243  */
38244     goto __pyx_L3;
38245   }
38246 
38247   /* "View.MemoryView":724
38248  *         p_src = &memviewsliceobj.from_slice
38249  *     else:
38250  *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
38251  *         p_src = &src
38252  *
38253  */
38254   /*else*/ {
38255     __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
38256 
38257     /* "View.MemoryView":725
38258  *     else:
38259  *         slice_copy(memview, &src)
38260  *         p_src = &src             # <<<<<<<<<<<<<<
38261  *
38262  *
38263  */
38264     __pyx_v_p_src = (&__pyx_v_src);
38265   }
38266   __pyx_L3:;
38267 
38268   /* "View.MemoryView":731
38269  *
38270  *
38271  *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
38272  *     dst.data = p_src.data
38273  *
38274  */
38275   __pyx_t_4 = __pyx_v_p_src->memview;
38276   __pyx_v_dst.memview = __pyx_t_4;
38277 
38278   /* "View.MemoryView":732
38279  *
38280  *     dst.memview = p_src.memview
38281  *     dst.data = p_src.data             # <<<<<<<<<<<<<<
38282  *
38283  *
38284  */
38285   __pyx_t_5 = __pyx_v_p_src->data;
38286   __pyx_v_dst.data = __pyx_t_5;
38287 
38288   /* "View.MemoryView":737
38289  *
38290  *
38291  *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
38292  *     cdef int *p_suboffset_dim = &suboffset_dim
38293  *     cdef Py_ssize_t start, stop, step
38294  */
38295   __pyx_v_p_dst = (&__pyx_v_dst);
38296 
38297   /* "View.MemoryView":738
38298  *
38299  *     cdef __Pyx_memviewslice *p_dst = &dst
38300  *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
38301  *     cdef Py_ssize_t start, stop, step
38302  *     cdef bint have_start, have_stop, have_step
38303  */
38304   __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
38305 
38306   /* "View.MemoryView":742
38307  *     cdef bint have_start, have_stop, have_step
38308  *
38309  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
38310  *         if PyIndex_Check(index):
38311  *             slice_memviewslice(
38312  */
38313   __pyx_t_6 = 0;
38314   if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
38315     __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
38316     __pyx_t_8 = NULL;
38317   } else {
38318     __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 742, __pyx_L1_error)
38319     __Pyx_GOTREF(__pyx_t_3);
38320     __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 742, __pyx_L1_error)
38321   }
38322   for (;;) {
38323     if (likely(!__pyx_t_8)) {
38324       if (likely(PyList_CheckExact(__pyx_t_3))) {
38325         if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
38326         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38327         __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(1, 742, __pyx_L1_error)
38328         #else
38329         __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 742, __pyx_L1_error)
38330         __Pyx_GOTREF(__pyx_t_9);
38331         #endif
38332       } else {
38333         if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
38334         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38335         __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(1, 742, __pyx_L1_error)
38336         #else
38337         __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 742, __pyx_L1_error)
38338         __Pyx_GOTREF(__pyx_t_9);
38339         #endif
38340       }
38341     } else {
38342       __pyx_t_9 = __pyx_t_8(__pyx_t_3);
38343       if (unlikely(!__pyx_t_9)) {
38344         PyObject* exc_type = PyErr_Occurred();
38345         if (exc_type) {
38346           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
38347           else __PYX_ERR(1, 742, __pyx_L1_error)
38348         }
38349         break;
38350       }
38351       __Pyx_GOTREF(__pyx_t_9);
38352     }
38353     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
38354     __pyx_t_9 = 0;
38355     __pyx_v_dim = __pyx_t_6;
38356     __pyx_t_6 = (__pyx_t_6 + 1);
38357 
38358     /* "View.MemoryView":743
38359  *
38360  *     for dim, index in enumerate(indices):
38361  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
38362  *             slice_memviewslice(
38363  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
38364  */
38365     __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
38366     if (__pyx_t_2) {
38367 
38368       /* "View.MemoryView":747
38369  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
38370  *                 dim, new_ndim, p_suboffset_dim,
38371  *                 index, 0, 0, # start, stop, step             # <<<<<<<<<<<<<<
38372  *                 0, 0, 0, # have_{start,stop,step}
38373  *                 False)
38374  */
38375       __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 747, __pyx_L1_error)
38376 
38377       /* "View.MemoryView":744
38378  *     for dim, index in enumerate(indices):
38379  *         if PyIndex_Check(index):
38380  *             slice_memviewslice(             # <<<<<<<<<<<<<<
38381  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
38382  *                 dim, new_ndim, p_suboffset_dim,
38383  */
38384       __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(1, 744, __pyx_L1_error)
38385 
38386       /* "View.MemoryView":743
38387  *
38388  *     for dim, index in enumerate(indices):
38389  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
38390  *             slice_memviewslice(
38391  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
38392  */
38393       goto __pyx_L6;
38394     }
38395 
38396     /* "View.MemoryView":750
38397  *                 0, 0, 0, # have_{start,stop,step}
38398  *                 False)
38399  *         elif index is None:             # <<<<<<<<<<<<<<
38400  *             p_dst.shape[new_ndim] = 1
38401  *             p_dst.strides[new_ndim] = 0
38402  */
38403     __pyx_t_2 = (__pyx_v_index == Py_None);
38404     __pyx_t_1 = (__pyx_t_2 != 0);
38405     if (__pyx_t_1) {
38406 
38407       /* "View.MemoryView":751
38408  *                 False)
38409  *         elif index is None:
38410  *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
38411  *             p_dst.strides[new_ndim] = 0
38412  *             p_dst.suboffsets[new_ndim] = -1
38413  */
38414       (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
38415 
38416       /* "View.MemoryView":752
38417  *         elif index is None:
38418  *             p_dst.shape[new_ndim] = 1
38419  *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
38420  *             p_dst.suboffsets[new_ndim] = -1
38421  *             new_ndim += 1
38422  */
38423       (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
38424 
38425       /* "View.MemoryView":753
38426  *             p_dst.shape[new_ndim] = 1
38427  *             p_dst.strides[new_ndim] = 0
38428  *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
38429  *             new_ndim += 1
38430  *         else:
38431  */
38432       (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
38433 
38434       /* "View.MemoryView":754
38435  *             p_dst.strides[new_ndim] = 0
38436  *             p_dst.suboffsets[new_ndim] = -1
38437  *             new_ndim += 1             # <<<<<<<<<<<<<<
38438  *         else:
38439  *             start = index.start or 0
38440  */
38441       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
38442 
38443       /* "View.MemoryView":750
38444  *                 0, 0, 0, # have_{start,stop,step}
38445  *                 False)
38446  *         elif index is None:             # <<<<<<<<<<<<<<
38447  *             p_dst.shape[new_ndim] = 1
38448  *             p_dst.strides[new_ndim] = 0
38449  */
38450       goto __pyx_L6;
38451     }
38452 
38453     /* "View.MemoryView":756
38454  *             new_ndim += 1
38455  *         else:
38456  *             start = index.start or 0             # <<<<<<<<<<<<<<
38457  *             stop = index.stop or 0
38458  *             step = index.step or 0
38459  */
38460     /*else*/ {
38461       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 756, __pyx_L1_error)
38462       __Pyx_GOTREF(__pyx_t_9);
38463       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 756, __pyx_L1_error)
38464       if (!__pyx_t_1) {
38465         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38466       } else {
38467         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 756, __pyx_L1_error)
38468         __pyx_t_10 = __pyx_t_12;
38469         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38470         goto __pyx_L7_bool_binop_done;
38471       }
38472       __pyx_t_10 = 0;
38473       __pyx_L7_bool_binop_done:;
38474       __pyx_v_start = __pyx_t_10;
38475 
38476       /* "View.MemoryView":757
38477  *         else:
38478  *             start = index.start or 0
38479  *             stop = index.stop or 0             # <<<<<<<<<<<<<<
38480  *             step = index.step or 0
38481  *
38482  */
38483       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 757, __pyx_L1_error)
38484       __Pyx_GOTREF(__pyx_t_9);
38485       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 757, __pyx_L1_error)
38486       if (!__pyx_t_1) {
38487         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38488       } else {
38489         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 757, __pyx_L1_error)
38490         __pyx_t_10 = __pyx_t_12;
38491         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38492         goto __pyx_L9_bool_binop_done;
38493       }
38494       __pyx_t_10 = 0;
38495       __pyx_L9_bool_binop_done:;
38496       __pyx_v_stop = __pyx_t_10;
38497 
38498       /* "View.MemoryView":758
38499  *             start = index.start or 0
38500  *             stop = index.stop or 0
38501  *             step = index.step or 0             # <<<<<<<<<<<<<<
38502  *
38503  *             have_start = index.start is not None
38504  */
38505       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 758, __pyx_L1_error)
38506       __Pyx_GOTREF(__pyx_t_9);
38507       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 758, __pyx_L1_error)
38508       if (!__pyx_t_1) {
38509         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38510       } else {
38511         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 758, __pyx_L1_error)
38512         __pyx_t_10 = __pyx_t_12;
38513         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38514         goto __pyx_L11_bool_binop_done;
38515       }
38516       __pyx_t_10 = 0;
38517       __pyx_L11_bool_binop_done:;
38518       __pyx_v_step = __pyx_t_10;
38519 
38520       /* "View.MemoryView":760
38521  *             step = index.step or 0
38522  *
38523  *             have_start = index.start is not None             # <<<<<<<<<<<<<<
38524  *             have_stop = index.stop is not None
38525  *             have_step = index.step is not None
38526  */
38527       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 760, __pyx_L1_error)
38528       __Pyx_GOTREF(__pyx_t_9);
38529       __pyx_t_1 = (__pyx_t_9 != Py_None);
38530       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38531       __pyx_v_have_start = __pyx_t_1;
38532 
38533       /* "View.MemoryView":761
38534  *
38535  *             have_start = index.start is not None
38536  *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
38537  *             have_step = index.step is not None
38538  *
38539  */
38540       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 761, __pyx_L1_error)
38541       __Pyx_GOTREF(__pyx_t_9);
38542       __pyx_t_1 = (__pyx_t_9 != Py_None);
38543       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38544       __pyx_v_have_stop = __pyx_t_1;
38545 
38546       /* "View.MemoryView":762
38547  *             have_start = index.start is not None
38548  *             have_stop = index.stop is not None
38549  *             have_step = index.step is not None             # <<<<<<<<<<<<<<
38550  *
38551  *             slice_memviewslice(
38552  */
38553       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error)
38554       __Pyx_GOTREF(__pyx_t_9);
38555       __pyx_t_1 = (__pyx_t_9 != Py_None);
38556       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
38557       __pyx_v_have_step = __pyx_t_1;
38558 
38559       /* "View.MemoryView":764
38560  *             have_step = index.step is not None
38561  *
38562  *             slice_memviewslice(             # <<<<<<<<<<<<<<
38563  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
38564  *                 dim, new_ndim, p_suboffset_dim,
38565  */
38566       __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(1, 764, __pyx_L1_error)
38567 
38568       /* "View.MemoryView":770
38569  *                 have_start, have_stop, have_step,
38570  *                 True)
38571  *             new_ndim += 1             # <<<<<<<<<<<<<<
38572  *
38573  *     if isinstance(memview, _memoryviewslice):
38574  */
38575       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
38576     }
38577     __pyx_L6:;
38578 
38579     /* "View.MemoryView":742
38580  *     cdef bint have_start, have_stop, have_step
38581  *
38582  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
38583  *         if PyIndex_Check(index):
38584  *             slice_memviewslice(
38585  */
38586   }
38587   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
38588 
38589   /* "View.MemoryView":772
38590  *             new_ndim += 1
38591  *
38592  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
38593  *         return memoryview_fromslice(dst, new_ndim,
38594  *                                     memviewsliceobj.to_object_func,
38595  */
38596   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
38597   __pyx_t_2 = (__pyx_t_1 != 0);
38598   if (__pyx_t_2) {
38599 
38600     /* "View.MemoryView":773
38601  *
38602  *     if isinstance(memview, _memoryviewslice):
38603  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
38604  *                                     memviewsliceobj.to_object_func,
38605  *                                     memviewsliceobj.to_dtype_func,
38606  */
38607     __Pyx_XDECREF(((PyObject *)__pyx_r));
38608 
38609     /* "View.MemoryView":774
38610  *     if isinstance(memview, _memoryviewslice):
38611  *         return memoryview_fromslice(dst, new_ndim,
38612  *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
38613  *                                     memviewsliceobj.to_dtype_func,
38614  *                                     memview.dtype_is_object)
38615  */
38616     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 774, __pyx_L1_error) }
38617 
38618     /* "View.MemoryView":775
38619  *         return memoryview_fromslice(dst, new_ndim,
38620  *                                     memviewsliceobj.to_object_func,
38621  *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
38622  *                                     memview.dtype_is_object)
38623  *     else:
38624  */
38625     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 775, __pyx_L1_error) }
38626 
38627     /* "View.MemoryView":773
38628  *
38629  *     if isinstance(memview, _memoryviewslice):
38630  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
38631  *                                     memviewsliceobj.to_object_func,
38632  *                                     memviewsliceobj.to_dtype_func,
38633  */
38634     __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(1, 773, __pyx_L1_error)
38635     __Pyx_GOTREF(__pyx_t_3);
38636     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 773, __pyx_L1_error)
38637     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
38638     __pyx_t_3 = 0;
38639     goto __pyx_L0;
38640 
38641     /* "View.MemoryView":772
38642  *             new_ndim += 1
38643  *
38644  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
38645  *         return memoryview_fromslice(dst, new_ndim,
38646  *                                     memviewsliceobj.to_object_func,
38647  */
38648   }
38649 
38650   /* "View.MemoryView":778
38651  *                                     memview.dtype_is_object)
38652  *     else:
38653  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
38654  *                                     memview.dtype_is_object)
38655  *
38656  */
38657   /*else*/ {
38658     __Pyx_XDECREF(((PyObject *)__pyx_r));
38659 
38660     /* "View.MemoryView":779
38661  *     else:
38662  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
38663  *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
38664  *
38665  *
38666  */
38667     __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(1, 778, __pyx_L1_error)
38668     __Pyx_GOTREF(__pyx_t_3);
38669 
38670     /* "View.MemoryView":778
38671  *                                     memview.dtype_is_object)
38672  *     else:
38673  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
38674  *                                     memview.dtype_is_object)
38675  *
38676  */
38677     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 778, __pyx_L1_error)
38678     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
38679     __pyx_t_3 = 0;
38680     goto __pyx_L0;
38681   }
38682 
38683   /* "View.MemoryView":706
38684  *
38685  * @cname('__pyx_memview_slice')
38686  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
38687  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
38688  *     cdef bint negative_step
38689  */
38690 
38691   /* function exit code */
38692   __pyx_L1_error:;
38693   __Pyx_XDECREF(__pyx_t_3);
38694   __Pyx_XDECREF(__pyx_t_9);
38695   __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
38696   __pyx_r = 0;
38697   __pyx_L0:;
38698   __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
38699   __Pyx_XDECREF(__pyx_v_index);
38700   __Pyx_XGIVEREF((PyObject *)__pyx_r);
38701   __Pyx_RefNannyFinishContext();
38702   return __pyx_r;
38703 }
38704 
38705 /* "View.MemoryView":803
38706  *
38707  * @cname('__pyx_memoryview_slice_memviewslice')
38708  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
38709  *         __Pyx_memviewslice *dst,
38710  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
38711  */
38712 
__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)38713 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) {
38714   Py_ssize_t __pyx_v_new_shape;
38715   int __pyx_v_negative_step;
38716   int __pyx_r;
38717   int __pyx_t_1;
38718   int __pyx_t_2;
38719   int __pyx_t_3;
38720 
38721   /* "View.MemoryView":823
38722  *     cdef bint negative_step
38723  *
38724  *     if not is_slice:             # <<<<<<<<<<<<<<
38725  *
38726  *         if start < 0:
38727  */
38728   __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
38729   if (__pyx_t_1) {
38730 
38731     /* "View.MemoryView":825
38732  *     if not is_slice:
38733  *
38734  *         if start < 0:             # <<<<<<<<<<<<<<
38735  *             start += shape
38736  *         if not 0 <= start < shape:
38737  */
38738     __pyx_t_1 = ((__pyx_v_start < 0) != 0);
38739     if (__pyx_t_1) {
38740 
38741       /* "View.MemoryView":826
38742  *
38743  *         if start < 0:
38744  *             start += shape             # <<<<<<<<<<<<<<
38745  *         if not 0 <= start < shape:
38746  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
38747  */
38748       __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
38749 
38750       /* "View.MemoryView":825
38751  *     if not is_slice:
38752  *
38753  *         if start < 0:             # <<<<<<<<<<<<<<
38754  *             start += shape
38755  *         if not 0 <= start < shape:
38756  */
38757     }
38758 
38759     /* "View.MemoryView":827
38760  *         if start < 0:
38761  *             start += shape
38762  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
38763  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
38764  *     else:
38765  */
38766     __pyx_t_1 = (0 <= __pyx_v_start);
38767     if (__pyx_t_1) {
38768       __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
38769     }
38770     __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
38771     if (__pyx_t_2) {
38772 
38773       /* "View.MemoryView":828
38774  *             start += shape
38775  *         if not 0 <= start < shape:
38776  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
38777  *     else:
38778  *
38779  */
38780       __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(1, 828, __pyx_L1_error)
38781 
38782       /* "View.MemoryView":827
38783  *         if start < 0:
38784  *             start += shape
38785  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
38786  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
38787  *     else:
38788  */
38789     }
38790 
38791     /* "View.MemoryView":823
38792  *     cdef bint negative_step
38793  *
38794  *     if not is_slice:             # <<<<<<<<<<<<<<
38795  *
38796  *         if start < 0:
38797  */
38798     goto __pyx_L3;
38799   }
38800 
38801   /* "View.MemoryView":831
38802  *     else:
38803  *
38804  *         negative_step = have_step != 0 and step < 0             # <<<<<<<<<<<<<<
38805  *
38806  *         if have_step and step == 0:
38807  */
38808   /*else*/ {
38809     __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
38810     if (__pyx_t_1) {
38811     } else {
38812       __pyx_t_2 = __pyx_t_1;
38813       goto __pyx_L6_bool_binop_done;
38814     }
38815     __pyx_t_1 = ((__pyx_v_step < 0) != 0);
38816     __pyx_t_2 = __pyx_t_1;
38817     __pyx_L6_bool_binop_done:;
38818     __pyx_v_negative_step = __pyx_t_2;
38819 
38820     /* "View.MemoryView":833
38821  *         negative_step = have_step != 0 and step < 0
38822  *
38823  *         if have_step and step == 0:             # <<<<<<<<<<<<<<
38824  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
38825  *
38826  */
38827     __pyx_t_1 = (__pyx_v_have_step != 0);
38828     if (__pyx_t_1) {
38829     } else {
38830       __pyx_t_2 = __pyx_t_1;
38831       goto __pyx_L9_bool_binop_done;
38832     }
38833     __pyx_t_1 = ((__pyx_v_step == 0) != 0);
38834     __pyx_t_2 = __pyx_t_1;
38835     __pyx_L9_bool_binop_done:;
38836     if (__pyx_t_2) {
38837 
38838       /* "View.MemoryView":834
38839  *
38840  *         if have_step and step == 0:
38841  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
38842  *
38843  *
38844  */
38845       __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(1, 834, __pyx_L1_error)
38846 
38847       /* "View.MemoryView":833
38848  *         negative_step = have_step != 0 and step < 0
38849  *
38850  *         if have_step and step == 0:             # <<<<<<<<<<<<<<
38851  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
38852  *
38853  */
38854     }
38855 
38856     /* "View.MemoryView":837
38857  *
38858  *
38859  *         if have_start:             # <<<<<<<<<<<<<<
38860  *             if start < 0:
38861  *                 start += shape
38862  */
38863     __pyx_t_2 = (__pyx_v_have_start != 0);
38864     if (__pyx_t_2) {
38865 
38866       /* "View.MemoryView":838
38867  *
38868  *         if have_start:
38869  *             if start < 0:             # <<<<<<<<<<<<<<
38870  *                 start += shape
38871  *                 if start < 0:
38872  */
38873       __pyx_t_2 = ((__pyx_v_start < 0) != 0);
38874       if (__pyx_t_2) {
38875 
38876         /* "View.MemoryView":839
38877  *         if have_start:
38878  *             if start < 0:
38879  *                 start += shape             # <<<<<<<<<<<<<<
38880  *                 if start < 0:
38881  *                     start = 0
38882  */
38883         __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
38884 
38885         /* "View.MemoryView":840
38886  *             if start < 0:
38887  *                 start += shape
38888  *                 if start < 0:             # <<<<<<<<<<<<<<
38889  *                     start = 0
38890  *             elif start >= shape:
38891  */
38892         __pyx_t_2 = ((__pyx_v_start < 0) != 0);
38893         if (__pyx_t_2) {
38894 
38895           /* "View.MemoryView":841
38896  *                 start += shape
38897  *                 if start < 0:
38898  *                     start = 0             # <<<<<<<<<<<<<<
38899  *             elif start >= shape:
38900  *                 if negative_step:
38901  */
38902           __pyx_v_start = 0;
38903 
38904           /* "View.MemoryView":840
38905  *             if start < 0:
38906  *                 start += shape
38907  *                 if start < 0:             # <<<<<<<<<<<<<<
38908  *                     start = 0
38909  *             elif start >= shape:
38910  */
38911         }
38912 
38913         /* "View.MemoryView":838
38914  *
38915  *         if have_start:
38916  *             if start < 0:             # <<<<<<<<<<<<<<
38917  *                 start += shape
38918  *                 if start < 0:
38919  */
38920         goto __pyx_L12;
38921       }
38922 
38923       /* "View.MemoryView":842
38924  *                 if start < 0:
38925  *                     start = 0
38926  *             elif start >= shape:             # <<<<<<<<<<<<<<
38927  *                 if negative_step:
38928  *                     start = shape - 1
38929  */
38930       __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
38931       if (__pyx_t_2) {
38932 
38933         /* "View.MemoryView":843
38934  *                     start = 0
38935  *             elif start >= shape:
38936  *                 if negative_step:             # <<<<<<<<<<<<<<
38937  *                     start = shape - 1
38938  *                 else:
38939  */
38940         __pyx_t_2 = (__pyx_v_negative_step != 0);
38941         if (__pyx_t_2) {
38942 
38943           /* "View.MemoryView":844
38944  *             elif start >= shape:
38945  *                 if negative_step:
38946  *                     start = shape - 1             # <<<<<<<<<<<<<<
38947  *                 else:
38948  *                     start = shape
38949  */
38950           __pyx_v_start = (__pyx_v_shape - 1);
38951 
38952           /* "View.MemoryView":843
38953  *                     start = 0
38954  *             elif start >= shape:
38955  *                 if negative_step:             # <<<<<<<<<<<<<<
38956  *                     start = shape - 1
38957  *                 else:
38958  */
38959           goto __pyx_L14;
38960         }
38961 
38962         /* "View.MemoryView":846
38963  *                     start = shape - 1
38964  *                 else:
38965  *                     start = shape             # <<<<<<<<<<<<<<
38966  *         else:
38967  *             if negative_step:
38968  */
38969         /*else*/ {
38970           __pyx_v_start = __pyx_v_shape;
38971         }
38972         __pyx_L14:;
38973 
38974         /* "View.MemoryView":842
38975  *                 if start < 0:
38976  *                     start = 0
38977  *             elif start >= shape:             # <<<<<<<<<<<<<<
38978  *                 if negative_step:
38979  *                     start = shape - 1
38980  */
38981       }
38982       __pyx_L12:;
38983 
38984       /* "View.MemoryView":837
38985  *
38986  *
38987  *         if have_start:             # <<<<<<<<<<<<<<
38988  *             if start < 0:
38989  *                 start += shape
38990  */
38991       goto __pyx_L11;
38992     }
38993 
38994     /* "View.MemoryView":848
38995  *                     start = shape
38996  *         else:
38997  *             if negative_step:             # <<<<<<<<<<<<<<
38998  *                 start = shape - 1
38999  *             else:
39000  */
39001     /*else*/ {
39002       __pyx_t_2 = (__pyx_v_negative_step != 0);
39003       if (__pyx_t_2) {
39004 
39005         /* "View.MemoryView":849
39006  *         else:
39007  *             if negative_step:
39008  *                 start = shape - 1             # <<<<<<<<<<<<<<
39009  *             else:
39010  *                 start = 0
39011  */
39012         __pyx_v_start = (__pyx_v_shape - 1);
39013 
39014         /* "View.MemoryView":848
39015  *                     start = shape
39016  *         else:
39017  *             if negative_step:             # <<<<<<<<<<<<<<
39018  *                 start = shape - 1
39019  *             else:
39020  */
39021         goto __pyx_L15;
39022       }
39023 
39024       /* "View.MemoryView":851
39025  *                 start = shape - 1
39026  *             else:
39027  *                 start = 0             # <<<<<<<<<<<<<<
39028  *
39029  *         if have_stop:
39030  */
39031       /*else*/ {
39032         __pyx_v_start = 0;
39033       }
39034       __pyx_L15:;
39035     }
39036     __pyx_L11:;
39037 
39038     /* "View.MemoryView":853
39039  *                 start = 0
39040  *
39041  *         if have_stop:             # <<<<<<<<<<<<<<
39042  *             if stop < 0:
39043  *                 stop += shape
39044  */
39045     __pyx_t_2 = (__pyx_v_have_stop != 0);
39046     if (__pyx_t_2) {
39047 
39048       /* "View.MemoryView":854
39049  *
39050  *         if have_stop:
39051  *             if stop < 0:             # <<<<<<<<<<<<<<
39052  *                 stop += shape
39053  *                 if stop < 0:
39054  */
39055       __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
39056       if (__pyx_t_2) {
39057 
39058         /* "View.MemoryView":855
39059  *         if have_stop:
39060  *             if stop < 0:
39061  *                 stop += shape             # <<<<<<<<<<<<<<
39062  *                 if stop < 0:
39063  *                     stop = 0
39064  */
39065         __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
39066 
39067         /* "View.MemoryView":856
39068  *             if stop < 0:
39069  *                 stop += shape
39070  *                 if stop < 0:             # <<<<<<<<<<<<<<
39071  *                     stop = 0
39072  *             elif stop > shape:
39073  */
39074         __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
39075         if (__pyx_t_2) {
39076 
39077           /* "View.MemoryView":857
39078  *                 stop += shape
39079  *                 if stop < 0:
39080  *                     stop = 0             # <<<<<<<<<<<<<<
39081  *             elif stop > shape:
39082  *                 stop = shape
39083  */
39084           __pyx_v_stop = 0;
39085 
39086           /* "View.MemoryView":856
39087  *             if stop < 0:
39088  *                 stop += shape
39089  *                 if stop < 0:             # <<<<<<<<<<<<<<
39090  *                     stop = 0
39091  *             elif stop > shape:
39092  */
39093         }
39094 
39095         /* "View.MemoryView":854
39096  *
39097  *         if have_stop:
39098  *             if stop < 0:             # <<<<<<<<<<<<<<
39099  *                 stop += shape
39100  *                 if stop < 0:
39101  */
39102         goto __pyx_L17;
39103       }
39104 
39105       /* "View.MemoryView":858
39106  *                 if stop < 0:
39107  *                     stop = 0
39108  *             elif stop > shape:             # <<<<<<<<<<<<<<
39109  *                 stop = shape
39110  *         else:
39111  */
39112       __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
39113       if (__pyx_t_2) {
39114 
39115         /* "View.MemoryView":859
39116  *                     stop = 0
39117  *             elif stop > shape:
39118  *                 stop = shape             # <<<<<<<<<<<<<<
39119  *         else:
39120  *             if negative_step:
39121  */
39122         __pyx_v_stop = __pyx_v_shape;
39123 
39124         /* "View.MemoryView":858
39125  *                 if stop < 0:
39126  *                     stop = 0
39127  *             elif stop > shape:             # <<<<<<<<<<<<<<
39128  *                 stop = shape
39129  *         else:
39130  */
39131       }
39132       __pyx_L17:;
39133 
39134       /* "View.MemoryView":853
39135  *                 start = 0
39136  *
39137  *         if have_stop:             # <<<<<<<<<<<<<<
39138  *             if stop < 0:
39139  *                 stop += shape
39140  */
39141       goto __pyx_L16;
39142     }
39143 
39144     /* "View.MemoryView":861
39145  *                 stop = shape
39146  *         else:
39147  *             if negative_step:             # <<<<<<<<<<<<<<
39148  *                 stop = -1
39149  *             else:
39150  */
39151     /*else*/ {
39152       __pyx_t_2 = (__pyx_v_negative_step != 0);
39153       if (__pyx_t_2) {
39154 
39155         /* "View.MemoryView":862
39156  *         else:
39157  *             if negative_step:
39158  *                 stop = -1             # <<<<<<<<<<<<<<
39159  *             else:
39160  *                 stop = shape
39161  */
39162         __pyx_v_stop = -1L;
39163 
39164         /* "View.MemoryView":861
39165  *                 stop = shape
39166  *         else:
39167  *             if negative_step:             # <<<<<<<<<<<<<<
39168  *                 stop = -1
39169  *             else:
39170  */
39171         goto __pyx_L19;
39172       }
39173 
39174       /* "View.MemoryView":864
39175  *                 stop = -1
39176  *             else:
39177  *                 stop = shape             # <<<<<<<<<<<<<<
39178  *
39179  *         if not have_step:
39180  */
39181       /*else*/ {
39182         __pyx_v_stop = __pyx_v_shape;
39183       }
39184       __pyx_L19:;
39185     }
39186     __pyx_L16:;
39187 
39188     /* "View.MemoryView":866
39189  *                 stop = shape
39190  *
39191  *         if not have_step:             # <<<<<<<<<<<<<<
39192  *             step = 1
39193  *
39194  */
39195     __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
39196     if (__pyx_t_2) {
39197 
39198       /* "View.MemoryView":867
39199  *
39200  *         if not have_step:
39201  *             step = 1             # <<<<<<<<<<<<<<
39202  *
39203  *
39204  */
39205       __pyx_v_step = 1;
39206 
39207       /* "View.MemoryView":866
39208  *                 stop = shape
39209  *
39210  *         if not have_step:             # <<<<<<<<<<<<<<
39211  *             step = 1
39212  *
39213  */
39214     }
39215 
39216     /* "View.MemoryView":871
39217  *
39218  *         with cython.cdivision(True):
39219  *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
39220  *
39221  *             if (stop - start) - step * new_shape:
39222  */
39223     __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
39224 
39225     /* "View.MemoryView":873
39226  *             new_shape = (stop - start) // step
39227  *
39228  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
39229  *                 new_shape += 1
39230  *
39231  */
39232     __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
39233     if (__pyx_t_2) {
39234 
39235       /* "View.MemoryView":874
39236  *
39237  *             if (stop - start) - step * new_shape:
39238  *                 new_shape += 1             # <<<<<<<<<<<<<<
39239  *
39240  *         if new_shape < 0:
39241  */
39242       __pyx_v_new_shape = (__pyx_v_new_shape + 1);
39243 
39244       /* "View.MemoryView":873
39245  *             new_shape = (stop - start) // step
39246  *
39247  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
39248  *                 new_shape += 1
39249  *
39250  */
39251     }
39252 
39253     /* "View.MemoryView":876
39254  *                 new_shape += 1
39255  *
39256  *         if new_shape < 0:             # <<<<<<<<<<<<<<
39257  *             new_shape = 0
39258  *
39259  */
39260     __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
39261     if (__pyx_t_2) {
39262 
39263       /* "View.MemoryView":877
39264  *
39265  *         if new_shape < 0:
39266  *             new_shape = 0             # <<<<<<<<<<<<<<
39267  *
39268  *
39269  */
39270       __pyx_v_new_shape = 0;
39271 
39272       /* "View.MemoryView":876
39273  *                 new_shape += 1
39274  *
39275  *         if new_shape < 0:             # <<<<<<<<<<<<<<
39276  *             new_shape = 0
39277  *
39278  */
39279     }
39280 
39281     /* "View.MemoryView":880
39282  *
39283  *
39284  *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
39285  *         dst.shape[new_ndim] = new_shape
39286  *         dst.suboffsets[new_ndim] = suboffset
39287  */
39288     (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
39289 
39290     /* "View.MemoryView":881
39291  *
39292  *         dst.strides[new_ndim] = stride * step
39293  *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
39294  *         dst.suboffsets[new_ndim] = suboffset
39295  *
39296  */
39297     (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
39298 
39299     /* "View.MemoryView":882
39300  *         dst.strides[new_ndim] = stride * step
39301  *         dst.shape[new_ndim] = new_shape
39302  *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
39303  *
39304  *
39305  */
39306     (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
39307   }
39308   __pyx_L3:;
39309 
39310   /* "View.MemoryView":885
39311  *
39312  *
39313  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
39314  *         dst.data += start * stride
39315  *     else:
39316  */
39317   __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
39318   if (__pyx_t_2) {
39319 
39320     /* "View.MemoryView":886
39321  *
39322  *     if suboffset_dim[0] < 0:
39323  *         dst.data += start * stride             # <<<<<<<<<<<<<<
39324  *     else:
39325  *         dst.suboffsets[suboffset_dim[0]] += start * stride
39326  */
39327     __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
39328 
39329     /* "View.MemoryView":885
39330  *
39331  *
39332  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
39333  *         dst.data += start * stride
39334  *     else:
39335  */
39336     goto __pyx_L23;
39337   }
39338 
39339   /* "View.MemoryView":888
39340  *         dst.data += start * stride
39341  *     else:
39342  *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
39343  *
39344  *     if suboffset >= 0:
39345  */
39346   /*else*/ {
39347     __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
39348     (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
39349   }
39350   __pyx_L23:;
39351 
39352   /* "View.MemoryView":890
39353  *         dst.suboffsets[suboffset_dim[0]] += start * stride
39354  *
39355  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
39356  *         if not is_slice:
39357  *             if new_ndim == 0:
39358  */
39359   __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
39360   if (__pyx_t_2) {
39361 
39362     /* "View.MemoryView":891
39363  *
39364  *     if suboffset >= 0:
39365  *         if not is_slice:             # <<<<<<<<<<<<<<
39366  *             if new_ndim == 0:
39367  *                 dst.data = (<char **> dst.data)[0] + suboffset
39368  */
39369     __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
39370     if (__pyx_t_2) {
39371 
39372       /* "View.MemoryView":892
39373  *     if suboffset >= 0:
39374  *         if not is_slice:
39375  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
39376  *                 dst.data = (<char **> dst.data)[0] + suboffset
39377  *             else:
39378  */
39379       __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
39380       if (__pyx_t_2) {
39381 
39382         /* "View.MemoryView":893
39383  *         if not is_slice:
39384  *             if new_ndim == 0:
39385  *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
39386  *             else:
39387  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
39388  */
39389         __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
39390 
39391         /* "View.MemoryView":892
39392  *     if suboffset >= 0:
39393  *         if not is_slice:
39394  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
39395  *                 dst.data = (<char **> dst.data)[0] + suboffset
39396  *             else:
39397  */
39398         goto __pyx_L26;
39399       }
39400 
39401       /* "View.MemoryView":895
39402  *                 dst.data = (<char **> dst.data)[0] + suboffset
39403  *             else:
39404  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
39405  *                                      "must be indexed and not sliced", dim)
39406  *         else:
39407  */
39408       /*else*/ {
39409 
39410         /* "View.MemoryView":896
39411  *             else:
39412  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
39413  *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
39414  *         else:
39415  *             suboffset_dim[0] = new_ndim
39416  */
39417         __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(1, 895, __pyx_L1_error)
39418       }
39419       __pyx_L26:;
39420 
39421       /* "View.MemoryView":891
39422  *
39423  *     if suboffset >= 0:
39424  *         if not is_slice:             # <<<<<<<<<<<<<<
39425  *             if new_ndim == 0:
39426  *                 dst.data = (<char **> dst.data)[0] + suboffset
39427  */
39428       goto __pyx_L25;
39429     }
39430 
39431     /* "View.MemoryView":898
39432  *                                      "must be indexed and not sliced", dim)
39433  *         else:
39434  *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
39435  *
39436  *     return 0
39437  */
39438     /*else*/ {
39439       (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
39440     }
39441     __pyx_L25:;
39442 
39443     /* "View.MemoryView":890
39444  *         dst.suboffsets[suboffset_dim[0]] += start * stride
39445  *
39446  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
39447  *         if not is_slice:
39448  *             if new_ndim == 0:
39449  */
39450   }
39451 
39452   /* "View.MemoryView":900
39453  *             suboffset_dim[0] = new_ndim
39454  *
39455  *     return 0             # <<<<<<<<<<<<<<
39456  *
39457  *
39458  */
39459   __pyx_r = 0;
39460   goto __pyx_L0;
39461 
39462   /* "View.MemoryView":803
39463  *
39464  * @cname('__pyx_memoryview_slice_memviewslice')
39465  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
39466  *         __Pyx_memviewslice *dst,
39467  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
39468  */
39469 
39470   /* function exit code */
39471   __pyx_L1_error:;
39472   {
39473     #ifdef WITH_THREAD
39474     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
39475     #endif
39476     __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
39477     #ifdef WITH_THREAD
39478     __Pyx_PyGILState_Release(__pyx_gilstate_save);
39479     #endif
39480   }
39481   __pyx_r = -1;
39482   __pyx_L0:;
39483   return __pyx_r;
39484 }
39485 
39486 /* "View.MemoryView":906
39487  *
39488  * @cname('__pyx_pybuffer_index')
39489  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
39490  *                           Py_ssize_t dim) except NULL:
39491  *     cdef Py_ssize_t shape, stride, suboffset = -1
39492  */
39493 
__pyx_pybuffer_index(Py_buffer * __pyx_v_view,char * __pyx_v_bufp,Py_ssize_t __pyx_v_index,Py_ssize_t __pyx_v_dim)39494 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) {
39495   Py_ssize_t __pyx_v_shape;
39496   Py_ssize_t __pyx_v_stride;
39497   Py_ssize_t __pyx_v_suboffset;
39498   Py_ssize_t __pyx_v_itemsize;
39499   char *__pyx_v_resultp;
39500   char *__pyx_r;
39501   __Pyx_RefNannyDeclarations
39502   Py_ssize_t __pyx_t_1;
39503   int __pyx_t_2;
39504   PyObject *__pyx_t_3 = NULL;
39505   PyObject *__pyx_t_4 = NULL;
39506   __Pyx_RefNannySetupContext("pybuffer_index", 0);
39507 
39508   /* "View.MemoryView":908
39509  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
39510  *                           Py_ssize_t dim) except NULL:
39511  *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
39512  *     cdef Py_ssize_t itemsize = view.itemsize
39513  *     cdef char *resultp
39514  */
39515   __pyx_v_suboffset = -1L;
39516 
39517   /* "View.MemoryView":909
39518  *                           Py_ssize_t dim) except NULL:
39519  *     cdef Py_ssize_t shape, stride, suboffset = -1
39520  *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
39521  *     cdef char *resultp
39522  *
39523  */
39524   __pyx_t_1 = __pyx_v_view->itemsize;
39525   __pyx_v_itemsize = __pyx_t_1;
39526 
39527   /* "View.MemoryView":912
39528  *     cdef char *resultp
39529  *
39530  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
39531  *         shape = view.len / itemsize
39532  *         stride = itemsize
39533  */
39534   __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
39535   if (__pyx_t_2) {
39536 
39537     /* "View.MemoryView":913
39538  *
39539  *     if view.ndim == 0:
39540  *         shape = view.len / itemsize             # <<<<<<<<<<<<<<
39541  *         stride = itemsize
39542  *     else:
39543  */
39544     if (unlikely(__pyx_v_itemsize == 0)) {
39545       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
39546       __PYX_ERR(1, 913, __pyx_L1_error)
39547     }
39548     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))) {
39549       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
39550       __PYX_ERR(1, 913, __pyx_L1_error)
39551     }
39552     __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
39553 
39554     /* "View.MemoryView":914
39555  *     if view.ndim == 0:
39556  *         shape = view.len / itemsize
39557  *         stride = itemsize             # <<<<<<<<<<<<<<
39558  *     else:
39559  *         shape = view.shape[dim]
39560  */
39561     __pyx_v_stride = __pyx_v_itemsize;
39562 
39563     /* "View.MemoryView":912
39564  *     cdef char *resultp
39565  *
39566  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
39567  *         shape = view.len / itemsize
39568  *         stride = itemsize
39569  */
39570     goto __pyx_L3;
39571   }
39572 
39573   /* "View.MemoryView":916
39574  *         stride = itemsize
39575  *     else:
39576  *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
39577  *         stride = view.strides[dim]
39578  *         if view.suboffsets != NULL:
39579  */
39580   /*else*/ {
39581     __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
39582 
39583     /* "View.MemoryView":917
39584  *     else:
39585  *         shape = view.shape[dim]
39586  *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
39587  *         if view.suboffsets != NULL:
39588  *             suboffset = view.suboffsets[dim]
39589  */
39590     __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
39591 
39592     /* "View.MemoryView":918
39593  *         shape = view.shape[dim]
39594  *         stride = view.strides[dim]
39595  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
39596  *             suboffset = view.suboffsets[dim]
39597  *
39598  */
39599     __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
39600     if (__pyx_t_2) {
39601 
39602       /* "View.MemoryView":919
39603  *         stride = view.strides[dim]
39604  *         if view.suboffsets != NULL:
39605  *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
39606  *
39607  *     if index < 0:
39608  */
39609       __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
39610 
39611       /* "View.MemoryView":918
39612  *         shape = view.shape[dim]
39613  *         stride = view.strides[dim]
39614  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
39615  *             suboffset = view.suboffsets[dim]
39616  *
39617  */
39618     }
39619   }
39620   __pyx_L3:;
39621 
39622   /* "View.MemoryView":921
39623  *             suboffset = view.suboffsets[dim]
39624  *
39625  *     if index < 0:             # <<<<<<<<<<<<<<
39626  *         index += view.shape[dim]
39627  *         if index < 0:
39628  */
39629   __pyx_t_2 = ((__pyx_v_index < 0) != 0);
39630   if (__pyx_t_2) {
39631 
39632     /* "View.MemoryView":922
39633  *
39634  *     if index < 0:
39635  *         index += view.shape[dim]             # <<<<<<<<<<<<<<
39636  *         if index < 0:
39637  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
39638  */
39639     __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
39640 
39641     /* "View.MemoryView":923
39642  *     if index < 0:
39643  *         index += view.shape[dim]
39644  *         if index < 0:             # <<<<<<<<<<<<<<
39645  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
39646  *
39647  */
39648     __pyx_t_2 = ((__pyx_v_index < 0) != 0);
39649     if (unlikely(__pyx_t_2)) {
39650 
39651       /* "View.MemoryView":924
39652  *         index += view.shape[dim]
39653  *         if index < 0:
39654  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
39655  *
39656  *     if index >= shape:
39657  */
39658       __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error)
39659       __Pyx_GOTREF(__pyx_t_3);
39660       __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(1, 924, __pyx_L1_error)
39661       __Pyx_GOTREF(__pyx_t_4);
39662       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
39663       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error)
39664       __Pyx_GOTREF(__pyx_t_3);
39665       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39666       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
39667       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
39668       __PYX_ERR(1, 924, __pyx_L1_error)
39669 
39670       /* "View.MemoryView":923
39671  *     if index < 0:
39672  *         index += view.shape[dim]
39673  *         if index < 0:             # <<<<<<<<<<<<<<
39674  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
39675  *
39676  */
39677     }
39678 
39679     /* "View.MemoryView":921
39680  *             suboffset = view.suboffsets[dim]
39681  *
39682  *     if index < 0:             # <<<<<<<<<<<<<<
39683  *         index += view.shape[dim]
39684  *         if index < 0:
39685  */
39686   }
39687 
39688   /* "View.MemoryView":926
39689  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
39690  *
39691  *     if index >= shape:             # <<<<<<<<<<<<<<
39692  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
39693  *
39694  */
39695   __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
39696   if (unlikely(__pyx_t_2)) {
39697 
39698     /* "View.MemoryView":927
39699  *
39700  *     if index >= shape:
39701  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
39702  *
39703  *     resultp = bufp + index * stride
39704  */
39705     __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 927, __pyx_L1_error)
39706     __Pyx_GOTREF(__pyx_t_3);
39707     __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(1, 927, __pyx_L1_error)
39708     __Pyx_GOTREF(__pyx_t_4);
39709     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
39710     __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 927, __pyx_L1_error)
39711     __Pyx_GOTREF(__pyx_t_3);
39712     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39713     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
39714     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
39715     __PYX_ERR(1, 927, __pyx_L1_error)
39716 
39717     /* "View.MemoryView":926
39718  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
39719  *
39720  *     if index >= shape:             # <<<<<<<<<<<<<<
39721  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
39722  *
39723  */
39724   }
39725 
39726   /* "View.MemoryView":929
39727  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
39728  *
39729  *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
39730  *     if suboffset >= 0:
39731  *         resultp = (<char **> resultp)[0] + suboffset
39732  */
39733   __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
39734 
39735   /* "View.MemoryView":930
39736  *
39737  *     resultp = bufp + index * stride
39738  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
39739  *         resultp = (<char **> resultp)[0] + suboffset
39740  *
39741  */
39742   __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
39743   if (__pyx_t_2) {
39744 
39745     /* "View.MemoryView":931
39746  *     resultp = bufp + index * stride
39747  *     if suboffset >= 0:
39748  *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
39749  *
39750  *     return resultp
39751  */
39752     __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
39753 
39754     /* "View.MemoryView":930
39755  *
39756  *     resultp = bufp + index * stride
39757  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
39758  *         resultp = (<char **> resultp)[0] + suboffset
39759  *
39760  */
39761   }
39762 
39763   /* "View.MemoryView":933
39764  *         resultp = (<char **> resultp)[0] + suboffset
39765  *
39766  *     return resultp             # <<<<<<<<<<<<<<
39767  *
39768  *
39769  */
39770   __pyx_r = __pyx_v_resultp;
39771   goto __pyx_L0;
39772 
39773   /* "View.MemoryView":906
39774  *
39775  * @cname('__pyx_pybuffer_index')
39776  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
39777  *                           Py_ssize_t dim) except NULL:
39778  *     cdef Py_ssize_t shape, stride, suboffset = -1
39779  */
39780 
39781   /* function exit code */
39782   __pyx_L1_error:;
39783   __Pyx_XDECREF(__pyx_t_3);
39784   __Pyx_XDECREF(__pyx_t_4);
39785   __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
39786   __pyx_r = NULL;
39787   __pyx_L0:;
39788   __Pyx_RefNannyFinishContext();
39789   return __pyx_r;
39790 }
39791 
39792 /* "View.MemoryView":939
39793  *
39794  * @cname('__pyx_memslice_transpose')
39795  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
39796  *     cdef int ndim = memslice.memview.view.ndim
39797  *
39798  */
39799 
__pyx_memslice_transpose(__Pyx_memviewslice * __pyx_v_memslice)39800 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
39801   int __pyx_v_ndim;
39802   Py_ssize_t *__pyx_v_shape;
39803   Py_ssize_t *__pyx_v_strides;
39804   int __pyx_v_i;
39805   int __pyx_v_j;
39806   int __pyx_r;
39807   int __pyx_t_1;
39808   Py_ssize_t *__pyx_t_2;
39809   long __pyx_t_3;
39810   long __pyx_t_4;
39811   Py_ssize_t __pyx_t_5;
39812   Py_ssize_t __pyx_t_6;
39813   int __pyx_t_7;
39814   int __pyx_t_8;
39815   int __pyx_t_9;
39816 
39817   /* "View.MemoryView":940
39818  * @cname('__pyx_memslice_transpose')
39819  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
39820  *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
39821  *
39822  *     cdef Py_ssize_t *shape = memslice.shape
39823  */
39824   __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
39825   __pyx_v_ndim = __pyx_t_1;
39826 
39827   /* "View.MemoryView":942
39828  *     cdef int ndim = memslice.memview.view.ndim
39829  *
39830  *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
39831  *     cdef Py_ssize_t *strides = memslice.strides
39832  *
39833  */
39834   __pyx_t_2 = __pyx_v_memslice->shape;
39835   __pyx_v_shape = __pyx_t_2;
39836 
39837   /* "View.MemoryView":943
39838  *
39839  *     cdef Py_ssize_t *shape = memslice.shape
39840  *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
39841  *
39842  *
39843  */
39844   __pyx_t_2 = __pyx_v_memslice->strides;
39845   __pyx_v_strides = __pyx_t_2;
39846 
39847   /* "View.MemoryView":947
39848  *
39849  *     cdef int i, j
39850  *     for i in range(ndim / 2):             # <<<<<<<<<<<<<<
39851  *         j = ndim - 1 - i
39852  *         strides[i], strides[j] = strides[j], strides[i]
39853  */
39854   __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
39855   __pyx_t_4 = __pyx_t_3;
39856   for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
39857     __pyx_v_i = __pyx_t_1;
39858 
39859     /* "View.MemoryView":948
39860  *     cdef int i, j
39861  *     for i in range(ndim / 2):
39862  *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
39863  *         strides[i], strides[j] = strides[j], strides[i]
39864  *         shape[i], shape[j] = shape[j], shape[i]
39865  */
39866     __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
39867 
39868     /* "View.MemoryView":949
39869  *     for i in range(ndim / 2):
39870  *         j = ndim - 1 - i
39871  *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
39872  *         shape[i], shape[j] = shape[j], shape[i]
39873  *
39874  */
39875     __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
39876     __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
39877     (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
39878     (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
39879 
39880     /* "View.MemoryView":950
39881  *         j = ndim - 1 - i
39882  *         strides[i], strides[j] = strides[j], strides[i]
39883  *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
39884  *
39885  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
39886  */
39887     __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
39888     __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
39889     (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
39890     (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
39891 
39892     /* "View.MemoryView":952
39893  *         shape[i], shape[j] = shape[j], shape[i]
39894  *
39895  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
39896  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
39897  *
39898  */
39899     __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
39900     if (!__pyx_t_8) {
39901     } else {
39902       __pyx_t_7 = __pyx_t_8;
39903       goto __pyx_L6_bool_binop_done;
39904     }
39905     __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
39906     __pyx_t_7 = __pyx_t_8;
39907     __pyx_L6_bool_binop_done:;
39908     if (__pyx_t_7) {
39909 
39910       /* "View.MemoryView":953
39911  *
39912  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
39913  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
39914  *
39915  *     return 1
39916  */
39917       __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(1, 953, __pyx_L1_error)
39918 
39919       /* "View.MemoryView":952
39920  *         shape[i], shape[j] = shape[j], shape[i]
39921  *
39922  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
39923  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
39924  *
39925  */
39926     }
39927   }
39928 
39929   /* "View.MemoryView":955
39930  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
39931  *
39932  *     return 1             # <<<<<<<<<<<<<<
39933  *
39934  *
39935  */
39936   __pyx_r = 1;
39937   goto __pyx_L0;
39938 
39939   /* "View.MemoryView":939
39940  *
39941  * @cname('__pyx_memslice_transpose')
39942  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
39943  *     cdef int ndim = memslice.memview.view.ndim
39944  *
39945  */
39946 
39947   /* function exit code */
39948   __pyx_L1_error:;
39949   {
39950     #ifdef WITH_THREAD
39951     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
39952     #endif
39953     __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
39954     #ifdef WITH_THREAD
39955     __Pyx_PyGILState_Release(__pyx_gilstate_save);
39956     #endif
39957   }
39958   __pyx_r = 0;
39959   __pyx_L0:;
39960   return __pyx_r;
39961 }
39962 
39963 /* "View.MemoryView":972
39964  *     cdef int (*to_dtype_func)(char *, object) except 0
39965  *
39966  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
39967  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
39968  *
39969  */
39970 
39971 /* Python wrapper */
39972 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryviewslice___dealloc__(PyObject * __pyx_v_self)39973 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
39974   __Pyx_RefNannyDeclarations
39975   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
39976   __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
39977 
39978   /* function exit code */
39979   __Pyx_RefNannyFinishContext();
39980 }
39981 
__pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj * __pyx_v_self)39982 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
39983   __Pyx_RefNannyDeclarations
39984   __Pyx_RefNannySetupContext("__dealloc__", 0);
39985 
39986   /* "View.MemoryView":973
39987  *
39988  *     def __dealloc__(self):
39989  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
39990  *
39991  *     cdef convert_item_to_object(self, char *itemp):
39992  */
39993   __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
39994 
39995   /* "View.MemoryView":972
39996  *     cdef int (*to_dtype_func)(char *, object) except 0
39997  *
39998  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
39999  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
40000  *
40001  */
40002 
40003   /* function exit code */
40004   __Pyx_RefNannyFinishContext();
40005 }
40006 
40007 /* "View.MemoryView":975
40008  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
40009  *
40010  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
40011  *         if self.to_object_func != NULL:
40012  *             return self.to_object_func(itemp)
40013  */
40014 
__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj * __pyx_v_self,char * __pyx_v_itemp)40015 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
40016   PyObject *__pyx_r = NULL;
40017   __Pyx_RefNannyDeclarations
40018   int __pyx_t_1;
40019   PyObject *__pyx_t_2 = NULL;
40020   __Pyx_RefNannySetupContext("convert_item_to_object", 0);
40021 
40022   /* "View.MemoryView":976
40023  *
40024  *     cdef convert_item_to_object(self, char *itemp):
40025  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
40026  *             return self.to_object_func(itemp)
40027  *         else:
40028  */
40029   __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
40030   if (__pyx_t_1) {
40031 
40032     /* "View.MemoryView":977
40033  *     cdef convert_item_to_object(self, char *itemp):
40034  *         if self.to_object_func != NULL:
40035  *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
40036  *         else:
40037  *             return memoryview.convert_item_to_object(self, itemp)
40038  */
40039     __Pyx_XDECREF(__pyx_r);
40040     __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 977, __pyx_L1_error)
40041     __Pyx_GOTREF(__pyx_t_2);
40042     __pyx_r = __pyx_t_2;
40043     __pyx_t_2 = 0;
40044     goto __pyx_L0;
40045 
40046     /* "View.MemoryView":976
40047  *
40048  *     cdef convert_item_to_object(self, char *itemp):
40049  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
40050  *             return self.to_object_func(itemp)
40051  *         else:
40052  */
40053   }
40054 
40055   /* "View.MemoryView":979
40056  *             return self.to_object_func(itemp)
40057  *         else:
40058  *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
40059  *
40060  *     cdef assign_item_from_object(self, char *itemp, object value):
40061  */
40062   /*else*/ {
40063     __Pyx_XDECREF(__pyx_r);
40064     __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(1, 979, __pyx_L1_error)
40065     __Pyx_GOTREF(__pyx_t_2);
40066     __pyx_r = __pyx_t_2;
40067     __pyx_t_2 = 0;
40068     goto __pyx_L0;
40069   }
40070 
40071   /* "View.MemoryView":975
40072  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
40073  *
40074  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
40075  *         if self.to_object_func != NULL:
40076  *             return self.to_object_func(itemp)
40077  */
40078 
40079   /* function exit code */
40080   __pyx_L1_error:;
40081   __Pyx_XDECREF(__pyx_t_2);
40082   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
40083   __pyx_r = 0;
40084   __pyx_L0:;
40085   __Pyx_XGIVEREF(__pyx_r);
40086   __Pyx_RefNannyFinishContext();
40087   return __pyx_r;
40088 }
40089 
40090 /* "View.MemoryView":981
40091  *             return memoryview.convert_item_to_object(self, itemp)
40092  *
40093  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
40094  *         if self.to_dtype_func != NULL:
40095  *             self.to_dtype_func(itemp, value)
40096  */
40097 
__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj * __pyx_v_self,char * __pyx_v_itemp,PyObject * __pyx_v_value)40098 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
40099   PyObject *__pyx_r = NULL;
40100   __Pyx_RefNannyDeclarations
40101   int __pyx_t_1;
40102   int __pyx_t_2;
40103   PyObject *__pyx_t_3 = NULL;
40104   __Pyx_RefNannySetupContext("assign_item_from_object", 0);
40105 
40106   /* "View.MemoryView":982
40107  *
40108  *     cdef assign_item_from_object(self, char *itemp, object value):
40109  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
40110  *             self.to_dtype_func(itemp, value)
40111  *         else:
40112  */
40113   __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
40114   if (__pyx_t_1) {
40115 
40116     /* "View.MemoryView":983
40117  *     cdef assign_item_from_object(self, char *itemp, object value):
40118  *         if self.to_dtype_func != NULL:
40119  *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
40120  *         else:
40121  *             memoryview.assign_item_from_object(self, itemp, value)
40122  */
40123     __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 983, __pyx_L1_error)
40124 
40125     /* "View.MemoryView":982
40126  *
40127  *     cdef assign_item_from_object(self, char *itemp, object value):
40128  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
40129  *             self.to_dtype_func(itemp, value)
40130  *         else:
40131  */
40132     goto __pyx_L3;
40133   }
40134 
40135   /* "View.MemoryView":985
40136  *             self.to_dtype_func(itemp, value)
40137  *         else:
40138  *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
40139  *
40140  *     @property
40141  */
40142   /*else*/ {
40143     __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(1, 985, __pyx_L1_error)
40144     __Pyx_GOTREF(__pyx_t_3);
40145     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40146   }
40147   __pyx_L3:;
40148 
40149   /* "View.MemoryView":981
40150  *             return memoryview.convert_item_to_object(self, itemp)
40151  *
40152  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
40153  *         if self.to_dtype_func != NULL:
40154  *             self.to_dtype_func(itemp, value)
40155  */
40156 
40157   /* function exit code */
40158   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
40159   goto __pyx_L0;
40160   __pyx_L1_error:;
40161   __Pyx_XDECREF(__pyx_t_3);
40162   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
40163   __pyx_r = 0;
40164   __pyx_L0:;
40165   __Pyx_XGIVEREF(__pyx_r);
40166   __Pyx_RefNannyFinishContext();
40167   return __pyx_r;
40168 }
40169 
40170 /* "View.MemoryView":988
40171  *
40172  *     @property
40173  *     def base(self):             # <<<<<<<<<<<<<<
40174  *         return self.from_object
40175  *
40176  */
40177 
40178 /* Python wrapper */
40179 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)40180 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
40181   PyObject *__pyx_r = 0;
40182   __Pyx_RefNannyDeclarations
40183   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
40184   __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
40185 
40186   /* function exit code */
40187   __Pyx_RefNannyFinishContext();
40188   return __pyx_r;
40189 }
40190 
__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj * __pyx_v_self)40191 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
40192   PyObject *__pyx_r = NULL;
40193   __Pyx_RefNannyDeclarations
40194   __Pyx_RefNannySetupContext("__get__", 0);
40195 
40196   /* "View.MemoryView":989
40197  *     @property
40198  *     def base(self):
40199  *         return self.from_object             # <<<<<<<<<<<<<<
40200  *
40201  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
40202  */
40203   __Pyx_XDECREF(__pyx_r);
40204   __Pyx_INCREF(__pyx_v_self->from_object);
40205   __pyx_r = __pyx_v_self->from_object;
40206   goto __pyx_L0;
40207 
40208   /* "View.MemoryView":988
40209  *
40210  *     @property
40211  *     def base(self):             # <<<<<<<<<<<<<<
40212  *         return self.from_object
40213  *
40214  */
40215 
40216   /* function exit code */
40217   __pyx_L0:;
40218   __Pyx_XGIVEREF(__pyx_r);
40219   __Pyx_RefNannyFinishContext();
40220   return __pyx_r;
40221 }
40222 
40223 /* "(tree fragment)":1
40224  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
40225  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
40226  * def __setstate_cython__(self, __pyx_state):
40227  */
40228 
40229 /* Python wrapper */
40230 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)40231 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
40232   PyObject *__pyx_r = 0;
40233   __Pyx_RefNannyDeclarations
40234   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
40235   __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
40236 
40237   /* function exit code */
40238   __Pyx_RefNannyFinishContext();
40239   return __pyx_r;
40240 }
40241 
__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj * __pyx_v_self)40242 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
40243   PyObject *__pyx_r = NULL;
40244   __Pyx_RefNannyDeclarations
40245   PyObject *__pyx_t_1 = NULL;
40246   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
40247 
40248   /* "(tree fragment)":2
40249  * def __reduce_cython__(self):
40250  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
40251  * def __setstate_cython__(self, __pyx_state):
40252  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
40253  */
40254   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
40255   __Pyx_GOTREF(__pyx_t_1);
40256   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
40257   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40258   __PYX_ERR(1, 2, __pyx_L1_error)
40259 
40260   /* "(tree fragment)":1
40261  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
40262  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
40263  * def __setstate_cython__(self, __pyx_state):
40264  */
40265 
40266   /* function exit code */
40267   __pyx_L1_error:;
40268   __Pyx_XDECREF(__pyx_t_1);
40269   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40270   __pyx_r = NULL;
40271   __Pyx_XGIVEREF(__pyx_r);
40272   __Pyx_RefNannyFinishContext();
40273   return __pyx_r;
40274 }
40275 
40276 /* "(tree fragment)":3
40277  * def __reduce_cython__(self):
40278  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
40279  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
40280  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
40281  */
40282 
40283 /* Python wrapper */
40284 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)40285 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
40286   PyObject *__pyx_r = 0;
40287   __Pyx_RefNannyDeclarations
40288   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
40289   __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
40290 
40291   /* function exit code */
40292   __Pyx_RefNannyFinishContext();
40293   return __pyx_r;
40294 }
40295 
__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)40296 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) {
40297   PyObject *__pyx_r = NULL;
40298   __Pyx_RefNannyDeclarations
40299   PyObject *__pyx_t_1 = NULL;
40300   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
40301 
40302   /* "(tree fragment)":4
40303  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
40304  * def __setstate_cython__(self, __pyx_state):
40305  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
40306  */
40307   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
40308   __Pyx_GOTREF(__pyx_t_1);
40309   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
40310   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40311   __PYX_ERR(1, 4, __pyx_L1_error)
40312 
40313   /* "(tree fragment)":3
40314  * def __reduce_cython__(self):
40315  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
40316  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
40317  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
40318  */
40319 
40320   /* function exit code */
40321   __pyx_L1_error:;
40322   __Pyx_XDECREF(__pyx_t_1);
40323   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40324   __pyx_r = NULL;
40325   __Pyx_XGIVEREF(__pyx_r);
40326   __Pyx_RefNannyFinishContext();
40327   return __pyx_r;
40328 }
40329 
40330 /* "View.MemoryView":995
40331  *
40332  * @cname('__pyx_memoryview_fromslice')
40333  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
40334  *                           int ndim,
40335  *                           object (*to_object_func)(char *),
40336  */
40337 
__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)40338 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) {
40339   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
40340   Py_ssize_t __pyx_v_suboffset;
40341   PyObject *__pyx_v_length = NULL;
40342   PyObject *__pyx_r = NULL;
40343   __Pyx_RefNannyDeclarations
40344   int __pyx_t_1;
40345   PyObject *__pyx_t_2 = NULL;
40346   PyObject *__pyx_t_3 = NULL;
40347   __Pyx_TypeInfo *__pyx_t_4;
40348   Py_buffer __pyx_t_5;
40349   Py_ssize_t *__pyx_t_6;
40350   Py_ssize_t *__pyx_t_7;
40351   Py_ssize_t *__pyx_t_8;
40352   Py_ssize_t __pyx_t_9;
40353   __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
40354 
40355   /* "View.MemoryView":1003
40356  *     cdef _memoryviewslice result
40357  *
40358  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
40359  *         return None
40360  *
40361  */
40362   __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
40363   if (__pyx_t_1) {
40364 
40365     /* "View.MemoryView":1004
40366  *
40367  *     if <PyObject *> memviewslice.memview == Py_None:
40368  *         return None             # <<<<<<<<<<<<<<
40369  *
40370  *
40371  */
40372     __Pyx_XDECREF(__pyx_r);
40373     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
40374     goto __pyx_L0;
40375 
40376     /* "View.MemoryView":1003
40377  *     cdef _memoryviewslice result
40378  *
40379  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
40380  *         return None
40381  *
40382  */
40383   }
40384 
40385   /* "View.MemoryView":1009
40386  *
40387  *
40388  *     result = _memoryviewslice(None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
40389  *
40390  *     result.from_slice = memviewslice
40391  */
40392   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1009, __pyx_L1_error)
40393   __Pyx_GOTREF(__pyx_t_2);
40394   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1009, __pyx_L1_error)
40395   __Pyx_GOTREF(__pyx_t_3);
40396   __Pyx_INCREF(Py_None);
40397   __Pyx_GIVEREF(Py_None);
40398   PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
40399   __Pyx_INCREF(__pyx_int_0);
40400   __Pyx_GIVEREF(__pyx_int_0);
40401   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
40402   __Pyx_GIVEREF(__pyx_t_2);
40403   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
40404   __pyx_t_2 = 0;
40405   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1009, __pyx_L1_error)
40406   __Pyx_GOTREF(__pyx_t_2);
40407   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40408   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
40409   __pyx_t_2 = 0;
40410 
40411   /* "View.MemoryView":1011
40412  *     result = _memoryviewslice(None, 0, dtype_is_object)
40413  *
40414  *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
40415  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
40416  *
40417  */
40418   __pyx_v_result->from_slice = __pyx_v_memviewslice;
40419 
40420   /* "View.MemoryView":1012
40421  *
40422  *     result.from_slice = memviewslice
40423  *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
40424  *
40425  *     result.from_object = (<memoryview> memviewslice.memview).base
40426  */
40427   __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
40428 
40429   /* "View.MemoryView":1014
40430  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
40431  *
40432  *     result.from_object = (<memoryview> memviewslice.memview).base             # <<<<<<<<<<<<<<
40433  *     result.typeinfo = memviewslice.memview.typeinfo
40434  *
40435  */
40436   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error)
40437   __Pyx_GOTREF(__pyx_t_2);
40438   __Pyx_GIVEREF(__pyx_t_2);
40439   __Pyx_GOTREF(__pyx_v_result->from_object);
40440   __Pyx_DECREF(__pyx_v_result->from_object);
40441   __pyx_v_result->from_object = __pyx_t_2;
40442   __pyx_t_2 = 0;
40443 
40444   /* "View.MemoryView":1015
40445  *
40446  *     result.from_object = (<memoryview> memviewslice.memview).base
40447  *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
40448  *
40449  *     result.view = memviewslice.memview.view
40450  */
40451   __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
40452   __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
40453 
40454   /* "View.MemoryView":1017
40455  *     result.typeinfo = memviewslice.memview.typeinfo
40456  *
40457  *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
40458  *     result.view.buf = <void *> memviewslice.data
40459  *     result.view.ndim = ndim
40460  */
40461   __pyx_t_5 = __pyx_v_memviewslice.memview->view;
40462   __pyx_v_result->__pyx_base.view = __pyx_t_5;
40463 
40464   /* "View.MemoryView":1018
40465  *
40466  *     result.view = memviewslice.memview.view
40467  *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
40468  *     result.view.ndim = ndim
40469  *     (<__pyx_buffer *> &result.view).obj = Py_None
40470  */
40471   __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
40472 
40473   /* "View.MemoryView":1019
40474  *     result.view = memviewslice.memview.view
40475  *     result.view.buf = <void *> memviewslice.data
40476  *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
40477  *     (<__pyx_buffer *> &result.view).obj = Py_None
40478  *     Py_INCREF(Py_None)
40479  */
40480   __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
40481 
40482   /* "View.MemoryView":1020
40483  *     result.view.buf = <void *> memviewslice.data
40484  *     result.view.ndim = ndim
40485  *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
40486  *     Py_INCREF(Py_None)
40487  *
40488  */
40489   ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
40490 
40491   /* "View.MemoryView":1021
40492  *     result.view.ndim = ndim
40493  *     (<__pyx_buffer *> &result.view).obj = Py_None
40494  *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
40495  *
40496  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
40497  */
40498   Py_INCREF(Py_None);
40499 
40500   /* "View.MemoryView":1023
40501  *     Py_INCREF(Py_None)
40502  *
40503  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
40504  *         result.flags = PyBUF_RECORDS
40505  *     else:
40506  */
40507   __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
40508   if (__pyx_t_1) {
40509 
40510     /* "View.MemoryView":1024
40511  *
40512  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
40513  *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
40514  *     else:
40515  *         result.flags = PyBUF_RECORDS_RO
40516  */
40517     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
40518 
40519     /* "View.MemoryView":1023
40520  *     Py_INCREF(Py_None)
40521  *
40522  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
40523  *         result.flags = PyBUF_RECORDS
40524  *     else:
40525  */
40526     goto __pyx_L4;
40527   }
40528 
40529   /* "View.MemoryView":1026
40530  *         result.flags = PyBUF_RECORDS
40531  *     else:
40532  *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
40533  *
40534  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
40535  */
40536   /*else*/ {
40537     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
40538   }
40539   __pyx_L4:;
40540 
40541   /* "View.MemoryView":1028
40542  *         result.flags = PyBUF_RECORDS_RO
40543  *
40544  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
40545  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
40546  *
40547  */
40548   __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
40549 
40550   /* "View.MemoryView":1029
40551  *
40552  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
40553  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
40554  *
40555  *
40556  */
40557   __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
40558 
40559   /* "View.MemoryView":1032
40560  *
40561  *
40562  *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
40563  *     for suboffset in result.from_slice.suboffsets[:ndim]:
40564  *         if suboffset >= 0:
40565  */
40566   __pyx_v_result->__pyx_base.view.suboffsets = NULL;
40567 
40568   /* "View.MemoryView":1033
40569  *
40570  *     result.view.suboffsets = NULL
40571  *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
40572  *         if suboffset >= 0:
40573  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
40574  */
40575   __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
40576   for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
40577     __pyx_t_6 = __pyx_t_8;
40578     __pyx_v_suboffset = (__pyx_t_6[0]);
40579 
40580     /* "View.MemoryView":1034
40581  *     result.view.suboffsets = NULL
40582  *     for suboffset in result.from_slice.suboffsets[:ndim]:
40583  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
40584  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
40585  *             break
40586  */
40587     __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
40588     if (__pyx_t_1) {
40589 
40590       /* "View.MemoryView":1035
40591  *     for suboffset in result.from_slice.suboffsets[:ndim]:
40592  *         if suboffset >= 0:
40593  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
40594  *             break
40595  *
40596  */
40597       __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
40598 
40599       /* "View.MemoryView":1036
40600  *         if suboffset >= 0:
40601  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
40602  *             break             # <<<<<<<<<<<<<<
40603  *
40604  *     result.view.len = result.view.itemsize
40605  */
40606       goto __pyx_L6_break;
40607 
40608       /* "View.MemoryView":1034
40609  *     result.view.suboffsets = NULL
40610  *     for suboffset in result.from_slice.suboffsets[:ndim]:
40611  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
40612  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
40613  *             break
40614  */
40615     }
40616   }
40617   __pyx_L6_break:;
40618 
40619   /* "View.MemoryView":1038
40620  *             break
40621  *
40622  *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
40623  *     for length in result.view.shape[:ndim]:
40624  *         result.view.len *= length
40625  */
40626   __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
40627   __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
40628 
40629   /* "View.MemoryView":1039
40630  *
40631  *     result.view.len = result.view.itemsize
40632  *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
40633  *         result.view.len *= length
40634  *
40635  */
40636   __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
40637   for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
40638     __pyx_t_6 = __pyx_t_8;
40639     __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1039, __pyx_L1_error)
40640     __Pyx_GOTREF(__pyx_t_2);
40641     __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
40642     __pyx_t_2 = 0;
40643 
40644     /* "View.MemoryView":1040
40645  *     result.view.len = result.view.itemsize
40646  *     for length in result.view.shape[:ndim]:
40647  *         result.view.len *= length             # <<<<<<<<<<<<<<
40648  *
40649  *     result.to_object_func = to_object_func
40650  */
40651     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1040, __pyx_L1_error)
40652     __Pyx_GOTREF(__pyx_t_2);
40653     __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1040, __pyx_L1_error)
40654     __Pyx_GOTREF(__pyx_t_3);
40655     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40656     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1040, __pyx_L1_error)
40657     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40658     __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
40659   }
40660 
40661   /* "View.MemoryView":1042
40662  *         result.view.len *= length
40663  *
40664  *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
40665  *     result.to_dtype_func = to_dtype_func
40666  *
40667  */
40668   __pyx_v_result->to_object_func = __pyx_v_to_object_func;
40669 
40670   /* "View.MemoryView":1043
40671  *
40672  *     result.to_object_func = to_object_func
40673  *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
40674  *
40675  *     return result
40676  */
40677   __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
40678 
40679   /* "View.MemoryView":1045
40680  *     result.to_dtype_func = to_dtype_func
40681  *
40682  *     return result             # <<<<<<<<<<<<<<
40683  *
40684  * @cname('__pyx_memoryview_get_slice_from_memoryview')
40685  */
40686   __Pyx_XDECREF(__pyx_r);
40687   __Pyx_INCREF(((PyObject *)__pyx_v_result));
40688   __pyx_r = ((PyObject *)__pyx_v_result);
40689   goto __pyx_L0;
40690 
40691   /* "View.MemoryView":995
40692  *
40693  * @cname('__pyx_memoryview_fromslice')
40694  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
40695  *                           int ndim,
40696  *                           object (*to_object_func)(char *),
40697  */
40698 
40699   /* function exit code */
40700   __pyx_L1_error:;
40701   __Pyx_XDECREF(__pyx_t_2);
40702   __Pyx_XDECREF(__pyx_t_3);
40703   __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
40704   __pyx_r = 0;
40705   __pyx_L0:;
40706   __Pyx_XDECREF((PyObject *)__pyx_v_result);
40707   __Pyx_XDECREF(__pyx_v_length);
40708   __Pyx_XGIVEREF(__pyx_r);
40709   __Pyx_RefNannyFinishContext();
40710   return __pyx_r;
40711 }
40712 
40713 /* "View.MemoryView":1048
40714  *
40715  * @cname('__pyx_memoryview_get_slice_from_memoryview')
40716  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
40717  *                                                    __Pyx_memviewslice *mslice):
40718  *     cdef _memoryviewslice obj
40719  */
40720 
__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_mslice)40721 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
40722   struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
40723   __Pyx_memviewslice *__pyx_r;
40724   __Pyx_RefNannyDeclarations
40725   int __pyx_t_1;
40726   int __pyx_t_2;
40727   PyObject *__pyx_t_3 = NULL;
40728   __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
40729 
40730   /* "View.MemoryView":1051
40731  *                                                    __Pyx_memviewslice *mslice):
40732  *     cdef _memoryviewslice obj
40733  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
40734  *         obj = memview
40735  *         return &obj.from_slice
40736  */
40737   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
40738   __pyx_t_2 = (__pyx_t_1 != 0);
40739   if (__pyx_t_2) {
40740 
40741     /* "View.MemoryView":1052
40742  *     cdef _memoryviewslice obj
40743  *     if isinstance(memview, _memoryviewslice):
40744  *         obj = memview             # <<<<<<<<<<<<<<
40745  *         return &obj.from_slice
40746  *     else:
40747  */
40748     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1052, __pyx_L1_error)
40749     __pyx_t_3 = ((PyObject *)__pyx_v_memview);
40750     __Pyx_INCREF(__pyx_t_3);
40751     __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
40752     __pyx_t_3 = 0;
40753 
40754     /* "View.MemoryView":1053
40755  *     if isinstance(memview, _memoryviewslice):
40756  *         obj = memview
40757  *         return &obj.from_slice             # <<<<<<<<<<<<<<
40758  *     else:
40759  *         slice_copy(memview, mslice)
40760  */
40761     __pyx_r = (&__pyx_v_obj->from_slice);
40762     goto __pyx_L0;
40763 
40764     /* "View.MemoryView":1051
40765  *                                                    __Pyx_memviewslice *mslice):
40766  *     cdef _memoryviewslice obj
40767  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
40768  *         obj = memview
40769  *         return &obj.from_slice
40770  */
40771   }
40772 
40773   /* "View.MemoryView":1055
40774  *         return &obj.from_slice
40775  *     else:
40776  *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
40777  *         return mslice
40778  *
40779  */
40780   /*else*/ {
40781     __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
40782 
40783     /* "View.MemoryView":1056
40784  *     else:
40785  *         slice_copy(memview, mslice)
40786  *         return mslice             # <<<<<<<<<<<<<<
40787  *
40788  * @cname('__pyx_memoryview_slice_copy')
40789  */
40790     __pyx_r = __pyx_v_mslice;
40791     goto __pyx_L0;
40792   }
40793 
40794   /* "View.MemoryView":1048
40795  *
40796  * @cname('__pyx_memoryview_get_slice_from_memoryview')
40797  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
40798  *                                                    __Pyx_memviewslice *mslice):
40799  *     cdef _memoryviewslice obj
40800  */
40801 
40802   /* function exit code */
40803   __pyx_L1_error:;
40804   __Pyx_XDECREF(__pyx_t_3);
40805   __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
40806   __pyx_r = 0;
40807   __pyx_L0:;
40808   __Pyx_XDECREF((PyObject *)__pyx_v_obj);
40809   __Pyx_RefNannyFinishContext();
40810   return __pyx_r;
40811 }
40812 
40813 /* "View.MemoryView":1059
40814  *
40815  * @cname('__pyx_memoryview_slice_copy')
40816  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
40817  *     cdef int dim
40818  *     cdef (Py_ssize_t*) shape, strides, suboffsets
40819  */
40820 
__pyx_memoryview_slice_copy(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_dst)40821 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
40822   int __pyx_v_dim;
40823   Py_ssize_t *__pyx_v_shape;
40824   Py_ssize_t *__pyx_v_strides;
40825   Py_ssize_t *__pyx_v_suboffsets;
40826   __Pyx_RefNannyDeclarations
40827   Py_ssize_t *__pyx_t_1;
40828   int __pyx_t_2;
40829   int __pyx_t_3;
40830   int __pyx_t_4;
40831   Py_ssize_t __pyx_t_5;
40832   __Pyx_RefNannySetupContext("slice_copy", 0);
40833 
40834   /* "View.MemoryView":1063
40835  *     cdef (Py_ssize_t*) shape, strides, suboffsets
40836  *
40837  *     shape = memview.view.shape             # <<<<<<<<<<<<<<
40838  *     strides = memview.view.strides
40839  *     suboffsets = memview.view.suboffsets
40840  */
40841   __pyx_t_1 = __pyx_v_memview->view.shape;
40842   __pyx_v_shape = __pyx_t_1;
40843 
40844   /* "View.MemoryView":1064
40845  *
40846  *     shape = memview.view.shape
40847  *     strides = memview.view.strides             # <<<<<<<<<<<<<<
40848  *     suboffsets = memview.view.suboffsets
40849  *
40850  */
40851   __pyx_t_1 = __pyx_v_memview->view.strides;
40852   __pyx_v_strides = __pyx_t_1;
40853 
40854   /* "View.MemoryView":1065
40855  *     shape = memview.view.shape
40856  *     strides = memview.view.strides
40857  *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
40858  *
40859  *     dst.memview = <__pyx_memoryview *> memview
40860  */
40861   __pyx_t_1 = __pyx_v_memview->view.suboffsets;
40862   __pyx_v_suboffsets = __pyx_t_1;
40863 
40864   /* "View.MemoryView":1067
40865  *     suboffsets = memview.view.suboffsets
40866  *
40867  *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
40868  *     dst.data = <char *> memview.view.buf
40869  *
40870  */
40871   __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
40872 
40873   /* "View.MemoryView":1068
40874  *
40875  *     dst.memview = <__pyx_memoryview *> memview
40876  *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
40877  *
40878  *     for dim in range(memview.view.ndim):
40879  */
40880   __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
40881 
40882   /* "View.MemoryView":1070
40883  *     dst.data = <char *> memview.view.buf
40884  *
40885  *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
40886  *         dst.shape[dim] = shape[dim]
40887  *         dst.strides[dim] = strides[dim]
40888  */
40889   __pyx_t_2 = __pyx_v_memview->view.ndim;
40890   __pyx_t_3 = __pyx_t_2;
40891   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
40892     __pyx_v_dim = __pyx_t_4;
40893 
40894     /* "View.MemoryView":1071
40895  *
40896  *     for dim in range(memview.view.ndim):
40897  *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
40898  *         dst.strides[dim] = strides[dim]
40899  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
40900  */
40901     (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
40902 
40903     /* "View.MemoryView":1072
40904  *     for dim in range(memview.view.ndim):
40905  *         dst.shape[dim] = shape[dim]
40906  *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
40907  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
40908  *
40909  */
40910     (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
40911 
40912     /* "View.MemoryView":1073
40913  *         dst.shape[dim] = shape[dim]
40914  *         dst.strides[dim] = strides[dim]
40915  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
40916  *
40917  * @cname('__pyx_memoryview_copy_object')
40918  */
40919     if ((__pyx_v_suboffsets != 0)) {
40920       __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
40921     } else {
40922       __pyx_t_5 = -1L;
40923     }
40924     (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
40925   }
40926 
40927   /* "View.MemoryView":1059
40928  *
40929  * @cname('__pyx_memoryview_slice_copy')
40930  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
40931  *     cdef int dim
40932  *     cdef (Py_ssize_t*) shape, strides, suboffsets
40933  */
40934 
40935   /* function exit code */
40936   __Pyx_RefNannyFinishContext();
40937 }
40938 
40939 /* "View.MemoryView":1076
40940  *
40941  * @cname('__pyx_memoryview_copy_object')
40942  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
40943  *     "Create a new memoryview object"
40944  *     cdef __Pyx_memviewslice memviewslice
40945  */
40946 
__pyx_memoryview_copy_object(struct __pyx_memoryview_obj * __pyx_v_memview)40947 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
40948   __Pyx_memviewslice __pyx_v_memviewslice;
40949   PyObject *__pyx_r = NULL;
40950   __Pyx_RefNannyDeclarations
40951   PyObject *__pyx_t_1 = NULL;
40952   __Pyx_RefNannySetupContext("memoryview_copy", 0);
40953 
40954   /* "View.MemoryView":1079
40955  *     "Create a new memoryview object"
40956  *     cdef __Pyx_memviewslice memviewslice
40957  *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
40958  *     return memoryview_copy_from_slice(memview, &memviewslice)
40959  *
40960  */
40961   __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
40962 
40963   /* "View.MemoryView":1080
40964  *     cdef __Pyx_memviewslice memviewslice
40965  *     slice_copy(memview, &memviewslice)
40966  *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
40967  *
40968  * @cname('__pyx_memoryview_copy_object_from_slice')
40969  */
40970   __Pyx_XDECREF(__pyx_r);
40971   __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1080, __pyx_L1_error)
40972   __Pyx_GOTREF(__pyx_t_1);
40973   __pyx_r = __pyx_t_1;
40974   __pyx_t_1 = 0;
40975   goto __pyx_L0;
40976 
40977   /* "View.MemoryView":1076
40978  *
40979  * @cname('__pyx_memoryview_copy_object')
40980  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
40981  *     "Create a new memoryview object"
40982  *     cdef __Pyx_memviewslice memviewslice
40983  */
40984 
40985   /* function exit code */
40986   __pyx_L1_error:;
40987   __Pyx_XDECREF(__pyx_t_1);
40988   __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
40989   __pyx_r = 0;
40990   __pyx_L0:;
40991   __Pyx_XGIVEREF(__pyx_r);
40992   __Pyx_RefNannyFinishContext();
40993   return __pyx_r;
40994 }
40995 
40996 /* "View.MemoryView":1083
40997  *
40998  * @cname('__pyx_memoryview_copy_object_from_slice')
40999  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
41000  *     """
41001  *     Create a new memoryview object from a given memoryview object and slice.
41002  */
41003 
__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_memviewslice)41004 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
41005   PyObject *(*__pyx_v_to_object_func)(char *);
41006   int (*__pyx_v_to_dtype_func)(char *, PyObject *);
41007   PyObject *__pyx_r = NULL;
41008   __Pyx_RefNannyDeclarations
41009   int __pyx_t_1;
41010   int __pyx_t_2;
41011   PyObject *(*__pyx_t_3)(char *);
41012   int (*__pyx_t_4)(char *, PyObject *);
41013   PyObject *__pyx_t_5 = NULL;
41014   __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
41015 
41016   /* "View.MemoryView":1090
41017  *     cdef int (*to_dtype_func)(char *, object) except 0
41018  *
41019  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
41020  *         to_object_func = (<_memoryviewslice> memview).to_object_func
41021  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
41022  */
41023   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
41024   __pyx_t_2 = (__pyx_t_1 != 0);
41025   if (__pyx_t_2) {
41026 
41027     /* "View.MemoryView":1091
41028  *
41029  *     if isinstance(memview, _memoryviewslice):
41030  *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
41031  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
41032  *     else:
41033  */
41034     __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
41035     __pyx_v_to_object_func = __pyx_t_3;
41036 
41037     /* "View.MemoryView":1092
41038  *     if isinstance(memview, _memoryviewslice):
41039  *         to_object_func = (<_memoryviewslice> memview).to_object_func
41040  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
41041  *     else:
41042  *         to_object_func = NULL
41043  */
41044     __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
41045     __pyx_v_to_dtype_func = __pyx_t_4;
41046 
41047     /* "View.MemoryView":1090
41048  *     cdef int (*to_dtype_func)(char *, object) except 0
41049  *
41050  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
41051  *         to_object_func = (<_memoryviewslice> memview).to_object_func
41052  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
41053  */
41054     goto __pyx_L3;
41055   }
41056 
41057   /* "View.MemoryView":1094
41058  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
41059  *     else:
41060  *         to_object_func = NULL             # <<<<<<<<<<<<<<
41061  *         to_dtype_func = NULL
41062  *
41063  */
41064   /*else*/ {
41065     __pyx_v_to_object_func = NULL;
41066 
41067     /* "View.MemoryView":1095
41068  *     else:
41069  *         to_object_func = NULL
41070  *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
41071  *
41072  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
41073  */
41074     __pyx_v_to_dtype_func = NULL;
41075   }
41076   __pyx_L3:;
41077 
41078   /* "View.MemoryView":1097
41079  *         to_dtype_func = NULL
41080  *
41081  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
41082  *                                 to_object_func, to_dtype_func,
41083  *                                 memview.dtype_is_object)
41084  */
41085   __Pyx_XDECREF(__pyx_r);
41086 
41087   /* "View.MemoryView":1099
41088  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
41089  *                                 to_object_func, to_dtype_func,
41090  *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
41091  *
41092  *
41093  */
41094   __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(1, 1097, __pyx_L1_error)
41095   __Pyx_GOTREF(__pyx_t_5);
41096   __pyx_r = __pyx_t_5;
41097   __pyx_t_5 = 0;
41098   goto __pyx_L0;
41099 
41100   /* "View.MemoryView":1083
41101  *
41102  * @cname('__pyx_memoryview_copy_object_from_slice')
41103  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
41104  *     """
41105  *     Create a new memoryview object from a given memoryview object and slice.
41106  */
41107 
41108   /* function exit code */
41109   __pyx_L1_error:;
41110   __Pyx_XDECREF(__pyx_t_5);
41111   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
41112   __pyx_r = 0;
41113   __pyx_L0:;
41114   __Pyx_XGIVEREF(__pyx_r);
41115   __Pyx_RefNannyFinishContext();
41116   return __pyx_r;
41117 }
41118 
41119 /* "View.MemoryView":1105
41120  *
41121  *
41122  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
41123  *     if arg < 0:
41124  *         return -arg
41125  */
41126 
abs_py_ssize_t(Py_ssize_t __pyx_v_arg)41127 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
41128   Py_ssize_t __pyx_r;
41129   int __pyx_t_1;
41130 
41131   /* "View.MemoryView":1106
41132  *
41133  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
41134  *     if arg < 0:             # <<<<<<<<<<<<<<
41135  *         return -arg
41136  *     else:
41137  */
41138   __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
41139   if (__pyx_t_1) {
41140 
41141     /* "View.MemoryView":1107
41142  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
41143  *     if arg < 0:
41144  *         return -arg             # <<<<<<<<<<<<<<
41145  *     else:
41146  *         return arg
41147  */
41148     __pyx_r = (-__pyx_v_arg);
41149     goto __pyx_L0;
41150 
41151     /* "View.MemoryView":1106
41152  *
41153  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
41154  *     if arg < 0:             # <<<<<<<<<<<<<<
41155  *         return -arg
41156  *     else:
41157  */
41158   }
41159 
41160   /* "View.MemoryView":1109
41161  *         return -arg
41162  *     else:
41163  *         return arg             # <<<<<<<<<<<<<<
41164  *
41165  * @cname('__pyx_get_best_slice_order')
41166  */
41167   /*else*/ {
41168     __pyx_r = __pyx_v_arg;
41169     goto __pyx_L0;
41170   }
41171 
41172   /* "View.MemoryView":1105
41173  *
41174  *
41175  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
41176  *     if arg < 0:
41177  *         return -arg
41178  */
41179 
41180   /* function exit code */
41181   __pyx_L0:;
41182   return __pyx_r;
41183 }
41184 
41185 /* "View.MemoryView":1112
41186  *
41187  * @cname('__pyx_get_best_slice_order')
41188  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
41189  *     """
41190  *     Figure out the best memory access order for a given slice.
41191  */
41192 
__pyx_get_best_slice_order(__Pyx_memviewslice * __pyx_v_mslice,int __pyx_v_ndim)41193 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
41194   int __pyx_v_i;
41195   Py_ssize_t __pyx_v_c_stride;
41196   Py_ssize_t __pyx_v_f_stride;
41197   char __pyx_r;
41198   int __pyx_t_1;
41199   int __pyx_t_2;
41200   int __pyx_t_3;
41201   int __pyx_t_4;
41202 
41203   /* "View.MemoryView":1117
41204  *     """
41205  *     cdef int i
41206  *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
41207  *     cdef Py_ssize_t f_stride = 0
41208  *
41209  */
41210   __pyx_v_c_stride = 0;
41211 
41212   /* "View.MemoryView":1118
41213  *     cdef int i
41214  *     cdef Py_ssize_t c_stride = 0
41215  *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
41216  *
41217  *     for i in range(ndim - 1, -1, -1):
41218  */
41219   __pyx_v_f_stride = 0;
41220 
41221   /* "View.MemoryView":1120
41222  *     cdef Py_ssize_t f_stride = 0
41223  *
41224  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
41225  *         if mslice.shape[i] > 1:
41226  *             c_stride = mslice.strides[i]
41227  */
41228   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
41229     __pyx_v_i = __pyx_t_1;
41230 
41231     /* "View.MemoryView":1121
41232  *
41233  *     for i in range(ndim - 1, -1, -1):
41234  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
41235  *             c_stride = mslice.strides[i]
41236  *             break
41237  */
41238     __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
41239     if (__pyx_t_2) {
41240 
41241       /* "View.MemoryView":1122
41242  *     for i in range(ndim - 1, -1, -1):
41243  *         if mslice.shape[i] > 1:
41244  *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
41245  *             break
41246  *
41247  */
41248       __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
41249 
41250       /* "View.MemoryView":1123
41251  *         if mslice.shape[i] > 1:
41252  *             c_stride = mslice.strides[i]
41253  *             break             # <<<<<<<<<<<<<<
41254  *
41255  *     for i in range(ndim):
41256  */
41257       goto __pyx_L4_break;
41258 
41259       /* "View.MemoryView":1121
41260  *
41261  *     for i in range(ndim - 1, -1, -1):
41262  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
41263  *             c_stride = mslice.strides[i]
41264  *             break
41265  */
41266     }
41267   }
41268   __pyx_L4_break:;
41269 
41270   /* "View.MemoryView":1125
41271  *             break
41272  *
41273  *     for i in range(ndim):             # <<<<<<<<<<<<<<
41274  *         if mslice.shape[i] > 1:
41275  *             f_stride = mslice.strides[i]
41276  */
41277   __pyx_t_1 = __pyx_v_ndim;
41278   __pyx_t_3 = __pyx_t_1;
41279   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
41280     __pyx_v_i = __pyx_t_4;
41281 
41282     /* "View.MemoryView":1126
41283  *
41284  *     for i in range(ndim):
41285  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
41286  *             f_stride = mslice.strides[i]
41287  *             break
41288  */
41289     __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
41290     if (__pyx_t_2) {
41291 
41292       /* "View.MemoryView":1127
41293  *     for i in range(ndim):
41294  *         if mslice.shape[i] > 1:
41295  *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
41296  *             break
41297  *
41298  */
41299       __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
41300 
41301       /* "View.MemoryView":1128
41302  *         if mslice.shape[i] > 1:
41303  *             f_stride = mslice.strides[i]
41304  *             break             # <<<<<<<<<<<<<<
41305  *
41306  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
41307  */
41308       goto __pyx_L7_break;
41309 
41310       /* "View.MemoryView":1126
41311  *
41312  *     for i in range(ndim):
41313  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
41314  *             f_stride = mslice.strides[i]
41315  *             break
41316  */
41317     }
41318   }
41319   __pyx_L7_break:;
41320 
41321   /* "View.MemoryView":1130
41322  *             break
41323  *
41324  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
41325  *         return 'C'
41326  *     else:
41327  */
41328   __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
41329   if (__pyx_t_2) {
41330 
41331     /* "View.MemoryView":1131
41332  *
41333  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
41334  *         return 'C'             # <<<<<<<<<<<<<<
41335  *     else:
41336  *         return 'F'
41337  */
41338     __pyx_r = 'C';
41339     goto __pyx_L0;
41340 
41341     /* "View.MemoryView":1130
41342  *             break
41343  *
41344  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
41345  *         return 'C'
41346  *     else:
41347  */
41348   }
41349 
41350   /* "View.MemoryView":1133
41351  *         return 'C'
41352  *     else:
41353  *         return 'F'             # <<<<<<<<<<<<<<
41354  *
41355  * @cython.cdivision(True)
41356  */
41357   /*else*/ {
41358     __pyx_r = 'F';
41359     goto __pyx_L0;
41360   }
41361 
41362   /* "View.MemoryView":1112
41363  *
41364  * @cname('__pyx_get_best_slice_order')
41365  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
41366  *     """
41367  *     Figure out the best memory access order for a given slice.
41368  */
41369 
41370   /* function exit code */
41371   __pyx_L0:;
41372   return __pyx_r;
41373 }
41374 
41375 /* "View.MemoryView":1136
41376  *
41377  * @cython.cdivision(True)
41378  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
41379  *                                    char *dst_data, Py_ssize_t *dst_strides,
41380  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
41381  */
41382 
_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)41383 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) {
41384   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
41385   CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
41386   Py_ssize_t __pyx_v_dst_extent;
41387   Py_ssize_t __pyx_v_src_stride;
41388   Py_ssize_t __pyx_v_dst_stride;
41389   int __pyx_t_1;
41390   int __pyx_t_2;
41391   int __pyx_t_3;
41392   Py_ssize_t __pyx_t_4;
41393   Py_ssize_t __pyx_t_5;
41394   Py_ssize_t __pyx_t_6;
41395 
41396   /* "View.MemoryView":1143
41397  *
41398  *     cdef Py_ssize_t i
41399  *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
41400  *     cdef Py_ssize_t dst_extent = dst_shape[0]
41401  *     cdef Py_ssize_t src_stride = src_strides[0]
41402  */
41403   __pyx_v_src_extent = (__pyx_v_src_shape[0]);
41404 
41405   /* "View.MemoryView":1144
41406  *     cdef Py_ssize_t i
41407  *     cdef Py_ssize_t src_extent = src_shape[0]
41408  *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
41409  *     cdef Py_ssize_t src_stride = src_strides[0]
41410  *     cdef Py_ssize_t dst_stride = dst_strides[0]
41411  */
41412   __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
41413 
41414   /* "View.MemoryView":1145
41415  *     cdef Py_ssize_t src_extent = src_shape[0]
41416  *     cdef Py_ssize_t dst_extent = dst_shape[0]
41417  *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
41418  *     cdef Py_ssize_t dst_stride = dst_strides[0]
41419  *
41420  */
41421   __pyx_v_src_stride = (__pyx_v_src_strides[0]);
41422 
41423   /* "View.MemoryView":1146
41424  *     cdef Py_ssize_t dst_extent = dst_shape[0]
41425  *     cdef Py_ssize_t src_stride = src_strides[0]
41426  *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
41427  *
41428  *     if ndim == 1:
41429  */
41430   __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
41431 
41432   /* "View.MemoryView":1148
41433  *     cdef Py_ssize_t dst_stride = dst_strides[0]
41434  *
41435  *     if ndim == 1:             # <<<<<<<<<<<<<<
41436  *        if (src_stride > 0 and dst_stride > 0 and
41437  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
41438  */
41439   __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
41440   if (__pyx_t_1) {
41441 
41442     /* "View.MemoryView":1149
41443  *
41444  *     if ndim == 1:
41445  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
41446  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
41447  *            memcpy(dst_data, src_data, itemsize * dst_extent)
41448  */
41449     __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
41450     if (__pyx_t_2) {
41451     } else {
41452       __pyx_t_1 = __pyx_t_2;
41453       goto __pyx_L5_bool_binop_done;
41454     }
41455     __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
41456     if (__pyx_t_2) {
41457     } else {
41458       __pyx_t_1 = __pyx_t_2;
41459       goto __pyx_L5_bool_binop_done;
41460     }
41461 
41462     /* "View.MemoryView":1150
41463  *     if ndim == 1:
41464  *        if (src_stride > 0 and dst_stride > 0 and
41465  *            <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
41466  *            memcpy(dst_data, src_data, itemsize * dst_extent)
41467  *        else:
41468  */
41469     __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
41470     if (__pyx_t_2) {
41471       __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
41472     }
41473     __pyx_t_3 = (__pyx_t_2 != 0);
41474     __pyx_t_1 = __pyx_t_3;
41475     __pyx_L5_bool_binop_done:;
41476 
41477     /* "View.MemoryView":1149
41478  *
41479  *     if ndim == 1:
41480  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
41481  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
41482  *            memcpy(dst_data, src_data, itemsize * dst_extent)
41483  */
41484     if (__pyx_t_1) {
41485 
41486       /* "View.MemoryView":1151
41487  *        if (src_stride > 0 and dst_stride > 0 and
41488  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
41489  *            memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
41490  *        else:
41491  *            for i in range(dst_extent):
41492  */
41493       (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
41494 
41495       /* "View.MemoryView":1149
41496  *
41497  *     if ndim == 1:
41498  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
41499  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
41500  *            memcpy(dst_data, src_data, itemsize * dst_extent)
41501  */
41502       goto __pyx_L4;
41503     }
41504 
41505     /* "View.MemoryView":1153
41506  *            memcpy(dst_data, src_data, itemsize * dst_extent)
41507  *        else:
41508  *            for i in range(dst_extent):             # <<<<<<<<<<<<<<
41509  *                memcpy(dst_data, src_data, itemsize)
41510  *                src_data += src_stride
41511  */
41512     /*else*/ {
41513       __pyx_t_4 = __pyx_v_dst_extent;
41514       __pyx_t_5 = __pyx_t_4;
41515       for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
41516         __pyx_v_i = __pyx_t_6;
41517 
41518         /* "View.MemoryView":1154
41519  *        else:
41520  *            for i in range(dst_extent):
41521  *                memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
41522  *                src_data += src_stride
41523  *                dst_data += dst_stride
41524  */
41525         (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
41526 
41527         /* "View.MemoryView":1155
41528  *            for i in range(dst_extent):
41529  *                memcpy(dst_data, src_data, itemsize)
41530  *                src_data += src_stride             # <<<<<<<<<<<<<<
41531  *                dst_data += dst_stride
41532  *     else:
41533  */
41534         __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
41535 
41536         /* "View.MemoryView":1156
41537  *                memcpy(dst_data, src_data, itemsize)
41538  *                src_data += src_stride
41539  *                dst_data += dst_stride             # <<<<<<<<<<<<<<
41540  *     else:
41541  *         for i in range(dst_extent):
41542  */
41543         __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
41544       }
41545     }
41546     __pyx_L4:;
41547 
41548     /* "View.MemoryView":1148
41549  *     cdef Py_ssize_t dst_stride = dst_strides[0]
41550  *
41551  *     if ndim == 1:             # <<<<<<<<<<<<<<
41552  *        if (src_stride > 0 and dst_stride > 0 and
41553  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
41554  */
41555     goto __pyx_L3;
41556   }
41557 
41558   /* "View.MemoryView":1158
41559  *                dst_data += dst_stride
41560  *     else:
41561  *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
41562  *             _copy_strided_to_strided(src_data, src_strides + 1,
41563  *                                      dst_data, dst_strides + 1,
41564  */
41565   /*else*/ {
41566     __pyx_t_4 = __pyx_v_dst_extent;
41567     __pyx_t_5 = __pyx_t_4;
41568     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
41569       __pyx_v_i = __pyx_t_6;
41570 
41571       /* "View.MemoryView":1159
41572  *     else:
41573  *         for i in range(dst_extent):
41574  *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
41575  *                                      dst_data, dst_strides + 1,
41576  *                                      src_shape + 1, dst_shape + 1,
41577  */
41578       _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);
41579 
41580       /* "View.MemoryView":1163
41581  *                                      src_shape + 1, dst_shape + 1,
41582  *                                      ndim - 1, itemsize)
41583  *             src_data += src_stride             # <<<<<<<<<<<<<<
41584  *             dst_data += dst_stride
41585  *
41586  */
41587       __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
41588 
41589       /* "View.MemoryView":1164
41590  *                                      ndim - 1, itemsize)
41591  *             src_data += src_stride
41592  *             dst_data += dst_stride             # <<<<<<<<<<<<<<
41593  *
41594  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
41595  */
41596       __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
41597     }
41598   }
41599   __pyx_L3:;
41600 
41601   /* "View.MemoryView":1136
41602  *
41603  * @cython.cdivision(True)
41604  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
41605  *                                    char *dst_data, Py_ssize_t *dst_strides,
41606  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
41607  */
41608 
41609   /* function exit code */
41610 }
41611 
41612 /* "View.MemoryView":1166
41613  *             dst_data += dst_stride
41614  *
41615  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
41616  *                                   __Pyx_memviewslice *dst,
41617  *                                   int ndim, size_t itemsize) nogil:
41618  */
41619 
copy_strided_to_strided(__Pyx_memviewslice * __pyx_v_src,__Pyx_memviewslice * __pyx_v_dst,int __pyx_v_ndim,size_t __pyx_v_itemsize)41620 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) {
41621 
41622   /* "View.MemoryView":1169
41623  *                                   __Pyx_memviewslice *dst,
41624  *                                   int ndim, size_t itemsize) nogil:
41625  *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
41626  *                              src.shape, dst.shape, ndim, itemsize)
41627  *
41628  */
41629   _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);
41630 
41631   /* "View.MemoryView":1166
41632  *             dst_data += dst_stride
41633  *
41634  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
41635  *                                   __Pyx_memviewslice *dst,
41636  *                                   int ndim, size_t itemsize) nogil:
41637  */
41638 
41639   /* function exit code */
41640 }
41641 
41642 /* "View.MemoryView":1173
41643  *
41644  * @cname('__pyx_memoryview_slice_get_size')
41645  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
41646  *     "Return the size of the memory occupied by the slice in number of bytes"
41647  *     cdef int i
41648  */
41649 
__pyx_memoryview_slice_get_size(__Pyx_memviewslice * __pyx_v_src,int __pyx_v_ndim)41650 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
41651   int __pyx_v_i;
41652   Py_ssize_t __pyx_v_size;
41653   Py_ssize_t __pyx_r;
41654   Py_ssize_t __pyx_t_1;
41655   int __pyx_t_2;
41656   int __pyx_t_3;
41657   int __pyx_t_4;
41658 
41659   /* "View.MemoryView":1176
41660  *     "Return the size of the memory occupied by the slice in number of bytes"
41661  *     cdef int i
41662  *     cdef Py_ssize_t size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
41663  *
41664  *     for i in range(ndim):
41665  */
41666   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
41667   __pyx_v_size = __pyx_t_1;
41668 
41669   /* "View.MemoryView":1178
41670  *     cdef Py_ssize_t size = src.memview.view.itemsize
41671  *
41672  *     for i in range(ndim):             # <<<<<<<<<<<<<<
41673  *         size *= src.shape[i]
41674  *
41675  */
41676   __pyx_t_2 = __pyx_v_ndim;
41677   __pyx_t_3 = __pyx_t_2;
41678   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
41679     __pyx_v_i = __pyx_t_4;
41680 
41681     /* "View.MemoryView":1179
41682  *
41683  *     for i in range(ndim):
41684  *         size *= src.shape[i]             # <<<<<<<<<<<<<<
41685  *
41686  *     return size
41687  */
41688     __pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i]));
41689   }
41690 
41691   /* "View.MemoryView":1181
41692  *         size *= src.shape[i]
41693  *
41694  *     return size             # <<<<<<<<<<<<<<
41695  *
41696  * @cname('__pyx_fill_contig_strides_array')
41697  */
41698   __pyx_r = __pyx_v_size;
41699   goto __pyx_L0;
41700 
41701   /* "View.MemoryView":1173
41702  *
41703  * @cname('__pyx_memoryview_slice_get_size')
41704  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
41705  *     "Return the size of the memory occupied by the slice in number of bytes"
41706  *     cdef int i
41707  */
41708 
41709   /* function exit code */
41710   __pyx_L0:;
41711   return __pyx_r;
41712 }
41713 
41714 /* "View.MemoryView":1184
41715  *
41716  * @cname('__pyx_fill_contig_strides_array')
41717  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
41718  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
41719  *                 int ndim, char order) nogil:
41720  */
41721 
__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)41722 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) {
41723   int __pyx_v_idx;
41724   Py_ssize_t __pyx_r;
41725   int __pyx_t_1;
41726   int __pyx_t_2;
41727   int __pyx_t_3;
41728   int __pyx_t_4;
41729 
41730   /* "View.MemoryView":1193
41731  *     cdef int idx
41732  *
41733  *     if order == 'F':             # <<<<<<<<<<<<<<
41734  *         for idx in range(ndim):
41735  *             strides[idx] = stride
41736  */
41737   __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
41738   if (__pyx_t_1) {
41739 
41740     /* "View.MemoryView":1194
41741  *
41742  *     if order == 'F':
41743  *         for idx in range(ndim):             # <<<<<<<<<<<<<<
41744  *             strides[idx] = stride
41745  *             stride = stride * shape[idx]
41746  */
41747     __pyx_t_2 = __pyx_v_ndim;
41748     __pyx_t_3 = __pyx_t_2;
41749     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
41750       __pyx_v_idx = __pyx_t_4;
41751 
41752       /* "View.MemoryView":1195
41753  *     if order == 'F':
41754  *         for idx in range(ndim):
41755  *             strides[idx] = stride             # <<<<<<<<<<<<<<
41756  *             stride = stride * shape[idx]
41757  *     else:
41758  */
41759       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
41760 
41761       /* "View.MemoryView":1196
41762  *         for idx in range(ndim):
41763  *             strides[idx] = stride
41764  *             stride = stride * shape[idx]             # <<<<<<<<<<<<<<
41765  *     else:
41766  *         for idx in range(ndim - 1, -1, -1):
41767  */
41768       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
41769     }
41770 
41771     /* "View.MemoryView":1193
41772  *     cdef int idx
41773  *
41774  *     if order == 'F':             # <<<<<<<<<<<<<<
41775  *         for idx in range(ndim):
41776  *             strides[idx] = stride
41777  */
41778     goto __pyx_L3;
41779   }
41780 
41781   /* "View.MemoryView":1198
41782  *             stride = stride * shape[idx]
41783  *     else:
41784  *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
41785  *             strides[idx] = stride
41786  *             stride = stride * shape[idx]
41787  */
41788   /*else*/ {
41789     for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
41790       __pyx_v_idx = __pyx_t_2;
41791 
41792       /* "View.MemoryView":1199
41793  *     else:
41794  *         for idx in range(ndim - 1, -1, -1):
41795  *             strides[idx] = stride             # <<<<<<<<<<<<<<
41796  *             stride = stride * shape[idx]
41797  *
41798  */
41799       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
41800 
41801       /* "View.MemoryView":1200
41802  *         for idx in range(ndim - 1, -1, -1):
41803  *             strides[idx] = stride
41804  *             stride = stride * shape[idx]             # <<<<<<<<<<<<<<
41805  *
41806  *     return stride
41807  */
41808       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
41809     }
41810   }
41811   __pyx_L3:;
41812 
41813   /* "View.MemoryView":1202
41814  *             stride = stride * shape[idx]
41815  *
41816  *     return stride             # <<<<<<<<<<<<<<
41817  *
41818  * @cname('__pyx_memoryview_copy_data_to_temp')
41819  */
41820   __pyx_r = __pyx_v_stride;
41821   goto __pyx_L0;
41822 
41823   /* "View.MemoryView":1184
41824  *
41825  * @cname('__pyx_fill_contig_strides_array')
41826  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
41827  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
41828  *                 int ndim, char order) nogil:
41829  */
41830 
41831   /* function exit code */
41832   __pyx_L0:;
41833   return __pyx_r;
41834 }
41835 
41836 /* "View.MemoryView":1205
41837  *
41838  * @cname('__pyx_memoryview_copy_data_to_temp')
41839  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
41840  *                              __Pyx_memviewslice *tmpslice,
41841  *                              char order,
41842  */
41843 
__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice * __pyx_v_src,__Pyx_memviewslice * __pyx_v_tmpslice,char __pyx_v_order,int __pyx_v_ndim)41844 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) {
41845   int __pyx_v_i;
41846   void *__pyx_v_result;
41847   size_t __pyx_v_itemsize;
41848   size_t __pyx_v_size;
41849   void *__pyx_r;
41850   Py_ssize_t __pyx_t_1;
41851   int __pyx_t_2;
41852   int __pyx_t_3;
41853   struct __pyx_memoryview_obj *__pyx_t_4;
41854   int __pyx_t_5;
41855   int __pyx_t_6;
41856 
41857   /* "View.MemoryView":1216
41858  *     cdef void *result
41859  *
41860  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
41861  *     cdef size_t size = slice_get_size(src, ndim)
41862  *
41863  */
41864   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
41865   __pyx_v_itemsize = __pyx_t_1;
41866 
41867   /* "View.MemoryView":1217
41868  *
41869  *     cdef size_t itemsize = src.memview.view.itemsize
41870  *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
41871  *
41872  *     result = malloc(size)
41873  */
41874   __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
41875 
41876   /* "View.MemoryView":1219
41877  *     cdef size_t size = slice_get_size(src, ndim)
41878  *
41879  *     result = malloc(size)             # <<<<<<<<<<<<<<
41880  *     if not result:
41881  *         _err(MemoryError, NULL)
41882  */
41883   __pyx_v_result = malloc(__pyx_v_size);
41884 
41885   /* "View.MemoryView":1220
41886  *
41887  *     result = malloc(size)
41888  *     if not result:             # <<<<<<<<<<<<<<
41889  *         _err(MemoryError, NULL)
41890  *
41891  */
41892   __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
41893   if (__pyx_t_2) {
41894 
41895     /* "View.MemoryView":1221
41896  *     result = malloc(size)
41897  *     if not result:
41898  *         _err(MemoryError, NULL)             # <<<<<<<<<<<<<<
41899  *
41900  *
41901  */
41902     __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error)
41903 
41904     /* "View.MemoryView":1220
41905  *
41906  *     result = malloc(size)
41907  *     if not result:             # <<<<<<<<<<<<<<
41908  *         _err(MemoryError, NULL)
41909  *
41910  */
41911   }
41912 
41913   /* "View.MemoryView":1224
41914  *
41915  *
41916  *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
41917  *     tmpslice.memview = src.memview
41918  *     for i in range(ndim):
41919  */
41920   __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
41921 
41922   /* "View.MemoryView":1225
41923  *
41924  *     tmpslice.data = <char *> result
41925  *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
41926  *     for i in range(ndim):
41927  *         tmpslice.shape[i] = src.shape[i]
41928  */
41929   __pyx_t_4 = __pyx_v_src->memview;
41930   __pyx_v_tmpslice->memview = __pyx_t_4;
41931 
41932   /* "View.MemoryView":1226
41933  *     tmpslice.data = <char *> result
41934  *     tmpslice.memview = src.memview
41935  *     for i in range(ndim):             # <<<<<<<<<<<<<<
41936  *         tmpslice.shape[i] = src.shape[i]
41937  *         tmpslice.suboffsets[i] = -1
41938  */
41939   __pyx_t_3 = __pyx_v_ndim;
41940   __pyx_t_5 = __pyx_t_3;
41941   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
41942     __pyx_v_i = __pyx_t_6;
41943 
41944     /* "View.MemoryView":1227
41945  *     tmpslice.memview = src.memview
41946  *     for i in range(ndim):
41947  *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
41948  *         tmpslice.suboffsets[i] = -1
41949  *
41950  */
41951     (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
41952 
41953     /* "View.MemoryView":1228
41954  *     for i in range(ndim):
41955  *         tmpslice.shape[i] = src.shape[i]
41956  *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
41957  *
41958  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
41959  */
41960     (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
41961   }
41962 
41963   /* "View.MemoryView":1230
41964  *         tmpslice.suboffsets[i] = -1
41965  *
41966  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,             # <<<<<<<<<<<<<<
41967  *                               ndim, order)
41968  *
41969  */
41970   (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));
41971 
41972   /* "View.MemoryView":1234
41973  *
41974  *
41975  *     for i in range(ndim):             # <<<<<<<<<<<<<<
41976  *         if tmpslice.shape[i] == 1:
41977  *             tmpslice.strides[i] = 0
41978  */
41979   __pyx_t_3 = __pyx_v_ndim;
41980   __pyx_t_5 = __pyx_t_3;
41981   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
41982     __pyx_v_i = __pyx_t_6;
41983 
41984     /* "View.MemoryView":1235
41985  *
41986  *     for i in range(ndim):
41987  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
41988  *             tmpslice.strides[i] = 0
41989  *
41990  */
41991     __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
41992     if (__pyx_t_2) {
41993 
41994       /* "View.MemoryView":1236
41995  *     for i in range(ndim):
41996  *         if tmpslice.shape[i] == 1:
41997  *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
41998  *
41999  *     if slice_is_contig(src[0], order, ndim):
42000  */
42001       (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
42002 
42003       /* "View.MemoryView":1235
42004  *
42005  *     for i in range(ndim):
42006  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
42007  *             tmpslice.strides[i] = 0
42008  *
42009  */
42010     }
42011   }
42012 
42013   /* "View.MemoryView":1238
42014  *             tmpslice.strides[i] = 0
42015  *
42016  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
42017  *         memcpy(result, src.data, size)
42018  *     else:
42019  */
42020   __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
42021   if (__pyx_t_2) {
42022 
42023     /* "View.MemoryView":1239
42024  *
42025  *     if slice_is_contig(src[0], order, ndim):
42026  *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
42027  *     else:
42028  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
42029  */
42030     (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
42031 
42032     /* "View.MemoryView":1238
42033  *             tmpslice.strides[i] = 0
42034  *
42035  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
42036  *         memcpy(result, src.data, size)
42037  *     else:
42038  */
42039     goto __pyx_L9;
42040   }
42041 
42042   /* "View.MemoryView":1241
42043  *         memcpy(result, src.data, size)
42044  *     else:
42045  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
42046  *
42047  *     return result
42048  */
42049   /*else*/ {
42050     copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
42051   }
42052   __pyx_L9:;
42053 
42054   /* "View.MemoryView":1243
42055  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
42056  *
42057  *     return result             # <<<<<<<<<<<<<<
42058  *
42059  *
42060  */
42061   __pyx_r = __pyx_v_result;
42062   goto __pyx_L0;
42063 
42064   /* "View.MemoryView":1205
42065  *
42066  * @cname('__pyx_memoryview_copy_data_to_temp')
42067  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
42068  *                              __Pyx_memviewslice *tmpslice,
42069  *                              char order,
42070  */
42071 
42072   /* function exit code */
42073   __pyx_L1_error:;
42074   {
42075     #ifdef WITH_THREAD
42076     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
42077     #endif
42078     __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
42079     #ifdef WITH_THREAD
42080     __Pyx_PyGILState_Release(__pyx_gilstate_save);
42081     #endif
42082   }
42083   __pyx_r = NULL;
42084   __pyx_L0:;
42085   return __pyx_r;
42086 }
42087 
42088 /* "View.MemoryView":1248
42089  *
42090  * @cname('__pyx_memoryview_err_extents')
42091  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
42092  *                              Py_ssize_t extent2) except -1 with gil:
42093  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
42094  */
42095 
__pyx_memoryview_err_extents(int __pyx_v_i,Py_ssize_t __pyx_v_extent1,Py_ssize_t __pyx_v_extent2)42096 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
42097   int __pyx_r;
42098   __Pyx_RefNannyDeclarations
42099   PyObject *__pyx_t_1 = NULL;
42100   PyObject *__pyx_t_2 = NULL;
42101   PyObject *__pyx_t_3 = NULL;
42102   PyObject *__pyx_t_4 = NULL;
42103   #ifdef WITH_THREAD
42104   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
42105   #endif
42106   __Pyx_RefNannySetupContext("_err_extents", 0);
42107 
42108   /* "View.MemoryView":1251
42109  *                              Py_ssize_t extent2) except -1 with gil:
42110  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
42111  *                                                         (i, extent1, extent2))             # <<<<<<<<<<<<<<
42112  *
42113  * @cname('__pyx_memoryview_err_dim')
42114  */
42115   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1251, __pyx_L1_error)
42116   __Pyx_GOTREF(__pyx_t_1);
42117   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1251, __pyx_L1_error)
42118   __Pyx_GOTREF(__pyx_t_2);
42119   __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1251, __pyx_L1_error)
42120   __Pyx_GOTREF(__pyx_t_3);
42121   __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1251, __pyx_L1_error)
42122   __Pyx_GOTREF(__pyx_t_4);
42123   __Pyx_GIVEREF(__pyx_t_1);
42124   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
42125   __Pyx_GIVEREF(__pyx_t_2);
42126   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
42127   __Pyx_GIVEREF(__pyx_t_3);
42128   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
42129   __pyx_t_1 = 0;
42130   __pyx_t_2 = 0;
42131   __pyx_t_3 = 0;
42132 
42133   /* "View.MemoryView":1250
42134  * cdef int _err_extents(int i, Py_ssize_t extent1,
42135  *                              Py_ssize_t extent2) except -1 with gil:
42136  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %             # <<<<<<<<<<<<<<
42137  *                                                         (i, extent1, extent2))
42138  *
42139  */
42140   __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1250, __pyx_L1_error)
42141   __Pyx_GOTREF(__pyx_t_3);
42142   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42143   __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1250, __pyx_L1_error)
42144   __Pyx_GOTREF(__pyx_t_4);
42145   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42146   __Pyx_Raise(__pyx_t_4, 0, 0, 0);
42147   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42148   __PYX_ERR(1, 1250, __pyx_L1_error)
42149 
42150   /* "View.MemoryView":1248
42151  *
42152  * @cname('__pyx_memoryview_err_extents')
42153  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
42154  *                              Py_ssize_t extent2) except -1 with gil:
42155  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
42156  */
42157 
42158   /* function exit code */
42159   __pyx_L1_error:;
42160   __Pyx_XDECREF(__pyx_t_1);
42161   __Pyx_XDECREF(__pyx_t_2);
42162   __Pyx_XDECREF(__pyx_t_3);
42163   __Pyx_XDECREF(__pyx_t_4);
42164   __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
42165   __pyx_r = -1;
42166   __Pyx_RefNannyFinishContext();
42167   #ifdef WITH_THREAD
42168   __Pyx_PyGILState_Release(__pyx_gilstate_save);
42169   #endif
42170   return __pyx_r;
42171 }
42172 
42173 /* "View.MemoryView":1254
42174  *
42175  * @cname('__pyx_memoryview_err_dim')
42176  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
42177  *     raise error(msg.decode('ascii') % dim)
42178  *
42179  */
42180 
__pyx_memoryview_err_dim(PyObject * __pyx_v_error,char * __pyx_v_msg,int __pyx_v_dim)42181 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
42182   int __pyx_r;
42183   __Pyx_RefNannyDeclarations
42184   PyObject *__pyx_t_1 = NULL;
42185   PyObject *__pyx_t_2 = NULL;
42186   PyObject *__pyx_t_3 = NULL;
42187   PyObject *__pyx_t_4 = NULL;
42188   #ifdef WITH_THREAD
42189   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
42190   #endif
42191   __Pyx_RefNannySetupContext("_err_dim", 0);
42192   __Pyx_INCREF(__pyx_v_error);
42193 
42194   /* "View.MemoryView":1255
42195  * @cname('__pyx_memoryview_err_dim')
42196  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
42197  *     raise error(msg.decode('ascii') % dim)             # <<<<<<<<<<<<<<
42198  *
42199  * @cname('__pyx_memoryview_err')
42200  */
42201   __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(1, 1255, __pyx_L1_error)
42202   __Pyx_GOTREF(__pyx_t_2);
42203   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1255, __pyx_L1_error)
42204   __Pyx_GOTREF(__pyx_t_3);
42205   __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1255, __pyx_L1_error)
42206   __Pyx_GOTREF(__pyx_t_4);
42207   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42208   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42209   __Pyx_INCREF(__pyx_v_error);
42210   __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
42211   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
42212     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
42213     if (likely(__pyx_t_2)) {
42214       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
42215       __Pyx_INCREF(__pyx_t_2);
42216       __Pyx_INCREF(function);
42217       __Pyx_DECREF_SET(__pyx_t_3, function);
42218     }
42219   }
42220   __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);
42221   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
42222   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42223   if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1255, __pyx_L1_error)
42224   __Pyx_GOTREF(__pyx_t_1);
42225   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42226   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
42227   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42228   __PYX_ERR(1, 1255, __pyx_L1_error)
42229 
42230   /* "View.MemoryView":1254
42231  *
42232  * @cname('__pyx_memoryview_err_dim')
42233  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
42234  *     raise error(msg.decode('ascii') % dim)
42235  *
42236  */
42237 
42238   /* function exit code */
42239   __pyx_L1_error:;
42240   __Pyx_XDECREF(__pyx_t_1);
42241   __Pyx_XDECREF(__pyx_t_2);
42242   __Pyx_XDECREF(__pyx_t_3);
42243   __Pyx_XDECREF(__pyx_t_4);
42244   __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
42245   __pyx_r = -1;
42246   __Pyx_XDECREF(__pyx_v_error);
42247   __Pyx_RefNannyFinishContext();
42248   #ifdef WITH_THREAD
42249   __Pyx_PyGILState_Release(__pyx_gilstate_save);
42250   #endif
42251   return __pyx_r;
42252 }
42253 
42254 /* "View.MemoryView":1258
42255  *
42256  * @cname('__pyx_memoryview_err')
42257  * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
42258  *     if msg != NULL:
42259  *         raise error(msg.decode('ascii'))
42260  */
42261 
__pyx_memoryview_err(PyObject * __pyx_v_error,char * __pyx_v_msg)42262 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
42263   int __pyx_r;
42264   __Pyx_RefNannyDeclarations
42265   int __pyx_t_1;
42266   PyObject *__pyx_t_2 = NULL;
42267   PyObject *__pyx_t_3 = NULL;
42268   PyObject *__pyx_t_4 = NULL;
42269   PyObject *__pyx_t_5 = NULL;
42270   #ifdef WITH_THREAD
42271   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
42272   #endif
42273   __Pyx_RefNannySetupContext("_err", 0);
42274   __Pyx_INCREF(__pyx_v_error);
42275 
42276   /* "View.MemoryView":1259
42277  * @cname('__pyx_memoryview_err')
42278  * cdef int _err(object error, char *msg) except -1 with gil:
42279  *     if msg != NULL:             # <<<<<<<<<<<<<<
42280  *         raise error(msg.decode('ascii'))
42281  *     else:
42282  */
42283   __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
42284   if (unlikely(__pyx_t_1)) {
42285 
42286     /* "View.MemoryView":1260
42287  * cdef int _err(object error, char *msg) except -1 with gil:
42288  *     if msg != NULL:
42289  *         raise error(msg.decode('ascii'))             # <<<<<<<<<<<<<<
42290  *     else:
42291  *         raise error
42292  */
42293     __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(1, 1260, __pyx_L1_error)
42294     __Pyx_GOTREF(__pyx_t_3);
42295     __Pyx_INCREF(__pyx_v_error);
42296     __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
42297     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
42298       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
42299       if (likely(__pyx_t_5)) {
42300         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
42301         __Pyx_INCREF(__pyx_t_5);
42302         __Pyx_INCREF(function);
42303         __Pyx_DECREF_SET(__pyx_t_4, function);
42304       }
42305     }
42306     __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);
42307     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
42308     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42309     if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1260, __pyx_L1_error)
42310     __Pyx_GOTREF(__pyx_t_2);
42311     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42312     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
42313     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42314     __PYX_ERR(1, 1260, __pyx_L1_error)
42315 
42316     /* "View.MemoryView":1259
42317  * @cname('__pyx_memoryview_err')
42318  * cdef int _err(object error, char *msg) except -1 with gil:
42319  *     if msg != NULL:             # <<<<<<<<<<<<<<
42320  *         raise error(msg.decode('ascii'))
42321  *     else:
42322  */
42323   }
42324 
42325   /* "View.MemoryView":1262
42326  *         raise error(msg.decode('ascii'))
42327  *     else:
42328  *         raise error             # <<<<<<<<<<<<<<
42329  *
42330  * @cname('__pyx_memoryview_copy_contents')
42331  */
42332   /*else*/ {
42333     __Pyx_Raise(__pyx_v_error, 0, 0, 0);
42334     __PYX_ERR(1, 1262, __pyx_L1_error)
42335   }
42336 
42337   /* "View.MemoryView":1258
42338  *
42339  * @cname('__pyx_memoryview_err')
42340  * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
42341  *     if msg != NULL:
42342  *         raise error(msg.decode('ascii'))
42343  */
42344 
42345   /* function exit code */
42346   __pyx_L1_error:;
42347   __Pyx_XDECREF(__pyx_t_2);
42348   __Pyx_XDECREF(__pyx_t_3);
42349   __Pyx_XDECREF(__pyx_t_4);
42350   __Pyx_XDECREF(__pyx_t_5);
42351   __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
42352   __pyx_r = -1;
42353   __Pyx_XDECREF(__pyx_v_error);
42354   __Pyx_RefNannyFinishContext();
42355   #ifdef WITH_THREAD
42356   __Pyx_PyGILState_Release(__pyx_gilstate_save);
42357   #endif
42358   return __pyx_r;
42359 }
42360 
42361 /* "View.MemoryView":1265
42362  *
42363  * @cname('__pyx_memoryview_copy_contents')
42364  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
42365  *                                   __Pyx_memviewslice dst,
42366  *                                   int src_ndim, int dst_ndim,
42367  */
42368 
__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)42369 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) {
42370   void *__pyx_v_tmpdata;
42371   size_t __pyx_v_itemsize;
42372   int __pyx_v_i;
42373   char __pyx_v_order;
42374   int __pyx_v_broadcasting;
42375   int __pyx_v_direct_copy;
42376   __Pyx_memviewslice __pyx_v_tmp;
42377   int __pyx_v_ndim;
42378   int __pyx_r;
42379   Py_ssize_t __pyx_t_1;
42380   int __pyx_t_2;
42381   int __pyx_t_3;
42382   int __pyx_t_4;
42383   int __pyx_t_5;
42384   int __pyx_t_6;
42385   void *__pyx_t_7;
42386   int __pyx_t_8;
42387 
42388   /* "View.MemoryView":1273
42389  *     Check for overlapping memory and verify the shapes.
42390  *     """
42391  *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
42392  *     cdef size_t itemsize = src.memview.view.itemsize
42393  *     cdef int i
42394  */
42395   __pyx_v_tmpdata = NULL;
42396 
42397   /* "View.MemoryView":1274
42398  *     """
42399  *     cdef void *tmpdata = NULL
42400  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
42401  *     cdef int i
42402  *     cdef char order = get_best_order(&src, src_ndim)
42403  */
42404   __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
42405   __pyx_v_itemsize = __pyx_t_1;
42406 
42407   /* "View.MemoryView":1276
42408  *     cdef size_t itemsize = src.memview.view.itemsize
42409  *     cdef int i
42410  *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
42411  *     cdef bint broadcasting = False
42412  *     cdef bint direct_copy = False
42413  */
42414   __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
42415 
42416   /* "View.MemoryView":1277
42417  *     cdef int i
42418  *     cdef char order = get_best_order(&src, src_ndim)
42419  *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
42420  *     cdef bint direct_copy = False
42421  *     cdef __Pyx_memviewslice tmp
42422  */
42423   __pyx_v_broadcasting = 0;
42424 
42425   /* "View.MemoryView":1278
42426  *     cdef char order = get_best_order(&src, src_ndim)
42427  *     cdef bint broadcasting = False
42428  *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
42429  *     cdef __Pyx_memviewslice tmp
42430  *
42431  */
42432   __pyx_v_direct_copy = 0;
42433 
42434   /* "View.MemoryView":1281
42435  *     cdef __Pyx_memviewslice tmp
42436  *
42437  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
42438  *         broadcast_leading(&src, src_ndim, dst_ndim)
42439  *     elif dst_ndim < src_ndim:
42440  */
42441   __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
42442   if (__pyx_t_2) {
42443 
42444     /* "View.MemoryView":1282
42445  *
42446  *     if src_ndim < dst_ndim:
42447  *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
42448  *     elif dst_ndim < src_ndim:
42449  *         broadcast_leading(&dst, dst_ndim, src_ndim)
42450  */
42451     __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
42452 
42453     /* "View.MemoryView":1281
42454  *     cdef __Pyx_memviewslice tmp
42455  *
42456  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
42457  *         broadcast_leading(&src, src_ndim, dst_ndim)
42458  *     elif dst_ndim < src_ndim:
42459  */
42460     goto __pyx_L3;
42461   }
42462 
42463   /* "View.MemoryView":1283
42464  *     if src_ndim < dst_ndim:
42465  *         broadcast_leading(&src, src_ndim, dst_ndim)
42466  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
42467  *         broadcast_leading(&dst, dst_ndim, src_ndim)
42468  *
42469  */
42470   __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
42471   if (__pyx_t_2) {
42472 
42473     /* "View.MemoryView":1284
42474  *         broadcast_leading(&src, src_ndim, dst_ndim)
42475  *     elif dst_ndim < src_ndim:
42476  *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
42477  *
42478  *     cdef int ndim = max(src_ndim, dst_ndim)
42479  */
42480     __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
42481 
42482     /* "View.MemoryView":1283
42483  *     if src_ndim < dst_ndim:
42484  *         broadcast_leading(&src, src_ndim, dst_ndim)
42485  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
42486  *         broadcast_leading(&dst, dst_ndim, src_ndim)
42487  *
42488  */
42489   }
42490   __pyx_L3:;
42491 
42492   /* "View.MemoryView":1286
42493  *         broadcast_leading(&dst, dst_ndim, src_ndim)
42494  *
42495  *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
42496  *
42497  *     for i in range(ndim):
42498  */
42499   __pyx_t_3 = __pyx_v_dst_ndim;
42500   __pyx_t_4 = __pyx_v_src_ndim;
42501   if (((__pyx_t_3 > __pyx_t_4) != 0)) {
42502     __pyx_t_5 = __pyx_t_3;
42503   } else {
42504     __pyx_t_5 = __pyx_t_4;
42505   }
42506   __pyx_v_ndim = __pyx_t_5;
42507 
42508   /* "View.MemoryView":1288
42509  *     cdef int ndim = max(src_ndim, dst_ndim)
42510  *
42511  *     for i in range(ndim):             # <<<<<<<<<<<<<<
42512  *         if src.shape[i] != dst.shape[i]:
42513  *             if src.shape[i] == 1:
42514  */
42515   __pyx_t_5 = __pyx_v_ndim;
42516   __pyx_t_3 = __pyx_t_5;
42517   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
42518     __pyx_v_i = __pyx_t_4;
42519 
42520     /* "View.MemoryView":1289
42521  *
42522  *     for i in range(ndim):
42523  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
42524  *             if src.shape[i] == 1:
42525  *                 broadcasting = True
42526  */
42527     __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
42528     if (__pyx_t_2) {
42529 
42530       /* "View.MemoryView":1290
42531  *     for i in range(ndim):
42532  *         if src.shape[i] != dst.shape[i]:
42533  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
42534  *                 broadcasting = True
42535  *                 src.strides[i] = 0
42536  */
42537       __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
42538       if (__pyx_t_2) {
42539 
42540         /* "View.MemoryView":1291
42541  *         if src.shape[i] != dst.shape[i]:
42542  *             if src.shape[i] == 1:
42543  *                 broadcasting = True             # <<<<<<<<<<<<<<
42544  *                 src.strides[i] = 0
42545  *             else:
42546  */
42547         __pyx_v_broadcasting = 1;
42548 
42549         /* "View.MemoryView":1292
42550  *             if src.shape[i] == 1:
42551  *                 broadcasting = True
42552  *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
42553  *             else:
42554  *                 _err_extents(i, dst.shape[i], src.shape[i])
42555  */
42556         (__pyx_v_src.strides[__pyx_v_i]) = 0;
42557 
42558         /* "View.MemoryView":1290
42559  *     for i in range(ndim):
42560  *         if src.shape[i] != dst.shape[i]:
42561  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
42562  *                 broadcasting = True
42563  *                 src.strides[i] = 0
42564  */
42565         goto __pyx_L7;
42566       }
42567 
42568       /* "View.MemoryView":1294
42569  *                 src.strides[i] = 0
42570  *             else:
42571  *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
42572  *
42573  *         if src.suboffsets[i] >= 0:
42574  */
42575       /*else*/ {
42576         __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(1, 1294, __pyx_L1_error)
42577       }
42578       __pyx_L7:;
42579 
42580       /* "View.MemoryView":1289
42581  *
42582  *     for i in range(ndim):
42583  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
42584  *             if src.shape[i] == 1:
42585  *                 broadcasting = True
42586  */
42587     }
42588 
42589     /* "View.MemoryView":1296
42590  *                 _err_extents(i, dst.shape[i], src.shape[i])
42591  *
42592  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
42593  *             _err_dim(ValueError, "Dimension %d is not direct", i)
42594  *
42595  */
42596     __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
42597     if (__pyx_t_2) {
42598 
42599       /* "View.MemoryView":1297
42600  *
42601  *         if src.suboffsets[i] >= 0:
42602  *             _err_dim(ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
42603  *
42604  *     if slices_overlap(&src, &dst, ndim, itemsize):
42605  */
42606       __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(1, 1297, __pyx_L1_error)
42607 
42608       /* "View.MemoryView":1296
42609  *                 _err_extents(i, dst.shape[i], src.shape[i])
42610  *
42611  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
42612  *             _err_dim(ValueError, "Dimension %d is not direct", i)
42613  *
42614  */
42615     }
42616   }
42617 
42618   /* "View.MemoryView":1299
42619  *             _err_dim(ValueError, "Dimension %d is not direct", i)
42620  *
42621  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
42622  *
42623  *         if not slice_is_contig(src, order, ndim):
42624  */
42625   __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
42626   if (__pyx_t_2) {
42627 
42628     /* "View.MemoryView":1301
42629  *     if slices_overlap(&src, &dst, ndim, itemsize):
42630  *
42631  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
42632  *             order = get_best_order(&dst, ndim)
42633  *
42634  */
42635     __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
42636     if (__pyx_t_2) {
42637 
42638       /* "View.MemoryView":1302
42639  *
42640  *         if not slice_is_contig(src, order, ndim):
42641  *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
42642  *
42643  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
42644  */
42645       __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
42646 
42647       /* "View.MemoryView":1301
42648  *     if slices_overlap(&src, &dst, ndim, itemsize):
42649  *
42650  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
42651  *             order = get_best_order(&dst, ndim)
42652  *
42653  */
42654     }
42655 
42656     /* "View.MemoryView":1304
42657  *             order = get_best_order(&dst, ndim)
42658  *
42659  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
42660  *         src = tmp
42661  *
42662  */
42663     __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(1, 1304, __pyx_L1_error)
42664     __pyx_v_tmpdata = __pyx_t_7;
42665 
42666     /* "View.MemoryView":1305
42667  *
42668  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
42669  *         src = tmp             # <<<<<<<<<<<<<<
42670  *
42671  *     if not broadcasting:
42672  */
42673     __pyx_v_src = __pyx_v_tmp;
42674 
42675     /* "View.MemoryView":1299
42676  *             _err_dim(ValueError, "Dimension %d is not direct", i)
42677  *
42678  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
42679  *
42680  *         if not slice_is_contig(src, order, ndim):
42681  */
42682   }
42683 
42684   /* "View.MemoryView":1307
42685  *         src = tmp
42686  *
42687  *     if not broadcasting:             # <<<<<<<<<<<<<<
42688  *
42689  *
42690  */
42691   __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
42692   if (__pyx_t_2) {
42693 
42694     /* "View.MemoryView":1310
42695  *
42696  *
42697  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
42698  *             direct_copy = slice_is_contig(dst, 'C', ndim)
42699  *         elif slice_is_contig(src, 'F', ndim):
42700  */
42701     __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
42702     if (__pyx_t_2) {
42703 
42704       /* "View.MemoryView":1311
42705  *
42706  *         if slice_is_contig(src, 'C', ndim):
42707  *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
42708  *         elif slice_is_contig(src, 'F', ndim):
42709  *             direct_copy = slice_is_contig(dst, 'F', ndim)
42710  */
42711       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
42712 
42713       /* "View.MemoryView":1310
42714  *
42715  *
42716  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
42717  *             direct_copy = slice_is_contig(dst, 'C', ndim)
42718  *         elif slice_is_contig(src, 'F', ndim):
42719  */
42720       goto __pyx_L12;
42721     }
42722 
42723     /* "View.MemoryView":1312
42724  *         if slice_is_contig(src, 'C', ndim):
42725  *             direct_copy = slice_is_contig(dst, 'C', ndim)
42726  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
42727  *             direct_copy = slice_is_contig(dst, 'F', ndim)
42728  *
42729  */
42730     __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
42731     if (__pyx_t_2) {
42732 
42733       /* "View.MemoryView":1313
42734  *             direct_copy = slice_is_contig(dst, 'C', ndim)
42735  *         elif slice_is_contig(src, 'F', ndim):
42736  *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
42737  *
42738  *         if direct_copy:
42739  */
42740       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
42741 
42742       /* "View.MemoryView":1312
42743  *         if slice_is_contig(src, 'C', ndim):
42744  *             direct_copy = slice_is_contig(dst, 'C', ndim)
42745  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
42746  *             direct_copy = slice_is_contig(dst, 'F', ndim)
42747  *
42748  */
42749     }
42750     __pyx_L12:;
42751 
42752     /* "View.MemoryView":1315
42753  *             direct_copy = slice_is_contig(dst, 'F', ndim)
42754  *
42755  *         if direct_copy:             # <<<<<<<<<<<<<<
42756  *
42757  *             refcount_copying(&dst, dtype_is_object, ndim, False)
42758  */
42759     __pyx_t_2 = (__pyx_v_direct_copy != 0);
42760     if (__pyx_t_2) {
42761 
42762       /* "View.MemoryView":1317
42763  *         if direct_copy:
42764  *
42765  *             refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
42766  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
42767  *             refcount_copying(&dst, dtype_is_object, ndim, True)
42768  */
42769       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
42770 
42771       /* "View.MemoryView":1318
42772  *
42773  *             refcount_copying(&dst, dtype_is_object, ndim, False)
42774  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
42775  *             refcount_copying(&dst, dtype_is_object, ndim, True)
42776  *             free(tmpdata)
42777  */
42778       (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
42779 
42780       /* "View.MemoryView":1319
42781  *             refcount_copying(&dst, dtype_is_object, ndim, False)
42782  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
42783  *             refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
42784  *             free(tmpdata)
42785  *             return 0
42786  */
42787       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
42788 
42789       /* "View.MemoryView":1320
42790  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
42791  *             refcount_copying(&dst, dtype_is_object, ndim, True)
42792  *             free(tmpdata)             # <<<<<<<<<<<<<<
42793  *             return 0
42794  *
42795  */
42796       free(__pyx_v_tmpdata);
42797 
42798       /* "View.MemoryView":1321
42799  *             refcount_copying(&dst, dtype_is_object, ndim, True)
42800  *             free(tmpdata)
42801  *             return 0             # <<<<<<<<<<<<<<
42802  *
42803  *     if order == 'F' == get_best_order(&dst, ndim):
42804  */
42805       __pyx_r = 0;
42806       goto __pyx_L0;
42807 
42808       /* "View.MemoryView":1315
42809  *             direct_copy = slice_is_contig(dst, 'F', ndim)
42810  *
42811  *         if direct_copy:             # <<<<<<<<<<<<<<
42812  *
42813  *             refcount_copying(&dst, dtype_is_object, ndim, False)
42814  */
42815     }
42816 
42817     /* "View.MemoryView":1307
42818  *         src = tmp
42819  *
42820  *     if not broadcasting:             # <<<<<<<<<<<<<<
42821  *
42822  *
42823  */
42824   }
42825 
42826   /* "View.MemoryView":1323
42827  *             return 0
42828  *
42829  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
42830  *
42831  *
42832  */
42833   __pyx_t_2 = (__pyx_v_order == 'F');
42834   if (__pyx_t_2) {
42835     __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
42836   }
42837   __pyx_t_8 = (__pyx_t_2 != 0);
42838   if (__pyx_t_8) {
42839 
42840     /* "View.MemoryView":1326
42841  *
42842  *
42843  *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
42844  *         transpose_memslice(&dst)
42845  *
42846  */
42847     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1326, __pyx_L1_error)
42848 
42849     /* "View.MemoryView":1327
42850  *
42851  *         transpose_memslice(&src)
42852  *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
42853  *
42854  *     refcount_copying(&dst, dtype_is_object, ndim, False)
42855  */
42856     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1327, __pyx_L1_error)
42857 
42858     /* "View.MemoryView":1323
42859  *             return 0
42860  *
42861  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
42862  *
42863  *
42864  */
42865   }
42866 
42867   /* "View.MemoryView":1329
42868  *         transpose_memslice(&dst)
42869  *
42870  *     refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
42871  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
42872  *     refcount_copying(&dst, dtype_is_object, ndim, True)
42873  */
42874   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
42875 
42876   /* "View.MemoryView":1330
42877  *
42878  *     refcount_copying(&dst, dtype_is_object, ndim, False)
42879  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
42880  *     refcount_copying(&dst, dtype_is_object, ndim, True)
42881  *
42882  */
42883   copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
42884 
42885   /* "View.MemoryView":1331
42886  *     refcount_copying(&dst, dtype_is_object, ndim, False)
42887  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
42888  *     refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
42889  *
42890  *     free(tmpdata)
42891  */
42892   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
42893 
42894   /* "View.MemoryView":1333
42895  *     refcount_copying(&dst, dtype_is_object, ndim, True)
42896  *
42897  *     free(tmpdata)             # <<<<<<<<<<<<<<
42898  *     return 0
42899  *
42900  */
42901   free(__pyx_v_tmpdata);
42902 
42903   /* "View.MemoryView":1334
42904  *
42905  *     free(tmpdata)
42906  *     return 0             # <<<<<<<<<<<<<<
42907  *
42908  * @cname('__pyx_memoryview_broadcast_leading')
42909  */
42910   __pyx_r = 0;
42911   goto __pyx_L0;
42912 
42913   /* "View.MemoryView":1265
42914  *
42915  * @cname('__pyx_memoryview_copy_contents')
42916  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
42917  *                                   __Pyx_memviewslice dst,
42918  *                                   int src_ndim, int dst_ndim,
42919  */
42920 
42921   /* function exit code */
42922   __pyx_L1_error:;
42923   {
42924     #ifdef WITH_THREAD
42925     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
42926     #endif
42927     __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
42928     #ifdef WITH_THREAD
42929     __Pyx_PyGILState_Release(__pyx_gilstate_save);
42930     #endif
42931   }
42932   __pyx_r = -1;
42933   __pyx_L0:;
42934   return __pyx_r;
42935 }
42936 
42937 /* "View.MemoryView":1337
42938  *
42939  * @cname('__pyx_memoryview_broadcast_leading')
42940  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
42941  *                             int ndim,
42942  *                             int ndim_other) nogil:
42943  */
42944 
__pyx_memoryview_broadcast_leading(__Pyx_memviewslice * __pyx_v_mslice,int __pyx_v_ndim,int __pyx_v_ndim_other)42945 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
42946   int __pyx_v_i;
42947   int __pyx_v_offset;
42948   int __pyx_t_1;
42949   int __pyx_t_2;
42950   int __pyx_t_3;
42951 
42952   /* "View.MemoryView":1341
42953  *                             int ndim_other) nogil:
42954  *     cdef int i
42955  *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
42956  *
42957  *     for i in range(ndim - 1, -1, -1):
42958  */
42959   __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
42960 
42961   /* "View.MemoryView":1343
42962  *     cdef int offset = ndim_other - ndim
42963  *
42964  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
42965  *         mslice.shape[i + offset] = mslice.shape[i]
42966  *         mslice.strides[i + offset] = mslice.strides[i]
42967  */
42968   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
42969     __pyx_v_i = __pyx_t_1;
42970 
42971     /* "View.MemoryView":1344
42972  *
42973  *     for i in range(ndim - 1, -1, -1):
42974  *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
42975  *         mslice.strides[i + offset] = mslice.strides[i]
42976  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
42977  */
42978     (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
42979 
42980     /* "View.MemoryView":1345
42981  *     for i in range(ndim - 1, -1, -1):
42982  *         mslice.shape[i + offset] = mslice.shape[i]
42983  *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
42984  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
42985  *
42986  */
42987     (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
42988 
42989     /* "View.MemoryView":1346
42990  *         mslice.shape[i + offset] = mslice.shape[i]
42991  *         mslice.strides[i + offset] = mslice.strides[i]
42992  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
42993  *
42994  *     for i in range(offset):
42995  */
42996     (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
42997   }
42998 
42999   /* "View.MemoryView":1348
43000  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
43001  *
43002  *     for i in range(offset):             # <<<<<<<<<<<<<<
43003  *         mslice.shape[i] = 1
43004  *         mslice.strides[i] = mslice.strides[0]
43005  */
43006   __pyx_t_1 = __pyx_v_offset;
43007   __pyx_t_2 = __pyx_t_1;
43008   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
43009     __pyx_v_i = __pyx_t_3;
43010 
43011     /* "View.MemoryView":1349
43012  *
43013  *     for i in range(offset):
43014  *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
43015  *         mslice.strides[i] = mslice.strides[0]
43016  *         mslice.suboffsets[i] = -1
43017  */
43018     (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
43019 
43020     /* "View.MemoryView":1350
43021  *     for i in range(offset):
43022  *         mslice.shape[i] = 1
43023  *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
43024  *         mslice.suboffsets[i] = -1
43025  *
43026  */
43027     (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
43028 
43029     /* "View.MemoryView":1351
43030  *         mslice.shape[i] = 1
43031  *         mslice.strides[i] = mslice.strides[0]
43032  *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
43033  *
43034  *
43035  */
43036     (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
43037   }
43038 
43039   /* "View.MemoryView":1337
43040  *
43041  * @cname('__pyx_memoryview_broadcast_leading')
43042  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
43043  *                             int ndim,
43044  *                             int ndim_other) nogil:
43045  */
43046 
43047   /* function exit code */
43048 }
43049 
43050 /* "View.MemoryView":1359
43051  *
43052  * @cname('__pyx_memoryview_refcount_copying')
43053  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
43054  *                            int ndim, bint inc) nogil:
43055  *
43056  */
43057 
__pyx_memoryview_refcount_copying(__Pyx_memviewslice * __pyx_v_dst,int __pyx_v_dtype_is_object,int __pyx_v_ndim,int __pyx_v_inc)43058 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) {
43059   int __pyx_t_1;
43060 
43061   /* "View.MemoryView":1363
43062  *
43063  *
43064  *     if dtype_is_object:             # <<<<<<<<<<<<<<
43065  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
43066  *                                            dst.strides, ndim, inc)
43067  */
43068   __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
43069   if (__pyx_t_1) {
43070 
43071     /* "View.MemoryView":1364
43072  *
43073  *     if dtype_is_object:
43074  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,             # <<<<<<<<<<<<<<
43075  *                                            dst.strides, ndim, inc)
43076  *
43077  */
43078     __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);
43079 
43080     /* "View.MemoryView":1363
43081  *
43082  *
43083  *     if dtype_is_object:             # <<<<<<<<<<<<<<
43084  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
43085  *                                            dst.strides, ndim, inc)
43086  */
43087   }
43088 
43089   /* "View.MemoryView":1359
43090  *
43091  * @cname('__pyx_memoryview_refcount_copying')
43092  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
43093  *                            int ndim, bint inc) nogil:
43094  *
43095  */
43096 
43097   /* function exit code */
43098 }
43099 
43100 /* "View.MemoryView":1368
43101  *
43102  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
43103  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
43104  *                                              Py_ssize_t *strides, int ndim,
43105  *                                              bint inc) with gil:
43106  */
43107 
__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)43108 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) {
43109   __Pyx_RefNannyDeclarations
43110   #ifdef WITH_THREAD
43111   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
43112   #endif
43113   __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
43114 
43115   /* "View.MemoryView":1371
43116  *                                              Py_ssize_t *strides, int ndim,
43117  *                                              bint inc) with gil:
43118  *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
43119  *
43120  * @cname('__pyx_memoryview_refcount_objects_in_slice')
43121  */
43122   __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
43123 
43124   /* "View.MemoryView":1368
43125  *
43126  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
43127  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
43128  *                                              Py_ssize_t *strides, int ndim,
43129  *                                              bint inc) with gil:
43130  */
43131 
43132   /* function exit code */
43133   __Pyx_RefNannyFinishContext();
43134   #ifdef WITH_THREAD
43135   __Pyx_PyGILState_Release(__pyx_gilstate_save);
43136   #endif
43137 }
43138 
43139 /* "View.MemoryView":1374
43140  *
43141  * @cname('__pyx_memoryview_refcount_objects_in_slice')
43142  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
43143  *                                     Py_ssize_t *strides, int ndim, bint inc):
43144  *     cdef Py_ssize_t i
43145  */
43146 
__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)43147 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) {
43148   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
43149   __Pyx_RefNannyDeclarations
43150   Py_ssize_t __pyx_t_1;
43151   Py_ssize_t __pyx_t_2;
43152   Py_ssize_t __pyx_t_3;
43153   int __pyx_t_4;
43154   __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
43155 
43156   /* "View.MemoryView":1378
43157  *     cdef Py_ssize_t i
43158  *
43159  *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
43160  *         if ndim == 1:
43161  *             if inc:
43162  */
43163   __pyx_t_1 = (__pyx_v_shape[0]);
43164   __pyx_t_2 = __pyx_t_1;
43165   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
43166     __pyx_v_i = __pyx_t_3;
43167 
43168     /* "View.MemoryView":1379
43169  *
43170  *     for i in range(shape[0]):
43171  *         if ndim == 1:             # <<<<<<<<<<<<<<
43172  *             if inc:
43173  *                 Py_INCREF((<PyObject **> data)[0])
43174  */
43175     __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
43176     if (__pyx_t_4) {
43177 
43178       /* "View.MemoryView":1380
43179  *     for i in range(shape[0]):
43180  *         if ndim == 1:
43181  *             if inc:             # <<<<<<<<<<<<<<
43182  *                 Py_INCREF((<PyObject **> data)[0])
43183  *             else:
43184  */
43185       __pyx_t_4 = (__pyx_v_inc != 0);
43186       if (__pyx_t_4) {
43187 
43188         /* "View.MemoryView":1381
43189  *         if ndim == 1:
43190  *             if inc:
43191  *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
43192  *             else:
43193  *                 Py_DECREF((<PyObject **> data)[0])
43194  */
43195         Py_INCREF((((PyObject **)__pyx_v_data)[0]));
43196 
43197         /* "View.MemoryView":1380
43198  *     for i in range(shape[0]):
43199  *         if ndim == 1:
43200  *             if inc:             # <<<<<<<<<<<<<<
43201  *                 Py_INCREF((<PyObject **> data)[0])
43202  *             else:
43203  */
43204         goto __pyx_L6;
43205       }
43206 
43207       /* "View.MemoryView":1383
43208  *                 Py_INCREF((<PyObject **> data)[0])
43209  *             else:
43210  *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
43211  *         else:
43212  *             refcount_objects_in_slice(data, shape + 1, strides + 1,
43213  */
43214       /*else*/ {
43215         Py_DECREF((((PyObject **)__pyx_v_data)[0]));
43216       }
43217       __pyx_L6:;
43218 
43219       /* "View.MemoryView":1379
43220  *
43221  *     for i in range(shape[0]):
43222  *         if ndim == 1:             # <<<<<<<<<<<<<<
43223  *             if inc:
43224  *                 Py_INCREF((<PyObject **> data)[0])
43225  */
43226       goto __pyx_L5;
43227     }
43228 
43229     /* "View.MemoryView":1385
43230  *                 Py_DECREF((<PyObject **> data)[0])
43231  *         else:
43232  *             refcount_objects_in_slice(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
43233  *                                       ndim - 1, inc)
43234  *
43235  */
43236     /*else*/ {
43237 
43238       /* "View.MemoryView":1386
43239  *         else:
43240  *             refcount_objects_in_slice(data, shape + 1, strides + 1,
43241  *                                       ndim - 1, inc)             # <<<<<<<<<<<<<<
43242  *
43243  *         data += strides[0]
43244  */
43245       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
43246     }
43247     __pyx_L5:;
43248 
43249     /* "View.MemoryView":1388
43250  *                                       ndim - 1, inc)
43251  *
43252  *         data += strides[0]             # <<<<<<<<<<<<<<
43253  *
43254  *
43255  */
43256     __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
43257   }
43258 
43259   /* "View.MemoryView":1374
43260  *
43261  * @cname('__pyx_memoryview_refcount_objects_in_slice')
43262  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
43263  *                                     Py_ssize_t *strides, int ndim, bint inc):
43264  *     cdef Py_ssize_t i
43265  */
43266 
43267   /* function exit code */
43268   __Pyx_RefNannyFinishContext();
43269 }
43270 
43271 /* "View.MemoryView":1394
43272  *
43273  * @cname('__pyx_memoryview_slice_assign_scalar')
43274  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
43275  *                               size_t itemsize, void *item,
43276  *                               bint dtype_is_object) nogil:
43277  */
43278 
__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)43279 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) {
43280 
43281   /* "View.MemoryView":1397
43282  *                               size_t itemsize, void *item,
43283  *                               bint dtype_is_object) nogil:
43284  *     refcount_copying(dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
43285  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
43286  *                          itemsize, item)
43287  */
43288   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
43289 
43290   /* "View.MemoryView":1398
43291  *                               bint dtype_is_object) nogil:
43292  *     refcount_copying(dst, dtype_is_object, ndim, False)
43293  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,             # <<<<<<<<<<<<<<
43294  *                          itemsize, item)
43295  *     refcount_copying(dst, dtype_is_object, ndim, True)
43296  */
43297   __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);
43298 
43299   /* "View.MemoryView":1400
43300  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
43301  *                          itemsize, item)
43302  *     refcount_copying(dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
43303  *
43304  *
43305  */
43306   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
43307 
43308   /* "View.MemoryView":1394
43309  *
43310  * @cname('__pyx_memoryview_slice_assign_scalar')
43311  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
43312  *                               size_t itemsize, void *item,
43313  *                               bint dtype_is_object) nogil:
43314  */
43315 
43316   /* function exit code */
43317 }
43318 
43319 /* "View.MemoryView":1404
43320  *
43321  * @cname('__pyx_memoryview__slice_assign_scalar')
43322  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
43323  *                               Py_ssize_t *strides, int ndim,
43324  *                               size_t itemsize, void *item) nogil:
43325  */
43326 
__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)43327 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) {
43328   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
43329   Py_ssize_t __pyx_v_stride;
43330   Py_ssize_t __pyx_v_extent;
43331   int __pyx_t_1;
43332   Py_ssize_t __pyx_t_2;
43333   Py_ssize_t __pyx_t_3;
43334   Py_ssize_t __pyx_t_4;
43335 
43336   /* "View.MemoryView":1408
43337  *                               size_t itemsize, void *item) nogil:
43338  *     cdef Py_ssize_t i
43339  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
43340  *     cdef Py_ssize_t extent = shape[0]
43341  *
43342  */
43343   __pyx_v_stride = (__pyx_v_strides[0]);
43344 
43345   /* "View.MemoryView":1409
43346  *     cdef Py_ssize_t i
43347  *     cdef Py_ssize_t stride = strides[0]
43348  *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
43349  *
43350  *     if ndim == 1:
43351  */
43352   __pyx_v_extent = (__pyx_v_shape[0]);
43353 
43354   /* "View.MemoryView":1411
43355  *     cdef Py_ssize_t extent = shape[0]
43356  *
43357  *     if ndim == 1:             # <<<<<<<<<<<<<<
43358  *         for i in range(extent):
43359  *             memcpy(data, item, itemsize)
43360  */
43361   __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
43362   if (__pyx_t_1) {
43363 
43364     /* "View.MemoryView":1412
43365  *
43366  *     if ndim == 1:
43367  *         for i in range(extent):             # <<<<<<<<<<<<<<
43368  *             memcpy(data, item, itemsize)
43369  *             data += stride
43370  */
43371     __pyx_t_2 = __pyx_v_extent;
43372     __pyx_t_3 = __pyx_t_2;
43373     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
43374       __pyx_v_i = __pyx_t_4;
43375 
43376       /* "View.MemoryView":1413
43377  *     if ndim == 1:
43378  *         for i in range(extent):
43379  *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
43380  *             data += stride
43381  *     else:
43382  */
43383       (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
43384 
43385       /* "View.MemoryView":1414
43386  *         for i in range(extent):
43387  *             memcpy(data, item, itemsize)
43388  *             data += stride             # <<<<<<<<<<<<<<
43389  *     else:
43390  *         for i in range(extent):
43391  */
43392       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
43393     }
43394 
43395     /* "View.MemoryView":1411
43396  *     cdef Py_ssize_t extent = shape[0]
43397  *
43398  *     if ndim == 1:             # <<<<<<<<<<<<<<
43399  *         for i in range(extent):
43400  *             memcpy(data, item, itemsize)
43401  */
43402     goto __pyx_L3;
43403   }
43404 
43405   /* "View.MemoryView":1416
43406  *             data += stride
43407  *     else:
43408  *         for i in range(extent):             # <<<<<<<<<<<<<<
43409  *             _slice_assign_scalar(data, shape + 1, strides + 1,
43410  *                                 ndim - 1, itemsize, item)
43411  */
43412   /*else*/ {
43413     __pyx_t_2 = __pyx_v_extent;
43414     __pyx_t_3 = __pyx_t_2;
43415     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
43416       __pyx_v_i = __pyx_t_4;
43417 
43418       /* "View.MemoryView":1417
43419  *     else:
43420  *         for i in range(extent):
43421  *             _slice_assign_scalar(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
43422  *                                 ndim - 1, itemsize, item)
43423  *             data += stride
43424  */
43425       __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);
43426 
43427       /* "View.MemoryView":1419
43428  *             _slice_assign_scalar(data, shape + 1, strides + 1,
43429  *                                 ndim - 1, itemsize, item)
43430  *             data += stride             # <<<<<<<<<<<<<<
43431  *
43432  *
43433  */
43434       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
43435     }
43436   }
43437   __pyx_L3:;
43438 
43439   /* "View.MemoryView":1404
43440  *
43441  * @cname('__pyx_memoryview__slice_assign_scalar')
43442  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
43443  *                               Py_ssize_t *strides, int ndim,
43444  *                               size_t itemsize, void *item) nogil:
43445  */
43446 
43447   /* function exit code */
43448 }
43449 
43450 /* "(tree fragment)":1
43451  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
43452  *     cdef object __pyx_PickleError
43453  *     cdef object __pyx_result
43454  */
43455 
43456 /* Python wrapper */
43457 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
43458 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)43459 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
43460   PyObject *__pyx_v___pyx_type = 0;
43461   long __pyx_v___pyx_checksum;
43462   PyObject *__pyx_v___pyx_state = 0;
43463   PyObject *__pyx_r = 0;
43464   __Pyx_RefNannyDeclarations
43465   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
43466   {
43467     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
43468     PyObject* values[3] = {0,0,0};
43469     if (unlikely(__pyx_kwds)) {
43470       Py_ssize_t kw_args;
43471       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
43472       switch (pos_args) {
43473         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43474         CYTHON_FALLTHROUGH;
43475         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43476         CYTHON_FALLTHROUGH;
43477         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43478         CYTHON_FALLTHROUGH;
43479         case  0: break;
43480         default: goto __pyx_L5_argtuple_error;
43481       }
43482       kw_args = PyDict_Size(__pyx_kwds);
43483       switch (pos_args) {
43484         case  0:
43485         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
43486         else goto __pyx_L5_argtuple_error;
43487         CYTHON_FALLTHROUGH;
43488         case  1:
43489         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
43490         else {
43491           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
43492         }
43493         CYTHON_FALLTHROUGH;
43494         case  2:
43495         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
43496         else {
43497           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
43498         }
43499       }
43500       if (unlikely(kw_args > 0)) {
43501         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
43502       }
43503     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
43504       goto __pyx_L5_argtuple_error;
43505     } else {
43506       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43507       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43508       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43509     }
43510     __pyx_v___pyx_type = values[0];
43511     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
43512     __pyx_v___pyx_state = values[2];
43513   }
43514   goto __pyx_L4_argument_unpacking_done;
43515   __pyx_L5_argtuple_error:;
43516   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
43517   __pyx_L3_error:;
43518   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
43519   __Pyx_RefNannyFinishContext();
43520   return NULL;
43521   __pyx_L4_argument_unpacking_done:;
43522   __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
43523 
43524   /* function exit code */
43525   __Pyx_RefNannyFinishContext();
43526   return __pyx_r;
43527 }
43528 
__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)43529 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) {
43530   PyObject *__pyx_v___pyx_PickleError = 0;
43531   PyObject *__pyx_v___pyx_result = 0;
43532   PyObject *__pyx_r = NULL;
43533   __Pyx_RefNannyDeclarations
43534   int __pyx_t_1;
43535   PyObject *__pyx_t_2 = NULL;
43536   PyObject *__pyx_t_3 = NULL;
43537   PyObject *__pyx_t_4 = NULL;
43538   PyObject *__pyx_t_5 = NULL;
43539   int __pyx_t_6;
43540   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
43541 
43542   /* "(tree fragment)":4
43543  *     cdef object __pyx_PickleError
43544  *     cdef object __pyx_result
43545  *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
43546  *         from pickle import PickleError as __pyx_PickleError
43547  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
43548  */
43549   __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0);
43550   if (__pyx_t_1) {
43551 
43552     /* "(tree fragment)":5
43553  *     cdef object __pyx_result
43554  *     if __pyx_checksum != 0xb068931:
43555  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
43556  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
43557  *     __pyx_result = Enum.__new__(__pyx_type)
43558  */
43559     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
43560     __Pyx_GOTREF(__pyx_t_2);
43561     __Pyx_INCREF(__pyx_n_s_PickleError);
43562     __Pyx_GIVEREF(__pyx_n_s_PickleError);
43563     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
43564     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
43565     __Pyx_GOTREF(__pyx_t_3);
43566     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43567     __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
43568     __Pyx_GOTREF(__pyx_t_2);
43569     __Pyx_INCREF(__pyx_t_2);
43570     __pyx_v___pyx_PickleError = __pyx_t_2;
43571     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43572     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43573 
43574     /* "(tree fragment)":6
43575  *     if __pyx_checksum != 0xb068931:
43576  *         from pickle import PickleError as __pyx_PickleError
43577  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
43578  *     __pyx_result = Enum.__new__(__pyx_type)
43579  *     if __pyx_state is not None:
43580  */
43581     __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
43582     __Pyx_GOTREF(__pyx_t_2);
43583     __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
43584     __Pyx_GOTREF(__pyx_t_4);
43585     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43586     __Pyx_INCREF(__pyx_v___pyx_PickleError);
43587     __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
43588     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
43589       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
43590       if (likely(__pyx_t_5)) {
43591         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43592         __Pyx_INCREF(__pyx_t_5);
43593         __Pyx_INCREF(function);
43594         __Pyx_DECREF_SET(__pyx_t_2, function);
43595       }
43596     }
43597     __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);
43598     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
43599     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43600     if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
43601     __Pyx_GOTREF(__pyx_t_3);
43602     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43603     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
43604     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43605     __PYX_ERR(1, 6, __pyx_L1_error)
43606 
43607     /* "(tree fragment)":4
43608  *     cdef object __pyx_PickleError
43609  *     cdef object __pyx_result
43610  *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
43611  *         from pickle import PickleError as __pyx_PickleError
43612  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
43613  */
43614   }
43615 
43616   /* "(tree fragment)":7
43617  *         from pickle import PickleError as __pyx_PickleError
43618  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
43619  *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
43620  *     if __pyx_state is not None:
43621  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
43622  */
43623   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
43624   __Pyx_GOTREF(__pyx_t_2);
43625   __pyx_t_4 = NULL;
43626   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43627     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
43628     if (likely(__pyx_t_4)) {
43629       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43630       __Pyx_INCREF(__pyx_t_4);
43631       __Pyx_INCREF(function);
43632       __Pyx_DECREF_SET(__pyx_t_2, function);
43633     }
43634   }
43635   __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);
43636   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
43637   if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
43638   __Pyx_GOTREF(__pyx_t_3);
43639   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43640   __pyx_v___pyx_result = __pyx_t_3;
43641   __pyx_t_3 = 0;
43642 
43643   /* "(tree fragment)":8
43644  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
43645  *     __pyx_result = Enum.__new__(__pyx_type)
43646  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
43647  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
43648  *     return __pyx_result
43649  */
43650   __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
43651   __pyx_t_6 = (__pyx_t_1 != 0);
43652   if (__pyx_t_6) {
43653 
43654     /* "(tree fragment)":9
43655  *     __pyx_result = Enum.__new__(__pyx_type)
43656  *     if __pyx_state is not None:
43657  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
43658  *     return __pyx_result
43659  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
43660  */
43661     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(1, 9, __pyx_L1_error)
43662     __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(1, 9, __pyx_L1_error)
43663     __Pyx_GOTREF(__pyx_t_3);
43664     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43665 
43666     /* "(tree fragment)":8
43667  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
43668  *     __pyx_result = Enum.__new__(__pyx_type)
43669  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
43670  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
43671  *     return __pyx_result
43672  */
43673   }
43674 
43675   /* "(tree fragment)":10
43676  *     if __pyx_state is not None:
43677  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
43678  *     return __pyx_result             # <<<<<<<<<<<<<<
43679  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
43680  *     __pyx_result.name = __pyx_state[0]
43681  */
43682   __Pyx_XDECREF(__pyx_r);
43683   __Pyx_INCREF(__pyx_v___pyx_result);
43684   __pyx_r = __pyx_v___pyx_result;
43685   goto __pyx_L0;
43686 
43687   /* "(tree fragment)":1
43688  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
43689  *     cdef object __pyx_PickleError
43690  *     cdef object __pyx_result
43691  */
43692 
43693   /* function exit code */
43694   __pyx_L1_error:;
43695   __Pyx_XDECREF(__pyx_t_2);
43696   __Pyx_XDECREF(__pyx_t_3);
43697   __Pyx_XDECREF(__pyx_t_4);
43698   __Pyx_XDECREF(__pyx_t_5);
43699   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
43700   __pyx_r = NULL;
43701   __pyx_L0:;
43702   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
43703   __Pyx_XDECREF(__pyx_v___pyx_result);
43704   __Pyx_XGIVEREF(__pyx_r);
43705   __Pyx_RefNannyFinishContext();
43706   return __pyx_r;
43707 }
43708 
43709 /* "(tree fragment)":11
43710  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
43711  *     return __pyx_result
43712  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
43713  *     __pyx_result.name = __pyx_state[0]
43714  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
43715  */
43716 
__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)43717 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
43718   PyObject *__pyx_r = NULL;
43719   __Pyx_RefNannyDeclarations
43720   PyObject *__pyx_t_1 = NULL;
43721   int __pyx_t_2;
43722   Py_ssize_t __pyx_t_3;
43723   int __pyx_t_4;
43724   int __pyx_t_5;
43725   PyObject *__pyx_t_6 = NULL;
43726   PyObject *__pyx_t_7 = NULL;
43727   PyObject *__pyx_t_8 = NULL;
43728   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
43729 
43730   /* "(tree fragment)":12
43731  *     return __pyx_result
43732  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
43733  *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
43734  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
43735  *         __pyx_result.__dict__.update(__pyx_state[1])
43736  */
43737   if (unlikely(__pyx_v___pyx_state == Py_None)) {
43738     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
43739     __PYX_ERR(1, 12, __pyx_L1_error)
43740   }
43741   __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(1, 12, __pyx_L1_error)
43742   __Pyx_GOTREF(__pyx_t_1);
43743   __Pyx_GIVEREF(__pyx_t_1);
43744   __Pyx_GOTREF(__pyx_v___pyx_result->name);
43745   __Pyx_DECREF(__pyx_v___pyx_result->name);
43746   __pyx_v___pyx_result->name = __pyx_t_1;
43747   __pyx_t_1 = 0;
43748 
43749   /* "(tree fragment)":13
43750  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
43751  *     __pyx_result.name = __pyx_state[0]
43752  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
43753  *         __pyx_result.__dict__.update(__pyx_state[1])
43754  */
43755   if (unlikely(__pyx_v___pyx_state == Py_None)) {
43756     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
43757     __PYX_ERR(1, 13, __pyx_L1_error)
43758   }
43759   __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
43760   __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
43761   if (__pyx_t_4) {
43762   } else {
43763     __pyx_t_2 = __pyx_t_4;
43764     goto __pyx_L4_bool_binop_done;
43765   }
43766   __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
43767   __pyx_t_5 = (__pyx_t_4 != 0);
43768   __pyx_t_2 = __pyx_t_5;
43769   __pyx_L4_bool_binop_done:;
43770   if (__pyx_t_2) {
43771 
43772     /* "(tree fragment)":14
43773  *     __pyx_result.name = __pyx_state[0]
43774  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
43775  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
43776  */
43777     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
43778     __Pyx_GOTREF(__pyx_t_6);
43779     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
43780     __Pyx_GOTREF(__pyx_t_7);
43781     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43782     if (unlikely(__pyx_v___pyx_state == Py_None)) {
43783       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
43784       __PYX_ERR(1, 14, __pyx_L1_error)
43785     }
43786     __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(1, 14, __pyx_L1_error)
43787     __Pyx_GOTREF(__pyx_t_6);
43788     __pyx_t_8 = NULL;
43789     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
43790       __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
43791       if (likely(__pyx_t_8)) {
43792         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
43793         __Pyx_INCREF(__pyx_t_8);
43794         __Pyx_INCREF(function);
43795         __Pyx_DECREF_SET(__pyx_t_7, function);
43796       }
43797     }
43798     __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);
43799     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43800     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43801     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
43802     __Pyx_GOTREF(__pyx_t_1);
43803     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
43804     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43805 
43806     /* "(tree fragment)":13
43807  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
43808  *     __pyx_result.name = __pyx_state[0]
43809  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
43810  *         __pyx_result.__dict__.update(__pyx_state[1])
43811  */
43812   }
43813 
43814   /* "(tree fragment)":11
43815  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
43816  *     return __pyx_result
43817  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
43818  *     __pyx_result.name = __pyx_state[0]
43819  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
43820  */
43821 
43822   /* function exit code */
43823   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43824   goto __pyx_L0;
43825   __pyx_L1_error:;
43826   __Pyx_XDECREF(__pyx_t_1);
43827   __Pyx_XDECREF(__pyx_t_6);
43828   __Pyx_XDECREF(__pyx_t_7);
43829   __Pyx_XDECREF(__pyx_t_8);
43830   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
43831   __pyx_r = 0;
43832   __pyx_L0:;
43833   __Pyx_XGIVEREF(__pyx_r);
43834   __Pyx_RefNannyFinishContext();
43835   return __pyx_r;
43836 }
43837 
43838 /* "BufferFormatFromTypeInfo":1460
43839  *
43840  * @cname('__pyx_format_from_typeinfo')
43841  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type):             # <<<<<<<<<<<<<<
43842  *     cdef __Pyx_StructField *field
43843  *     cdef __pyx_typeinfo_string fmt
43844  */
43845 
__pyx_format_from_typeinfo(__Pyx_TypeInfo * __pyx_v_type)43846 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) {
43847   __Pyx_StructField *__pyx_v_field;
43848   struct __pyx_typeinfo_string __pyx_v_fmt;
43849   PyObject *__pyx_v_part = 0;
43850   PyObject *__pyx_v_result = 0;
43851   PyObject *__pyx_v_alignment = NULL;
43852   PyObject *__pyx_v_parts = NULL;
43853   PyObject *__pyx_v_extents = NULL;
43854   int __pyx_v_i;
43855   PyObject *__pyx_r = NULL;
43856   __Pyx_RefNannyDeclarations
43857   int __pyx_t_1;
43858   int __pyx_t_2;
43859   PyObject *__pyx_t_3 = NULL;
43860   __Pyx_StructField *__pyx_t_4;
43861   PyObject *__pyx_t_5 = NULL;
43862   PyObject *__pyx_t_6 = NULL;
43863   int __pyx_t_7;
43864   int __pyx_t_8;
43865   int __pyx_t_9;
43866   int __pyx_t_10;
43867   __Pyx_RefNannySetupContext("format_from_typeinfo", 0);
43868 
43869   /* "BufferFormatFromTypeInfo":1465
43870  *     cdef bytes part, result
43871  *
43872  *     if type.typegroup == 'S':             # <<<<<<<<<<<<<<
43873  *         assert type.fields != NULL and type.fields.type != NULL
43874  *
43875  */
43876   __pyx_t_1 = ((__pyx_v_type->typegroup == 'S') != 0);
43877   if (__pyx_t_1) {
43878 
43879     /* "BufferFormatFromTypeInfo":1466
43880  *
43881  *     if type.typegroup == 'S':
43882  *         assert type.fields != NULL and type.fields.type != NULL             # <<<<<<<<<<<<<<
43883  *
43884  *         if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
43885  */
43886     #ifndef CYTHON_WITHOUT_ASSERTIONS
43887     if (unlikely(!Py_OptimizeFlag)) {
43888       __pyx_t_2 = ((__pyx_v_type->fields != NULL) != 0);
43889       if (__pyx_t_2) {
43890       } else {
43891         __pyx_t_1 = __pyx_t_2;
43892         goto __pyx_L4_bool_binop_done;
43893       }
43894       __pyx_t_2 = ((__pyx_v_type->fields->type != NULL) != 0);
43895       __pyx_t_1 = __pyx_t_2;
43896       __pyx_L4_bool_binop_done:;
43897       if (unlikely(!__pyx_t_1)) {
43898         PyErr_SetNone(PyExc_AssertionError);
43899         __PYX_ERR(1, 1466, __pyx_L1_error)
43900       }
43901     }
43902     #endif
43903 
43904     /* "BufferFormatFromTypeInfo":1468
43905  *         assert type.fields != NULL and type.fields.type != NULL
43906  *
43907  *         if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:             # <<<<<<<<<<<<<<
43908  *             alignment = b'^'
43909  *         else:
43910  */
43911     __pyx_t_1 = ((__pyx_v_type->flags & __PYX_BUF_FLAGS_PACKED_STRUCT) != 0);
43912     if (__pyx_t_1) {
43913 
43914       /* "BufferFormatFromTypeInfo":1469
43915  *
43916  *         if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
43917  *             alignment = b'^'             # <<<<<<<<<<<<<<
43918  *         else:
43919  *             alignment = b''
43920  */
43921       __Pyx_INCREF(__pyx_kp_b__47);
43922       __pyx_v_alignment = __pyx_kp_b__47;
43923 
43924       /* "BufferFormatFromTypeInfo":1468
43925  *         assert type.fields != NULL and type.fields.type != NULL
43926  *
43927  *         if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:             # <<<<<<<<<<<<<<
43928  *             alignment = b'^'
43929  *         else:
43930  */
43931       goto __pyx_L6;
43932     }
43933 
43934     /* "BufferFormatFromTypeInfo":1471
43935  *             alignment = b'^'
43936  *         else:
43937  *             alignment = b''             # <<<<<<<<<<<<<<
43938  *
43939  *         parts = [b"T{"]
43940  */
43941     /*else*/ {
43942       __Pyx_INCREF(__pyx_kp_b__5);
43943       __pyx_v_alignment = __pyx_kp_b__5;
43944     }
43945     __pyx_L6:;
43946 
43947     /* "BufferFormatFromTypeInfo":1473
43948  *             alignment = b''
43949  *
43950  *         parts = [b"T{"]             # <<<<<<<<<<<<<<
43951  *         field = type.fields
43952  *
43953  */
43954     __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1473, __pyx_L1_error)
43955     __Pyx_GOTREF(__pyx_t_3);
43956     __Pyx_INCREF(__pyx_kp_b_T);
43957     __Pyx_GIVEREF(__pyx_kp_b_T);
43958     PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_b_T);
43959     __pyx_v_parts = ((PyObject*)__pyx_t_3);
43960     __pyx_t_3 = 0;
43961 
43962     /* "BufferFormatFromTypeInfo":1474
43963  *
43964  *         parts = [b"T{"]
43965  *         field = type.fields             # <<<<<<<<<<<<<<
43966  *
43967  *         while field.type:
43968  */
43969     __pyx_t_4 = __pyx_v_type->fields;
43970     __pyx_v_field = __pyx_t_4;
43971 
43972     /* "BufferFormatFromTypeInfo":1476
43973  *         field = type.fields
43974  *
43975  *         while field.type:             # <<<<<<<<<<<<<<
43976  *             part = format_from_typeinfo(field.type)
43977  *             parts.append(part + b':' + field.name + b':')
43978  */
43979     while (1) {
43980       __pyx_t_1 = (__pyx_v_field->type != 0);
43981       if (!__pyx_t_1) break;
43982 
43983       /* "BufferFormatFromTypeInfo":1477
43984  *
43985  *         while field.type:
43986  *             part = format_from_typeinfo(field.type)             # <<<<<<<<<<<<<<
43987  *             parts.append(part + b':' + field.name + b':')
43988  *             field += 1
43989  */
43990       __pyx_t_3 = __pyx_format_from_typeinfo(__pyx_v_field->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1477, __pyx_L1_error)
43991       __Pyx_GOTREF(__pyx_t_3);
43992       __Pyx_XDECREF_SET(__pyx_v_part, ((PyObject*)__pyx_t_3));
43993       __pyx_t_3 = 0;
43994 
43995       /* "BufferFormatFromTypeInfo":1478
43996  *         while field.type:
43997  *             part = format_from_typeinfo(field.type)
43998  *             parts.append(part + b':' + field.name + b':')             # <<<<<<<<<<<<<<
43999  *             field += 1
44000  *
44001  */
44002       __pyx_t_3 = PyNumber_Add(__pyx_v_part, __pyx_kp_b__48); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1478, __pyx_L1_error)
44003       __Pyx_GOTREF(__pyx_t_3);
44004       __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_field->name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1478, __pyx_L1_error)
44005       __Pyx_GOTREF(__pyx_t_5);
44006       __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1478, __pyx_L1_error)
44007       __Pyx_GOTREF(__pyx_t_6);
44008       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44009       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
44010       __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__48); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1478, __pyx_L1_error)
44011       __Pyx_GOTREF(__pyx_t_5);
44012       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
44013       __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 1478, __pyx_L1_error)
44014       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
44015 
44016       /* "BufferFormatFromTypeInfo":1479
44017  *             part = format_from_typeinfo(field.type)
44018  *             parts.append(part + b':' + field.name + b':')
44019  *             field += 1             # <<<<<<<<<<<<<<
44020  *
44021  *         result = alignment.join(parts) + b'}'
44022  */
44023       __pyx_v_field = (__pyx_v_field + 1);
44024     }
44025 
44026     /* "BufferFormatFromTypeInfo":1481
44027  *             field += 1
44028  *
44029  *         result = alignment.join(parts) + b'}'             # <<<<<<<<<<<<<<
44030  *     else:
44031  *         fmt = __Pyx_TypeInfoToFormat(type)
44032  */
44033     __pyx_t_5 = __Pyx_PyBytes_Join(__pyx_v_alignment, __pyx_v_parts); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1481, __pyx_L1_error)
44034     __Pyx_GOTREF(__pyx_t_5);
44035     __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_kp_b__49); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1481, __pyx_L1_error)
44036     __Pyx_GOTREF(__pyx_t_6);
44037     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
44038     if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(1, 1481, __pyx_L1_error)
44039     __pyx_v_result = ((PyObject*)__pyx_t_6);
44040     __pyx_t_6 = 0;
44041 
44042     /* "BufferFormatFromTypeInfo":1465
44043  *     cdef bytes part, result
44044  *
44045  *     if type.typegroup == 'S':             # <<<<<<<<<<<<<<
44046  *         assert type.fields != NULL and type.fields.type != NULL
44047  *
44048  */
44049     goto __pyx_L3;
44050   }
44051 
44052   /* "BufferFormatFromTypeInfo":1483
44053  *         result = alignment.join(parts) + b'}'
44054  *     else:
44055  *         fmt = __Pyx_TypeInfoToFormat(type)             # <<<<<<<<<<<<<<
44056  *         if type.arraysize[0]:
44057  *             extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
44058  */
44059   /*else*/ {
44060     __pyx_v_fmt = __Pyx_TypeInfoToFormat(__pyx_v_type);
44061 
44062     /* "BufferFormatFromTypeInfo":1484
44063  *     else:
44064  *         fmt = __Pyx_TypeInfoToFormat(type)
44065  *         if type.arraysize[0]:             # <<<<<<<<<<<<<<
44066  *             extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
44067  *             result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
44068  */
44069     __pyx_t_1 = ((__pyx_v_type->arraysize[0]) != 0);
44070     if (__pyx_t_1) {
44071 
44072       /* "BufferFormatFromTypeInfo":1485
44073  *         fmt = __Pyx_TypeInfoToFormat(type)
44074  *         if type.arraysize[0]:
44075  *             extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]             # <<<<<<<<<<<<<<
44076  *             result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
44077  *         else:
44078  */
44079       __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1485, __pyx_L1_error)
44080       __Pyx_GOTREF(__pyx_t_6);
44081       __pyx_t_8 = __pyx_v_type->ndim;
44082       __pyx_t_9 = __pyx_t_8;
44083       for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
44084         __pyx_v_i = __pyx_t_10;
44085         __pyx_t_5 = __Pyx_PyInt_FromSize_t((__pyx_v_type->arraysize[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1485, __pyx_L1_error)
44086         __Pyx_GOTREF(__pyx_t_5);
44087         __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1485, __pyx_L1_error)
44088         __Pyx_GOTREF(__pyx_t_3);
44089         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
44090         if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) __PYX_ERR(1, 1485, __pyx_L1_error)
44091         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44092       }
44093       __pyx_v_extents = ((PyObject*)__pyx_t_6);
44094       __pyx_t_6 = 0;
44095 
44096       /* "BufferFormatFromTypeInfo":1486
44097  *         if type.arraysize[0]:
44098  *             extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
44099  *             result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string             # <<<<<<<<<<<<<<
44100  *         else:
44101  *             result = fmt.string
44102  */
44103       __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__50, __pyx_v_extents); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1486, __pyx_L1_error)
44104       __Pyx_GOTREF(__pyx_t_6);
44105       __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1486, __pyx_L1_error)
44106       __Pyx_GOTREF(__pyx_t_3);
44107       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
44108       __pyx_t_6 = PyUnicode_AsASCIIString(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1486, __pyx_L1_error)
44109       __Pyx_GOTREF(__pyx_t_6);
44110       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44111       __pyx_t_3 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1486, __pyx_L1_error)
44112       __Pyx_GOTREF(__pyx_t_3);
44113       __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1486, __pyx_L1_error)
44114       __Pyx_GOTREF(__pyx_t_5);
44115       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
44116       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44117       if (!(likely(PyBytes_CheckExact(__pyx_t_5))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(1, 1486, __pyx_L1_error)
44118       __pyx_v_result = ((PyObject*)__pyx_t_5);
44119       __pyx_t_5 = 0;
44120 
44121       /* "BufferFormatFromTypeInfo":1484
44122  *     else:
44123  *         fmt = __Pyx_TypeInfoToFormat(type)
44124  *         if type.arraysize[0]:             # <<<<<<<<<<<<<<
44125  *             extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
44126  *             result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
44127  */
44128       goto __pyx_L9;
44129     }
44130 
44131     /* "BufferFormatFromTypeInfo":1488
44132  *             result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
44133  *         else:
44134  *             result = fmt.string             # <<<<<<<<<<<<<<
44135  *
44136  *     return result
44137  */
44138     /*else*/ {
44139       __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1488, __pyx_L1_error)
44140       __Pyx_GOTREF(__pyx_t_5);
44141       __pyx_v_result = ((PyObject*)__pyx_t_5);
44142       __pyx_t_5 = 0;
44143     }
44144     __pyx_L9:;
44145   }
44146   __pyx_L3:;
44147 
44148   /* "BufferFormatFromTypeInfo":1490
44149  *             result = fmt.string
44150  *
44151  *     return result             # <<<<<<<<<<<<<<
44152  */
44153   __Pyx_XDECREF(__pyx_r);
44154   __Pyx_INCREF(__pyx_v_result);
44155   __pyx_r = __pyx_v_result;
44156   goto __pyx_L0;
44157 
44158   /* "BufferFormatFromTypeInfo":1460
44159  *
44160  * @cname('__pyx_format_from_typeinfo')
44161  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type):             # <<<<<<<<<<<<<<
44162  *     cdef __Pyx_StructField *field
44163  *     cdef __pyx_typeinfo_string fmt
44164  */
44165 
44166   /* function exit code */
44167   __pyx_L1_error:;
44168   __Pyx_XDECREF(__pyx_t_3);
44169   __Pyx_XDECREF(__pyx_t_5);
44170   __Pyx_XDECREF(__pyx_t_6);
44171   __Pyx_AddTraceback("BufferFormatFromTypeInfo.format_from_typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
44172   __pyx_r = 0;
44173   __pyx_L0:;
44174   __Pyx_XDECREF(__pyx_v_part);
44175   __Pyx_XDECREF(__pyx_v_result);
44176   __Pyx_XDECREF(__pyx_v_alignment);
44177   __Pyx_XDECREF(__pyx_v_parts);
44178   __Pyx_XDECREF(__pyx_v_extents);
44179   __Pyx_XGIVEREF(__pyx_r);
44180   __Pyx_RefNannyFinishContext();
44181   return __pyx_r;
44182 }
44183 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks;
44184 
__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks(PyTypeObject * t,PyObject * a,PyObject * k)44185 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks(PyTypeObject *t, PyObject *a, PyObject *k) {
44186   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *p;
44187   PyObject *o;
44188   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
44189     o = (*t->tp_alloc)(t, 0);
44190   } else {
44191     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
44192   }
44193   if (unlikely(!o)) return 0;
44194   p = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *)o);
44195   p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks;
44196   if (unlikely(__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_1__cinit__(o, a, k) < 0)) goto bad;
44197   return o;
44198   bad:
44199   Py_DECREF(o); o = 0;
44200   return NULL;
44201 }
44202 
__pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks(PyObject * o)44203 static void __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks(PyObject *o) {
44204   #if CYTHON_USE_TP_FINALIZE
44205   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))) {
44206     if (PyObject_CallFinalizerFromDealloc(o)) return;
44207   }
44208   #endif
44209   {
44210     PyObject *etype, *eval, *etb;
44211     PyErr_Fetch(&etype, &eval, &etb);
44212     ++Py_REFCNT(o);
44213     __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_19__dealloc__(o);
44214     --Py_REFCNT(o);
44215     PyErr_Restore(etype, eval, etb);
44216   }
44217   (*Py_TYPE(o)->tp_free)(o);
44218 }
44219 
44220 static PyMethodDef __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks[] = {
44221   {"iseq", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_3iseq, METH_O, 0},
44222   {"count_coarse", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_5count_coarse, METH_O, 0},
44223   {"count_total", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_7count_total, METH_O, 0},
44224   {"count_refined", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_9count_refined, METH_O, 0},
44225   {"append", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_11append, METH_VARARGS|METH_KEYWORDS, 0},
44226   {"logicalxor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_13logicalxor, METH_VARARGS|METH_KEYWORDS, 0},
44227   {"logicaland", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_15logicaland, METH_VARARGS|METH_KEYWORDS, 0},
44228   {"check", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_17check, METH_NOARGS, 0},
44229   {"print_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_21print_info, METH_VARARGS|METH_KEYWORDS, 0},
44230   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_23__reduce_cython__, METH_NOARGS, 0},
44231   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks_25__setstate_cython__, METH_O, 0},
44232   {0, 0, 0, 0}
44233 };
44234 
44235 static PyTypeObject __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks = {
44236   PyVarObject_HEAD_INIT(0, 0)
44237   "yt.utilities.lib.ewah_bool_wrap.FileBitmasks", /*tp_name*/
44238   sizeof(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks), /*tp_basicsize*/
44239   0, /*tp_itemsize*/
44240   __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks, /*tp_dealloc*/
44241   0, /*tp_print*/
44242   0, /*tp_getattr*/
44243   0, /*tp_setattr*/
44244   #if PY_MAJOR_VERSION < 3
44245   0, /*tp_compare*/
44246   #endif
44247   #if PY_MAJOR_VERSION >= 3
44248   0, /*tp_as_async*/
44249   #endif
44250   0, /*tp_repr*/
44251   0, /*tp_as_number*/
44252   0, /*tp_as_sequence*/
44253   0, /*tp_as_mapping*/
44254   0, /*tp_hash*/
44255   0, /*tp_call*/
44256   0, /*tp_str*/
44257   0, /*tp_getattro*/
44258   0, /*tp_setattro*/
44259   0, /*tp_as_buffer*/
44260   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
44261   0, /*tp_doc*/
44262   0, /*tp_traverse*/
44263   0, /*tp_clear*/
44264   0, /*tp_richcompare*/
44265   0, /*tp_weaklistoffset*/
44266   0, /*tp_iter*/
44267   0, /*tp_iternext*/
44268   __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks, /*tp_methods*/
44269   0, /*tp_members*/
44270   0, /*tp_getset*/
44271   0, /*tp_base*/
44272   0, /*tp_dict*/
44273   0, /*tp_descr_get*/
44274   0, /*tp_descr_set*/
44275   0, /*tp_dictoffset*/
44276   0, /*tp_init*/
44277   0, /*tp_alloc*/
44278   __pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks, /*tp_new*/
44279   0, /*tp_free*/
44280   0, /*tp_is_gc*/
44281   0, /*tp_bases*/
44282   0, /*tp_mro*/
44283   0, /*tp_cache*/
44284   0, /*tp_subclasses*/
44285   0, /*tp_weaklist*/
44286   0, /*tp_del*/
44287   0, /*tp_version_tag*/
44288   #if PY_VERSION_HEX >= 0x030400a1
44289   0, /*tp_finalize*/
44290   #endif
44291   #if PY_VERSION_HEX >= 0x030800b1
44292   0, /*tp_vectorcall*/
44293   #endif
44294 };
44295 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection;
44296 
__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)44297 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
44298   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *p;
44299   PyObject *o;
44300   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
44301     o = (*t->tp_alloc)(t, 0);
44302   } else {
44303     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
44304   }
44305   if (unlikely(!o)) return 0;
44306   p = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *)o);
44307   p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection;
44308   if (unlikely(__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
44309   return o;
44310   bad:
44311   Py_DECREF(o); o = 0;
44312   return NULL;
44313 }
44314 
__pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection(PyObject * o)44315 static void __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection(PyObject *o) {
44316   #if CYTHON_USE_TP_FINALIZE
44317   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))) {
44318     if (PyObject_CallFinalizerFromDealloc(o)) return;
44319   }
44320   #endif
44321   {
44322     PyObject *etype, *eval, *etb;
44323     PyErr_Fetch(&etype, &eval, &etb);
44324     ++Py_REFCNT(o);
44325     __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_49__dealloc__(o);
44326     --Py_REFCNT(o);
44327     PyErr_Restore(etype, eval, etb);
44328   }
44329   (*Py_TYPE(o)->tp_free)(o);
44330 }
44331 
44332 static PyMethodDef __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection[] = {
44333   {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_5set, METH_VARARGS|METH_KEYWORDS, 0},
44334   {"set_from", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_7set_from, METH_O, 0},
44335   {"set_coarse", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_9set_coarse, METH_O, 0},
44336   {"set_refined", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_11set_refined, METH_VARARGS|METH_KEYWORDS, 0},
44337   {"set_map", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_13set_map, METH_VARARGS|METH_KEYWORDS, 0},
44338   {"set_refn", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_15set_refn, METH_O, 0},
44339   {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_17get, METH_VARARGS|METH_KEYWORDS, 0},
44340   {"get_coarse", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_19get_coarse, METH_O, 0},
44341   {"get_coarse_array", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_21get_coarse_array, METH_VARARGS|METH_KEYWORDS, 0},
44342   {"contains", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_23contains, METH_O, 0},
44343   {"isref", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_25isref, METH_O, 0},
44344   {"ewah_coarse", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_27ewah_coarse, METH_NOARGS, 0},
44345   {"count_total", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_29count_total, METH_NOARGS, 0},
44346   {"count_refined", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_31count_refined, METH_NOARGS, 0},
44347   {"count_coarse", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_33count_coarse, METH_NOARGS, 0},
44348   {"append", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_35append, METH_O, 0},
44349   {"logicalxor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_37logicalxor, METH_VARARGS|METH_KEYWORDS, 0},
44350   {"logicaland", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_39logicaland, METH_VARARGS|METH_KEYWORDS, 0},
44351   {"dumps", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_41dumps, METH_NOARGS, 0},
44352   {"loads", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_43loads, METH_O, 0},
44353   {"save", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_45save, METH_O, 0},
44354   {"load", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_47load, METH_O, 0},
44355   {"print_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_51print_info, METH_VARARGS|METH_KEYWORDS, 0},
44356   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_53__reduce_cython__, METH_NOARGS, 0},
44357   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_55__setstate_cython__, METH_O, 0},
44358   {0, 0, 0, 0}
44359 };
44360 
44361 static PyTypeObject __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection = {
44362   PyVarObject_HEAD_INIT(0, 0)
44363   "yt.utilities.lib.ewah_bool_wrap.BoolArrayCollection", /*tp_name*/
44364   sizeof(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection), /*tp_basicsize*/
44365   0, /*tp_itemsize*/
44366   __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection, /*tp_dealloc*/
44367   0, /*tp_print*/
44368   0, /*tp_getattr*/
44369   0, /*tp_setattr*/
44370   #if PY_MAJOR_VERSION < 3
44371   0, /*tp_compare*/
44372   #endif
44373   #if PY_MAJOR_VERSION >= 3
44374   0, /*tp_as_async*/
44375   #endif
44376   0, /*tp_repr*/
44377   0, /*tp_as_number*/
44378   0, /*tp_as_sequence*/
44379   0, /*tp_as_mapping*/
44380   0, /*tp_hash*/
44381   0, /*tp_call*/
44382   0, /*tp_str*/
44383   0, /*tp_getattro*/
44384   0, /*tp_setattro*/
44385   0, /*tp_as_buffer*/
44386   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
44387   0, /*tp_doc*/
44388   0, /*tp_traverse*/
44389   0, /*tp_clear*/
44390   __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection_3__richcmp__, /*tp_richcompare*/
44391   0, /*tp_weaklistoffset*/
44392   0, /*tp_iter*/
44393   0, /*tp_iternext*/
44394   __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection, /*tp_methods*/
44395   0, /*tp_members*/
44396   0, /*tp_getset*/
44397   0, /*tp_base*/
44398   0, /*tp_dict*/
44399   0, /*tp_descr_get*/
44400   0, /*tp_descr_set*/
44401   0, /*tp_dictoffset*/
44402   0, /*tp_init*/
44403   0, /*tp_alloc*/
44404   __pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection, /*tp_new*/
44405   0, /*tp_free*/
44406   0, /*tp_is_gc*/
44407   0, /*tp_bases*/
44408   0, /*tp_mro*/
44409   0, /*tp_cache*/
44410   0, /*tp_subclasses*/
44411   0, /*tp_weaklist*/
44412   0, /*tp_del*/
44413   0, /*tp_version_tag*/
44414   #if PY_VERSION_HEX >= 0x030400a1
44415   0, /*tp_finalize*/
44416   #endif
44417   #if PY_VERSION_HEX >= 0x030800b1
44418   0, /*tp_vectorcall*/
44419   #endif
44420 };
44421 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed;
44422 
__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed(PyTypeObject * t,PyObject * a,PyObject * k)44423 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed(PyTypeObject *t, PyObject *a, PyObject *k) {
44424   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *p;
44425   PyObject *o;
44426   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
44427     o = (*t->tp_alloc)(t, 0);
44428   } else {
44429     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
44430   }
44431   if (unlikely(!o)) return 0;
44432   p = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *)o);
44433   p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed;
44434   if (unlikely(__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_1__cinit__(o, a, k) < 0)) goto bad;
44435   return o;
44436   bad:
44437   Py_DECREF(o); o = 0;
44438   return NULL;
44439 }
44440 
__pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed(PyObject * o)44441 static void __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed(PyObject *o) {
44442   #if CYTHON_USE_TP_FINALIZE
44443   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))) {
44444     if (PyObject_CallFinalizerFromDealloc(o)) return;
44445   }
44446   #endif
44447   {
44448     PyObject *etype, *eval, *etb;
44449     PyErr_Fetch(&etype, &eval, &etb);
44450     ++Py_REFCNT(o);
44451     __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_5__dealloc__(o);
44452     --Py_REFCNT(o);
44453     PyErr_Restore(etype, eval, etb);
44454   }
44455   (*Py_TYPE(o)->tp_free)(o);
44456 }
44457 
44458 static PyMethodDef __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed[] = {
44459   {"reset", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_3reset, METH_NOARGS, 0},
44460   {"print_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_7print_info, METH_VARARGS|METH_KEYWORDS, 0},
44461   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_9__reduce_cython__, METH_NOARGS, 0},
44462   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed_11__setstate_cython__, METH_O, 0},
44463   {0, 0, 0, 0}
44464 };
44465 
44466 static PyTypeObject __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed = {
44467   PyVarObject_HEAD_INIT(0, 0)
44468   "yt.utilities.lib.ewah_bool_wrap.BoolArrayCollectionUncompressed", /*tp_name*/
44469   sizeof(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed), /*tp_basicsize*/
44470   0, /*tp_itemsize*/
44471   __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed, /*tp_dealloc*/
44472   0, /*tp_print*/
44473   0, /*tp_getattr*/
44474   0, /*tp_setattr*/
44475   #if PY_MAJOR_VERSION < 3
44476   0, /*tp_compare*/
44477   #endif
44478   #if PY_MAJOR_VERSION >= 3
44479   0, /*tp_as_async*/
44480   #endif
44481   0, /*tp_repr*/
44482   0, /*tp_as_number*/
44483   0, /*tp_as_sequence*/
44484   0, /*tp_as_mapping*/
44485   0, /*tp_hash*/
44486   0, /*tp_call*/
44487   0, /*tp_str*/
44488   0, /*tp_getattro*/
44489   0, /*tp_setattro*/
44490   0, /*tp_as_buffer*/
44491   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
44492   0, /*tp_doc*/
44493   0, /*tp_traverse*/
44494   0, /*tp_clear*/
44495   0, /*tp_richcompare*/
44496   0, /*tp_weaklistoffset*/
44497   0, /*tp_iter*/
44498   0, /*tp_iternext*/
44499   __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed, /*tp_methods*/
44500   0, /*tp_members*/
44501   0, /*tp_getset*/
44502   0, /*tp_base*/
44503   0, /*tp_dict*/
44504   0, /*tp_descr_get*/
44505   0, /*tp_descr_set*/
44506   0, /*tp_dictoffset*/
44507   0, /*tp_init*/
44508   0, /*tp_alloc*/
44509   __pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed, /*tp_new*/
44510   0, /*tp_free*/
44511   0, /*tp_is_gc*/
44512   0, /*tp_bases*/
44513   0, /*tp_mro*/
44514   0, /*tp_cache*/
44515   0, /*tp_subclasses*/
44516   0, /*tp_weaklist*/
44517   0, /*tp_del*/
44518   0, /*tp_version_tag*/
44519   #if PY_VERSION_HEX >= 0x030400a1
44520   0, /*tp_finalize*/
44521   #endif
44522   #if PY_VERSION_HEX >= 0x030800b1
44523   0, /*tp_vectorcall*/
44524   #endif
44525 };
44526 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet;
44527 
__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)44528 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
44529   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *p;
44530   PyObject *o;
44531   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
44532     o = (*t->tp_alloc)(t, 0);
44533   } else {
44534     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
44535   }
44536   if (unlikely(!o)) return 0;
44537   p = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *)o);
44538   p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet;
44539   new((void*)&(p->entries)) std::set<__pyx_t_5numpy_uint64_t> ();
44540   return o;
44541 }
44542 
__pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet(PyObject * o)44543 static void __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet(PyObject *o) {
44544   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *p = (struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *)o;
44545   #if CYTHON_USE_TP_FINALIZE
44546   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))) {
44547     if (PyObject_CallFinalizerFromDealloc(o)) return;
44548   }
44549   #endif
44550   {
44551     PyObject *etype, *eval, *etb;
44552     PyErr_Fetch(&etype, &eval, &etb);
44553     ++Py_REFCNT(o);
44554     __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_3__dealloc__(o);
44555     --Py_REFCNT(o);
44556     PyErr_Restore(etype, eval, etb);
44557   }
44558   __Pyx_call_destructor(p->entries);
44559   (*Py_TYPE(o)->tp_free)(o);
44560 }
44561 
44562 static PyMethodDef __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet[] = {
44563   {"set", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_1set, METH_O, 0},
44564   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_5__reduce_cython__, METH_NOARGS, 0},
44565   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_7__setstate_cython__, METH_O, 0},
44566   {0, 0, 0, 0}
44567 };
44568 
44569 static PyTypeObject __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet = {
44570   PyVarObject_HEAD_INIT(0, 0)
44571   "yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskSet", /*tp_name*/
44572   sizeof(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet), /*tp_basicsize*/
44573   0, /*tp_itemsize*/
44574   __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet, /*tp_dealloc*/
44575   0, /*tp_print*/
44576   0, /*tp_getattr*/
44577   0, /*tp_setattr*/
44578   #if PY_MAJOR_VERSION < 3
44579   0, /*tp_compare*/
44580   #endif
44581   #if PY_MAJOR_VERSION >= 3
44582   0, /*tp_as_async*/
44583   #endif
44584   0, /*tp_repr*/
44585   0, /*tp_as_number*/
44586   0, /*tp_as_sequence*/
44587   0, /*tp_as_mapping*/
44588   0, /*tp_hash*/
44589   0, /*tp_call*/
44590   0, /*tp_str*/
44591   0, /*tp_getattro*/
44592   0, /*tp_setattro*/
44593   0, /*tp_as_buffer*/
44594   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
44595   0, /*tp_doc*/
44596   0, /*tp_traverse*/
44597   0, /*tp_clear*/
44598   0, /*tp_richcompare*/
44599   0, /*tp_weaklistoffset*/
44600   0, /*tp_iter*/
44601   0, /*tp_iternext*/
44602   __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet, /*tp_methods*/
44603   0, /*tp_members*/
44604   0, /*tp_getset*/
44605   0, /*tp_base*/
44606   0, /*tp_dict*/
44607   0, /*tp_descr_get*/
44608   0, /*tp_descr_set*/
44609   0, /*tp_dictoffset*/
44610   0, /*tp_init*/
44611   0, /*tp_alloc*/
44612   __pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet, /*tp_new*/
44613   0, /*tp_free*/
44614   0, /*tp_is_gc*/
44615   0, /*tp_bases*/
44616   0, /*tp_mro*/
44617   0, /*tp_cache*/
44618   0, /*tp_subclasses*/
44619   0, /*tp_weaklist*/
44620   0, /*tp_del*/
44621   0, /*tp_version_tag*/
44622   #if PY_VERSION_HEX >= 0x030400a1
44623   0, /*tp_finalize*/
44624   #endif
44625   #if PY_VERSION_HEX >= 0x030800b1
44626   0, /*tp_vectorcall*/
44627   #endif
44628 };
44629 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector;
44630 
__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)44631 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
44632   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *p;
44633   PyObject *o;
44634   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
44635     o = (*t->tp_alloc)(t, 0);
44636   } else {
44637     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
44638   }
44639   if (unlikely(!o)) return 0;
44640   p = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)o);
44641   p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector;
44642   new((void*)&(p->entries)) std::vector<__pyx_t_5numpy_uint64_t> ();
44643   if (unlikely(__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
44644   return o;
44645   bad:
44646   Py_DECREF(o); o = 0;
44647   return NULL;
44648 }
44649 
__pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector(PyObject * o)44650 static void __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector(PyObject *o) {
44651   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *p = (struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *)o;
44652   #if CYTHON_USE_TP_FINALIZE
44653   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))) {
44654     if (PyObject_CallFinalizerFromDealloc(o)) return;
44655   }
44656   #endif
44657   {
44658     PyObject *etype, *eval, *etb;
44659     PyErr_Fetch(&etype, &eval, &etb);
44660     ++Py_REFCNT(o);
44661     __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_5__dealloc__(o);
44662     --Py_REFCNT(o);
44663     PyErr_Restore(etype, eval, etb);
44664   }
44665   __Pyx_call_destructor(p->entries);
44666   (*Py_TYPE(o)->tp_free)(o);
44667 }
44668 
44669 static PyMethodDef __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector[] = {
44670   {"set", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_3set, METH_O, 0},
44671   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_7__reduce_cython__, METH_NOARGS, 0},
44672   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_9__setstate_cython__, METH_O, 0},
44673   {0, 0, 0, 0}
44674 };
44675 
44676 static PyTypeObject __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector = {
44677   PyVarObject_HEAD_INIT(0, 0)
44678   "yt.utilities.lib.ewah_bool_wrap.SparseUnorderedBitmaskVector", /*tp_name*/
44679   sizeof(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector), /*tp_basicsize*/
44680   0, /*tp_itemsize*/
44681   __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector, /*tp_dealloc*/
44682   0, /*tp_print*/
44683   0, /*tp_getattr*/
44684   0, /*tp_setattr*/
44685   #if PY_MAJOR_VERSION < 3
44686   0, /*tp_compare*/
44687   #endif
44688   #if PY_MAJOR_VERSION >= 3
44689   0, /*tp_as_async*/
44690   #endif
44691   0, /*tp_repr*/
44692   0, /*tp_as_number*/
44693   0, /*tp_as_sequence*/
44694   0, /*tp_as_mapping*/
44695   0, /*tp_hash*/
44696   0, /*tp_call*/
44697   0, /*tp_str*/
44698   0, /*tp_getattro*/
44699   0, /*tp_setattro*/
44700   0, /*tp_as_buffer*/
44701   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
44702   0, /*tp_doc*/
44703   0, /*tp_traverse*/
44704   0, /*tp_clear*/
44705   0, /*tp_richcompare*/
44706   0, /*tp_weaklistoffset*/
44707   0, /*tp_iter*/
44708   0, /*tp_iternext*/
44709   __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector, /*tp_methods*/
44710   0, /*tp_members*/
44711   0, /*tp_getset*/
44712   0, /*tp_base*/
44713   0, /*tp_dict*/
44714   0, /*tp_descr_get*/
44715   0, /*tp_descr_set*/
44716   0, /*tp_dictoffset*/
44717   0, /*tp_init*/
44718   0, /*tp_alloc*/
44719   __pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector, /*tp_new*/
44720   0, /*tp_free*/
44721   0, /*tp_is_gc*/
44722   0, /*tp_bases*/
44723   0, /*tp_mro*/
44724   0, /*tp_cache*/
44725   0, /*tp_subclasses*/
44726   0, /*tp_weaklist*/
44727   0, /*tp_del*/
44728   0, /*tp_version_tag*/
44729   #if PY_VERSION_HEX >= 0x030400a1
44730   0, /*tp_finalize*/
44731   #endif
44732   #if PY_VERSION_HEX >= 0x030800b1
44733   0, /*tp_vectorcall*/
44734   #endif
44735 };
44736 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet;
44737 
__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)44738 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
44739   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *p;
44740   PyObject *o;
44741   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
44742     o = (*t->tp_alloc)(t, 0);
44743   } else {
44744     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
44745   }
44746   if (unlikely(!o)) return 0;
44747   p = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)o);
44748   p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet;
44749   new((void*)&(p->entries)) std::set<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ();
44750   return o;
44751 }
44752 
__pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet(PyObject * o)44753 static void __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet(PyObject *o) {
44754   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *p = (struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *)o;
44755   #if CYTHON_USE_TP_FINALIZE
44756   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))) {
44757     if (PyObject_CallFinalizerFromDealloc(o)) return;
44758   }
44759   #endif
44760   {
44761     PyObject *etype, *eval, *etb;
44762     PyErr_Fetch(&etype, &eval, &etb);
44763     ++Py_REFCNT(o);
44764     __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_3__dealloc__(o);
44765     --Py_REFCNT(o);
44766     PyErr_Restore(etype, eval, etb);
44767   }
44768   __Pyx_call_destructor(p->entries);
44769   (*Py_TYPE(o)->tp_free)(o);
44770 }
44771 
44772 static PyMethodDef __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet[] = {
44773   {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_1set, METH_VARARGS|METH_KEYWORDS, 0},
44774   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_5__reduce_cython__, METH_NOARGS, 0},
44775   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_7__setstate_cython__, METH_O, 0},
44776   {0, 0, 0, 0}
44777 };
44778 
44779 static PyTypeObject __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet = {
44780   PyVarObject_HEAD_INIT(0, 0)
44781   "yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskSet", /*tp_name*/
44782   sizeof(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet), /*tp_basicsize*/
44783   0, /*tp_itemsize*/
44784   __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet, /*tp_dealloc*/
44785   0, /*tp_print*/
44786   0, /*tp_getattr*/
44787   0, /*tp_setattr*/
44788   #if PY_MAJOR_VERSION < 3
44789   0, /*tp_compare*/
44790   #endif
44791   #if PY_MAJOR_VERSION >= 3
44792   0, /*tp_as_async*/
44793   #endif
44794   0, /*tp_repr*/
44795   0, /*tp_as_number*/
44796   0, /*tp_as_sequence*/
44797   0, /*tp_as_mapping*/
44798   0, /*tp_hash*/
44799   0, /*tp_call*/
44800   0, /*tp_str*/
44801   0, /*tp_getattro*/
44802   0, /*tp_setattro*/
44803   0, /*tp_as_buffer*/
44804   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
44805   0, /*tp_doc*/
44806   0, /*tp_traverse*/
44807   0, /*tp_clear*/
44808   0, /*tp_richcompare*/
44809   0, /*tp_weaklistoffset*/
44810   0, /*tp_iter*/
44811   0, /*tp_iternext*/
44812   __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet, /*tp_methods*/
44813   0, /*tp_members*/
44814   0, /*tp_getset*/
44815   0, /*tp_base*/
44816   0, /*tp_dict*/
44817   0, /*tp_descr_get*/
44818   0, /*tp_descr_set*/
44819   0, /*tp_dictoffset*/
44820   0, /*tp_init*/
44821   0, /*tp_alloc*/
44822   __pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet, /*tp_new*/
44823   0, /*tp_free*/
44824   0, /*tp_is_gc*/
44825   0, /*tp_bases*/
44826   0, /*tp_mro*/
44827   0, /*tp_cache*/
44828   0, /*tp_subclasses*/
44829   0, /*tp_weaklist*/
44830   0, /*tp_del*/
44831   0, /*tp_version_tag*/
44832   #if PY_VERSION_HEX >= 0x030400a1
44833   0, /*tp_finalize*/
44834   #endif
44835   #if PY_VERSION_HEX >= 0x030800b1
44836   0, /*tp_vectorcall*/
44837   #endif
44838 };
44839 static struct __pyx_vtabstruct_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector;
44840 
__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)44841 static PyObject *__pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
44842   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *p;
44843   PyObject *o;
44844   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
44845     o = (*t->tp_alloc)(t, 0);
44846   } else {
44847     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
44848   }
44849   if (unlikely(!o)) return 0;
44850   p = ((struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)o);
44851   p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector;
44852   new((void*)&(p->entries)) std::vector<__pyx_t_2yt_9utilities_3lib_14ewah_bool_wrap_ind_pair> ();
44853   if (unlikely(__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
44854   return o;
44855   bad:
44856   Py_DECREF(o); o = 0;
44857   return NULL;
44858 }
44859 
__pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector(PyObject * o)44860 static void __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector(PyObject *o) {
44861   struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *p = (struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *)o;
44862   #if CYTHON_USE_TP_FINALIZE
44863   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))) {
44864     if (PyObject_CallFinalizerFromDealloc(o)) return;
44865   }
44866   #endif
44867   {
44868     PyObject *etype, *eval, *etb;
44869     PyErr_Fetch(&etype, &eval, &etb);
44870     ++Py_REFCNT(o);
44871     __pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_5__dealloc__(o);
44872     --Py_REFCNT(o);
44873     PyErr_Restore(etype, eval, etb);
44874   }
44875   __Pyx_call_destructor(p->entries);
44876   (*Py_TYPE(o)->tp_free)(o);
44877 }
44878 
44879 static PyMethodDef __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector[] = {
44880   {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_3set, METH_VARARGS|METH_KEYWORDS, 0},
44881   {"__reduce_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_7__reduce_cython__, METH_NOARGS, 0},
44882   {"__setstate_cython__", (PyCFunction)__pyx_pw_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_9__setstate_cython__, METH_O, 0},
44883   {0, 0, 0, 0}
44884 };
44885 
44886 static PyTypeObject __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector = {
44887   PyVarObject_HEAD_INIT(0, 0)
44888   "yt.utilities.lib.ewah_bool_wrap.SparseUnorderedRefinedBitmaskVector", /*tp_name*/
44889   sizeof(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector), /*tp_basicsize*/
44890   0, /*tp_itemsize*/
44891   __pyx_tp_dealloc_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector, /*tp_dealloc*/
44892   0, /*tp_print*/
44893   0, /*tp_getattr*/
44894   0, /*tp_setattr*/
44895   #if PY_MAJOR_VERSION < 3
44896   0, /*tp_compare*/
44897   #endif
44898   #if PY_MAJOR_VERSION >= 3
44899   0, /*tp_as_async*/
44900   #endif
44901   0, /*tp_repr*/
44902   0, /*tp_as_number*/
44903   0, /*tp_as_sequence*/
44904   0, /*tp_as_mapping*/
44905   0, /*tp_hash*/
44906   0, /*tp_call*/
44907   0, /*tp_str*/
44908   0, /*tp_getattro*/
44909   0, /*tp_setattro*/
44910   0, /*tp_as_buffer*/
44911   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
44912   0, /*tp_doc*/
44913   0, /*tp_traverse*/
44914   0, /*tp_clear*/
44915   0, /*tp_richcompare*/
44916   0, /*tp_weaklistoffset*/
44917   0, /*tp_iter*/
44918   0, /*tp_iternext*/
44919   __pyx_methods_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector, /*tp_methods*/
44920   0, /*tp_members*/
44921   0, /*tp_getset*/
44922   0, /*tp_base*/
44923   0, /*tp_dict*/
44924   0, /*tp_descr_get*/
44925   0, /*tp_descr_set*/
44926   0, /*tp_dictoffset*/
44927   0, /*tp_init*/
44928   0, /*tp_alloc*/
44929   __pyx_tp_new_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector, /*tp_new*/
44930   0, /*tp_free*/
44931   0, /*tp_is_gc*/
44932   0, /*tp_bases*/
44933   0, /*tp_mro*/
44934   0, /*tp_cache*/
44935   0, /*tp_subclasses*/
44936   0, /*tp_weaklist*/
44937   0, /*tp_del*/
44938   0, /*tp_version_tag*/
44939   #if PY_VERSION_HEX >= 0x030400a1
44940   0, /*tp_finalize*/
44941   #endif
44942   #if PY_VERSION_HEX >= 0x030800b1
44943   0, /*tp_vectorcall*/
44944   #endif
44945 };
44946 static struct __pyx_vtabstruct_array __pyx_vtable_array;
44947 
__pyx_tp_new_array(PyTypeObject * t,PyObject * a,PyObject * k)44948 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
44949   struct __pyx_array_obj *p;
44950   PyObject *o;
44951   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
44952     o = (*t->tp_alloc)(t, 0);
44953   } else {
44954     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
44955   }
44956   if (unlikely(!o)) return 0;
44957   p = ((struct __pyx_array_obj *)o);
44958   p->__pyx_vtab = __pyx_vtabptr_array;
44959   p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
44960   p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
44961   if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
44962   return o;
44963   bad:
44964   Py_DECREF(o); o = 0;
44965   return NULL;
44966 }
44967 
__pyx_tp_dealloc_array(PyObject * o)44968 static void __pyx_tp_dealloc_array(PyObject *o) {
44969   struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
44970   #if CYTHON_USE_TP_FINALIZE
44971   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))) {
44972     if (PyObject_CallFinalizerFromDealloc(o)) return;
44973   }
44974   #endif
44975   {
44976     PyObject *etype, *eval, *etb;
44977     PyErr_Fetch(&etype, &eval, &etb);
44978     ++Py_REFCNT(o);
44979     __pyx_array___dealloc__(o);
44980     --Py_REFCNT(o);
44981     PyErr_Restore(etype, eval, etb);
44982   }
44983   Py_CLEAR(p->mode);
44984   Py_CLEAR(p->_format);
44985   (*Py_TYPE(o)->tp_free)(o);
44986 }
__pyx_sq_item_array(PyObject * o,Py_ssize_t i)44987 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
44988   PyObject *r;
44989   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
44990   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
44991   Py_DECREF(x);
44992   return r;
44993 }
44994 
__pyx_mp_ass_subscript_array(PyObject * o,PyObject * i,PyObject * v)44995 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
44996   if (v) {
44997     return __pyx_array___setitem__(o, i, v);
44998   }
44999   else {
45000     PyErr_Format(PyExc_NotImplementedError,
45001       "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
45002     return -1;
45003   }
45004 }
45005 
__pyx_tp_getattro_array(PyObject * o,PyObject * n)45006 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
45007   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
45008   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
45009     PyErr_Clear();
45010     v = __pyx_array___getattr__(o, n);
45011   }
45012   return v;
45013 }
45014 
__pyx_getprop___pyx_array_memview(PyObject * o,CYTHON_UNUSED void * x)45015 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
45016   return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
45017 }
45018 
45019 static PyMethodDef __pyx_methods_array[] = {
45020   {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
45021   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
45022   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
45023   {0, 0, 0, 0}
45024 };
45025 
45026 static struct PyGetSetDef __pyx_getsets_array[] = {
45027   {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
45028   {0, 0, 0, 0, 0}
45029 };
45030 
45031 static PySequenceMethods __pyx_tp_as_sequence_array = {
45032   __pyx_array___len__, /*sq_length*/
45033   0, /*sq_concat*/
45034   0, /*sq_repeat*/
45035   __pyx_sq_item_array, /*sq_item*/
45036   0, /*sq_slice*/
45037   0, /*sq_ass_item*/
45038   0, /*sq_ass_slice*/
45039   0, /*sq_contains*/
45040   0, /*sq_inplace_concat*/
45041   0, /*sq_inplace_repeat*/
45042 };
45043 
45044 static PyMappingMethods __pyx_tp_as_mapping_array = {
45045   __pyx_array___len__, /*mp_length*/
45046   __pyx_array___getitem__, /*mp_subscript*/
45047   __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
45048 };
45049 
45050 static PyBufferProcs __pyx_tp_as_buffer_array = {
45051   #if PY_MAJOR_VERSION < 3
45052   0, /*bf_getreadbuffer*/
45053   #endif
45054   #if PY_MAJOR_VERSION < 3
45055   0, /*bf_getwritebuffer*/
45056   #endif
45057   #if PY_MAJOR_VERSION < 3
45058   0, /*bf_getsegcount*/
45059   #endif
45060   #if PY_MAJOR_VERSION < 3
45061   0, /*bf_getcharbuffer*/
45062   #endif
45063   __pyx_array_getbuffer, /*bf_getbuffer*/
45064   0, /*bf_releasebuffer*/
45065 };
45066 
45067 static PyTypeObject __pyx_type___pyx_array = {
45068   PyVarObject_HEAD_INIT(0, 0)
45069   "yt.utilities.lib.ewah_bool_wrap.array", /*tp_name*/
45070   sizeof(struct __pyx_array_obj), /*tp_basicsize*/
45071   0, /*tp_itemsize*/
45072   __pyx_tp_dealloc_array, /*tp_dealloc*/
45073   0, /*tp_print*/
45074   0, /*tp_getattr*/
45075   0, /*tp_setattr*/
45076   #if PY_MAJOR_VERSION < 3
45077   0, /*tp_compare*/
45078   #endif
45079   #if PY_MAJOR_VERSION >= 3
45080   0, /*tp_as_async*/
45081   #endif
45082   0, /*tp_repr*/
45083   0, /*tp_as_number*/
45084   &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
45085   &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
45086   0, /*tp_hash*/
45087   0, /*tp_call*/
45088   0, /*tp_str*/
45089   __pyx_tp_getattro_array, /*tp_getattro*/
45090   0, /*tp_setattro*/
45091   &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
45092   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
45093   0, /*tp_doc*/
45094   0, /*tp_traverse*/
45095   0, /*tp_clear*/
45096   0, /*tp_richcompare*/
45097   0, /*tp_weaklistoffset*/
45098   0, /*tp_iter*/
45099   0, /*tp_iternext*/
45100   __pyx_methods_array, /*tp_methods*/
45101   0, /*tp_members*/
45102   __pyx_getsets_array, /*tp_getset*/
45103   0, /*tp_base*/
45104   0, /*tp_dict*/
45105   0, /*tp_descr_get*/
45106   0, /*tp_descr_set*/
45107   0, /*tp_dictoffset*/
45108   0, /*tp_init*/
45109   0, /*tp_alloc*/
45110   __pyx_tp_new_array, /*tp_new*/
45111   0, /*tp_free*/
45112   0, /*tp_is_gc*/
45113   0, /*tp_bases*/
45114   0, /*tp_mro*/
45115   0, /*tp_cache*/
45116   0, /*tp_subclasses*/
45117   0, /*tp_weaklist*/
45118   0, /*tp_del*/
45119   0, /*tp_version_tag*/
45120   #if PY_VERSION_HEX >= 0x030400a1
45121   0, /*tp_finalize*/
45122   #endif
45123   #if PY_VERSION_HEX >= 0x030800b1
45124   0, /*tp_vectorcall*/
45125   #endif
45126 };
45127 
__pyx_tp_new_Enum(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)45128 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
45129   struct __pyx_MemviewEnum_obj *p;
45130   PyObject *o;
45131   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
45132     o = (*t->tp_alloc)(t, 0);
45133   } else {
45134     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
45135   }
45136   if (unlikely(!o)) return 0;
45137   p = ((struct __pyx_MemviewEnum_obj *)o);
45138   p->name = Py_None; Py_INCREF(Py_None);
45139   return o;
45140 }
45141 
__pyx_tp_dealloc_Enum(PyObject * o)45142 static void __pyx_tp_dealloc_Enum(PyObject *o) {
45143   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
45144   #if CYTHON_USE_TP_FINALIZE
45145   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
45146     if (PyObject_CallFinalizerFromDealloc(o)) return;
45147   }
45148   #endif
45149   PyObject_GC_UnTrack(o);
45150   Py_CLEAR(p->name);
45151   (*Py_TYPE(o)->tp_free)(o);
45152 }
45153 
__pyx_tp_traverse_Enum(PyObject * o,visitproc v,void * a)45154 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
45155   int e;
45156   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
45157   if (p->name) {
45158     e = (*v)(p->name, a); if (e) return e;
45159   }
45160   return 0;
45161 }
45162 
__pyx_tp_clear_Enum(PyObject * o)45163 static int __pyx_tp_clear_Enum(PyObject *o) {
45164   PyObject* tmp;
45165   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
45166   tmp = ((PyObject*)p->name);
45167   p->name = Py_None; Py_INCREF(Py_None);
45168   Py_XDECREF(tmp);
45169   return 0;
45170 }
45171 
45172 static PyMethodDef __pyx_methods_Enum[] = {
45173   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
45174   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
45175   {0, 0, 0, 0}
45176 };
45177 
45178 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
45179   PyVarObject_HEAD_INIT(0, 0)
45180   "yt.utilities.lib.ewah_bool_wrap.Enum", /*tp_name*/
45181   sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
45182   0, /*tp_itemsize*/
45183   __pyx_tp_dealloc_Enum, /*tp_dealloc*/
45184   0, /*tp_print*/
45185   0, /*tp_getattr*/
45186   0, /*tp_setattr*/
45187   #if PY_MAJOR_VERSION < 3
45188   0, /*tp_compare*/
45189   #endif
45190   #if PY_MAJOR_VERSION >= 3
45191   0, /*tp_as_async*/
45192   #endif
45193   __pyx_MemviewEnum___repr__, /*tp_repr*/
45194   0, /*tp_as_number*/
45195   0, /*tp_as_sequence*/
45196   0, /*tp_as_mapping*/
45197   0, /*tp_hash*/
45198   0, /*tp_call*/
45199   0, /*tp_str*/
45200   0, /*tp_getattro*/
45201   0, /*tp_setattro*/
45202   0, /*tp_as_buffer*/
45203   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
45204   0, /*tp_doc*/
45205   __pyx_tp_traverse_Enum, /*tp_traverse*/
45206   __pyx_tp_clear_Enum, /*tp_clear*/
45207   0, /*tp_richcompare*/
45208   0, /*tp_weaklistoffset*/
45209   0, /*tp_iter*/
45210   0, /*tp_iternext*/
45211   __pyx_methods_Enum, /*tp_methods*/
45212   0, /*tp_members*/
45213   0, /*tp_getset*/
45214   0, /*tp_base*/
45215   0, /*tp_dict*/
45216   0, /*tp_descr_get*/
45217   0, /*tp_descr_set*/
45218   0, /*tp_dictoffset*/
45219   __pyx_MemviewEnum___init__, /*tp_init*/
45220   0, /*tp_alloc*/
45221   __pyx_tp_new_Enum, /*tp_new*/
45222   0, /*tp_free*/
45223   0, /*tp_is_gc*/
45224   0, /*tp_bases*/
45225   0, /*tp_mro*/
45226   0, /*tp_cache*/
45227   0, /*tp_subclasses*/
45228   0, /*tp_weaklist*/
45229   0, /*tp_del*/
45230   0, /*tp_version_tag*/
45231   #if PY_VERSION_HEX >= 0x030400a1
45232   0, /*tp_finalize*/
45233   #endif
45234   #if PY_VERSION_HEX >= 0x030800b1
45235   0, /*tp_vectorcall*/
45236   #endif
45237 };
45238 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
45239 
__pyx_tp_new_memoryview(PyTypeObject * t,PyObject * a,PyObject * k)45240 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
45241   struct __pyx_memoryview_obj *p;
45242   PyObject *o;
45243   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
45244     o = (*t->tp_alloc)(t, 0);
45245   } else {
45246     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
45247   }
45248   if (unlikely(!o)) return 0;
45249   p = ((struct __pyx_memoryview_obj *)o);
45250   p->__pyx_vtab = __pyx_vtabptr_memoryview;
45251   p->obj = Py_None; Py_INCREF(Py_None);
45252   p->_size = Py_None; Py_INCREF(Py_None);
45253   p->_array_interface = Py_None; Py_INCREF(Py_None);
45254   p->view.obj = NULL;
45255   if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
45256   return o;
45257   bad:
45258   Py_DECREF(o); o = 0;
45259   return NULL;
45260 }
45261 
__pyx_tp_dealloc_memoryview(PyObject * o)45262 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
45263   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
45264   #if CYTHON_USE_TP_FINALIZE
45265   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
45266     if (PyObject_CallFinalizerFromDealloc(o)) return;
45267   }
45268   #endif
45269   PyObject_GC_UnTrack(o);
45270   {
45271     PyObject *etype, *eval, *etb;
45272     PyErr_Fetch(&etype, &eval, &etb);
45273     ++Py_REFCNT(o);
45274     __pyx_memoryview___dealloc__(o);
45275     --Py_REFCNT(o);
45276     PyErr_Restore(etype, eval, etb);
45277   }
45278   Py_CLEAR(p->obj);
45279   Py_CLEAR(p->_size);
45280   Py_CLEAR(p->_array_interface);
45281   (*Py_TYPE(o)->tp_free)(o);
45282 }
45283 
__pyx_tp_traverse_memoryview(PyObject * o,visitproc v,void * a)45284 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
45285   int e;
45286   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
45287   if (p->obj) {
45288     e = (*v)(p->obj, a); if (e) return e;
45289   }
45290   if (p->_size) {
45291     e = (*v)(p->_size, a); if (e) return e;
45292   }
45293   if (p->_array_interface) {
45294     e = (*v)(p->_array_interface, a); if (e) return e;
45295   }
45296   if (p->view.obj) {
45297     e = (*v)(p->view.obj, a); if (e) return e;
45298   }
45299   return 0;
45300 }
45301 
__pyx_tp_clear_memoryview(PyObject * o)45302 static int __pyx_tp_clear_memoryview(PyObject *o) {
45303   PyObject* tmp;
45304   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
45305   tmp = ((PyObject*)p->obj);
45306   p->obj = Py_None; Py_INCREF(Py_None);
45307   Py_XDECREF(tmp);
45308   tmp = ((PyObject*)p->_size);
45309   p->_size = Py_None; Py_INCREF(Py_None);
45310   Py_XDECREF(tmp);
45311   tmp = ((PyObject*)p->_array_interface);
45312   p->_array_interface = Py_None; Py_INCREF(Py_None);
45313   Py_XDECREF(tmp);
45314   Py_CLEAR(p->view.obj);
45315   return 0;
45316 }
__pyx_sq_item_memoryview(PyObject * o,Py_ssize_t i)45317 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
45318   PyObject *r;
45319   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
45320   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
45321   Py_DECREF(x);
45322   return r;
45323 }
45324 
__pyx_mp_ass_subscript_memoryview(PyObject * o,PyObject * i,PyObject * v)45325 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
45326   if (v) {
45327     return __pyx_memoryview___setitem__(o, i, v);
45328   }
45329   else {
45330     PyErr_Format(PyExc_NotImplementedError,
45331       "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
45332     return -1;
45333   }
45334 }
45335 
__pyx_getprop___pyx_memoryview_T(PyObject * o,CYTHON_UNUSED void * x)45336 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
45337   return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
45338 }
45339 
__pyx_getprop___pyx_memoryview_base(PyObject * o,CYTHON_UNUSED void * x)45340 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
45341   return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
45342 }
45343 
__pyx_getprop___pyx_memoryview_shape(PyObject * o,CYTHON_UNUSED void * x)45344 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
45345   return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
45346 }
45347 
__pyx_getprop___pyx_memoryview_strides(PyObject * o,CYTHON_UNUSED void * x)45348 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
45349   return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
45350 }
45351 
__pyx_getprop___pyx_memoryview_suboffsets(PyObject * o,CYTHON_UNUSED void * x)45352 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
45353   return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
45354 }
45355 
__pyx_getprop___pyx_memoryview_ndim(PyObject * o,CYTHON_UNUSED void * x)45356 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
45357   return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
45358 }
45359 
__pyx_getprop___pyx_memoryview_itemsize(PyObject * o,CYTHON_UNUSED void * x)45360 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
45361   return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
45362 }
45363 
__pyx_getprop___pyx_memoryview_nbytes(PyObject * o,CYTHON_UNUSED void * x)45364 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
45365   return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
45366 }
45367 
__pyx_getprop___pyx_memoryview_size(PyObject * o,CYTHON_UNUSED void * x)45368 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
45369   return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
45370 }
45371 
45372 static PyMethodDef __pyx_methods_memoryview[] = {
45373   {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
45374   {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
45375   {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
45376   {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
45377   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
45378   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
45379   {0, 0, 0, 0}
45380 };
45381 
45382 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
45383   {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
45384   {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
45385   {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
45386   {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
45387   {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
45388   {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
45389   {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
45390   {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
45391   {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
45392   {0, 0, 0, 0, 0}
45393 };
45394 
45395 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
45396   __pyx_memoryview___len__, /*sq_length*/
45397   0, /*sq_concat*/
45398   0, /*sq_repeat*/
45399   __pyx_sq_item_memoryview, /*sq_item*/
45400   0, /*sq_slice*/
45401   0, /*sq_ass_item*/
45402   0, /*sq_ass_slice*/
45403   0, /*sq_contains*/
45404   0, /*sq_inplace_concat*/
45405   0, /*sq_inplace_repeat*/
45406 };
45407 
45408 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
45409   __pyx_memoryview___len__, /*mp_length*/
45410   __pyx_memoryview___getitem__, /*mp_subscript*/
45411   __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
45412 };
45413 
45414 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
45415   #if PY_MAJOR_VERSION < 3
45416   0, /*bf_getreadbuffer*/
45417   #endif
45418   #if PY_MAJOR_VERSION < 3
45419   0, /*bf_getwritebuffer*/
45420   #endif
45421   #if PY_MAJOR_VERSION < 3
45422   0, /*bf_getsegcount*/
45423   #endif
45424   #if PY_MAJOR_VERSION < 3
45425   0, /*bf_getcharbuffer*/
45426   #endif
45427   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
45428   0, /*bf_releasebuffer*/
45429 };
45430 
45431 static PyTypeObject __pyx_type___pyx_memoryview = {
45432   PyVarObject_HEAD_INIT(0, 0)
45433   "yt.utilities.lib.ewah_bool_wrap.memoryview", /*tp_name*/
45434   sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
45435   0, /*tp_itemsize*/
45436   __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
45437   0, /*tp_print*/
45438   0, /*tp_getattr*/
45439   0, /*tp_setattr*/
45440   #if PY_MAJOR_VERSION < 3
45441   0, /*tp_compare*/
45442   #endif
45443   #if PY_MAJOR_VERSION >= 3
45444   0, /*tp_as_async*/
45445   #endif
45446   __pyx_memoryview___repr__, /*tp_repr*/
45447   0, /*tp_as_number*/
45448   &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
45449   &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
45450   0, /*tp_hash*/
45451   0, /*tp_call*/
45452   __pyx_memoryview___str__, /*tp_str*/
45453   0, /*tp_getattro*/
45454   0, /*tp_setattro*/
45455   &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
45456   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
45457   0, /*tp_doc*/
45458   __pyx_tp_traverse_memoryview, /*tp_traverse*/
45459   __pyx_tp_clear_memoryview, /*tp_clear*/
45460   0, /*tp_richcompare*/
45461   0, /*tp_weaklistoffset*/
45462   0, /*tp_iter*/
45463   0, /*tp_iternext*/
45464   __pyx_methods_memoryview, /*tp_methods*/
45465   0, /*tp_members*/
45466   __pyx_getsets_memoryview, /*tp_getset*/
45467   0, /*tp_base*/
45468   0, /*tp_dict*/
45469   0, /*tp_descr_get*/
45470   0, /*tp_descr_set*/
45471   0, /*tp_dictoffset*/
45472   0, /*tp_init*/
45473   0, /*tp_alloc*/
45474   __pyx_tp_new_memoryview, /*tp_new*/
45475   0, /*tp_free*/
45476   0, /*tp_is_gc*/
45477   0, /*tp_bases*/
45478   0, /*tp_mro*/
45479   0, /*tp_cache*/
45480   0, /*tp_subclasses*/
45481   0, /*tp_weaklist*/
45482   0, /*tp_del*/
45483   0, /*tp_version_tag*/
45484   #if PY_VERSION_HEX >= 0x030400a1
45485   0, /*tp_finalize*/
45486   #endif
45487   #if PY_VERSION_HEX >= 0x030800b1
45488   0, /*tp_vectorcall*/
45489   #endif
45490 };
45491 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
45492 
__pyx_tp_new__memoryviewslice(PyTypeObject * t,PyObject * a,PyObject * k)45493 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
45494   struct __pyx_memoryviewslice_obj *p;
45495   PyObject *o = __pyx_tp_new_memoryview(t, a, k);
45496   if (unlikely(!o)) return 0;
45497   p = ((struct __pyx_memoryviewslice_obj *)o);
45498   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
45499   p->from_object = Py_None; Py_INCREF(Py_None);
45500   p->from_slice.memview = NULL;
45501   return o;
45502 }
45503 
__pyx_tp_dealloc__memoryviewslice(PyObject * o)45504 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
45505   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
45506   #if CYTHON_USE_TP_FINALIZE
45507   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
45508     if (PyObject_CallFinalizerFromDealloc(o)) return;
45509   }
45510   #endif
45511   PyObject_GC_UnTrack(o);
45512   {
45513     PyObject *etype, *eval, *etb;
45514     PyErr_Fetch(&etype, &eval, &etb);
45515     ++Py_REFCNT(o);
45516     __pyx_memoryviewslice___dealloc__(o);
45517     --Py_REFCNT(o);
45518     PyErr_Restore(etype, eval, etb);
45519   }
45520   Py_CLEAR(p->from_object);
45521   PyObject_GC_Track(o);
45522   __pyx_tp_dealloc_memoryview(o);
45523 }
45524 
__pyx_tp_traverse__memoryviewslice(PyObject * o,visitproc v,void * a)45525 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
45526   int e;
45527   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
45528   e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
45529   if (p->from_object) {
45530     e = (*v)(p->from_object, a); if (e) return e;
45531   }
45532   return 0;
45533 }
45534 
__pyx_tp_clear__memoryviewslice(PyObject * o)45535 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
45536   PyObject* tmp;
45537   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
45538   __pyx_tp_clear_memoryview(o);
45539   tmp = ((PyObject*)p->from_object);
45540   p->from_object = Py_None; Py_INCREF(Py_None);
45541   Py_XDECREF(tmp);
45542   __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
45543   return 0;
45544 }
45545 
__pyx_getprop___pyx_memoryviewslice_base(PyObject * o,CYTHON_UNUSED void * x)45546 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
45547   return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
45548 }
45549 
45550 static PyMethodDef __pyx_methods__memoryviewslice[] = {
45551   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
45552   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
45553   {0, 0, 0, 0}
45554 };
45555 
45556 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
45557   {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
45558   {0, 0, 0, 0, 0}
45559 };
45560 
45561 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
45562   PyVarObject_HEAD_INIT(0, 0)
45563   "yt.utilities.lib.ewah_bool_wrap._memoryviewslice", /*tp_name*/
45564   sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
45565   0, /*tp_itemsize*/
45566   __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
45567   0, /*tp_print*/
45568   0, /*tp_getattr*/
45569   0, /*tp_setattr*/
45570   #if PY_MAJOR_VERSION < 3
45571   0, /*tp_compare*/
45572   #endif
45573   #if PY_MAJOR_VERSION >= 3
45574   0, /*tp_as_async*/
45575   #endif
45576   #if CYTHON_COMPILING_IN_PYPY
45577   __pyx_memoryview___repr__, /*tp_repr*/
45578   #else
45579   0, /*tp_repr*/
45580   #endif
45581   0, /*tp_as_number*/
45582   0, /*tp_as_sequence*/
45583   0, /*tp_as_mapping*/
45584   0, /*tp_hash*/
45585   0, /*tp_call*/
45586   #if CYTHON_COMPILING_IN_PYPY
45587   __pyx_memoryview___str__, /*tp_str*/
45588   #else
45589   0, /*tp_str*/
45590   #endif
45591   0, /*tp_getattro*/
45592   0, /*tp_setattro*/
45593   0, /*tp_as_buffer*/
45594   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
45595   "Internal class for passing memoryview slices to Python", /*tp_doc*/
45596   __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
45597   __pyx_tp_clear__memoryviewslice, /*tp_clear*/
45598   0, /*tp_richcompare*/
45599   0, /*tp_weaklistoffset*/
45600   0, /*tp_iter*/
45601   0, /*tp_iternext*/
45602   __pyx_methods__memoryviewslice, /*tp_methods*/
45603   0, /*tp_members*/
45604   __pyx_getsets__memoryviewslice, /*tp_getset*/
45605   0, /*tp_base*/
45606   0, /*tp_dict*/
45607   0, /*tp_descr_get*/
45608   0, /*tp_descr_set*/
45609   0, /*tp_dictoffset*/
45610   0, /*tp_init*/
45611   0, /*tp_alloc*/
45612   __pyx_tp_new__memoryviewslice, /*tp_new*/
45613   0, /*tp_free*/
45614   0, /*tp_is_gc*/
45615   0, /*tp_bases*/
45616   0, /*tp_mro*/
45617   0, /*tp_cache*/
45618   0, /*tp_subclasses*/
45619   0, /*tp_weaklist*/
45620   0, /*tp_del*/
45621   0, /*tp_version_tag*/
45622   #if PY_VERSION_HEX >= 0x030400a1
45623   0, /*tp_finalize*/
45624   #endif
45625   #if PY_VERSION_HEX >= 0x030800b1
45626   0, /*tp_vectorcall*/
45627   #endif
45628 };
45629 
45630 static PyMethodDef __pyx_methods[] = {
45631   {0, 0, 0, 0}
45632 };
45633 
45634 #if PY_MAJOR_VERSION >= 3
45635 #if CYTHON_PEP489_MULTI_PHASE_INIT
45636 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
45637 static int __pyx_pymod_exec_ewah_bool_wrap(PyObject* module); /*proto*/
45638 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
45639   {Py_mod_create, (void*)__pyx_pymod_create},
45640   {Py_mod_exec, (void*)__pyx_pymod_exec_ewah_bool_wrap},
45641   {0, NULL}
45642 };
45643 #endif
45644 
45645 static struct PyModuleDef __pyx_moduledef = {
45646     PyModuleDef_HEAD_INIT,
45647     "ewah_bool_wrap",
45648     __pyx_k_Wrapper_for_EWAH_Bool_Array_htt, /* m_doc */
45649   #if CYTHON_PEP489_MULTI_PHASE_INIT
45650     0, /* m_size */
45651   #else
45652     -1, /* m_size */
45653   #endif
45654     __pyx_methods /* m_methods */,
45655   #if CYTHON_PEP489_MULTI_PHASE_INIT
45656     __pyx_moduledef_slots, /* m_slots */
45657   #else
45658     NULL, /* m_reload */
45659   #endif
45660     NULL, /* m_traverse */
45661     NULL, /* m_clear */
45662     NULL /* m_free */
45663 };
45664 #endif
45665 #ifndef CYTHON_SMALL_CODE
45666 #if defined(__clang__)
45667     #define CYTHON_SMALL_CODE
45668 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
45669     #define CYTHON_SMALL_CODE __attribute__((cold))
45670 #else
45671     #define CYTHON_SMALL_CODE
45672 #endif
45673 #endif
45674 
45675 static __Pyx_StringTabEntry __pyx_string_tab[] = {
45676   {&__pyx_kp_s_10d_10d_collisions_at_coarse_re, __pyx_k_10d_10d_collisions_at_coarse_re, sizeof(__pyx_k_10d_10d_collisions_at_coarse_re), 0, 0, 1, 0},
45677   {&__pyx_kp_s_10d_10d_collisions_at_refined_r, __pyx_k_10d_10d_collisions_at_refined_r, sizeof(__pyx_k_10d_10d_collisions_at_refined_r), 0, 0, 1, 0},
45678   {&__pyx_kp_s_8d_coarse_8d_refined_8d_total, __pyx_k_8d_coarse_8d_refined_8d_total, sizeof(__pyx_k_8d_coarse_8d_refined_8d_total), 0, 0, 1, 0},
45679   {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
45680   {&__pyx_n_s_BoolArrayCollection, __pyx_k_BoolArrayCollection, sizeof(__pyx_k_BoolArrayCollection), 0, 0, 1, 1},
45681   {&__pyx_n_s_BoolArrayCollectionUncompressed, __pyx_k_BoolArrayCollectionUncompressed, sizeof(__pyx_k_BoolArrayCollectionUncompressed), 0, 0, 1, 1},
45682   {&__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},
45683   {&__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},
45684   {&__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},
45685   {&__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},
45686   {&__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},
45687   {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
45688   {&__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},
45689   {&__pyx_kp_s_Error_in_read_File_indicates_ref, __pyx_k_Error_in_read_File_indicates_ref, sizeof(__pyx_k_Error_in_read_File_indicates_ref), 0, 0, 1, 0},
45690   {&__pyx_n_s_FileBitmasks, __pyx_k_FileBitmasks, sizeof(__pyx_k_FileBitmasks), 0, 0, 1, 1},
45691   {&__pyx_kp_s_File_There_are_refined_cells_tha, __pyx_k_File_There_are_refined_cells_tha, sizeof(__pyx_k_File_There_are_refined_cells_tha), 0, 0, 1, 0},
45692   {&__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},
45693   {&__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},
45694   {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
45695   {&__pyx_kp_s_Incompatible_checksums_s_vs_0x5f, __pyx_k_Incompatible_checksums_s_vs_0x5f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x5f), 0, 0, 1, 0},
45696   {&__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},
45697   {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
45698   {&__pyx_kp_s_Index_exceedes_max, __pyx_k_Index_exceedes_max, sizeof(__pyx_k_Index_exceedes_max), 0, 0, 1, 0},
45699   {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
45700   {&__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},
45701   {&__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},
45702   {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
45703   {&__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},
45704   {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
45705   {&__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},
45706   {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
45707   {&__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},
45708   {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
45709   {&__pyx_n_s_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 0, 1, 1},
45710   {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
45711   {&__pyx_kp_s_Set_from_s_array_and_ended_up_wi, __pyx_k_Set_from_s_array_and_ended_up_wi, sizeof(__pyx_k_Set_from_s_array_and_ended_up_wi), 0, 0, 1, 0},
45712   {&__pyx_n_s_SparseUnorderedBitmaskSet, __pyx_k_SparseUnorderedBitmaskSet, sizeof(__pyx_k_SparseUnorderedBitmaskSet), 0, 0, 1, 1},
45713   {&__pyx_n_s_SparseUnorderedBitmaskVector, __pyx_k_SparseUnorderedBitmaskVector, sizeof(__pyx_k_SparseUnorderedBitmaskVector), 0, 0, 1, 1},
45714   {&__pyx_n_s_SparseUnorderedRefinedBitmaskSet, __pyx_k_SparseUnorderedRefinedBitmaskSet, sizeof(__pyx_k_SparseUnorderedRefinedBitmaskSet), 0, 0, 1, 1},
45715   {&__pyx_n_s_SparseUnorderedRefinedBitmaskVec, __pyx_k_SparseUnorderedRefinedBitmaskVec, sizeof(__pyx_k_SparseUnorderedRefinedBitmaskVec), 0, 0, 1, 1},
45716   {&__pyx_kp_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 0},
45717   {&__pyx_kp_s_There_are_refined_cells_that_are, __pyx_k_There_are_refined_cells_that_are, sizeof(__pyx_k_There_are_refined_cells_that_are), 0, 0, 1, 0},
45718   {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
45719   {&__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},
45720   {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
45721   {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
45722   {&__pyx_kp_b__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 0, 0, 0},
45723   {&__pyx_kp_b__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 0, 0, 0},
45724   {&__pyx_kp_b__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 0, 0, 0},
45725   {&__pyx_kp_b__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 0, 0},
45726   {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
45727   {&__pyx_kp_u__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 1, 0, 0},
45728   {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
45729   {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1},
45730   {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
45731   {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
45732   {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
45733   {&__pyx_n_s_calcsize, __pyx_k_calcsize, sizeof(__pyx_k_calcsize), 0, 0, 1, 1},
45734   {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
45735   {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
45736   {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
45737   {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
45738   {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
45739   {&__pyx_n_s_dealloc, __pyx_k_dealloc, sizeof(__pyx_k_dealloc), 0, 0, 1, 1},
45740   {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
45741   {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
45742   {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
45743   {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
45744   {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
45745   {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
45746   {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
45747   {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
45748   {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
45749   {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
45750   {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
45751   {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
45752   {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
45753   {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
45754   {&__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},
45755   {&__pyx_n_s_i1, __pyx_k_i1, sizeof(__pyx_k_i1), 0, 0, 1, 1},
45756   {&__pyx_n_s_i2, __pyx_k_i2, sizeof(__pyx_k_i2), 0, 0, 1, 1},
45757   {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
45758   {&__pyx_n_s_ifile, __pyx_k_ifile, sizeof(__pyx_k_ifile), 0, 0, 1, 1},
45759   {&__pyx_n_s_imax, __pyx_k_imax, sizeof(__pyx_k_imax), 0, 0, 1, 1},
45760   {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
45761   {&__pyx_n_s_ind1, __pyx_k_ind1, sizeof(__pyx_k_ind1), 0, 0, 1, 1},
45762   {&__pyx_n_s_ind2, __pyx_k_ind2, sizeof(__pyx_k_ind2), 0, 0, 1, 1},
45763   {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
45764   {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
45765   {&__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},
45766   {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
45767   {&__pyx_n_s_lexsort, __pyx_k_lexsort, sizeof(__pyx_k_lexsort), 0, 0, 1, 1},
45768   {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
45769   {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
45770   {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
45771   {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
45772   {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
45773   {&__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},
45774   {&__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},
45775   {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
45776   {&__pyx_n_s_nele1, __pyx_k_nele1, sizeof(__pyx_k_nele1), 0, 0, 1, 1},
45777   {&__pyx_n_s_nele2, __pyx_k_nele2, sizeof(__pyx_k_nele2), 0, 0, 1, 1},
45778   {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
45779   {&__pyx_n_s_nfiles, __pyx_k_nfiles, sizeof(__pyx_k_nfiles), 0, 0, 1, 1},
45780   {&__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},
45781   {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
45782   {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
45783   {&__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},
45784   {&__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},
45785   {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
45786   {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
45787   {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
45788   {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
45789   {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
45790   {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
45791   {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
45792   {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
45793   {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
45794   {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
45795   {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
45796   {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
45797   {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
45798   {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
45799   {&__pyx_n_s_pyx_unpickle_SparseUnorderedBi, __pyx_k_pyx_unpickle_SparseUnorderedBi, sizeof(__pyx_k_pyx_unpickle_SparseUnorderedBi), 0, 0, 1, 1},
45800   {&__pyx_n_s_pyx_unpickle_SparseUnorderedRe, __pyx_k_pyx_unpickle_SparseUnorderedRe, sizeof(__pyx_k_pyx_unpickle_SparseUnorderedRe), 0, 0, 1, 1},
45801   {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
45802   {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
45803   {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1},
45804   {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
45805   {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
45806   {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
45807   {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
45808   {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
45809   {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
45810   {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
45811   {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
45812   {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
45813   {&__pyx_n_s_solf, __pyx_k_solf, sizeof(__pyx_k_solf), 0, 0, 1, 1},
45814   {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
45815   {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
45816   {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
45817   {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
45818   {&__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},
45819   {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
45820   {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
45821   {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
45822   {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
45823   {&__pyx_n_s_uint64, __pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 0, 1, 1},
45824   {&__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},
45825   {&__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},
45826   {&__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},
45827   {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
45828   {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
45829   {&__pyx_n_s_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 0, 1, 1},
45830   {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
45831   {&__pyx_n_s_yt_utilities_lib_ewah_bool_wrap, __pyx_k_yt_utilities_lib_ewah_bool_wrap, sizeof(__pyx_k_yt_utilities_lib_ewah_bool_wrap), 0, 0, 1, 1},
45832   {0, 0, 0, 0, 0, 0, 0}
45833 };
__Pyx_InitCachedBuiltins(void)45834 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
45835   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 48, __pyx_L1_error)
45836   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 301, __pyx_L1_error)
45837   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
45838   __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 728, __pyx_L1_error)
45839   __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 1271, __pyx_L1_error)
45840   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error)
45841   __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error)
45842   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 148, __pyx_L1_error)
45843   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 151, __pyx_L1_error)
45844   __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 400, __pyx_L1_error)
45845   __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 609, __pyx_L1_error)
45846   return 0;
45847   __pyx_L1_error:;
45848   return -1;
45849 }
45850 
__Pyx_InitCachedConstants(void)45851 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
45852   __Pyx_RefNannyDeclarations
45853   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
45854 
45855   /* "yt/utilities/lib/ewah_bool_wrap.pyx":166
45856  *         if coll_refn[0].numberOfOnes() == 0:
45857  *             if verbose == 1:
45858  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))             # <<<<<<<<<<<<<<
45859  *             return (0,0)
45860  *         coll_coll = <cmap[np.uint64_t, ewah_bool_array]*> coll.ewah_coll
45861  */
45862   __pyx_tuple_ = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 166, __pyx_L1_error)
45863   __Pyx_GOTREF(__pyx_tuple_);
45864   __Pyx_GIVEREF(__pyx_tuple_);
45865 
45866   /* "yt/utilities/lib/ewah_bool_wrap.pyx":167
45867  *             if verbose == 1:
45868  *                 print("{: 10d}/{: 10d} collisions at refined refinement. ({: 10.5f}%)".format(0,0,0))
45869  *             return (0,0)             # <<<<<<<<<<<<<<
45870  *         coll_coll = <cmap[np.uint64_t, ewah_bool_array]*> coll.ewah_coll
45871  *         for ifile in range(self.nfiles):
45872  */
45873   __pyx_tuple__2 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 167, __pyx_L1_error)
45874   __Pyx_GOTREF(__pyx_tuple__2);
45875   __Pyx_GIVEREF(__pyx_tuple__2);
45876 
45877   /* "(tree fragment)":2
45878  * def __reduce_cython__(self):
45879  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45880  * def __setstate_cython__(self, __pyx_state):
45881  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45882  */
45883   __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 2, __pyx_L1_error)
45884   __Pyx_GOTREF(__pyx_tuple__6);
45885   __Pyx_GIVEREF(__pyx_tuple__6);
45886 
45887   /* "(tree fragment)":4
45888  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45889  * def __setstate_cython__(self, __pyx_state):
45890  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45891  */
45892   __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 4, __pyx_L1_error)
45893   __Pyx_GOTREF(__pyx_tuple__7);
45894   __Pyx_GIVEREF(__pyx_tuple__7);
45895 
45896   /* "(tree fragment)":2
45897  * def __reduce_cython__(self):
45898  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45899  * def __setstate_cython__(self, __pyx_state):
45900  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45901  */
45902   __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 2, __pyx_L1_error)
45903   __Pyx_GOTREF(__pyx_tuple__12);
45904   __Pyx_GIVEREF(__pyx_tuple__12);
45905 
45906   /* "(tree fragment)":4
45907  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45908  * def __setstate_cython__(self, __pyx_state):
45909  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45910  */
45911   __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 4, __pyx_L1_error)
45912   __Pyx_GOTREF(__pyx_tuple__13);
45913   __Pyx_GIVEREF(__pyx_tuple__13);
45914 
45915   /* "(tree fragment)":2
45916  * def __reduce_cython__(self):
45917  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45918  * def __setstate_cython__(self, __pyx_state):
45919  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45920  */
45921   __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 2, __pyx_L1_error)
45922   __Pyx_GOTREF(__pyx_tuple__16);
45923   __Pyx_GIVEREF(__pyx_tuple__16);
45924 
45925   /* "(tree fragment)":4
45926  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45927  * def __setstate_cython__(self, __pyx_state):
45928  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45929  */
45930   __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 4, __pyx_L1_error)
45931   __Pyx_GOTREF(__pyx_tuple__17);
45932   __Pyx_GIVEREF(__pyx_tuple__17);
45933 
45934   /* "(tree fragment)":2
45935  * def __reduce_cython__(self):
45936  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45937  * def __setstate_cython__(self, __pyx_state):
45938  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45939  */
45940   __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 2, __pyx_L1_error)
45941   __Pyx_GOTREF(__pyx_tuple__18);
45942   __Pyx_GIVEREF(__pyx_tuple__18);
45943 
45944   /* "(tree fragment)":4
45945  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45946  * def __setstate_cython__(self, __pyx_state):
45947  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45948  */
45949   __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 4, __pyx_L1_error)
45950   __Pyx_GOTREF(__pyx_tuple__19);
45951   __Pyx_GIVEREF(__pyx_tuple__19);
45952 
45953   /* "(tree fragment)":2
45954  * def __reduce_cython__(self):
45955  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45956  * def __setstate_cython__(self, __pyx_state):
45957  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45958  */
45959   __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 2, __pyx_L1_error)
45960   __Pyx_GOTREF(__pyx_tuple__20);
45961   __Pyx_GIVEREF(__pyx_tuple__20);
45962 
45963   /* "(tree fragment)":4
45964  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
45965  * def __setstate_cython__(self, __pyx_state):
45966  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
45967  */
45968   __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 4, __pyx_L1_error)
45969   __Pyx_GOTREF(__pyx_tuple__21);
45970   __Pyx_GIVEREF(__pyx_tuple__21);
45971 
45972   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272
45973  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
45974  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
45975  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
45976  *
45977  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
45978  */
45979   __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 272, __pyx_L1_error)
45980   __Pyx_GOTREF(__pyx_tuple__22);
45981   __Pyx_GIVEREF(__pyx_tuple__22);
45982 
45983   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276
45984  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
45985  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
45986  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
45987  *
45988  *             info.buf = PyArray_DATA(self)
45989  */
45990   __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(2, 276, __pyx_L1_error)
45991   __Pyx_GOTREF(__pyx_tuple__23);
45992   __Pyx_GIVEREF(__pyx_tuple__23);
45993 
45994   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306
45995  *                 if ((descr.byteorder == c'>' and little_endian) or
45996  *                     (descr.byteorder == c'<' and not little_endian)):
45997  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
45998  *                 if   t == NPY_BYTE:        f = "b"
45999  *                 elif t == NPY_UBYTE:       f = "B"
46000  */
46001   __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(2, 306, __pyx_L1_error)
46002   __Pyx_GOTREF(__pyx_tuple__24);
46003   __Pyx_GIVEREF(__pyx_tuple__24);
46004 
46005   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856
46006  *
46007  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
46008  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
46009  *
46010  *         if ((child.byteorder == c'>' and little_endian) or
46011  */
46012   __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(2, 856, __pyx_L1_error)
46013   __Pyx_GOTREF(__pyx_tuple__25);
46014   __Pyx_GIVEREF(__pyx_tuple__25);
46015 
46016   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880
46017  *             t = child.type_num
46018  *             if end - f < 5:
46019  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
46020  *
46021  *             # Until ticket #99 is fixed, use integers to avoid warnings
46022  */
46023   __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(2, 880, __pyx_L1_error)
46024   __Pyx_GOTREF(__pyx_tuple__26);
46025   __Pyx_GIVEREF(__pyx_tuple__26);
46026 
46027   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038
46028  *         _import_array()
46029  *     except Exception:
46030  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
46031  *
46032  * cdef inline int import_umath() except -1:
46033  */
46034   __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(2, 1038, __pyx_L1_error)
46035   __Pyx_GOTREF(__pyx_tuple__27);
46036   __Pyx_GIVEREF(__pyx_tuple__27);
46037 
46038   /* "../../../.local/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044
46039  *         _import_umath()
46040  *     except Exception:
46041  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
46042  *
46043  * cdef inline int import_ufunc() except -1:
46044  */
46045   __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(2, 1044, __pyx_L1_error)
46046   __Pyx_GOTREF(__pyx_tuple__28);
46047   __Pyx_GIVEREF(__pyx_tuple__28);
46048 
46049   /* "View.MemoryView":133
46050  *
46051  *         if not self.ndim:
46052  *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
46053  *
46054  *         if itemsize <= 0:
46055  */
46056   __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 133, __pyx_L1_error)
46057   __Pyx_GOTREF(__pyx_tuple__29);
46058   __Pyx_GIVEREF(__pyx_tuple__29);
46059 
46060   /* "View.MemoryView":136
46061  *
46062  *         if itemsize <= 0:
46063  *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
46064  *
46065  *         if not isinstance(format, bytes):
46066  */
46067   __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 136, __pyx_L1_error)
46068   __Pyx_GOTREF(__pyx_tuple__30);
46069   __Pyx_GIVEREF(__pyx_tuple__30);
46070 
46071   /* "View.MemoryView":148
46072  *
46073  *         if not self._shape:
46074  *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
46075  *
46076  *
46077  */
46078   __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 148, __pyx_L1_error)
46079   __Pyx_GOTREF(__pyx_tuple__31);
46080   __Pyx_GIVEREF(__pyx_tuple__31);
46081 
46082   /* "View.MemoryView":176
46083  *             self.data = <char *>malloc(self.len)
46084  *             if not self.data:
46085  *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
46086  *
46087  *             if self.dtype_is_object:
46088  */
46089   __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 176, __pyx_L1_error)
46090   __Pyx_GOTREF(__pyx_tuple__32);
46091   __Pyx_GIVEREF(__pyx_tuple__32);
46092 
46093   /* "View.MemoryView":192
46094  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
46095  *         if not (flags & bufmode):
46096  *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
46097  *         info.buf = self.data
46098  *         info.len = self.len
46099  */
46100   __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 192, __pyx_L1_error)
46101   __Pyx_GOTREF(__pyx_tuple__33);
46102   __Pyx_GIVEREF(__pyx_tuple__33);
46103 
46104   /* "(tree fragment)":2
46105  * def __reduce_cython__(self):
46106  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
46107  * def __setstate_cython__(self, __pyx_state):
46108  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
46109  */
46110   __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 2, __pyx_L1_error)
46111   __Pyx_GOTREF(__pyx_tuple__34);
46112   __Pyx_GIVEREF(__pyx_tuple__34);
46113 
46114   /* "(tree fragment)":4
46115  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
46116  * def __setstate_cython__(self, __pyx_state):
46117  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
46118  */
46119   __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 4, __pyx_L1_error)
46120   __Pyx_GOTREF(__pyx_tuple__35);
46121   __Pyx_GIVEREF(__pyx_tuple__35);
46122 
46123   /* "View.MemoryView":414
46124  *     def __setitem__(memoryview self, object index, object value):
46125  *         if self.view.readonly:
46126  *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
46127  *
46128  *         have_slices, index = _unellipsify(index, self.view.ndim)
46129  */
46130   __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 414, __pyx_L1_error)
46131   __Pyx_GOTREF(__pyx_tuple__36);
46132   __Pyx_GIVEREF(__pyx_tuple__36);
46133 
46134   /* "View.MemoryView":491
46135  *             result = struct.unpack(self.view.format, bytesitem)
46136  *         except struct.error:
46137  *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
46138  *         else:
46139  *             if len(self.view.format) == 1:
46140  */
46141   __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 491, __pyx_L1_error)
46142   __Pyx_GOTREF(__pyx_tuple__37);
46143   __Pyx_GIVEREF(__pyx_tuple__37);
46144 
46145   /* "View.MemoryView":516
46146  *     def __getbuffer__(self, Py_buffer *info, int flags):
46147  *         if flags & PyBUF_WRITABLE and self.view.readonly:
46148  *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
46149  *
46150  *         if flags & PyBUF_ND:
46151  */
46152   __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 516, __pyx_L1_error)
46153   __Pyx_GOTREF(__pyx_tuple__38);
46154   __Pyx_GIVEREF(__pyx_tuple__38);
46155 
46156   /* "View.MemoryView":566
46157  *         if self.view.strides == NULL:
46158  *
46159  *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
46160  *
46161  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
46162  */
46163   __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 566, __pyx_L1_error)
46164   __Pyx_GOTREF(__pyx_tuple__39);
46165   __Pyx_GIVEREF(__pyx_tuple__39);
46166 
46167   /* "View.MemoryView":573
46168  *     def suboffsets(self):
46169  *         if self.view.suboffsets == NULL:
46170  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
46171  *
46172  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
46173  */
46174   __pyx_tuple__40 = PyTuple_New(1); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 573, __pyx_L1_error)
46175   __Pyx_GOTREF(__pyx_tuple__40);
46176   __Pyx_INCREF(__pyx_int_neg_1);
46177   __Pyx_GIVEREF(__pyx_int_neg_1);
46178   PyTuple_SET_ITEM(__pyx_tuple__40, 0, __pyx_int_neg_1);
46179   __Pyx_GIVEREF(__pyx_tuple__40);
46180 
46181   /* "(tree fragment)":2
46182  * def __reduce_cython__(self):
46183  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
46184  * def __setstate_cython__(self, __pyx_state):
46185  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
46186  */
46187   __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 2, __pyx_L1_error)
46188   __Pyx_GOTREF(__pyx_tuple__41);
46189   __Pyx_GIVEREF(__pyx_tuple__41);
46190 
46191   /* "(tree fragment)":4
46192  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
46193  * def __setstate_cython__(self, __pyx_state):
46194  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
46195  */
46196   __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 4, __pyx_L1_error)
46197   __Pyx_GOTREF(__pyx_tuple__42);
46198   __Pyx_GIVEREF(__pyx_tuple__42);
46199 
46200   /* "View.MemoryView":678
46201  *         if item is Ellipsis:
46202  *             if not seen_ellipsis:
46203  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
46204  *                 seen_ellipsis = True
46205  *             else:
46206  */
46207   __pyx_slice__43 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__43)) __PYX_ERR(1, 678, __pyx_L1_error)
46208   __Pyx_GOTREF(__pyx_slice__43);
46209   __Pyx_GIVEREF(__pyx_slice__43);
46210 
46211   /* "View.MemoryView":699
46212  *     for suboffset in suboffsets[:ndim]:
46213  *         if suboffset >= 0:
46214  *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
46215  *
46216  *
46217  */
46218   __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 699, __pyx_L1_error)
46219   __Pyx_GOTREF(__pyx_tuple__44);
46220   __Pyx_GIVEREF(__pyx_tuple__44);
46221 
46222   /* "(tree fragment)":2
46223  * def __reduce_cython__(self):
46224  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
46225  * def __setstate_cython__(self, __pyx_state):
46226  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
46227  */
46228   __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 2, __pyx_L1_error)
46229   __Pyx_GOTREF(__pyx_tuple__45);
46230   __Pyx_GIVEREF(__pyx_tuple__45);
46231 
46232   /* "(tree fragment)":4
46233  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
46234  * def __setstate_cython__(self, __pyx_state):
46235  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
46236  */
46237   __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 4, __pyx_L1_error)
46238   __Pyx_GOTREF(__pyx_tuple__46);
46239   __Pyx_GIVEREF(__pyx_tuple__46);
46240 
46241   /* "(tree fragment)":1
46242  * def __pyx_unpickle_SparseUnorderedBitmaskSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
46243  *     cdef object __pyx_PickleError
46244  *     cdef object __pyx_result
46245  */
46246   __pyx_tuple__51 = 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__51)) __PYX_ERR(1, 1, __pyx_L1_error)
46247   __Pyx_GOTREF(__pyx_tuple__51);
46248   __Pyx_GIVEREF(__pyx_tuple__51);
46249   __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SparseUnorderedBi, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 1, __pyx_L1_error)
46250   __pyx_tuple__53 = 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__53)) __PYX_ERR(1, 1, __pyx_L1_error)
46251   __Pyx_GOTREF(__pyx_tuple__53);
46252   __Pyx_GIVEREF(__pyx_tuple__53);
46253   __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SparseUnorderedRe, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(1, 1, __pyx_L1_error)
46254 
46255   /* "View.MemoryView":286
46256  *         return self.name
46257  *
46258  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
46259  * cdef strided = Enum("<strided and direct>") # default
46260  * cdef indirect = Enum("<strided and indirect>")
46261  */
46262   __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 286, __pyx_L1_error)
46263   __Pyx_GOTREF(__pyx_tuple__55);
46264   __Pyx_GIVEREF(__pyx_tuple__55);
46265 
46266   /* "View.MemoryView":287
46267  *
46268  * cdef generic = Enum("<strided and direct or indirect>")
46269  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
46270  * cdef indirect = Enum("<strided and indirect>")
46271  *
46272  */
46273   __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 287, __pyx_L1_error)
46274   __Pyx_GOTREF(__pyx_tuple__56);
46275   __Pyx_GIVEREF(__pyx_tuple__56);
46276 
46277   /* "View.MemoryView":288
46278  * cdef generic = Enum("<strided and direct or indirect>")
46279  * cdef strided = Enum("<strided and direct>") # default
46280  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
46281  *
46282  *
46283  */
46284   __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 288, __pyx_L1_error)
46285   __Pyx_GOTREF(__pyx_tuple__57);
46286   __Pyx_GIVEREF(__pyx_tuple__57);
46287 
46288   /* "View.MemoryView":291
46289  *
46290  *
46291  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
46292  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
46293  *
46294  */
46295   __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 291, __pyx_L1_error)
46296   __Pyx_GOTREF(__pyx_tuple__58);
46297   __Pyx_GIVEREF(__pyx_tuple__58);
46298 
46299   /* "View.MemoryView":292
46300  *
46301  * cdef contiguous = Enum("<contiguous and direct>")
46302  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
46303  *
46304  *
46305  */
46306   __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 292, __pyx_L1_error)
46307   __Pyx_GOTREF(__pyx_tuple__59);
46308   __Pyx_GIVEREF(__pyx_tuple__59);
46309 
46310   /* "(tree fragment)":1
46311  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
46312  *     cdef object __pyx_PickleError
46313  *     cdef object __pyx_result
46314  */
46315   __pyx_tuple__60 = 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__60)) __PYX_ERR(1, 1, __pyx_L1_error)
46316   __Pyx_GOTREF(__pyx_tuple__60);
46317   __Pyx_GIVEREF(__pyx_tuple__60);
46318   __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(1, 1, __pyx_L1_error)
46319   __Pyx_RefNannyFinishContext();
46320   return 0;
46321   __pyx_L1_error:;
46322   __Pyx_RefNannyFinishContext();
46323   return -1;
46324 }
46325 
__Pyx_InitGlobals(void)46326 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
46327   if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
46328   __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
46329   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
46330   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
46331   __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
46332   __pyx_int_100460822 = PyInt_FromLong(100460822L); if (unlikely(!__pyx_int_100460822)) __PYX_ERR(0, 1, __pyx_L1_error)
46333   __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
46334   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
46335   return 0;
46336   __pyx_L1_error:;
46337   return -1;
46338 }
46339 
46340 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
46341 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
46342 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
46343 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
46344 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
46345 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
46346 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
46347 
__Pyx_modinit_global_init_code(void)46348 static int __Pyx_modinit_global_init_code(void) {
46349   __Pyx_RefNannyDeclarations
46350   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
46351   /*--- Global init code ---*/
46352   generic = Py_None; Py_INCREF(Py_None);
46353   strided = Py_None; Py_INCREF(Py_None);
46354   indirect = Py_None; Py_INCREF(Py_None);
46355   contiguous = Py_None; Py_INCREF(Py_None);
46356   indirect_contiguous = Py_None; Py_INCREF(Py_None);
46357   __Pyx_RefNannyFinishContext();
46358   return 0;
46359 }
46360 
__Pyx_modinit_variable_export_code(void)46361 static int __Pyx_modinit_variable_export_code(void) {
46362   __Pyx_RefNannyDeclarations
46363   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
46364   /*--- Variable export code ---*/
46365   __Pyx_RefNannyFinishContext();
46366   return 0;
46367 }
46368 
__Pyx_modinit_function_export_code(void)46369 static int __Pyx_modinit_function_export_code(void) {
46370   __Pyx_RefNannyDeclarations
46371   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
46372   /*--- Function export code ---*/
46373   __Pyx_RefNannyFinishContext();
46374   return 0;
46375 }
46376 
__Pyx_modinit_type_init_code(void)46377 static int __Pyx_modinit_type_init_code(void) {
46378   __Pyx_RefNannyDeclarations
46379   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
46380   /*--- Type init code ---*/
46381   __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks = &__pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks;
46382   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._reset = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__reset;
46383   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._iseq = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__iseq;
46384   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._get_bitmask = (struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_bitmask;
46385   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._find_collisions = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions;
46386   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._find_collisions_coarse = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_coarse;
46387   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._find_collisions_refined = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__find_collisions_refined;
46388   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._set = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set;
46389   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._set_coarse = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_coarse;
46390   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._set_refined = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined;
46391   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._set_coarse_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_coarse_array;
46392   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._set_refined_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined_array;
46393   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._set_refined_index_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_int64_t, PyArrayObject *, PyArrayObject *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refined_index_array;
46394   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._set_map = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_map;
46395   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._set_refn = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__set_refn;
46396   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._get = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get;
46397   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._get_coarse = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_coarse;
46398   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._get_coarse_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__get_coarse_array;
46399   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._isref = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__isref;
46400   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._count_total = (__pyx_t_5numpy_uint64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_total;
46401   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._count_refined = (__pyx_t_5numpy_uint64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_refined;
46402   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._count_coarse = (__pyx_t_5numpy_uint64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__count_coarse;
46403   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._append = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__append;
46404   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._intersects = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__intersects;
46405   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._logicalxor = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__logicalxor;
46406   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._logicaland = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__logicaland;
46407   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._select_contaminated = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice, __Pyx_memviewslice, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_contaminated;
46408   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._select_uncontaminated = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__select_uncontaminated;
46409   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._dumps = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__dumps;
46410   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._loads = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *, __pyx_t_5numpy_uint32_t, PyObject *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__loads;
46411   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks._check = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_12FileBitmasks__check;
46412   if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
46413   #if PY_VERSION_HEX < 0x030800B1
46414   __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks.tp_print = 0;
46415   #endif
46416   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks.tp_dictoffset && __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks.tp_getattro == PyObject_GenericGetAttr)) {
46417     __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46418   }
46419   if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
46420   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FileBitmasks, (PyObject *)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
46421   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
46422   __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks = &__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_FileBitmasks;
46423   __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection = &__pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection;
46424   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._reset = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__reset;
46425   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._richcmp = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, int))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__richcmp;
46426   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._set = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set;
46427   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._set_coarse = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_coarse;
46428   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._set_refined = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refined;
46429   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._set_coarse_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_coarse_array;
46430   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._set_refined_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refined_array;
46431   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._set_map = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_map;
46432   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._set_refn = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__set_refn;
46433   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._get = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get;
46434   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._get_coarse = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_coarse;
46435   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._get_coarse_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_coarse_array;
46436   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._contains = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__contains;
46437   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._isref = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__isref;
46438   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._ewah_coarse = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__ewah_coarse;
46439   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._count_total = (__pyx_t_5numpy_uint64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_total;
46440   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._count_refined = (__pyx_t_5numpy_uint64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_refined;
46441   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._count_coarse = (__pyx_t_5numpy_uint64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__count_coarse;
46442   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._append = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__append;
46443   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._logicalor = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicalor;
46444   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._intersects = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__intersects;
46445   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._logicalxor = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicalxor;
46446   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._logicaland = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__logicaland;
46447   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._select_contaminated = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_contaminated;
46448   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._select_uncontaminated = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, __Pyx_memviewslice, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__select_uncontaminated;
46449   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._get_ghost_zones = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, int, int, int, int *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__get_ghost_zones;
46450   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._dumps = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__dumps;
46451   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._loads = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *, PyObject *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__loads;
46452   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection._check = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_19BoolArrayCollection__check;
46453   if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
46454   #if PY_VERSION_HEX < 0x030800B1
46455   __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection.tp_print = 0;
46456   #endif
46457   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection.tp_dictoffset && __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection.tp_getattro == PyObject_GenericGetAttr)) {
46458     __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46459   }
46460   if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
46461   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolArrayCollection, (PyObject *)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
46462   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
46463   __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection = &__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection;
46464   __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed = &__pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed;
46465   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set;
46466   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set_coarse = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse;
46467   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set_refined = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined;
46468   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set_coarse_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse_array;
46469   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set_coarse_array_ptr = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint8_t *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_coarse_array_ptr;
46470   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set_refined_array = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined_array;
46471   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set_refined_array_ptr = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint8_t *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refined_array_ptr;
46472   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set_map = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_map;
46473   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._set_refn = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__set_refn;
46474   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._get = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t, struct __pyx_opt_args_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get;
46475   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._get_coarse = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__get_coarse;
46476   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._isref = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__isref;
46477   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._count_total = (__pyx_t_5numpy_uint64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__count_total;
46478   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._count_refined = (__pyx_t_5numpy_uint64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__count_refined;
46479   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._append = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__append;
46480   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._intersects = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__intersects;
46481   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed._compress = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_31BoolArrayCollectionUncompressed__compress;
46482   if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed) < 0) __PYX_ERR(0, 1319, __pyx_L1_error)
46483   #if PY_VERSION_HEX < 0x030800B1
46484   __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed.tp_print = 0;
46485   #endif
46486   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed.tp_dictoffset && __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed.tp_getattro == PyObject_GenericGetAttr)) {
46487     __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46488   }
46489   if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed) < 0) __PYX_ERR(0, 1319, __pyx_L1_error)
46490   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolArrayCollectionUncompressed, (PyObject *)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed) < 0) __PYX_ERR(0, 1319, __pyx_L1_error)
46491   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed) < 0) __PYX_ERR(0, 1319, __pyx_L1_error)
46492   __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed = &__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed;
46493   __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet = &__pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet;
46494   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet._set = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__set;
46495   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet._fill = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill;
46496   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet._fill_ewah = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill_ewah;
46497   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet._fill_bool = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__fill_bool;
46498   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet._reset = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet__reset;
46499   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet.to_array = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_25SparseUnorderedBitmaskSet_to_array;
46500   if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet) < 0) __PYX_ERR(0, 1612, __pyx_L1_error)
46501   #if PY_VERSION_HEX < 0x030800B1
46502   __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet.tp_print = 0;
46503   #endif
46504   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet.tp_dictoffset && __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet.tp_getattro == PyObject_GenericGetAttr)) {
46505     __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46506   }
46507   if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet) < 0) __PYX_ERR(0, 1612, __pyx_L1_error)
46508   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SparseUnorderedBitmaskSet, (PyObject *)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet) < 0) __PYX_ERR(0, 1612, __pyx_L1_error)
46509   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet) < 0) __PYX_ERR(0, 1612, __pyx_L1_error)
46510   __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet = &__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskSet;
46511   __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector = &__pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector;
46512   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector._set = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__set;
46513   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector._fill = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill;
46514   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector._fill_ewah = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill_ewah;
46515   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector._fill_bool = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__fill_bool;
46516   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector._reset = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__reset;
46517   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector.to_array = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector_to_array;
46518   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector._remove_duplicates = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__remove_duplicates;
46519   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector._prune = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_28SparseUnorderedBitmaskVector__prune;
46520   if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector) < 0) __PYX_ERR(0, 1554, __pyx_L1_error)
46521   #if PY_VERSION_HEX < 0x030800B1
46522   __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector.tp_print = 0;
46523   #endif
46524   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector.tp_dictoffset && __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector.tp_getattro == PyObject_GenericGetAttr)) {
46525     __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46526   }
46527   if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector) < 0) __PYX_ERR(0, 1554, __pyx_L1_error)
46528   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SparseUnorderedBitmaskVector, (PyObject *)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector) < 0) __PYX_ERR(0, 1554, __pyx_L1_error)
46529   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector) < 0) __PYX_ERR(0, 1554, __pyx_L1_error)
46530   __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector = &__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedBitmaskVector;
46531   __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet = &__pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet;
46532   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet._set = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__set;
46533   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet._fill = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, __Pyx_memviewslice, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill;
46534   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet._fill_ewah = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill_ewah;
46535   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet._fill_bool = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__fill_bool;
46536   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet._reset = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet__reset;
46537   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet.to_array = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_32SparseUnorderedRefinedBitmaskSet_to_array;
46538   if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet) < 0) __PYX_ERR(0, 1732, __pyx_L1_error)
46539   #if PY_VERSION_HEX < 0x030800B1
46540   __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet.tp_print = 0;
46541   #endif
46542   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet.tp_dictoffset && __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet.tp_getattro == PyObject_GenericGetAttr)) {
46543     __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46544   }
46545   if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet) < 0) __PYX_ERR(0, 1732, __pyx_L1_error)
46546   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SparseUnorderedRefinedBitmaskSet, (PyObject *)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet) < 0) __PYX_ERR(0, 1732, __pyx_L1_error)
46547   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet) < 0) __PYX_ERR(0, 1732, __pyx_L1_error)
46548   __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet = &__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskSet;
46549   __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector = &__pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector;
46550   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector._set = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__set;
46551   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector._fill = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *, __Pyx_memviewslice, __Pyx_memviewslice))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill;
46552   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector._fill_ewah = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollection *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill_ewah;
46553   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector._fill_bool = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *, struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_BoolArrayCollectionUncompressed *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__fill_bool;
46554   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector._reset = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__reset;
46555   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector.to_array = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector_to_array;
46556   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector._remove_duplicates = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__remove_duplicates;
46557   __pyx_vtable_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector._prune = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector *))__pyx_f_2yt_9utilities_3lib_14ewah_bool_wrap_35SparseUnorderedRefinedBitmaskVector__prune;
46558   if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector) < 0) __PYX_ERR(0, 1652, __pyx_L1_error)
46559   #if PY_VERSION_HEX < 0x030800B1
46560   __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector.tp_print = 0;
46561   #endif
46562   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector.tp_dictoffset && __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector.tp_getattro == PyObject_GenericGetAttr)) {
46563     __pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46564   }
46565   if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector) < 0) __PYX_ERR(0, 1652, __pyx_L1_error)
46566   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SparseUnorderedRefinedBitmaskVec, (PyObject *)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector) < 0) __PYX_ERR(0, 1652, __pyx_L1_error)
46567   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector) < 0) __PYX_ERR(0, 1652, __pyx_L1_error)
46568   __pyx_ptype_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector = &__pyx_type_2yt_9utilities_3lib_14ewah_bool_wrap_SparseUnorderedRefinedBitmaskVector;
46569   __pyx_vtabptr_array = &__pyx_vtable_array;
46570   __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
46571   if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
46572   #if PY_VERSION_HEX < 0x030800B1
46573   __pyx_type___pyx_array.tp_print = 0;
46574   #endif
46575   if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
46576   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
46577   __pyx_array_type = &__pyx_type___pyx_array;
46578   if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
46579   #if PY_VERSION_HEX < 0x030800B1
46580   __pyx_type___pyx_MemviewEnum.tp_print = 0;
46581   #endif
46582   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
46583     __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46584   }
46585   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
46586   __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
46587   __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
46588   __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
46589   __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
46590   __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
46591   __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
46592   __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
46593   __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
46594   __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
46595   if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
46596   #if PY_VERSION_HEX < 0x030800B1
46597   __pyx_type___pyx_memoryview.tp_print = 0;
46598   #endif
46599   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
46600     __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46601   }
46602   if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
46603   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
46604   __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
46605   __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
46606   __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
46607   __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
46608   __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
46609   __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
46610   if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
46611   #if PY_VERSION_HEX < 0x030800B1
46612   __pyx_type___pyx_memoryviewslice.tp_print = 0;
46613   #endif
46614   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
46615     __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
46616   }
46617   if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
46618   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 961, __pyx_L1_error)
46619   __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
46620   __Pyx_RefNannyFinishContext();
46621   return 0;
46622   __pyx_L1_error:;
46623   __Pyx_RefNannyFinishContext();
46624   return -1;
46625 }
46626 
__Pyx_modinit_type_import_code(void)46627 static int __Pyx_modinit_type_import_code(void) {
46628   __Pyx_RefNannyDeclarations
46629   PyObject *__pyx_t_1 = NULL;
46630   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
46631   /*--- Type import code ---*/
46632   __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
46633   __Pyx_GOTREF(__pyx_t_1);
46634   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
46635   #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
46636   sizeof(PyTypeObject),
46637   #else
46638   sizeof(PyHeapTypeObject),
46639   #endif
46640   __Pyx_ImportType_CheckSize_Warn);
46641    if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
46642   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46643   __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error)
46644   __Pyx_GOTREF(__pyx_t_1);
46645   __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
46646    if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error)
46647   __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
46648    if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error)
46649   __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
46650    if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error)
46651   __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
46652    if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error)
46653   __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
46654    if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error)
46655   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46656   __Pyx_RefNannyFinishContext();
46657   return 0;
46658   __pyx_L1_error:;
46659   __Pyx_XDECREF(__pyx_t_1);
46660   __Pyx_RefNannyFinishContext();
46661   return -1;
46662 }
46663 
__Pyx_modinit_variable_import_code(void)46664 static int __Pyx_modinit_variable_import_code(void) {
46665   __Pyx_RefNannyDeclarations
46666   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
46667   /*--- Variable import code ---*/
46668   __Pyx_RefNannyFinishContext();
46669   return 0;
46670 }
46671 
__Pyx_modinit_function_import_code(void)46672 static int __Pyx_modinit_function_import_code(void) {
46673   __Pyx_RefNannyDeclarations
46674   PyObject *__pyx_t_1 = NULL;
46675   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
46676   /*--- Function import code ---*/
46677   __pyx_t_1 = PyImport_ImportModule("yt.utilities.lib.geometry_utils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
46678   if (__Pyx_ImportFunction(__pyx_t_1, "morton_neighbors_coarse", (void (**)(void))&__pyx_f_2yt_9utilities_3lib_14geometry_utils_morton_neighbors_coarse, "__pyx_t_5numpy_uint32_t (__pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, int *, __pyx_t_5numpy_uint32_t, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46679   if (__Pyx_ImportFunction(__pyx_t_1, "morton_neighbors_refined", (void (**)(void))&__pyx_f_2yt_9utilities_3lib_14geometry_utils_morton_neighbors_refined, "__pyx_t_5numpy_uint32_t (__pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, __pyx_t_5numpy_uint64_t, int *, __pyx_t_5numpy_uint32_t, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46680   Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46681   __Pyx_RefNannyFinishContext();
46682   return 0;
46683   __pyx_L1_error:;
46684   __Pyx_XDECREF(__pyx_t_1);
46685   __Pyx_RefNannyFinishContext();
46686   return -1;
46687 }
46688 
46689 
46690 #if PY_MAJOR_VERSION < 3
46691 #ifdef CYTHON_NO_PYINIT_EXPORT
46692 #define __Pyx_PyMODINIT_FUNC void
46693 #else
46694 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
46695 #endif
46696 #else
46697 #ifdef CYTHON_NO_PYINIT_EXPORT
46698 #define __Pyx_PyMODINIT_FUNC PyObject *
46699 #else
46700 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
46701 #endif
46702 #endif
46703 
46704 
46705 #if PY_MAJOR_VERSION < 3
46706 __Pyx_PyMODINIT_FUNC initewah_bool_wrap(void) CYTHON_SMALL_CODE; /*proto*/
initewah_bool_wrap(void)46707 __Pyx_PyMODINIT_FUNC initewah_bool_wrap(void)
46708 #else
46709 __Pyx_PyMODINIT_FUNC PyInit_ewah_bool_wrap(void) CYTHON_SMALL_CODE; /*proto*/
46710 __Pyx_PyMODINIT_FUNC PyInit_ewah_bool_wrap(void)
46711 #if CYTHON_PEP489_MULTI_PHASE_INIT
46712 {
46713   return PyModuleDef_Init(&__pyx_moduledef);
46714 }
46715 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
46716     #if PY_VERSION_HEX >= 0x030700A1
46717     static PY_INT64_T main_interpreter_id = -1;
46718     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
46719     if (main_interpreter_id == -1) {
46720         main_interpreter_id = current_id;
46721         return (unlikely(current_id == -1)) ? -1 : 0;
46722     } else if (unlikely(main_interpreter_id != current_id))
46723     #else
46724     static PyInterpreterState *main_interpreter = NULL;
46725     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
46726     if (!main_interpreter) {
46727         main_interpreter = current_interpreter;
46728     } else if (unlikely(main_interpreter != current_interpreter))
46729     #endif
46730     {
46731         PyErr_SetString(
46732             PyExc_ImportError,
46733             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
46734         return -1;
46735     }
46736     return 0;
46737 }
46738 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) {
46739     PyObject *value = PyObject_GetAttrString(spec, from_name);
46740     int result = 0;
46741     if (likely(value)) {
46742         if (allow_none || value != Py_None) {
46743             result = PyDict_SetItemString(moddict, to_name, value);
46744         }
46745         Py_DECREF(value);
46746     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
46747         PyErr_Clear();
46748     } else {
46749         result = -1;
46750     }
46751     return result;
46752 }
46753 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
46754     PyObject *module = NULL, *moddict, *modname;
46755     if (__Pyx_check_single_interpreter())
46756         return NULL;
46757     if (__pyx_m)
46758         return __Pyx_NewRef(__pyx_m);
46759     modname = PyObject_GetAttrString(spec, "name");
46760     if (unlikely(!modname)) goto bad;
46761     module = PyModule_NewObject(modname);
46762     Py_DECREF(modname);
46763     if (unlikely(!module)) goto bad;
46764     moddict = PyModule_GetDict(module);
46765     if (unlikely(!moddict)) goto bad;
46766     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
46767     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
46768     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
46769     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
46770     return module;
46771 bad:
46772     Py_XDECREF(module);
46773     return NULL;
46774 }
46775 
46776 
46777 static CYTHON_SMALL_CODE int __pyx_pymod_exec_ewah_bool_wrap(PyObject *__pyx_pyinit_module)
46778 #endif
46779 #endif
46780 {
46781   PyObject *__pyx_t_1 = NULL;
46782   static PyThread_type_lock __pyx_t_2[8];
46783   __Pyx_RefNannyDeclarations
46784   #if CYTHON_PEP489_MULTI_PHASE_INIT
46785   if (__pyx_m) {
46786     if (__pyx_m == __pyx_pyinit_module) return 0;
46787     PyErr_SetString(PyExc_RuntimeError, "Module 'ewah_bool_wrap' has already been imported. Re-initialisation is not supported.");
46788     return -1;
46789   }
46790   #elif PY_MAJOR_VERSION >= 3
46791   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
46792   #endif
46793   #if CYTHON_REFNANNY
46794 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
46795 if (!__Pyx_RefNanny) {
46796   PyErr_Clear();
46797   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
46798   if (!__Pyx_RefNanny)
46799       Py_FatalError("failed to import 'refnanny' module");
46800 }
46801 #endif
46802   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_ewah_bool_wrap(void)", 0);
46803   if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46804   #ifdef __Pxy_PyFrame_Initialize_Offsets
46805   __Pxy_PyFrame_Initialize_Offsets();
46806   #endif
46807   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
46808   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
46809   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
46810   #ifdef __Pyx_CyFunction_USED
46811   if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46812   #endif
46813   #ifdef __Pyx_FusedFunction_USED
46814   if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46815   #endif
46816   #ifdef __Pyx_Coroutine_USED
46817   if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46818   #endif
46819   #ifdef __Pyx_Generator_USED
46820   if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46821   #endif
46822   #ifdef __Pyx_AsyncGen_USED
46823   if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46824   #endif
46825   #ifdef __Pyx_StopAsyncIteration_USED
46826   if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46827   #endif
46828   /*--- Library function declarations ---*/
46829   /*--- Threads initialization code ---*/
46830   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
46831   #ifdef WITH_THREAD /* Python build with threading support? */
46832   PyEval_InitThreads();
46833   #endif
46834   #endif
46835   /*--- Module creation code ---*/
46836   #if CYTHON_PEP489_MULTI_PHASE_INIT
46837   __pyx_m = __pyx_pyinit_module;
46838   Py_INCREF(__pyx_m);
46839   #else
46840   #if PY_MAJOR_VERSION < 3
46841   __pyx_m = Py_InitModule4("ewah_bool_wrap", __pyx_methods, __pyx_k_Wrapper_for_EWAH_Bool_Array_htt, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
46842   #else
46843   __pyx_m = PyModule_Create(&__pyx_moduledef);
46844   #endif
46845   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
46846   #endif
46847   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
46848   Py_INCREF(__pyx_d);
46849   __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
46850   Py_INCREF(__pyx_b);
46851   __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
46852   Py_INCREF(__pyx_cython_runtime);
46853   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
46854   /*--- Initialize various global constants etc. ---*/
46855   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46856   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
46857   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46858   #endif
46859   if (__pyx_module_is_main_yt__utilities__lib__ewah_bool_wrap) {
46860     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46861   }
46862   #if PY_MAJOR_VERSION >= 3
46863   {
46864     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
46865     if (!PyDict_GetItemString(modules, "yt.utilities.lib.ewah_bool_wrap")) {
46866       if (unlikely(PyDict_SetItemString(modules, "yt.utilities.lib.ewah_bool_wrap", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
46867     }
46868   }
46869   #endif
46870   /*--- Builtin init code ---*/
46871   if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
46872   /*--- Constants init code ---*/
46873   if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
46874   /*--- Global type/function init code ---*/
46875   (void)__Pyx_modinit_global_init_code();
46876   (void)__Pyx_modinit_variable_export_code();
46877   (void)__Pyx_modinit_function_export_code();
46878   if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
46879   if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
46880   (void)__Pyx_modinit_variable_import_code();
46881   if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error;
46882   /*--- Execution code ---*/
46883   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
46884   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
46885   #endif
46886 
46887   /* "yt/utilities/lib/ewah_bool_wrap.pyx":12
46888  *
46889  *
46890  * import struct             # <<<<<<<<<<<<<<
46891  *
46892  * from cython.operator cimport dereference, preincrement
46893  */
46894   __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
46895   __Pyx_GOTREF(__pyx_t_1);
46896   if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
46897   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46898 
46899   /* "yt/utilities/lib/ewah_bool_wrap.pyx":19
46900  * from libcpp.map cimport map as cmap
46901  *
46902  * import numpy as np             # <<<<<<<<<<<<<<
46903  *
46904  * cimport cython
46905  */
46906   __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
46907   __Pyx_GOTREF(__pyx_t_1);
46908   if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
46909   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46910 
46911   /* "yt/utilities/lib/ewah_bool_wrap.pyx":33
46912  *     Iter unique[Iter](Iter first, Iter last)
46913  *
46914  * cdef np.uint64_t FLAG = ~(<np.uint64_t>0)             # <<<<<<<<<<<<<<
46915  * cdef np.uint64_t MAX_VECTOR_SIZE = <np.uint64_t>1e7
46916  *
46917  */
46918   __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG = (~((__pyx_t_5numpy_uint64_t)0));
46919 
46920   /* "yt/utilities/lib/ewah_bool_wrap.pyx":34
46921  *
46922  * cdef np.uint64_t FLAG = ~(<np.uint64_t>0)
46923  * cdef np.uint64_t MAX_VECTOR_SIZE = <np.uint64_t>1e7             # <<<<<<<<<<<<<<
46924  *
46925  * ctypedef cmap[np.uint64_t, ewah_bool_array] ewahmap
46926  */
46927   __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_MAX_VECTOR_SIZE = ((__pyx_t_5numpy_uint64_t)1e7);
46928 
46929   /* "yt/utilities/lib/ewah_bool_wrap.pyx":199
46930  *         return nout
46931  *
46932  *     cdef void _set(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
46933  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
46934  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
46935  */
46936   __pyx_k__3 = __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG;
46937 
46938   /* "yt/utilities/lib/ewah_bool_wrap.pyx":275
46939  *         ewah_refn[0].set(i1)
46940  *
46941  *     cdef bint _get(self, np.uint32_t ifile, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
46942  *         cdef ewah_bool_array *ewah_keys = (<ewah_bool_array **> self.ewah_keys)[ifile]
46943  *         cdef ewah_bool_array *ewah_refn = (<ewah_bool_array **> self.ewah_refn)[ifile]
46944  */
46945   __pyx_k__4 = __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG;
46946 
46947   /* "yt/utilities/lib/ewah_bool_wrap.pyx":705
46948  *             return False
46949  *
46950  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
46951  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
46952  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
46953  */
46954   __pyx_k__8 = __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG;
46955 
46956   /* "yt/utilities/lib/ewah_bool_wrap.pyx":715
46957  *             ewah_coll[0][i1].set(i2)
46958  *
46959  *     def set(self, i1, i2 = FLAG):             # <<<<<<<<<<<<<<
46960  *         self._set(i1, i2)
46961  *
46962  */
46963   __pyx_t_1 = __Pyx_PyInt_From_npy_uint64(__pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
46964   __Pyx_GOTREF(__pyx_t_1);
46965   __pyx_k__9 = __pyx_t_1;
46966   __Pyx_GIVEREF(__pyx_t_1);
46967   __pyx_t_1 = 0;
46968 
46969   /* "yt/utilities/lib/ewah_bool_wrap.pyx":791
46970  *         self._set_refn(i1)
46971  *
46972  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
46973  *         cdef ewah_bool_array *ewah_keys = <ewah_bool_array *> self.ewah_keys
46974  *         cdef ewah_bool_array *ewah_refn = <ewah_bool_array *> self.ewah_refn
46975  */
46976   __pyx_k__10 = __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG;
46977 
46978   /* "yt/utilities/lib/ewah_bool_wrap.pyx":801
46979  *         return ewah_coll[0][i1].get(i2)
46980  *
46981  *     def get(self, i1, i2 = FLAG):             # <<<<<<<<<<<<<<
46982  *         return self._get(i1, i2)
46983  *
46984  */
46985   __pyx_t_1 = __Pyx_PyInt_From_npy_uint64(__pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
46986   __Pyx_GOTREF(__pyx_t_1);
46987   __pyx_k__11 = __pyx_t_1;
46988   __Pyx_GIVEREF(__pyx_t_1);
46989   __pyx_t_1 = 0;
46990 
46991   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1351
46992  *         ewah_coll2[0] = ewah_coll1[0]
46993  *
46994  *     cdef void _set(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
46995  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
46996  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
46997  */
46998   __pyx_k__14 = __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG;
46999 
47000   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1430
47001  *         ewah_refn[i1] = 1
47002  *
47003  *     cdef bint _get(self, np.uint64_t i1, np.uint64_t i2 = FLAG):             # <<<<<<<<<<<<<<
47004  *         cdef bitarrtype *ewah_keys = <bitarrtype *> self.ewah_keys
47005  *         cdef bitarrtype *ewah_refn = <bitarrtype *> self.ewah_refn
47006  */
47007   __pyx_k__15 = __pyx_v_2yt_9utilities_3lib_14ewah_bool_wrap_FLAG;
47008 
47009   /* "(tree fragment)":1
47010  * def __pyx_unpickle_SparseUnorderedBitmaskSet(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
47011  *     cdef object __pyx_PickleError
47012  *     cdef object __pyx_result
47013  */
47014   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_14ewah_bool_wrap_1__pyx_unpickle_SparseUnorderedBitmaskSet, NULL, __pyx_n_s_yt_utilities_lib_ewah_bool_wrap); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
47015   __Pyx_GOTREF(__pyx_t_1);
47016   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SparseUnorderedBi, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
47017   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47018 
47019   /* "(tree fragment)":11
47020  *         __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(<SparseUnorderedBitmaskSet> __pyx_result, __pyx_state)
47021  *     return __pyx_result
47022  * cdef __pyx_unpickle_SparseUnorderedBitmaskSet__set_state(SparseUnorderedBitmaskSet __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
47023  *     __pyx_result.entries = __pyx_state[0]
47024  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
47025  */
47026   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_14ewah_bool_wrap_3__pyx_unpickle_SparseUnorderedRefinedBitmaskSet, NULL, __pyx_n_s_yt_utilities_lib_ewah_bool_wrap); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
47027   __Pyx_GOTREF(__pyx_t_1);
47028   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SparseUnorderedRe, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
47029   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47030 
47031   /* "yt/utilities/lib/ewah_bool_wrap.pyx":1
47032  * # distutils: language = c++             # <<<<<<<<<<<<<<
47033  * # distutils: include_dirs = LIB_DIR_EWAH
47034  * # distutils: extra_compile_args = CPP14_FLAG
47035  */
47036   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
47037   __Pyx_GOTREF(__pyx_t_1);
47038   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
47039   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47040 
47041   /* "View.MemoryView":209
47042  *         info.obj = self
47043  *
47044  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
47045  *
47046  *     def __dealloc__(array self):
47047  */
47048   __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error)
47049   __Pyx_GOTREF(__pyx_t_1);
47050   if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
47051   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47052   PyType_Modified(__pyx_array_type);
47053 
47054   /* "View.MemoryView":286
47055  *         return self.name
47056  *
47057  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
47058  * cdef strided = Enum("<strided and direct>") # default
47059  * cdef indirect = Enum("<strided and indirect>")
47060  */
47061   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 286, __pyx_L1_error)
47062   __Pyx_GOTREF(__pyx_t_1);
47063   __Pyx_XGOTREF(generic);
47064   __Pyx_DECREF_SET(generic, __pyx_t_1);
47065   __Pyx_GIVEREF(__pyx_t_1);
47066   __pyx_t_1 = 0;
47067 
47068   /* "View.MemoryView":287
47069  *
47070  * cdef generic = Enum("<strided and direct or indirect>")
47071  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
47072  * cdef indirect = Enum("<strided and indirect>")
47073  *
47074  */
47075   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
47076   __Pyx_GOTREF(__pyx_t_1);
47077   __Pyx_XGOTREF(strided);
47078   __Pyx_DECREF_SET(strided, __pyx_t_1);
47079   __Pyx_GIVEREF(__pyx_t_1);
47080   __pyx_t_1 = 0;
47081 
47082   /* "View.MemoryView":288
47083  * cdef generic = Enum("<strided and direct or indirect>")
47084  * cdef strided = Enum("<strided and direct>") # default
47085  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
47086  *
47087  *
47088  */
47089   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 288, __pyx_L1_error)
47090   __Pyx_GOTREF(__pyx_t_1);
47091   __Pyx_XGOTREF(indirect);
47092   __Pyx_DECREF_SET(indirect, __pyx_t_1);
47093   __Pyx_GIVEREF(__pyx_t_1);
47094   __pyx_t_1 = 0;
47095 
47096   /* "View.MemoryView":291
47097  *
47098  *
47099  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
47100  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
47101  *
47102  */
47103   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error)
47104   __Pyx_GOTREF(__pyx_t_1);
47105   __Pyx_XGOTREF(contiguous);
47106   __Pyx_DECREF_SET(contiguous, __pyx_t_1);
47107   __Pyx_GIVEREF(__pyx_t_1);
47108   __pyx_t_1 = 0;
47109 
47110   /* "View.MemoryView":292
47111  *
47112  * cdef contiguous = Enum("<contiguous and direct>")
47113  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
47114  *
47115  *
47116  */
47117   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error)
47118   __Pyx_GOTREF(__pyx_t_1);
47119   __Pyx_XGOTREF(indirect_contiguous);
47120   __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
47121   __Pyx_GIVEREF(__pyx_t_1);
47122   __pyx_t_1 = 0;
47123 
47124   /* "View.MemoryView":316
47125  *
47126  * DEF THREAD_LOCKS_PREALLOCATED = 8
47127  * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
47128  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
47129  *     PyThread_allocate_lock(),
47130  */
47131   __pyx_memoryview_thread_locks_used = 0;
47132 
47133   /* "View.MemoryView":317
47134  * DEF THREAD_LOCKS_PREALLOCATED = 8
47135  * cdef int __pyx_memoryview_thread_locks_used = 0
47136  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
47137  *     PyThread_allocate_lock(),
47138  *     PyThread_allocate_lock(),
47139  */
47140   __pyx_t_2[0] = PyThread_allocate_lock();
47141   __pyx_t_2[1] = PyThread_allocate_lock();
47142   __pyx_t_2[2] = PyThread_allocate_lock();
47143   __pyx_t_2[3] = PyThread_allocate_lock();
47144   __pyx_t_2[4] = PyThread_allocate_lock();
47145   __pyx_t_2[5] = PyThread_allocate_lock();
47146   __pyx_t_2[6] = PyThread_allocate_lock();
47147   __pyx_t_2[7] = PyThread_allocate_lock();
47148   memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_2, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
47149 
47150   /* "View.MemoryView":545
47151  *         info.obj = self
47152  *
47153  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
47154  *
47155  *
47156  */
47157   __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 545, __pyx_L1_error)
47158   __Pyx_GOTREF(__pyx_t_1);
47159   if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 545, __pyx_L1_error)
47160   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47161   PyType_Modified(__pyx_memoryview_type);
47162 
47163   /* "View.MemoryView":991
47164  *         return self.from_object
47165  *
47166  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
47167  *
47168  *
47169  */
47170   __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 991, __pyx_L1_error)
47171   __Pyx_GOTREF(__pyx_t_1);
47172   if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 991, __pyx_L1_error)
47173   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47174   PyType_Modified(__pyx_memoryviewslice_type);
47175 
47176   /* "(tree fragment)":1
47177  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
47178  *     cdef object __pyx_PickleError
47179  *     cdef object __pyx_result
47180  */
47181   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
47182   __Pyx_GOTREF(__pyx_t_1);
47183   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
47184   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47185 
47186   /* "BufferFormatFromTypeInfo":1460
47187  *
47188  * @cname('__pyx_format_from_typeinfo')
47189  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type):             # <<<<<<<<<<<<<<
47190  *     cdef __Pyx_StructField *field
47191  *     cdef __pyx_typeinfo_string fmt
47192  */
47193 
47194   /*--- Wrapped vars code ---*/
47195 
47196   goto __pyx_L0;
47197   __pyx_L1_error:;
47198   __Pyx_XDECREF(__pyx_t_1);
47199   if (__pyx_m) {
47200     if (__pyx_d) {
47201       __Pyx_AddTraceback("init yt.utilities.lib.ewah_bool_wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
47202     }
47203     Py_CLEAR(__pyx_m);
47204   } else if (!PyErr_Occurred()) {
47205     PyErr_SetString(PyExc_ImportError, "init yt.utilities.lib.ewah_bool_wrap");
47206   }
47207   __pyx_L0:;
47208   __Pyx_RefNannyFinishContext();
47209   #if CYTHON_PEP489_MULTI_PHASE_INIT
47210   return (__pyx_m != NULL) ? 0 : -1;
47211   #elif PY_MAJOR_VERSION >= 3
47212   return __pyx_m;
47213   #else
47214   return;
47215   #endif
47216 }
47217 
47218 /* --- Runtime support code --- */
47219 /* Refnanny */
47220 #if CYTHON_REFNANNY
__Pyx_RefNannyImportAPI(const char * modname)47221 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
47222     PyObject *m = NULL, *p = NULL;
47223     void *r = NULL;
47224     m = PyImport_ImportModule(modname);
47225     if (!m) goto end;
47226     p = PyObject_GetAttrString(m, "RefNannyAPI");
47227     if (!p) goto end;
47228     r = PyLong_AsVoidPtr(p);
47229 end:
47230     Py_XDECREF(p);
47231     Py_XDECREF(m);
47232     return (__Pyx_RefNannyAPIStruct *)r;
47233 }
47234 #endif
47235 
47236 /* PyObjectGetAttrStr */
47237 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetAttrStr(PyObject * obj,PyObject * attr_name)47238 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
47239     PyTypeObject* tp = Py_TYPE(obj);
47240     if (likely(tp->tp_getattro))
47241         return tp->tp_getattro(obj, attr_name);
47242 #if PY_MAJOR_VERSION < 3
47243     if (likely(tp->tp_getattr))
47244         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
47245 #endif
47246     return PyObject_GetAttr(obj, attr_name);
47247 }
47248 #endif
47249 
47250 /* GetBuiltinName */
__Pyx_GetBuiltinName(PyObject * name)47251 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
47252     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
47253     if (unlikely(!result)) {
47254         PyErr_Format(PyExc_NameError,
47255 #if PY_MAJOR_VERSION >= 3
47256             "name '%U' is not defined", name);
47257 #else
47258             "name '%.200s' is not defined", PyString_AS_STRING(name));
47259 #endif
47260     }
47261     return result;
47262 }
47263 
47264 /* RaiseDoubleKeywords */
__Pyx_RaiseDoubleKeywordsError(const char * func_name,PyObject * kw_name)47265 static void __Pyx_RaiseDoubleKeywordsError(
47266     const char* func_name,
47267     PyObject* kw_name)
47268 {
47269     PyErr_Format(PyExc_TypeError,
47270         #if PY_MAJOR_VERSION >= 3
47271         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
47272         #else
47273         "%s() got multiple values for keyword argument '%s'", func_name,
47274         PyString_AsString(kw_name));
47275         #endif
47276 }
47277 
47278 /* ParseKeywords */
__Pyx_ParseOptionalKeywords(PyObject * kwds,PyObject ** argnames[],PyObject * kwds2,PyObject * values[],Py_ssize_t num_pos_args,const char * function_name)47279 static int __Pyx_ParseOptionalKeywords(
47280     PyObject *kwds,
47281     PyObject **argnames[],
47282     PyObject *kwds2,
47283     PyObject *values[],
47284     Py_ssize_t num_pos_args,
47285     const char* function_name)
47286 {
47287     PyObject *key = 0, *value = 0;
47288     Py_ssize_t pos = 0;
47289     PyObject*** name;
47290     PyObject*** first_kw_arg = argnames + num_pos_args;
47291     while (PyDict_Next(kwds, &pos, &key, &value)) {
47292         name = first_kw_arg;
47293         while (*name && (**name != key)) name++;
47294         if (*name) {
47295             values[name-argnames] = value;
47296             continue;
47297         }
47298         name = first_kw_arg;
47299         #if PY_MAJOR_VERSION < 3
47300         if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
47301             while (*name) {
47302                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
47303                         && _PyString_Eq(**name, key)) {
47304                     values[name-argnames] = value;
47305                     break;
47306                 }
47307                 name++;
47308             }
47309             if (*name) continue;
47310             else {
47311                 PyObject*** argname = argnames;
47312                 while (argname != first_kw_arg) {
47313                     if ((**argname == key) || (
47314                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
47315                              && _PyString_Eq(**argname, key))) {
47316                         goto arg_passed_twice;
47317                     }
47318                     argname++;
47319                 }
47320             }
47321         } else
47322         #endif
47323         if (likely(PyUnicode_Check(key))) {
47324             while (*name) {
47325                 int cmp = (**name == key) ? 0 :
47326                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
47327                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
47328                 #endif
47329                     PyUnicode_Compare(**name, key);
47330                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
47331                 if (cmp == 0) {
47332                     values[name-argnames] = value;
47333                     break;
47334                 }
47335                 name++;
47336             }
47337             if (*name) continue;
47338             else {
47339                 PyObject*** argname = argnames;
47340                 while (argname != first_kw_arg) {
47341                     int cmp = (**argname == key) ? 0 :
47342                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
47343                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
47344                     #endif
47345                         PyUnicode_Compare(**argname, key);
47346                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
47347                     if (cmp == 0) goto arg_passed_twice;
47348                     argname++;
47349                 }
47350             }
47351         } else
47352             goto invalid_keyword_type;
47353         if (kwds2) {
47354             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
47355         } else {
47356             goto invalid_keyword;
47357         }
47358     }
47359     return 0;
47360 arg_passed_twice:
47361     __Pyx_RaiseDoubleKeywordsError(function_name, key);
47362     goto bad;
47363 invalid_keyword_type:
47364     PyErr_Format(PyExc_TypeError,
47365         "%.200s() keywords must be strings", function_name);
47366     goto bad;
47367 invalid_keyword:
47368     PyErr_Format(PyExc_TypeError,
47369     #if PY_MAJOR_VERSION < 3
47370         "%.200s() got an unexpected keyword argument '%.200s'",
47371         function_name, PyString_AsString(key));
47372     #else
47373         "%s() got an unexpected keyword argument '%U'",
47374         function_name, key);
47375     #endif
47376 bad:
47377     return -1;
47378 }
47379 
47380 /* RaiseArgTupleInvalid */
__Pyx_RaiseArgtupleInvalid(const char * func_name,int exact,Py_ssize_t num_min,Py_ssize_t num_max,Py_ssize_t num_found)47381 static void __Pyx_RaiseArgtupleInvalid(
47382     const char* func_name,
47383     int exact,
47384     Py_ssize_t num_min,
47385     Py_ssize_t num_max,
47386     Py_ssize_t num_found)
47387 {
47388     Py_ssize_t num_expected;
47389     const char *more_or_less;
47390     if (num_found < num_min) {
47391         num_expected = num_min;
47392         more_or_less = "at least";
47393     } else {
47394         num_expected = num_max;
47395         more_or_less = "at most";
47396     }
47397     if (exact) {
47398         more_or_less = "exactly";
47399     }
47400     PyErr_Format(PyExc_TypeError,
47401                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
47402                  func_name, more_or_less, num_expected,
47403                  (num_expected == 1) ? "" : "s", num_found);
47404 }
47405 
47406 /* ExtTypeTest */
__Pyx_TypeTest(PyObject * obj,PyTypeObject * type)47407 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
47408     if (unlikely(!type)) {
47409         PyErr_SetString(PyExc_SystemError, "Missing type object");
47410         return 0;
47411     }
47412     if (likely(__Pyx_TypeCheck(obj, type)))
47413         return 1;
47414     PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
47415                  Py_TYPE(obj)->tp_name, type->tp_name);
47416     return 0;
47417 }
47418 
47419 /* PyFunctionFastCall */
47420 #if CYTHON_FAST_PYCALL
__Pyx_PyFunction_FastCallNoKw(PyCodeObject * co,PyObject ** args,Py_ssize_t na,PyObject * globals)47421 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
47422                                                PyObject *globals) {
47423     PyFrameObject *f;
47424     PyThreadState *tstate = __Pyx_PyThreadState_Current;
47425     PyObject **fastlocals;
47426     Py_ssize_t i;
47427     PyObject *result;
47428     assert(globals != NULL);
47429     /* XXX Perhaps we should create a specialized
47430        PyFrame_New() that doesn't take locals, but does
47431        take builtins without sanity checking them.
47432        */
47433     assert(tstate != NULL);
47434     f = PyFrame_New(tstate, co, globals, NULL);
47435     if (f == NULL) {
47436         return NULL;
47437     }
47438     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
47439     for (i = 0; i < na; i++) {
47440         Py_INCREF(*args);
47441         fastlocals[i] = *args++;
47442     }
47443     result = PyEval_EvalFrameEx(f,0);
47444     ++tstate->recursion_depth;
47445     Py_DECREF(f);
47446     --tstate->recursion_depth;
47447     return result;
47448 }
47449 #if 1 || PY_VERSION_HEX < 0x030600B1
__Pyx_PyFunction_FastCallDict(PyObject * func,PyObject ** args,Py_ssize_t nargs,PyObject * kwargs)47450 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
47451     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
47452     PyObject *globals = PyFunction_GET_GLOBALS(func);
47453     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
47454     PyObject *closure;
47455 #if PY_MAJOR_VERSION >= 3
47456     PyObject *kwdefs;
47457 #endif
47458     PyObject *kwtuple, **k;
47459     PyObject **d;
47460     Py_ssize_t nd;
47461     Py_ssize_t nk;
47462     PyObject *result;
47463     assert(kwargs == NULL || PyDict_Check(kwargs));
47464     nk = kwargs ? PyDict_Size(kwargs) : 0;
47465     if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
47466         return NULL;
47467     }
47468     if (
47469 #if PY_MAJOR_VERSION >= 3
47470             co->co_kwonlyargcount == 0 &&
47471 #endif
47472             likely(kwargs == NULL || nk == 0) &&
47473             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
47474         if (argdefs == NULL && co->co_argcount == nargs) {
47475             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
47476             goto done;
47477         }
47478         else if (nargs == 0 && argdefs != NULL
47479                  && co->co_argcount == Py_SIZE(argdefs)) {
47480             /* function called with no arguments, but all parameters have
47481                a default value: use default values as arguments .*/
47482             args = &PyTuple_GET_ITEM(argdefs, 0);
47483             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
47484             goto done;
47485         }
47486     }
47487     if (kwargs != NULL) {
47488         Py_ssize_t pos, i;
47489         kwtuple = PyTuple_New(2 * nk);
47490         if (kwtuple == NULL) {
47491             result = NULL;
47492             goto done;
47493         }
47494         k = &PyTuple_GET_ITEM(kwtuple, 0);
47495         pos = i = 0;
47496         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
47497             Py_INCREF(k[i]);
47498             Py_INCREF(k[i+1]);
47499             i += 2;
47500         }
47501         nk = i / 2;
47502     }
47503     else {
47504         kwtuple = NULL;
47505         k = NULL;
47506     }
47507     closure = PyFunction_GET_CLOSURE(func);
47508 #if PY_MAJOR_VERSION >= 3
47509     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
47510 #endif
47511     if (argdefs != NULL) {
47512         d = &PyTuple_GET_ITEM(argdefs, 0);
47513         nd = Py_SIZE(argdefs);
47514     }
47515     else {
47516         d = NULL;
47517         nd = 0;
47518     }
47519 #if PY_MAJOR_VERSION >= 3
47520     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
47521                                args, (int)nargs,
47522                                k, (int)nk,
47523                                d, (int)nd, kwdefs, closure);
47524 #else
47525     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
47526                                args, (int)nargs,
47527                                k, (int)nk,
47528                                d, (int)nd, closure);
47529 #endif
47530     Py_XDECREF(kwtuple);
47531 done:
47532     Py_LeaveRecursiveCall();
47533     return result;
47534 }
47535 #endif
47536 #endif
47537 
47538 /* PyObjectCall */
47539 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_Call(PyObject * func,PyObject * arg,PyObject * kw)47540 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
47541     PyObject *result;
47542     ternaryfunc call = func->ob_type->tp_call;
47543     if (unlikely(!call))
47544         return PyObject_Call(func, arg, kw);
47545     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
47546         return NULL;
47547     result = (*call)(func, arg, kw);
47548     Py_LeaveRecursiveCall();
47549     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
47550         PyErr_SetString(
47551             PyExc_SystemError,
47552             "NULL result without error in PyObject_Call");
47553     }
47554     return result;
47555 }
47556 #endif
47557 
47558 /* PyObjectCallMethO */
47559 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallMethO(PyObject * func,PyObject * arg)47560 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
47561     PyObject *self, *result;
47562     PyCFunction cfunc;
47563     cfunc = PyCFunction_GET_FUNCTION(func);
47564     self = PyCFunction_GET_SELF(func);
47565     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
47566         return NULL;
47567     result = cfunc(self, arg);
47568     Py_LeaveRecursiveCall();
47569     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
47570         PyErr_SetString(
47571             PyExc_SystemError,
47572             "NULL result without error in PyObject_Call");
47573     }
47574     return result;
47575 }
47576 #endif
47577 
47578 /* PyObjectCallNoArg */
47579 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallNoArg(PyObject * func)47580 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
47581 #if CYTHON_FAST_PYCALL
47582     if (PyFunction_Check(func)) {
47583         return __Pyx_PyFunction_FastCall(func, NULL, 0);
47584     }
47585 #endif
47586 #ifdef __Pyx_CyFunction_USED
47587     if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
47588 #else
47589     if (likely(PyCFunction_Check(func)))
47590 #endif
47591     {
47592         if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
47593             return __Pyx_PyObject_CallMethO(func, NULL);
47594         }
47595     }
47596     return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
47597 }
47598 #endif
47599 
47600 /* PyCFunctionFastCall */
47601 #if CYTHON_FAST_PYCCALL
__Pyx_PyCFunction_FastCall(PyObject * func_obj,PyObject ** args,Py_ssize_t nargs)47602 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
47603     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
47604     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
47605     PyObject *self = PyCFunction_GET_SELF(func);
47606     int flags = PyCFunction_GET_FLAGS(func);
47607     assert(PyCFunction_Check(func));
47608     assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
47609     assert(nargs >= 0);
47610     assert(nargs == 0 || args != NULL);
47611     /* _PyCFunction_FastCallDict() must not be called with an exception set,
47612        because it may clear it (directly or indirectly) and so the
47613        caller loses its exception */
47614     assert(!PyErr_Occurred());
47615     if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
47616         return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
47617     } else {
47618         return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
47619     }
47620 }
47621 #endif
47622 
47623 /* PyObjectCallOneArg */
47624 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx__PyObject_CallOneArg(PyObject * func,PyObject * arg)47625 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
47626     PyObject *result;
47627     PyObject *args = PyTuple_New(1);
47628     if (unlikely(!args)) return NULL;
47629     Py_INCREF(arg);
47630     PyTuple_SET_ITEM(args, 0, arg);
47631     result = __Pyx_PyObject_Call(func, args, NULL);
47632     Py_DECREF(args);
47633     return result;
47634 }
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)47635 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
47636 #if CYTHON_FAST_PYCALL
47637     if (PyFunction_Check(func)) {
47638         return __Pyx_PyFunction_FastCall(func, &arg, 1);
47639     }
47640 #endif
47641     if (likely(PyCFunction_Check(func))) {
47642         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
47643             return __Pyx_PyObject_CallMethO(func, arg);
47644 #if CYTHON_FAST_PYCCALL
47645         } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
47646             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
47647 #endif
47648         }
47649     }
47650     return __Pyx__PyObject_CallOneArg(func, arg);
47651 }
47652 #else
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)47653 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
47654     PyObject *result;
47655     PyObject *args = PyTuple_Pack(1, arg);
47656     if (unlikely(!args)) return NULL;
47657     result = __Pyx_PyObject_Call(func, args, NULL);
47658     Py_DECREF(args);
47659     return result;
47660 }
47661 #endif
47662 
47663 /* IsLittleEndian */
__Pyx_Is_Little_Endian(void)47664 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
47665 {
47666   union {
47667     uint32_t u32;
47668     uint8_t u8[4];
47669   } S;
47670   S.u32 = 0x01020304;
47671   return S.u8[0] == 4;
47672 }
47673 
47674 /* BufferFormatCheck */
__Pyx_BufFmt_Init(__Pyx_BufFmt_Context * ctx,__Pyx_BufFmt_StackElem * stack,__Pyx_TypeInfo * type)47675 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
47676                               __Pyx_BufFmt_StackElem* stack,
47677                               __Pyx_TypeInfo* type) {
47678   stack[0].field = &ctx->root;
47679   stack[0].parent_offset = 0;
47680   ctx->root.type = type;
47681   ctx->root.name = "buffer dtype";
47682   ctx->root.offset = 0;
47683   ctx->head = stack;
47684   ctx->head->field = &ctx->root;
47685   ctx->fmt_offset = 0;
47686   ctx->head->parent_offset = 0;
47687   ctx->new_packmode = '@';
47688   ctx->enc_packmode = '@';
47689   ctx->new_count = 1;
47690   ctx->enc_count = 0;
47691   ctx->enc_type = 0;
47692   ctx->is_complex = 0;
47693   ctx->is_valid_array = 0;
47694   ctx->struct_alignment = 0;
47695   while (type->typegroup == 'S') {
47696     ++ctx->head;
47697     ctx->head->field = type->fields;
47698     ctx->head->parent_offset = 0;
47699     type = type->fields->type;
47700   }
47701 }
__Pyx_BufFmt_ParseNumber(const char ** ts)47702 static int __Pyx_BufFmt_ParseNumber(const char** ts) {
47703     int count;
47704     const char* t = *ts;
47705     if (*t < '0' || *t > '9') {
47706       return -1;
47707     } else {
47708         count = *t++ - '0';
47709         while (*t >= '0' && *t <= '9') {
47710             count *= 10;
47711             count += *t++ - '0';
47712         }
47713     }
47714     *ts = t;
47715     return count;
47716 }
__Pyx_BufFmt_ExpectNumber(const char ** ts)47717 static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
47718     int number = __Pyx_BufFmt_ParseNumber(ts);
47719     if (number == -1)
47720         PyErr_Format(PyExc_ValueError,\
47721                      "Does not understand character buffer dtype format string ('%c')", **ts);
47722     return number;
47723 }
__Pyx_BufFmt_RaiseUnexpectedChar(char ch)47724 static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
47725   PyErr_Format(PyExc_ValueError,
47726                "Unexpected format string character: '%c'", ch);
47727 }
__Pyx_BufFmt_DescribeTypeChar(char ch,int is_complex)47728 static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
47729   switch (ch) {
47730     case 'c': return "'char'";
47731     case 'b': return "'signed char'";
47732     case 'B': return "'unsigned char'";
47733     case 'h': return "'short'";
47734     case 'H': return "'unsigned short'";
47735     case 'i': return "'int'";
47736     case 'I': return "'unsigned int'";
47737     case 'l': return "'long'";
47738     case 'L': return "'unsigned long'";
47739     case 'q': return "'long long'";
47740     case 'Q': return "'unsigned long long'";
47741     case 'f': return (is_complex ? "'complex float'" : "'float'");
47742     case 'd': return (is_complex ? "'complex double'" : "'double'");
47743     case 'g': return (is_complex ? "'complex long double'" : "'long double'");
47744     case 'T': return "a struct";
47745     case 'O': return "Python object";
47746     case 'P': return "a pointer";
47747     case 's': case 'p': return "a string";
47748     case 0: return "end";
47749     default: return "unparseable format string";
47750   }
47751 }
__Pyx_BufFmt_TypeCharToStandardSize(char ch,int is_complex)47752 static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
47753   switch (ch) {
47754     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
47755     case 'h': case 'H': return 2;
47756     case 'i': case 'I': case 'l': case 'L': return 4;
47757     case 'q': case 'Q': return 8;
47758     case 'f': return (is_complex ? 8 : 4);
47759     case 'd': return (is_complex ? 16 : 8);
47760     case 'g': {
47761       PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
47762       return 0;
47763     }
47764     case 'O': case 'P': return sizeof(void*);
47765     default:
47766       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
47767       return 0;
47768     }
47769 }
__Pyx_BufFmt_TypeCharToNativeSize(char ch,int is_complex)47770 static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
47771   switch (ch) {
47772     case 'c': case 'b': case 'B': case 's': case 'p': return 1;
47773     case 'h': case 'H': return sizeof(short);
47774     case 'i': case 'I': return sizeof(int);
47775     case 'l': case 'L': return sizeof(long);
47776     #ifdef HAVE_LONG_LONG
47777     case 'q': case 'Q': return sizeof(PY_LONG_LONG);
47778     #endif
47779     case 'f': return sizeof(float) * (is_complex ? 2 : 1);
47780     case 'd': return sizeof(double) * (is_complex ? 2 : 1);
47781     case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
47782     case 'O': case 'P': return sizeof(void*);
47783     default: {
47784       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
47785       return 0;
47786     }
47787   }
47788 }
47789 typedef struct { char c; short x; } __Pyx_st_short;
47790 typedef struct { char c; int x; } __Pyx_st_int;
47791 typedef struct { char c; long x; } __Pyx_st_long;
47792 typedef struct { char c; float x; } __Pyx_st_float;
47793 typedef struct { char c; double x; } __Pyx_st_double;
47794 typedef struct { char c; long double x; } __Pyx_st_longdouble;
47795 typedef struct { char c; void *x; } __Pyx_st_void_p;
47796 #ifdef HAVE_LONG_LONG
47797 typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
47798 #endif
__Pyx_BufFmt_TypeCharToAlignment(char ch,CYTHON_UNUSED int is_complex)47799 static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
47800   switch (ch) {
47801     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
47802     case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
47803     case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
47804     case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
47805 #ifdef HAVE_LONG_LONG
47806     case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
47807 #endif
47808     case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
47809     case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
47810     case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
47811     case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
47812     default:
47813       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
47814       return 0;
47815     }
47816 }
47817 /* These are for computing the padding at the end of the struct to align
47818    on the first member of the struct. This will probably the same as above,
47819    but we don't have any guarantees.
47820  */
47821 typedef struct { short x; char c; } __Pyx_pad_short;
47822 typedef struct { int x; char c; } __Pyx_pad_int;
47823 typedef struct { long x; char c; } __Pyx_pad_long;
47824 typedef struct { float x; char c; } __Pyx_pad_float;
47825 typedef struct { double x; char c; } __Pyx_pad_double;
47826 typedef struct { long double x; char c; } __Pyx_pad_longdouble;
47827 typedef struct { void *x; char c; } __Pyx_pad_void_p;
47828 #ifdef HAVE_LONG_LONG
47829 typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
47830 #endif
__Pyx_BufFmt_TypeCharToPadding(char ch,CYTHON_UNUSED int is_complex)47831 static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
47832   switch (ch) {
47833     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
47834     case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
47835     case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
47836     case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
47837 #ifdef HAVE_LONG_LONG
47838     case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
47839 #endif
47840     case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
47841     case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
47842     case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
47843     case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
47844     default:
47845       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
47846       return 0;
47847     }
47848 }
__Pyx_BufFmt_TypeCharToGroup(char ch,int is_complex)47849 static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
47850   switch (ch) {
47851     case 'c':
47852         return 'H';
47853     case 'b': case 'h': case 'i':
47854     case 'l': case 'q': case 's': case 'p':
47855         return 'I';
47856     case 'B': case 'H': case 'I': case 'L': case 'Q':
47857         return 'U';
47858     case 'f': case 'd': case 'g':
47859         return (is_complex ? 'C' : 'R');
47860     case 'O':
47861         return 'O';
47862     case 'P':
47863         return 'P';
47864     default: {
47865       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
47866       return 0;
47867     }
47868   }
47869 }
__Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context * ctx)47870 static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
47871   if (ctx->head == NULL || ctx->head->field == &ctx->root) {
47872     const char* expected;
47873     const char* quote;
47874     if (ctx->head == NULL) {
47875       expected = "end";
47876       quote = "";
47877     } else {
47878       expected = ctx->head->field->type->name;
47879       quote = "'";
47880     }
47881     PyErr_Format(PyExc_ValueError,
47882                  "Buffer dtype mismatch, expected %s%s%s but got %s",
47883                  quote, expected, quote,
47884                  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
47885   } else {
47886     __Pyx_StructField* field = ctx->head->field;
47887     __Pyx_StructField* parent = (ctx->head - 1)->field;
47888     PyErr_Format(PyExc_ValueError,
47889                  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
47890                  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
47891                  parent->type->name, field->name);
47892   }
47893 }
__Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context * ctx)47894 static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
47895   char group;
47896   size_t size, offset, arraysize = 1;
47897   if (ctx->enc_type == 0) return 0;
47898   if (ctx->head->field->type->arraysize[0]) {
47899     int i, ndim = 0;
47900     if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
47901         ctx->is_valid_array = ctx->head->field->type->ndim == 1;
47902         ndim = 1;
47903         if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
47904             PyErr_Format(PyExc_ValueError,
47905                          "Expected a dimension of size %zu, got %zu",
47906                          ctx->head->field->type->arraysize[0], ctx->enc_count);
47907             return -1;
47908         }
47909     }
47910     if (!ctx->is_valid_array) {
47911       PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
47912                    ctx->head->field->type->ndim, ndim);
47913       return -1;
47914     }
47915     for (i = 0; i < ctx->head->field->type->ndim; i++) {
47916       arraysize *= ctx->head->field->type->arraysize[i];
47917     }
47918     ctx->is_valid_array = 0;
47919     ctx->enc_count = 1;
47920   }
47921   group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
47922   do {
47923     __Pyx_StructField* field = ctx->head->field;
47924     __Pyx_TypeInfo* type = field->type;
47925     if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
47926       size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
47927     } else {
47928       size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
47929     }
47930     if (ctx->enc_packmode == '@') {
47931       size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
47932       size_t align_mod_offset;
47933       if (align_at == 0) return -1;
47934       align_mod_offset = ctx->fmt_offset % align_at;
47935       if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
47936       if (ctx->struct_alignment == 0)
47937           ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
47938                                                                  ctx->is_complex);
47939     }
47940     if (type->size != size || type->typegroup != group) {
47941       if (type->typegroup == 'C' && type->fields != NULL) {
47942         size_t parent_offset = ctx->head->parent_offset + field->offset;
47943         ++ctx->head;
47944         ctx->head->field = type->fields;
47945         ctx->head->parent_offset = parent_offset;
47946         continue;
47947       }
47948       if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
47949       } else {
47950           __Pyx_BufFmt_RaiseExpected(ctx);
47951           return -1;
47952       }
47953     }
47954     offset = ctx->head->parent_offset + field->offset;
47955     if (ctx->fmt_offset != offset) {
47956       PyErr_Format(PyExc_ValueError,
47957                    "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
47958                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
47959       return -1;
47960     }
47961     ctx->fmt_offset += size;
47962     if (arraysize)
47963       ctx->fmt_offset += (arraysize - 1) * size;
47964     --ctx->enc_count;
47965     while (1) {
47966       if (field == &ctx->root) {
47967         ctx->head = NULL;
47968         if (ctx->enc_count != 0) {
47969           __Pyx_BufFmt_RaiseExpected(ctx);
47970           return -1;
47971         }
47972         break;
47973       }
47974       ctx->head->field = ++field;
47975       if (field->type == NULL) {
47976         --ctx->head;
47977         field = ctx->head->field;
47978         continue;
47979       } else if (field->type->typegroup == 'S') {
47980         size_t parent_offset = ctx->head->parent_offset + field->offset;
47981         if (field->type->fields->type == NULL) continue;
47982         field = field->type->fields;
47983         ++ctx->head;
47984         ctx->head->field = field;
47985         ctx->head->parent_offset = parent_offset;
47986         break;
47987       } else {
47988         break;
47989       }
47990     }
47991   } while (ctx->enc_count);
47992   ctx->enc_type = 0;
47993   ctx->is_complex = 0;
47994   return 0;
47995 }
47996 static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context * ctx,const char ** tsp)47997 __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
47998 {
47999     const char *ts = *tsp;
48000     int i = 0, number;
48001     int ndim = ctx->head->field->type->ndim;
48002 ;
48003     ++ts;
48004     if (ctx->new_count != 1) {
48005         PyErr_SetString(PyExc_ValueError,
48006                         "Cannot handle repeated arrays in format string");
48007         return NULL;
48008     }
48009     if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
48010     while (*ts && *ts != ')') {
48011         switch (*ts) {
48012             case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
48013             default:  break;
48014         }
48015         number = __Pyx_BufFmt_ExpectNumber(&ts);
48016         if (number == -1) return NULL;
48017         if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
48018             return PyErr_Format(PyExc_ValueError,
48019                         "Expected a dimension of size %zu, got %d",
48020                         ctx->head->field->type->arraysize[i], number);
48021         if (*ts != ',' && *ts != ')')
48022             return PyErr_Format(PyExc_ValueError,
48023                                 "Expected a comma in format string, got '%c'", *ts);
48024         if (*ts == ',') ts++;
48025         i++;
48026     }
48027     if (i != ndim)
48028         return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
48029                             ctx->head->field->type->ndim, i);
48030     if (!*ts) {
48031         PyErr_SetString(PyExc_ValueError,
48032                         "Unexpected end of format string, expected ')'");
48033         return NULL;
48034     }
48035     ctx->is_valid_array = 1;
48036     ctx->new_count = 1;
48037     *tsp = ++ts;
48038     return Py_None;
48039 }
__Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context * ctx,const char * ts)48040 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
48041   int got_Z = 0;
48042   while (1) {
48043     switch(*ts) {
48044       case 0:
48045         if (ctx->enc_type != 0 && ctx->head == NULL) {
48046           __Pyx_BufFmt_RaiseExpected(ctx);
48047           return NULL;
48048         }
48049         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
48050         if (ctx->head != NULL) {
48051           __Pyx_BufFmt_RaiseExpected(ctx);
48052           return NULL;
48053         }
48054         return ts;
48055       case ' ':
48056       case '\r':
48057       case '\n':
48058         ++ts;
48059         break;
48060       case '<':
48061         if (!__Pyx_Is_Little_Endian()) {
48062           PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
48063           return NULL;
48064         }
48065         ctx->new_packmode = '=';
48066         ++ts;
48067         break;
48068       case '>':
48069       case '!':
48070         if (__Pyx_Is_Little_Endian()) {
48071           PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
48072           return NULL;
48073         }
48074         ctx->new_packmode = '=';
48075         ++ts;
48076         break;
48077       case '=':
48078       case '@':
48079       case '^':
48080         ctx->new_packmode = *ts++;
48081         break;
48082       case 'T':
48083         {
48084           const char* ts_after_sub;
48085           size_t i, struct_count = ctx->new_count;
48086           size_t struct_alignment = ctx->struct_alignment;
48087           ctx->new_count = 1;
48088           ++ts;
48089           if (*ts != '{') {
48090             PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
48091             return NULL;
48092           }
48093           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
48094           ctx->enc_type = 0;
48095           ctx->enc_count = 0;
48096           ctx->struct_alignment = 0;
48097           ++ts;
48098           ts_after_sub = ts;
48099           for (i = 0; i != struct_count; ++i) {
48100             ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
48101             if (!ts_after_sub) return NULL;
48102           }
48103           ts = ts_after_sub;
48104           if (struct_alignment) ctx->struct_alignment = struct_alignment;
48105         }
48106         break;
48107       case '}':
48108         {
48109           size_t alignment = ctx->struct_alignment;
48110           ++ts;
48111           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
48112           ctx->enc_type = 0;
48113           if (alignment && ctx->fmt_offset % alignment) {
48114             ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
48115           }
48116         }
48117         return ts;
48118       case 'x':
48119         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
48120         ctx->fmt_offset += ctx->new_count;
48121         ctx->new_count = 1;
48122         ctx->enc_count = 0;
48123         ctx->enc_type = 0;
48124         ctx->enc_packmode = ctx->new_packmode;
48125         ++ts;
48126         break;
48127       case 'Z':
48128         got_Z = 1;
48129         ++ts;
48130         if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
48131           __Pyx_BufFmt_RaiseUnexpectedChar('Z');
48132           return NULL;
48133         }
48134         CYTHON_FALLTHROUGH;
48135       case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
48136       case 'l': case 'L': case 'q': case 'Q':
48137       case 'f': case 'd': case 'g':
48138       case 'O': case 'p':
48139         if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
48140             ctx->enc_packmode == ctx->new_packmode) {
48141           ctx->enc_count += ctx->new_count;
48142           ctx->new_count = 1;
48143           got_Z = 0;
48144           ++ts;
48145           break;
48146         }
48147         CYTHON_FALLTHROUGH;
48148       case 's':
48149         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
48150         ctx->enc_count = ctx->new_count;
48151         ctx->enc_packmode = ctx->new_packmode;
48152         ctx->enc_type = *ts;
48153         ctx->is_complex = got_Z;
48154         ++ts;
48155         ctx->new_count = 1;
48156         got_Z = 0;
48157         break;
48158       case ':':
48159         ++ts;
48160         while(*ts != ':') ++ts;
48161         ++ts;
48162         break;
48163       case '(':
48164         if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
48165         break;
48166       default:
48167         {
48168           int number = __Pyx_BufFmt_ExpectNumber(&ts);
48169           if (number == -1) return NULL;
48170           ctx->new_count = (size_t)number;
48171         }
48172     }
48173   }
48174 }
48175 
48176 /* BufferGetAndValidate */
__Pyx_SafeReleaseBuffer(Py_buffer * info)48177   static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
48178   if (unlikely(info->buf == NULL)) return;
48179   if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
48180   __Pyx_ReleaseBuffer(info);
48181 }
__Pyx_ZeroBuffer(Py_buffer * buf)48182 static void __Pyx_ZeroBuffer(Py_buffer* buf) {
48183   buf->buf = NULL;
48184   buf->obj = NULL;
48185   buf->strides = __Pyx_zeros;
48186   buf->shape = __Pyx_zeros;
48187   buf->suboffsets = __Pyx_minusones;
48188 }
__Pyx__GetBufferAndValidate(Py_buffer * buf,PyObject * obj,__Pyx_TypeInfo * dtype,int flags,int nd,int cast,__Pyx_BufFmt_StackElem * stack)48189 static int __Pyx__GetBufferAndValidate(
48190         Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
48191         int nd, int cast, __Pyx_BufFmt_StackElem* stack)
48192 {
48193   buf->buf = NULL;
48194   if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {
48195     __Pyx_ZeroBuffer(buf);
48196     return -1;
48197   }
48198   if (unlikely(buf->ndim != nd)) {
48199     PyErr_Format(PyExc_ValueError,
48200                  "Buffer has wrong number of dimensions (expected %d, got %d)",
48201                  nd, buf->ndim);
48202     goto fail;
48203   }
48204   if (!cast) {
48205     __Pyx_BufFmt_Context ctx;
48206     __Pyx_BufFmt_Init(&ctx, stack, dtype);
48207     if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
48208   }
48209   if (unlikely((size_t)buf->itemsize != dtype->size)) {
48210     PyErr_Format(PyExc_ValueError,
48211       "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
48212       buf->itemsize, (buf->itemsize > 1) ? "s" : "",
48213       dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
48214     goto fail;
48215   }
48216   if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
48217   return 0;
48218 fail:;
48219   __Pyx_SafeReleaseBuffer(buf);
48220   return -1;
48221 }
48222 
48223 /* PyDictVersioning */
48224   #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
__Pyx_get_tp_dict_version(PyObject * obj)48225 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
48226     PyObject *dict = Py_TYPE(obj)->tp_dict;
48227     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
48228 }
__Pyx_get_object_dict_version(PyObject * obj)48229 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
48230     PyObject **dictptr = NULL;
48231     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
48232     if (offset) {
48233 #if CYTHON_COMPILING_IN_CPYTHON
48234         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
48235 #else
48236         dictptr = _PyObject_GetDictPtr(obj);
48237 #endif
48238     }
48239     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
48240 }
__Pyx_object_dict_version_matches(PyObject * obj,PY_UINT64_T tp_dict_version,PY_UINT64_T obj_dict_version)48241 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
48242     PyObject *dict = Py_TYPE(obj)->tp_dict;
48243     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
48244         return 0;
48245     return obj_dict_version == __Pyx_get_object_dict_version(obj);
48246 }
48247 #endif
48248 
48249 /* GetModuleGlobalName */
48250   #if CYTHON_USE_DICT_VERSIONS
__Pyx__GetModuleGlobalName(PyObject * name,PY_UINT64_T * dict_version,PyObject ** dict_cached_value)48251 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
48252 #else
48253 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
48254 #endif
48255 {
48256     PyObject *result;
48257 #if !CYTHON_AVOID_BORROWED_REFS
48258 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
48259     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
48260     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
48261     if (likely(result)) {
48262         return __Pyx_NewRef(result);
48263     } else if (unlikely(PyErr_Occurred())) {
48264         return NULL;
48265     }
48266 #else
48267     result = PyDict_GetItem(__pyx_d, name);
48268     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
48269     if (likely(result)) {
48270         return __Pyx_NewRef(result);
48271     }
48272 #endif
48273 #else
48274     result = PyObject_GetItem(__pyx_d, name);
48275     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
48276     if (likely(result)) {
48277         return __Pyx_NewRef(result);
48278     }
48279     PyErr_Clear();
48280 #endif
48281     return __Pyx_GetBuiltinName(name);
48282 }
48283 
48284 /* GetItemInt */
__Pyx_GetItemInt_Generic(PyObject * o,PyObject * j)48285   static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
48286     PyObject *r;
48287     if (!j) return NULL;
48288     r = PyObject_GetItem(o, j);
48289     Py_DECREF(j);
48290     return r;
48291 }
__Pyx_GetItemInt_List_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)48292 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
48293                                                               CYTHON_NCP_UNUSED int wraparound,
48294                                                               CYTHON_NCP_UNUSED int boundscheck) {
48295 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
48296     Py_ssize_t wrapped_i = i;
48297     if (wraparound & unlikely(i < 0)) {
48298         wrapped_i += PyList_GET_SIZE(o);
48299     }
48300     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
48301         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
48302         Py_INCREF(r);
48303         return r;
48304     }
48305     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
48306 #else
48307     return PySequence_GetItem(o, i);
48308 #endif
48309 }
__Pyx_GetItemInt_Tuple_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)48310 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
48311                                                               CYTHON_NCP_UNUSED int wraparound,
48312                                                               CYTHON_NCP_UNUSED int boundscheck) {
48313 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
48314     Py_ssize_t wrapped_i = i;
48315     if (wraparound & unlikely(i < 0)) {
48316         wrapped_i += PyTuple_GET_SIZE(o);
48317     }
48318     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
48319         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
48320         Py_INCREF(r);
48321         return r;
48322     }
48323     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
48324 #else
48325     return PySequence_GetItem(o, i);
48326 #endif
48327 }
__Pyx_GetItemInt_Fast(PyObject * o,Py_ssize_t i,int is_list,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)48328 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
48329                                                      CYTHON_NCP_UNUSED int wraparound,
48330                                                      CYTHON_NCP_UNUSED int boundscheck) {
48331 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
48332     if (is_list || PyList_CheckExact(o)) {
48333         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
48334         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
48335             PyObject *r = PyList_GET_ITEM(o, n);
48336             Py_INCREF(r);
48337             return r;
48338         }
48339     }
48340     else if (PyTuple_CheckExact(o)) {
48341         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
48342         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
48343             PyObject *r = PyTuple_GET_ITEM(o, n);
48344             Py_INCREF(r);
48345             return r;
48346         }
48347     } else {
48348         PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
48349         if (likely(m && m->sq_item)) {
48350             if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
48351                 Py_ssize_t l = m->sq_length(o);
48352                 if (likely(l >= 0)) {
48353                     i += l;
48354                 } else {
48355                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
48356                         return NULL;
48357                     PyErr_Clear();
48358                 }
48359             }
48360             return m->sq_item(o, i);
48361         }
48362     }
48363 #else
48364     if (is_list || PySequence_Check(o)) {
48365         return PySequence_GetItem(o, i);
48366     }
48367 #endif
48368     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
48369 }
48370 
48371 /* ObjectGetItem */
48372   #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetIndex(PyObject * obj,PyObject * index)48373 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
48374     PyObject *runerr;
48375     Py_ssize_t key_value;
48376     PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
48377     if (unlikely(!(m && m->sq_item))) {
48378         PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
48379         return NULL;
48380     }
48381     key_value = __Pyx_PyIndex_AsSsize_t(index);
48382     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
48383         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
48384     }
48385     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
48386         PyErr_Clear();
48387         PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
48388     }
48389     return NULL;
48390 }
__Pyx_PyObject_GetItem(PyObject * obj,PyObject * key)48391 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
48392     PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
48393     if (likely(m && m->mp_subscript)) {
48394         return m->mp_subscript(obj, key);
48395     }
48396     return __Pyx_PyObject_GetIndex(obj, key);
48397 }
48398 #endif
48399 
48400 /* PyObjectCall2Args */
__Pyx_PyObject_Call2Args(PyObject * function,PyObject * arg1,PyObject * arg2)48401   static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
48402     PyObject *args, *result = NULL;
48403     #if CYTHON_FAST_PYCALL
48404     if (PyFunction_Check(function)) {
48405         PyObject *args[2] = {arg1, arg2};
48406         return __Pyx_PyFunction_FastCall(function, args, 2);
48407     }
48408     #endif
48409     #if CYTHON_FAST_PYCCALL
48410     if (__Pyx_PyFastCFunction_Check(function)) {
48411         PyObject *args[2] = {arg1, arg2};
48412         return __Pyx_PyCFunction_FastCall(function, args, 2);
48413     }
48414     #endif
48415     args = PyTuple_New(2);
48416     if (unlikely(!args)) goto done;
48417     Py_INCREF(arg1);
48418     PyTuple_SET_ITEM(args, 0, arg1);
48419     Py_INCREF(arg2);
48420     PyTuple_SET_ITEM(args, 1, arg2);
48421     Py_INCREF(function);
48422     result = __Pyx_PyObject_Call(function, args, NULL);
48423     Py_DECREF(args);
48424     Py_DECREF(function);
48425 done:
48426     return result;
48427 }
48428 
48429 /* PyErrFetchRestore */
48430   #if CYTHON_FAST_THREAD_STATE
__Pyx_ErrRestoreInState(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)48431 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
48432     PyObject *tmp_type, *tmp_value, *tmp_tb;
48433     tmp_type = tstate->curexc_type;
48434     tmp_value = tstate->curexc_value;
48435     tmp_tb = tstate->curexc_traceback;
48436     tstate->curexc_type = type;
48437     tstate->curexc_value = value;
48438     tstate->curexc_traceback = tb;
48439     Py_XDECREF(tmp_type);
48440     Py_XDECREF(tmp_value);
48441     Py_XDECREF(tmp_tb);
48442 }
__Pyx_ErrFetchInState(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)48443 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
48444     *type = tstate->curexc_type;
48445     *value = tstate->curexc_value;
48446     *tb = tstate->curexc_traceback;
48447     tstate->curexc_type = 0;
48448     tstate->curexc_value = 0;
48449     tstate->curexc_traceback = 0;
48450 }
48451 #endif
48452 
48453 /* WriteUnraisableException */
__Pyx_WriteUnraisable(const char * name,CYTHON_UNUSED int clineno,CYTHON_UNUSED int lineno,CYTHON_UNUSED const char * filename,int full_traceback,CYTHON_UNUSED int nogil)48454   static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
48455                                   CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
48456                                   int full_traceback, CYTHON_UNUSED int nogil) {
48457     PyObject *old_exc, *old_val, *old_tb;
48458     PyObject *ctx;
48459     __Pyx_PyThreadState_declare
48460 #ifdef WITH_THREAD
48461     PyGILState_STATE state;
48462     if (nogil)
48463         state = PyGILState_Ensure();
48464 #ifdef _MSC_VER
48465     else state = (PyGILState_STATE)-1;
48466 #endif
48467 #endif
48468     __Pyx_PyThreadState_assign
48469     __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
48470     if (full_traceback) {
48471         Py_XINCREF(old_exc);
48472         Py_XINCREF(old_val);
48473         Py_XINCREF(old_tb);
48474         __Pyx_ErrRestore(old_exc, old_val, old_tb);
48475         PyErr_PrintEx(1);
48476     }
48477     #if PY_MAJOR_VERSION < 3
48478     ctx = PyString_FromString(name);
48479     #else
48480     ctx = PyUnicode_FromString(name);
48481     #endif
48482     __Pyx_ErrRestore(old_exc, old_val, old_tb);
48483     if (!ctx) {
48484         PyErr_WriteUnraisable(Py_None);
48485     } else {
48486         PyErr_WriteUnraisable(ctx);
48487         Py_DECREF(ctx);
48488     }
48489 #ifdef WITH_THREAD
48490     if (nogil)
48491         PyGILState_Release(state);
48492 #endif
48493 }
48494 
48495 /* RaiseException */
48496   #if PY_MAJOR_VERSION < 3
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,CYTHON_UNUSED PyObject * cause)48497 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
48498                         CYTHON_UNUSED PyObject *cause) {
48499     __Pyx_PyThreadState_declare
48500     Py_XINCREF(type);
48501     if (!value || value == Py_None)
48502         value = NULL;
48503     else
48504         Py_INCREF(value);
48505     if (!tb || tb == Py_None)
48506         tb = NULL;
48507     else {
48508         Py_INCREF(tb);
48509         if (!PyTraceBack_Check(tb)) {
48510             PyErr_SetString(PyExc_TypeError,
48511                 "raise: arg 3 must be a traceback or None");
48512             goto raise_error;
48513         }
48514     }
48515     if (PyType_Check(type)) {
48516 #if CYTHON_COMPILING_IN_PYPY
48517         if (!value) {
48518             Py_INCREF(Py_None);
48519             value = Py_None;
48520         }
48521 #endif
48522         PyErr_NormalizeException(&type, &value, &tb);
48523     } else {
48524         if (value) {
48525             PyErr_SetString(PyExc_TypeError,
48526                 "instance exception may not have a separate value");
48527             goto raise_error;
48528         }
48529         value = type;
48530         type = (PyObject*) Py_TYPE(type);
48531         Py_INCREF(type);
48532         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
48533             PyErr_SetString(PyExc_TypeError,
48534                 "raise: exception class must be a subclass of BaseException");
48535             goto raise_error;
48536         }
48537     }
48538     __Pyx_PyThreadState_assign
48539     __Pyx_ErrRestore(type, value, tb);
48540     return;
48541 raise_error:
48542     Py_XDECREF(value);
48543     Py_XDECREF(type);
48544     Py_XDECREF(tb);
48545     return;
48546 }
48547 #else
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,PyObject * cause)48548 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
48549     PyObject* owned_instance = NULL;
48550     if (tb == Py_None) {
48551         tb = 0;
48552     } else if (tb && !PyTraceBack_Check(tb)) {
48553         PyErr_SetString(PyExc_TypeError,
48554             "raise: arg 3 must be a traceback or None");
48555         goto bad;
48556     }
48557     if (value == Py_None)
48558         value = 0;
48559     if (PyExceptionInstance_Check(type)) {
48560         if (value) {
48561             PyErr_SetString(PyExc_TypeError,
48562                 "instance exception may not have a separate value");
48563             goto bad;
48564         }
48565         value = type;
48566         type = (PyObject*) Py_TYPE(value);
48567     } else if (PyExceptionClass_Check(type)) {
48568         PyObject *instance_class = NULL;
48569         if (value && PyExceptionInstance_Check(value)) {
48570             instance_class = (PyObject*) Py_TYPE(value);
48571             if (instance_class != type) {
48572                 int is_subclass = PyObject_IsSubclass(instance_class, type);
48573                 if (!is_subclass) {
48574                     instance_class = NULL;
48575                 } else if (unlikely(is_subclass == -1)) {
48576                     goto bad;
48577                 } else {
48578                     type = instance_class;
48579                 }
48580             }
48581         }
48582         if (!instance_class) {
48583             PyObject *args;
48584             if (!value)
48585                 args = PyTuple_New(0);
48586             else if (PyTuple_Check(value)) {
48587                 Py_INCREF(value);
48588                 args = value;
48589             } else
48590                 args = PyTuple_Pack(1, value);
48591             if (!args)
48592                 goto bad;
48593             owned_instance = PyObject_Call(type, args, NULL);
48594             Py_DECREF(args);
48595             if (!owned_instance)
48596                 goto bad;
48597             value = owned_instance;
48598             if (!PyExceptionInstance_Check(value)) {
48599                 PyErr_Format(PyExc_TypeError,
48600                              "calling %R should have returned an instance of "
48601                              "BaseException, not %R",
48602                              type, Py_TYPE(value));
48603                 goto bad;
48604             }
48605         }
48606     } else {
48607         PyErr_SetString(PyExc_TypeError,
48608             "raise: exception class must be a subclass of BaseException");
48609         goto bad;
48610     }
48611     if (cause) {
48612         PyObject *fixed_cause;
48613         if (cause == Py_None) {
48614             fixed_cause = NULL;
48615         } else if (PyExceptionClass_Check(cause)) {
48616             fixed_cause = PyObject_CallObject(cause, NULL);
48617             if (fixed_cause == NULL)
48618                 goto bad;
48619         } else if (PyExceptionInstance_Check(cause)) {
48620             fixed_cause = cause;
48621             Py_INCREF(fixed_cause);
48622         } else {
48623             PyErr_SetString(PyExc_TypeError,
48624                             "exception causes must derive from "
48625                             "BaseException");
48626             goto bad;
48627         }
48628         PyException_SetCause(value, fixed_cause);
48629     }
48630     PyErr_SetObject(type, value);
48631     if (tb) {
48632 #if CYTHON_COMPILING_IN_PYPY
48633         PyObject *tmp_type, *tmp_value, *tmp_tb;
48634         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
48635         Py_INCREF(tb);
48636         PyErr_Restore(tmp_type, tmp_value, tb);
48637         Py_XDECREF(tmp_tb);
48638 #else
48639         PyThreadState *tstate = __Pyx_PyThreadState_Current;
48640         PyObject* tmp_tb = tstate->curexc_traceback;
48641         if (tb != tmp_tb) {
48642             Py_INCREF(tb);
48643             tstate->curexc_traceback = tb;
48644             Py_XDECREF(tmp_tb);
48645         }
48646 #endif
48647     }
48648 bad:
48649     Py_XDECREF(owned_instance);
48650     return;
48651 }
48652 #endif
48653 
48654 /* ArgTypeTest */
__Pyx__ArgTypeTest(PyObject * obj,PyTypeObject * type,const char * name,int exact)48655   static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
48656 {
48657     if (unlikely(!type)) {
48658         PyErr_SetString(PyExc_SystemError, "Missing type object");
48659         return 0;
48660     }
48661     else if (exact) {
48662         #if PY_MAJOR_VERSION == 2
48663         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
48664         #endif
48665     }
48666     else {
48667         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
48668     }
48669     PyErr_Format(PyExc_TypeError,
48670         "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
48671         name, type->tp_name, Py_TYPE(obj)->tp_name);
48672     return 0;
48673 }
48674 
48675 /* BufferIndexError */
__Pyx_RaiseBufferIndexError(int axis)48676   static void __Pyx_RaiseBufferIndexError(int axis) {
48677   PyErr_Format(PyExc_IndexError,
48678      "Out of bounds on buffer access (axis %d)", axis);
48679 }
48680 
48681 /* KeywordStringCheck */
__Pyx_CheckKeywordStrings(PyObject * kwdict,const char * function_name,int kw_allowed)48682   static int __Pyx_CheckKeywordStrings(
48683     PyObject *kwdict,
48684     const char* function_name,
48685     int kw_allowed)
48686 {
48687     PyObject* key = 0;
48688     Py_ssize_t pos = 0;
48689 #if CYTHON_COMPILING_IN_PYPY
48690     if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
48691         goto invalid_keyword;
48692     return 1;
48693 #else
48694     while (PyDict_Next(kwdict, &pos, &key, 0)) {
48695         #if PY_MAJOR_VERSION < 3
48696         if (unlikely(!PyString_Check(key)))
48697         #endif
48698             if (unlikely(!PyUnicode_Check(key)))
48699                 goto invalid_keyword_type;
48700     }
48701     if ((!kw_allowed) && unlikely(key))
48702         goto invalid_keyword;
48703     return 1;
48704 invalid_keyword_type:
48705     PyErr_Format(PyExc_TypeError,
48706         "%.200s() keywords must be strings", function_name);
48707     return 0;
48708 #endif
48709 invalid_keyword:
48710     PyErr_Format(PyExc_TypeError,
48711     #if PY_MAJOR_VERSION < 3
48712         "%.200s() got an unexpected keyword argument '%.200s'",
48713         function_name, PyString_AsString(key));
48714     #else
48715         "%s() got an unexpected keyword argument '%U'",
48716         function_name, key);
48717     #endif
48718     return 0;
48719 }
48720 
48721 /* MemviewSliceInit */
48722   static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj * memview,int ndim,__Pyx_memviewslice * memviewslice,int memview_is_new_reference)48723 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
48724                         int ndim,
48725                         __Pyx_memviewslice *memviewslice,
48726                         int memview_is_new_reference)
48727 {
48728     __Pyx_RefNannyDeclarations
48729     int i, retval=-1;
48730     Py_buffer *buf = &memview->view;
48731     __Pyx_RefNannySetupContext("init_memviewslice", 0);
48732     if (memviewslice->memview || memviewslice->data) {
48733         PyErr_SetString(PyExc_ValueError,
48734             "memviewslice is already initialized!");
48735         goto fail;
48736     }
48737     if (buf->strides) {
48738         for (i = 0; i < ndim; i++) {
48739             memviewslice->strides[i] = buf->strides[i];
48740         }
48741     } else {
48742         Py_ssize_t stride = buf->itemsize;
48743         for (i = ndim - 1; i >= 0; i--) {
48744             memviewslice->strides[i] = stride;
48745             stride *= buf->shape[i];
48746         }
48747     }
48748     for (i = 0; i < ndim; i++) {
48749         memviewslice->shape[i]   = buf->shape[i];
48750         if (buf->suboffsets) {
48751             memviewslice->suboffsets[i] = buf->suboffsets[i];
48752         } else {
48753             memviewslice->suboffsets[i] = -1;
48754         }
48755     }
48756     memviewslice->memview = memview;
48757     memviewslice->data = (char *)buf->buf;
48758     if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
48759         Py_INCREF(memview);
48760     }
48761     retval = 0;
48762     goto no_fail;
48763 fail:
48764     memviewslice->memview = 0;
48765     memviewslice->data = 0;
48766     retval = -1;
48767 no_fail:
48768     __Pyx_RefNannyFinishContext();
48769     return retval;
48770 }
48771 #ifndef Py_NO_RETURN
48772 #define Py_NO_RETURN
48773 #endif
__pyx_fatalerror(const char * fmt,...)48774 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
48775     va_list vargs;
48776     char msg[200];
48777 #ifdef HAVE_STDARG_PROTOTYPES
48778     va_start(vargs, fmt);
48779 #else
48780     va_start(vargs);
48781 #endif
48782     vsnprintf(msg, 200, fmt, vargs);
48783     va_end(vargs);
48784     Py_FatalError(msg);
48785 }
48786 static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int * acquisition_count,PyThread_type_lock lock)48787 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
48788                                    PyThread_type_lock lock)
48789 {
48790     int result;
48791     PyThread_acquire_lock(lock, 1);
48792     result = (*acquisition_count)++;
48793     PyThread_release_lock(lock);
48794     return result;
48795 }
48796 static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int * acquisition_count,PyThread_type_lock lock)48797 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
48798                                    PyThread_type_lock lock)
48799 {
48800     int result;
48801     PyThread_acquire_lock(lock, 1);
48802     result = (*acquisition_count)--;
48803     PyThread_release_lock(lock);
48804     return result;
48805 }
48806 static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice * memslice,int have_gil,int lineno)48807 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
48808 {
48809     int first_time;
48810     struct __pyx_memoryview_obj *memview = memslice->memview;
48811     if (!memview || (PyObject *) memview == Py_None)
48812         return;
48813     if (__pyx_get_slice_count(memview) < 0)
48814         __pyx_fatalerror("Acquisition count is %d (line %d)",
48815                          __pyx_get_slice_count(memview), lineno);
48816     first_time = __pyx_add_acquisition_count(memview) == 0;
48817     if (first_time) {
48818         if (have_gil) {
48819             Py_INCREF((PyObject *) memview);
48820         } else {
48821             PyGILState_STATE _gilstate = PyGILState_Ensure();
48822             Py_INCREF((PyObject *) memview);
48823             PyGILState_Release(_gilstate);
48824         }
48825     }
48826 }
__Pyx_XDEC_MEMVIEW(__Pyx_memviewslice * memslice,int have_gil,int lineno)48827 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
48828                                              int have_gil, int lineno) {
48829     int last_time;
48830     struct __pyx_memoryview_obj *memview = memslice->memview;
48831     if (!memview ) {
48832         return;
48833     } else if ((PyObject *) memview == Py_None) {
48834         memslice->memview = NULL;
48835         return;
48836     }
48837     if (__pyx_get_slice_count(memview) <= 0)
48838         __pyx_fatalerror("Acquisition count is %d (line %d)",
48839                          __pyx_get_slice_count(memview), lineno);
48840     last_time = __pyx_sub_acquisition_count(memview) == 1;
48841     memslice->data = NULL;
48842     if (last_time) {
48843         if (have_gil) {
48844             Py_CLEAR(memslice->memview);
48845         } else {
48846             PyGILState_STATE _gilstate = PyGILState_Ensure();
48847             Py_CLEAR(memslice->memview);
48848             PyGILState_Release(_gilstate);
48849         }
48850     } else {
48851         memslice->memview = NULL;
48852     }
48853 }
48854 
48855 /* RaiseTooManyValuesToUnpack */
__Pyx_RaiseTooManyValuesError(Py_ssize_t expected)48856   static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
48857     PyErr_Format(PyExc_ValueError,
48858                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
48859 }
48860 
48861 /* RaiseNeedMoreValuesToUnpack */
__Pyx_RaiseNeedMoreValuesError(Py_ssize_t index)48862   static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
48863     PyErr_Format(PyExc_ValueError,
48864                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
48865                  index, (index == 1) ? "" : "s");
48866 }
48867 
48868 /* IterFinish */
__Pyx_IterFinish(void)48869   static CYTHON_INLINE int __Pyx_IterFinish(void) {
48870 #if CYTHON_FAST_THREAD_STATE
48871     PyThreadState *tstate = __Pyx_PyThreadState_Current;
48872     PyObject* exc_type = tstate->curexc_type;
48873     if (unlikely(exc_type)) {
48874         if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
48875             PyObject *exc_value, *exc_tb;
48876             exc_value = tstate->curexc_value;
48877             exc_tb = tstate->curexc_traceback;
48878             tstate->curexc_type = 0;
48879             tstate->curexc_value = 0;
48880             tstate->curexc_traceback = 0;
48881             Py_DECREF(exc_type);
48882             Py_XDECREF(exc_value);
48883             Py_XDECREF(exc_tb);
48884             return 0;
48885         } else {
48886             return -1;
48887         }
48888     }
48889     return 0;
48890 #else
48891     if (unlikely(PyErr_Occurred())) {
48892         if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
48893             PyErr_Clear();
48894             return 0;
48895         } else {
48896             return -1;
48897         }
48898     }
48899     return 0;
48900 #endif
48901 }
48902 
48903 /* UnpackItemEndCheck */
__Pyx_IternextUnpackEndCheck(PyObject * retval,Py_ssize_t expected)48904   static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
48905     if (unlikely(retval)) {
48906         Py_DECREF(retval);
48907         __Pyx_RaiseTooManyValuesError(expected);
48908         return -1;
48909     } else {
48910         return __Pyx_IterFinish();
48911     }
48912     return 0;
48913 }
48914 
48915 /* BufferFallbackError */
__Pyx_RaiseBufferFallbackError(void)48916   static void __Pyx_RaiseBufferFallbackError(void) {
48917   PyErr_SetString(PyExc_ValueError,
48918      "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
48919 }
48920 
48921 /* PyIntBinop */
48922   #if !CYTHON_COMPILING_IN_PYPY
__Pyx_PyInt_AddObjC(PyObject * op1,PyObject * op2,CYTHON_UNUSED long intval,int inplace,int zerodivision_check)48923 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
48924     (void)inplace;
48925     (void)zerodivision_check;
48926     #if PY_MAJOR_VERSION < 3
48927     if (likely(PyInt_CheckExact(op1))) {
48928         const long b = intval;
48929         long x;
48930         long a = PyInt_AS_LONG(op1);
48931             x = (long)((unsigned long)a + b);
48932             if (likely((x^a) >= 0 || (x^b) >= 0))
48933                 return PyInt_FromLong(x);
48934             return PyLong_Type.tp_as_number->nb_add(op1, op2);
48935     }
48936     #endif
48937     #if CYTHON_USE_PYLONG_INTERNALS
48938     if (likely(PyLong_CheckExact(op1))) {
48939         const long b = intval;
48940         long a, x;
48941 #ifdef HAVE_LONG_LONG
48942         const PY_LONG_LONG llb = intval;
48943         PY_LONG_LONG lla, llx;
48944 #endif
48945         const digit* digits = ((PyLongObject*)op1)->ob_digit;
48946         const Py_ssize_t size = Py_SIZE(op1);
48947         if (likely(__Pyx_sst_abs(size) <= 1)) {
48948             a = likely(size) ? digits[0] : 0;
48949             if (size == -1) a = -a;
48950         } else {
48951             switch (size) {
48952                 case -2:
48953                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
48954                         a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
48955                         break;
48956 #ifdef HAVE_LONG_LONG
48957                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
48958                         lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
48959                         goto long_long;
48960 #endif
48961                     }
48962                     CYTHON_FALLTHROUGH;
48963                 case 2:
48964                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
48965                         a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
48966                         break;
48967 #ifdef HAVE_LONG_LONG
48968                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
48969                         lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
48970                         goto long_long;
48971 #endif
48972                     }
48973                     CYTHON_FALLTHROUGH;
48974                 case -3:
48975                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
48976                         a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
48977                         break;
48978 #ifdef HAVE_LONG_LONG
48979                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
48980                         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]));
48981                         goto long_long;
48982 #endif
48983                     }
48984                     CYTHON_FALLTHROUGH;
48985                 case 3:
48986                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
48987                         a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
48988                         break;
48989 #ifdef HAVE_LONG_LONG
48990                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
48991                         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]));
48992                         goto long_long;
48993 #endif
48994                     }
48995                     CYTHON_FALLTHROUGH;
48996                 case -4:
48997                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
48998                         a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
48999                         break;
49000 #ifdef HAVE_LONG_LONG
49001                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
49002                         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]));
49003                         goto long_long;
49004 #endif
49005                     }
49006                     CYTHON_FALLTHROUGH;
49007                 case 4:
49008                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
49009                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
49010                         break;
49011 #ifdef HAVE_LONG_LONG
49012                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
49013                         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]));
49014                         goto long_long;
49015 #endif
49016                     }
49017                     CYTHON_FALLTHROUGH;
49018                 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
49019             }
49020         }
49021                 x = a + b;
49022             return PyLong_FromLong(x);
49023 #ifdef HAVE_LONG_LONG
49024         long_long:
49025                 llx = lla + llb;
49026             return PyLong_FromLongLong(llx);
49027 #endif
49028 
49029 
49030     }
49031     #endif
49032     if (PyFloat_CheckExact(op1)) {
49033         const long b = intval;
49034         double a = PyFloat_AS_DOUBLE(op1);
49035             double result;
49036             PyFPE_START_PROTECT("add", return NULL)
49037             result = ((double)a) + (double)b;
49038             PyFPE_END_PROTECT(result)
49039             return PyFloat_FromDouble(result);
49040     }
49041     return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
49042 }
49043 #endif
49044 
49045 /* PyErrExceptionMatches */
49046   #if CYTHON_FAST_THREAD_STATE
__Pyx_PyErr_ExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)49047 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
49048     Py_ssize_t i, n;
49049     n = PyTuple_GET_SIZE(tuple);
49050 #if PY_MAJOR_VERSION >= 3
49051     for (i=0; i<n; i++) {
49052         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
49053     }
49054 #endif
49055     for (i=0; i<n; i++) {
49056         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
49057     }
49058     return 0;
49059 }
__Pyx_PyErr_ExceptionMatchesInState(PyThreadState * tstate,PyObject * err)49060 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
49061     PyObject *exc_type = tstate->curexc_type;
49062     if (exc_type == err) return 1;
49063     if (unlikely(!exc_type)) return 0;
49064     if (unlikely(PyTuple_Check(err)))
49065         return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
49066     return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
49067 }
49068 #endif
49069 
49070 /* GetAttr */
__Pyx_GetAttr(PyObject * o,PyObject * n)49071   static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
49072 #if CYTHON_USE_TYPE_SLOTS
49073 #if PY_MAJOR_VERSION >= 3
49074     if (likely(PyUnicode_Check(n)))
49075 #else
49076     if (likely(PyString_Check(n)))
49077 #endif
49078         return __Pyx_PyObject_GetAttrStr(o, n);
49079 #endif
49080     return PyObject_GetAttr(o, n);
49081 }
49082 
49083 /* GetAttr3 */
__Pyx_GetAttr3Default(PyObject * d)49084   static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
49085     __Pyx_PyThreadState_declare
49086     __Pyx_PyThreadState_assign
49087     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
49088         return NULL;
49089     __Pyx_PyErr_Clear();
49090     Py_INCREF(d);
49091     return d;
49092 }
__Pyx_GetAttr3(PyObject * o,PyObject * n,PyObject * d)49093 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
49094     PyObject *r = __Pyx_GetAttr(o, n);
49095     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
49096 }
49097 
49098 /* Import */
__Pyx_Import(PyObject * name,PyObject * from_list,int level)49099   static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
49100     PyObject *empty_list = 0;
49101     PyObject *module = 0;
49102     PyObject *global_dict = 0;
49103     PyObject *empty_dict = 0;
49104     PyObject *list;
49105     #if PY_MAJOR_VERSION < 3
49106     PyObject *py_import;
49107     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
49108     if (!py_import)
49109         goto bad;
49110     #endif
49111     if (from_list)
49112         list = from_list;
49113     else {
49114         empty_list = PyList_New(0);
49115         if (!empty_list)
49116             goto bad;
49117         list = empty_list;
49118     }
49119     global_dict = PyModule_GetDict(__pyx_m);
49120     if (!global_dict)
49121         goto bad;
49122     empty_dict = PyDict_New();
49123     if (!empty_dict)
49124         goto bad;
49125     {
49126         #if PY_MAJOR_VERSION >= 3
49127         if (level == -1) {
49128             if (strchr(__Pyx_MODULE_NAME, '.')) {
49129                 module = PyImport_ImportModuleLevelObject(
49130                     name, global_dict, empty_dict, list, 1);
49131                 if (!module) {
49132                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
49133                         goto bad;
49134                     PyErr_Clear();
49135                 }
49136             }
49137             level = 0;
49138         }
49139         #endif
49140         if (!module) {
49141             #if PY_MAJOR_VERSION < 3
49142             PyObject *py_level = PyInt_FromLong(level);
49143             if (!py_level)
49144                 goto bad;
49145             module = PyObject_CallFunctionObjArgs(py_import,
49146                 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
49147             Py_DECREF(py_level);
49148             #else
49149             module = PyImport_ImportModuleLevelObject(
49150                 name, global_dict, empty_dict, list, level);
49151             #endif
49152         }
49153     }
49154 bad:
49155     #if PY_MAJOR_VERSION < 3
49156     Py_XDECREF(py_import);
49157     #endif
49158     Py_XDECREF(empty_list);
49159     Py_XDECREF(empty_dict);
49160     return module;
49161 }
49162 
49163 /* ImportFrom */
__Pyx_ImportFrom(PyObject * module,PyObject * name)49164   static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
49165     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
49166     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
49167         PyErr_Format(PyExc_ImportError,
49168         #if PY_MAJOR_VERSION < 3
49169             "cannot import name %.230s", PyString_AS_STRING(name));
49170         #else
49171             "cannot import name %S", name);
49172         #endif
49173     }
49174     return value;
49175 }
49176 
49177 /* HasAttr */
__Pyx_HasAttr(PyObject * o,PyObject * n)49178   static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
49179     PyObject *r;
49180     if (unlikely(!__Pyx_PyBaseString_Check(n))) {
49181         PyErr_SetString(PyExc_TypeError,
49182                         "hasattr(): attribute name must be string");
49183         return -1;
49184     }
49185     r = __Pyx_GetAttr(o, n);
49186     if (unlikely(!r)) {
49187         PyErr_Clear();
49188         return 0;
49189     } else {
49190         Py_DECREF(r);
49191         return 1;
49192     }
49193 }
49194 
49195 /* DictGetItem */
49196   #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
__Pyx_PyDict_GetItem(PyObject * d,PyObject * key)49197 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
49198     PyObject *value;
49199     value = PyDict_GetItemWithError(d, key);
49200     if (unlikely(!value)) {
49201         if (!PyErr_Occurred()) {
49202             if (unlikely(PyTuple_Check(key))) {
49203                 PyObject* args = PyTuple_Pack(1, key);
49204                 if (likely(args)) {
49205                     PyErr_SetObject(PyExc_KeyError, args);
49206                     Py_DECREF(args);
49207                 }
49208             } else {
49209                 PyErr_SetObject(PyExc_KeyError, key);
49210             }
49211         }
49212         return NULL;
49213     }
49214     Py_INCREF(value);
49215     return value;
49216 }
49217 #endif
49218 
49219 /* RaiseNoneIterError */
__Pyx_RaiseNoneNotIterableError(void)49220   static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
49221     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
49222 }
49223 
49224 /* GetTopmostException */
49225   #if CYTHON_USE_EXC_INFO_STACK
49226 static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState * tstate)49227 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
49228 {
49229     _PyErr_StackItem *exc_info = tstate->exc_info;
49230     while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
49231            exc_info->previous_item != NULL)
49232     {
49233         exc_info = exc_info->previous_item;
49234     }
49235     return exc_info;
49236 }
49237 #endif
49238 
49239 /* SaveResetException */
49240   #if CYTHON_FAST_THREAD_STATE
__Pyx__ExceptionSave(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)49241 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
49242     #if CYTHON_USE_EXC_INFO_STACK
49243     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
49244     *type = exc_info->exc_type;
49245     *value = exc_info->exc_value;
49246     *tb = exc_info->exc_traceback;
49247     #else
49248     *type = tstate->exc_type;
49249     *value = tstate->exc_value;
49250     *tb = tstate->exc_traceback;
49251     #endif
49252     Py_XINCREF(*type);
49253     Py_XINCREF(*value);
49254     Py_XINCREF(*tb);
49255 }
__Pyx__ExceptionReset(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)49256 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
49257     PyObject *tmp_type, *tmp_value, *tmp_tb;
49258     #if CYTHON_USE_EXC_INFO_STACK
49259     _PyErr_StackItem *exc_info = tstate->exc_info;
49260     tmp_type = exc_info->exc_type;
49261     tmp_value = exc_info->exc_value;
49262     tmp_tb = exc_info->exc_traceback;
49263     exc_info->exc_type = type;
49264     exc_info->exc_value = value;
49265     exc_info->exc_traceback = tb;
49266     #else
49267     tmp_type = tstate->exc_type;
49268     tmp_value = tstate->exc_value;
49269     tmp_tb = tstate->exc_traceback;
49270     tstate->exc_type = type;
49271     tstate->exc_value = value;
49272     tstate->exc_traceback = tb;
49273     #endif
49274     Py_XDECREF(tmp_type);
49275     Py_XDECREF(tmp_value);
49276     Py_XDECREF(tmp_tb);
49277 }
49278 #endif
49279 
49280 /* GetException */
49281   #if CYTHON_FAST_THREAD_STATE
__Pyx__GetException(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)49282 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
49283 #else
49284 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
49285 #endif
49286 {
49287     PyObject *local_type, *local_value, *local_tb;
49288 #if CYTHON_FAST_THREAD_STATE
49289     PyObject *tmp_type, *tmp_value, *tmp_tb;
49290     local_type = tstate->curexc_type;
49291     local_value = tstate->curexc_value;
49292     local_tb = tstate->curexc_traceback;
49293     tstate->curexc_type = 0;
49294     tstate->curexc_value = 0;
49295     tstate->curexc_traceback = 0;
49296 #else
49297     PyErr_Fetch(&local_type, &local_value, &local_tb);
49298 #endif
49299     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
49300 #if CYTHON_FAST_THREAD_STATE
49301     if (unlikely(tstate->curexc_type))
49302 #else
49303     if (unlikely(PyErr_Occurred()))
49304 #endif
49305         goto bad;
49306     #if PY_MAJOR_VERSION >= 3
49307     if (local_tb) {
49308         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
49309             goto bad;
49310     }
49311     #endif
49312     Py_XINCREF(local_tb);
49313     Py_XINCREF(local_type);
49314     Py_XINCREF(local_value);
49315     *type = local_type;
49316     *value = local_value;
49317     *tb = local_tb;
49318 #if CYTHON_FAST_THREAD_STATE
49319     #if CYTHON_USE_EXC_INFO_STACK
49320     {
49321         _PyErr_StackItem *exc_info = tstate->exc_info;
49322         tmp_type = exc_info->exc_type;
49323         tmp_value = exc_info->exc_value;
49324         tmp_tb = exc_info->exc_traceback;
49325         exc_info->exc_type = local_type;
49326         exc_info->exc_value = local_value;
49327         exc_info->exc_traceback = local_tb;
49328     }
49329     #else
49330     tmp_type = tstate->exc_type;
49331     tmp_value = tstate->exc_value;
49332     tmp_tb = tstate->exc_traceback;
49333     tstate->exc_type = local_type;
49334     tstate->exc_value = local_value;
49335     tstate->exc_traceback = local_tb;
49336     #endif
49337     Py_XDECREF(tmp_type);
49338     Py_XDECREF(tmp_value);
49339     Py_XDECREF(tmp_tb);
49340 #else
49341     PyErr_SetExcInfo(local_type, local_value, local_tb);
49342 #endif
49343     return 0;
49344 bad:
49345     *type = 0;
49346     *value = 0;
49347     *tb = 0;
49348     Py_XDECREF(local_type);
49349     Py_XDECREF(local_value);
49350     Py_XDECREF(local_tb);
49351     return -1;
49352 }
49353 
49354 /* BytesEquals */
__Pyx_PyBytes_Equals(PyObject * s1,PyObject * s2,int equals)49355   static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
49356 #if CYTHON_COMPILING_IN_PYPY
49357     return PyObject_RichCompareBool(s1, s2, equals);
49358 #else
49359     if (s1 == s2) {
49360         return (equals == Py_EQ);
49361     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
49362         const char *ps1, *ps2;
49363         Py_ssize_t length = PyBytes_GET_SIZE(s1);
49364         if (length != PyBytes_GET_SIZE(s2))
49365             return (equals == Py_NE);
49366         ps1 = PyBytes_AS_STRING(s1);
49367         ps2 = PyBytes_AS_STRING(s2);
49368         if (ps1[0] != ps2[0]) {
49369             return (equals == Py_NE);
49370         } else if (length == 1) {
49371             return (equals == Py_EQ);
49372         } else {
49373             int result;
49374 #if CYTHON_USE_UNICODE_INTERNALS
49375             Py_hash_t hash1, hash2;
49376             hash1 = ((PyBytesObject*)s1)->ob_shash;
49377             hash2 = ((PyBytesObject*)s2)->ob_shash;
49378             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
49379                 return (equals == Py_NE);
49380             }
49381 #endif
49382             result = memcmp(ps1, ps2, (size_t)length);
49383             return (equals == Py_EQ) ? (result == 0) : (result != 0);
49384         }
49385     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
49386         return (equals == Py_NE);
49387     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
49388         return (equals == Py_NE);
49389     } else {
49390         int result;
49391         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
49392         if (!py_result)
49393             return -1;
49394         result = __Pyx_PyObject_IsTrue(py_result);
49395         Py_DECREF(py_result);
49396         return result;
49397     }
49398 #endif
49399 }
49400 
49401 /* UnicodeEquals */
__Pyx_PyUnicode_Equals(PyObject * s1,PyObject * s2,int equals)49402   static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
49403 #if CYTHON_COMPILING_IN_PYPY
49404     return PyObject_RichCompareBool(s1, s2, equals);
49405 #else
49406 #if PY_MAJOR_VERSION < 3
49407     PyObject* owned_ref = NULL;
49408 #endif
49409     int s1_is_unicode, s2_is_unicode;
49410     if (s1 == s2) {
49411         goto return_eq;
49412     }
49413     s1_is_unicode = PyUnicode_CheckExact(s1);
49414     s2_is_unicode = PyUnicode_CheckExact(s2);
49415 #if PY_MAJOR_VERSION < 3
49416     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
49417         owned_ref = PyUnicode_FromObject(s2);
49418         if (unlikely(!owned_ref))
49419             return -1;
49420         s2 = owned_ref;
49421         s2_is_unicode = 1;
49422     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
49423         owned_ref = PyUnicode_FromObject(s1);
49424         if (unlikely(!owned_ref))
49425             return -1;
49426         s1 = owned_ref;
49427         s1_is_unicode = 1;
49428     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
49429         return __Pyx_PyBytes_Equals(s1, s2, equals);
49430     }
49431 #endif
49432     if (s1_is_unicode & s2_is_unicode) {
49433         Py_ssize_t length;
49434         int kind;
49435         void *data1, *data2;
49436         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
49437             return -1;
49438         length = __Pyx_PyUnicode_GET_LENGTH(s1);
49439         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
49440             goto return_ne;
49441         }
49442 #if CYTHON_USE_UNICODE_INTERNALS
49443         {
49444             Py_hash_t hash1, hash2;
49445         #if CYTHON_PEP393_ENABLED
49446             hash1 = ((PyASCIIObject*)s1)->hash;
49447             hash2 = ((PyASCIIObject*)s2)->hash;
49448         #else
49449             hash1 = ((PyUnicodeObject*)s1)->hash;
49450             hash2 = ((PyUnicodeObject*)s2)->hash;
49451         #endif
49452             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
49453                 goto return_ne;
49454             }
49455         }
49456 #endif
49457         kind = __Pyx_PyUnicode_KIND(s1);
49458         if (kind != __Pyx_PyUnicode_KIND(s2)) {
49459             goto return_ne;
49460         }
49461         data1 = __Pyx_PyUnicode_DATA(s1);
49462         data2 = __Pyx_PyUnicode_DATA(s2);
49463         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
49464             goto return_ne;
49465         } else if (length == 1) {
49466             goto return_eq;
49467         } else {
49468             int result = memcmp(data1, data2, (size_t)(length * kind));
49469             #if PY_MAJOR_VERSION < 3
49470             Py_XDECREF(owned_ref);
49471             #endif
49472             return (equals == Py_EQ) ? (result == 0) : (result != 0);
49473         }
49474     } else if ((s1 == Py_None) & s2_is_unicode) {
49475         goto return_ne;
49476     } else if ((s2 == Py_None) & s1_is_unicode) {
49477         goto return_ne;
49478     } else {
49479         int result;
49480         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
49481         #if PY_MAJOR_VERSION < 3
49482         Py_XDECREF(owned_ref);
49483         #endif
49484         if (!py_result)
49485             return -1;
49486         result = __Pyx_PyObject_IsTrue(py_result);
49487         Py_DECREF(py_result);
49488         return result;
49489     }
49490 return_eq:
49491     #if PY_MAJOR_VERSION < 3
49492     Py_XDECREF(owned_ref);
49493     #endif
49494     return (equals == Py_EQ);
49495 return_ne:
49496     #if PY_MAJOR_VERSION < 3
49497     Py_XDECREF(owned_ref);
49498     #endif
49499     return (equals == Py_NE);
49500 #endif
49501 }
49502 
49503 /* None */
__Pyx_div_Py_ssize_t(Py_ssize_t a,Py_ssize_t b)49504   static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
49505     Py_ssize_t q = a / b;
49506     Py_ssize_t r = a - q*b;
49507     q -= ((r != 0) & ((r ^ b) < 0));
49508     return q;
49509 }
49510 
49511 /* decode_c_string */
__Pyx_decode_c_string(const char * cstring,Py_ssize_t start,Py_ssize_t stop,const char * encoding,const char * errors,PyObject * (* decode_func)(const char * s,Py_ssize_t size,const char * errors))49512   static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
49513          const char* cstring, Py_ssize_t start, Py_ssize_t stop,
49514          const char* encoding, const char* errors,
49515          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
49516     Py_ssize_t length;
49517     if (unlikely((start < 0) | (stop < 0))) {
49518         size_t slen = strlen(cstring);
49519         if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
49520             PyErr_SetString(PyExc_OverflowError,
49521                             "c-string too long to convert to Python");
49522             return NULL;
49523         }
49524         length = (Py_ssize_t) slen;
49525         if (start < 0) {
49526             start += length;
49527             if (start < 0)
49528                 start = 0;
49529         }
49530         if (stop < 0)
49531             stop += length;
49532     }
49533     length = stop - start;
49534     if (unlikely(length <= 0))
49535         return PyUnicode_FromUnicode(NULL, 0);
49536     cstring += start;
49537     if (decode_func) {
49538         return decode_func(cstring, length, errors);
49539     } else {
49540         return PyUnicode_Decode(cstring, length, encoding, errors);
49541     }
49542 }
49543 
49544 /* SwapException */
49545   #if CYTHON_FAST_THREAD_STATE
__Pyx__ExceptionSwap(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)49546 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
49547     PyObject *tmp_type, *tmp_value, *tmp_tb;
49548     #if CYTHON_USE_EXC_INFO_STACK
49549     _PyErr_StackItem *exc_info = tstate->exc_info;
49550     tmp_type = exc_info->exc_type;
49551     tmp_value = exc_info->exc_value;
49552     tmp_tb = exc_info->exc_traceback;
49553     exc_info->exc_type = *type;
49554     exc_info->exc_value = *value;
49555     exc_info->exc_traceback = *tb;
49556     #else
49557     tmp_type = tstate->exc_type;
49558     tmp_value = tstate->exc_value;
49559     tmp_tb = tstate->exc_traceback;
49560     tstate->exc_type = *type;
49561     tstate->exc_value = *value;
49562     tstate->exc_traceback = *tb;
49563     #endif
49564     *type = tmp_type;
49565     *value = tmp_value;
49566     *tb = tmp_tb;
49567 }
49568 #else
__Pyx_ExceptionSwap(PyObject ** type,PyObject ** value,PyObject ** tb)49569 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
49570     PyObject *tmp_type, *tmp_value, *tmp_tb;
49571     PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
49572     PyErr_SetExcInfo(*type, *value, *tb);
49573     *type = tmp_type;
49574     *value = tmp_value;
49575     *tb = tmp_tb;
49576 }
49577 #endif
49578 
49579 /* FastTypeChecks */
49580   #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_InBases(PyTypeObject * a,PyTypeObject * b)49581 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
49582     while (a) {
49583         a = a->tp_base;
49584         if (a == b)
49585             return 1;
49586     }
49587     return b == &PyBaseObject_Type;
49588 }
__Pyx_IsSubtype(PyTypeObject * a,PyTypeObject * b)49589 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
49590     PyObject *mro;
49591     if (a == b) return 1;
49592     mro = a->tp_mro;
49593     if (likely(mro)) {
49594         Py_ssize_t i, n;
49595         n = PyTuple_GET_SIZE(mro);
49596         for (i = 0; i < n; i++) {
49597             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
49598                 return 1;
49599         }
49600         return 0;
49601     }
49602     return __Pyx_InBases(a, b);
49603 }
49604 #if PY_MAJOR_VERSION == 2
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)49605 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
49606     PyObject *exception, *value, *tb;
49607     int res;
49608     __Pyx_PyThreadState_declare
49609     __Pyx_PyThreadState_assign
49610     __Pyx_ErrFetch(&exception, &value, &tb);
49611     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
49612     if (unlikely(res == -1)) {
49613         PyErr_WriteUnraisable(err);
49614         res = 0;
49615     }
49616     if (!res) {
49617         res = PyObject_IsSubclass(err, exc_type2);
49618         if (unlikely(res == -1)) {
49619             PyErr_WriteUnraisable(err);
49620             res = 0;
49621         }
49622     }
49623     __Pyx_ErrRestore(exception, value, tb);
49624     return res;
49625 }
49626 #else
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)49627 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
49628     int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
49629     if (!res) {
49630         res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
49631     }
49632     return res;
49633 }
49634 #endif
__Pyx_PyErr_GivenExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)49635 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
49636     Py_ssize_t i, n;
49637     assert(PyExceptionClass_Check(exc_type));
49638     n = PyTuple_GET_SIZE(tuple);
49639 #if PY_MAJOR_VERSION >= 3
49640     for (i=0; i<n; i++) {
49641         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
49642     }
49643 #endif
49644     for (i=0; i<n; i++) {
49645         PyObject *t = PyTuple_GET_ITEM(tuple, i);
49646         #if PY_MAJOR_VERSION < 3
49647         if (likely(exc_type == t)) return 1;
49648         #endif
49649         if (likely(PyExceptionClass_Check(t))) {
49650             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
49651         } else {
49652         }
49653     }
49654     return 0;
49655 }
__Pyx_PyErr_GivenExceptionMatches(PyObject * err,PyObject * exc_type)49656 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
49657     if (likely(err == exc_type)) return 1;
49658     if (likely(PyExceptionClass_Check(err))) {
49659         if (likely(PyExceptionClass_Check(exc_type))) {
49660             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
49661         } else if (likely(PyTuple_Check(exc_type))) {
49662             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
49663         } else {
49664         }
49665     }
49666     return PyErr_GivenExceptionMatches(err, exc_type);
49667 }
__Pyx_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)49668 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
49669     assert(PyExceptionClass_Check(exc_type1));
49670     assert(PyExceptionClass_Check(exc_type2));
49671     if (likely(err == exc_type1 || err == exc_type2)) return 1;
49672     if (likely(PyExceptionClass_Check(err))) {
49673         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
49674     }
49675     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
49676 }
49677 #endif
49678 
49679 /* None */
__Pyx_RaiseUnboundLocalError(const char * varname)49680   static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
49681     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
49682 }
49683 
49684 /* None */
__Pyx_div_long(long a,long b)49685   static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
49686     long q = a / b;
49687     long r = a - q*b;
49688     q -= ((r != 0) & ((r ^ b) < 0));
49689     return q;
49690 }
49691 
49692 /* StringJoin */
49693   #if !CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyBytes_Join(PyObject * sep,PyObject * values)49694 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
49695     return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
49696 }
49697 #endif
49698 
49699 /* PyObject_GenericGetAttrNoDict */
49700   #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_RaiseGenericGetAttributeError(PyTypeObject * tp,PyObject * attr_name)49701 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
49702     PyErr_Format(PyExc_AttributeError,
49703 #if PY_MAJOR_VERSION >= 3
49704                  "'%.50s' object has no attribute '%U'",
49705                  tp->tp_name, attr_name);
49706 #else
49707                  "'%.50s' object has no attribute '%.400s'",
49708                  tp->tp_name, PyString_AS_STRING(attr_name));
49709 #endif
49710     return NULL;
49711 }
__Pyx_PyObject_GenericGetAttrNoDict(PyObject * obj,PyObject * attr_name)49712 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
49713     PyObject *descr;
49714     PyTypeObject *tp = Py_TYPE(obj);
49715     if (unlikely(!PyString_Check(attr_name))) {
49716         return PyObject_GenericGetAttr(obj, attr_name);
49717     }
49718     assert(!tp->tp_dictoffset);
49719     descr = _PyType_Lookup(tp, attr_name);
49720     if (unlikely(!descr)) {
49721         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
49722     }
49723     Py_INCREF(descr);
49724     #if PY_MAJOR_VERSION < 3
49725     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
49726     #endif
49727     {
49728         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
49729         if (unlikely(f)) {
49730             PyObject *res = f(descr, obj, (PyObject *)tp);
49731             Py_DECREF(descr);
49732             return res;
49733         }
49734     }
49735     return descr;
49736 }
49737 #endif
49738 
49739 /* PyObject_GenericGetAttr */
49740   #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_PyObject_GenericGetAttr(PyObject * obj,PyObject * attr_name)49741 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
49742     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
49743         return PyObject_GenericGetAttr(obj, attr_name);
49744     }
49745     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
49746 }
49747 #endif
49748 
49749 /* SetVTable */
__Pyx_SetVtable(PyObject * dict,void * vtable)49750   static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
49751 #if PY_VERSION_HEX >= 0x02070000
49752     PyObject *ob = PyCapsule_New(vtable, 0, 0);
49753 #else
49754     PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
49755 #endif
49756     if (!ob)
49757         goto bad;
49758     if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
49759         goto bad;
49760     Py_DECREF(ob);
49761     return 0;
49762 bad:
49763     Py_XDECREF(ob);
49764     return -1;
49765 }
49766 
49767 /* SetupReduce */
__Pyx_setup_reduce_is_named(PyObject * meth,PyObject * name)49768   static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
49769   int ret;
49770   PyObject *name_attr;
49771   name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
49772   if (likely(name_attr)) {
49773       ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
49774   } else {
49775       ret = -1;
49776   }
49777   if (unlikely(ret < 0)) {
49778       PyErr_Clear();
49779       ret = 0;
49780   }
49781   Py_XDECREF(name_attr);
49782   return ret;
49783 }
__Pyx_setup_reduce(PyObject * type_obj)49784 static int __Pyx_setup_reduce(PyObject* type_obj) {
49785     int ret = 0;
49786     PyObject *object_reduce = NULL;
49787     PyObject *object_reduce_ex = NULL;
49788     PyObject *reduce = NULL;
49789     PyObject *reduce_ex = NULL;
49790     PyObject *reduce_cython = NULL;
49791     PyObject *setstate = NULL;
49792     PyObject *setstate_cython = NULL;
49793 #if CYTHON_USE_PYTYPE_LOOKUP
49794     if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
49795 #else
49796     if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
49797 #endif
49798 #if CYTHON_USE_PYTYPE_LOOKUP
49799     object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
49800 #else
49801     object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
49802 #endif
49803     reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
49804     if (reduce_ex == object_reduce_ex) {
49805 #if CYTHON_USE_PYTYPE_LOOKUP
49806         object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
49807 #else
49808         object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
49809 #endif
49810         reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
49811         if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
49812             reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
49813             ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
49814             ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
49815             setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
49816             if (!setstate) PyErr_Clear();
49817             if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
49818                 setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
49819                 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
49820                 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
49821             }
49822             PyType_Modified((PyTypeObject*)type_obj);
49823         }
49824     }
49825     goto GOOD;
49826 BAD:
49827     if (!PyErr_Occurred())
49828         PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
49829     ret = -1;
49830 GOOD:
49831 #if !CYTHON_USE_PYTYPE_LOOKUP
49832     Py_XDECREF(object_reduce);
49833     Py_XDECREF(object_reduce_ex);
49834 #endif
49835     Py_XDECREF(reduce);
49836     Py_XDECREF(reduce_ex);
49837     Py_XDECREF(reduce_cython);
49838     Py_XDECREF(setstate);
49839     Py_XDECREF(setstate_cython);
49840     return ret;
49841 }
49842 
49843 /* TypeImport */
49844   #ifndef __PYX_HAVE_RT_ImportType
49845 #define __PYX_HAVE_RT_ImportType
__Pyx_ImportType(PyObject * module,const char * module_name,const char * class_name,size_t size,enum __Pyx_ImportType_CheckSize check_size)49846 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
49847     size_t size, enum __Pyx_ImportType_CheckSize check_size)
49848 {
49849     PyObject *result = 0;
49850     char warning[200];
49851     Py_ssize_t basicsize;
49852 #ifdef Py_LIMITED_API
49853     PyObject *py_basicsize;
49854 #endif
49855     result = PyObject_GetAttrString(module, class_name);
49856     if (!result)
49857         goto bad;
49858     if (!PyType_Check(result)) {
49859         PyErr_Format(PyExc_TypeError,
49860             "%.200s.%.200s is not a type object",
49861             module_name, class_name);
49862         goto bad;
49863     }
49864 #ifndef Py_LIMITED_API
49865     basicsize = ((PyTypeObject *)result)->tp_basicsize;
49866 #else
49867     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
49868     if (!py_basicsize)
49869         goto bad;
49870     basicsize = PyLong_AsSsize_t(py_basicsize);
49871     Py_DECREF(py_basicsize);
49872     py_basicsize = 0;
49873     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
49874         goto bad;
49875 #endif
49876     if ((size_t)basicsize < size) {
49877         PyErr_Format(PyExc_ValueError,
49878             "%.200s.%.200s size changed, may indicate binary incompatibility. "
49879             "Expected %zd from C header, got %zd from PyObject",
49880             module_name, class_name, size, basicsize);
49881         goto bad;
49882     }
49883     if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
49884         PyErr_Format(PyExc_ValueError,
49885             "%.200s.%.200s size changed, may indicate binary incompatibility. "
49886             "Expected %zd from C header, got %zd from PyObject",
49887             module_name, class_name, size, basicsize);
49888         goto bad;
49889     }
49890     else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
49891         PyOS_snprintf(warning, sizeof(warning),
49892             "%s.%s size changed, may indicate binary incompatibility. "
49893             "Expected %zd from C header, got %zd from PyObject",
49894             module_name, class_name, size, basicsize);
49895         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
49896     }
49897     return (PyTypeObject *)result;
49898 bad:
49899     Py_XDECREF(result);
49900     return NULL;
49901 }
49902 #endif
49903 
49904 /* CLineInTraceback */
49905   #ifndef CYTHON_CLINE_IN_TRACEBACK
__Pyx_CLineForTraceback(PyThreadState * tstate,int c_line)49906 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
49907     PyObject *use_cline;
49908     PyObject *ptype, *pvalue, *ptraceback;
49909 #if CYTHON_COMPILING_IN_CPYTHON
49910     PyObject **cython_runtime_dict;
49911 #endif
49912     if (unlikely(!__pyx_cython_runtime)) {
49913         return c_line;
49914     }
49915     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
49916 #if CYTHON_COMPILING_IN_CPYTHON
49917     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
49918     if (likely(cython_runtime_dict)) {
49919         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
49920             use_cline, *cython_runtime_dict,
49921             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
49922     } else
49923 #endif
49924     {
49925       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
49926       if (use_cline_obj) {
49927         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
49928         Py_DECREF(use_cline_obj);
49929       } else {
49930         PyErr_Clear();
49931         use_cline = NULL;
49932       }
49933     }
49934     if (!use_cline) {
49935         c_line = 0;
49936         PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
49937     }
49938     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
49939         c_line = 0;
49940     }
49941     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
49942     return c_line;
49943 }
49944 #endif
49945 
49946 /* CodeObjectCache */
__pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry * entries,int count,int code_line)49947   static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
49948     int start = 0, mid = 0, end = count - 1;
49949     if (end >= 0 && code_line > entries[end].code_line) {
49950         return count;
49951     }
49952     while (start < end) {
49953         mid = start + (end - start) / 2;
49954         if (code_line < entries[mid].code_line) {
49955             end = mid;
49956         } else if (code_line > entries[mid].code_line) {
49957              start = mid + 1;
49958         } else {
49959             return mid;
49960         }
49961     }
49962     if (code_line <= entries[mid].code_line) {
49963         return mid;
49964     } else {
49965         return mid + 1;
49966     }
49967 }
__pyx_find_code_object(int code_line)49968 static PyCodeObject *__pyx_find_code_object(int code_line) {
49969     PyCodeObject* code_object;
49970     int pos;
49971     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
49972         return NULL;
49973     }
49974     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
49975     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
49976         return NULL;
49977     }
49978     code_object = __pyx_code_cache.entries[pos].code_object;
49979     Py_INCREF(code_object);
49980     return code_object;
49981 }
__pyx_insert_code_object(int code_line,PyCodeObject * code_object)49982 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
49983     int pos, i;
49984     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
49985     if (unlikely(!code_line)) {
49986         return;
49987     }
49988     if (unlikely(!entries)) {
49989         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
49990         if (likely(entries)) {
49991             __pyx_code_cache.entries = entries;
49992             __pyx_code_cache.max_count = 64;
49993             __pyx_code_cache.count = 1;
49994             entries[0].code_line = code_line;
49995             entries[0].code_object = code_object;
49996             Py_INCREF(code_object);
49997         }
49998         return;
49999     }
50000     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
50001     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
50002         PyCodeObject* tmp = entries[pos].code_object;
50003         entries[pos].code_object = code_object;
50004         Py_DECREF(tmp);
50005         return;
50006     }
50007     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
50008         int new_max = __pyx_code_cache.max_count + 64;
50009         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
50010             __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
50011         if (unlikely(!entries)) {
50012             return;
50013         }
50014         __pyx_code_cache.entries = entries;
50015         __pyx_code_cache.max_count = new_max;
50016     }
50017     for (i=__pyx_code_cache.count; i>pos; i--) {
50018         entries[i] = entries[i-1];
50019     }
50020     entries[pos].code_line = code_line;
50021     entries[pos].code_object = code_object;
50022     __pyx_code_cache.count++;
50023     Py_INCREF(code_object);
50024 }
50025 
50026 /* AddTraceback */
50027   #include "compile.h"
50028 #include "frameobject.h"
50029 #include "traceback.h"
__Pyx_CreateCodeObjectForTraceback(const char * funcname,int c_line,int py_line,const char * filename)50030 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
50031             const char *funcname, int c_line,
50032             int py_line, const char *filename) {
50033     PyCodeObject *py_code = 0;
50034     PyObject *py_srcfile = 0;
50035     PyObject *py_funcname = 0;
50036     #if PY_MAJOR_VERSION < 3
50037     py_srcfile = PyString_FromString(filename);
50038     #else
50039     py_srcfile = PyUnicode_FromString(filename);
50040     #endif
50041     if (!py_srcfile) goto bad;
50042     if (c_line) {
50043         #if PY_MAJOR_VERSION < 3
50044         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
50045         #else
50046         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
50047         #endif
50048     }
50049     else {
50050         #if PY_MAJOR_VERSION < 3
50051         py_funcname = PyString_FromString(funcname);
50052         #else
50053         py_funcname = PyUnicode_FromString(funcname);
50054         #endif
50055     }
50056     if (!py_funcname) goto bad;
50057     py_code = __Pyx_PyCode_New(
50058         0,
50059         0,
50060         0,
50061         0,
50062         0,
50063         __pyx_empty_bytes, /*PyObject *code,*/
50064         __pyx_empty_tuple, /*PyObject *consts,*/
50065         __pyx_empty_tuple, /*PyObject *names,*/
50066         __pyx_empty_tuple, /*PyObject *varnames,*/
50067         __pyx_empty_tuple, /*PyObject *freevars,*/
50068         __pyx_empty_tuple, /*PyObject *cellvars,*/
50069         py_srcfile,   /*PyObject *filename,*/
50070         py_funcname,  /*PyObject *name,*/
50071         py_line,
50072         __pyx_empty_bytes  /*PyObject *lnotab*/
50073     );
50074     Py_DECREF(py_srcfile);
50075     Py_DECREF(py_funcname);
50076     return py_code;
50077 bad:
50078     Py_XDECREF(py_srcfile);
50079     Py_XDECREF(py_funcname);
50080     return NULL;
50081 }
__Pyx_AddTraceback(const char * funcname,int c_line,int py_line,const char * filename)50082 static void __Pyx_AddTraceback(const char *funcname, int c_line,
50083                                int py_line, const char *filename) {
50084     PyCodeObject *py_code = 0;
50085     PyFrameObject *py_frame = 0;
50086     PyThreadState *tstate = __Pyx_PyThreadState_Current;
50087     if (c_line) {
50088         c_line = __Pyx_CLineForTraceback(tstate, c_line);
50089     }
50090     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
50091     if (!py_code) {
50092         py_code = __Pyx_CreateCodeObjectForTraceback(
50093             funcname, c_line, py_line, filename);
50094         if (!py_code) goto bad;
50095         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
50096     }
50097     py_frame = PyFrame_New(
50098         tstate,            /*PyThreadState *tstate,*/
50099         py_code,           /*PyCodeObject *code,*/
50100         __pyx_d,    /*PyObject *globals,*/
50101         0                  /*PyObject *locals*/
50102     );
50103     if (!py_frame) goto bad;
50104     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
50105     PyTraceBack_Here(py_frame);
50106 bad:
50107     Py_XDECREF(py_code);
50108     Py_XDECREF(py_frame);
50109 }
50110 
50111 #if PY_MAJOR_VERSION < 3
__Pyx_GetBuffer(PyObject * obj,Py_buffer * view,int flags)50112 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
50113     if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
50114         if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
50115         if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
50116         if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
50117     PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
50118     return -1;
50119 }
__Pyx_ReleaseBuffer(Py_buffer * view)50120 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
50121     PyObject *obj = view->obj;
50122     if (!obj) return;
50123     if (PyObject_CheckBuffer(obj)) {
50124         PyBuffer_Release(view);
50125         return;
50126     }
50127     if ((0)) {}
50128         else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);
50129     view->obj = NULL;
50130     Py_DECREF(obj);
50131 }
50132 #endif
50133 
50134 
50135   /* MemviewSliceIsContig */
50136   static int
__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs,char order,int ndim)50137 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
50138 {
50139     int i, index, step, start;
50140     Py_ssize_t itemsize = mvs.memview->view.itemsize;
50141     if (order == 'F') {
50142         step = 1;
50143         start = 0;
50144     } else {
50145         step = -1;
50146         start = ndim - 1;
50147     }
50148     for (i = 0; i < ndim; i++) {
50149         index = start + step * i;
50150         if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
50151             return 0;
50152         itemsize *= mvs.shape[index];
50153     }
50154     return 1;
50155 }
50156 
50157 /* OverlappingSlices */
50158   static void
__pyx_get_array_memory_extents(__Pyx_memviewslice * slice,void ** out_start,void ** out_end,int ndim,size_t itemsize)50159 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
50160                                void **out_start, void **out_end,
50161                                int ndim, size_t itemsize)
50162 {
50163     char *start, *end;
50164     int i;
50165     start = end = slice->data;
50166     for (i = 0; i < ndim; i++) {
50167         Py_ssize_t stride = slice->strides[i];
50168         Py_ssize_t extent = slice->shape[i];
50169         if (extent == 0) {
50170             *out_start = *out_end = start;
50171             return;
50172         } else {
50173             if (stride > 0)
50174                 end += stride * (extent - 1);
50175             else
50176                 start += stride * (extent - 1);
50177         }
50178     }
50179     *out_start = start;
50180     *out_end = end + itemsize;
50181 }
50182 static int
__pyx_slices_overlap(__Pyx_memviewslice * slice1,__Pyx_memviewslice * slice2,int ndim,size_t itemsize)50183 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
50184                      __Pyx_memviewslice *slice2,
50185                      int ndim, size_t itemsize)
50186 {
50187     void *start1, *end1, *start2, *end2;
50188     __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
50189     __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
50190     return (start1 < end2) && (start2 < end1);
50191 }
50192 
50193 /* Capsule */
50194   static CYTHON_INLINE PyObject *
__pyx_capsule_create(void * p,CYTHON_UNUSED const char * sig)50195 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
50196 {
50197     PyObject *cobj;
50198 #if PY_VERSION_HEX >= 0x02070000
50199     cobj = PyCapsule_New(p, sig, NULL);
50200 #else
50201     cobj = PyCObject_FromVoidPtr(p, NULL);
50202 #endif
50203     return cobj;
50204 }
50205 
50206 /* CIntToPy */
__Pyx_PyInt_From_npy_uint64(npy_uint64 value)50207   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint64(npy_uint64 value) {
50208     const npy_uint64 neg_one = (npy_uint64) ((npy_uint64) 0 - (npy_uint64) 1), const_zero = (npy_uint64) 0;
50209     const int is_unsigned = neg_one > const_zero;
50210     if (is_unsigned) {
50211         if (sizeof(npy_uint64) < sizeof(long)) {
50212             return PyInt_FromLong((long) value);
50213         } else if (sizeof(npy_uint64) <= sizeof(unsigned long)) {
50214             return PyLong_FromUnsignedLong((unsigned long) value);
50215 #ifdef HAVE_LONG_LONG
50216         } else if (sizeof(npy_uint64) <= sizeof(unsigned PY_LONG_LONG)) {
50217             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
50218 #endif
50219         }
50220     } else {
50221         if (sizeof(npy_uint64) <= sizeof(long)) {
50222             return PyInt_FromLong((long) value);
50223 #ifdef HAVE_LONG_LONG
50224         } else if (sizeof(npy_uint64) <= sizeof(PY_LONG_LONG)) {
50225             return PyLong_FromLongLong((PY_LONG_LONG) value);
50226 #endif
50227         }
50228     }
50229     {
50230         int one = 1; int little = (int)*(unsigned char *)&one;
50231         unsigned char *bytes = (unsigned char *)&value;
50232         return _PyLong_FromByteArray(bytes, sizeof(npy_uint64),
50233                                      little, !is_unsigned);
50234     }
50235 }
50236 
50237 /* CIntFromPyVerify */
50238   #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
50239     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
50240 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
50241     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
50242 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
50243     {\
50244         func_type value = func_value;\
50245         if (sizeof(target_type) < sizeof(func_type)) {\
50246             if (unlikely(value != (func_type) (target_type) value)) {\
50247                 func_type zero = 0;\
50248                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
50249                     return (target_type) -1;\
50250                 if (is_unsigned && unlikely(value < zero))\
50251                     goto raise_neg_overflow;\
50252                 else\
50253                     goto raise_overflow;\
50254             }\
50255         }\
50256         return (target_type) value;\
50257     }
50258 
50259 /* TypeInfoCompare */
50260   static int
__pyx_typeinfo_cmp(__Pyx_TypeInfo * a,__Pyx_TypeInfo * b)50261 __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
50262 {
50263     int i;
50264     if (!a || !b)
50265         return 0;
50266     if (a == b)
50267         return 1;
50268     if (a->size != b->size || a->typegroup != b->typegroup ||
50269             a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
50270         if (a->typegroup == 'H' || b->typegroup == 'H') {
50271             return a->size == b->size;
50272         } else {
50273             return 0;
50274         }
50275     }
50276     if (a->ndim) {
50277         for (i = 0; i < a->ndim; i++)
50278             if (a->arraysize[i] != b->arraysize[i])
50279                 return 0;
50280     }
50281     if (a->typegroup == 'S') {
50282         if (a->flags != b->flags)
50283             return 0;
50284         if (a->fields || b->fields) {
50285             if (!(a->fields && b->fields))
50286                 return 0;
50287             for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
50288                 __Pyx_StructField *field_a = a->fields + i;
50289                 __Pyx_StructField *field_b = b->fields + i;
50290                 if (field_a->offset != field_b->offset ||
50291                     !__pyx_typeinfo_cmp(field_a->type, field_b->type))
50292                     return 0;
50293             }
50294             return !a->fields[i].type && !b->fields[i].type;
50295         }
50296     }
50297     return 1;
50298 }
50299 
50300 /* MemviewSliceValidateAndInit */
50301   static int
__pyx_check_strides(Py_buffer * buf,int dim,int ndim,int spec)50302 __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
50303 {
50304     if (buf->shape[dim] <= 1)
50305         return 1;
50306     if (buf->strides) {
50307         if (spec & __Pyx_MEMVIEW_CONTIG) {
50308             if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
50309                 if (buf->strides[dim] != sizeof(void *)) {
50310                     PyErr_Format(PyExc_ValueError,
50311                                  "Buffer is not indirectly contiguous "
50312                                  "in dimension %d.", dim);
50313                     goto fail;
50314                 }
50315             } else if (buf->strides[dim] != buf->itemsize) {
50316                 PyErr_SetString(PyExc_ValueError,
50317                                 "Buffer and memoryview are not contiguous "
50318                                 "in the same dimension.");
50319                 goto fail;
50320             }
50321         }
50322         if (spec & __Pyx_MEMVIEW_FOLLOW) {
50323             Py_ssize_t stride = buf->strides[dim];
50324             if (stride < 0)
50325                 stride = -stride;
50326             if (stride < buf->itemsize) {
50327                 PyErr_SetString(PyExc_ValueError,
50328                                 "Buffer and memoryview are not contiguous "
50329                                 "in the same dimension.");
50330                 goto fail;
50331             }
50332         }
50333     } else {
50334         if (spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1) {
50335             PyErr_Format(PyExc_ValueError,
50336                          "C-contiguous buffer is not contiguous in "
50337                          "dimension %d", dim);
50338             goto fail;
50339         } else if (spec & (__Pyx_MEMVIEW_PTR)) {
50340             PyErr_Format(PyExc_ValueError,
50341                          "C-contiguous buffer is not indirect in "
50342                          "dimension %d", dim);
50343             goto fail;
50344         } else if (buf->suboffsets) {
50345             PyErr_SetString(PyExc_ValueError,
50346                             "Buffer exposes suboffsets but no strides");
50347             goto fail;
50348         }
50349     }
50350     return 1;
50351 fail:
50352     return 0;
50353 }
50354 static int
__pyx_check_suboffsets(Py_buffer * buf,int dim,CYTHON_UNUSED int ndim,int spec)50355 __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
50356 {
50357     if (spec & __Pyx_MEMVIEW_DIRECT) {
50358         if (buf->suboffsets && buf->suboffsets[dim] >= 0) {
50359             PyErr_Format(PyExc_ValueError,
50360                          "Buffer not compatible with direct access "
50361                          "in dimension %d.", dim);
50362             goto fail;
50363         }
50364     }
50365     if (spec & __Pyx_MEMVIEW_PTR) {
50366         if (!buf->suboffsets || (buf->suboffsets[dim] < 0)) {
50367             PyErr_Format(PyExc_ValueError,
50368                          "Buffer is not indirectly accessible "
50369                          "in dimension %d.", dim);
50370             goto fail;
50371         }
50372     }
50373     return 1;
50374 fail:
50375     return 0;
50376 }
50377 static int
__pyx_verify_contig(Py_buffer * buf,int ndim,int c_or_f_flag)50378 __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
50379 {
50380     int i;
50381     if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
50382         Py_ssize_t stride = 1;
50383         for (i = 0; i < ndim; i++) {
50384             if (stride * buf->itemsize != buf->strides[i] &&
50385                     buf->shape[i] > 1)
50386             {
50387                 PyErr_SetString(PyExc_ValueError,
50388                     "Buffer not fortran contiguous.");
50389                 goto fail;
50390             }
50391             stride = stride * buf->shape[i];
50392         }
50393     } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
50394         Py_ssize_t stride = 1;
50395         for (i = ndim - 1; i >- 1; i--) {
50396             if (stride * buf->itemsize != buf->strides[i] &&
50397                     buf->shape[i] > 1) {
50398                 PyErr_SetString(PyExc_ValueError,
50399                     "Buffer not C contiguous.");
50400                 goto fail;
50401             }
50402             stride = stride * buf->shape[i];
50403         }
50404     }
50405     return 1;
50406 fail:
50407     return 0;
50408 }
__Pyx_ValidateAndInit_memviewslice(int * axes_specs,int c_or_f_flag,int buf_flags,int ndim,__Pyx_TypeInfo * dtype,__Pyx_BufFmt_StackElem stack[],__Pyx_memviewslice * memviewslice,PyObject * original_obj)50409 static int __Pyx_ValidateAndInit_memviewslice(
50410                 int *axes_specs,
50411                 int c_or_f_flag,
50412                 int buf_flags,
50413                 int ndim,
50414                 __Pyx_TypeInfo *dtype,
50415                 __Pyx_BufFmt_StackElem stack[],
50416                 __Pyx_memviewslice *memviewslice,
50417                 PyObject *original_obj)
50418 {
50419     struct __pyx_memoryview_obj *memview, *new_memview;
50420     __Pyx_RefNannyDeclarations
50421     Py_buffer *buf;
50422     int i, spec = 0, retval = -1;
50423     __Pyx_BufFmt_Context ctx;
50424     int from_memoryview = __pyx_memoryview_check(original_obj);
50425     __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
50426     if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
50427                                                             original_obj)->typeinfo)) {
50428         memview = (struct __pyx_memoryview_obj *) original_obj;
50429         new_memview = NULL;
50430     } else {
50431         memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
50432                                             original_obj, buf_flags, 0, dtype);
50433         new_memview = memview;
50434         if (unlikely(!memview))
50435             goto fail;
50436     }
50437     buf = &memview->view;
50438     if (buf->ndim != ndim) {
50439         PyErr_Format(PyExc_ValueError,
50440                 "Buffer has wrong number of dimensions (expected %d, got %d)",
50441                 ndim, buf->ndim);
50442         goto fail;
50443     }
50444     if (new_memview) {
50445         __Pyx_BufFmt_Init(&ctx, stack, dtype);
50446         if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
50447     }
50448     if ((unsigned) buf->itemsize != dtype->size) {
50449         PyErr_Format(PyExc_ValueError,
50450                      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
50451                      "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
50452                      buf->itemsize,
50453                      (buf->itemsize > 1) ? "s" : "",
50454                      dtype->name,
50455                      dtype->size,
50456                      (dtype->size > 1) ? "s" : "");
50457         goto fail;
50458     }
50459     for (i = 0; i < ndim; i++) {
50460         spec = axes_specs[i];
50461         if (!__pyx_check_strides(buf, i, ndim, spec))
50462             goto fail;
50463         if (!__pyx_check_suboffsets(buf, i, ndim, spec))
50464             goto fail;
50465     }
50466     if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))
50467         goto fail;
50468     if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
50469                                          new_memview != NULL) == -1)) {
50470         goto fail;
50471     }
50472     retval = 0;
50473     goto no_fail;
50474 fail:
50475     Py_XDECREF(new_memview);
50476     retval = -1;
50477 no_fail:
50478     __Pyx_RefNannyFinishContext();
50479     return retval;
50480 }
50481 
50482 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(PyObject * obj,int writable_flag)50483   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint64_t(PyObject *obj, int writable_flag) {
50484     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
50485     __Pyx_BufFmt_StackElem stack[1];
50486     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
50487     int retcode;
50488     if (obj == Py_None) {
50489         result.memview = (struct __pyx_memoryview_obj *) Py_None;
50490         return result;
50491     }
50492     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
50493                                                  PyBUF_RECORDS_RO | writable_flag, 1,
50494                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, stack,
50495                                                  &result, obj);
50496     if (unlikely(retcode == -1))
50497         goto __pyx_fail;
50498     return result;
50499 __pyx_fail:
50500     result.memview = NULL;
50501     result.data = NULL;
50502     return result;
50503 }
50504 
50505 /* CIntToPy */
__Pyx_PyInt_From_npy_uint32(npy_uint32 value)50506   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value) {
50507     const npy_uint32 neg_one = (npy_uint32) ((npy_uint32) 0 - (npy_uint32) 1), const_zero = (npy_uint32) 0;
50508     const int is_unsigned = neg_one > const_zero;
50509     if (is_unsigned) {
50510         if (sizeof(npy_uint32) < sizeof(long)) {
50511             return PyInt_FromLong((long) value);
50512         } else if (sizeof(npy_uint32) <= sizeof(unsigned long)) {
50513             return PyLong_FromUnsignedLong((unsigned long) value);
50514 #ifdef HAVE_LONG_LONG
50515         } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) {
50516             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
50517 #endif
50518         }
50519     } else {
50520         if (sizeof(npy_uint32) <= sizeof(long)) {
50521             return PyInt_FromLong((long) value);
50522 #ifdef HAVE_LONG_LONG
50523         } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) {
50524             return PyLong_FromLongLong((PY_LONG_LONG) value);
50525 #endif
50526         }
50527     }
50528     {
50529         int one = 1; int little = (int)*(unsigned char *)&one;
50530         unsigned char *bytes = (unsigned char *)&value;
50531         return _PyLong_FromByteArray(bytes, sizeof(npy_uint32),
50532                                      little, !is_unsigned);
50533     }
50534 }
50535 
50536 /* CIntToPy */
__Pyx_PyInt_From_int(int value)50537   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
50538     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
50539     const int is_unsigned = neg_one > const_zero;
50540     if (is_unsigned) {
50541         if (sizeof(int) < sizeof(long)) {
50542             return PyInt_FromLong((long) value);
50543         } else if (sizeof(int) <= sizeof(unsigned long)) {
50544             return PyLong_FromUnsignedLong((unsigned long) value);
50545 #ifdef HAVE_LONG_LONG
50546         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
50547             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
50548 #endif
50549         }
50550     } else {
50551         if (sizeof(int) <= sizeof(long)) {
50552             return PyInt_FromLong((long) value);
50553 #ifdef HAVE_LONG_LONG
50554         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
50555             return PyLong_FromLongLong((PY_LONG_LONG) value);
50556 #endif
50557         }
50558     }
50559     {
50560         int one = 1; int little = (int)*(unsigned char *)&one;
50561         unsigned char *bytes = (unsigned char *)&value;
50562         return _PyLong_FromByteArray(bytes, sizeof(int),
50563                                      little, !is_unsigned);
50564     }
50565 }
50566 
50567 /* Print */
50568   #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
__Pyx_GetStdout(void)50569 static PyObject *__Pyx_GetStdout(void) {
50570     PyObject *f = PySys_GetObject((char *)"stdout");
50571     if (!f) {
50572         PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
50573     }
50574     return f;
50575 }
__Pyx_Print(PyObject * f,PyObject * arg_tuple,int newline)50576 static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
50577     int i;
50578     if (!f) {
50579         if (!(f = __Pyx_GetStdout()))
50580             return -1;
50581     }
50582     Py_INCREF(f);
50583     for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
50584         PyObject* v;
50585         if (PyFile_SoftSpace(f, 1)) {
50586             if (PyFile_WriteString(" ", f) < 0)
50587                 goto error;
50588         }
50589         v = PyTuple_GET_ITEM(arg_tuple, i);
50590         if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
50591             goto error;
50592         if (PyString_Check(v)) {
50593             char *s = PyString_AsString(v);
50594             Py_ssize_t len = PyString_Size(v);
50595             if (len > 0) {
50596                 switch (s[len-1]) {
50597                     case ' ': break;
50598                     case '\f': case '\r': case '\n': case '\t': case '\v':
50599                         PyFile_SoftSpace(f, 0);
50600                         break;
50601                     default:  break;
50602                 }
50603             }
50604         }
50605     }
50606     if (newline) {
50607         if (PyFile_WriteString("\n", f) < 0)
50608             goto error;
50609         PyFile_SoftSpace(f, 0);
50610     }
50611     Py_DECREF(f);
50612     return 0;
50613 error:
50614     Py_DECREF(f);
50615     return -1;
50616 }
50617 #else
__Pyx_Print(PyObject * stream,PyObject * arg_tuple,int newline)50618 static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
50619     PyObject* kwargs = 0;
50620     PyObject* result = 0;
50621     PyObject* end_string;
50622     if (unlikely(!__pyx_print)) {
50623         __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
50624         if (!__pyx_print)
50625             return -1;
50626     }
50627     if (stream) {
50628         kwargs = PyDict_New();
50629         if (unlikely(!kwargs))
50630             return -1;
50631         if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
50632             goto bad;
50633         if (!newline) {
50634             end_string = PyUnicode_FromStringAndSize(" ", 1);
50635             if (unlikely(!end_string))
50636                 goto bad;
50637             if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
50638                 Py_DECREF(end_string);
50639                 goto bad;
50640             }
50641             Py_DECREF(end_string);
50642         }
50643     } else if (!newline) {
50644         if (unlikely(!__pyx_print_kwargs)) {
50645             __pyx_print_kwargs = PyDict_New();
50646             if (unlikely(!__pyx_print_kwargs))
50647                 return -1;
50648             end_string = PyUnicode_FromStringAndSize(" ", 1);
50649             if (unlikely(!end_string))
50650                 return -1;
50651             if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
50652                 Py_DECREF(end_string);
50653                 return -1;
50654             }
50655             Py_DECREF(end_string);
50656         }
50657         kwargs = __pyx_print_kwargs;
50658     }
50659     result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
50660     if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
50661         Py_DECREF(kwargs);
50662     if (!result)
50663         return -1;
50664     Py_DECREF(result);
50665     return 0;
50666 bad:
50667     if (kwargs != __pyx_print_kwargs)
50668         Py_XDECREF(kwargs);
50669     return -1;
50670 }
50671 #endif
50672 
50673 /* CIntToPy */
__Pyx_PyInt_From_npy_int64(npy_int64 value)50674   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value) {
50675     const npy_int64 neg_one = (npy_int64) ((npy_int64) 0 - (npy_int64) 1), const_zero = (npy_int64) 0;
50676     const int is_unsigned = neg_one > const_zero;
50677     if (is_unsigned) {
50678         if (sizeof(npy_int64) < sizeof(long)) {
50679             return PyInt_FromLong((long) value);
50680         } else if (sizeof(npy_int64) <= sizeof(unsigned long)) {
50681             return PyLong_FromUnsignedLong((unsigned long) value);
50682 #ifdef HAVE_LONG_LONG
50683         } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
50684             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
50685 #endif
50686         }
50687     } else {
50688         if (sizeof(npy_int64) <= sizeof(long)) {
50689             return PyInt_FromLong((long) value);
50690 #ifdef HAVE_LONG_LONG
50691         } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
50692             return PyLong_FromLongLong((PY_LONG_LONG) value);
50693 #endif
50694         }
50695     }
50696     {
50697         int one = 1; int little = (int)*(unsigned char *)&one;
50698         unsigned char *bytes = (unsigned char *)&value;
50699         return _PyLong_FromByteArray(bytes, sizeof(npy_int64),
50700                                      little, !is_unsigned);
50701     }
50702 }
50703 
50704 /* MemviewDtypeToObject */
__pyx_memview_get_nn___pyx_t_5numpy_uint64_t(const char * itemp)50705   static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_uint64_t(const char *itemp) {
50706     return (PyObject *) __Pyx_PyInt_From_npy_uint64(*(__pyx_t_5numpy_uint64_t *) itemp);
50707 }
__pyx_memview_set_nn___pyx_t_5numpy_uint64_t(const char * itemp,PyObject * obj)50708 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_uint64_t(const char *itemp, PyObject *obj) {
50709     __pyx_t_5numpy_uint64_t value = __Pyx_PyInt_As_npy_uint64(obj);
50710     if ((value == ((npy_uint64)-1)) && PyErr_Occurred())
50711         return 0;
50712     *(__pyx_t_5numpy_uint64_t *) itemp = value;
50713     return 1;
50714 }
50715 
50716 /* None */
__Pyx_pow___pyx_t_5numpy_uint64_t(__pyx_t_5numpy_uint64_t b,__pyx_t_5numpy_uint64_t e)50717   static CYTHON_INLINE __pyx_t_5numpy_uint64_t __Pyx_pow___pyx_t_5numpy_uint64_t(__pyx_t_5numpy_uint64_t b, __pyx_t_5numpy_uint64_t e) {
50718     __pyx_t_5numpy_uint64_t t = b;
50719     switch (e) {
50720         case 3:
50721             t *= b;
50722         CYTHON_FALLTHROUGH;
50723         case 2:
50724             t *= b;
50725         CYTHON_FALLTHROUGH;
50726         case 1:
50727             return t;
50728         case 0:
50729             return 1;
50730     }
50731     #if 0
50732     if (unlikely(e<0)) return 0;
50733     #endif
50734     t = 1;
50735     while (likely(e)) {
50736         t *= (b * (e&1)) | ((~e)&1);
50737         b *= b;
50738         e >>= 1;
50739     }
50740     return t;
50741 }
50742 
50743 /* None */
__Pyx_pow_long(long b,long e)50744   static CYTHON_INLINE long __Pyx_pow_long(long b, long e) {
50745     long t = b;
50746     switch (e) {
50747         case 3:
50748             t *= b;
50749         CYTHON_FALLTHROUGH;
50750         case 2:
50751             t *= b;
50752         CYTHON_FALLTHROUGH;
50753         case 1:
50754             return t;
50755         case 0:
50756             return 1;
50757     }
50758     #if 1
50759     if (unlikely(e<0)) return 0;
50760     #endif
50761     t = 1;
50762     while (likely(e)) {
50763         t *= (b * (e&1)) | ((~e)&1);
50764         b *= b;
50765         e >>= 1;
50766     }
50767     return t;
50768 }
50769 
50770 /* CIntToPy */
__Pyx_PyInt_From_long(long value)50771   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
50772     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
50773     const int is_unsigned = neg_one > const_zero;
50774     if (is_unsigned) {
50775         if (sizeof(long) < sizeof(long)) {
50776             return PyInt_FromLong((long) value);
50777         } else if (sizeof(long) <= sizeof(unsigned long)) {
50778             return PyLong_FromUnsignedLong((unsigned long) value);
50779 #ifdef HAVE_LONG_LONG
50780         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
50781             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
50782 #endif
50783         }
50784     } else {
50785         if (sizeof(long) <= sizeof(long)) {
50786             return PyInt_FromLong((long) value);
50787 #ifdef HAVE_LONG_LONG
50788         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
50789             return PyLong_FromLongLong((PY_LONG_LONG) value);
50790 #endif
50791         }
50792     }
50793     {
50794         int one = 1; int little = (int)*(unsigned char *)&one;
50795         unsigned char *bytes = (unsigned char *)&value;
50796         return _PyLong_FromByteArray(bytes, sizeof(long),
50797                                      little, !is_unsigned);
50798     }
50799 }
50800 
50801 /* Declarations */
50802   #if CYTHON_CCOMPLEX
50803   #ifdef __cplusplus
__pyx_t_float_complex_from_parts(float x,float y)50804     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
50805       return ::std::complex< float >(x, y);
50806     }
50807   #else
__pyx_t_float_complex_from_parts(float x,float y)50808     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
50809       return x + y*(__pyx_t_float_complex)_Complex_I;
50810     }
50811   #endif
50812 #else
__pyx_t_float_complex_from_parts(float x,float y)50813     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
50814       __pyx_t_float_complex z;
50815       z.real = x;
50816       z.imag = y;
50817       return z;
50818     }
50819 #endif
50820 
50821 /* Arithmetic */
50822   #if CYTHON_CCOMPLEX
50823 #else
__Pyx_c_eq_float(__pyx_t_float_complex a,__pyx_t_float_complex b)50824     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
50825        return (a.real == b.real) && (a.imag == b.imag);
50826     }
__Pyx_c_sum_float(__pyx_t_float_complex a,__pyx_t_float_complex b)50827     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
50828         __pyx_t_float_complex z;
50829         z.real = a.real + b.real;
50830         z.imag = a.imag + b.imag;
50831         return z;
50832     }
__Pyx_c_diff_float(__pyx_t_float_complex a,__pyx_t_float_complex b)50833     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
50834         __pyx_t_float_complex z;
50835         z.real = a.real - b.real;
50836         z.imag = a.imag - b.imag;
50837         return z;
50838     }
__Pyx_c_prod_float(__pyx_t_float_complex a,__pyx_t_float_complex b)50839     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
50840         __pyx_t_float_complex z;
50841         z.real = a.real * b.real - a.imag * b.imag;
50842         z.imag = a.real * b.imag + a.imag * b.real;
50843         return z;
50844     }
50845     #if 1
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)50846     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
50847         if (b.imag == 0) {
50848             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
50849         } else if (fabsf(b.real) >= fabsf(b.imag)) {
50850             if (b.real == 0 && b.imag == 0) {
50851                 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
50852             } else {
50853                 float r = b.imag / b.real;
50854                 float s = (float)(1.0) / (b.real + b.imag * r);
50855                 return __pyx_t_float_complex_from_parts(
50856                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
50857             }
50858         } else {
50859             float r = b.real / b.imag;
50860             float s = (float)(1.0) / (b.imag + b.real * r);
50861             return __pyx_t_float_complex_from_parts(
50862                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
50863         }
50864     }
50865     #else
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)50866     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
50867         if (b.imag == 0) {
50868             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
50869         } else {
50870             float denom = b.real * b.real + b.imag * b.imag;
50871             return __pyx_t_float_complex_from_parts(
50872                 (a.real * b.real + a.imag * b.imag) / denom,
50873                 (a.imag * b.real - a.real * b.imag) / denom);
50874         }
50875     }
50876     #endif
__Pyx_c_neg_float(__pyx_t_float_complex a)50877     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
50878         __pyx_t_float_complex z;
50879         z.real = -a.real;
50880         z.imag = -a.imag;
50881         return z;
50882     }
__Pyx_c_is_zero_float(__pyx_t_float_complex a)50883     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
50884        return (a.real == 0) && (a.imag == 0);
50885     }
__Pyx_c_conj_float(__pyx_t_float_complex a)50886     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
50887         __pyx_t_float_complex z;
50888         z.real =  a.real;
50889         z.imag = -a.imag;
50890         return z;
50891     }
50892     #if 1
__Pyx_c_abs_float(__pyx_t_float_complex z)50893         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
50894           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
50895             return sqrtf(z.real*z.real + z.imag*z.imag);
50896           #else
50897             return hypotf(z.real, z.imag);
50898           #endif
50899         }
__Pyx_c_pow_float(__pyx_t_float_complex a,__pyx_t_float_complex b)50900         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
50901             __pyx_t_float_complex z;
50902             float r, lnr, theta, z_r, z_theta;
50903             if (b.imag == 0 && b.real == (int)b.real) {
50904                 if (b.real < 0) {
50905                     float denom = a.real * a.real + a.imag * a.imag;
50906                     a.real = a.real / denom;
50907                     a.imag = -a.imag / denom;
50908                     b.real = -b.real;
50909                 }
50910                 switch ((int)b.real) {
50911                     case 0:
50912                         z.real = 1;
50913                         z.imag = 0;
50914                         return z;
50915                     case 1:
50916                         return a;
50917                     case 2:
50918                         z = __Pyx_c_prod_float(a, a);
50919                         return __Pyx_c_prod_float(a, a);
50920                     case 3:
50921                         z = __Pyx_c_prod_float(a, a);
50922                         return __Pyx_c_prod_float(z, a);
50923                     case 4:
50924                         z = __Pyx_c_prod_float(a, a);
50925                         return __Pyx_c_prod_float(z, z);
50926                 }
50927             }
50928             if (a.imag == 0) {
50929                 if (a.real == 0) {
50930                     return a;
50931                 } else if (b.imag == 0) {
50932                     z.real = powf(a.real, b.real);
50933                     z.imag = 0;
50934                     return z;
50935                 } else if (a.real > 0) {
50936                     r = a.real;
50937                     theta = 0;
50938                 } else {
50939                     r = -a.real;
50940                     theta = atan2f(0.0, -1.0);
50941                 }
50942             } else {
50943                 r = __Pyx_c_abs_float(a);
50944                 theta = atan2f(a.imag, a.real);
50945             }
50946             lnr = logf(r);
50947             z_r = expf(lnr * b.real - theta * b.imag);
50948             z_theta = theta * b.real + lnr * b.imag;
50949             z.real = z_r * cosf(z_theta);
50950             z.imag = z_r * sinf(z_theta);
50951             return z;
50952         }
50953     #endif
50954 #endif
50955 
50956 /* Declarations */
50957   #if CYTHON_CCOMPLEX
50958   #ifdef __cplusplus
__pyx_t_double_complex_from_parts(double x,double y)50959     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
50960       return ::std::complex< double >(x, y);
50961     }
50962   #else
__pyx_t_double_complex_from_parts(double x,double y)50963     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
50964       return x + y*(__pyx_t_double_complex)_Complex_I;
50965     }
50966   #endif
50967 #else
__pyx_t_double_complex_from_parts(double x,double y)50968     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
50969       __pyx_t_double_complex z;
50970       z.real = x;
50971       z.imag = y;
50972       return z;
50973     }
50974 #endif
50975 
50976 /* Arithmetic */
50977   #if CYTHON_CCOMPLEX
50978 #else
__Pyx_c_eq_double(__pyx_t_double_complex a,__pyx_t_double_complex b)50979     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
50980        return (a.real == b.real) && (a.imag == b.imag);
50981     }
__Pyx_c_sum_double(__pyx_t_double_complex a,__pyx_t_double_complex b)50982     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
50983         __pyx_t_double_complex z;
50984         z.real = a.real + b.real;
50985         z.imag = a.imag + b.imag;
50986         return z;
50987     }
__Pyx_c_diff_double(__pyx_t_double_complex a,__pyx_t_double_complex b)50988     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
50989         __pyx_t_double_complex z;
50990         z.real = a.real - b.real;
50991         z.imag = a.imag - b.imag;
50992         return z;
50993     }
__Pyx_c_prod_double(__pyx_t_double_complex a,__pyx_t_double_complex b)50994     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
50995         __pyx_t_double_complex z;
50996         z.real = a.real * b.real - a.imag * b.imag;
50997         z.imag = a.real * b.imag + a.imag * b.real;
50998         return z;
50999     }
51000     #if 1
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)51001     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
51002         if (b.imag == 0) {
51003             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
51004         } else if (fabs(b.real) >= fabs(b.imag)) {
51005             if (b.real == 0 && b.imag == 0) {
51006                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
51007             } else {
51008                 double r = b.imag / b.real;
51009                 double s = (double)(1.0) / (b.real + b.imag * r);
51010                 return __pyx_t_double_complex_from_parts(
51011                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
51012             }
51013         } else {
51014             double r = b.real / b.imag;
51015             double s = (double)(1.0) / (b.imag + b.real * r);
51016             return __pyx_t_double_complex_from_parts(
51017                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
51018         }
51019     }
51020     #else
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)51021     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
51022         if (b.imag == 0) {
51023             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
51024         } else {
51025             double denom = b.real * b.real + b.imag * b.imag;
51026             return __pyx_t_double_complex_from_parts(
51027                 (a.real * b.real + a.imag * b.imag) / denom,
51028                 (a.imag * b.real - a.real * b.imag) / denom);
51029         }
51030     }
51031     #endif
__Pyx_c_neg_double(__pyx_t_double_complex a)51032     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
51033         __pyx_t_double_complex z;
51034         z.real = -a.real;
51035         z.imag = -a.imag;
51036         return z;
51037     }
__Pyx_c_is_zero_double(__pyx_t_double_complex a)51038     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
51039        return (a.real == 0) && (a.imag == 0);
51040     }
__Pyx_c_conj_double(__pyx_t_double_complex a)51041     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
51042         __pyx_t_double_complex z;
51043         z.real =  a.real;
51044         z.imag = -a.imag;
51045         return z;
51046     }
51047     #if 1
__Pyx_c_abs_double(__pyx_t_double_complex z)51048         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
51049           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
51050             return sqrt(z.real*z.real + z.imag*z.imag);
51051           #else
51052             return hypot(z.real, z.imag);
51053           #endif
51054         }
__Pyx_c_pow_double(__pyx_t_double_complex a,__pyx_t_double_complex b)51055         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
51056             __pyx_t_double_complex z;
51057             double r, lnr, theta, z_r, z_theta;
51058             if (b.imag == 0 && b.real == (int)b.real) {
51059                 if (b.real < 0) {
51060                     double denom = a.real * a.real + a.imag * a.imag;
51061                     a.real = a.real / denom;
51062                     a.imag = -a.imag / denom;
51063                     b.real = -b.real;
51064                 }
51065                 switch ((int)b.real) {
51066                     case 0:
51067                         z.real = 1;
51068                         z.imag = 0;
51069                         return z;
51070                     case 1:
51071                         return a;
51072                     case 2:
51073                         z = __Pyx_c_prod_double(a, a);
51074                         return __Pyx_c_prod_double(a, a);
51075                     case 3:
51076                         z = __Pyx_c_prod_double(a, a);
51077                         return __Pyx_c_prod_double(z, a);
51078                     case 4:
51079                         z = __Pyx_c_prod_double(a, a);
51080                         return __Pyx_c_prod_double(z, z);
51081                 }
51082             }
51083             if (a.imag == 0) {
51084                 if (a.real == 0) {
51085                     return a;
51086                 } else if (b.imag == 0) {
51087                     z.real = pow(a.real, b.real);
51088                     z.imag = 0;
51089                     return z;
51090                 } else if (a.real > 0) {
51091                     r = a.real;
51092                     theta = 0;
51093                 } else {
51094                     r = -a.real;
51095                     theta = atan2(0.0, -1.0);
51096                 }
51097             } else {
51098                 r = __Pyx_c_abs_double(a);
51099                 theta = atan2(a.imag, a.real);
51100             }
51101             lnr = log(r);
51102             z_r = exp(lnr * b.real - theta * b.imag);
51103             z_theta = theta * b.real + lnr * b.imag;
51104             z.real = z_r * cos(z_theta);
51105             z.imag = z_r * sin(z_theta);
51106             return z;
51107         }
51108     #endif
51109 #endif
51110 
51111 /* CIntToPy */
__Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value)51112   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
51113     const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
51114     const int is_unsigned = neg_one > const_zero;
51115     if (is_unsigned) {
51116         if (sizeof(enum NPY_TYPES) < sizeof(long)) {
51117             return PyInt_FromLong((long) value);
51118         } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
51119             return PyLong_FromUnsignedLong((unsigned long) value);
51120 #ifdef HAVE_LONG_LONG
51121         } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
51122             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
51123 #endif
51124         }
51125     } else {
51126         if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
51127             return PyInt_FromLong((long) value);
51128 #ifdef HAVE_LONG_LONG
51129         } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
51130             return PyLong_FromLongLong((PY_LONG_LONG) value);
51131 #endif
51132         }
51133     }
51134     {
51135         int one = 1; int little = (int)*(unsigned char *)&one;
51136         unsigned char *bytes = (unsigned char *)&value;
51137         return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
51138                                      little, !is_unsigned);
51139     }
51140 }
51141 
51142 /* MemviewSliceCopyTemplate */
51143   static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice * from_mvs,const char * mode,int ndim,size_t sizeof_dtype,int contig_flag,int dtype_is_object)51144 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
51145                                  const char *mode, int ndim,
51146                                  size_t sizeof_dtype, int contig_flag,
51147                                  int dtype_is_object)
51148 {
51149     __Pyx_RefNannyDeclarations
51150     int i;
51151     __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
51152     struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
51153     Py_buffer *buf = &from_memview->view;
51154     PyObject *shape_tuple = NULL;
51155     PyObject *temp_int = NULL;
51156     struct __pyx_array_obj *array_obj = NULL;
51157     struct __pyx_memoryview_obj *memview_obj = NULL;
51158     __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
51159     for (i = 0; i < ndim; i++) {
51160         if (from_mvs->suboffsets[i] >= 0) {
51161             PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
51162                                            "indirect dimensions (axis %d)", i);
51163             goto fail;
51164         }
51165     }
51166     shape_tuple = PyTuple_New(ndim);
51167     if (unlikely(!shape_tuple)) {
51168         goto fail;
51169     }
51170     __Pyx_GOTREF(shape_tuple);
51171     for(i = 0; i < ndim; i++) {
51172         temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
51173         if(unlikely(!temp_int)) {
51174             goto fail;
51175         } else {
51176             PyTuple_SET_ITEM(shape_tuple, i, temp_int);
51177             temp_int = NULL;
51178         }
51179     }
51180     array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
51181     if (unlikely(!array_obj)) {
51182         goto fail;
51183     }
51184     __Pyx_GOTREF(array_obj);
51185     memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
51186                                     (PyObject *) array_obj, contig_flag,
51187                                     dtype_is_object,
51188                                     from_mvs->memview->typeinfo);
51189     if (unlikely(!memview_obj))
51190         goto fail;
51191     if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
51192         goto fail;
51193     if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
51194                                                 dtype_is_object) < 0))
51195         goto fail;
51196     goto no_fail;
51197 fail:
51198     __Pyx_XDECREF(new_mvs.memview);
51199     new_mvs.memview = NULL;
51200     new_mvs.data = NULL;
51201 no_fail:
51202     __Pyx_XDECREF(shape_tuple);
51203     __Pyx_XDECREF(temp_int);
51204     __Pyx_XDECREF(array_obj);
51205     __Pyx_RefNannyFinishContext();
51206     return new_mvs;
51207 }
51208 
51209 /* CIntFromPy */
__Pyx_PyInt_As_npy_uint64(PyObject * x)51210   static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *x) {
51211     const npy_uint64 neg_one = (npy_uint64) ((npy_uint64) 0 - (npy_uint64) 1), const_zero = (npy_uint64) 0;
51212     const int is_unsigned = neg_one > const_zero;
51213 #if PY_MAJOR_VERSION < 3
51214     if (likely(PyInt_Check(x))) {
51215         if (sizeof(npy_uint64) < sizeof(long)) {
51216             __PYX_VERIFY_RETURN_INT(npy_uint64, long, PyInt_AS_LONG(x))
51217         } else {
51218             long val = PyInt_AS_LONG(x);
51219             if (is_unsigned && unlikely(val < 0)) {
51220                 goto raise_neg_overflow;
51221             }
51222             return (npy_uint64) val;
51223         }
51224     } else
51225 #endif
51226     if (likely(PyLong_Check(x))) {
51227         if (is_unsigned) {
51228 #if CYTHON_USE_PYLONG_INTERNALS
51229             const digit* digits = ((PyLongObject*)x)->ob_digit;
51230             switch (Py_SIZE(x)) {
51231                 case  0: return (npy_uint64) 0;
51232                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint64, digit, digits[0])
51233                 case 2:
51234                     if (8 * sizeof(npy_uint64) > 1 * PyLong_SHIFT) {
51235                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51236                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51237                         } else if (8 * sizeof(npy_uint64) >= 2 * PyLong_SHIFT) {
51238                             return (npy_uint64) (((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
51239                         }
51240                     }
51241                     break;
51242                 case 3:
51243                     if (8 * sizeof(npy_uint64) > 2 * PyLong_SHIFT) {
51244                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51245                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51246                         } else if (8 * sizeof(npy_uint64) >= 3 * PyLong_SHIFT) {
51247                             return (npy_uint64) (((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
51248                         }
51249                     }
51250                     break;
51251                 case 4:
51252                     if (8 * sizeof(npy_uint64) > 3 * PyLong_SHIFT) {
51253                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51254                             __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])))
51255                         } else if (8 * sizeof(npy_uint64) >= 4 * PyLong_SHIFT) {
51256                             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]));
51257                         }
51258                     }
51259                     break;
51260             }
51261 #endif
51262 #if CYTHON_COMPILING_IN_CPYTHON
51263             if (unlikely(Py_SIZE(x) < 0)) {
51264                 goto raise_neg_overflow;
51265             }
51266 #else
51267             {
51268                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
51269                 if (unlikely(result < 0))
51270                     return (npy_uint64) -1;
51271                 if (unlikely(result == 1))
51272                     goto raise_neg_overflow;
51273             }
51274 #endif
51275             if (sizeof(npy_uint64) <= sizeof(unsigned long)) {
51276                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, unsigned long, PyLong_AsUnsignedLong(x))
51277 #ifdef HAVE_LONG_LONG
51278             } else if (sizeof(npy_uint64) <= sizeof(unsigned PY_LONG_LONG)) {
51279                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
51280 #endif
51281             }
51282         } else {
51283 #if CYTHON_USE_PYLONG_INTERNALS
51284             const digit* digits = ((PyLongObject*)x)->ob_digit;
51285             switch (Py_SIZE(x)) {
51286                 case  0: return (npy_uint64) 0;
51287                 case -1: __PYX_VERIFY_RETURN_INT(npy_uint64, sdigit, (sdigit) (-(sdigit)digits[0]))
51288                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint64,  digit, +digits[0])
51289                 case -2:
51290                     if (8 * sizeof(npy_uint64) - 1 > 1 * PyLong_SHIFT) {
51291                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51292                             __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51293                         } else if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
51294                             return (npy_uint64) (((npy_uint64)-1)*(((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
51295                         }
51296                     }
51297                     break;
51298                 case 2:
51299                     if (8 * sizeof(npy_uint64) > 1 * PyLong_SHIFT) {
51300                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51301                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51302                         } else if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
51303                             return (npy_uint64) ((((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
51304                         }
51305                     }
51306                     break;
51307                 case -3:
51308                     if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
51309                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51310                             __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51311                         } else if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
51312                             return (npy_uint64) (((npy_uint64)-1)*(((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
51313                         }
51314                     }
51315                     break;
51316                 case 3:
51317                     if (8 * sizeof(npy_uint64) > 2 * PyLong_SHIFT) {
51318                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51319                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51320                         } else if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
51321                             return (npy_uint64) ((((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
51322                         }
51323                     }
51324                     break;
51325                 case -4:
51326                     if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
51327                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51328                             __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])))
51329                         } else if (8 * sizeof(npy_uint64) - 1 > 4 * PyLong_SHIFT) {
51330                             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])));
51331                         }
51332                     }
51333                     break;
51334                 case 4:
51335                     if (8 * sizeof(npy_uint64) > 3 * PyLong_SHIFT) {
51336                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51337                             __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])))
51338                         } else if (8 * sizeof(npy_uint64) - 1 > 4 * PyLong_SHIFT) {
51339                             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])));
51340                         }
51341                     }
51342                     break;
51343             }
51344 #endif
51345             if (sizeof(npy_uint64) <= sizeof(long)) {
51346                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, long, PyLong_AsLong(x))
51347 #ifdef HAVE_LONG_LONG
51348             } else if (sizeof(npy_uint64) <= sizeof(PY_LONG_LONG)) {
51349                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, PY_LONG_LONG, PyLong_AsLongLong(x))
51350 #endif
51351             }
51352         }
51353         {
51354 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
51355             PyErr_SetString(PyExc_RuntimeError,
51356                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
51357 #else
51358             npy_uint64 val;
51359             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
51360  #if PY_MAJOR_VERSION < 3
51361             if (likely(v) && !PyLong_Check(v)) {
51362                 PyObject *tmp = v;
51363                 v = PyNumber_Long(tmp);
51364                 Py_DECREF(tmp);
51365             }
51366  #endif
51367             if (likely(v)) {
51368                 int one = 1; int is_little = (int)*(unsigned char *)&one;
51369                 unsigned char *bytes = (unsigned char *)&val;
51370                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
51371                                               bytes, sizeof(val),
51372                                               is_little, !is_unsigned);
51373                 Py_DECREF(v);
51374                 if (likely(!ret))
51375                     return val;
51376             }
51377 #endif
51378             return (npy_uint64) -1;
51379         }
51380     } else {
51381         npy_uint64 val;
51382         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
51383         if (!tmp) return (npy_uint64) -1;
51384         val = __Pyx_PyInt_As_npy_uint64(tmp);
51385         Py_DECREF(tmp);
51386         return val;
51387     }
51388 raise_overflow:
51389     PyErr_SetString(PyExc_OverflowError,
51390         "value too large to convert to npy_uint64");
51391     return (npy_uint64) -1;
51392 raise_neg_overflow:
51393     PyErr_SetString(PyExc_OverflowError,
51394         "can't convert negative value to npy_uint64");
51395     return (npy_uint64) -1;
51396 }
51397 
51398 /* CIntFromPy */
__Pyx_PyInt_As_npy_uint32(PyObject * x)51399   static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *x) {
51400     const npy_uint32 neg_one = (npy_uint32) ((npy_uint32) 0 - (npy_uint32) 1), const_zero = (npy_uint32) 0;
51401     const int is_unsigned = neg_one > const_zero;
51402 #if PY_MAJOR_VERSION < 3
51403     if (likely(PyInt_Check(x))) {
51404         if (sizeof(npy_uint32) < sizeof(long)) {
51405             __PYX_VERIFY_RETURN_INT(npy_uint32, long, PyInt_AS_LONG(x))
51406         } else {
51407             long val = PyInt_AS_LONG(x);
51408             if (is_unsigned && unlikely(val < 0)) {
51409                 goto raise_neg_overflow;
51410             }
51411             return (npy_uint32) val;
51412         }
51413     } else
51414 #endif
51415     if (likely(PyLong_Check(x))) {
51416         if (is_unsigned) {
51417 #if CYTHON_USE_PYLONG_INTERNALS
51418             const digit* digits = ((PyLongObject*)x)->ob_digit;
51419             switch (Py_SIZE(x)) {
51420                 case  0: return (npy_uint32) 0;
51421                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint32, digit, digits[0])
51422                 case 2:
51423                     if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) {
51424                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51425                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51426                         } else if (8 * sizeof(npy_uint32) >= 2 * PyLong_SHIFT) {
51427                             return (npy_uint32) (((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
51428                         }
51429                     }
51430                     break;
51431                 case 3:
51432                     if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) {
51433                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51434                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51435                         } else if (8 * sizeof(npy_uint32) >= 3 * PyLong_SHIFT) {
51436                             return (npy_uint32) (((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
51437                         }
51438                     }
51439                     break;
51440                 case 4:
51441                     if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) {
51442                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51443                             __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])))
51444                         } else if (8 * sizeof(npy_uint32) >= 4 * PyLong_SHIFT) {
51445                             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]));
51446                         }
51447                     }
51448                     break;
51449             }
51450 #endif
51451 #if CYTHON_COMPILING_IN_CPYTHON
51452             if (unlikely(Py_SIZE(x) < 0)) {
51453                 goto raise_neg_overflow;
51454             }
51455 #else
51456             {
51457                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
51458                 if (unlikely(result < 0))
51459                     return (npy_uint32) -1;
51460                 if (unlikely(result == 1))
51461                     goto raise_neg_overflow;
51462             }
51463 #endif
51464             if (sizeof(npy_uint32) <= sizeof(unsigned long)) {
51465                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned long, PyLong_AsUnsignedLong(x))
51466 #ifdef HAVE_LONG_LONG
51467             } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) {
51468                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
51469 #endif
51470             }
51471         } else {
51472 #if CYTHON_USE_PYLONG_INTERNALS
51473             const digit* digits = ((PyLongObject*)x)->ob_digit;
51474             switch (Py_SIZE(x)) {
51475                 case  0: return (npy_uint32) 0;
51476                 case -1: __PYX_VERIFY_RETURN_INT(npy_uint32, sdigit, (sdigit) (-(sdigit)digits[0]))
51477                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint32,  digit, +digits[0])
51478                 case -2:
51479                     if (8 * sizeof(npy_uint32) - 1 > 1 * PyLong_SHIFT) {
51480                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51481                             __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51482                         } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
51483                             return (npy_uint32) (((npy_uint32)-1)*(((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
51484                         }
51485                     }
51486                     break;
51487                 case 2:
51488                     if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) {
51489                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51490                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51491                         } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
51492                             return (npy_uint32) ((((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
51493                         }
51494                     }
51495                     break;
51496                 case -3:
51497                     if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
51498                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51499                             __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51500                         } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
51501                             return (npy_uint32) (((npy_uint32)-1)*(((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
51502                         }
51503                     }
51504                     break;
51505                 case 3:
51506                     if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) {
51507                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51508                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51509                         } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
51510                             return (npy_uint32) ((((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
51511                         }
51512                     }
51513                     break;
51514                 case -4:
51515                     if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
51516                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51517                             __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])))
51518                         } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) {
51519                             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])));
51520                         }
51521                     }
51522                     break;
51523                 case 4:
51524                     if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) {
51525                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51526                             __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])))
51527                         } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) {
51528                             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])));
51529                         }
51530                     }
51531                     break;
51532             }
51533 #endif
51534             if (sizeof(npy_uint32) <= sizeof(long)) {
51535                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, long, PyLong_AsLong(x))
51536 #ifdef HAVE_LONG_LONG
51537             } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) {
51538                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, PY_LONG_LONG, PyLong_AsLongLong(x))
51539 #endif
51540             }
51541         }
51542         {
51543 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
51544             PyErr_SetString(PyExc_RuntimeError,
51545                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
51546 #else
51547             npy_uint32 val;
51548             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
51549  #if PY_MAJOR_VERSION < 3
51550             if (likely(v) && !PyLong_Check(v)) {
51551                 PyObject *tmp = v;
51552                 v = PyNumber_Long(tmp);
51553                 Py_DECREF(tmp);
51554             }
51555  #endif
51556             if (likely(v)) {
51557                 int one = 1; int is_little = (int)*(unsigned char *)&one;
51558                 unsigned char *bytes = (unsigned char *)&val;
51559                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
51560                                               bytes, sizeof(val),
51561                                               is_little, !is_unsigned);
51562                 Py_DECREF(v);
51563                 if (likely(!ret))
51564                     return val;
51565             }
51566 #endif
51567             return (npy_uint32) -1;
51568         }
51569     } else {
51570         npy_uint32 val;
51571         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
51572         if (!tmp) return (npy_uint32) -1;
51573         val = __Pyx_PyInt_As_npy_uint32(tmp);
51574         Py_DECREF(tmp);
51575         return val;
51576     }
51577 raise_overflow:
51578     PyErr_SetString(PyExc_OverflowError,
51579         "value too large to convert to npy_uint32");
51580     return (npy_uint32) -1;
51581 raise_neg_overflow:
51582     PyErr_SetString(PyExc_OverflowError,
51583         "can't convert negative value to npy_uint32");
51584     return (npy_uint32) -1;
51585 }
51586 
51587 /* CIntFromPy */
__Pyx_PyInt_As_int(PyObject * x)51588   static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
51589     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
51590     const int is_unsigned = neg_one > const_zero;
51591 #if PY_MAJOR_VERSION < 3
51592     if (likely(PyInt_Check(x))) {
51593         if (sizeof(int) < sizeof(long)) {
51594             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
51595         } else {
51596             long val = PyInt_AS_LONG(x);
51597             if (is_unsigned && unlikely(val < 0)) {
51598                 goto raise_neg_overflow;
51599             }
51600             return (int) val;
51601         }
51602     } else
51603 #endif
51604     if (likely(PyLong_Check(x))) {
51605         if (is_unsigned) {
51606 #if CYTHON_USE_PYLONG_INTERNALS
51607             const digit* digits = ((PyLongObject*)x)->ob_digit;
51608             switch (Py_SIZE(x)) {
51609                 case  0: return (int) 0;
51610                 case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
51611                 case 2:
51612                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
51613                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51614                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51615                         } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
51616                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
51617                         }
51618                     }
51619                     break;
51620                 case 3:
51621                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
51622                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51623                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51624                         } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
51625                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
51626                         }
51627                     }
51628                     break;
51629                 case 4:
51630                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
51631                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51632                             __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])))
51633                         } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
51634                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
51635                         }
51636                     }
51637                     break;
51638             }
51639 #endif
51640 #if CYTHON_COMPILING_IN_CPYTHON
51641             if (unlikely(Py_SIZE(x) < 0)) {
51642                 goto raise_neg_overflow;
51643             }
51644 #else
51645             {
51646                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
51647                 if (unlikely(result < 0))
51648                     return (int) -1;
51649                 if (unlikely(result == 1))
51650                     goto raise_neg_overflow;
51651             }
51652 #endif
51653             if (sizeof(int) <= sizeof(unsigned long)) {
51654                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
51655 #ifdef HAVE_LONG_LONG
51656             } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
51657                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
51658 #endif
51659             }
51660         } else {
51661 #if CYTHON_USE_PYLONG_INTERNALS
51662             const digit* digits = ((PyLongObject*)x)->ob_digit;
51663             switch (Py_SIZE(x)) {
51664                 case  0: return (int) 0;
51665                 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
51666                 case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
51667                 case -2:
51668                     if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
51669                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51670                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51671                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
51672                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
51673                         }
51674                     }
51675                     break;
51676                 case 2:
51677                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
51678                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51679                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51680                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
51681                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
51682                         }
51683                     }
51684                     break;
51685                 case -3:
51686                     if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
51687                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51688                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51689                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
51690                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
51691                         }
51692                     }
51693                     break;
51694                 case 3:
51695                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
51696                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51697                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51698                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
51699                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
51700                         }
51701                     }
51702                     break;
51703                 case -4:
51704                     if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
51705                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51706                             __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])))
51707                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
51708                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
51709                         }
51710                     }
51711                     break;
51712                 case 4:
51713                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
51714                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51715                             __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])))
51716                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
51717                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
51718                         }
51719                     }
51720                     break;
51721             }
51722 #endif
51723             if (sizeof(int) <= sizeof(long)) {
51724                 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
51725 #ifdef HAVE_LONG_LONG
51726             } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
51727                 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
51728 #endif
51729             }
51730         }
51731         {
51732 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
51733             PyErr_SetString(PyExc_RuntimeError,
51734                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
51735 #else
51736             int val;
51737             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
51738  #if PY_MAJOR_VERSION < 3
51739             if (likely(v) && !PyLong_Check(v)) {
51740                 PyObject *tmp = v;
51741                 v = PyNumber_Long(tmp);
51742                 Py_DECREF(tmp);
51743             }
51744  #endif
51745             if (likely(v)) {
51746                 int one = 1; int is_little = (int)*(unsigned char *)&one;
51747                 unsigned char *bytes = (unsigned char *)&val;
51748                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
51749                                               bytes, sizeof(val),
51750                                               is_little, !is_unsigned);
51751                 Py_DECREF(v);
51752                 if (likely(!ret))
51753                     return val;
51754             }
51755 #endif
51756             return (int) -1;
51757         }
51758     } else {
51759         int val;
51760         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
51761         if (!tmp) return (int) -1;
51762         val = __Pyx_PyInt_As_int(tmp);
51763         Py_DECREF(tmp);
51764         return val;
51765     }
51766 raise_overflow:
51767     PyErr_SetString(PyExc_OverflowError,
51768         "value too large to convert to int");
51769     return (int) -1;
51770 raise_neg_overflow:
51771     PyErr_SetString(PyExc_OverflowError,
51772         "can't convert negative value to int");
51773     return (int) -1;
51774 }
51775 
51776 /* CIntFromPy */
__Pyx_PyInt_As_long(PyObject * x)51777   static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
51778     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
51779     const int is_unsigned = neg_one > const_zero;
51780 #if PY_MAJOR_VERSION < 3
51781     if (likely(PyInt_Check(x))) {
51782         if (sizeof(long) < sizeof(long)) {
51783             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
51784         } else {
51785             long val = PyInt_AS_LONG(x);
51786             if (is_unsigned && unlikely(val < 0)) {
51787                 goto raise_neg_overflow;
51788             }
51789             return (long) val;
51790         }
51791     } else
51792 #endif
51793     if (likely(PyLong_Check(x))) {
51794         if (is_unsigned) {
51795 #if CYTHON_USE_PYLONG_INTERNALS
51796             const digit* digits = ((PyLongObject*)x)->ob_digit;
51797             switch (Py_SIZE(x)) {
51798                 case  0: return (long) 0;
51799                 case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
51800                 case 2:
51801                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
51802                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51803                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51804                         } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
51805                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
51806                         }
51807                     }
51808                     break;
51809                 case 3:
51810                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
51811                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51812                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51813                         } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
51814                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
51815                         }
51816                     }
51817                     break;
51818                 case 4:
51819                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
51820                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51821                             __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])))
51822                         } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
51823                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
51824                         }
51825                     }
51826                     break;
51827             }
51828 #endif
51829 #if CYTHON_COMPILING_IN_CPYTHON
51830             if (unlikely(Py_SIZE(x) < 0)) {
51831                 goto raise_neg_overflow;
51832             }
51833 #else
51834             {
51835                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
51836                 if (unlikely(result < 0))
51837                     return (long) -1;
51838                 if (unlikely(result == 1))
51839                     goto raise_neg_overflow;
51840             }
51841 #endif
51842             if (sizeof(long) <= sizeof(unsigned long)) {
51843                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
51844 #ifdef HAVE_LONG_LONG
51845             } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
51846                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
51847 #endif
51848             }
51849         } else {
51850 #if CYTHON_USE_PYLONG_INTERNALS
51851             const digit* digits = ((PyLongObject*)x)->ob_digit;
51852             switch (Py_SIZE(x)) {
51853                 case  0: return (long) 0;
51854                 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
51855                 case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
51856                 case -2:
51857                     if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
51858                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51859                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51860                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
51861                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
51862                         }
51863                     }
51864                     break;
51865                 case 2:
51866                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
51867                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
51868                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51869                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
51870                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
51871                         }
51872                     }
51873                     break;
51874                 case -3:
51875                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
51876                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51877                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51878                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
51879                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
51880                         }
51881                     }
51882                     break;
51883                 case 3:
51884                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
51885                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
51886                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
51887                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
51888                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
51889                         }
51890                     }
51891                     break;
51892                 case -4:
51893                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
51894                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51895                             __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])))
51896                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
51897                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
51898                         }
51899                     }
51900                     break;
51901                 case 4:
51902                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
51903                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
51904                             __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])))
51905                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
51906                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
51907                         }
51908                     }
51909                     break;
51910             }
51911 #endif
51912             if (sizeof(long) <= sizeof(long)) {
51913                 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
51914 #ifdef HAVE_LONG_LONG
51915             } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
51916                 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
51917 #endif
51918             }
51919         }
51920         {
51921 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
51922             PyErr_SetString(PyExc_RuntimeError,
51923                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
51924 #else
51925             long val;
51926             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
51927  #if PY_MAJOR_VERSION < 3
51928             if (likely(v) && !PyLong_Check(v)) {
51929                 PyObject *tmp = v;
51930                 v = PyNumber_Long(tmp);
51931                 Py_DECREF(tmp);
51932             }
51933  #endif
51934             if (likely(v)) {
51935                 int one = 1; int is_little = (int)*(unsigned char *)&one;
51936                 unsigned char *bytes = (unsigned char *)&val;
51937                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
51938                                               bytes, sizeof(val),
51939                                               is_little, !is_unsigned);
51940                 Py_DECREF(v);
51941                 if (likely(!ret))
51942                     return val;
51943             }
51944 #endif
51945             return (long) -1;
51946         }
51947     } else {
51948         long val;
51949         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
51950         if (!tmp) return (long) -1;
51951         val = __Pyx_PyInt_As_long(tmp);
51952         Py_DECREF(tmp);
51953         return val;
51954     }
51955 raise_overflow:
51956     PyErr_SetString(PyExc_OverflowError,
51957         "value too large to convert to long");
51958     return (long) -1;
51959 raise_neg_overflow:
51960     PyErr_SetString(PyExc_OverflowError,
51961         "can't convert negative value to long");
51962     return (long) -1;
51963 }
51964 
51965 /* TypeInfoToFormat */
__Pyx_TypeInfoToFormat(__Pyx_TypeInfo * type)51966   static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) {
51967     struct __pyx_typeinfo_string result = { {0} };
51968     char *buf = (char *) result.string;
51969     size_t size = type->size;
51970     switch (type->typegroup) {
51971         case 'H':
51972             *buf = 'c';
51973             break;
51974         case 'I':
51975         case 'U':
51976             if (size == 1)
51977                 *buf = (type->is_unsigned) ? 'B' : 'b';
51978             else if (size == 2)
51979                 *buf = (type->is_unsigned) ? 'H' : 'h';
51980             else if (size == 4)
51981                 *buf = (type->is_unsigned) ? 'I' : 'i';
51982             else if (size == 8)
51983                 *buf = (type->is_unsigned) ? 'Q' : 'q';
51984             break;
51985         case 'P':
51986             *buf = 'P';
51987             break;
51988         case 'C':
51989          {
51990             __Pyx_TypeInfo complex_type = *type;
51991             complex_type.typegroup = 'R';
51992             complex_type.size /= 2;
51993             *buf++ = 'Z';
51994             *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0];
51995             break;
51996          }
51997         case 'R':
51998             if (size == 4)
51999                 *buf = 'f';
52000             else if (size == 8)
52001                 *buf = 'd';
52002             else
52003                 *buf = 'g';
52004             break;
52005     }
52006     return result;
52007 }
52008 
52009 /* CIntFromPy */
__Pyx_PyInt_As_npy_int32(PyObject * x)52010   static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *x) {
52011     const npy_int32 neg_one = (npy_int32) ((npy_int32) 0 - (npy_int32) 1), const_zero = (npy_int32) 0;
52012     const int is_unsigned = neg_one > const_zero;
52013 #if PY_MAJOR_VERSION < 3
52014     if (likely(PyInt_Check(x))) {
52015         if (sizeof(npy_int32) < sizeof(long)) {
52016             __PYX_VERIFY_RETURN_INT(npy_int32, long, PyInt_AS_LONG(x))
52017         } else {
52018             long val = PyInt_AS_LONG(x);
52019             if (is_unsigned && unlikely(val < 0)) {
52020                 goto raise_neg_overflow;
52021             }
52022             return (npy_int32) val;
52023         }
52024     } else
52025 #endif
52026     if (likely(PyLong_Check(x))) {
52027         if (is_unsigned) {
52028 #if CYTHON_USE_PYLONG_INTERNALS
52029             const digit* digits = ((PyLongObject*)x)->ob_digit;
52030             switch (Py_SIZE(x)) {
52031                 case  0: return (npy_int32) 0;
52032                 case  1: __PYX_VERIFY_RETURN_INT(npy_int32, digit, digits[0])
52033                 case 2:
52034                     if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) {
52035                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52036                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52037                         } else if (8 * sizeof(npy_int32) >= 2 * PyLong_SHIFT) {
52038                             return (npy_int32) (((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));
52039                         }
52040                     }
52041                     break;
52042                 case 3:
52043                     if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) {
52044                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52045                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52046                         } else if (8 * sizeof(npy_int32) >= 3 * PyLong_SHIFT) {
52047                             return (npy_int32) (((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));
52048                         }
52049                     }
52050                     break;
52051                 case 4:
52052                     if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) {
52053                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52054                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52055                         } else if (8 * sizeof(npy_int32) >= 4 * PyLong_SHIFT) {
52056                             return (npy_int32) (((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0]));
52057                         }
52058                     }
52059                     break;
52060             }
52061 #endif
52062 #if CYTHON_COMPILING_IN_CPYTHON
52063             if (unlikely(Py_SIZE(x) < 0)) {
52064                 goto raise_neg_overflow;
52065             }
52066 #else
52067             {
52068                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
52069                 if (unlikely(result < 0))
52070                     return (npy_int32) -1;
52071                 if (unlikely(result == 1))
52072                     goto raise_neg_overflow;
52073             }
52074 #endif
52075             if (sizeof(npy_int32) <= sizeof(unsigned long)) {
52076                 __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned long, PyLong_AsUnsignedLong(x))
52077 #ifdef HAVE_LONG_LONG
52078             } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) {
52079                 __PYX_VERIFY_RETURN_INT_EXC(npy_int32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
52080 #endif
52081             }
52082         } else {
52083 #if CYTHON_USE_PYLONG_INTERNALS
52084             const digit* digits = ((PyLongObject*)x)->ob_digit;
52085             switch (Py_SIZE(x)) {
52086                 case  0: return (npy_int32) 0;
52087                 case -1: __PYX_VERIFY_RETURN_INT(npy_int32, sdigit, (sdigit) (-(sdigit)digits[0]))
52088                 case  1: __PYX_VERIFY_RETURN_INT(npy_int32,  digit, +digits[0])
52089                 case -2:
52090                     if (8 * sizeof(npy_int32) - 1 > 1 * PyLong_SHIFT) {
52091                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52092                             __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52093                         } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) {
52094                             return (npy_int32) (((npy_int32)-1)*(((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
52095                         }
52096                     }
52097                     break;
52098                 case 2:
52099                     if (8 * sizeof(npy_int32) > 1 * PyLong_SHIFT) {
52100                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52101                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52102                         } else if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) {
52103                             return (npy_int32) ((((((npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
52104                         }
52105                     }
52106                     break;
52107                 case -3:
52108                     if (8 * sizeof(npy_int32) - 1 > 2 * PyLong_SHIFT) {
52109                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52110                             __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52111                         } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) {
52112                             return (npy_int32) (((npy_int32)-1)*(((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
52113                         }
52114                     }
52115                     break;
52116                 case 3:
52117                     if (8 * sizeof(npy_int32) > 2 * PyLong_SHIFT) {
52118                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52119                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52120                         } else if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) {
52121                             return (npy_int32) ((((((((npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
52122                         }
52123                     }
52124                     break;
52125                 case -4:
52126                     if (8 * sizeof(npy_int32) - 1 > 3 * PyLong_SHIFT) {
52127                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52128                             __PYX_VERIFY_RETURN_INT(npy_int32, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52129                         } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) {
52130                             return (npy_int32) (((npy_int32)-1)*(((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
52131                         }
52132                     }
52133                     break;
52134                 case 4:
52135                     if (8 * sizeof(npy_int32) > 3 * PyLong_SHIFT) {
52136                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52137                             __PYX_VERIFY_RETURN_INT(npy_int32, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52138                         } else if (8 * sizeof(npy_int32) - 1 > 4 * PyLong_SHIFT) {
52139                             return (npy_int32) ((((((((((npy_int32)digits[3]) << PyLong_SHIFT) | (npy_int32)digits[2]) << PyLong_SHIFT) | (npy_int32)digits[1]) << PyLong_SHIFT) | (npy_int32)digits[0])));
52140                         }
52141                     }
52142                     break;
52143             }
52144 #endif
52145             if (sizeof(npy_int32) <= sizeof(long)) {
52146                 __PYX_VERIFY_RETURN_INT_EXC(npy_int32, long, PyLong_AsLong(x))
52147 #ifdef HAVE_LONG_LONG
52148             } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) {
52149                 __PYX_VERIFY_RETURN_INT_EXC(npy_int32, PY_LONG_LONG, PyLong_AsLongLong(x))
52150 #endif
52151             }
52152         }
52153         {
52154 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
52155             PyErr_SetString(PyExc_RuntimeError,
52156                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
52157 #else
52158             npy_int32 val;
52159             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
52160  #if PY_MAJOR_VERSION < 3
52161             if (likely(v) && !PyLong_Check(v)) {
52162                 PyObject *tmp = v;
52163                 v = PyNumber_Long(tmp);
52164                 Py_DECREF(tmp);
52165             }
52166  #endif
52167             if (likely(v)) {
52168                 int one = 1; int is_little = (int)*(unsigned char *)&one;
52169                 unsigned char *bytes = (unsigned char *)&val;
52170                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
52171                                               bytes, sizeof(val),
52172                                               is_little, !is_unsigned);
52173                 Py_DECREF(v);
52174                 if (likely(!ret))
52175                     return val;
52176             }
52177 #endif
52178             return (npy_int32) -1;
52179         }
52180     } else {
52181         npy_int32 val;
52182         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
52183         if (!tmp) return (npy_int32) -1;
52184         val = __Pyx_PyInt_As_npy_int32(tmp);
52185         Py_DECREF(tmp);
52186         return val;
52187     }
52188 raise_overflow:
52189     PyErr_SetString(PyExc_OverflowError,
52190         "value too large to convert to npy_int32");
52191     return (npy_int32) -1;
52192 raise_neg_overflow:
52193     PyErr_SetString(PyExc_OverflowError,
52194         "can't convert negative value to npy_int32");
52195     return (npy_int32) -1;
52196 }
52197 
52198 /* CIntFromPy */
__Pyx_PyInt_As_npy_int64(PyObject * x)52199   static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) {
52200     const npy_int64 neg_one = (npy_int64) ((npy_int64) 0 - (npy_int64) 1), const_zero = (npy_int64) 0;
52201     const int is_unsigned = neg_one > const_zero;
52202 #if PY_MAJOR_VERSION < 3
52203     if (likely(PyInt_Check(x))) {
52204         if (sizeof(npy_int64) < sizeof(long)) {
52205             __PYX_VERIFY_RETURN_INT(npy_int64, long, PyInt_AS_LONG(x))
52206         } else {
52207             long val = PyInt_AS_LONG(x);
52208             if (is_unsigned && unlikely(val < 0)) {
52209                 goto raise_neg_overflow;
52210             }
52211             return (npy_int64) val;
52212         }
52213     } else
52214 #endif
52215     if (likely(PyLong_Check(x))) {
52216         if (is_unsigned) {
52217 #if CYTHON_USE_PYLONG_INTERNALS
52218             const digit* digits = ((PyLongObject*)x)->ob_digit;
52219             switch (Py_SIZE(x)) {
52220                 case  0: return (npy_int64) 0;
52221                 case  1: __PYX_VERIFY_RETURN_INT(npy_int64, digit, digits[0])
52222                 case 2:
52223                     if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
52224                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52225                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52226                         } else if (8 * sizeof(npy_int64) >= 2 * PyLong_SHIFT) {
52227                             return (npy_int64) (((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
52228                         }
52229                     }
52230                     break;
52231                 case 3:
52232                     if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
52233                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52234                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52235                         } else if (8 * sizeof(npy_int64) >= 3 * PyLong_SHIFT) {
52236                             return (npy_int64) (((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
52237                         }
52238                     }
52239                     break;
52240                 case 4:
52241                     if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
52242                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52243                             __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])))
52244                         } else if (8 * sizeof(npy_int64) >= 4 * PyLong_SHIFT) {
52245                             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]));
52246                         }
52247                     }
52248                     break;
52249             }
52250 #endif
52251 #if CYTHON_COMPILING_IN_CPYTHON
52252             if (unlikely(Py_SIZE(x) < 0)) {
52253                 goto raise_neg_overflow;
52254             }
52255 #else
52256             {
52257                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
52258                 if (unlikely(result < 0))
52259                     return (npy_int64) -1;
52260                 if (unlikely(result == 1))
52261                     goto raise_neg_overflow;
52262             }
52263 #endif
52264             if (sizeof(npy_int64) <= sizeof(unsigned long)) {
52265                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned long, PyLong_AsUnsignedLong(x))
52266 #ifdef HAVE_LONG_LONG
52267             } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
52268                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
52269 #endif
52270             }
52271         } else {
52272 #if CYTHON_USE_PYLONG_INTERNALS
52273             const digit* digits = ((PyLongObject*)x)->ob_digit;
52274             switch (Py_SIZE(x)) {
52275                 case  0: return (npy_int64) 0;
52276                 case -1: __PYX_VERIFY_RETURN_INT(npy_int64, sdigit, (sdigit) (-(sdigit)digits[0]))
52277                 case  1: __PYX_VERIFY_RETURN_INT(npy_int64,  digit, +digits[0])
52278                 case -2:
52279                     if (8 * sizeof(npy_int64) - 1 > 1 * PyLong_SHIFT) {
52280                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52281                             __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52282                         } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
52283                             return (npy_int64) (((npy_int64)-1)*(((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
52284                         }
52285                     }
52286                     break;
52287                 case 2:
52288                     if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
52289                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52290                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52291                         } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
52292                             return (npy_int64) ((((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
52293                         }
52294                     }
52295                     break;
52296                 case -3:
52297                     if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
52298                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52299                             __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52300                         } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
52301                             return (npy_int64) (((npy_int64)-1)*(((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
52302                         }
52303                     }
52304                     break;
52305                 case 3:
52306                     if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
52307                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52308                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52309                         } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
52310                             return (npy_int64) ((((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
52311                         }
52312                     }
52313                     break;
52314                 case -4:
52315                     if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
52316                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52317                             __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])))
52318                         } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
52319                             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])));
52320                         }
52321                     }
52322                     break;
52323                 case 4:
52324                     if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
52325                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52326                             __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])))
52327                         } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
52328                             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])));
52329                         }
52330                     }
52331                     break;
52332             }
52333 #endif
52334             if (sizeof(npy_int64) <= sizeof(long)) {
52335                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, long, PyLong_AsLong(x))
52336 #ifdef HAVE_LONG_LONG
52337             } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
52338                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, PY_LONG_LONG, PyLong_AsLongLong(x))
52339 #endif
52340             }
52341         }
52342         {
52343 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
52344             PyErr_SetString(PyExc_RuntimeError,
52345                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
52346 #else
52347             npy_int64 val;
52348             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
52349  #if PY_MAJOR_VERSION < 3
52350             if (likely(v) && !PyLong_Check(v)) {
52351                 PyObject *tmp = v;
52352                 v = PyNumber_Long(tmp);
52353                 Py_DECREF(tmp);
52354             }
52355  #endif
52356             if (likely(v)) {
52357                 int one = 1; int is_little = (int)*(unsigned char *)&one;
52358                 unsigned char *bytes = (unsigned char *)&val;
52359                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
52360                                               bytes, sizeof(val),
52361                                               is_little, !is_unsigned);
52362                 Py_DECREF(v);
52363                 if (likely(!ret))
52364                     return val;
52365             }
52366 #endif
52367             return (npy_int64) -1;
52368         }
52369     } else {
52370         npy_int64 val;
52371         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
52372         if (!tmp) return (npy_int64) -1;
52373         val = __Pyx_PyInt_As_npy_int64(tmp);
52374         Py_DECREF(tmp);
52375         return val;
52376     }
52377 raise_overflow:
52378     PyErr_SetString(PyExc_OverflowError,
52379         "value too large to convert to npy_int64");
52380     return (npy_int64) -1;
52381 raise_neg_overflow:
52382     PyErr_SetString(PyExc_OverflowError,
52383         "can't convert negative value to npy_int64");
52384     return (npy_int64) -1;
52385 }
52386 
52387 /* CIntFromPy */
__Pyx_PyInt_As_size_t(PyObject * x)52388   static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
52389     const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0;
52390     const int is_unsigned = neg_one > const_zero;
52391 #if PY_MAJOR_VERSION < 3
52392     if (likely(PyInt_Check(x))) {
52393         if (sizeof(size_t) < sizeof(long)) {
52394             __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
52395         } else {
52396             long val = PyInt_AS_LONG(x);
52397             if (is_unsigned && unlikely(val < 0)) {
52398                 goto raise_neg_overflow;
52399             }
52400             return (size_t) val;
52401         }
52402     } else
52403 #endif
52404     if (likely(PyLong_Check(x))) {
52405         if (is_unsigned) {
52406 #if CYTHON_USE_PYLONG_INTERNALS
52407             const digit* digits = ((PyLongObject*)x)->ob_digit;
52408             switch (Py_SIZE(x)) {
52409                 case  0: return (size_t) 0;
52410                 case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
52411                 case 2:
52412                     if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
52413                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52414                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52415                         } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
52416                             return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
52417                         }
52418                     }
52419                     break;
52420                 case 3:
52421                     if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
52422                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52423                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52424                         } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
52425                             return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
52426                         }
52427                     }
52428                     break;
52429                 case 4:
52430                     if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
52431                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52432                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52433                         } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
52434                             return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
52435                         }
52436                     }
52437                     break;
52438             }
52439 #endif
52440 #if CYTHON_COMPILING_IN_CPYTHON
52441             if (unlikely(Py_SIZE(x) < 0)) {
52442                 goto raise_neg_overflow;
52443             }
52444 #else
52445             {
52446                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
52447                 if (unlikely(result < 0))
52448                     return (size_t) -1;
52449                 if (unlikely(result == 1))
52450                     goto raise_neg_overflow;
52451             }
52452 #endif
52453             if (sizeof(size_t) <= sizeof(unsigned long)) {
52454                 __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
52455 #ifdef HAVE_LONG_LONG
52456             } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
52457                 __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
52458 #endif
52459             }
52460         } else {
52461 #if CYTHON_USE_PYLONG_INTERNALS
52462             const digit* digits = ((PyLongObject*)x)->ob_digit;
52463             switch (Py_SIZE(x)) {
52464                 case  0: return (size_t) 0;
52465                 case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
52466                 case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
52467                 case -2:
52468                     if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
52469                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52470                             __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52471                         } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
52472                             return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
52473                         }
52474                     }
52475                     break;
52476                 case 2:
52477                     if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
52478                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52479                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52480                         } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
52481                             return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
52482                         }
52483                     }
52484                     break;
52485                 case -3:
52486                     if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
52487                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52488                             __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52489                         } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
52490                             return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
52491                         }
52492                     }
52493                     break;
52494                 case 3:
52495                     if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
52496                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52497                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52498                         } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
52499                             return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
52500                         }
52501                     }
52502                     break;
52503                 case -4:
52504                     if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
52505                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52506                             __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52507                         } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
52508                             return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
52509                         }
52510                     }
52511                     break;
52512                 case 4:
52513                     if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
52514                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52515                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52516                         } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
52517                             return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
52518                         }
52519                     }
52520                     break;
52521             }
52522 #endif
52523             if (sizeof(size_t) <= sizeof(long)) {
52524                 __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
52525 #ifdef HAVE_LONG_LONG
52526             } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
52527                 __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
52528 #endif
52529             }
52530         }
52531         {
52532 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
52533             PyErr_SetString(PyExc_RuntimeError,
52534                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
52535 #else
52536             size_t val;
52537             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
52538  #if PY_MAJOR_VERSION < 3
52539             if (likely(v) && !PyLong_Check(v)) {
52540                 PyObject *tmp = v;
52541                 v = PyNumber_Long(tmp);
52542                 Py_DECREF(tmp);
52543             }
52544  #endif
52545             if (likely(v)) {
52546                 int one = 1; int is_little = (int)*(unsigned char *)&one;
52547                 unsigned char *bytes = (unsigned char *)&val;
52548                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
52549                                               bytes, sizeof(val),
52550                                               is_little, !is_unsigned);
52551                 Py_DECREF(v);
52552                 if (likely(!ret))
52553                     return val;
52554             }
52555 #endif
52556             return (size_t) -1;
52557         }
52558     } else {
52559         size_t val;
52560         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
52561         if (!tmp) return (size_t) -1;
52562         val = __Pyx_PyInt_As_size_t(tmp);
52563         Py_DECREF(tmp);
52564         return val;
52565     }
52566 raise_overflow:
52567     PyErr_SetString(PyExc_OverflowError,
52568         "value too large to convert to size_t");
52569     return (size_t) -1;
52570 raise_neg_overflow:
52571     PyErr_SetString(PyExc_OverflowError,
52572         "can't convert negative value to size_t");
52573     return (size_t) -1;
52574 }
52575 
52576 /* PrintOne */
52577   #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
__Pyx_PrintOne(PyObject * f,PyObject * o)52578 static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
52579     if (!f) {
52580         if (!(f = __Pyx_GetStdout()))
52581             return -1;
52582     }
52583     Py_INCREF(f);
52584     if (PyFile_SoftSpace(f, 0)) {
52585         if (PyFile_WriteString(" ", f) < 0)
52586             goto error;
52587     }
52588     if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
52589         goto error;
52590     if (PyFile_WriteString("\n", f) < 0)
52591         goto error;
52592     Py_DECREF(f);
52593     return 0;
52594 error:
52595     Py_DECREF(f);
52596     return -1;
52597     /* the line below is just to avoid C compiler
52598      * warnings about unused functions */
52599     return __Pyx_Print(f, NULL, 0);
52600 }
52601 #else
__Pyx_PrintOne(PyObject * stream,PyObject * o)52602 static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
52603     int res;
52604     PyObject* arg_tuple = PyTuple_Pack(1, o);
52605     if (unlikely(!arg_tuple))
52606         return -1;
52607     res = __Pyx_Print(stream, arg_tuple, 1);
52608     Py_DECREF(arg_tuple);
52609     return res;
52610 }
52611 #endif
52612 
52613 /* CIntFromPy */
__Pyx_PyInt_As_char(PyObject * x)52614   static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
52615     const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
52616     const int is_unsigned = neg_one > const_zero;
52617 #if PY_MAJOR_VERSION < 3
52618     if (likely(PyInt_Check(x))) {
52619         if (sizeof(char) < sizeof(long)) {
52620             __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
52621         } else {
52622             long val = PyInt_AS_LONG(x);
52623             if (is_unsigned && unlikely(val < 0)) {
52624                 goto raise_neg_overflow;
52625             }
52626             return (char) val;
52627         }
52628     } else
52629 #endif
52630     if (likely(PyLong_Check(x))) {
52631         if (is_unsigned) {
52632 #if CYTHON_USE_PYLONG_INTERNALS
52633             const digit* digits = ((PyLongObject*)x)->ob_digit;
52634             switch (Py_SIZE(x)) {
52635                 case  0: return (char) 0;
52636                 case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
52637                 case 2:
52638                     if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
52639                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52640                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52641                         } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
52642                             return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
52643                         }
52644                     }
52645                     break;
52646                 case 3:
52647                     if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
52648                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52649                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52650                         } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
52651                             return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
52652                         }
52653                     }
52654                     break;
52655                 case 4:
52656                     if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
52657                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52658                             __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])))
52659                         } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
52660                             return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
52661                         }
52662                     }
52663                     break;
52664             }
52665 #endif
52666 #if CYTHON_COMPILING_IN_CPYTHON
52667             if (unlikely(Py_SIZE(x) < 0)) {
52668                 goto raise_neg_overflow;
52669             }
52670 #else
52671             {
52672                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
52673                 if (unlikely(result < 0))
52674                     return (char) -1;
52675                 if (unlikely(result == 1))
52676                     goto raise_neg_overflow;
52677             }
52678 #endif
52679             if (sizeof(char) <= sizeof(unsigned long)) {
52680                 __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
52681 #ifdef HAVE_LONG_LONG
52682             } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
52683                 __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
52684 #endif
52685             }
52686         } else {
52687 #if CYTHON_USE_PYLONG_INTERNALS
52688             const digit* digits = ((PyLongObject*)x)->ob_digit;
52689             switch (Py_SIZE(x)) {
52690                 case  0: return (char) 0;
52691                 case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
52692                 case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
52693                 case -2:
52694                     if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
52695                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52696                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52697                         } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
52698                             return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
52699                         }
52700                     }
52701                     break;
52702                 case 2:
52703                     if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
52704                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
52705                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52706                         } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
52707                             return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
52708                         }
52709                     }
52710                     break;
52711                 case -3:
52712                     if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
52713                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52714                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52715                         } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
52716                             return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
52717                         }
52718                     }
52719                     break;
52720                 case 3:
52721                     if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
52722                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
52723                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
52724                         } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
52725                             return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
52726                         }
52727                     }
52728                     break;
52729                 case -4:
52730                     if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
52731                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52732                             __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])))
52733                         } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
52734                             return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
52735                         }
52736                     }
52737                     break;
52738                 case 4:
52739                     if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
52740                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
52741                             __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])))
52742                         } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
52743                             return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
52744                         }
52745                     }
52746                     break;
52747             }
52748 #endif
52749             if (sizeof(char) <= sizeof(long)) {
52750                 __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
52751 #ifdef HAVE_LONG_LONG
52752             } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
52753                 __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
52754 #endif
52755             }
52756         }
52757         {
52758 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
52759             PyErr_SetString(PyExc_RuntimeError,
52760                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
52761 #else
52762             char val;
52763             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
52764  #if PY_MAJOR_VERSION < 3
52765             if (likely(v) && !PyLong_Check(v)) {
52766                 PyObject *tmp = v;
52767                 v = PyNumber_Long(tmp);
52768                 Py_DECREF(tmp);
52769             }
52770  #endif
52771             if (likely(v)) {
52772                 int one = 1; int is_little = (int)*(unsigned char *)&one;
52773                 unsigned char *bytes = (unsigned char *)&val;
52774                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
52775                                               bytes, sizeof(val),
52776                                               is_little, !is_unsigned);
52777                 Py_DECREF(v);
52778                 if (likely(!ret))
52779                     return val;
52780             }
52781 #endif
52782             return (char) -1;
52783         }
52784     } else {
52785         char val;
52786         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
52787         if (!tmp) return (char) -1;
52788         val = __Pyx_PyInt_As_char(tmp);
52789         Py_DECREF(tmp);
52790         return val;
52791     }
52792 raise_overflow:
52793     PyErr_SetString(PyExc_OverflowError,
52794         "value too large to convert to char");
52795     return (char) -1;
52796 raise_neg_overflow:
52797     PyErr_SetString(PyExc_OverflowError,
52798         "can't convert negative value to char");
52799     return (char) -1;
52800 }
52801 
52802 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint8_t(PyObject * obj,int writable_flag)52803   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint8_t(PyObject *obj, int writable_flag) {
52804     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
52805     __Pyx_BufFmt_StackElem stack[1];
52806     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
52807     int retcode;
52808     if (obj == Py_None) {
52809         result.memview = (struct __pyx_memoryview_obj *) Py_None;
52810         return result;
52811     }
52812     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
52813                                                  PyBUF_RECORDS_RO | writable_flag, 1,
52814                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, stack,
52815                                                  &result, obj);
52816     if (unlikely(retcode == -1))
52817         goto __pyx_fail;
52818     return result;
52819 __pyx_fail:
52820     result.memview = NULL;
52821     result.data = NULL;
52822     return result;
52823 }
52824 
52825 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint32_t(PyObject * obj,int writable_flag)52826   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint32_t(PyObject *obj, int writable_flag) {
52827     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
52828     __Pyx_BufFmt_StackElem stack[1];
52829     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
52830     int retcode;
52831     if (obj == Py_None) {
52832         result.memview = (struct __pyx_memoryview_obj *) Py_None;
52833         return result;
52834     }
52835     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
52836                                                  PyBUF_RECORDS_RO | writable_flag, 2,
52837                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, stack,
52838                                                  &result, obj);
52839     if (unlikely(retcode == -1))
52840         goto __pyx_fail;
52841     return result;
52842 __pyx_fail:
52843     result.memview = NULL;
52844     result.data = NULL;
52845     return result;
52846 }
52847 
52848 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint64_t(PyObject * obj,int writable_flag)52849   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint64_t(PyObject *obj, int writable_flag) {
52850     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
52851     __Pyx_BufFmt_StackElem stack[1];
52852     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
52853     int retcode;
52854     if (obj == Py_None) {
52855         result.memview = (struct __pyx_memoryview_obj *) Py_None;
52856         return result;
52857     }
52858     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
52859                                                  PyBUF_RECORDS_RO | writable_flag, 2,
52860                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint64_t, stack,
52861                                                  &result, obj);
52862     if (unlikely(retcode == -1))
52863         goto __pyx_fail;
52864     return result;
52865 __pyx_fail:
52866     result.memview = NULL;
52867     result.data = NULL;
52868     return result;
52869 }
52870 
52871 /* CheckBinaryVersion */
__Pyx_check_binary_version(void)52872   static int __Pyx_check_binary_version(void) {
52873     char ctversion[4], rtversion[4];
52874     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
52875     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
52876     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
52877         char message[200];
52878         PyOS_snprintf(message, sizeof(message),
52879                       "compiletime version %s of module '%.100s' "
52880                       "does not match runtime version %s",
52881                       ctversion, __Pyx_MODULE_NAME, rtversion);
52882         return PyErr_WarnEx(NULL, message, 1);
52883     }
52884     return 0;
52885 }
52886 
52887 /* FunctionImport */
52888   #ifndef __PYX_HAVE_RT_ImportFunction
52889 #define __PYX_HAVE_RT_ImportFunction
__Pyx_ImportFunction(PyObject * module,const char * funcname,void (** f)(void),const char * sig)52890 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
52891     PyObject *d = 0;
52892     PyObject *cobj = 0;
52893     union {
52894         void (*fp)(void);
52895         void *p;
52896     } tmp;
52897     d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
52898     if (!d)
52899         goto bad;
52900     cobj = PyDict_GetItemString(d, funcname);
52901     if (!cobj) {
52902         PyErr_Format(PyExc_ImportError,
52903             "%.200s does not export expected C function %.200s",
52904                 PyModule_GetName(module), funcname);
52905         goto bad;
52906     }
52907 #if PY_VERSION_HEX >= 0x02070000
52908     if (!PyCapsule_IsValid(cobj, sig)) {
52909         PyErr_Format(PyExc_TypeError,
52910             "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
52911              PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
52912         goto bad;
52913     }
52914     tmp.p = PyCapsule_GetPointer(cobj, sig);
52915 #else
52916     {const char *desc, *s1, *s2;
52917     desc = (const char *)PyCObject_GetDesc(cobj);
52918     if (!desc)
52919         goto bad;
52920     s1 = desc; s2 = sig;
52921     while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
52922     if (*s1 != *s2) {
52923         PyErr_Format(PyExc_TypeError,
52924             "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
52925              PyModule_GetName(module), funcname, sig, desc);
52926         goto bad;
52927     }
52928     tmp.p = PyCObject_AsVoidPtr(cobj);}
52929 #endif
52930     *f = tmp.fp;
52931     if (!(*f))
52932         goto bad;
52933     Py_DECREF(d);
52934     return 0;
52935 bad:
52936     Py_XDECREF(d);
52937     return -1;
52938 }
52939 #endif
52940 
52941 /* InitStrings */
__Pyx_InitStrings(__Pyx_StringTabEntry * t)52942   static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
52943     while (t->p) {
52944         #if PY_MAJOR_VERSION < 3
52945         if (t->is_unicode) {
52946             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
52947         } else if (t->intern) {
52948             *t->p = PyString_InternFromString(t->s);
52949         } else {
52950             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
52951         }
52952         #else
52953         if (t->is_unicode | t->is_str) {
52954             if (t->intern) {
52955                 *t->p = PyUnicode_InternFromString(t->s);
52956             } else if (t->encoding) {
52957                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
52958             } else {
52959                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
52960             }
52961         } else {
52962             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
52963         }
52964         #endif
52965         if (!*t->p)
52966             return -1;
52967         if (PyObject_Hash(*t->p) == -1)
52968             return -1;
52969         ++t;
52970     }
52971     return 0;
52972 }
52973 
__Pyx_PyUnicode_FromString(const char * c_str)52974 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
52975     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
52976 }
__Pyx_PyObject_AsString(PyObject * o)52977 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
52978     Py_ssize_t ignore;
52979     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
52980 }
52981 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
52982 #if !CYTHON_PEP393_ENABLED
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)52983 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
52984     char* defenc_c;
52985     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
52986     if (!defenc) return NULL;
52987     defenc_c = PyBytes_AS_STRING(defenc);
52988 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
52989     {
52990         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
52991         char* c;
52992         for (c = defenc_c; c < end; c++) {
52993             if ((unsigned char) (*c) >= 128) {
52994                 PyUnicode_AsASCIIString(o);
52995                 return NULL;
52996             }
52997         }
52998     }
52999 #endif
53000     *length = PyBytes_GET_SIZE(defenc);
53001     return defenc_c;
53002 }
53003 #else
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)53004 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
53005     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
53006 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
53007     if (likely(PyUnicode_IS_ASCII(o))) {
53008         *length = PyUnicode_GET_LENGTH(o);
53009         return PyUnicode_AsUTF8(o);
53010     } else {
53011         PyUnicode_AsASCIIString(o);
53012         return NULL;
53013     }
53014 #else
53015     return PyUnicode_AsUTF8AndSize(o, length);
53016 #endif
53017 }
53018 #endif
53019 #endif
__Pyx_PyObject_AsStringAndSize(PyObject * o,Py_ssize_t * length)53020 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
53021 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
53022     if (
53023 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
53024             __Pyx_sys_getdefaultencoding_not_ascii &&
53025 #endif
53026             PyUnicode_Check(o)) {
53027         return __Pyx_PyUnicode_AsStringAndSize(o, length);
53028     } else
53029 #endif
53030 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
53031     if (PyByteArray_Check(o)) {
53032         *length = PyByteArray_GET_SIZE(o);
53033         return PyByteArray_AS_STRING(o);
53034     } else
53035 #endif
53036     {
53037         char* result;
53038         int r = PyBytes_AsStringAndSize(o, &result, length);
53039         if (unlikely(r < 0)) {
53040             return NULL;
53041         } else {
53042             return result;
53043         }
53044     }
53045 }
__Pyx_PyObject_IsTrue(PyObject * x)53046 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
53047    int is_true = x == Py_True;
53048    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
53049    else return PyObject_IsTrue(x);
53050 }
__Pyx_PyObject_IsTrueAndDecref(PyObject * x)53051 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
53052     int retval;
53053     if (unlikely(!x)) return -1;
53054     retval = __Pyx_PyObject_IsTrue(x);
53055     Py_DECREF(x);
53056     return retval;
53057 }
__Pyx_PyNumber_IntOrLongWrongResultType(PyObject * result,const char * type_name)53058 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
53059 #if PY_MAJOR_VERSION >= 3
53060     if (PyLong_Check(result)) {
53061         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
53062                 "__int__ returned non-int (type %.200s).  "
53063                 "The ability to return an instance of a strict subclass of int "
53064                 "is deprecated, and may be removed in a future version of Python.",
53065                 Py_TYPE(result)->tp_name)) {
53066             Py_DECREF(result);
53067             return NULL;
53068         }
53069         return result;
53070     }
53071 #endif
53072     PyErr_Format(PyExc_TypeError,
53073                  "__%.4s__ returned non-%.4s (type %.200s)",
53074                  type_name, type_name, Py_TYPE(result)->tp_name);
53075     Py_DECREF(result);
53076     return NULL;
53077 }
__Pyx_PyNumber_IntOrLong(PyObject * x)53078 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
53079 #if CYTHON_USE_TYPE_SLOTS
53080   PyNumberMethods *m;
53081 #endif
53082   const char *name = NULL;
53083   PyObject *res = NULL;
53084 #if PY_MAJOR_VERSION < 3
53085   if (likely(PyInt_Check(x) || PyLong_Check(x)))
53086 #else
53087   if (likely(PyLong_Check(x)))
53088 #endif
53089     return __Pyx_NewRef(x);
53090 #if CYTHON_USE_TYPE_SLOTS
53091   m = Py_TYPE(x)->tp_as_number;
53092   #if PY_MAJOR_VERSION < 3
53093   if (m && m->nb_int) {
53094     name = "int";
53095     res = m->nb_int(x);
53096   }
53097   else if (m && m->nb_long) {
53098     name = "long";
53099     res = m->nb_long(x);
53100   }
53101   #else
53102   if (likely(m && m->nb_int)) {
53103     name = "int";
53104     res = m->nb_int(x);
53105   }
53106   #endif
53107 #else
53108   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
53109     res = PyNumber_Int(x);
53110   }
53111 #endif
53112   if (likely(res)) {
53113 #if PY_MAJOR_VERSION < 3
53114     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
53115 #else
53116     if (unlikely(!PyLong_CheckExact(res))) {
53117 #endif
53118         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
53119     }
53120   }
53121   else if (!PyErr_Occurred()) {
53122     PyErr_SetString(PyExc_TypeError,
53123                     "an integer is required");
53124   }
53125   return res;
53126 }
53127 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
53128   Py_ssize_t ival;
53129   PyObject *x;
53130 #if PY_MAJOR_VERSION < 3
53131   if (likely(PyInt_CheckExact(b))) {
53132     if (sizeof(Py_ssize_t) >= sizeof(long))
53133         return PyInt_AS_LONG(b);
53134     else
53135         return PyInt_AsSsize_t(b);
53136   }
53137 #endif
53138   if (likely(PyLong_CheckExact(b))) {
53139     #if CYTHON_USE_PYLONG_INTERNALS
53140     const digit* digits = ((PyLongObject*)b)->ob_digit;
53141     const Py_ssize_t size = Py_SIZE(b);
53142     if (likely(__Pyx_sst_abs(size) <= 1)) {
53143         ival = likely(size) ? digits[0] : 0;
53144         if (size == -1) ival = -ival;
53145         return ival;
53146     } else {
53147       switch (size) {
53148          case 2:
53149            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
53150              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
53151            }
53152            break;
53153          case -2:
53154            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
53155              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
53156            }
53157            break;
53158          case 3:
53159            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
53160              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
53161            }
53162            break;
53163          case -3:
53164            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
53165              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
53166            }
53167            break;
53168          case 4:
53169            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
53170              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]));
53171            }
53172            break;
53173          case -4:
53174            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
53175              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]));
53176            }
53177            break;
53178       }
53179     }
53180     #endif
53181     return PyLong_AsSsize_t(b);
53182   }
53183   x = PyNumber_Index(b);
53184   if (!x) return -1;
53185   ival = PyInt_AsSsize_t(x);
53186   Py_DECREF(x);
53187   return ival;
53188 }
53189 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
53190   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
53191 }
53192 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
53193     return PyInt_FromSize_t(ival);
53194 }
53195 
53196 
53197 #endif /* Py_PYTHON_H */
53198