1 /* Generated by Cython 0.29.13 */
2 
3 /* BEGIN: Cython Metadata
4 {
5     "distutils": {
6         "depends": [],
7         "name": "tables.indexesextension",
8         "sources": [
9             "tables/indexesextension.pyx"
10         ]
11     },
12     "module_name": "tables.indexesextension"
13 }
14 END: Cython Metadata */
15 
16 #define PY_SSIZE_T_CLEAN
17 #include "Python.h"
18 #ifndef Py_PYTHON_H
19     #error Python headers needed to compile C extensions, please install development version of Python.
20 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
21     #error Cython requires Python 2.6+ or Python 3.3+.
22 #else
23 #define CYTHON_ABI "0_29_13"
24 #define CYTHON_HEX_VERSION 0x001D0DF0
25 #define CYTHON_FUTURE_DIVISION 0
26 #include <stddef.h>
27 #ifndef offsetof
28   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
29 #endif
30 #if !defined(WIN32) && !defined(MS_WINDOWS)
31   #ifndef __stdcall
32     #define __stdcall
33   #endif
34   #ifndef __cdecl
35     #define __cdecl
36   #endif
37   #ifndef __fastcall
38     #define __fastcall
39   #endif
40 #endif
41 #ifndef DL_IMPORT
42   #define DL_IMPORT(t) t
43 #endif
44 #ifndef DL_EXPORT
45   #define DL_EXPORT(t) t
46 #endif
47 #define __PYX_COMMA ,
48 #ifndef HAVE_LONG_LONG
49   #if PY_VERSION_HEX >= 0x02070000
50     #define HAVE_LONG_LONG
51   #endif
52 #endif
53 #ifndef PY_LONG_LONG
54   #define PY_LONG_LONG LONG_LONG
55 #endif
56 #ifndef Py_HUGE_VAL
57   #define Py_HUGE_VAL HUGE_VAL
58 #endif
59 #ifdef PYPY_VERSION
60   #define CYTHON_COMPILING_IN_PYPY 1
61   #define CYTHON_COMPILING_IN_PYSTON 0
62   #define CYTHON_COMPILING_IN_CPYTHON 0
63   #undef CYTHON_USE_TYPE_SLOTS
64   #define CYTHON_USE_TYPE_SLOTS 0
65   #undef CYTHON_USE_PYTYPE_LOOKUP
66   #define CYTHON_USE_PYTYPE_LOOKUP 0
67   #if PY_VERSION_HEX < 0x03050000
68     #undef CYTHON_USE_ASYNC_SLOTS
69     #define CYTHON_USE_ASYNC_SLOTS 0
70   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
71     #define CYTHON_USE_ASYNC_SLOTS 1
72   #endif
73   #undef CYTHON_USE_PYLIST_INTERNALS
74   #define CYTHON_USE_PYLIST_INTERNALS 0
75   #undef CYTHON_USE_UNICODE_INTERNALS
76   #define CYTHON_USE_UNICODE_INTERNALS 0
77   #undef CYTHON_USE_UNICODE_WRITER
78   #define CYTHON_USE_UNICODE_WRITER 0
79   #undef CYTHON_USE_PYLONG_INTERNALS
80   #define CYTHON_USE_PYLONG_INTERNALS 0
81   #undef CYTHON_AVOID_BORROWED_REFS
82   #define CYTHON_AVOID_BORROWED_REFS 1
83   #undef CYTHON_ASSUME_SAFE_MACROS
84   #define CYTHON_ASSUME_SAFE_MACROS 0
85   #undef CYTHON_UNPACK_METHODS
86   #define CYTHON_UNPACK_METHODS 0
87   #undef CYTHON_FAST_THREAD_STATE
88   #define CYTHON_FAST_THREAD_STATE 0
89   #undef CYTHON_FAST_PYCALL
90   #define CYTHON_FAST_PYCALL 0
91   #undef CYTHON_PEP489_MULTI_PHASE_INIT
92   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
93   #undef CYTHON_USE_TP_FINALIZE
94   #define CYTHON_USE_TP_FINALIZE 0
95   #undef CYTHON_USE_DICT_VERSIONS
96   #define CYTHON_USE_DICT_VERSIONS 0
97   #undef CYTHON_USE_EXC_INFO_STACK
98   #define CYTHON_USE_EXC_INFO_STACK 0
99 #elif defined(PYSTON_VERSION)
100   #define CYTHON_COMPILING_IN_PYPY 0
101   #define CYTHON_COMPILING_IN_PYSTON 1
102   #define CYTHON_COMPILING_IN_CPYTHON 0
103   #ifndef CYTHON_USE_TYPE_SLOTS
104     #define CYTHON_USE_TYPE_SLOTS 1
105   #endif
106   #undef CYTHON_USE_PYTYPE_LOOKUP
107   #define CYTHON_USE_PYTYPE_LOOKUP 0
108   #undef CYTHON_USE_ASYNC_SLOTS
109   #define CYTHON_USE_ASYNC_SLOTS 0
110   #undef CYTHON_USE_PYLIST_INTERNALS
111   #define CYTHON_USE_PYLIST_INTERNALS 0
112   #ifndef CYTHON_USE_UNICODE_INTERNALS
113     #define CYTHON_USE_UNICODE_INTERNALS 1
114   #endif
115   #undef CYTHON_USE_UNICODE_WRITER
116   #define CYTHON_USE_UNICODE_WRITER 0
117   #undef CYTHON_USE_PYLONG_INTERNALS
118   #define CYTHON_USE_PYLONG_INTERNALS 0
119   #ifndef CYTHON_AVOID_BORROWED_REFS
120     #define CYTHON_AVOID_BORROWED_REFS 0
121   #endif
122   #ifndef CYTHON_ASSUME_SAFE_MACROS
123     #define CYTHON_ASSUME_SAFE_MACROS 1
124   #endif
125   #ifndef CYTHON_UNPACK_METHODS
126     #define CYTHON_UNPACK_METHODS 1
127   #endif
128   #undef CYTHON_FAST_THREAD_STATE
129   #define CYTHON_FAST_THREAD_STATE 0
130   #undef CYTHON_FAST_PYCALL
131   #define CYTHON_FAST_PYCALL 0
132   #undef CYTHON_PEP489_MULTI_PHASE_INIT
133   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
134   #undef CYTHON_USE_TP_FINALIZE
135   #define CYTHON_USE_TP_FINALIZE 0
136   #undef CYTHON_USE_DICT_VERSIONS
137   #define CYTHON_USE_DICT_VERSIONS 0
138   #undef CYTHON_USE_EXC_INFO_STACK
139   #define CYTHON_USE_EXC_INFO_STACK 0
140 #else
141   #define CYTHON_COMPILING_IN_PYPY 0
142   #define CYTHON_COMPILING_IN_PYSTON 0
143   #define CYTHON_COMPILING_IN_CPYTHON 1
144   #ifndef CYTHON_USE_TYPE_SLOTS
145     #define CYTHON_USE_TYPE_SLOTS 1
146   #endif
147   #if PY_VERSION_HEX < 0x02070000
148     #undef CYTHON_USE_PYTYPE_LOOKUP
149     #define CYTHON_USE_PYTYPE_LOOKUP 0
150   #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
151     #define CYTHON_USE_PYTYPE_LOOKUP 1
152   #endif
153   #if PY_MAJOR_VERSION < 3
154     #undef CYTHON_USE_ASYNC_SLOTS
155     #define CYTHON_USE_ASYNC_SLOTS 0
156   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
157     #define CYTHON_USE_ASYNC_SLOTS 1
158   #endif
159   #if PY_VERSION_HEX < 0x02070000
160     #undef CYTHON_USE_PYLONG_INTERNALS
161     #define CYTHON_USE_PYLONG_INTERNALS 0
162   #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
163     #define CYTHON_USE_PYLONG_INTERNALS 1
164   #endif
165   #ifndef CYTHON_USE_PYLIST_INTERNALS
166     #define CYTHON_USE_PYLIST_INTERNALS 1
167   #endif
168   #ifndef CYTHON_USE_UNICODE_INTERNALS
169     #define CYTHON_USE_UNICODE_INTERNALS 1
170   #endif
171   #if PY_VERSION_HEX < 0x030300F0
172     #undef CYTHON_USE_UNICODE_WRITER
173     #define CYTHON_USE_UNICODE_WRITER 0
174   #elif !defined(CYTHON_USE_UNICODE_WRITER)
175     #define CYTHON_USE_UNICODE_WRITER 1
176   #endif
177   #ifndef CYTHON_AVOID_BORROWED_REFS
178     #define CYTHON_AVOID_BORROWED_REFS 0
179   #endif
180   #ifndef CYTHON_ASSUME_SAFE_MACROS
181     #define CYTHON_ASSUME_SAFE_MACROS 1
182   #endif
183   #ifndef CYTHON_UNPACK_METHODS
184     #define CYTHON_UNPACK_METHODS 1
185   #endif
186   #ifndef CYTHON_FAST_THREAD_STATE
187     #define CYTHON_FAST_THREAD_STATE 1
188   #endif
189   #ifndef CYTHON_FAST_PYCALL
190     #define CYTHON_FAST_PYCALL 1
191   #endif
192   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
193     #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
194   #endif
195   #ifndef CYTHON_USE_TP_FINALIZE
196     #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
197   #endif
198   #ifndef CYTHON_USE_DICT_VERSIONS
199     #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
200   #endif
201   #ifndef CYTHON_USE_EXC_INFO_STACK
202     #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
203   #endif
204 #endif
205 #if !defined(CYTHON_FAST_PYCCALL)
206 #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
207 #endif
208 #if CYTHON_USE_PYLONG_INTERNALS
209   #include "longintrepr.h"
210   #undef SHIFT
211   #undef BASE
212   #undef MASK
213   #ifdef SIZEOF_VOID_P
214     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
215   #endif
216 #endif
217 #ifndef __has_attribute
218   #define __has_attribute(x) 0
219 #endif
220 #ifndef __has_cpp_attribute
221   #define __has_cpp_attribute(x) 0
222 #endif
223 #ifndef CYTHON_RESTRICT
224   #if defined(__GNUC__)
225     #define CYTHON_RESTRICT __restrict__
226   #elif defined(_MSC_VER) && _MSC_VER >= 1400
227     #define CYTHON_RESTRICT __restrict
228   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
229     #define CYTHON_RESTRICT restrict
230   #else
231     #define CYTHON_RESTRICT
232   #endif
233 #endif
234 #ifndef CYTHON_UNUSED
235 # if defined(__GNUC__)
236 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
237 #     define CYTHON_UNUSED __attribute__ ((__unused__))
238 #   else
239 #     define CYTHON_UNUSED
240 #   endif
241 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
242 #   define CYTHON_UNUSED __attribute__ ((__unused__))
243 # else
244 #   define CYTHON_UNUSED
245 # endif
246 #endif
247 #ifndef CYTHON_MAYBE_UNUSED_VAR
248 #  if defined(__cplusplus)
CYTHON_MAYBE_UNUSED_VAR(const T &)249      template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
250 #  else
251 #    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
252 #  endif
253 #endif
254 #ifndef CYTHON_NCP_UNUSED
255 # if CYTHON_COMPILING_IN_CPYTHON
256 #  define CYTHON_NCP_UNUSED
257 # else
258 #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
259 # endif
260 #endif
261 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
262 #ifdef _MSC_VER
263     #ifndef _MSC_STDINT_H_
264         #if _MSC_VER < 1300
265            typedef unsigned char     uint8_t;
266            typedef unsigned int      uint32_t;
267         #else
268            typedef unsigned __int8   uint8_t;
269            typedef unsigned __int32  uint32_t;
270         #endif
271     #endif
272 #else
273    #include <stdint.h>
274 #endif
275 #ifndef CYTHON_FALLTHROUGH
276   #if defined(__cplusplus) && __cplusplus >= 201103L
277     #if __has_cpp_attribute(fallthrough)
278       #define CYTHON_FALLTHROUGH [[fallthrough]]
279     #elif __has_cpp_attribute(clang::fallthrough)
280       #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
281     #elif __has_cpp_attribute(gnu::fallthrough)
282       #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
283     #endif
284   #endif
285   #ifndef CYTHON_FALLTHROUGH
286     #if __has_attribute(fallthrough)
287       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
288     #else
289       #define CYTHON_FALLTHROUGH
290     #endif
291   #endif
292   #if defined(__clang__ ) && defined(__apple_build_version__)
293     #if __apple_build_version__ < 7000000
294       #undef  CYTHON_FALLTHROUGH
295       #define CYTHON_FALLTHROUGH
296     #endif
297   #endif
298 #endif
299 
300 #ifndef CYTHON_INLINE
301   #if defined(__clang__)
302     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
303   #elif defined(__GNUC__)
304     #define CYTHON_INLINE __inline__
305   #elif defined(_MSC_VER)
306     #define CYTHON_INLINE __inline
307   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
308     #define CYTHON_INLINE inline
309   #else
310     #define CYTHON_INLINE
311   #endif
312 #endif
313 
314 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
315   #define Py_OptimizeFlag 0
316 #endif
317 #define __PYX_BUILD_PY_SSIZE_T "n"
318 #define CYTHON_FORMAT_SSIZE_T "z"
319 #if PY_MAJOR_VERSION < 3
320   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
321   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
322           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
323   #define __Pyx_DefaultClassType PyClass_Type
324 #else
325   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
326 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
327   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
328           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
329 #else
330   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
331           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
332 #endif
333   #define __Pyx_DefaultClassType PyType_Type
334 #endif
335 #ifndef Py_TPFLAGS_CHECKTYPES
336   #define Py_TPFLAGS_CHECKTYPES 0
337 #endif
338 #ifndef Py_TPFLAGS_HAVE_INDEX
339   #define Py_TPFLAGS_HAVE_INDEX 0
340 #endif
341 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
342   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
343 #endif
344 #ifndef Py_TPFLAGS_HAVE_FINALIZE
345   #define Py_TPFLAGS_HAVE_FINALIZE 0
346 #endif
347 #ifndef METH_STACKLESS
348   #define METH_STACKLESS 0
349 #endif
350 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
351   #ifndef METH_FASTCALL
352      #define METH_FASTCALL 0x80
353   #endif
354   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
355   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
356                                                           Py_ssize_t nargs, PyObject *kwnames);
357 #else
358   #define __Pyx_PyCFunctionFast _PyCFunctionFast
359   #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
360 #endif
361 #if CYTHON_FAST_PYCCALL
362 #define __Pyx_PyFastCFunction_Check(func)\
363     ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
364 #else
365 #define __Pyx_PyFastCFunction_Check(func) 0
366 #endif
367 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
368   #define PyObject_Malloc(s)   PyMem_Malloc(s)
369   #define PyObject_Free(p)     PyMem_Free(p)
370   #define PyObject_Realloc(p)  PyMem_Realloc(p)
371 #endif
372 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
373   #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
374   #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
375   #define PyMem_RawFree(p)             PyMem_Free(p)
376 #endif
377 #if CYTHON_COMPILING_IN_PYSTON
378   #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
379   #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
380 #else
381   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
382   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
383 #endif
384 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
385   #define __Pyx_PyThreadState_Current PyThreadState_GET()
386 #elif PY_VERSION_HEX >= 0x03060000
387   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
388 #elif PY_VERSION_HEX >= 0x03000000
389   #define __Pyx_PyThreadState_Current PyThreadState_GET()
390 #else
391   #define __Pyx_PyThreadState_Current _PyThreadState_Current
392 #endif
393 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
394 #include "pythread.h"
395 #define Py_tss_NEEDS_INIT 0
396 typedef int Py_tss_t;
PyThread_tss_create(Py_tss_t * key)397 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
398   *key = PyThread_create_key();
399   return 0;
400 }
PyThread_tss_alloc(void)401 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
402   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
403   *key = Py_tss_NEEDS_INIT;
404   return key;
405 }
PyThread_tss_free(Py_tss_t * key)406 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
407   PyObject_Free(key);
408 }
PyThread_tss_is_created(Py_tss_t * key)409 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
410   return *key != Py_tss_NEEDS_INIT;
411 }
PyThread_tss_delete(Py_tss_t * key)412 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
413   PyThread_delete_key(*key);
414   *key = Py_tss_NEEDS_INIT;
415 }
PyThread_tss_set(Py_tss_t * key,void * value)416 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
417   return PyThread_set_key_value(*key, value);
418 }
PyThread_tss_get(Py_tss_t * key)419 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
420   return PyThread_get_key_value(*key);
421 }
422 #endif
423 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
424 #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
425 #else
426 #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
427 #endif
428 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
429   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
430   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
431 #else
432   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
433   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
434 #endif
435 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
436 #define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
437 #else
438 #define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
439 #endif
440 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
441   #define CYTHON_PEP393_ENABLED 1
442   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
443                                               0 : _PyUnicode_Ready((PyObject *)(op)))
444   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
445   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
446   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
447   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
448   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
449   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
450   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
451   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
452 #else
453   #define CYTHON_PEP393_ENABLED 0
454   #define PyUnicode_1BYTE_KIND  1
455   #define PyUnicode_2BYTE_KIND  2
456   #define PyUnicode_4BYTE_KIND  4
457   #define __Pyx_PyUnicode_READY(op)       (0)
458   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
459   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
460   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
461   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
462   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
463   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
464   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
465   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
466 #endif
467 #if CYTHON_COMPILING_IN_PYPY
468   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
469   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
470 #else
471   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
472   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
473       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
474 #endif
475 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
476   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
477 #endif
478 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
479   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
480 #endif
481 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
482   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
483 #endif
484 #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))
485 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
486 #if PY_MAJOR_VERSION >= 3
487   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
488 #else
489   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
490 #endif
491 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
492   #define PyObject_ASCII(o)            PyObject_Repr(o)
493 #endif
494 #if PY_MAJOR_VERSION >= 3
495   #define PyBaseString_Type            PyUnicode_Type
496   #define PyStringObject               PyUnicodeObject
497   #define PyString_Type                PyUnicode_Type
498   #define PyString_Check               PyUnicode_Check
499   #define PyString_CheckExact          PyUnicode_CheckExact
500   #define PyObject_Unicode             PyObject_Str
501 #endif
502 #if PY_MAJOR_VERSION >= 3
503   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
504   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
505 #else
506   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
507   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
508 #endif
509 #ifndef PySet_CheckExact
510   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
511 #endif
512 #if CYTHON_ASSUME_SAFE_MACROS
513   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
514 #else
515   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
516 #endif
517 #if PY_MAJOR_VERSION >= 3
518   #define PyIntObject                  PyLongObject
519   #define PyInt_Type                   PyLong_Type
520   #define PyInt_Check(op)              PyLong_Check(op)
521   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
522   #define PyInt_FromString             PyLong_FromString
523   #define PyInt_FromUnicode            PyLong_FromUnicode
524   #define PyInt_FromLong               PyLong_FromLong
525   #define PyInt_FromSize_t             PyLong_FromSize_t
526   #define PyInt_FromSsize_t            PyLong_FromSsize_t
527   #define PyInt_AsLong                 PyLong_AsLong
528   #define PyInt_AS_LONG                PyLong_AS_LONG
529   #define PyInt_AsSsize_t              PyLong_AsSsize_t
530   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
531   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
532   #define PyNumber_Int                 PyNumber_Long
533 #endif
534 #if PY_MAJOR_VERSION >= 3
535   #define PyBoolObject                 PyLongObject
536 #endif
537 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
538   #ifndef PyUnicode_InternFromString
539     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
540   #endif
541 #endif
542 #if PY_VERSION_HEX < 0x030200A4
543   typedef long Py_hash_t;
544   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
545   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
546 #else
547   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
548   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
549 #endif
550 #if PY_MAJOR_VERSION >= 3
551   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
552 #else
553   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
554 #endif
555 #if CYTHON_USE_ASYNC_SLOTS
556   #if PY_VERSION_HEX >= 0x030500B1
557     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
558     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
559   #else
560     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
561   #endif
562 #else
563   #define __Pyx_PyType_AsAsync(obj) NULL
564 #endif
565 #ifndef __Pyx_PyAsyncMethodsStruct
566     typedef struct {
567         unaryfunc am_await;
568         unaryfunc am_aiter;
569         unaryfunc am_anext;
570     } __Pyx_PyAsyncMethodsStruct;
571 #endif
572 
573 #if defined(WIN32) || defined(MS_WINDOWS)
574   #define _USE_MATH_DEFINES
575 #endif
576 #include <math.h>
577 #ifdef NAN
578 #define __PYX_NAN() ((float) NAN)
579 #else
__PYX_NAN()580 static CYTHON_INLINE float __PYX_NAN() {
581   float value;
582   memset(&value, 0xFF, sizeof(value));
583   return value;
584 }
585 #endif
586 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
587 #define __Pyx_truncl trunc
588 #else
589 #define __Pyx_truncl truncl
590 #endif
591 
592 
593 #define __PYX_ERR(f_index, lineno, Ln_error) \
594 { \
595   __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
596 }
597 
598 #ifndef __PYX_EXTERN_C
599   #ifdef __cplusplus
600     #define __PYX_EXTERN_C extern "C"
601   #else
602     #define __PYX_EXTERN_C extern
603   #endif
604 #endif
605 
606 #define __PYX_HAVE__tables__indexesextension
607 #define __PYX_HAVE_API__tables__indexesextension
608 /* Early includes */
609 #include <string.h>
610 #include <stdio.h>
611 #include "numpy/arrayobject.h"
612 #include "numpy/ufuncobject.h"
613 #include "time.h"
614 #include "hdf5.h"
615 #include "H5ATTR.h"
616 #include "H5ARRAY.h"
617 #include "utils.h"
618 #include "typeconv.h"
619 #include "blosc_filter.h"
620 #include <stdlib.h>
621 #include "H5ARRAY-opt.h"
622 #include "idx-opt.h"
623 #ifdef _OPENMP
624 #include <omp.h>
625 #endif /* _OPENMP */
626 
627 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
628 #define CYTHON_WITHOUT_ASSERTIONS
629 #endif
630 
631 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
632                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
633 
634 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
635 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
636 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
637 #define __PYX_DEFAULT_STRING_ENCODING ""
638 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
639 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
640 #define __Pyx_uchar_cast(c) ((unsigned char)c)
641 #define __Pyx_long_cast(x) ((long)x)
642 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
643     (sizeof(type) < sizeof(Py_ssize_t))  ||\
644     (sizeof(type) > sizeof(Py_ssize_t) &&\
645           likely(v < (type)PY_SSIZE_T_MAX ||\
646                  v == (type)PY_SSIZE_T_MAX)  &&\
647           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
648                                 v == (type)PY_SSIZE_T_MIN)))  ||\
649     (sizeof(type) == sizeof(Py_ssize_t) &&\
650           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
651                                v == (type)PY_SSIZE_T_MAX)))  )
__Pyx_is_valid_index(Py_ssize_t i,Py_ssize_t limit)652 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
653     return (size_t) i < (size_t) limit;
654 }
655 #if defined (__cplusplus) && __cplusplus >= 201103L
656     #include <cstdlib>
657     #define __Pyx_sst_abs(value) std::abs(value)
658 #elif SIZEOF_INT >= SIZEOF_SIZE_T
659     #define __Pyx_sst_abs(value) abs(value)
660 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
661     #define __Pyx_sst_abs(value) labs(value)
662 #elif defined (_MSC_VER)
663     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
664 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
665     #define __Pyx_sst_abs(value) llabs(value)
666 #elif defined (__GNUC__)
667     #define __Pyx_sst_abs(value) __builtin_llabs(value)
668 #else
669     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
670 #endif
671 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
672 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
673 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
674 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
675 #define __Pyx_PyBytes_FromString        PyBytes_FromString
676 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
677 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
678 #if PY_MAJOR_VERSION < 3
679     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
680     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
681 #else
682     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
683     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
684 #endif
685 #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
686 #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
687 #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
688 #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
689 #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
690 #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
691 #define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
692 #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
693 #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
694 #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
695 #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
696 #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
697 #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
698 #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
699 #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
700 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
__Pyx_Py_UNICODE_strlen(const Py_UNICODE * u)701 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
702     const Py_UNICODE *u_end = u;
703     while (*u_end++) ;
704     return (size_t)(u_end - u - 1);
705 }
706 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
707 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
708 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
709 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
710 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
711 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
712 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
713 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
714 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
715 #define __Pyx_PySequence_Tuple(obj)\
716     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
717 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
718 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
719 #if CYTHON_ASSUME_SAFE_MACROS
720 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
721 #else
722 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
723 #endif
724 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
725 #if PY_MAJOR_VERSION >= 3
726 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
727 #else
728 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
729 #endif
730 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
731 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
732 static int __Pyx_sys_getdefaultencoding_not_ascii;
__Pyx_init_sys_getdefaultencoding_params(void)733 static int __Pyx_init_sys_getdefaultencoding_params(void) {
734     PyObject* sys;
735     PyObject* default_encoding = NULL;
736     PyObject* ascii_chars_u = NULL;
737     PyObject* ascii_chars_b = NULL;
738     const char* default_encoding_c;
739     sys = PyImport_ImportModule("sys");
740     if (!sys) goto bad;
741     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
742     Py_DECREF(sys);
743     if (!default_encoding) goto bad;
744     default_encoding_c = PyBytes_AsString(default_encoding);
745     if (!default_encoding_c) goto bad;
746     if (strcmp(default_encoding_c, "ascii") == 0) {
747         __Pyx_sys_getdefaultencoding_not_ascii = 0;
748     } else {
749         char ascii_chars[128];
750         int c;
751         for (c = 0; c < 128; c++) {
752             ascii_chars[c] = c;
753         }
754         __Pyx_sys_getdefaultencoding_not_ascii = 1;
755         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
756         if (!ascii_chars_u) goto bad;
757         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
758         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
759             PyErr_Format(
760                 PyExc_ValueError,
761                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
762                 default_encoding_c);
763             goto bad;
764         }
765         Py_DECREF(ascii_chars_u);
766         Py_DECREF(ascii_chars_b);
767     }
768     Py_DECREF(default_encoding);
769     return 0;
770 bad:
771     Py_XDECREF(default_encoding);
772     Py_XDECREF(ascii_chars_u);
773     Py_XDECREF(ascii_chars_b);
774     return -1;
775 }
776 #endif
777 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
778 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
779 #else
780 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
781 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
782 static char* __PYX_DEFAULT_STRING_ENCODING;
__Pyx_init_sys_getdefaultencoding_params(void)783 static int __Pyx_init_sys_getdefaultencoding_params(void) {
784     PyObject* sys;
785     PyObject* default_encoding = NULL;
786     char* default_encoding_c;
787     sys = PyImport_ImportModule("sys");
788     if (!sys) goto bad;
789     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
790     Py_DECREF(sys);
791     if (!default_encoding) goto bad;
792     default_encoding_c = PyBytes_AsString(default_encoding);
793     if (!default_encoding_c) goto bad;
794     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
795     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
796     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
797     Py_DECREF(default_encoding);
798     return 0;
799 bad:
800     Py_XDECREF(default_encoding);
801     return -1;
802 }
803 #endif
804 #endif
805 
806 
807 /* Test for GCC > 2.95 */
808 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
809   #define likely(x)   __builtin_expect(!!(x), 1)
810   #define unlikely(x) __builtin_expect(!!(x), 0)
811 #else /* !__GNUC__ or GCC < 2.95 */
812   #define likely(x)   (x)
813   #define unlikely(x) (x)
814 #endif /* __GNUC__ */
__Pyx_pretend_to_initialize(void * ptr)815 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
816 
817 static PyObject *__pyx_m = NULL;
818 static PyObject *__pyx_d;
819 static PyObject *__pyx_b;
820 static PyObject *__pyx_cython_runtime = NULL;
821 static PyObject *__pyx_empty_tuple;
822 static PyObject *__pyx_empty_bytes;
823 static PyObject *__pyx_empty_unicode;
824 static int __pyx_lineno;
825 static int __pyx_clineno = 0;
826 static const char * __pyx_cfilenm= __FILE__;
827 static const char *__pyx_filename;
828 
829 /* Header.proto */
830 #if !defined(CYTHON_CCOMPLEX)
831   #if defined(__cplusplus)
832     #define CYTHON_CCOMPLEX 1
833   #elif defined(_Complex_I)
834     #define CYTHON_CCOMPLEX 1
835   #else
836     #define CYTHON_CCOMPLEX 0
837   #endif
838 #endif
839 #if CYTHON_CCOMPLEX
840   #ifdef __cplusplus
841     #include <complex>
842   #else
843     #include <complex.h>
844   #endif
845 #endif
846 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
847   #undef _Complex_I
848   #define _Complex_I 1.0fj
849 #endif
850 
851 
852 static const char *__pyx_f[] = {
853   "tables/indexesextension.pyx",
854   "stringsource",
855   "__init__.pxd",
856   "type.pxd",
857   "tables/hdf5extension.pxd",
858   "tables/lrucacheextension.pxd",
859 };
860 /* NoFastGil.proto */
861 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
862 #define __Pyx_PyGILState_Release PyGILState_Release
863 #define __Pyx_FastGIL_Remember()
864 #define __Pyx_FastGIL_Forget()
865 #define __Pyx_FastGilFuncInit()
866 
867 /* ForceInitThreads.proto */
868 #ifndef __PYX_FORCE_INIT_THREADS
869   #define __PYX_FORCE_INIT_THREADS 0
870 #endif
871 
872 
873 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
874  * # in Cython to enable them only on the right systems.
875  *
876  * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
877  * ctypedef npy_int16      int16_t
878  * ctypedef npy_int32      int32_t
879  */
880 typedef npy_int8 __pyx_t_5numpy_int8_t;
881 
882 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
883  *
884  * ctypedef npy_int8       int8_t
885  * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
886  * ctypedef npy_int32      int32_t
887  * ctypedef npy_int64      int64_t
888  */
889 typedef npy_int16 __pyx_t_5numpy_int16_t;
890 
891 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
892  * ctypedef npy_int8       int8_t
893  * ctypedef npy_int16      int16_t
894  * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
895  * ctypedef npy_int64      int64_t
896  * #ctypedef npy_int96      int96_t
897  */
898 typedef npy_int32 __pyx_t_5numpy_int32_t;
899 
900 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
901  * ctypedef npy_int16      int16_t
902  * ctypedef npy_int32      int32_t
903  * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
904  * #ctypedef npy_int96      int96_t
905  * #ctypedef npy_int128     int128_t
906  */
907 typedef npy_int64 __pyx_t_5numpy_int64_t;
908 
909 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
910  * #ctypedef npy_int128     int128_t
911  *
912  * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
913  * ctypedef npy_uint16     uint16_t
914  * ctypedef npy_uint32     uint32_t
915  */
916 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
917 
918 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784
919  *
920  * ctypedef npy_uint8      uint8_t
921  * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
922  * ctypedef npy_uint32     uint32_t
923  * ctypedef npy_uint64     uint64_t
924  */
925 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
926 
927 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
928  * ctypedef npy_uint8      uint8_t
929  * ctypedef npy_uint16     uint16_t
930  * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
931  * ctypedef npy_uint64     uint64_t
932  * #ctypedef npy_uint96     uint96_t
933  */
934 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
935 
936 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786
937  * ctypedef npy_uint16     uint16_t
938  * ctypedef npy_uint32     uint32_t
939  * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
940  * #ctypedef npy_uint96     uint96_t
941  * #ctypedef npy_uint128    uint128_t
942  */
943 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
944 
945 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
946  * #ctypedef npy_uint128    uint128_t
947  *
948  * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
949  * ctypedef npy_float64    float64_t
950  * #ctypedef npy_float80    float80_t
951  */
952 typedef npy_float32 __pyx_t_5numpy_float32_t;
953 
954 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
955  *
956  * ctypedef npy_float32    float32_t
957  * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
958  * #ctypedef npy_float80    float80_t
959  * #ctypedef npy_float128   float128_t
960  */
961 typedef npy_float64 __pyx_t_5numpy_float64_t;
962 
963 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800
964  * # The int types are mapped a bit surprising --
965  * # numpy.int corresponds to 'l' and numpy.long to 'q'
966  * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
967  * ctypedef npy_longlong   long_t
968  * ctypedef npy_longlong   longlong_t
969  */
970 typedef npy_long __pyx_t_5numpy_int_t;
971 
972 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
973  * # numpy.int corresponds to 'l' and numpy.long to 'q'
974  * ctypedef npy_long       int_t
975  * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
976  * ctypedef npy_longlong   longlong_t
977  *
978  */
979 typedef npy_longlong __pyx_t_5numpy_long_t;
980 
981 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
982  * ctypedef npy_long       int_t
983  * ctypedef npy_longlong   long_t
984  * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
985  *
986  * ctypedef npy_ulong      uint_t
987  */
988 typedef npy_longlong __pyx_t_5numpy_longlong_t;
989 
990 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804
991  * ctypedef npy_longlong   longlong_t
992  *
993  * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
994  * ctypedef npy_ulonglong  ulong_t
995  * ctypedef npy_ulonglong  ulonglong_t
996  */
997 typedef npy_ulong __pyx_t_5numpy_uint_t;
998 
999 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805
1000  *
1001  * ctypedef npy_ulong      uint_t
1002  * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
1003  * ctypedef npy_ulonglong  ulonglong_t
1004  *
1005  */
1006 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1007 
1008 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806
1009  * ctypedef npy_ulong      uint_t
1010  * ctypedef npy_ulonglong  ulong_t
1011  * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
1012  *
1013  * ctypedef npy_intp       intp_t
1014  */
1015 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1016 
1017 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808
1018  * ctypedef npy_ulonglong  ulonglong_t
1019  *
1020  * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
1021  * ctypedef npy_uintp      uintp_t
1022  *
1023  */
1024 typedef npy_intp __pyx_t_5numpy_intp_t;
1025 
1026 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809
1027  *
1028  * ctypedef npy_intp       intp_t
1029  * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
1030  *
1031  * ctypedef npy_double     float_t
1032  */
1033 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1034 
1035 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811
1036  * ctypedef npy_uintp      uintp_t
1037  *
1038  * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
1039  * ctypedef npy_double     double_t
1040  * ctypedef npy_longdouble longdouble_t
1041  */
1042 typedef npy_double __pyx_t_5numpy_float_t;
1043 
1044 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
1045  *
1046  * ctypedef npy_double     float_t
1047  * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
1048  * ctypedef npy_longdouble longdouble_t
1049  *
1050  */
1051 typedef npy_double __pyx_t_5numpy_double_t;
1052 
1053 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
1054  * ctypedef npy_double     float_t
1055  * ctypedef npy_double     double_t
1056  * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
1057  *
1058  * ctypedef npy_cfloat      cfloat_t
1059  */
1060 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1061 
1062 /* "tables/indexesextension.pyx":45
1063  *
1064  * # These two types are defined in npy_common.h but not in cython's numpy.pxd
1065  * ctypedef unsigned char npy_bool             # <<<<<<<<<<<<<<
1066  * ctypedef npy_uint16 npy_float16
1067  *
1068  */
1069 typedef unsigned char __pyx_t_6tables_16indexesextension_npy_bool;
1070 
1071 /* "tables/indexesextension.pyx":46
1072  * # These two types are defined in npy_common.h but not in cython's numpy.pxd
1073  * ctypedef unsigned char npy_bool
1074  * ctypedef npy_uint16 npy_float16             # <<<<<<<<<<<<<<
1075  *
1076  * from libc.stdlib cimport malloc, free
1077  */
1078 typedef npy_uint16 __pyx_t_6tables_16indexesextension_npy_float16;
1079 /* Declarations.proto */
1080 #if CYTHON_CCOMPLEX
1081   #ifdef __cplusplus
1082     typedef ::std::complex< float > __pyx_t_float_complex;
1083   #else
1084     typedef float _Complex __pyx_t_float_complex;
1085   #endif
1086 #else
1087     typedef struct { float real, imag; } __pyx_t_float_complex;
1088 #endif
1089 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1090 
1091 /* Declarations.proto */
1092 #if CYTHON_CCOMPLEX
1093   #ifdef __cplusplus
1094     typedef ::std::complex< double > __pyx_t_double_complex;
1095   #else
1096     typedef double _Complex __pyx_t_double_complex;
1097   #endif
1098 #else
1099     typedef struct { double real, imag; } __pyx_t_double_complex;
1100 #endif
1101 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1102 
1103 
1104 /*--- Type declarations ---*/
1105 struct __pyx_obj_6tables_13hdf5extension_Node;
1106 struct __pyx_obj_6tables_13hdf5extension_Leaf;
1107 struct __pyx_obj_6tables_13hdf5extension_Array;
1108 struct __pyx_obj_6tables_17lrucacheextension_NodeCache;
1109 struct __pyx_obj_6tables_17lrucacheextension_BaseCache;
1110 struct __pyx_obj_6tables_17lrucacheextension_ObjectNode;
1111 struct __pyx_obj_6tables_17lrucacheextension_ObjectCache;
1112 struct __pyx_obj_6tables_17lrucacheextension_NumCache;
1113 struct __pyx_obj_6tables_16indexesextension_Index;
1114 struct __pyx_obj_6tables_16indexesextension_CacheArray;
1115 struct __pyx_obj_6tables_16indexesextension_IndexArray;
1116 struct __pyx_obj_6tables_16indexesextension_LastRowArray;
1117 
1118 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
1119  * ctypedef npy_longdouble longdouble_t
1120  *
1121  * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
1122  * ctypedef npy_cdouble     cdouble_t
1123  * ctypedef npy_clongdouble clongdouble_t
1124  */
1125 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1126 
1127 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
1128  *
1129  * ctypedef npy_cfloat      cfloat_t
1130  * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
1131  * ctypedef npy_clongdouble clongdouble_t
1132  *
1133  */
1134 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1135 
1136 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817
1137  * ctypedef npy_cfloat      cfloat_t
1138  * ctypedef npy_cdouble     cdouble_t
1139  * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
1140  *
1141  * ctypedef npy_cdouble     complex_t
1142  */
1143 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1144 
1145 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819
1146  * ctypedef npy_clongdouble clongdouble_t
1147  *
1148  * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
1149  *
1150  * cdef inline object PyArray_MultiIterNew1(a):
1151  */
1152 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1153 
1154 /* "hdf5extension.pxd":18
1155  *
1156  * # Declaration of instance variables for shared classes
1157  * cdef class Node:             # <<<<<<<<<<<<<<
1158  *   cdef object name
1159  *   cdef hid_t  parent_id
1160  */
1161 struct __pyx_obj_6tables_13hdf5extension_Node {
1162   PyObject_HEAD
1163   PyObject *name;
1164   hid_t parent_id;
1165 };
1166 
1167 
1168 /* "hdf5extension.pxd":22
1169  *   cdef hid_t  parent_id
1170  *
1171  * cdef class Leaf(Node):             # <<<<<<<<<<<<<<
1172  *   cdef hid_t   dataset_id
1173  *   cdef hid_t   type_id
1174  */
1175 struct __pyx_obj_6tables_13hdf5extension_Leaf {
1176   struct __pyx_obj_6tables_13hdf5extension_Node __pyx_base;
1177   struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf *__pyx_vtab;
1178   hid_t dataset_id;
1179   hid_t type_id;
1180   hid_t base_type_id;
1181   hid_t disk_type_id;
1182   hsize_t *dims;
1183 };
1184 
1185 
1186 /* "hdf5extension.pxd":31
1187  *   cdef _convert_time64(self, ndarray nparr, int sense)
1188  *
1189  * cdef class Array(Leaf):             # <<<<<<<<<<<<<<
1190  *   cdef int      rank
1191  *   cdef hsize_t *maxdims
1192  */
1193 struct __pyx_obj_6tables_13hdf5extension_Array {
1194   struct __pyx_obj_6tables_13hdf5extension_Leaf __pyx_base;
1195   int rank;
1196   hsize_t *maxdims;
1197   hsize_t *dims_chunk;
1198 };
1199 
1200 
1201 /* "lrucacheextension.pxd":17
1202  * # Declaration of instance variables for shared classes
1203  * # The NodeCache class is useful for caching general objects (like Nodes).
1204  * cdef class NodeCache:             # <<<<<<<<<<<<<<
1205  *   cdef readonly long nslots
1206  *   cdef long nextslot
1207  */
1208 struct __pyx_obj_6tables_17lrucacheextension_NodeCache {
1209   PyObject_HEAD
1210   struct __pyx_vtabstruct_6tables_17lrucacheextension_NodeCache *__pyx_vtab;
1211   long nslots;
1212   long nextslot;
1213   PyObject *nodes;
1214   PyObject *paths;
1215 };
1216 
1217 
1218 /* "lrucacheextension.pxd":27
1219  *
1220  * # Base class for other caches
1221  * cdef class BaseCache:             # <<<<<<<<<<<<<<
1222  *   cdef int iscachedisabled, incsetcount
1223  *   cdef long setcount, getcount, containscount
1224  */
1225 struct __pyx_obj_6tables_17lrucacheextension_BaseCache {
1226   PyObject_HEAD
1227   struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache *__pyx_vtab;
1228   int iscachedisabled;
1229   int incsetcount;
1230   long setcount;
1231   long getcount;
1232   long containscount;
1233   long disablecyclecount;
1234   long disableeverycycles;
1235   long enablecyclecount;
1236   long enableeverycycles;
1237   double nprobes;
1238   double hitratio;
1239   long seqn_;
1240   long nextslot;
1241   long nslots;
1242   long *ratimes;
1243   double lowesthr;
1244   PyArrayObject *atimes;
1245   PyObject *name;
1246 };
1247 
1248 
1249 /* "lrucacheextension.pxd":44
1250  *
1251  * #  Helper class for ObjectCache
1252  * cdef class ObjectNode:             # <<<<<<<<<<<<<<
1253  *   cdef object key, obj
1254  *   cdef long nslot
1255  */
1256 struct __pyx_obj_6tables_17lrucacheextension_ObjectNode {
1257   PyObject_HEAD
1258   PyObject *key;
1259   PyObject *obj;
1260   long nslot;
1261 };
1262 
1263 
1264 /* "lrucacheextension.pxd":50
1265  *
1266  * # The ObjectCache class is useful for general python objects
1267  * cdef class ObjectCache(BaseCache):             # <<<<<<<<<<<<<<
1268  *   cdef long maxcachesize, cachesize, maxobjsize
1269  *   cdef long *rsizes
1270  */
1271 struct __pyx_obj_6tables_17lrucacheextension_ObjectCache {
1272   struct __pyx_obj_6tables_17lrucacheextension_BaseCache __pyx_base;
1273   long maxcachesize;
1274   long cachesize;
1275   long maxobjsize;
1276   long *rsizes;
1277   PyArrayObject *sizes;
1278   PyObject *__pyx___list;
1279   PyObject *__pyx___dict;
1280   struct __pyx_obj_6tables_17lrucacheextension_ObjectNode *mrunode;
1281 };
1282 
1283 
1284 /* "lrucacheextension.pxd":65
1285  *
1286  * # The NumCache class is useful for caching numerical data in an efficient way
1287  * cdef class NumCache(BaseCache):             # <<<<<<<<<<<<<<
1288  *   cdef long itemsize, slotsize
1289  *   cdef ndarray cacheobj, keys
1290  */
1291 struct __pyx_obj_6tables_17lrucacheextension_NumCache {
1292   struct __pyx_obj_6tables_17lrucacheextension_BaseCache __pyx_base;
1293   long itemsize;
1294   long slotsize;
1295   PyArrayObject *cacheobj;
1296   PyArrayObject *keys;
1297   void *rcache;
1298   PY_LONG_LONG *rkeys;
1299   PyObject *__pyx___dict;
1300 };
1301 
1302 
1303 /* "tables/indexesextension.pyx":558
1304  *
1305  *
1306  * cdef class Index:             # <<<<<<<<<<<<<<
1307  *   pass
1308  *
1309  */
1310 struct __pyx_obj_6tables_16indexesextension_Index {
1311   PyObject_HEAD
1312 };
1313 
1314 
1315 /* "tables/indexesextension.pyx":562
1316  *
1317  *
1318  * cdef class CacheArray(Array):             # <<<<<<<<<<<<<<
1319  *   """Container for keeping index caches of 1st and 2nd level."""
1320  *
1321  */
1322 struct __pyx_obj_6tables_16indexesextension_CacheArray {
1323   struct __pyx_obj_6tables_13hdf5extension_Array __pyx_base;
1324   hid_t mem_space_id;
1325 };
1326 
1327 
1328 /* "tables/indexesextension.pyx":592
1329  *
1330  *
1331  * cdef class IndexArray(Array):             # <<<<<<<<<<<<<<
1332  *   """Container for keeping sorted and indices values."""
1333  *
1334  */
1335 struct __pyx_obj_6tables_16indexesextension_IndexArray {
1336   struct __pyx_obj_6tables_13hdf5extension_Array __pyx_base;
1337   void *rbufst;
1338   void *rbufln;
1339   void *rbufrv;
1340   void *rbufbc;
1341   void *rbuflb;
1342   hid_t mem_space_id;
1343   int l_chunksize;
1344   int l_slicesize;
1345   int nbounds;
1346   int indsize;
1347   struct __pyx_obj_6tables_16indexesextension_CacheArray *bounds_ext;
1348   struct __pyx_obj_6tables_17lrucacheextension_NumCache *boundscache;
1349   struct __pyx_obj_6tables_17lrucacheextension_NumCache *sortedcache;
1350   PyArrayObject *bufferbc;
1351   PyArrayObject *bufferlb;
1352 };
1353 
1354 
1355 /* "tables/indexesextension.pyx":1495
1356  *
1357  *
1358  * cdef class LastRowArray(Array):             # <<<<<<<<<<<<<<
1359  *   """
1360  *   Container for keeping sorted and indices values of last rows of an index.
1361  */
1362 struct __pyx_obj_6tables_16indexesextension_LastRowArray {
1363   struct __pyx_obj_6tables_13hdf5extension_Array __pyx_base;
1364 };
1365 
1366 
1367 
1368 /* "hdf5extension.pxd":22
1369  *   cdef hid_t  parent_id
1370  *
1371  * cdef class Leaf(Node):             # <<<<<<<<<<<<<<
1372  *   cdef hid_t   dataset_id
1373  *   cdef hid_t   type_id
1374  */
1375 
1376 struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf {
1377   PyObject *(*_get_type_ids)(struct __pyx_obj_6tables_13hdf5extension_Leaf *);
1378   PyObject *(*_convert_time64)(struct __pyx_obj_6tables_13hdf5extension_Leaf *, PyArrayObject *, int);
1379 };
1380 static struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf *__pyx_vtabptr_6tables_13hdf5extension_Leaf;
1381 
1382 
1383 /* "hdf5extension.pxd":31
1384  *   cdef _convert_time64(self, ndarray nparr, int sense)
1385  *
1386  * cdef class Array(Leaf):             # <<<<<<<<<<<<<<
1387  *   cdef int      rank
1388  *   cdef hsize_t *maxdims
1389  */
1390 
1391 struct __pyx_vtabstruct_6tables_13hdf5extension_Array {
1392   struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf __pyx_base;
1393 };
1394 static struct __pyx_vtabstruct_6tables_13hdf5extension_Array *__pyx_vtabptr_6tables_13hdf5extension_Array;
1395 
1396 
1397 /* "lrucacheextension.pxd":17
1398  * # Declaration of instance variables for shared classes
1399  * # The NodeCache class is useful for caching general objects (like Nodes).
1400  * cdef class NodeCache:             # <<<<<<<<<<<<<<
1401  *   cdef readonly long nslots
1402  *   cdef long nextslot
1403  */
1404 
1405 struct __pyx_vtabstruct_6tables_17lrucacheextension_NodeCache {
1406   PyObject *(*setitem)(struct __pyx_obj_6tables_17lrucacheextension_NodeCache *, PyObject *, PyObject *);
1407   long (*getslot)(struct __pyx_obj_6tables_17lrucacheextension_NodeCache *, PyObject *);
1408   PyObject *(*cpop)(struct __pyx_obj_6tables_17lrucacheextension_NodeCache *, PyObject *);
1409 };
1410 static struct __pyx_vtabstruct_6tables_17lrucacheextension_NodeCache *__pyx_vtabptr_6tables_17lrucacheextension_NodeCache;
1411 
1412 
1413 /* "lrucacheextension.pxd":27
1414  *
1415  * # Base class for other caches
1416  * cdef class BaseCache:             # <<<<<<<<<<<<<<
1417  *   cdef int iscachedisabled, incsetcount
1418  *   cdef long setcount, getcount, containscount
1419  */
1420 
1421 struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache {
1422   int (*checkhitratio)(struct __pyx_obj_6tables_17lrucacheextension_BaseCache *);
1423   int (*couldenablecache_)(struct __pyx_obj_6tables_17lrucacheextension_BaseCache *);
1424   long (*incseqn)(struct __pyx_obj_6tables_17lrucacheextension_BaseCache *);
1425 };
1426 static struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache *__pyx_vtabptr_6tables_17lrucacheextension_BaseCache;
1427 
1428 
1429 /* "lrucacheextension.pxd":50
1430  *
1431  * # The ObjectCache class is useful for general python objects
1432  * cdef class ObjectCache(BaseCache):             # <<<<<<<<<<<<<<
1433  *   cdef long maxcachesize, cachesize, maxobjsize
1434  *   cdef long *rsizes
1435  */
1436 
1437 struct __pyx_vtabstruct_6tables_17lrucacheextension_ObjectCache {
1438   struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache __pyx_base;
1439   PyObject *(*removeslot_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, long);
1440   PyObject *(*clearcache_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *);
1441   PyObject *(*updateslot_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, long, long, PyObject *, PyObject *);
1442   long (*setitem_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, PyObject *, PyObject *, long);
1443   long (*getslot_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, PyObject *);
1444   PyObject *(*getitem_)(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache *, long);
1445 };
1446 static struct __pyx_vtabstruct_6tables_17lrucacheextension_ObjectCache *__pyx_vtabptr_6tables_17lrucacheextension_ObjectCache;
1447 
1448 
1449 /* "lrucacheextension.pxd":65
1450  *
1451  * # The NumCache class is useful for caching numerical data in an efficient way
1452  * cdef class NumCache(BaseCache):             # <<<<<<<<<<<<<<
1453  *   cdef long itemsize, slotsize
1454  *   cdef ndarray cacheobj, keys
1455  */
1456 
1457 struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache {
1458   struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache __pyx_base;
1459   void *(*getaddrslot_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, long);
1460   long (*setitem_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, PY_LONG_LONG, void *, long);
1461   long (*setitem1_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, PY_LONG_LONG);
1462   long (*getslot_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, PY_LONG_LONG);
1463   PyObject *(*getitem_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, long, void *, long);
1464   void *(*getitem1_)(struct __pyx_obj_6tables_17lrucacheextension_NumCache *, long);
1465 };
1466 static struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *__pyx_vtabptr_6tables_17lrucacheextension_NumCache;
1467 
1468 
1469 /* "tables/indexesextension.pyx":562
1470  *
1471  *
1472  * cdef class CacheArray(Array):             # <<<<<<<<<<<<<<
1473  *   """Container for keeping index caches of 1st and 2nd level."""
1474  *
1475  */
1476 
1477 struct __pyx_vtabstruct_6tables_16indexesextension_CacheArray {
1478   struct __pyx_vtabstruct_6tables_13hdf5extension_Array __pyx_base;
1479   PyObject *(*initread)(struct __pyx_obj_6tables_16indexesextension_CacheArray *, int);
1480   PyObject *(*read_slice)(struct __pyx_obj_6tables_16indexesextension_CacheArray *, hsize_t, hsize_t, hsize_t, void *);
1481 };
1482 static struct __pyx_vtabstruct_6tables_16indexesextension_CacheArray *__pyx_vtabptr_6tables_16indexesextension_CacheArray;
1483 
1484 
1485 /* "tables/indexesextension.pyx":592
1486  *
1487  *
1488  * cdef class IndexArray(Array):             # <<<<<<<<<<<<<<
1489  *   """Container for keeping sorted and indices values."""
1490  *
1491  */
1492 
1493 struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray {
1494   struct __pyx_vtabstruct_6tables_13hdf5extension_Array __pyx_base;
1495   void *(*_g_read_sorted_slice)(struct __pyx_obj_6tables_16indexesextension_IndexArray *, hsize_t, hsize_t, hsize_t);
1496   void *(*get_lru_bounds)(struct __pyx_obj_6tables_16indexesextension_IndexArray *, int, int);
1497   void *(*get_lru_sorted)(struct __pyx_obj_6tables_16indexesextension_IndexArray *, int, int, int, int);
1498 };
1499 static struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *__pyx_vtabptr_6tables_16indexesextension_IndexArray;
1500 
1501 
1502 /* "tables/indexesextension.pyx":1495
1503  *
1504  *
1505  * cdef class LastRowArray(Array):             # <<<<<<<<<<<<<<
1506  *   """
1507  *   Container for keeping sorted and indices values of last rows of an index.
1508  */
1509 
1510 struct __pyx_vtabstruct_6tables_16indexesextension_LastRowArray {
1511   struct __pyx_vtabstruct_6tables_13hdf5extension_Array __pyx_base;
1512 };
1513 static struct __pyx_vtabstruct_6tables_16indexesextension_LastRowArray *__pyx_vtabptr_6tables_16indexesextension_LastRowArray;
1514 
1515 /* --- Runtime support code (head) --- */
1516 /* Refnanny.proto */
1517 #ifndef CYTHON_REFNANNY
1518   #define CYTHON_REFNANNY 0
1519 #endif
1520 #if CYTHON_REFNANNY
1521   typedef struct {
1522     void (*INCREF)(void*, PyObject*, int);
1523     void (*DECREF)(void*, PyObject*, int);
1524     void (*GOTREF)(void*, PyObject*, int);
1525     void (*GIVEREF)(void*, PyObject*, int);
1526     void* (*SetupContext)(const char*, int, const char*);
1527     void (*FinishContext)(void**);
1528   } __Pyx_RefNannyAPIStruct;
1529   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1530   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1531   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1532 #ifdef WITH_THREAD
1533   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1534           if (acquire_gil) {\
1535               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1536               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1537               PyGILState_Release(__pyx_gilstate_save);\
1538           } else {\
1539               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1540           }
1541 #else
1542   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1543           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1544 #endif
1545   #define __Pyx_RefNannyFinishContext()\
1546           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1547   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1548   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1549   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1550   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1551   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1552   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1553   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1554   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1555 #else
1556   #define __Pyx_RefNannyDeclarations
1557   #define __Pyx_RefNannySetupContext(name, acquire_gil)
1558   #define __Pyx_RefNannyFinishContext()
1559   #define __Pyx_INCREF(r) Py_INCREF(r)
1560   #define __Pyx_DECREF(r) Py_DECREF(r)
1561   #define __Pyx_GOTREF(r)
1562   #define __Pyx_GIVEREF(r)
1563   #define __Pyx_XINCREF(r) Py_XINCREF(r)
1564   #define __Pyx_XDECREF(r) Py_XDECREF(r)
1565   #define __Pyx_XGOTREF(r)
1566   #define __Pyx_XGIVEREF(r)
1567 #endif
1568 #define __Pyx_XDECREF_SET(r, v) do {\
1569         PyObject *tmp = (PyObject *) r;\
1570         r = v; __Pyx_XDECREF(tmp);\
1571     } while (0)
1572 #define __Pyx_DECREF_SET(r, v) do {\
1573         PyObject *tmp = (PyObject *) r;\
1574         r = v; __Pyx_DECREF(tmp);\
1575     } while (0)
1576 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1577 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1578 
1579 /* PyObjectGetAttrStr.proto */
1580 #if CYTHON_USE_TYPE_SLOTS
1581 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1582 #else
1583 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1584 #endif
1585 
1586 /* GetBuiltinName.proto */
1587 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1588 
1589 /* RaiseArgTupleInvalid.proto */
1590 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1591     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1592 
1593 /* RaiseDoubleKeywords.proto */
1594 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1595 
1596 /* ParseKeywords.proto */
1597 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1598     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1599     const char* function_name);
1600 
1601 /* ArgTypeTest.proto */
1602 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1603     ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1604         __Pyx__ArgTypeTest(obj, type, name, exact))
1605 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1606 
1607 /* PyObjectCall.proto */
1608 #if CYTHON_COMPILING_IN_CPYTHON
1609 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1610 #else
1611 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1612 #endif
1613 
1614 /* PyThreadStateGet.proto */
1615 #if CYTHON_FAST_THREAD_STATE
1616 #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
1617 #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
1618 #define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
1619 #else
1620 #define __Pyx_PyThreadState_declare
1621 #define __Pyx_PyThreadState_assign
1622 #define __Pyx_PyErr_Occurred()  PyErr_Occurred()
1623 #endif
1624 
1625 /* PyErrFetchRestore.proto */
1626 #if CYTHON_FAST_THREAD_STATE
1627 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1628 #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1629 #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1630 #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1631 #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1632 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1633 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1634 #if CYTHON_COMPILING_IN_CPYTHON
1635 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1636 #else
1637 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1638 #endif
1639 #else
1640 #define __Pyx_PyErr_Clear() PyErr_Clear()
1641 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1642 #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
1643 #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
1644 #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
1645 #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
1646 #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
1647 #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
1648 #endif
1649 
1650 /* RaiseException.proto */
1651 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1652 
1653 /* GetItemInt.proto */
1654 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1655     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1656     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1657     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1658                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1659 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1660     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1661     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1662     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1663 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1664                                                               int wraparound, int boundscheck);
1665 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1666     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1667     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1668     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1669 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1670                                                               int wraparound, int boundscheck);
1671 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1672 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1673                                                      int is_list, int wraparound, int boundscheck);
1674 
1675 /* None.proto */
1676 static CYTHON_INLINE long __Pyx_div_long(long, long);
1677 
1678 /* PyErrExceptionMatches.proto */
1679 #if CYTHON_FAST_THREAD_STATE
1680 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1681 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1682 #else
1683 #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
1684 #endif
1685 
1686 /* GetAttr.proto */
1687 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1688 
1689 /* GetAttr3.proto */
1690 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1691 
1692 /* PyDictVersioning.proto */
1693 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1694 #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
1695 #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
1696 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1697     (version_var) = __PYX_GET_DICT_VERSION(dict);\
1698     (cache_var) = (value);
1699 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1700     static PY_UINT64_T __pyx_dict_version = 0;\
1701     static PyObject *__pyx_dict_cached_value = NULL;\
1702     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1703         (VAR) = __pyx_dict_cached_value;\
1704     } else {\
1705         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1706         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1707     }\
1708 }
1709 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1710 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1711 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1712 #else
1713 #define __PYX_GET_DICT_VERSION(dict)  (0)
1714 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1715 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
1716 #endif
1717 
1718 /* GetModuleGlobalName.proto */
1719 #if CYTHON_USE_DICT_VERSIONS
1720 #define __Pyx_GetModuleGlobalName(var, name)  {\
1721     static PY_UINT64_T __pyx_dict_version = 0;\
1722     static PyObject *__pyx_dict_cached_value = NULL;\
1723     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1724         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1725         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1726 }
1727 #define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
1728     PY_UINT64_T __pyx_dict_version;\
1729     PyObject *__pyx_dict_cached_value;\
1730     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1731 }
1732 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1733 #else
1734 #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
1735 #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
1736 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1737 #endif
1738 
1739 /* PyCFunctionFastCall.proto */
1740 #if CYTHON_FAST_PYCCALL
1741 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1742 #else
1743 #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
1744 #endif
1745 
1746 /* PyFunctionFastCall.proto */
1747 #if CYTHON_FAST_PYCALL
1748 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1749     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1750 #if 1 || PY_VERSION_HEX < 0x030600B1
1751 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1752 #else
1753 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1754 #endif
1755 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1756     (sizeof(char [1 - 2*!(cond)]) - 1)
1757 #ifndef Py_MEMBER_SIZE
1758 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1759 #endif
1760   static size_t __pyx_pyframe_localsplus_offset = 0;
1761   #include "frameobject.h"
1762   #define __Pxy_PyFrame_Initialize_Offsets()\
1763     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1764      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1765   #define __Pyx_PyFrame_GetLocalsplus(frame)\
1766     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1767 #endif
1768 
1769 /* PyObjectCall2Args.proto */
1770 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1771 
1772 /* PyObjectCallMethO.proto */
1773 #if CYTHON_COMPILING_IN_CPYTHON
1774 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1775 #endif
1776 
1777 /* PyObjectCallOneArg.proto */
1778 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1779 
1780 /* PyObjectCallNoArg.proto */
1781 #if CYTHON_COMPILING_IN_CPYTHON
1782 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1783 #else
1784 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1785 #endif
1786 
1787 /* ExtTypeTest.proto */
1788 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1789 
1790 /* SliceObject.proto */
1791 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
1792         PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1793         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1794         int has_cstart, int has_cstop, int wraparound);
1795 
1796 /* PyObjectSetAttrStr.proto */
1797 #if CYTHON_USE_TYPE_SLOTS
1798 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
1799 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
1800 #else
1801 #define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
1802 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1803 #endif
1804 
1805 /* PySequenceContains.proto */
__Pyx_PySequence_ContainsTF(PyObject * item,PyObject * seq,int eq)1806 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1807     int result = PySequence_Contains(seq, item);
1808     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1809 }
1810 
1811 /* DictGetItem.proto */
1812 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1813 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
1814 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
1815     (likely(PyDict_CheckExact(obj)) ?\
1816      __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
1817 #else
1818 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1819 #define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
1820 #endif
1821 
1822 /* WriteUnraisableException.proto */
1823 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1824                                   int lineno, const char *filename,
1825                                   int full_traceback, int nogil);
1826 
1827 /* None.proto */
1828 static CYTHON_INLINE int __Pyx_div_int(int, int);
1829 
1830 /* UnaryNegOverflows.proto */
1831 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1832         (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1833 
1834 /* Import.proto */
1835 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1836 
1837 /* ImportFrom.proto */
1838 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1839 
1840 /* HasAttr.proto */
1841 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
1842 
1843 /* RaiseTooManyValuesToUnpack.proto */
1844 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1845 
1846 /* RaiseNeedMoreValuesToUnpack.proto */
1847 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1848 
1849 /* RaiseNoneIterError.proto */
1850 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1851 
1852 /* GetTopmostException.proto */
1853 #if CYTHON_USE_EXC_INFO_STACK
1854 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1855 #endif
1856 
1857 /* SaveResetException.proto */
1858 #if CYTHON_FAST_THREAD_STATE
1859 #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1860 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1861 #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1862 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1863 #else
1864 #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
1865 #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
1866 #endif
1867 
1868 /* GetException.proto */
1869 #if CYTHON_FAST_THREAD_STATE
1870 #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
1871 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1872 #else
1873 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1874 #endif
1875 
1876 /* CallNextTpDealloc.proto */
1877 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
1878 
1879 /* CallNextTpTraverse.proto */
1880 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
1881 
1882 /* CallNextTpClear.proto */
1883 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
1884 
1885 /* PyObject_GenericGetAttrNoDict.proto */
1886 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1887 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1888 #else
1889 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1890 #endif
1891 
1892 /* PyObject_GenericGetAttr.proto */
1893 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1894 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1895 #else
1896 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1897 #endif
1898 
1899 /* SetupReduce.proto */
1900 static int __Pyx_setup_reduce(PyObject* type_obj);
1901 
1902 /* TypeImport.proto */
1903 #ifndef __PYX_HAVE_RT_ImportType_proto
1904 #define __PYX_HAVE_RT_ImportType_proto
1905 enum __Pyx_ImportType_CheckSize {
1906    __Pyx_ImportType_CheckSize_Error = 0,
1907    __Pyx_ImportType_CheckSize_Warn = 1,
1908    __Pyx_ImportType_CheckSize_Ignore = 2
1909 };
1910 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1911 #endif
1912 
1913 /* GetVTable.proto */
1914 static void* __Pyx_GetVtable(PyObject *dict);
1915 
1916 /* SetVTable.proto */
1917 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1918 
1919 /* CLineInTraceback.proto */
1920 #ifdef CYTHON_CLINE_IN_TRACEBACK
1921 #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1922 #else
1923 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1924 #endif
1925 
1926 /* CodeObjectCache.proto */
1927 typedef struct {
1928     PyCodeObject* code_object;
1929     int code_line;
1930 } __Pyx_CodeObjectCacheEntry;
1931 struct __Pyx_CodeObjectCache {
1932     int count;
1933     int max_count;
1934     __Pyx_CodeObjectCacheEntry* entries;
1935 };
1936 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1937 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1938 static PyCodeObject *__pyx_find_code_object(int code_line);
1939 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1940 
1941 /* AddTraceback.proto */
1942 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1943                                int py_line, const char *filename);
1944 
1945 /* CIntToPy.proto */
1946 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1947 
1948 /* CIntToPy.proto */
1949 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1950 
1951 /* RealImag.proto */
1952 #if CYTHON_CCOMPLEX
1953   #ifdef __cplusplus
1954     #define __Pyx_CREAL(z) ((z).real())
1955     #define __Pyx_CIMAG(z) ((z).imag())
1956   #else
1957     #define __Pyx_CREAL(z) (__real__(z))
1958     #define __Pyx_CIMAG(z) (__imag__(z))
1959   #endif
1960 #else
1961     #define __Pyx_CREAL(z) ((z).real)
1962     #define __Pyx_CIMAG(z) ((z).imag)
1963 #endif
1964 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1965         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1966     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1967     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1968 #else
1969     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1970     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1971 #endif
1972 
1973 /* Arithmetic.proto */
1974 #if CYTHON_CCOMPLEX
1975     #define __Pyx_c_eq_float(a, b)   ((a)==(b))
1976     #define __Pyx_c_sum_float(a, b)  ((a)+(b))
1977     #define __Pyx_c_diff_float(a, b) ((a)-(b))
1978     #define __Pyx_c_prod_float(a, b) ((a)*(b))
1979     #define __Pyx_c_quot_float(a, b) ((a)/(b))
1980     #define __Pyx_c_neg_float(a)     (-(a))
1981   #ifdef __cplusplus
1982     #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1983     #define __Pyx_c_conj_float(z)    (::std::conj(z))
1984     #if 1
1985         #define __Pyx_c_abs_float(z)     (::std::abs(z))
1986         #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
1987     #endif
1988   #else
1989     #define __Pyx_c_is_zero_float(z) ((z)==0)
1990     #define __Pyx_c_conj_float(z)    (conjf(z))
1991     #if 1
1992         #define __Pyx_c_abs_float(z)     (cabsf(z))
1993         #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
1994     #endif
1995  #endif
1996 #else
1997     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1998     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1999     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2000     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2001     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2002     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2003     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2004     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2005     #if 1
2006         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2007         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2008     #endif
2009 #endif
2010 
2011 /* Arithmetic.proto */
2012 #if CYTHON_CCOMPLEX
2013     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
2014     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
2015     #define __Pyx_c_diff_double(a, b) ((a)-(b))
2016     #define __Pyx_c_prod_double(a, b) ((a)*(b))
2017     #define __Pyx_c_quot_double(a, b) ((a)/(b))
2018     #define __Pyx_c_neg_double(a)     (-(a))
2019   #ifdef __cplusplus
2020     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2021     #define __Pyx_c_conj_double(z)    (::std::conj(z))
2022     #if 1
2023         #define __Pyx_c_abs_double(z)     (::std::abs(z))
2024         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
2025     #endif
2026   #else
2027     #define __Pyx_c_is_zero_double(z) ((z)==0)
2028     #define __Pyx_c_conj_double(z)    (conj(z))
2029     #if 1
2030         #define __Pyx_c_abs_double(z)     (cabs(z))
2031         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
2032     #endif
2033  #endif
2034 #else
2035     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2036     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2037     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2038     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2039     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2040     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2041     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2042     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2043     #if 1
2044         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2045         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2046     #endif
2047 #endif
2048 
2049 /* CIntToPy.proto */
2050 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
2051 
2052 /* CIntFromPy.proto */
2053 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2054 
2055 /* CIntFromPy.proto */
2056 static CYTHON_INLINE hsize_t __Pyx_PyInt_As_hsize_t(PyObject *);
2057 
2058 /* CIntFromPy.proto */
2059 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2060 
2061 /* CIntFromPy.proto */
2062 static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *);
2063 
2064 /* CIntFromPy.proto */
2065 static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *);
2066 
2067 /* CIntFromPy.proto */
2068 static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *);
2069 
2070 /* CIntFromPy.proto */
2071 static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
2072 
2073 /* FastTypeChecks.proto */
2074 #if CYTHON_COMPILING_IN_CPYTHON
2075 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2076 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2077 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2078 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2079 #else
2080 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2081 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2082 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2083 #endif
2084 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2085 
2086 /* CheckBinaryVersion.proto */
2087 static int __Pyx_check_binary_version(void);
2088 
2089 /* InitStrings.proto */
2090 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2091 
2092 static PyObject *__pyx_f_6tables_16indexesextension_10CacheArray_initread(struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self, int __pyx_v_nbounds); /* proto*/
2093 static PyObject *__pyx_f_6tables_16indexesextension_10CacheArray_read_slice(struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self, hsize_t __pyx_v_nrow, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, void *__pyx_v_rbuf); /* proto*/
2094 static void *__pyx_f_6tables_16indexesextension_10IndexArray__g_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, hsize_t __pyx_v_irow, hsize_t __pyx_v_start, hsize_t __pyx_v_stop); /* proto*/
2095 static void *__pyx_f_6tables_16indexesextension_10IndexArray_get_lru_bounds(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, int __pyx_v_nrow, int __pyx_v_nbounds); /* proto*/
2096 static void *__pyx_f_6tables_16indexesextension_10IndexArray_get_lru_sorted(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, int __pyx_v_nrow, int __pyx_v_ncs, int __pyx_v_nchunk, int __pyx_v_cs); /* proto*/
2097 
2098 /* Module declarations from 'cython' */
2099 
2100 /* Module declarations from 'cpython.buffer' */
2101 
2102 /* Module declarations from 'libc.string' */
2103 
2104 /* Module declarations from 'libc.stdio' */
2105 
2106 /* Module declarations from '__builtin__' */
2107 
2108 /* Module declarations from 'cpython.type' */
2109 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2110 
2111 /* Module declarations from 'cpython' */
2112 
2113 /* Module declarations from 'cpython.object' */
2114 
2115 /* Module declarations from 'cpython.ref' */
2116 
2117 /* Module declarations from 'cpython.mem' */
2118 
2119 /* Module declarations from 'numpy' */
2120 
2121 /* Module declarations from 'numpy' */
2122 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2123 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2124 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2125 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2126 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2127 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
2128 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
2129 
2130 /* Module declarations from 'tables.definitions' */
2131 
2132 /* Module declarations from 'tables.hdf5extension' */
2133 static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Node = 0;
2134 static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Leaf = 0;
2135 static PyTypeObject *__pyx_ptype_6tables_13hdf5extension_Array = 0;
2136 
2137 /* Module declarations from 'libc.stdlib' */
2138 
2139 /* Module declarations from 'tables.lrucacheextension' */
2140 static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_NodeCache = 0;
2141 static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_BaseCache = 0;
2142 static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_ObjectNode = 0;
2143 static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_ObjectCache = 0;
2144 static PyTypeObject *__pyx_ptype_6tables_17lrucacheextension_NumCache = 0;
2145 
2146 /* Module declarations from 'tables.indexesextension' */
2147 static PyTypeObject *__pyx_ptype_6tables_16indexesextension_Index = 0;
2148 static PyTypeObject *__pyx_ptype_6tables_16indexesextension_CacheArray = 0;
2149 static PyTypeObject *__pyx_ptype_6tables_16indexesextension_IndexArray = 0;
2150 static PyTypeObject *__pyx_ptype_6tables_16indexesextension_LastRowArray = 0;
2151 static CYTHON_INLINE void __pyx_f_6tables_16indexesextension_swap_bytes(char *, char *, size_t); /*proto*/
2152 static void __pyx_f_6tables_16indexesextension__keysort_string(char *, size_t, char *, size_t, size_t); /*proto*/
2153 static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than(npy_int8 *, npy_int8 *); /*proto*/
2154 static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than(npy_int16 *, npy_int16 *); /*proto*/
2155 static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than(npy_int32 *, npy_int32 *); /*proto*/
2156 static CYTHON_INLINE int __pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than(npy_int64 *, npy_int64 *); /*proto*/
2157 static CYTHON_INLINE int __pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than(npy_uint8 *, npy_uint8 *); /*proto*/
2158 static CYTHON_INLINE int __pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than(npy_uint16 *, npy_uint16 *); /*proto*/
2159 static CYTHON_INLINE int __pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than(npy_uint32 *, npy_uint32 *); /*proto*/
2160 static CYTHON_INLINE int __pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than(npy_uint64 *, npy_uint64 *); /*proto*/
2161 static CYTHON_INLINE int __pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than(npy_float32 *, npy_float32 *); /*proto*/
2162 static CYTHON_INLINE int __pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than(npy_float64 *, npy_float64 *); /*proto*/
2163 static CYTHON_INLINE int __pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than(npy_longdouble *, npy_longdouble *); /*proto*/
2164 static void __pyx_fuse_0__pyx_f_6tables_16indexesextension__keysort(npy_int8 *, char *, size_t, size_t); /*proto*/
2165 static void __pyx_fuse_1__pyx_f_6tables_16indexesextension__keysort(npy_int16 *, char *, size_t, size_t); /*proto*/
2166 static void __pyx_fuse_2__pyx_f_6tables_16indexesextension__keysort(npy_int32 *, char *, size_t, size_t); /*proto*/
2167 static void __pyx_fuse_3__pyx_f_6tables_16indexesextension__keysort(npy_int64 *, char *, size_t, size_t); /*proto*/
2168 static void __pyx_fuse_4__pyx_f_6tables_16indexesextension__keysort(npy_uint8 *, char *, size_t, size_t); /*proto*/
2169 static void __pyx_fuse_5__pyx_f_6tables_16indexesextension__keysort(npy_uint16 *, char *, size_t, size_t); /*proto*/
2170 static void __pyx_fuse_6__pyx_f_6tables_16indexesextension__keysort(npy_uint32 *, char *, size_t, size_t); /*proto*/
2171 static void __pyx_fuse_7__pyx_f_6tables_16indexesextension__keysort(npy_uint64 *, char *, size_t, size_t); /*proto*/
2172 static void __pyx_fuse_8__pyx_f_6tables_16indexesextension__keysort(npy_float32 *, char *, size_t, size_t); /*proto*/
2173 static void __pyx_fuse_9__pyx_f_6tables_16indexesextension__keysort(npy_float64 *, char *, size_t, size_t); /*proto*/
2174 static void __pyx_fuse_10__pyx_f_6tables_16indexesextension__keysort(npy_longdouble *, char *, size_t, size_t); /*proto*/
2175 static PyObject *__pyx_f_6tables_16indexesextension___pyx_unpickle_Index__set_state(struct __pyx_obj_6tables_16indexesextension_Index *, PyObject *); /*proto*/
2176 #define __Pyx_MODULE_NAME "tables.indexesextension"
2177 extern int __pyx_module_is_main_tables__indexesextension;
2178 int __pyx_module_is_main_tables__indexesextension = 0;
2179 
2180 /* Implementation of 'tables.indexesextension' */
2181 static PyObject *__pyx_builtin_ValueError;
2182 static PyObject *__pyx_builtin_range;
2183 static PyObject *__pyx_builtin_super;
2184 static PyObject *__pyx_builtin_TypeError;
2185 static PyObject *__pyx_builtin_RuntimeError;
2186 static PyObject *__pyx_builtin_ImportError;
2187 static const char __pyx_k_a[] = "a";
2188 static const char __pyx_k_x[] = "x";
2189 static const char __pyx_k_hi[] = "hi";
2190 static const char __pyx_k_lo[] = "lo";
2191 static const char __pyx_k_idx[] = "idx";
2192 static const char __pyx_k_mid[] = "mid";
2193 static const char __pyx_k_new[] = "__new__";
2194 static const char __pyx_k_atom[] = "atom";
2195 static const char __pyx_k_dict[] = "__dict__";
2196 static const char __pyx_k_irow[] = "irow";
2197 static const char __pyx_k_main[] = "__main__";
2198 static const char __pyx_k_name[] = "__name__";
2199 static const char __pyx_k_size[] = "size";
2200 static const char __pyx_k_stop[] = "stop";
2201 static const char __pyx_k_test[] = "__test__";
2202 static const char __pyx_k_Index[] = "Index";
2203 static const char __pyx_k_dtype[] = "dtype";
2204 static const char __pyx_k_empty[] = "empty";
2205 static const char __pyx_k_item1[] = "item1";
2206 static const char __pyx_k_item2[] = "item2";
2207 static const char __pyx_k_nrows[] = "nrows";
2208 static const char __pyx_k_numpy[] = "numpy";
2209 static const char __pyx_k_range[] = "range";
2210 static const char __pyx_k_shape[] = "shape";
2211 static const char __pyx_k_start[] = "start";
2212 static const char __pyx_k_super[] = "super";
2213 static const char __pyx_k_array1[] = "array1";
2214 static const char __pyx_k_array2[] = "array2";
2215 static const char __pyx_k_bounds[] = "bounds";
2216 static const char __pyx_k_import[] = "__import__";
2217 static const char __pyx_k_params[] = "params";
2218 static const char __pyx_k_pickle[] = "pickle";
2219 static const char __pyx_k_ranges[] = "ranges";
2220 static const char __pyx_k_reduce[] = "__reduce__";
2221 static const char __pyx_k_sorted[] = "sorted";
2222 static const char __pyx_k_starts[] = "starts";
2223 static const char __pyx_k_update[] = "update";
2224 static const char __pyx_k_v_file[] = "_v_file";
2225 static const char __pyx_k_elsize1[] = "elsize1";
2226 static const char __pyx_k_elsize2[] = "elsize2";
2227 static const char __pyx_k_g_close[] = "_g_close";
2228 static const char __pyx_k_keysort[] = "keysort";
2229 static const char __pyx_k_lengths[] = "lengths";
2230 static const char __pyx_k_rvcache[] = "rvcache";
2231 static const char __pyx_k_getstate[] = "__getstate__";
2232 static const char __pyx_k_itemsize[] = "itemsize";
2233 static const char __pyx_k_pyx_type[] = "__pyx_type";
2234 static const char __pyx_k_setstate[] = "__setstate__";
2235 static const char __pyx_k_type_num[] = "type_num";
2236 static const char __pyx_k_v_parent[] = "_v_parent";
2237 static const char __pyx_k_TypeError[] = "TypeError";
2238 static const char __pyx_k_chunksize[] = "chunksize";
2239 static const char __pyx_k_pyx_state[] = "__pyx_state";
2240 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2241 static const char __pyx_k_slicesize[] = "slicesize";
2242 static const char __pyx_k_CacheArray[] = "CacheArray";
2243 static const char __pyx_k_IndexArray[] = "IndexArray";
2244 static const char __pyx_k_ValueError[] = "ValueError";
2245 static const char __pyx_k_exceptions[] = "exceptions";
2246 static const char __pyx_k_pyx_result[] = "__pyx_result";
2247 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2248 static const char __pyx_k_ImportError[] = "ImportError";
2249 static const char __pyx_k_PickleError[] = "PickleError";
2250 static const char __pyx_k_bisect_left[] = "_bisect_left";
2251 static const char __pyx_k_HDF5ExtError[] = "HDF5ExtError";
2252 static const char __pyx_k_LastRowArray[] = "LastRowArray";
2253 static const char __pyx_k_RuntimeError[] = "RuntimeError";
2254 static const char __pyx_k_bisect_right[] = "_bisect_right";
2255 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
2256 static const char __pyx_k_stringsource[] = "stringsource";
2257 static const char __pyx_k_v_chunkshape[] = "_v_chunkshape";
2258 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2259 static const char __pyx_k_BOUNDS_MAX_SIZE[] = "BOUNDS_MAX_SIZE";
2260 static const char __pyx_k_SORTED_MAX_SIZE[] = "SORTED_MAX_SIZE";
2261 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2262 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2263 static const char __pyx_k_opt_search_types[] = "opt_search_types";
2264 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2265 static const char __pyx_k_pyx_unpickle_Index[] = "__pyx_unpickle_Index";
2266 static const char __pyx_k_non_opt_types_bounds[] = "non-opt types bounds";
2267 static const char __pyx_k_Unknown_array_datatype[] = "Unknown array datatype";
2268 static const char __pyx_k_tables_indexesextension[] = "tables.indexesextension";
2269 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
2270 static const char __pyx_k_tables_indexesextension_pyx[] = "tables/indexesextension.pyx";
2271 static const char __pyx_k_Problems_reading_the_array_data[] = "Problems reading the array data.";
2272 static const char __pyx_k_Problems_reading_the_index_data[] = "Problems reading the index data in Last Row.";
2273 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2274 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
2275 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
2276 static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())";
2277 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
2278 static const char __pyx_k_Problems_initializing_the_bounds[] = "Problems initializing the bounds array data.";
2279 static const char __pyx_k_Problems_reading_the_bounds_arra[] = "Problems reading the bounds array data.";
2280 static const char __pyx_k_Problems_reading_the_index_indic[] = "Problems reading the index indices.";
2281 static const char __pyx_k_cython_interface_for_keeping_ind[] = "cython interface for keeping indexes classes.\n\nClasses (type extensions):\n\n    IndexArray\n    CacheArray\n    LastRowArray\n\nFunctions:\n\n    keysort\n\nMisc variables:\n\n";
2282 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
2283 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2284 static const char __pyx_k_self_dims_self_dims_chunk_self_m[] = "self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling";
2285 static const char __pyx_k_Problems_reading_the_index_data_2[] = "Problems reading the index data.";
2286 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
2287 static const char __pyx_k_self_dims_self_dims_chunk_self_m_2[] = "self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling";
2288 static PyObject *__pyx_n_s_BOUNDS_MAX_SIZE;
2289 static PyObject *__pyx_n_s_CacheArray;
2290 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
2291 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
2292 static PyObject *__pyx_n_s_HDF5ExtError;
2293 static PyObject *__pyx_n_s_ImportError;
2294 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4;
2295 static PyObject *__pyx_n_s_Index;
2296 static PyObject *__pyx_n_s_IndexArray;
2297 static PyObject *__pyx_n_s_LastRowArray;
2298 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
2299 static PyObject *__pyx_n_s_PickleError;
2300 static PyObject *__pyx_kp_s_Problems_initializing_the_bounds;
2301 static PyObject *__pyx_kp_s_Problems_reading_the_array_data;
2302 static PyObject *__pyx_kp_s_Problems_reading_the_bounds_arra;
2303 static PyObject *__pyx_kp_s_Problems_reading_the_index_data;
2304 static PyObject *__pyx_kp_s_Problems_reading_the_index_data_2;
2305 static PyObject *__pyx_kp_s_Problems_reading_the_index_indic;
2306 static PyObject *__pyx_n_s_RuntimeError;
2307 static PyObject *__pyx_n_s_SORTED_MAX_SIZE;
2308 static PyObject *__pyx_n_s_TypeError;
2309 static PyObject *__pyx_kp_s_Unknown_array_datatype;
2310 static PyObject *__pyx_n_s_ValueError;
2311 static PyObject *__pyx_n_s_a;
2312 static PyObject *__pyx_n_s_array1;
2313 static PyObject *__pyx_n_s_array2;
2314 static PyObject *__pyx_n_s_atom;
2315 static PyObject *__pyx_n_s_bisect_left;
2316 static PyObject *__pyx_n_s_bisect_right;
2317 static PyObject *__pyx_n_s_bounds;
2318 static PyObject *__pyx_n_s_chunksize;
2319 static PyObject *__pyx_n_s_cline_in_traceback;
2320 static PyObject *__pyx_n_s_dict;
2321 static PyObject *__pyx_n_s_dtype;
2322 static PyObject *__pyx_n_s_elsize1;
2323 static PyObject *__pyx_n_s_elsize2;
2324 static PyObject *__pyx_n_s_empty;
2325 static PyObject *__pyx_n_s_exceptions;
2326 static PyObject *__pyx_n_s_g_close;
2327 static PyObject *__pyx_n_s_getstate;
2328 static PyObject *__pyx_n_s_hi;
2329 static PyObject *__pyx_n_s_idx;
2330 static PyObject *__pyx_n_s_import;
2331 static PyObject *__pyx_n_s_irow;
2332 static PyObject *__pyx_n_s_item1;
2333 static PyObject *__pyx_n_s_item2;
2334 static PyObject *__pyx_n_s_itemsize;
2335 static PyObject *__pyx_n_s_keysort;
2336 static PyObject *__pyx_n_s_lengths;
2337 static PyObject *__pyx_n_s_lo;
2338 static PyObject *__pyx_n_s_main;
2339 static PyObject *__pyx_n_s_mid;
2340 static PyObject *__pyx_n_s_name;
2341 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
2342 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
2343 static PyObject *__pyx_n_s_new;
2344 static PyObject *__pyx_kp_s_non_opt_types_bounds;
2345 static PyObject *__pyx_n_s_nrows;
2346 static PyObject *__pyx_n_s_numpy;
2347 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2348 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2349 static PyObject *__pyx_n_s_opt_search_types;
2350 static PyObject *__pyx_n_s_params;
2351 static PyObject *__pyx_n_s_pickle;
2352 static PyObject *__pyx_n_s_pyx_PickleError;
2353 static PyObject *__pyx_n_s_pyx_checksum;
2354 static PyObject *__pyx_n_s_pyx_result;
2355 static PyObject *__pyx_n_s_pyx_state;
2356 static PyObject *__pyx_n_s_pyx_type;
2357 static PyObject *__pyx_n_s_pyx_unpickle_Index;
2358 static PyObject *__pyx_n_s_pyx_vtable;
2359 static PyObject *__pyx_n_s_range;
2360 static PyObject *__pyx_n_s_ranges;
2361 static PyObject *__pyx_n_s_reduce;
2362 static PyObject *__pyx_n_s_reduce_cython;
2363 static PyObject *__pyx_n_s_reduce_ex;
2364 static PyObject *__pyx_n_s_rvcache;
2365 static PyObject *__pyx_kp_s_self_dims_self_dims_chunk_self_m;
2366 static PyObject *__pyx_kp_s_self_dims_self_dims_chunk_self_m_2;
2367 static PyObject *__pyx_n_s_setstate;
2368 static PyObject *__pyx_n_s_setstate_cython;
2369 static PyObject *__pyx_n_s_shape;
2370 static PyObject *__pyx_n_s_size;
2371 static PyObject *__pyx_n_s_slicesize;
2372 static PyObject *__pyx_n_s_sorted;
2373 static PyObject *__pyx_n_s_start;
2374 static PyObject *__pyx_n_s_starts;
2375 static PyObject *__pyx_n_s_stop;
2376 static PyObject *__pyx_kp_s_stringsource;
2377 static PyObject *__pyx_n_s_super;
2378 static PyObject *__pyx_n_s_tables_indexesextension;
2379 static PyObject *__pyx_kp_s_tables_indexesextension_pyx;
2380 static PyObject *__pyx_n_s_test;
2381 static PyObject *__pyx_n_s_type_num;
2382 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
2383 static PyObject *__pyx_n_s_update;
2384 static PyObject *__pyx_n_s_v_chunkshape;
2385 static PyObject *__pyx_n_s_v_file;
2386 static PyObject *__pyx_n_s_v_parent;
2387 static PyObject *__pyx_n_s_x;
2388 static PyObject *__pyx_pf_6tables_16indexesextension_keysort(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_array1, PyArrayObject *__pyx_v_array2); /* proto */
2389 static PyObject *__pyx_pf_6tables_16indexesextension_2_bisect_left(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_x, int __pyx_v_hi); /* proto */
2390 static PyObject *__pyx_pf_6tables_16indexesextension_4_bisect_right(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_x, int __pyx_v_hi); /* proto */
2391 static PyObject *__pyx_pf_6tables_16indexesextension_5Index___reduce_cython__(struct __pyx_obj_6tables_16indexesextension_Index *__pyx_v_self); /* proto */
2392 static PyObject *__pyx_pf_6tables_16indexesextension_5Index_2__setstate_cython__(struct __pyx_obj_6tables_16indexesextension_Index *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2393 static PyObject *__pyx_pf_6tables_16indexesextension_10CacheArray__g_close(struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self); /* proto */
2394 static PyObject *__pyx_pf_6tables_16indexesextension_10CacheArray_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self); /* proto */
2395 static PyObject *__pyx_pf_6tables_16indexesextension_10CacheArray_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2396 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray__read_index_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, hsize_t __pyx_v_irow, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, PyArrayObject *__pyx_v_idx); /* proto */
2397 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_2_init_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
2398 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_4_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, hsize_t __pyx_v_irow, hsize_t __pyx_v_start, hsize_t __pyx_v_stop); /* proto */
2399 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_6_search_bin_na_b(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2); /* proto */
2400 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_8_search_bin_na_ub(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2); /* proto */
2401 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_10_search_bin_na_s(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2); /* proto */
2402 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_12_search_bin_na_us(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2); /* proto */
2403 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_14_search_bin_na_i(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2); /* proto */
2404 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_16_search_bin_na_ui(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_uint32 __pyx_v_item1, npy_uint32 __pyx_v_item2); /* proto */
2405 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_18_search_bin_na_ll(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_int64 __pyx_v_item1, npy_int64 __pyx_v_item2); /* proto */
2406 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_20_search_bin_na_ull(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_uint64 __pyx_v_item1, npy_uint64 __pyx_v_item2); /* proto */
2407 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_22_search_bin_na_e(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_float64 __pyx_v_item1, npy_float64 __pyx_v_item2); /* proto */
2408 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_24_search_bin_na_f(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_float64 __pyx_v_item1, npy_float64 __pyx_v_item2); /* proto */
2409 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_26_search_bin_na_d(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_float64 __pyx_v_item1, npy_float64 __pyx_v_item2); /* proto */
2410 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_28_search_bin_na_g(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_longdouble __pyx_v_item1, npy_longdouble __pyx_v_item2); /* proto */
2411 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_30_g_close(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self); /* proto */
2412 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self); /* proto */
2413 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2414 static PyObject *__pyx_pf_6tables_16indexesextension_12LastRowArray__read_index_slice(struct __pyx_obj_6tables_16indexesextension_LastRowArray *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, PyArrayObject *__pyx_v_idx); /* proto */
2415 static PyObject *__pyx_pf_6tables_16indexesextension_12LastRowArray_2_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_LastRowArray *__pyx_v_self, struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_sorted, hsize_t __pyx_v_start, hsize_t __pyx_v_stop); /* proto */
2416 static PyObject *__pyx_pf_6tables_16indexesextension_12LastRowArray_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_LastRowArray *__pyx_v_self); /* proto */
2417 static PyObject *__pyx_pf_6tables_16indexesextension_12LastRowArray_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_LastRowArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2418 static PyObject *__pyx_pf_6tables_16indexesextension_6__pyx_unpickle_Index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
2419 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2420 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
2421 static PyObject *__pyx_tp_new_6tables_16indexesextension_Index(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2422 static PyObject *__pyx_tp_new_6tables_16indexesextension_CacheArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2423 static PyObject *__pyx_tp_new_6tables_16indexesextension_IndexArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2424 static PyObject *__pyx_tp_new_6tables_16indexesextension_LastRowArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2425 static PyObject *__pyx_int_0;
2426 static PyObject *__pyx_int_222419149;
2427 static PyObject *__pyx_tuple_;
2428 static PyObject *__pyx_slice__4;
2429 static PyObject *__pyx_tuple__2;
2430 static PyObject *__pyx_tuple__3;
2431 static PyObject *__pyx_tuple__5;
2432 static PyObject *__pyx_tuple__6;
2433 static PyObject *__pyx_tuple__7;
2434 static PyObject *__pyx_tuple__8;
2435 static PyObject *__pyx_tuple__9;
2436 static PyObject *__pyx_tuple__10;
2437 static PyObject *__pyx_tuple__11;
2438 static PyObject *__pyx_tuple__12;
2439 static PyObject *__pyx_tuple__13;
2440 static PyObject *__pyx_tuple__14;
2441 static PyObject *__pyx_tuple__15;
2442 static PyObject *__pyx_tuple__16;
2443 static PyObject *__pyx_tuple__18;
2444 static PyObject *__pyx_tuple__20;
2445 static PyObject *__pyx_tuple__22;
2446 static PyObject *__pyx_codeobj__17;
2447 static PyObject *__pyx_codeobj__19;
2448 static PyObject *__pyx_codeobj__21;
2449 static PyObject *__pyx_codeobj__23;
2450 /* Late includes */
2451 
2452 /* "tables/indexesextension.pyx":147
2453  * DEF SMALL_QUICKSORT = 15
2454  *
2455  * def keysort(ndarray array1, ndarray array2):             # <<<<<<<<<<<<<<
2456  *     """Sort array1 in-place. array2 is also sorted following the array1 order.
2457  *
2458  */
2459 
2460 /* Python wrapper */
2461 static PyObject *__pyx_pw_6tables_16indexesextension_1keysort(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2462 static char __pyx_doc_6tables_16indexesextension_keysort[] = "Sort array1 in-place. array2 is also sorted following the array1 order.\n\n    array1 can be of any type, except complex or string.  array2 may be made of\n    elements on any size.\n\n    ";
2463 static PyMethodDef __pyx_mdef_6tables_16indexesextension_1keysort = {"keysort", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_1keysort, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_16indexesextension_keysort};
__pyx_pw_6tables_16indexesextension_1keysort(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)2464 static PyObject *__pyx_pw_6tables_16indexesextension_1keysort(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2465   PyArrayObject *__pyx_v_array1 = 0;
2466   PyArrayObject *__pyx_v_array2 = 0;
2467   PyObject *__pyx_r = 0;
2468   __Pyx_RefNannyDeclarations
2469   __Pyx_RefNannySetupContext("keysort (wrapper)", 0);
2470   {
2471     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_array1,&__pyx_n_s_array2,0};
2472     PyObject* values[2] = {0,0};
2473     if (unlikely(__pyx_kwds)) {
2474       Py_ssize_t kw_args;
2475       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2476       switch (pos_args) {
2477         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2478         CYTHON_FALLTHROUGH;
2479         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2480         CYTHON_FALLTHROUGH;
2481         case  0: break;
2482         default: goto __pyx_L5_argtuple_error;
2483       }
2484       kw_args = PyDict_Size(__pyx_kwds);
2485       switch (pos_args) {
2486         case  0:
2487         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_array1)) != 0)) kw_args--;
2488         else goto __pyx_L5_argtuple_error;
2489         CYTHON_FALLTHROUGH;
2490         case  1:
2491         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_array2)) != 0)) kw_args--;
2492         else {
2493           __Pyx_RaiseArgtupleInvalid("keysort", 1, 2, 2, 1); __PYX_ERR(0, 147, __pyx_L3_error)
2494         }
2495       }
2496       if (unlikely(kw_args > 0)) {
2497         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "keysort") < 0)) __PYX_ERR(0, 147, __pyx_L3_error)
2498       }
2499     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
2500       goto __pyx_L5_argtuple_error;
2501     } else {
2502       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2503       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2504     }
2505     __pyx_v_array1 = ((PyArrayObject *)values[0]);
2506     __pyx_v_array2 = ((PyArrayObject *)values[1]);
2507   }
2508   goto __pyx_L4_argument_unpacking_done;
2509   __pyx_L5_argtuple_error:;
2510   __Pyx_RaiseArgtupleInvalid("keysort", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 147, __pyx_L3_error)
2511   __pyx_L3_error:;
2512   __Pyx_AddTraceback("tables.indexesextension.keysort", __pyx_clineno, __pyx_lineno, __pyx_filename);
2513   __Pyx_RefNannyFinishContext();
2514   return NULL;
2515   __pyx_L4_argument_unpacking_done:;
2516   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_array1), __pyx_ptype_5numpy_ndarray, 1, "array1", 0))) __PYX_ERR(0, 147, __pyx_L1_error)
2517   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_array2), __pyx_ptype_5numpy_ndarray, 1, "array2", 0))) __PYX_ERR(0, 147, __pyx_L1_error)
2518   __pyx_r = __pyx_pf_6tables_16indexesextension_keysort(__pyx_self, __pyx_v_array1, __pyx_v_array2);
2519 
2520   /* function exit code */
2521   goto __pyx_L0;
2522   __pyx_L1_error:;
2523   __pyx_r = NULL;
2524   __pyx_L0:;
2525   __Pyx_RefNannyFinishContext();
2526   return __pyx_r;
2527 }
2528 
__pyx_pf_6tables_16indexesextension_keysort(CYTHON_UNUSED PyObject * __pyx_self,PyArrayObject * __pyx_v_array1,PyArrayObject * __pyx_v_array2)2529 static PyObject *__pyx_pf_6tables_16indexesextension_keysort(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_array1, PyArrayObject *__pyx_v_array2) {
2530   size_t __pyx_v_size;
2531   size_t __pyx_v_elsize1;
2532   size_t __pyx_v_elsize2;
2533   int __pyx_v_type_num;
2534   PyObject *__pyx_r = NULL;
2535   __Pyx_RefNannyDeclarations
2536   PyObject *__pyx_t_1 = NULL;
2537   __Pyx_RefNannySetupContext("keysort", 0);
2538 
2539   /* "tables/indexesextension.pyx":154
2540  *
2541  *     """
2542  *     cdef size_t size = cnp.PyArray_SIZE(array1)             # <<<<<<<<<<<<<<
2543  *     cdef size_t elsize1 = cnp.PyArray_ITEMSIZE(array1)
2544  *     cdef size_t elsize2 = cnp.PyArray_ITEMSIZE(array2)
2545  */
2546   __pyx_v_size = PyArray_SIZE(__pyx_v_array1);
2547 
2548   /* "tables/indexesextension.pyx":155
2549  *     """
2550  *     cdef size_t size = cnp.PyArray_SIZE(array1)
2551  *     cdef size_t elsize1 = cnp.PyArray_ITEMSIZE(array1)             # <<<<<<<<<<<<<<
2552  *     cdef size_t elsize2 = cnp.PyArray_ITEMSIZE(array2)
2553  *     cdef int type_num = cnp.PyArray_TYPE(array1)
2554  */
2555   __pyx_v_elsize1 = PyArray_ITEMSIZE(__pyx_v_array1);
2556 
2557   /* "tables/indexesextension.pyx":156
2558  *     cdef size_t size = cnp.PyArray_SIZE(array1)
2559  *     cdef size_t elsize1 = cnp.PyArray_ITEMSIZE(array1)
2560  *     cdef size_t elsize2 = cnp.PyArray_ITEMSIZE(array2)             # <<<<<<<<<<<<<<
2561  *     cdef int type_num = cnp.PyArray_TYPE(array1)
2562  *
2563  */
2564   __pyx_v_elsize2 = PyArray_ITEMSIZE(__pyx_v_array2);
2565 
2566   /* "tables/indexesextension.pyx":157
2567  *     cdef size_t elsize1 = cnp.PyArray_ITEMSIZE(array1)
2568  *     cdef size_t elsize2 = cnp.PyArray_ITEMSIZE(array2)
2569  *     cdef int type_num = cnp.PyArray_TYPE(array1)             # <<<<<<<<<<<<<<
2570  *
2571  *     # floating types
2572  */
2573   __pyx_v_type_num = PyArray_TYPE(__pyx_v_array1);
2574 
2575   /* "tables/indexesextension.pyx":160
2576  *
2577  *     # floating types
2578  *     if type_num == cnp.NPY_FLOAT16:             # <<<<<<<<<<<<<<
2579  *         _keysort[npy_float16](<npy_float16*>array1.data, array2.data, elsize2, size)
2580  *     elif type_num == cnp.NPY_FLOAT32:
2581  */
2582   switch (__pyx_v_type_num) {
2583     case NPY_FLOAT16:
2584 
2585     /* "tables/indexesextension.pyx":161
2586  *     # floating types
2587  *     if type_num == cnp.NPY_FLOAT16:
2588  *         _keysort[npy_float16](<npy_float16*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2589  *     elif type_num == cnp.NPY_FLOAT32:
2590  *         _keysort[npy_float32](<npy_float32*>array1.data, array2.data, elsize2, size)
2591  */
2592     __pyx_fuse_5__pyx_f_6tables_16indexesextension__keysort(((__pyx_t_6tables_16indexesextension_npy_float16 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2593 
2594     /* "tables/indexesextension.pyx":160
2595  *
2596  *     # floating types
2597  *     if type_num == cnp.NPY_FLOAT16:             # <<<<<<<<<<<<<<
2598  *         _keysort[npy_float16](<npy_float16*>array1.data, array2.data, elsize2, size)
2599  *     elif type_num == cnp.NPY_FLOAT32:
2600  */
2601     break;
2602     case NPY_FLOAT32:
2603 
2604     /* "tables/indexesextension.pyx":163
2605  *         _keysort[npy_float16](<npy_float16*>array1.data, array2.data, elsize2, size)
2606  *     elif type_num == cnp.NPY_FLOAT32:
2607  *         _keysort[npy_float32](<npy_float32*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2608  *     elif type_num == cnp.NPY_FLOAT64:
2609  *         _keysort[npy_float64](<npy_float64*>array1.data, array2.data, elsize2, size)
2610  */
2611     __pyx_fuse_8__pyx_f_6tables_16indexesextension__keysort(((npy_float32 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2612 
2613     /* "tables/indexesextension.pyx":162
2614  *     if type_num == cnp.NPY_FLOAT16:
2615  *         _keysort[npy_float16](<npy_float16*>array1.data, array2.data, elsize2, size)
2616  *     elif type_num == cnp.NPY_FLOAT32:             # <<<<<<<<<<<<<<
2617  *         _keysort[npy_float32](<npy_float32*>array1.data, array2.data, elsize2, size)
2618  *     elif type_num == cnp.NPY_FLOAT64:
2619  */
2620     break;
2621     case NPY_FLOAT64:
2622 
2623     /* "tables/indexesextension.pyx":165
2624  *         _keysort[npy_float32](<npy_float32*>array1.data, array2.data, elsize2, size)
2625  *     elif type_num == cnp.NPY_FLOAT64:
2626  *         _keysort[npy_float64](<npy_float64*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2627  *     elif type_num == cnp.NPY_LONGDOUBLE:
2628  *         _keysort[npy_longdouble](<npy_longdouble*>array1.data, array2.data, elsize2, size)
2629  */
2630     __pyx_fuse_9__pyx_f_6tables_16indexesextension__keysort(((npy_float64 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2631 
2632     /* "tables/indexesextension.pyx":164
2633  *     elif type_num == cnp.NPY_FLOAT32:
2634  *         _keysort[npy_float32](<npy_float32*>array1.data, array2.data, elsize2, size)
2635  *     elif type_num == cnp.NPY_FLOAT64:             # <<<<<<<<<<<<<<
2636  *         _keysort[npy_float64](<npy_float64*>array1.data, array2.data, elsize2, size)
2637  *     elif type_num == cnp.NPY_LONGDOUBLE:
2638  */
2639     break;
2640     case NPY_LONGDOUBLE:
2641 
2642     /* "tables/indexesextension.pyx":167
2643  *         _keysort[npy_float64](<npy_float64*>array1.data, array2.data, elsize2, size)
2644  *     elif type_num == cnp.NPY_LONGDOUBLE:
2645  *         _keysort[npy_longdouble](<npy_longdouble*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2646  *     # signed integer types
2647  *     elif type_num == cnp.NPY_INT8:
2648  */
2649     __pyx_fuse_10__pyx_f_6tables_16indexesextension__keysort(((npy_longdouble *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2650 
2651     /* "tables/indexesextension.pyx":166
2652  *     elif type_num == cnp.NPY_FLOAT64:
2653  *         _keysort[npy_float64](<npy_float64*>array1.data, array2.data, elsize2, size)
2654  *     elif type_num == cnp.NPY_LONGDOUBLE:             # <<<<<<<<<<<<<<
2655  *         _keysort[npy_longdouble](<npy_longdouble*>array1.data, array2.data, elsize2, size)
2656  *     # signed integer types
2657  */
2658     break;
2659     case NPY_INT8:
2660 
2661     /* "tables/indexesextension.pyx":170
2662  *     # signed integer types
2663  *     elif type_num == cnp.NPY_INT8:
2664  *         _keysort[npy_int8](<npy_int8*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2665  *     elif type_num == cnp.NPY_INT16:
2666  *         _keysort[npy_int16](<npy_int16*>array1.data, array2.data, elsize2, size)
2667  */
2668     __pyx_fuse_0__pyx_f_6tables_16indexesextension__keysort(((npy_int8 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2669 
2670     /* "tables/indexesextension.pyx":169
2671  *         _keysort[npy_longdouble](<npy_longdouble*>array1.data, array2.data, elsize2, size)
2672  *     # signed integer types
2673  *     elif type_num == cnp.NPY_INT8:             # <<<<<<<<<<<<<<
2674  *         _keysort[npy_int8](<npy_int8*>array1.data, array2.data, elsize2, size)
2675  *     elif type_num == cnp.NPY_INT16:
2676  */
2677     break;
2678     case NPY_INT16:
2679 
2680     /* "tables/indexesextension.pyx":172
2681  *         _keysort[npy_int8](<npy_int8*>array1.data, array2.data, elsize2, size)
2682  *     elif type_num == cnp.NPY_INT16:
2683  *         _keysort[npy_int16](<npy_int16*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2684  *     elif type_num == cnp.NPY_INT32:
2685  *         _keysort[npy_int32](<npy_int32*>array1.data, array2.data, elsize2, size)
2686  */
2687     __pyx_fuse_1__pyx_f_6tables_16indexesextension__keysort(((npy_int16 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2688 
2689     /* "tables/indexesextension.pyx":171
2690  *     elif type_num == cnp.NPY_INT8:
2691  *         _keysort[npy_int8](<npy_int8*>array1.data, array2.data, elsize2, size)
2692  *     elif type_num == cnp.NPY_INT16:             # <<<<<<<<<<<<<<
2693  *         _keysort[npy_int16](<npy_int16*>array1.data, array2.data, elsize2, size)
2694  *     elif type_num == cnp.NPY_INT32:
2695  */
2696     break;
2697     case NPY_INT32:
2698 
2699     /* "tables/indexesextension.pyx":174
2700  *         _keysort[npy_int16](<npy_int16*>array1.data, array2.data, elsize2, size)
2701  *     elif type_num == cnp.NPY_INT32:
2702  *         _keysort[npy_int32](<npy_int32*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2703  *     elif type_num == cnp.NPY_INT64:
2704  *         _keysort[npy_int64](<npy_int64*>array1.data, array2.data, elsize2, size)
2705  */
2706     __pyx_fuse_2__pyx_f_6tables_16indexesextension__keysort(((npy_int32 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2707 
2708     /* "tables/indexesextension.pyx":173
2709  *     elif type_num == cnp.NPY_INT16:
2710  *         _keysort[npy_int16](<npy_int16*>array1.data, array2.data, elsize2, size)
2711  *     elif type_num == cnp.NPY_INT32:             # <<<<<<<<<<<<<<
2712  *         _keysort[npy_int32](<npy_int32*>array1.data, array2.data, elsize2, size)
2713  *     elif type_num == cnp.NPY_INT64:
2714  */
2715     break;
2716     case NPY_INT64:
2717 
2718     /* "tables/indexesextension.pyx":176
2719  *         _keysort[npy_int32](<npy_int32*>array1.data, array2.data, elsize2, size)
2720  *     elif type_num == cnp.NPY_INT64:
2721  *         _keysort[npy_int64](<npy_int64*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2722  *     # unsigned integer types
2723  *     elif type_num == cnp.NPY_UINT8:
2724  */
2725     __pyx_fuse_3__pyx_f_6tables_16indexesextension__keysort(((npy_int64 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2726 
2727     /* "tables/indexesextension.pyx":175
2728  *     elif type_num == cnp.NPY_INT32:
2729  *         _keysort[npy_int32](<npy_int32*>array1.data, array2.data, elsize2, size)
2730  *     elif type_num == cnp.NPY_INT64:             # <<<<<<<<<<<<<<
2731  *         _keysort[npy_int64](<npy_int64*>array1.data, array2.data, elsize2, size)
2732  *     # unsigned integer types
2733  */
2734     break;
2735     case NPY_UINT8:
2736 
2737     /* "tables/indexesextension.pyx":179
2738  *     # unsigned integer types
2739  *     elif type_num == cnp.NPY_UINT8:
2740  *         _keysort[npy_uint8](<npy_uint8*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2741  *     elif type_num == cnp.NPY_UINT16:
2742  *         _keysort[npy_uint16](<npy_uint16*>array1.data, array2.data, elsize2, size)
2743  */
2744     __pyx_fuse_4__pyx_f_6tables_16indexesextension__keysort(((npy_uint8 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2745 
2746     /* "tables/indexesextension.pyx":178
2747  *         _keysort[npy_int64](<npy_int64*>array1.data, array2.data, elsize2, size)
2748  *     # unsigned integer types
2749  *     elif type_num == cnp.NPY_UINT8:             # <<<<<<<<<<<<<<
2750  *         _keysort[npy_uint8](<npy_uint8*>array1.data, array2.data, elsize2, size)
2751  *     elif type_num == cnp.NPY_UINT16:
2752  */
2753     break;
2754     case NPY_UINT16:
2755 
2756     /* "tables/indexesextension.pyx":181
2757  *         _keysort[npy_uint8](<npy_uint8*>array1.data, array2.data, elsize2, size)
2758  *     elif type_num == cnp.NPY_UINT16:
2759  *         _keysort[npy_uint16](<npy_uint16*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2760  *     elif type_num == cnp.NPY_UINT32:
2761  *         _keysort[npy_uint32](<npy_uint32*>array1.data, array2.data, elsize2, size)
2762  */
2763     __pyx_fuse_5__pyx_f_6tables_16indexesextension__keysort(((npy_uint16 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2764 
2765     /* "tables/indexesextension.pyx":180
2766  *     elif type_num == cnp.NPY_UINT8:
2767  *         _keysort[npy_uint8](<npy_uint8*>array1.data, array2.data, elsize2, size)
2768  *     elif type_num == cnp.NPY_UINT16:             # <<<<<<<<<<<<<<
2769  *         _keysort[npy_uint16](<npy_uint16*>array1.data, array2.data, elsize2, size)
2770  *     elif type_num == cnp.NPY_UINT32:
2771  */
2772     break;
2773     case NPY_UINT32:
2774 
2775     /* "tables/indexesextension.pyx":183
2776  *         _keysort[npy_uint16](<npy_uint16*>array1.data, array2.data, elsize2, size)
2777  *     elif type_num == cnp.NPY_UINT32:
2778  *         _keysort[npy_uint32](<npy_uint32*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2779  *     elif type_num == cnp.NPY_UINT64:
2780  *         _keysort[npy_uint64](<npy_uint64*>array1.data, array2.data, elsize2, size)
2781  */
2782     __pyx_fuse_6__pyx_f_6tables_16indexesextension__keysort(((npy_uint32 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2783 
2784     /* "tables/indexesextension.pyx":182
2785  *     elif type_num == cnp.NPY_UINT16:
2786  *         _keysort[npy_uint16](<npy_uint16*>array1.data, array2.data, elsize2, size)
2787  *     elif type_num == cnp.NPY_UINT32:             # <<<<<<<<<<<<<<
2788  *         _keysort[npy_uint32](<npy_uint32*>array1.data, array2.data, elsize2, size)
2789  *     elif type_num == cnp.NPY_UINT64:
2790  */
2791     break;
2792     case NPY_UINT64:
2793 
2794     /* "tables/indexesextension.pyx":185
2795  *         _keysort[npy_uint32](<npy_uint32*>array1.data, array2.data, elsize2, size)
2796  *     elif type_num == cnp.NPY_UINT64:
2797  *         _keysort[npy_uint64](<npy_uint64*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2798  *     # other
2799  *     elif type_num == cnp.NPY_BOOL:
2800  */
2801     __pyx_fuse_7__pyx_f_6tables_16indexesextension__keysort(((npy_uint64 *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2802 
2803     /* "tables/indexesextension.pyx":184
2804  *     elif type_num == cnp.NPY_UINT32:
2805  *         _keysort[npy_uint32](<npy_uint32*>array1.data, array2.data, elsize2, size)
2806  *     elif type_num == cnp.NPY_UINT64:             # <<<<<<<<<<<<<<
2807  *         _keysort[npy_uint64](<npy_uint64*>array1.data, array2.data, elsize2, size)
2808  *     # other
2809  */
2810     break;
2811     case NPY_BOOL:
2812 
2813     /* "tables/indexesextension.pyx":188
2814  *     # other
2815  *     elif type_num == cnp.NPY_BOOL:
2816  *         _keysort[npy_bool](<npy_bool*>array1.data, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2817  *     elif type_num == cnp.NPY_STRING:
2818  *         _keysort_string(array1.data, elsize1, array2.data, elsize2, size)
2819  */
2820     __pyx_fuse_4__pyx_f_6tables_16indexesextension__keysort(((__pyx_t_6tables_16indexesextension_npy_bool *)__pyx_v_array1->data), __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2821 
2822     /* "tables/indexesextension.pyx":187
2823  *         _keysort[npy_uint64](<npy_uint64*>array1.data, array2.data, elsize2, size)
2824  *     # other
2825  *     elif type_num == cnp.NPY_BOOL:             # <<<<<<<<<<<<<<
2826  *         _keysort[npy_bool](<npy_bool*>array1.data, array2.data, elsize2, size)
2827  *     elif type_num == cnp.NPY_STRING:
2828  */
2829     break;
2830     case NPY_STRING:
2831 
2832     /* "tables/indexesextension.pyx":190
2833  *         _keysort[npy_bool](<npy_bool*>array1.data, array2.data, elsize2, size)
2834  *     elif type_num == cnp.NPY_STRING:
2835  *         _keysort_string(array1.data, elsize1, array2.data, elsize2, size)             # <<<<<<<<<<<<<<
2836  *     else:
2837  *         raise ValueError("Unknown array datatype")
2838  */
2839     __pyx_f_6tables_16indexesextension__keysort_string(__pyx_v_array1->data, __pyx_v_elsize1, __pyx_v_array2->data, __pyx_v_elsize2, __pyx_v_size);
2840 
2841     /* "tables/indexesextension.pyx":189
2842  *     elif type_num == cnp.NPY_BOOL:
2843  *         _keysort[npy_bool](<npy_bool*>array1.data, array2.data, elsize2, size)
2844  *     elif type_num == cnp.NPY_STRING:             # <<<<<<<<<<<<<<
2845  *         _keysort_string(array1.data, elsize1, array2.data, elsize2, size)
2846  *     else:
2847  */
2848     break;
2849     default:
2850 
2851     /* "tables/indexesextension.pyx":192
2852  *         _keysort_string(array1.data, elsize1, array2.data, elsize2, size)
2853  *     else:
2854  *         raise ValueError("Unknown array datatype")             # <<<<<<<<<<<<<<
2855  *
2856  *
2857  */
2858     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
2859     __Pyx_GOTREF(__pyx_t_1);
2860     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
2861     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2862     __PYX_ERR(0, 192, __pyx_L1_error)
2863     break;
2864   }
2865 
2866   /* "tables/indexesextension.pyx":147
2867  * DEF SMALL_QUICKSORT = 15
2868  *
2869  * def keysort(ndarray array1, ndarray array2):             # <<<<<<<<<<<<<<
2870  *     """Sort array1 in-place. array2 is also sorted following the array1 order.
2871  *
2872  */
2873 
2874   /* function exit code */
2875   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2876   goto __pyx_L0;
2877   __pyx_L1_error:;
2878   __Pyx_XDECREF(__pyx_t_1);
2879   __Pyx_AddTraceback("tables.indexesextension.keysort", __pyx_clineno, __pyx_lineno, __pyx_filename);
2880   __pyx_r = NULL;
2881   __pyx_L0:;
2882   __Pyx_XGIVEREF(__pyx_r);
2883   __Pyx_RefNannyFinishContext();
2884   return __pyx_r;
2885 }
2886 
2887 /* "tables/indexesextension.pyx":195
2888  *
2889  *
2890  * cdef inline void swap_bytes(char *x, char *y, size_t n) nogil:             # <<<<<<<<<<<<<<
2891  *     if n == 8:
2892  *         (<npy_int64*>x)[0], (<npy_int64*>y)[0] = (<npy_int64*>y)[0], (<npy_int64*>x)[0]
2893  */
2894 
__pyx_f_6tables_16indexesextension_swap_bytes(char * __pyx_v_x,char * __pyx_v_y,size_t __pyx_v_n)2895 static CYTHON_INLINE void __pyx_f_6tables_16indexesextension_swap_bytes(char *__pyx_v_x, char *__pyx_v_y, size_t __pyx_v_n) {
2896   size_t __pyx_v_i;
2897   npy_int64 __pyx_t_1;
2898   npy_int64 __pyx_t_2;
2899   npy_int32 __pyx_t_3;
2900   npy_int32 __pyx_t_4;
2901   npy_int16 __pyx_t_5;
2902   npy_int16 __pyx_t_6;
2903   size_t __pyx_t_7;
2904   size_t __pyx_t_8;
2905   size_t __pyx_t_9;
2906   char __pyx_t_10;
2907   char __pyx_t_11;
2908 
2909   /* "tables/indexesextension.pyx":196
2910  *
2911  * cdef inline void swap_bytes(char *x, char *y, size_t n) nogil:
2912  *     if n == 8:             # <<<<<<<<<<<<<<
2913  *         (<npy_int64*>x)[0], (<npy_int64*>y)[0] = (<npy_int64*>y)[0], (<npy_int64*>x)[0]
2914  *     elif n == 4:
2915  */
2916   switch (__pyx_v_n) {
2917     case 8:
2918 
2919     /* "tables/indexesextension.pyx":197
2920  * cdef inline void swap_bytes(char *x, char *y, size_t n) nogil:
2921  *     if n == 8:
2922  *         (<npy_int64*>x)[0], (<npy_int64*>y)[0] = (<npy_int64*>y)[0], (<npy_int64*>x)[0]             # <<<<<<<<<<<<<<
2923  *     elif n == 4:
2924  *         (<npy_int32*>x)[0], (<npy_int32*>y)[0] = (<npy_int32*>y)[0], (<npy_int32*>x)[0]
2925  */
2926     __pyx_t_1 = (((npy_int64 *)__pyx_v_y)[0]);
2927     __pyx_t_2 = (((npy_int64 *)__pyx_v_x)[0]);
2928     (((npy_int64 *)__pyx_v_x)[0]) = __pyx_t_1;
2929     (((npy_int64 *)__pyx_v_y)[0]) = __pyx_t_2;
2930 
2931     /* "tables/indexesextension.pyx":196
2932  *
2933  * cdef inline void swap_bytes(char *x, char *y, size_t n) nogil:
2934  *     if n == 8:             # <<<<<<<<<<<<<<
2935  *         (<npy_int64*>x)[0], (<npy_int64*>y)[0] = (<npy_int64*>y)[0], (<npy_int64*>x)[0]
2936  *     elif n == 4:
2937  */
2938     break;
2939     case 4:
2940 
2941     /* "tables/indexesextension.pyx":199
2942  *         (<npy_int64*>x)[0], (<npy_int64*>y)[0] = (<npy_int64*>y)[0], (<npy_int64*>x)[0]
2943  *     elif n == 4:
2944  *         (<npy_int32*>x)[0], (<npy_int32*>y)[0] = (<npy_int32*>y)[0], (<npy_int32*>x)[0]             # <<<<<<<<<<<<<<
2945  *     elif n == 2:
2946  *         (<npy_int16*>x)[0], (<npy_int16*>y)[0] = (<npy_int16*>y)[0], (<npy_int16*>x)[0]
2947  */
2948     __pyx_t_3 = (((npy_int32 *)__pyx_v_y)[0]);
2949     __pyx_t_4 = (((npy_int32 *)__pyx_v_x)[0]);
2950     (((npy_int32 *)__pyx_v_x)[0]) = __pyx_t_3;
2951     (((npy_int32 *)__pyx_v_y)[0]) = __pyx_t_4;
2952 
2953     /* "tables/indexesextension.pyx":198
2954  *     if n == 8:
2955  *         (<npy_int64*>x)[0], (<npy_int64*>y)[0] = (<npy_int64*>y)[0], (<npy_int64*>x)[0]
2956  *     elif n == 4:             # <<<<<<<<<<<<<<
2957  *         (<npy_int32*>x)[0], (<npy_int32*>y)[0] = (<npy_int32*>y)[0], (<npy_int32*>x)[0]
2958  *     elif n == 2:
2959  */
2960     break;
2961     case 2:
2962 
2963     /* "tables/indexesextension.pyx":201
2964  *         (<npy_int32*>x)[0], (<npy_int32*>y)[0] = (<npy_int32*>y)[0], (<npy_int32*>x)[0]
2965  *     elif n == 2:
2966  *         (<npy_int16*>x)[0], (<npy_int16*>y)[0] = (<npy_int16*>y)[0], (<npy_int16*>x)[0]             # <<<<<<<<<<<<<<
2967  *     else:
2968  *         for i in range(n):
2969  */
2970     __pyx_t_5 = (((npy_int16 *)__pyx_v_y)[0]);
2971     __pyx_t_6 = (((npy_int16 *)__pyx_v_x)[0]);
2972     (((npy_int16 *)__pyx_v_x)[0]) = __pyx_t_5;
2973     (((npy_int16 *)__pyx_v_y)[0]) = __pyx_t_6;
2974 
2975     /* "tables/indexesextension.pyx":200
2976  *     elif n == 4:
2977  *         (<npy_int32*>x)[0], (<npy_int32*>y)[0] = (<npy_int32*>y)[0], (<npy_int32*>x)[0]
2978  *     elif n == 2:             # <<<<<<<<<<<<<<
2979  *         (<npy_int16*>x)[0], (<npy_int16*>y)[0] = (<npy_int16*>y)[0], (<npy_int16*>x)[0]
2980  *     else:
2981  */
2982     break;
2983     default:
2984 
2985     /* "tables/indexesextension.pyx":203
2986  *         (<npy_int16*>x)[0], (<npy_int16*>y)[0] = (<npy_int16*>y)[0], (<npy_int16*>x)[0]
2987  *     else:
2988  *         for i in range(n):             # <<<<<<<<<<<<<<
2989  *             x[i], y[i] = y[i], x[i]
2990  *
2991  */
2992     __pyx_t_7 = __pyx_v_n;
2993     __pyx_t_8 = __pyx_t_7;
2994     for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
2995       __pyx_v_i = __pyx_t_9;
2996 
2997       /* "tables/indexesextension.pyx":204
2998  *     else:
2999  *         for i in range(n):
3000  *             x[i], y[i] = y[i], x[i]             # <<<<<<<<<<<<<<
3001  *
3002  *
3003  */
3004       __pyx_t_10 = (__pyx_v_y[__pyx_v_i]);
3005       __pyx_t_11 = (__pyx_v_x[__pyx_v_i]);
3006       (__pyx_v_x[__pyx_v_i]) = __pyx_t_10;
3007       (__pyx_v_y[__pyx_v_i]) = __pyx_t_11;
3008     }
3009     break;
3010   }
3011 
3012   /* "tables/indexesextension.pyx":195
3013  *
3014  *
3015  * cdef inline void swap_bytes(char *x, char *y, size_t n) nogil:             # <<<<<<<<<<<<<<
3016  *     if n == 8:
3017  *         (<npy_int64*>x)[0], (<npy_int64*>y)[0] = (<npy_int64*>y)[0], (<npy_int64*>x)[0]
3018  */
3019 
3020   /* function exit code */
3021 }
3022 
3023 /* "tables/indexesextension.pyx":207
3024  *
3025  *
3026  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3027  *     if number_type in floating_type:
3028  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3029  */
3030 
__pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than(npy_int8 * __pyx_v_a,npy_int8 * __pyx_v_b)3031 static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than(npy_int8 *__pyx_v_a, npy_int8 *__pyx_v_b) {
3032   int __pyx_r;
3033 
3034   /* "tables/indexesextension.pyx":211
3035  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3036  *     else:
3037  *         return a[0] < b[0]             # <<<<<<<<<<<<<<
3038  *
3039  *
3040  */
3041   __pyx_r = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3042   goto __pyx_L0;
3043 
3044   /* "tables/indexesextension.pyx":207
3045  *
3046  *
3047  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3048  *     if number_type in floating_type:
3049  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3050  */
3051 
3052   /* function exit code */
3053   __pyx_L0:;
3054   return __pyx_r;
3055 }
3056 
__pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than(npy_int16 * __pyx_v_a,npy_int16 * __pyx_v_b)3057 static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than(npy_int16 *__pyx_v_a, npy_int16 *__pyx_v_b) {
3058   int __pyx_r;
3059 
3060   /* "tables/indexesextension.pyx":211
3061  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3062  *     else:
3063  *         return a[0] < b[0]             # <<<<<<<<<<<<<<
3064  *
3065  *
3066  */
3067   __pyx_r = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3068   goto __pyx_L0;
3069 
3070   /* "tables/indexesextension.pyx":207
3071  *
3072  *
3073  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3074  *     if number_type in floating_type:
3075  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3076  */
3077 
3078   /* function exit code */
3079   __pyx_L0:;
3080   return __pyx_r;
3081 }
3082 
__pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than(npy_int32 * __pyx_v_a,npy_int32 * __pyx_v_b)3083 static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than(npy_int32 *__pyx_v_a, npy_int32 *__pyx_v_b) {
3084   int __pyx_r;
3085 
3086   /* "tables/indexesextension.pyx":211
3087  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3088  *     else:
3089  *         return a[0] < b[0]             # <<<<<<<<<<<<<<
3090  *
3091  *
3092  */
3093   __pyx_r = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3094   goto __pyx_L0;
3095 
3096   /* "tables/indexesextension.pyx":207
3097  *
3098  *
3099  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3100  *     if number_type in floating_type:
3101  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3102  */
3103 
3104   /* function exit code */
3105   __pyx_L0:;
3106   return __pyx_r;
3107 }
3108 
__pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than(npy_int64 * __pyx_v_a,npy_int64 * __pyx_v_b)3109 static CYTHON_INLINE int __pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than(npy_int64 *__pyx_v_a, npy_int64 *__pyx_v_b) {
3110   int __pyx_r;
3111 
3112   /* "tables/indexesextension.pyx":211
3113  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3114  *     else:
3115  *         return a[0] < b[0]             # <<<<<<<<<<<<<<
3116  *
3117  *
3118  */
3119   __pyx_r = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3120   goto __pyx_L0;
3121 
3122   /* "tables/indexesextension.pyx":207
3123  *
3124  *
3125  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3126  *     if number_type in floating_type:
3127  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3128  */
3129 
3130   /* function exit code */
3131   __pyx_L0:;
3132   return __pyx_r;
3133 }
3134 
__pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than(npy_uint8 * __pyx_v_a,npy_uint8 * __pyx_v_b)3135 static CYTHON_INLINE int __pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than(npy_uint8 *__pyx_v_a, npy_uint8 *__pyx_v_b) {
3136   int __pyx_r;
3137 
3138   /* "tables/indexesextension.pyx":211
3139  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3140  *     else:
3141  *         return a[0] < b[0]             # <<<<<<<<<<<<<<
3142  *
3143  *
3144  */
3145   __pyx_r = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3146   goto __pyx_L0;
3147 
3148   /* "tables/indexesextension.pyx":207
3149  *
3150  *
3151  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3152  *     if number_type in floating_type:
3153  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3154  */
3155 
3156   /* function exit code */
3157   __pyx_L0:;
3158   return __pyx_r;
3159 }
3160 
__pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than(npy_uint16 * __pyx_v_a,npy_uint16 * __pyx_v_b)3161 static CYTHON_INLINE int __pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than(npy_uint16 *__pyx_v_a, npy_uint16 *__pyx_v_b) {
3162   int __pyx_r;
3163 
3164   /* "tables/indexesextension.pyx":211
3165  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3166  *     else:
3167  *         return a[0] < b[0]             # <<<<<<<<<<<<<<
3168  *
3169  *
3170  */
3171   __pyx_r = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3172   goto __pyx_L0;
3173 
3174   /* "tables/indexesextension.pyx":207
3175  *
3176  *
3177  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3178  *     if number_type in floating_type:
3179  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3180  */
3181 
3182   /* function exit code */
3183   __pyx_L0:;
3184   return __pyx_r;
3185 }
3186 
__pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than(npy_uint32 * __pyx_v_a,npy_uint32 * __pyx_v_b)3187 static CYTHON_INLINE int __pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than(npy_uint32 *__pyx_v_a, npy_uint32 *__pyx_v_b) {
3188   int __pyx_r;
3189 
3190   /* "tables/indexesextension.pyx":211
3191  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3192  *     else:
3193  *         return a[0] < b[0]             # <<<<<<<<<<<<<<
3194  *
3195  *
3196  */
3197   __pyx_r = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3198   goto __pyx_L0;
3199 
3200   /* "tables/indexesextension.pyx":207
3201  *
3202  *
3203  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3204  *     if number_type in floating_type:
3205  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3206  */
3207 
3208   /* function exit code */
3209   __pyx_L0:;
3210   return __pyx_r;
3211 }
3212 
__pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than(npy_uint64 * __pyx_v_a,npy_uint64 * __pyx_v_b)3213 static CYTHON_INLINE int __pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than(npy_uint64 *__pyx_v_a, npy_uint64 *__pyx_v_b) {
3214   int __pyx_r;
3215 
3216   /* "tables/indexesextension.pyx":211
3217  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3218  *     else:
3219  *         return a[0] < b[0]             # <<<<<<<<<<<<<<
3220  *
3221  *
3222  */
3223   __pyx_r = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3224   goto __pyx_L0;
3225 
3226   /* "tables/indexesextension.pyx":207
3227  *
3228  *
3229  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3230  *     if number_type in floating_type:
3231  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3232  */
3233 
3234   /* function exit code */
3235   __pyx_L0:;
3236   return __pyx_r;
3237 }
3238 
__pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than(npy_float32 * __pyx_v_a,npy_float32 * __pyx_v_b)3239 static CYTHON_INLINE int __pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than(npy_float32 *__pyx_v_a, npy_float32 *__pyx_v_b) {
3240   int __pyx_r;
3241   int __pyx_t_1;
3242   int __pyx_t_2;
3243 
3244   /* "tables/indexesextension.pyx":209
3245  * cdef inline int less_than(number_type* a, number_type* b) nogil:
3246  *     if number_type in floating_type:
3247  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])             # <<<<<<<<<<<<<<
3248  *     else:
3249  *         return a[0] < b[0]
3250  */
3251   __pyx_t_2 = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3252   if (!__pyx_t_2) {
3253   } else {
3254     __pyx_t_1 = __pyx_t_2;
3255     goto __pyx_L3_bool_binop_done;
3256   }
3257   __pyx_t_2 = ((__pyx_v_b[0]) != (__pyx_v_b[0]));
3258   if (__pyx_t_2) {
3259   } else {
3260     __pyx_t_1 = __pyx_t_2;
3261     goto __pyx_L3_bool_binop_done;
3262   }
3263   __pyx_t_2 = ((__pyx_v_a[0]) == (__pyx_v_a[0]));
3264   __pyx_t_1 = __pyx_t_2;
3265   __pyx_L3_bool_binop_done:;
3266   __pyx_r = __pyx_t_1;
3267   goto __pyx_L0;
3268 
3269   /* "tables/indexesextension.pyx":207
3270  *
3271  *
3272  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3273  *     if number_type in floating_type:
3274  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3275  */
3276 
3277   /* function exit code */
3278   __pyx_L0:;
3279   return __pyx_r;
3280 }
3281 
__pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than(npy_float64 * __pyx_v_a,npy_float64 * __pyx_v_b)3282 static CYTHON_INLINE int __pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than(npy_float64 *__pyx_v_a, npy_float64 *__pyx_v_b) {
3283   int __pyx_r;
3284   int __pyx_t_1;
3285   int __pyx_t_2;
3286 
3287   /* "tables/indexesextension.pyx":209
3288  * cdef inline int less_than(number_type* a, number_type* b) nogil:
3289  *     if number_type in floating_type:
3290  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])             # <<<<<<<<<<<<<<
3291  *     else:
3292  *         return a[0] < b[0]
3293  */
3294   __pyx_t_2 = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3295   if (!__pyx_t_2) {
3296   } else {
3297     __pyx_t_1 = __pyx_t_2;
3298     goto __pyx_L3_bool_binop_done;
3299   }
3300   __pyx_t_2 = ((__pyx_v_b[0]) != (__pyx_v_b[0]));
3301   if (__pyx_t_2) {
3302   } else {
3303     __pyx_t_1 = __pyx_t_2;
3304     goto __pyx_L3_bool_binop_done;
3305   }
3306   __pyx_t_2 = ((__pyx_v_a[0]) == (__pyx_v_a[0]));
3307   __pyx_t_1 = __pyx_t_2;
3308   __pyx_L3_bool_binop_done:;
3309   __pyx_r = __pyx_t_1;
3310   goto __pyx_L0;
3311 
3312   /* "tables/indexesextension.pyx":207
3313  *
3314  *
3315  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3316  *     if number_type in floating_type:
3317  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3318  */
3319 
3320   /* function exit code */
3321   __pyx_L0:;
3322   return __pyx_r;
3323 }
3324 
__pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than(npy_longdouble * __pyx_v_a,npy_longdouble * __pyx_v_b)3325 static CYTHON_INLINE int __pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than(npy_longdouble *__pyx_v_a, npy_longdouble *__pyx_v_b) {
3326   int __pyx_r;
3327   int __pyx_t_1;
3328   int __pyx_t_2;
3329 
3330   /* "tables/indexesextension.pyx":209
3331  * cdef inline int less_than(number_type* a, number_type* b) nogil:
3332  *     if number_type in floating_type:
3333  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])             # <<<<<<<<<<<<<<
3334  *     else:
3335  *         return a[0] < b[0]
3336  */
3337   __pyx_t_2 = ((__pyx_v_a[0]) < (__pyx_v_b[0]));
3338   if (!__pyx_t_2) {
3339   } else {
3340     __pyx_t_1 = __pyx_t_2;
3341     goto __pyx_L3_bool_binop_done;
3342   }
3343   __pyx_t_2 = ((__pyx_v_b[0]) != (__pyx_v_b[0]));
3344   if (__pyx_t_2) {
3345   } else {
3346     __pyx_t_1 = __pyx_t_2;
3347     goto __pyx_L3_bool_binop_done;
3348   }
3349   __pyx_t_2 = ((__pyx_v_a[0]) == (__pyx_v_a[0]));
3350   __pyx_t_1 = __pyx_t_2;
3351   __pyx_L3_bool_binop_done:;
3352   __pyx_r = __pyx_t_1;
3353   goto __pyx_L0;
3354 
3355   /* "tables/indexesextension.pyx":207
3356  *
3357  *
3358  * cdef inline int less_than(number_type* a, number_type* b) nogil:             # <<<<<<<<<<<<<<
3359  *     if number_type in floating_type:
3360  *         return a[0] < b[0] or (b[0] != b[0] and a[0] == a[0])
3361  */
3362 
3363   /* function exit code */
3364   __pyx_L0:;
3365   return __pyx_r;
3366 }
3367 
3368 /* "tables/indexesextension.pyx":215
3369  *
3370  * @cython.cdivision(True)
3371  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
3372  *     cdef number_type *pl = start1
3373  *     cdef number_type *pr = start1 + (n - 1)
3374  */
3375 
__pyx_fuse_0__pyx_f_6tables_16indexesextension__keysort(npy_int8 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)3376 static void __pyx_fuse_0__pyx_f_6tables_16indexesextension__keysort(npy_int8 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
3377   npy_int8 *__pyx_v_pl;
3378   npy_int8 *__pyx_v_pr;
3379   char *__pyx_v_ipl;
3380   char *__pyx_v_ipr;
3381   npy_int8 __pyx_v_vp;
3382   char *__pyx_v_ivp;
3383   npy_int8 *__pyx_v_stack[0x64];
3384   npy_int8 **__pyx_v_sptr;
3385   char *__pyx_v_istack[0x64];
3386   char **__pyx_v_isptr;
3387   CYTHON_UNUSED size_t __pyx_v_stack_index;
3388   npy_int8 *__pyx_v_pm;
3389   npy_int8 *__pyx_v_pi;
3390   npy_int8 *__pyx_v_pj;
3391   npy_int8 *__pyx_v_pt;
3392   char *__pyx_v_ipm;
3393   char *__pyx_v_ipi;
3394   char *__pyx_v_ipj;
3395   char *__pyx_v_ipt;
3396   int __pyx_t_1;
3397   npy_int8 __pyx_t_2;
3398   npy_int8 __pyx_t_3;
3399   int __pyx_t_4;
3400 
3401   /* "tables/indexesextension.pyx":216
3402  * @cython.cdivision(True)
3403  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
3404  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
3405  *     cdef number_type *pr = start1 + (n - 1)
3406  *
3407  */
3408   __pyx_v_pl = __pyx_v_start1;
3409 
3410   /* "tables/indexesextension.pyx":217
3411  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
3412  *     cdef number_type *pl = start1
3413  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
3414  *
3415  *     cdef char *ipl = start2
3416  */
3417   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
3418 
3419   /* "tables/indexesextension.pyx":219
3420  *     cdef number_type *pr = start1 + (n - 1)
3421  *
3422  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
3423  *     cdef char *ipr = start2 + (n - 1) * elsize2
3424  *
3425  */
3426   __pyx_v_ipl = __pyx_v_start2;
3427 
3428   /* "tables/indexesextension.pyx":220
3429  *
3430  *     cdef char *ipl = start2
3431  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
3432  *
3433  *     cdef number_type vp
3434  */
3435   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
3436 
3437   /* "tables/indexesextension.pyx":223
3438  *
3439  *     cdef number_type vp
3440  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
3441  *
3442  *     cdef number_type *stack[PYA_QS_STACK]
3443  */
3444   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
3445 
3446   /* "tables/indexesextension.pyx":226
3447  *
3448  *     cdef number_type *stack[PYA_QS_STACK]
3449  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
3450  *
3451  *     cdef char *istack[PYA_QS_STACK]
3452  */
3453   __pyx_v_sptr = __pyx_v_stack;
3454 
3455   /* "tables/indexesextension.pyx":229
3456  *
3457  *     cdef char *istack[PYA_QS_STACK]
3458  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
3459  *
3460  *     cdef size_t stack_index = 0
3461  */
3462   __pyx_v_isptr = __pyx_v_istack;
3463 
3464   /* "tables/indexesextension.pyx":231
3465  *     cdef char **isptr = istack
3466  *
3467  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
3468  *
3469  *     cdef number_type *pm
3470  */
3471   __pyx_v_stack_index = 0;
3472 
3473   /* "tables/indexesextension.pyx":242
3474  *     cdef char *ipt
3475  *
3476  *     while True:             # <<<<<<<<<<<<<<
3477  *         while pr - pl > SMALL_QUICKSORT:
3478  *             pm  = pl + ((pr - pl) >> 1)
3479  */
3480   while (1) {
3481 
3482     /* "tables/indexesextension.pyx":243
3483  *
3484  *     while True:
3485  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
3486  *             pm  = pl + ((pr - pl) >> 1)
3487  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
3488  */
3489     while (1) {
3490       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
3491       if (!__pyx_t_1) break;
3492 
3493       /* "tables/indexesextension.pyx":244
3494  *     while True:
3495  *         while pr - pl > SMALL_QUICKSORT:
3496  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
3497  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
3498  *
3499  */
3500       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
3501 
3502       /* "tables/indexesextension.pyx":245
3503  *         while pr - pl > SMALL_QUICKSORT:
3504  *             pm  = pl + ((pr - pl) >> 1)
3505  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
3506  *
3507  *             if less_than(pm, pl):
3508  */
3509       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
3510 
3511       /* "tables/indexesextension.pyx":247
3512  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
3513  *
3514  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
3515  *                 pm[0], pl[0] =  pl[0], pm[0]
3516  *                 swap_bytes(ipm, ipl, elsize2)
3517  */
3518       __pyx_t_1 = (__pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
3519       if (__pyx_t_1) {
3520 
3521         /* "tables/indexesextension.pyx":248
3522  *
3523  *             if less_than(pm, pl):
3524  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
3525  *                 swap_bytes(ipm, ipl, elsize2)
3526  *
3527  */
3528         __pyx_t_2 = (__pyx_v_pl[0]);
3529         __pyx_t_3 = (__pyx_v_pm[0]);
3530         (__pyx_v_pm[0]) = __pyx_t_2;
3531         (__pyx_v_pl[0]) = __pyx_t_3;
3532 
3533         /* "tables/indexesextension.pyx":249
3534  *             if less_than(pm, pl):
3535  *                 pm[0], pl[0] =  pl[0], pm[0]
3536  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
3537  *
3538  *             if less_than(pr, pm):
3539  */
3540         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
3541 
3542         /* "tables/indexesextension.pyx":247
3543  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
3544  *
3545  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
3546  *                 pm[0], pl[0] =  pl[0], pm[0]
3547  *                 swap_bytes(ipm, ipl, elsize2)
3548  */
3549       }
3550 
3551       /* "tables/indexesextension.pyx":251
3552  *                 swap_bytes(ipm, ipl, elsize2)
3553  *
3554  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
3555  *                 pr[0], pm[0] =  pm[0], pr[0]
3556  *                 swap_bytes(ipr, ipm, elsize2)
3557  */
3558       __pyx_t_1 = (__pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
3559       if (__pyx_t_1) {
3560 
3561         /* "tables/indexesextension.pyx":252
3562  *
3563  *             if less_than(pr, pm):
3564  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
3565  *                 swap_bytes(ipr, ipm, elsize2)
3566  *
3567  */
3568         __pyx_t_3 = (__pyx_v_pm[0]);
3569         __pyx_t_2 = (__pyx_v_pr[0]);
3570         (__pyx_v_pr[0]) = __pyx_t_3;
3571         (__pyx_v_pm[0]) = __pyx_t_2;
3572 
3573         /* "tables/indexesextension.pyx":253
3574  *             if less_than(pr, pm):
3575  *                 pr[0], pm[0] =  pm[0], pr[0]
3576  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
3577  *
3578  *             if less_than(pm, pl):
3579  */
3580         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
3581 
3582         /* "tables/indexesextension.pyx":251
3583  *                 swap_bytes(ipm, ipl, elsize2)
3584  *
3585  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
3586  *                 pr[0], pm[0] =  pm[0], pr[0]
3587  *                 swap_bytes(ipr, ipm, elsize2)
3588  */
3589       }
3590 
3591       /* "tables/indexesextension.pyx":255
3592  *                 swap_bytes(ipr, ipm, elsize2)
3593  *
3594  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
3595  *                 pm[0], pl[0] =  pl[0], pm[0]
3596  *                 swap_bytes(ipm, ipl, elsize2)
3597  */
3598       __pyx_t_1 = (__pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
3599       if (__pyx_t_1) {
3600 
3601         /* "tables/indexesextension.pyx":256
3602  *
3603  *             if less_than(pm, pl):
3604  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
3605  *                 swap_bytes(ipm, ipl, elsize2)
3606  *
3607  */
3608         __pyx_t_2 = (__pyx_v_pl[0]);
3609         __pyx_t_3 = (__pyx_v_pm[0]);
3610         (__pyx_v_pm[0]) = __pyx_t_2;
3611         (__pyx_v_pl[0]) = __pyx_t_3;
3612 
3613         /* "tables/indexesextension.pyx":257
3614  *             if less_than(pm, pl):
3615  *                 pm[0], pl[0] =  pl[0], pm[0]
3616  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
3617  *
3618  *             vp = pm[0]
3619  */
3620         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
3621 
3622         /* "tables/indexesextension.pyx":255
3623  *                 swap_bytes(ipr, ipm, elsize2)
3624  *
3625  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
3626  *                 pm[0], pl[0] =  pl[0], pm[0]
3627  *                 swap_bytes(ipm, ipl, elsize2)
3628  */
3629       }
3630 
3631       /* "tables/indexesextension.pyx":259
3632  *                 swap_bytes(ipm, ipl, elsize2)
3633  *
3634  *             vp = pm[0]             # <<<<<<<<<<<<<<
3635  *
3636  *             pi = pl
3637  */
3638       __pyx_v_vp = (__pyx_v_pm[0]);
3639 
3640       /* "tables/indexesextension.pyx":261
3641  *             vp = pm[0]
3642  *
3643  *             pi = pl             # <<<<<<<<<<<<<<
3644  *             ipi = ipl
3645  *
3646  */
3647       __pyx_v_pi = __pyx_v_pl;
3648 
3649       /* "tables/indexesextension.pyx":262
3650  *
3651  *             pi = pl
3652  *             ipi = ipl             # <<<<<<<<<<<<<<
3653  *
3654  *             pj = pr - 1
3655  */
3656       __pyx_v_ipi = __pyx_v_ipl;
3657 
3658       /* "tables/indexesextension.pyx":264
3659  *             ipi = ipl
3660  *
3661  *             pj = pr - 1             # <<<<<<<<<<<<<<
3662  *             ipj = ipr - elsize2
3663  *
3664  */
3665       __pyx_v_pj = (__pyx_v_pr - 1);
3666 
3667       /* "tables/indexesextension.pyx":265
3668  *
3669  *             pj = pr - 1
3670  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
3671  *
3672  *             pm[0], pj[0] = pj[0], pm[0]
3673  */
3674       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
3675 
3676       /* "tables/indexesextension.pyx":267
3677  *             ipj = ipr - elsize2
3678  *
3679  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
3680  *             swap_bytes(ipm, ipj, elsize2)
3681  *
3682  */
3683       __pyx_t_3 = (__pyx_v_pj[0]);
3684       __pyx_t_2 = (__pyx_v_pm[0]);
3685       (__pyx_v_pm[0]) = __pyx_t_3;
3686       (__pyx_v_pj[0]) = __pyx_t_2;
3687 
3688       /* "tables/indexesextension.pyx":268
3689  *
3690  *             pm[0], pj[0] = pj[0], pm[0]
3691  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
3692  *
3693  *             while True:
3694  */
3695       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
3696 
3697       /* "tables/indexesextension.pyx":270
3698  *             swap_bytes(ipm, ipj, elsize2)
3699  *
3700  *             while True:             # <<<<<<<<<<<<<<
3701  *                 pi += 1
3702  *                 ipi += elsize2
3703  */
3704       while (1) {
3705 
3706         /* "tables/indexesextension.pyx":271
3707  *
3708  *             while True:
3709  *                 pi += 1             # <<<<<<<<<<<<<<
3710  *                 ipi += elsize2
3711  *                 while less_than(pi, &vp):
3712  */
3713         __pyx_v_pi = (__pyx_v_pi + 1);
3714 
3715         /* "tables/indexesextension.pyx":272
3716  *             while True:
3717  *                 pi += 1
3718  *                 ipi += elsize2             # <<<<<<<<<<<<<<
3719  *                 while less_than(pi, &vp):
3720  *                     pi += 1
3721  */
3722         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
3723 
3724         /* "tables/indexesextension.pyx":273
3725  *                 pi += 1
3726  *                 ipi += elsize2
3727  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
3728  *                     pi += 1
3729  *                     ipi += elsize2
3730  */
3731         while (1) {
3732           __pyx_t_1 = (__pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
3733           if (!__pyx_t_1) break;
3734 
3735           /* "tables/indexesextension.pyx":274
3736  *                 ipi += elsize2
3737  *                 while less_than(pi, &vp):
3738  *                     pi += 1             # <<<<<<<<<<<<<<
3739  *                     ipi += elsize2
3740  *
3741  */
3742           __pyx_v_pi = (__pyx_v_pi + 1);
3743 
3744           /* "tables/indexesextension.pyx":275
3745  *                 while less_than(pi, &vp):
3746  *                     pi += 1
3747  *                     ipi += elsize2             # <<<<<<<<<<<<<<
3748  *
3749  *                 pj -= 1
3750  */
3751           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
3752         }
3753 
3754         /* "tables/indexesextension.pyx":277
3755  *                     ipi += elsize2
3756  *
3757  *                 pj -= 1             # <<<<<<<<<<<<<<
3758  *                 ipj -= elsize2
3759  *                 while less_than(&vp, pj):
3760  */
3761         __pyx_v_pj = (__pyx_v_pj - 1);
3762 
3763         /* "tables/indexesextension.pyx":278
3764  *
3765  *                 pj -= 1
3766  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
3767  *                 while less_than(&vp, pj):
3768  *                     pj -= 1
3769  */
3770         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
3771 
3772         /* "tables/indexesextension.pyx":279
3773  *                 pj -= 1
3774  *                 ipj -= elsize2
3775  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
3776  *                     pj -= 1
3777  *                     ipj -= elsize2
3778  */
3779         while (1) {
3780           __pyx_t_1 = (__pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
3781           if (!__pyx_t_1) break;
3782 
3783           /* "tables/indexesextension.pyx":280
3784  *                 ipj -= elsize2
3785  *                 while less_than(&vp, pj):
3786  *                     pj -= 1             # <<<<<<<<<<<<<<
3787  *                     ipj -= elsize2
3788  *
3789  */
3790           __pyx_v_pj = (__pyx_v_pj - 1);
3791 
3792           /* "tables/indexesextension.pyx":281
3793  *                 while less_than(&vp, pj):
3794  *                     pj -= 1
3795  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
3796  *
3797  *                 if pi >= pj:
3798  */
3799           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
3800         }
3801 
3802         /* "tables/indexesextension.pyx":283
3803  *                     ipj -= elsize2
3804  *
3805  *                 if pi >= pj:             # <<<<<<<<<<<<<<
3806  *                     break
3807  *
3808  */
3809         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
3810         if (__pyx_t_1) {
3811 
3812           /* "tables/indexesextension.pyx":284
3813  *
3814  *                 if pi >= pj:
3815  *                     break             # <<<<<<<<<<<<<<
3816  *
3817  *                 pi[0], pj[0] = pj[0], pi[0]
3818  */
3819           goto __pyx_L11_break;
3820 
3821           /* "tables/indexesextension.pyx":283
3822  *                     ipj -= elsize2
3823  *
3824  *                 if pi >= pj:             # <<<<<<<<<<<<<<
3825  *                     break
3826  *
3827  */
3828         }
3829 
3830         /* "tables/indexesextension.pyx":286
3831  *                     break
3832  *
3833  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
3834  *                 swap_bytes(ipi, ipj, elsize2)
3835  *
3836  */
3837         __pyx_t_2 = (__pyx_v_pj[0]);
3838         __pyx_t_3 = (__pyx_v_pi[0]);
3839         (__pyx_v_pi[0]) = __pyx_t_2;
3840         (__pyx_v_pj[0]) = __pyx_t_3;
3841 
3842         /* "tables/indexesextension.pyx":287
3843  *
3844  *                 pi[0], pj[0] = pj[0], pi[0]
3845  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
3846  *
3847  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
3848  */
3849         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
3850       }
3851       __pyx_L11_break:;
3852 
3853       /* "tables/indexesextension.pyx":289
3854  *                 swap_bytes(ipi, ipj, elsize2)
3855  *
3856  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
3857  *             swap_bytes(ipi, ipr-elsize2, elsize2)
3858  *
3859  */
3860       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
3861       __pyx_t_2 = (__pyx_v_pi[0]);
3862       (__pyx_v_pi[0]) = __pyx_t_3;
3863       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
3864 
3865       /* "tables/indexesextension.pyx":290
3866  *
3867  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
3868  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
3869  *
3870  *             # push largest partition on stack and proceed with the other
3871  */
3872       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
3873 
3874       /* "tables/indexesextension.pyx":293
3875  *
3876  *             # push largest partition on stack and proceed with the other
3877  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
3878  *                 sptr[0] = pi + 1
3879  *                 sptr[1] = pr
3880  */
3881       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
3882       if (__pyx_t_1) {
3883 
3884         /* "tables/indexesextension.pyx":294
3885  *             # push largest partition on stack and proceed with the other
3886  *             if (pi - pl) < (pr - pi):
3887  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
3888  *                 sptr[1] = pr
3889  *                 sptr += 2
3890  */
3891         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
3892 
3893         /* "tables/indexesextension.pyx":295
3894  *             if (pi - pl) < (pr - pi):
3895  *                 sptr[0] = pi + 1
3896  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
3897  *                 sptr += 2
3898  *
3899  */
3900         (__pyx_v_sptr[1]) = __pyx_v_pr;
3901 
3902         /* "tables/indexesextension.pyx":296
3903  *                 sptr[0] = pi + 1
3904  *                 sptr[1] = pr
3905  *                 sptr += 2             # <<<<<<<<<<<<<<
3906  *
3907  *                 isptr[0] = ipi + elsize2
3908  */
3909         __pyx_v_sptr = (__pyx_v_sptr + 2);
3910 
3911         /* "tables/indexesextension.pyx":298
3912  *                 sptr += 2
3913  *
3914  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
3915  *                 isptr[1] = ipr
3916  *                 isptr += 2
3917  */
3918         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
3919 
3920         /* "tables/indexesextension.pyx":299
3921  *
3922  *                 isptr[0] = ipi + elsize2
3923  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
3924  *                 isptr += 2
3925  *
3926  */
3927         (__pyx_v_isptr[1]) = __pyx_v_ipr;
3928 
3929         /* "tables/indexesextension.pyx":300
3930  *                 isptr[0] = ipi + elsize2
3931  *                 isptr[1] = ipr
3932  *                 isptr += 2             # <<<<<<<<<<<<<<
3933  *
3934  *                 pr = pi - 1
3935  */
3936         __pyx_v_isptr = (__pyx_v_isptr + 2);
3937 
3938         /* "tables/indexesextension.pyx":302
3939  *                 isptr += 2
3940  *
3941  *                 pr = pi - 1             # <<<<<<<<<<<<<<
3942  *                 ipr = ipi - elsize2
3943  *             else:
3944  */
3945         __pyx_v_pr = (__pyx_v_pi - 1);
3946 
3947         /* "tables/indexesextension.pyx":303
3948  *
3949  *                 pr = pi - 1
3950  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
3951  *             else:
3952  *                 sptr[0] = pl
3953  */
3954         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
3955 
3956         /* "tables/indexesextension.pyx":293
3957  *
3958  *             # push largest partition on stack and proceed with the other
3959  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
3960  *                 sptr[0] = pi + 1
3961  *                 sptr[1] = pr
3962  */
3963         goto __pyx_L17;
3964       }
3965 
3966       /* "tables/indexesextension.pyx":305
3967  *                 ipr = ipi - elsize2
3968  *             else:
3969  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
3970  *                 sptr[1] = pi - 1
3971  *                 sptr += 2
3972  */
3973       /*else*/ {
3974         (__pyx_v_sptr[0]) = __pyx_v_pl;
3975 
3976         /* "tables/indexesextension.pyx":306
3977  *             else:
3978  *                 sptr[0] = pl
3979  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
3980  *                 sptr += 2
3981  *
3982  */
3983         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
3984 
3985         /* "tables/indexesextension.pyx":307
3986  *                 sptr[0] = pl
3987  *                 sptr[1] = pi - 1
3988  *                 sptr += 2             # <<<<<<<<<<<<<<
3989  *
3990  *                 isptr[0] = ipl
3991  */
3992         __pyx_v_sptr = (__pyx_v_sptr + 2);
3993 
3994         /* "tables/indexesextension.pyx":309
3995  *                 sptr += 2
3996  *
3997  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
3998  *                 isptr[1] = ipi - elsize2
3999  *                 isptr += 2
4000  */
4001         (__pyx_v_isptr[0]) = __pyx_v_ipl;
4002 
4003         /* "tables/indexesextension.pyx":310
4004  *
4005  *                 isptr[0] = ipl
4006  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
4007  *                 isptr += 2
4008  *
4009  */
4010         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
4011 
4012         /* "tables/indexesextension.pyx":311
4013  *                 isptr[0] = ipl
4014  *                 isptr[1] = ipi - elsize2
4015  *                 isptr += 2             # <<<<<<<<<<<<<<
4016  *
4017  *                 pl = pi + 1
4018  */
4019         __pyx_v_isptr = (__pyx_v_isptr + 2);
4020 
4021         /* "tables/indexesextension.pyx":313
4022  *                 isptr += 2
4023  *
4024  *                 pl = pi + 1             # <<<<<<<<<<<<<<
4025  *                 ipl = ipi + elsize2
4026  *
4027  */
4028         __pyx_v_pl = (__pyx_v_pi + 1);
4029 
4030         /* "tables/indexesextension.pyx":314
4031  *
4032  *                 pl = pi + 1
4033  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
4034  *
4035  *         pi = pl + 1
4036  */
4037         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
4038       }
4039       __pyx_L17:;
4040     }
4041 
4042     /* "tables/indexesextension.pyx":316
4043  *                 ipl = ipi + elsize2
4044  *
4045  *         pi = pl + 1             # <<<<<<<<<<<<<<
4046  *         ipi = ipl + elsize2
4047  *         while pi <= pr:
4048  */
4049     __pyx_v_pi = (__pyx_v_pl + 1);
4050 
4051     /* "tables/indexesextension.pyx":317
4052  *
4053  *         pi = pl + 1
4054  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
4055  *         while pi <= pr:
4056  *             vp = pi[0]
4057  */
4058     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
4059 
4060     /* "tables/indexesextension.pyx":318
4061  *         pi = pl + 1
4062  *         ipi = ipl + elsize2
4063  *         while pi <= pr:             # <<<<<<<<<<<<<<
4064  *             vp = pi[0]
4065  *             memcpy(ivp, ipi, elsize2)
4066  */
4067     while (1) {
4068       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
4069       if (!__pyx_t_1) break;
4070 
4071       /* "tables/indexesextension.pyx":319
4072  *         ipi = ipl + elsize2
4073  *         while pi <= pr:
4074  *             vp = pi[0]             # <<<<<<<<<<<<<<
4075  *             memcpy(ivp, ipi, elsize2)
4076  *
4077  */
4078       __pyx_v_vp = (__pyx_v_pi[0]);
4079 
4080       /* "tables/indexesextension.pyx":320
4081  *         while pi <= pr:
4082  *             vp = pi[0]
4083  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
4084  *
4085  *             pj = pi
4086  */
4087       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
4088 
4089       /* "tables/indexesextension.pyx":322
4090  *             memcpy(ivp, ipi, elsize2)
4091  *
4092  *             pj = pi             # <<<<<<<<<<<<<<
4093  *             pt = pi - 1
4094  *
4095  */
4096       __pyx_v_pj = __pyx_v_pi;
4097 
4098       /* "tables/indexesextension.pyx":323
4099  *
4100  *             pj = pi
4101  *             pt = pi - 1             # <<<<<<<<<<<<<<
4102  *
4103  *             ipj = ipi
4104  */
4105       __pyx_v_pt = (__pyx_v_pi - 1);
4106 
4107       /* "tables/indexesextension.pyx":325
4108  *             pt = pi - 1
4109  *
4110  *             ipj = ipi             # <<<<<<<<<<<<<<
4111  *             ipt = ipi - elsize2
4112  *
4113  */
4114       __pyx_v_ipj = __pyx_v_ipi;
4115 
4116       /* "tables/indexesextension.pyx":326
4117  *
4118  *             ipj = ipi
4119  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
4120  *
4121  *             while pj > pl and less_than(&vp, pt):
4122  */
4123       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
4124 
4125       /* "tables/indexesextension.pyx":328
4126  *             ipt = ipi - elsize2
4127  *
4128  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
4129  *                 pj[0] = pt[0]
4130  *                 pj -= 1
4131  */
4132       while (1) {
4133         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
4134         if (__pyx_t_4) {
4135         } else {
4136           __pyx_t_1 = __pyx_t_4;
4137           goto __pyx_L22_bool_binop_done;
4138         }
4139         __pyx_t_4 = (__pyx_fuse_0__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
4140         __pyx_t_1 = __pyx_t_4;
4141         __pyx_L22_bool_binop_done:;
4142         if (!__pyx_t_1) break;
4143 
4144         /* "tables/indexesextension.pyx":329
4145  *
4146  *             while pj > pl and less_than(&vp, pt):
4147  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
4148  *                 pj -= 1
4149  *                 pt -= 1
4150  */
4151         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
4152 
4153         /* "tables/indexesextension.pyx":330
4154  *             while pj > pl and less_than(&vp, pt):
4155  *                 pj[0] = pt[0]
4156  *                 pj -= 1             # <<<<<<<<<<<<<<
4157  *                 pt -= 1
4158  *
4159  */
4160         __pyx_v_pj = (__pyx_v_pj - 1);
4161 
4162         /* "tables/indexesextension.pyx":331
4163  *                 pj[0] = pt[0]
4164  *                 pj -= 1
4165  *                 pt -= 1             # <<<<<<<<<<<<<<
4166  *
4167  *                 memcpy(ipj, ipt, elsize2)
4168  */
4169         __pyx_v_pt = (__pyx_v_pt - 1);
4170 
4171         /* "tables/indexesextension.pyx":333
4172  *                 pt -= 1
4173  *
4174  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
4175  *                 ipj -= elsize2
4176  *                 ipt -= elsize2
4177  */
4178         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
4179 
4180         /* "tables/indexesextension.pyx":334
4181  *
4182  *                 memcpy(ipj, ipt, elsize2)
4183  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
4184  *                 ipt -= elsize2
4185  *
4186  */
4187         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
4188 
4189         /* "tables/indexesextension.pyx":335
4190  *                 memcpy(ipj, ipt, elsize2)
4191  *                 ipj -= elsize2
4192  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
4193  *
4194  *             pj[0] = vp
4195  */
4196         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
4197       }
4198 
4199       /* "tables/indexesextension.pyx":337
4200  *                 ipt -= elsize2
4201  *
4202  *             pj[0] = vp             # <<<<<<<<<<<<<<
4203  *             memcpy(ipj, ivp, elsize2)
4204  *
4205  */
4206       (__pyx_v_pj[0]) = __pyx_v_vp;
4207 
4208       /* "tables/indexesextension.pyx":338
4209  *
4210  *             pj[0] = vp
4211  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
4212  *
4213  *             pi += 1
4214  */
4215       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
4216 
4217       /* "tables/indexesextension.pyx":340
4218  *             memcpy(ipj, ivp, elsize2)
4219  *
4220  *             pi += 1             # <<<<<<<<<<<<<<
4221  *             ipi += elsize2
4222  *
4223  */
4224       __pyx_v_pi = (__pyx_v_pi + 1);
4225 
4226       /* "tables/indexesextension.pyx":341
4227  *
4228  *             pi += 1
4229  *             ipi += elsize2             # <<<<<<<<<<<<<<
4230  *
4231  *         if sptr == stack:
4232  */
4233       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
4234     }
4235 
4236     /* "tables/indexesextension.pyx":343
4237  *             ipi += elsize2
4238  *
4239  *         if sptr == stack:             # <<<<<<<<<<<<<<
4240  *             break
4241  *
4242  */
4243     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
4244     if (__pyx_t_1) {
4245 
4246       /* "tables/indexesextension.pyx":344
4247  *
4248  *         if sptr == stack:
4249  *             break             # <<<<<<<<<<<<<<
4250  *
4251  *         sptr -= 2
4252  */
4253       goto __pyx_L4_break;
4254 
4255       /* "tables/indexesextension.pyx":343
4256  *             ipi += elsize2
4257  *
4258  *         if sptr == stack:             # <<<<<<<<<<<<<<
4259  *             break
4260  *
4261  */
4262     }
4263 
4264     /* "tables/indexesextension.pyx":346
4265  *             break
4266  *
4267  *         sptr -= 2             # <<<<<<<<<<<<<<
4268  *         pl = sptr[0]
4269  *         pr = sptr[1]
4270  */
4271     __pyx_v_sptr = (__pyx_v_sptr - 2);
4272 
4273     /* "tables/indexesextension.pyx":347
4274  *
4275  *         sptr -= 2
4276  *         pl = sptr[0]             # <<<<<<<<<<<<<<
4277  *         pr = sptr[1]
4278  *
4279  */
4280     __pyx_v_pl = (__pyx_v_sptr[0]);
4281 
4282     /* "tables/indexesextension.pyx":348
4283  *         sptr -= 2
4284  *         pl = sptr[0]
4285  *         pr = sptr[1]             # <<<<<<<<<<<<<<
4286  *
4287  *         isptr -= 2
4288  */
4289     __pyx_v_pr = (__pyx_v_sptr[1]);
4290 
4291     /* "tables/indexesextension.pyx":350
4292  *         pr = sptr[1]
4293  *
4294  *         isptr -= 2             # <<<<<<<<<<<<<<
4295  *         ipl = isptr[0]
4296  *         ipr = isptr[1]
4297  */
4298     __pyx_v_isptr = (__pyx_v_isptr - 2);
4299 
4300     /* "tables/indexesextension.pyx":351
4301  *
4302  *         isptr -= 2
4303  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
4304  *         ipr = isptr[1]
4305  *
4306  */
4307     __pyx_v_ipl = (__pyx_v_isptr[0]);
4308 
4309     /* "tables/indexesextension.pyx":352
4310  *         isptr -= 2
4311  *         ipl = isptr[0]
4312  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
4313  *
4314  *     free(ivp)
4315  */
4316     __pyx_v_ipr = (__pyx_v_isptr[1]);
4317   }
4318   __pyx_L4_break:;
4319 
4320   /* "tables/indexesextension.pyx":354
4321  *         ipr = isptr[1]
4322  *
4323  *     free(ivp)             # <<<<<<<<<<<<<<
4324  *
4325  *
4326  */
4327   free(__pyx_v_ivp);
4328 
4329   /* "tables/indexesextension.pyx":215
4330  *
4331  * @cython.cdivision(True)
4332  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
4333  *     cdef number_type *pl = start1
4334  *     cdef number_type *pr = start1 + (n - 1)
4335  */
4336 
4337   /* function exit code */
4338 }
4339 
__pyx_fuse_1__pyx_f_6tables_16indexesextension__keysort(npy_int16 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)4340 static void __pyx_fuse_1__pyx_f_6tables_16indexesextension__keysort(npy_int16 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
4341   npy_int16 *__pyx_v_pl;
4342   npy_int16 *__pyx_v_pr;
4343   char *__pyx_v_ipl;
4344   char *__pyx_v_ipr;
4345   npy_int16 __pyx_v_vp;
4346   char *__pyx_v_ivp;
4347   npy_int16 *__pyx_v_stack[0x64];
4348   npy_int16 **__pyx_v_sptr;
4349   char *__pyx_v_istack[0x64];
4350   char **__pyx_v_isptr;
4351   CYTHON_UNUSED size_t __pyx_v_stack_index;
4352   npy_int16 *__pyx_v_pm;
4353   npy_int16 *__pyx_v_pi;
4354   npy_int16 *__pyx_v_pj;
4355   npy_int16 *__pyx_v_pt;
4356   char *__pyx_v_ipm;
4357   char *__pyx_v_ipi;
4358   char *__pyx_v_ipj;
4359   char *__pyx_v_ipt;
4360   int __pyx_t_1;
4361   npy_int16 __pyx_t_2;
4362   npy_int16 __pyx_t_3;
4363   int __pyx_t_4;
4364 
4365   /* "tables/indexesextension.pyx":216
4366  * @cython.cdivision(True)
4367  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
4368  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
4369  *     cdef number_type *pr = start1 + (n - 1)
4370  *
4371  */
4372   __pyx_v_pl = __pyx_v_start1;
4373 
4374   /* "tables/indexesextension.pyx":217
4375  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
4376  *     cdef number_type *pl = start1
4377  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
4378  *
4379  *     cdef char *ipl = start2
4380  */
4381   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
4382 
4383   /* "tables/indexesextension.pyx":219
4384  *     cdef number_type *pr = start1 + (n - 1)
4385  *
4386  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
4387  *     cdef char *ipr = start2 + (n - 1) * elsize2
4388  *
4389  */
4390   __pyx_v_ipl = __pyx_v_start2;
4391 
4392   /* "tables/indexesextension.pyx":220
4393  *
4394  *     cdef char *ipl = start2
4395  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
4396  *
4397  *     cdef number_type vp
4398  */
4399   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
4400 
4401   /* "tables/indexesextension.pyx":223
4402  *
4403  *     cdef number_type vp
4404  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
4405  *
4406  *     cdef number_type *stack[PYA_QS_STACK]
4407  */
4408   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
4409 
4410   /* "tables/indexesextension.pyx":226
4411  *
4412  *     cdef number_type *stack[PYA_QS_STACK]
4413  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
4414  *
4415  *     cdef char *istack[PYA_QS_STACK]
4416  */
4417   __pyx_v_sptr = __pyx_v_stack;
4418 
4419   /* "tables/indexesextension.pyx":229
4420  *
4421  *     cdef char *istack[PYA_QS_STACK]
4422  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
4423  *
4424  *     cdef size_t stack_index = 0
4425  */
4426   __pyx_v_isptr = __pyx_v_istack;
4427 
4428   /* "tables/indexesextension.pyx":231
4429  *     cdef char **isptr = istack
4430  *
4431  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
4432  *
4433  *     cdef number_type *pm
4434  */
4435   __pyx_v_stack_index = 0;
4436 
4437   /* "tables/indexesextension.pyx":242
4438  *     cdef char *ipt
4439  *
4440  *     while True:             # <<<<<<<<<<<<<<
4441  *         while pr - pl > SMALL_QUICKSORT:
4442  *             pm  = pl + ((pr - pl) >> 1)
4443  */
4444   while (1) {
4445 
4446     /* "tables/indexesextension.pyx":243
4447  *
4448  *     while True:
4449  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
4450  *             pm  = pl + ((pr - pl) >> 1)
4451  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
4452  */
4453     while (1) {
4454       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
4455       if (!__pyx_t_1) break;
4456 
4457       /* "tables/indexesextension.pyx":244
4458  *     while True:
4459  *         while pr - pl > SMALL_QUICKSORT:
4460  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
4461  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
4462  *
4463  */
4464       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
4465 
4466       /* "tables/indexesextension.pyx":245
4467  *         while pr - pl > SMALL_QUICKSORT:
4468  *             pm  = pl + ((pr - pl) >> 1)
4469  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
4470  *
4471  *             if less_than(pm, pl):
4472  */
4473       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
4474 
4475       /* "tables/indexesextension.pyx":247
4476  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
4477  *
4478  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
4479  *                 pm[0], pl[0] =  pl[0], pm[0]
4480  *                 swap_bytes(ipm, ipl, elsize2)
4481  */
4482       __pyx_t_1 = (__pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
4483       if (__pyx_t_1) {
4484 
4485         /* "tables/indexesextension.pyx":248
4486  *
4487  *             if less_than(pm, pl):
4488  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
4489  *                 swap_bytes(ipm, ipl, elsize2)
4490  *
4491  */
4492         __pyx_t_2 = (__pyx_v_pl[0]);
4493         __pyx_t_3 = (__pyx_v_pm[0]);
4494         (__pyx_v_pm[0]) = __pyx_t_2;
4495         (__pyx_v_pl[0]) = __pyx_t_3;
4496 
4497         /* "tables/indexesextension.pyx":249
4498  *             if less_than(pm, pl):
4499  *                 pm[0], pl[0] =  pl[0], pm[0]
4500  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
4501  *
4502  *             if less_than(pr, pm):
4503  */
4504         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
4505 
4506         /* "tables/indexesextension.pyx":247
4507  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
4508  *
4509  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
4510  *                 pm[0], pl[0] =  pl[0], pm[0]
4511  *                 swap_bytes(ipm, ipl, elsize2)
4512  */
4513       }
4514 
4515       /* "tables/indexesextension.pyx":251
4516  *                 swap_bytes(ipm, ipl, elsize2)
4517  *
4518  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
4519  *                 pr[0], pm[0] =  pm[0], pr[0]
4520  *                 swap_bytes(ipr, ipm, elsize2)
4521  */
4522       __pyx_t_1 = (__pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
4523       if (__pyx_t_1) {
4524 
4525         /* "tables/indexesextension.pyx":252
4526  *
4527  *             if less_than(pr, pm):
4528  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
4529  *                 swap_bytes(ipr, ipm, elsize2)
4530  *
4531  */
4532         __pyx_t_3 = (__pyx_v_pm[0]);
4533         __pyx_t_2 = (__pyx_v_pr[0]);
4534         (__pyx_v_pr[0]) = __pyx_t_3;
4535         (__pyx_v_pm[0]) = __pyx_t_2;
4536 
4537         /* "tables/indexesextension.pyx":253
4538  *             if less_than(pr, pm):
4539  *                 pr[0], pm[0] =  pm[0], pr[0]
4540  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
4541  *
4542  *             if less_than(pm, pl):
4543  */
4544         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
4545 
4546         /* "tables/indexesextension.pyx":251
4547  *                 swap_bytes(ipm, ipl, elsize2)
4548  *
4549  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
4550  *                 pr[0], pm[0] =  pm[0], pr[0]
4551  *                 swap_bytes(ipr, ipm, elsize2)
4552  */
4553       }
4554 
4555       /* "tables/indexesextension.pyx":255
4556  *                 swap_bytes(ipr, ipm, elsize2)
4557  *
4558  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
4559  *                 pm[0], pl[0] =  pl[0], pm[0]
4560  *                 swap_bytes(ipm, ipl, elsize2)
4561  */
4562       __pyx_t_1 = (__pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
4563       if (__pyx_t_1) {
4564 
4565         /* "tables/indexesextension.pyx":256
4566  *
4567  *             if less_than(pm, pl):
4568  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
4569  *                 swap_bytes(ipm, ipl, elsize2)
4570  *
4571  */
4572         __pyx_t_2 = (__pyx_v_pl[0]);
4573         __pyx_t_3 = (__pyx_v_pm[0]);
4574         (__pyx_v_pm[0]) = __pyx_t_2;
4575         (__pyx_v_pl[0]) = __pyx_t_3;
4576 
4577         /* "tables/indexesextension.pyx":257
4578  *             if less_than(pm, pl):
4579  *                 pm[0], pl[0] =  pl[0], pm[0]
4580  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
4581  *
4582  *             vp = pm[0]
4583  */
4584         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
4585 
4586         /* "tables/indexesextension.pyx":255
4587  *                 swap_bytes(ipr, ipm, elsize2)
4588  *
4589  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
4590  *                 pm[0], pl[0] =  pl[0], pm[0]
4591  *                 swap_bytes(ipm, ipl, elsize2)
4592  */
4593       }
4594 
4595       /* "tables/indexesextension.pyx":259
4596  *                 swap_bytes(ipm, ipl, elsize2)
4597  *
4598  *             vp = pm[0]             # <<<<<<<<<<<<<<
4599  *
4600  *             pi = pl
4601  */
4602       __pyx_v_vp = (__pyx_v_pm[0]);
4603 
4604       /* "tables/indexesextension.pyx":261
4605  *             vp = pm[0]
4606  *
4607  *             pi = pl             # <<<<<<<<<<<<<<
4608  *             ipi = ipl
4609  *
4610  */
4611       __pyx_v_pi = __pyx_v_pl;
4612 
4613       /* "tables/indexesextension.pyx":262
4614  *
4615  *             pi = pl
4616  *             ipi = ipl             # <<<<<<<<<<<<<<
4617  *
4618  *             pj = pr - 1
4619  */
4620       __pyx_v_ipi = __pyx_v_ipl;
4621 
4622       /* "tables/indexesextension.pyx":264
4623  *             ipi = ipl
4624  *
4625  *             pj = pr - 1             # <<<<<<<<<<<<<<
4626  *             ipj = ipr - elsize2
4627  *
4628  */
4629       __pyx_v_pj = (__pyx_v_pr - 1);
4630 
4631       /* "tables/indexesextension.pyx":265
4632  *
4633  *             pj = pr - 1
4634  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
4635  *
4636  *             pm[0], pj[0] = pj[0], pm[0]
4637  */
4638       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
4639 
4640       /* "tables/indexesextension.pyx":267
4641  *             ipj = ipr - elsize2
4642  *
4643  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
4644  *             swap_bytes(ipm, ipj, elsize2)
4645  *
4646  */
4647       __pyx_t_3 = (__pyx_v_pj[0]);
4648       __pyx_t_2 = (__pyx_v_pm[0]);
4649       (__pyx_v_pm[0]) = __pyx_t_3;
4650       (__pyx_v_pj[0]) = __pyx_t_2;
4651 
4652       /* "tables/indexesextension.pyx":268
4653  *
4654  *             pm[0], pj[0] = pj[0], pm[0]
4655  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
4656  *
4657  *             while True:
4658  */
4659       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
4660 
4661       /* "tables/indexesextension.pyx":270
4662  *             swap_bytes(ipm, ipj, elsize2)
4663  *
4664  *             while True:             # <<<<<<<<<<<<<<
4665  *                 pi += 1
4666  *                 ipi += elsize2
4667  */
4668       while (1) {
4669 
4670         /* "tables/indexesextension.pyx":271
4671  *
4672  *             while True:
4673  *                 pi += 1             # <<<<<<<<<<<<<<
4674  *                 ipi += elsize2
4675  *                 while less_than(pi, &vp):
4676  */
4677         __pyx_v_pi = (__pyx_v_pi + 1);
4678 
4679         /* "tables/indexesextension.pyx":272
4680  *             while True:
4681  *                 pi += 1
4682  *                 ipi += elsize2             # <<<<<<<<<<<<<<
4683  *                 while less_than(pi, &vp):
4684  *                     pi += 1
4685  */
4686         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
4687 
4688         /* "tables/indexesextension.pyx":273
4689  *                 pi += 1
4690  *                 ipi += elsize2
4691  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
4692  *                     pi += 1
4693  *                     ipi += elsize2
4694  */
4695         while (1) {
4696           __pyx_t_1 = (__pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
4697           if (!__pyx_t_1) break;
4698 
4699           /* "tables/indexesextension.pyx":274
4700  *                 ipi += elsize2
4701  *                 while less_than(pi, &vp):
4702  *                     pi += 1             # <<<<<<<<<<<<<<
4703  *                     ipi += elsize2
4704  *
4705  */
4706           __pyx_v_pi = (__pyx_v_pi + 1);
4707 
4708           /* "tables/indexesextension.pyx":275
4709  *                 while less_than(pi, &vp):
4710  *                     pi += 1
4711  *                     ipi += elsize2             # <<<<<<<<<<<<<<
4712  *
4713  *                 pj -= 1
4714  */
4715           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
4716         }
4717 
4718         /* "tables/indexesextension.pyx":277
4719  *                     ipi += elsize2
4720  *
4721  *                 pj -= 1             # <<<<<<<<<<<<<<
4722  *                 ipj -= elsize2
4723  *                 while less_than(&vp, pj):
4724  */
4725         __pyx_v_pj = (__pyx_v_pj - 1);
4726 
4727         /* "tables/indexesextension.pyx":278
4728  *
4729  *                 pj -= 1
4730  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
4731  *                 while less_than(&vp, pj):
4732  *                     pj -= 1
4733  */
4734         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
4735 
4736         /* "tables/indexesextension.pyx":279
4737  *                 pj -= 1
4738  *                 ipj -= elsize2
4739  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
4740  *                     pj -= 1
4741  *                     ipj -= elsize2
4742  */
4743         while (1) {
4744           __pyx_t_1 = (__pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
4745           if (!__pyx_t_1) break;
4746 
4747           /* "tables/indexesextension.pyx":280
4748  *                 ipj -= elsize2
4749  *                 while less_than(&vp, pj):
4750  *                     pj -= 1             # <<<<<<<<<<<<<<
4751  *                     ipj -= elsize2
4752  *
4753  */
4754           __pyx_v_pj = (__pyx_v_pj - 1);
4755 
4756           /* "tables/indexesextension.pyx":281
4757  *                 while less_than(&vp, pj):
4758  *                     pj -= 1
4759  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
4760  *
4761  *                 if pi >= pj:
4762  */
4763           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
4764         }
4765 
4766         /* "tables/indexesextension.pyx":283
4767  *                     ipj -= elsize2
4768  *
4769  *                 if pi >= pj:             # <<<<<<<<<<<<<<
4770  *                     break
4771  *
4772  */
4773         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
4774         if (__pyx_t_1) {
4775 
4776           /* "tables/indexesextension.pyx":284
4777  *
4778  *                 if pi >= pj:
4779  *                     break             # <<<<<<<<<<<<<<
4780  *
4781  *                 pi[0], pj[0] = pj[0], pi[0]
4782  */
4783           goto __pyx_L11_break;
4784 
4785           /* "tables/indexesextension.pyx":283
4786  *                     ipj -= elsize2
4787  *
4788  *                 if pi >= pj:             # <<<<<<<<<<<<<<
4789  *                     break
4790  *
4791  */
4792         }
4793 
4794         /* "tables/indexesextension.pyx":286
4795  *                     break
4796  *
4797  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
4798  *                 swap_bytes(ipi, ipj, elsize2)
4799  *
4800  */
4801         __pyx_t_2 = (__pyx_v_pj[0]);
4802         __pyx_t_3 = (__pyx_v_pi[0]);
4803         (__pyx_v_pi[0]) = __pyx_t_2;
4804         (__pyx_v_pj[0]) = __pyx_t_3;
4805 
4806         /* "tables/indexesextension.pyx":287
4807  *
4808  *                 pi[0], pj[0] = pj[0], pi[0]
4809  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
4810  *
4811  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
4812  */
4813         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
4814       }
4815       __pyx_L11_break:;
4816 
4817       /* "tables/indexesextension.pyx":289
4818  *                 swap_bytes(ipi, ipj, elsize2)
4819  *
4820  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
4821  *             swap_bytes(ipi, ipr-elsize2, elsize2)
4822  *
4823  */
4824       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
4825       __pyx_t_2 = (__pyx_v_pi[0]);
4826       (__pyx_v_pi[0]) = __pyx_t_3;
4827       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
4828 
4829       /* "tables/indexesextension.pyx":290
4830  *
4831  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
4832  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
4833  *
4834  *             # push largest partition on stack and proceed with the other
4835  */
4836       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
4837 
4838       /* "tables/indexesextension.pyx":293
4839  *
4840  *             # push largest partition on stack and proceed with the other
4841  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
4842  *                 sptr[0] = pi + 1
4843  *                 sptr[1] = pr
4844  */
4845       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
4846       if (__pyx_t_1) {
4847 
4848         /* "tables/indexesextension.pyx":294
4849  *             # push largest partition on stack and proceed with the other
4850  *             if (pi - pl) < (pr - pi):
4851  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
4852  *                 sptr[1] = pr
4853  *                 sptr += 2
4854  */
4855         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
4856 
4857         /* "tables/indexesextension.pyx":295
4858  *             if (pi - pl) < (pr - pi):
4859  *                 sptr[0] = pi + 1
4860  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
4861  *                 sptr += 2
4862  *
4863  */
4864         (__pyx_v_sptr[1]) = __pyx_v_pr;
4865 
4866         /* "tables/indexesextension.pyx":296
4867  *                 sptr[0] = pi + 1
4868  *                 sptr[1] = pr
4869  *                 sptr += 2             # <<<<<<<<<<<<<<
4870  *
4871  *                 isptr[0] = ipi + elsize2
4872  */
4873         __pyx_v_sptr = (__pyx_v_sptr + 2);
4874 
4875         /* "tables/indexesextension.pyx":298
4876  *                 sptr += 2
4877  *
4878  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
4879  *                 isptr[1] = ipr
4880  *                 isptr += 2
4881  */
4882         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
4883 
4884         /* "tables/indexesextension.pyx":299
4885  *
4886  *                 isptr[0] = ipi + elsize2
4887  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
4888  *                 isptr += 2
4889  *
4890  */
4891         (__pyx_v_isptr[1]) = __pyx_v_ipr;
4892 
4893         /* "tables/indexesextension.pyx":300
4894  *                 isptr[0] = ipi + elsize2
4895  *                 isptr[1] = ipr
4896  *                 isptr += 2             # <<<<<<<<<<<<<<
4897  *
4898  *                 pr = pi - 1
4899  */
4900         __pyx_v_isptr = (__pyx_v_isptr + 2);
4901 
4902         /* "tables/indexesextension.pyx":302
4903  *                 isptr += 2
4904  *
4905  *                 pr = pi - 1             # <<<<<<<<<<<<<<
4906  *                 ipr = ipi - elsize2
4907  *             else:
4908  */
4909         __pyx_v_pr = (__pyx_v_pi - 1);
4910 
4911         /* "tables/indexesextension.pyx":303
4912  *
4913  *                 pr = pi - 1
4914  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
4915  *             else:
4916  *                 sptr[0] = pl
4917  */
4918         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
4919 
4920         /* "tables/indexesextension.pyx":293
4921  *
4922  *             # push largest partition on stack and proceed with the other
4923  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
4924  *                 sptr[0] = pi + 1
4925  *                 sptr[1] = pr
4926  */
4927         goto __pyx_L17;
4928       }
4929 
4930       /* "tables/indexesextension.pyx":305
4931  *                 ipr = ipi - elsize2
4932  *             else:
4933  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
4934  *                 sptr[1] = pi - 1
4935  *                 sptr += 2
4936  */
4937       /*else*/ {
4938         (__pyx_v_sptr[0]) = __pyx_v_pl;
4939 
4940         /* "tables/indexesextension.pyx":306
4941  *             else:
4942  *                 sptr[0] = pl
4943  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
4944  *                 sptr += 2
4945  *
4946  */
4947         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
4948 
4949         /* "tables/indexesextension.pyx":307
4950  *                 sptr[0] = pl
4951  *                 sptr[1] = pi - 1
4952  *                 sptr += 2             # <<<<<<<<<<<<<<
4953  *
4954  *                 isptr[0] = ipl
4955  */
4956         __pyx_v_sptr = (__pyx_v_sptr + 2);
4957 
4958         /* "tables/indexesextension.pyx":309
4959  *                 sptr += 2
4960  *
4961  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
4962  *                 isptr[1] = ipi - elsize2
4963  *                 isptr += 2
4964  */
4965         (__pyx_v_isptr[0]) = __pyx_v_ipl;
4966 
4967         /* "tables/indexesextension.pyx":310
4968  *
4969  *                 isptr[0] = ipl
4970  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
4971  *                 isptr += 2
4972  *
4973  */
4974         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
4975 
4976         /* "tables/indexesextension.pyx":311
4977  *                 isptr[0] = ipl
4978  *                 isptr[1] = ipi - elsize2
4979  *                 isptr += 2             # <<<<<<<<<<<<<<
4980  *
4981  *                 pl = pi + 1
4982  */
4983         __pyx_v_isptr = (__pyx_v_isptr + 2);
4984 
4985         /* "tables/indexesextension.pyx":313
4986  *                 isptr += 2
4987  *
4988  *                 pl = pi + 1             # <<<<<<<<<<<<<<
4989  *                 ipl = ipi + elsize2
4990  *
4991  */
4992         __pyx_v_pl = (__pyx_v_pi + 1);
4993 
4994         /* "tables/indexesextension.pyx":314
4995  *
4996  *                 pl = pi + 1
4997  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
4998  *
4999  *         pi = pl + 1
5000  */
5001         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
5002       }
5003       __pyx_L17:;
5004     }
5005 
5006     /* "tables/indexesextension.pyx":316
5007  *                 ipl = ipi + elsize2
5008  *
5009  *         pi = pl + 1             # <<<<<<<<<<<<<<
5010  *         ipi = ipl + elsize2
5011  *         while pi <= pr:
5012  */
5013     __pyx_v_pi = (__pyx_v_pl + 1);
5014 
5015     /* "tables/indexesextension.pyx":317
5016  *
5017  *         pi = pl + 1
5018  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
5019  *         while pi <= pr:
5020  *             vp = pi[0]
5021  */
5022     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
5023 
5024     /* "tables/indexesextension.pyx":318
5025  *         pi = pl + 1
5026  *         ipi = ipl + elsize2
5027  *         while pi <= pr:             # <<<<<<<<<<<<<<
5028  *             vp = pi[0]
5029  *             memcpy(ivp, ipi, elsize2)
5030  */
5031     while (1) {
5032       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
5033       if (!__pyx_t_1) break;
5034 
5035       /* "tables/indexesextension.pyx":319
5036  *         ipi = ipl + elsize2
5037  *         while pi <= pr:
5038  *             vp = pi[0]             # <<<<<<<<<<<<<<
5039  *             memcpy(ivp, ipi, elsize2)
5040  *
5041  */
5042       __pyx_v_vp = (__pyx_v_pi[0]);
5043 
5044       /* "tables/indexesextension.pyx":320
5045  *         while pi <= pr:
5046  *             vp = pi[0]
5047  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
5048  *
5049  *             pj = pi
5050  */
5051       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
5052 
5053       /* "tables/indexesextension.pyx":322
5054  *             memcpy(ivp, ipi, elsize2)
5055  *
5056  *             pj = pi             # <<<<<<<<<<<<<<
5057  *             pt = pi - 1
5058  *
5059  */
5060       __pyx_v_pj = __pyx_v_pi;
5061 
5062       /* "tables/indexesextension.pyx":323
5063  *
5064  *             pj = pi
5065  *             pt = pi - 1             # <<<<<<<<<<<<<<
5066  *
5067  *             ipj = ipi
5068  */
5069       __pyx_v_pt = (__pyx_v_pi - 1);
5070 
5071       /* "tables/indexesextension.pyx":325
5072  *             pt = pi - 1
5073  *
5074  *             ipj = ipi             # <<<<<<<<<<<<<<
5075  *             ipt = ipi - elsize2
5076  *
5077  */
5078       __pyx_v_ipj = __pyx_v_ipi;
5079 
5080       /* "tables/indexesextension.pyx":326
5081  *
5082  *             ipj = ipi
5083  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
5084  *
5085  *             while pj > pl and less_than(&vp, pt):
5086  */
5087       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
5088 
5089       /* "tables/indexesextension.pyx":328
5090  *             ipt = ipi - elsize2
5091  *
5092  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
5093  *                 pj[0] = pt[0]
5094  *                 pj -= 1
5095  */
5096       while (1) {
5097         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
5098         if (__pyx_t_4) {
5099         } else {
5100           __pyx_t_1 = __pyx_t_4;
5101           goto __pyx_L22_bool_binop_done;
5102         }
5103         __pyx_t_4 = (__pyx_fuse_1__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
5104         __pyx_t_1 = __pyx_t_4;
5105         __pyx_L22_bool_binop_done:;
5106         if (!__pyx_t_1) break;
5107 
5108         /* "tables/indexesextension.pyx":329
5109  *
5110  *             while pj > pl and less_than(&vp, pt):
5111  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
5112  *                 pj -= 1
5113  *                 pt -= 1
5114  */
5115         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
5116 
5117         /* "tables/indexesextension.pyx":330
5118  *             while pj > pl and less_than(&vp, pt):
5119  *                 pj[0] = pt[0]
5120  *                 pj -= 1             # <<<<<<<<<<<<<<
5121  *                 pt -= 1
5122  *
5123  */
5124         __pyx_v_pj = (__pyx_v_pj - 1);
5125 
5126         /* "tables/indexesextension.pyx":331
5127  *                 pj[0] = pt[0]
5128  *                 pj -= 1
5129  *                 pt -= 1             # <<<<<<<<<<<<<<
5130  *
5131  *                 memcpy(ipj, ipt, elsize2)
5132  */
5133         __pyx_v_pt = (__pyx_v_pt - 1);
5134 
5135         /* "tables/indexesextension.pyx":333
5136  *                 pt -= 1
5137  *
5138  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
5139  *                 ipj -= elsize2
5140  *                 ipt -= elsize2
5141  */
5142         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
5143 
5144         /* "tables/indexesextension.pyx":334
5145  *
5146  *                 memcpy(ipj, ipt, elsize2)
5147  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
5148  *                 ipt -= elsize2
5149  *
5150  */
5151         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
5152 
5153         /* "tables/indexesextension.pyx":335
5154  *                 memcpy(ipj, ipt, elsize2)
5155  *                 ipj -= elsize2
5156  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
5157  *
5158  *             pj[0] = vp
5159  */
5160         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
5161       }
5162 
5163       /* "tables/indexesextension.pyx":337
5164  *                 ipt -= elsize2
5165  *
5166  *             pj[0] = vp             # <<<<<<<<<<<<<<
5167  *             memcpy(ipj, ivp, elsize2)
5168  *
5169  */
5170       (__pyx_v_pj[0]) = __pyx_v_vp;
5171 
5172       /* "tables/indexesextension.pyx":338
5173  *
5174  *             pj[0] = vp
5175  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
5176  *
5177  *             pi += 1
5178  */
5179       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
5180 
5181       /* "tables/indexesextension.pyx":340
5182  *             memcpy(ipj, ivp, elsize2)
5183  *
5184  *             pi += 1             # <<<<<<<<<<<<<<
5185  *             ipi += elsize2
5186  *
5187  */
5188       __pyx_v_pi = (__pyx_v_pi + 1);
5189 
5190       /* "tables/indexesextension.pyx":341
5191  *
5192  *             pi += 1
5193  *             ipi += elsize2             # <<<<<<<<<<<<<<
5194  *
5195  *         if sptr == stack:
5196  */
5197       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
5198     }
5199 
5200     /* "tables/indexesextension.pyx":343
5201  *             ipi += elsize2
5202  *
5203  *         if sptr == stack:             # <<<<<<<<<<<<<<
5204  *             break
5205  *
5206  */
5207     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
5208     if (__pyx_t_1) {
5209 
5210       /* "tables/indexesextension.pyx":344
5211  *
5212  *         if sptr == stack:
5213  *             break             # <<<<<<<<<<<<<<
5214  *
5215  *         sptr -= 2
5216  */
5217       goto __pyx_L4_break;
5218 
5219       /* "tables/indexesextension.pyx":343
5220  *             ipi += elsize2
5221  *
5222  *         if sptr == stack:             # <<<<<<<<<<<<<<
5223  *             break
5224  *
5225  */
5226     }
5227 
5228     /* "tables/indexesextension.pyx":346
5229  *             break
5230  *
5231  *         sptr -= 2             # <<<<<<<<<<<<<<
5232  *         pl = sptr[0]
5233  *         pr = sptr[1]
5234  */
5235     __pyx_v_sptr = (__pyx_v_sptr - 2);
5236 
5237     /* "tables/indexesextension.pyx":347
5238  *
5239  *         sptr -= 2
5240  *         pl = sptr[0]             # <<<<<<<<<<<<<<
5241  *         pr = sptr[1]
5242  *
5243  */
5244     __pyx_v_pl = (__pyx_v_sptr[0]);
5245 
5246     /* "tables/indexesextension.pyx":348
5247  *         sptr -= 2
5248  *         pl = sptr[0]
5249  *         pr = sptr[1]             # <<<<<<<<<<<<<<
5250  *
5251  *         isptr -= 2
5252  */
5253     __pyx_v_pr = (__pyx_v_sptr[1]);
5254 
5255     /* "tables/indexesextension.pyx":350
5256  *         pr = sptr[1]
5257  *
5258  *         isptr -= 2             # <<<<<<<<<<<<<<
5259  *         ipl = isptr[0]
5260  *         ipr = isptr[1]
5261  */
5262     __pyx_v_isptr = (__pyx_v_isptr - 2);
5263 
5264     /* "tables/indexesextension.pyx":351
5265  *
5266  *         isptr -= 2
5267  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
5268  *         ipr = isptr[1]
5269  *
5270  */
5271     __pyx_v_ipl = (__pyx_v_isptr[0]);
5272 
5273     /* "tables/indexesextension.pyx":352
5274  *         isptr -= 2
5275  *         ipl = isptr[0]
5276  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
5277  *
5278  *     free(ivp)
5279  */
5280     __pyx_v_ipr = (__pyx_v_isptr[1]);
5281   }
5282   __pyx_L4_break:;
5283 
5284   /* "tables/indexesextension.pyx":354
5285  *         ipr = isptr[1]
5286  *
5287  *     free(ivp)             # <<<<<<<<<<<<<<
5288  *
5289  *
5290  */
5291   free(__pyx_v_ivp);
5292 
5293   /* "tables/indexesextension.pyx":215
5294  *
5295  * @cython.cdivision(True)
5296  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
5297  *     cdef number_type *pl = start1
5298  *     cdef number_type *pr = start1 + (n - 1)
5299  */
5300 
5301   /* function exit code */
5302 }
5303 
__pyx_fuse_2__pyx_f_6tables_16indexesextension__keysort(npy_int32 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)5304 static void __pyx_fuse_2__pyx_f_6tables_16indexesextension__keysort(npy_int32 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
5305   npy_int32 *__pyx_v_pl;
5306   npy_int32 *__pyx_v_pr;
5307   char *__pyx_v_ipl;
5308   char *__pyx_v_ipr;
5309   npy_int32 __pyx_v_vp;
5310   char *__pyx_v_ivp;
5311   npy_int32 *__pyx_v_stack[0x64];
5312   npy_int32 **__pyx_v_sptr;
5313   char *__pyx_v_istack[0x64];
5314   char **__pyx_v_isptr;
5315   CYTHON_UNUSED size_t __pyx_v_stack_index;
5316   npy_int32 *__pyx_v_pm;
5317   npy_int32 *__pyx_v_pi;
5318   npy_int32 *__pyx_v_pj;
5319   npy_int32 *__pyx_v_pt;
5320   char *__pyx_v_ipm;
5321   char *__pyx_v_ipi;
5322   char *__pyx_v_ipj;
5323   char *__pyx_v_ipt;
5324   int __pyx_t_1;
5325   npy_int32 __pyx_t_2;
5326   npy_int32 __pyx_t_3;
5327   int __pyx_t_4;
5328 
5329   /* "tables/indexesextension.pyx":216
5330  * @cython.cdivision(True)
5331  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
5332  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
5333  *     cdef number_type *pr = start1 + (n - 1)
5334  *
5335  */
5336   __pyx_v_pl = __pyx_v_start1;
5337 
5338   /* "tables/indexesextension.pyx":217
5339  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
5340  *     cdef number_type *pl = start1
5341  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
5342  *
5343  *     cdef char *ipl = start2
5344  */
5345   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
5346 
5347   /* "tables/indexesextension.pyx":219
5348  *     cdef number_type *pr = start1 + (n - 1)
5349  *
5350  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
5351  *     cdef char *ipr = start2 + (n - 1) * elsize2
5352  *
5353  */
5354   __pyx_v_ipl = __pyx_v_start2;
5355 
5356   /* "tables/indexesextension.pyx":220
5357  *
5358  *     cdef char *ipl = start2
5359  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
5360  *
5361  *     cdef number_type vp
5362  */
5363   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
5364 
5365   /* "tables/indexesextension.pyx":223
5366  *
5367  *     cdef number_type vp
5368  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
5369  *
5370  *     cdef number_type *stack[PYA_QS_STACK]
5371  */
5372   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
5373 
5374   /* "tables/indexesextension.pyx":226
5375  *
5376  *     cdef number_type *stack[PYA_QS_STACK]
5377  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
5378  *
5379  *     cdef char *istack[PYA_QS_STACK]
5380  */
5381   __pyx_v_sptr = __pyx_v_stack;
5382 
5383   /* "tables/indexesextension.pyx":229
5384  *
5385  *     cdef char *istack[PYA_QS_STACK]
5386  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
5387  *
5388  *     cdef size_t stack_index = 0
5389  */
5390   __pyx_v_isptr = __pyx_v_istack;
5391 
5392   /* "tables/indexesextension.pyx":231
5393  *     cdef char **isptr = istack
5394  *
5395  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
5396  *
5397  *     cdef number_type *pm
5398  */
5399   __pyx_v_stack_index = 0;
5400 
5401   /* "tables/indexesextension.pyx":242
5402  *     cdef char *ipt
5403  *
5404  *     while True:             # <<<<<<<<<<<<<<
5405  *         while pr - pl > SMALL_QUICKSORT:
5406  *             pm  = pl + ((pr - pl) >> 1)
5407  */
5408   while (1) {
5409 
5410     /* "tables/indexesextension.pyx":243
5411  *
5412  *     while True:
5413  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
5414  *             pm  = pl + ((pr - pl) >> 1)
5415  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
5416  */
5417     while (1) {
5418       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
5419       if (!__pyx_t_1) break;
5420 
5421       /* "tables/indexesextension.pyx":244
5422  *     while True:
5423  *         while pr - pl > SMALL_QUICKSORT:
5424  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
5425  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
5426  *
5427  */
5428       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
5429 
5430       /* "tables/indexesextension.pyx":245
5431  *         while pr - pl > SMALL_QUICKSORT:
5432  *             pm  = pl + ((pr - pl) >> 1)
5433  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
5434  *
5435  *             if less_than(pm, pl):
5436  */
5437       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
5438 
5439       /* "tables/indexesextension.pyx":247
5440  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
5441  *
5442  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
5443  *                 pm[0], pl[0] =  pl[0], pm[0]
5444  *                 swap_bytes(ipm, ipl, elsize2)
5445  */
5446       __pyx_t_1 = (__pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
5447       if (__pyx_t_1) {
5448 
5449         /* "tables/indexesextension.pyx":248
5450  *
5451  *             if less_than(pm, pl):
5452  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
5453  *                 swap_bytes(ipm, ipl, elsize2)
5454  *
5455  */
5456         __pyx_t_2 = (__pyx_v_pl[0]);
5457         __pyx_t_3 = (__pyx_v_pm[0]);
5458         (__pyx_v_pm[0]) = __pyx_t_2;
5459         (__pyx_v_pl[0]) = __pyx_t_3;
5460 
5461         /* "tables/indexesextension.pyx":249
5462  *             if less_than(pm, pl):
5463  *                 pm[0], pl[0] =  pl[0], pm[0]
5464  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
5465  *
5466  *             if less_than(pr, pm):
5467  */
5468         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
5469 
5470         /* "tables/indexesextension.pyx":247
5471  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
5472  *
5473  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
5474  *                 pm[0], pl[0] =  pl[0], pm[0]
5475  *                 swap_bytes(ipm, ipl, elsize2)
5476  */
5477       }
5478 
5479       /* "tables/indexesextension.pyx":251
5480  *                 swap_bytes(ipm, ipl, elsize2)
5481  *
5482  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
5483  *                 pr[0], pm[0] =  pm[0], pr[0]
5484  *                 swap_bytes(ipr, ipm, elsize2)
5485  */
5486       __pyx_t_1 = (__pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
5487       if (__pyx_t_1) {
5488 
5489         /* "tables/indexesextension.pyx":252
5490  *
5491  *             if less_than(pr, pm):
5492  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
5493  *                 swap_bytes(ipr, ipm, elsize2)
5494  *
5495  */
5496         __pyx_t_3 = (__pyx_v_pm[0]);
5497         __pyx_t_2 = (__pyx_v_pr[0]);
5498         (__pyx_v_pr[0]) = __pyx_t_3;
5499         (__pyx_v_pm[0]) = __pyx_t_2;
5500 
5501         /* "tables/indexesextension.pyx":253
5502  *             if less_than(pr, pm):
5503  *                 pr[0], pm[0] =  pm[0], pr[0]
5504  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
5505  *
5506  *             if less_than(pm, pl):
5507  */
5508         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
5509 
5510         /* "tables/indexesextension.pyx":251
5511  *                 swap_bytes(ipm, ipl, elsize2)
5512  *
5513  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
5514  *                 pr[0], pm[0] =  pm[0], pr[0]
5515  *                 swap_bytes(ipr, ipm, elsize2)
5516  */
5517       }
5518 
5519       /* "tables/indexesextension.pyx":255
5520  *                 swap_bytes(ipr, ipm, elsize2)
5521  *
5522  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
5523  *                 pm[0], pl[0] =  pl[0], pm[0]
5524  *                 swap_bytes(ipm, ipl, elsize2)
5525  */
5526       __pyx_t_1 = (__pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
5527       if (__pyx_t_1) {
5528 
5529         /* "tables/indexesextension.pyx":256
5530  *
5531  *             if less_than(pm, pl):
5532  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
5533  *                 swap_bytes(ipm, ipl, elsize2)
5534  *
5535  */
5536         __pyx_t_2 = (__pyx_v_pl[0]);
5537         __pyx_t_3 = (__pyx_v_pm[0]);
5538         (__pyx_v_pm[0]) = __pyx_t_2;
5539         (__pyx_v_pl[0]) = __pyx_t_3;
5540 
5541         /* "tables/indexesextension.pyx":257
5542  *             if less_than(pm, pl):
5543  *                 pm[0], pl[0] =  pl[0], pm[0]
5544  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
5545  *
5546  *             vp = pm[0]
5547  */
5548         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
5549 
5550         /* "tables/indexesextension.pyx":255
5551  *                 swap_bytes(ipr, ipm, elsize2)
5552  *
5553  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
5554  *                 pm[0], pl[0] =  pl[0], pm[0]
5555  *                 swap_bytes(ipm, ipl, elsize2)
5556  */
5557       }
5558 
5559       /* "tables/indexesextension.pyx":259
5560  *                 swap_bytes(ipm, ipl, elsize2)
5561  *
5562  *             vp = pm[0]             # <<<<<<<<<<<<<<
5563  *
5564  *             pi = pl
5565  */
5566       __pyx_v_vp = (__pyx_v_pm[0]);
5567 
5568       /* "tables/indexesextension.pyx":261
5569  *             vp = pm[0]
5570  *
5571  *             pi = pl             # <<<<<<<<<<<<<<
5572  *             ipi = ipl
5573  *
5574  */
5575       __pyx_v_pi = __pyx_v_pl;
5576 
5577       /* "tables/indexesextension.pyx":262
5578  *
5579  *             pi = pl
5580  *             ipi = ipl             # <<<<<<<<<<<<<<
5581  *
5582  *             pj = pr - 1
5583  */
5584       __pyx_v_ipi = __pyx_v_ipl;
5585 
5586       /* "tables/indexesextension.pyx":264
5587  *             ipi = ipl
5588  *
5589  *             pj = pr - 1             # <<<<<<<<<<<<<<
5590  *             ipj = ipr - elsize2
5591  *
5592  */
5593       __pyx_v_pj = (__pyx_v_pr - 1);
5594 
5595       /* "tables/indexesextension.pyx":265
5596  *
5597  *             pj = pr - 1
5598  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
5599  *
5600  *             pm[0], pj[0] = pj[0], pm[0]
5601  */
5602       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
5603 
5604       /* "tables/indexesextension.pyx":267
5605  *             ipj = ipr - elsize2
5606  *
5607  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
5608  *             swap_bytes(ipm, ipj, elsize2)
5609  *
5610  */
5611       __pyx_t_3 = (__pyx_v_pj[0]);
5612       __pyx_t_2 = (__pyx_v_pm[0]);
5613       (__pyx_v_pm[0]) = __pyx_t_3;
5614       (__pyx_v_pj[0]) = __pyx_t_2;
5615 
5616       /* "tables/indexesextension.pyx":268
5617  *
5618  *             pm[0], pj[0] = pj[0], pm[0]
5619  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
5620  *
5621  *             while True:
5622  */
5623       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
5624 
5625       /* "tables/indexesextension.pyx":270
5626  *             swap_bytes(ipm, ipj, elsize2)
5627  *
5628  *             while True:             # <<<<<<<<<<<<<<
5629  *                 pi += 1
5630  *                 ipi += elsize2
5631  */
5632       while (1) {
5633 
5634         /* "tables/indexesextension.pyx":271
5635  *
5636  *             while True:
5637  *                 pi += 1             # <<<<<<<<<<<<<<
5638  *                 ipi += elsize2
5639  *                 while less_than(pi, &vp):
5640  */
5641         __pyx_v_pi = (__pyx_v_pi + 1);
5642 
5643         /* "tables/indexesextension.pyx":272
5644  *             while True:
5645  *                 pi += 1
5646  *                 ipi += elsize2             # <<<<<<<<<<<<<<
5647  *                 while less_than(pi, &vp):
5648  *                     pi += 1
5649  */
5650         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
5651 
5652         /* "tables/indexesextension.pyx":273
5653  *                 pi += 1
5654  *                 ipi += elsize2
5655  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
5656  *                     pi += 1
5657  *                     ipi += elsize2
5658  */
5659         while (1) {
5660           __pyx_t_1 = (__pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
5661           if (!__pyx_t_1) break;
5662 
5663           /* "tables/indexesextension.pyx":274
5664  *                 ipi += elsize2
5665  *                 while less_than(pi, &vp):
5666  *                     pi += 1             # <<<<<<<<<<<<<<
5667  *                     ipi += elsize2
5668  *
5669  */
5670           __pyx_v_pi = (__pyx_v_pi + 1);
5671 
5672           /* "tables/indexesextension.pyx":275
5673  *                 while less_than(pi, &vp):
5674  *                     pi += 1
5675  *                     ipi += elsize2             # <<<<<<<<<<<<<<
5676  *
5677  *                 pj -= 1
5678  */
5679           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
5680         }
5681 
5682         /* "tables/indexesextension.pyx":277
5683  *                     ipi += elsize2
5684  *
5685  *                 pj -= 1             # <<<<<<<<<<<<<<
5686  *                 ipj -= elsize2
5687  *                 while less_than(&vp, pj):
5688  */
5689         __pyx_v_pj = (__pyx_v_pj - 1);
5690 
5691         /* "tables/indexesextension.pyx":278
5692  *
5693  *                 pj -= 1
5694  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
5695  *                 while less_than(&vp, pj):
5696  *                     pj -= 1
5697  */
5698         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
5699 
5700         /* "tables/indexesextension.pyx":279
5701  *                 pj -= 1
5702  *                 ipj -= elsize2
5703  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
5704  *                     pj -= 1
5705  *                     ipj -= elsize2
5706  */
5707         while (1) {
5708           __pyx_t_1 = (__pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
5709           if (!__pyx_t_1) break;
5710 
5711           /* "tables/indexesextension.pyx":280
5712  *                 ipj -= elsize2
5713  *                 while less_than(&vp, pj):
5714  *                     pj -= 1             # <<<<<<<<<<<<<<
5715  *                     ipj -= elsize2
5716  *
5717  */
5718           __pyx_v_pj = (__pyx_v_pj - 1);
5719 
5720           /* "tables/indexesextension.pyx":281
5721  *                 while less_than(&vp, pj):
5722  *                     pj -= 1
5723  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
5724  *
5725  *                 if pi >= pj:
5726  */
5727           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
5728         }
5729 
5730         /* "tables/indexesextension.pyx":283
5731  *                     ipj -= elsize2
5732  *
5733  *                 if pi >= pj:             # <<<<<<<<<<<<<<
5734  *                     break
5735  *
5736  */
5737         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
5738         if (__pyx_t_1) {
5739 
5740           /* "tables/indexesextension.pyx":284
5741  *
5742  *                 if pi >= pj:
5743  *                     break             # <<<<<<<<<<<<<<
5744  *
5745  *                 pi[0], pj[0] = pj[0], pi[0]
5746  */
5747           goto __pyx_L11_break;
5748 
5749           /* "tables/indexesextension.pyx":283
5750  *                     ipj -= elsize2
5751  *
5752  *                 if pi >= pj:             # <<<<<<<<<<<<<<
5753  *                     break
5754  *
5755  */
5756         }
5757 
5758         /* "tables/indexesextension.pyx":286
5759  *                     break
5760  *
5761  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
5762  *                 swap_bytes(ipi, ipj, elsize2)
5763  *
5764  */
5765         __pyx_t_2 = (__pyx_v_pj[0]);
5766         __pyx_t_3 = (__pyx_v_pi[0]);
5767         (__pyx_v_pi[0]) = __pyx_t_2;
5768         (__pyx_v_pj[0]) = __pyx_t_3;
5769 
5770         /* "tables/indexesextension.pyx":287
5771  *
5772  *                 pi[0], pj[0] = pj[0], pi[0]
5773  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
5774  *
5775  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
5776  */
5777         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
5778       }
5779       __pyx_L11_break:;
5780 
5781       /* "tables/indexesextension.pyx":289
5782  *                 swap_bytes(ipi, ipj, elsize2)
5783  *
5784  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
5785  *             swap_bytes(ipi, ipr-elsize2, elsize2)
5786  *
5787  */
5788       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
5789       __pyx_t_2 = (__pyx_v_pi[0]);
5790       (__pyx_v_pi[0]) = __pyx_t_3;
5791       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
5792 
5793       /* "tables/indexesextension.pyx":290
5794  *
5795  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
5796  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
5797  *
5798  *             # push largest partition on stack and proceed with the other
5799  */
5800       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
5801 
5802       /* "tables/indexesextension.pyx":293
5803  *
5804  *             # push largest partition on stack and proceed with the other
5805  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
5806  *                 sptr[0] = pi + 1
5807  *                 sptr[1] = pr
5808  */
5809       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
5810       if (__pyx_t_1) {
5811 
5812         /* "tables/indexesextension.pyx":294
5813  *             # push largest partition on stack and proceed with the other
5814  *             if (pi - pl) < (pr - pi):
5815  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
5816  *                 sptr[1] = pr
5817  *                 sptr += 2
5818  */
5819         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
5820 
5821         /* "tables/indexesextension.pyx":295
5822  *             if (pi - pl) < (pr - pi):
5823  *                 sptr[0] = pi + 1
5824  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
5825  *                 sptr += 2
5826  *
5827  */
5828         (__pyx_v_sptr[1]) = __pyx_v_pr;
5829 
5830         /* "tables/indexesextension.pyx":296
5831  *                 sptr[0] = pi + 1
5832  *                 sptr[1] = pr
5833  *                 sptr += 2             # <<<<<<<<<<<<<<
5834  *
5835  *                 isptr[0] = ipi + elsize2
5836  */
5837         __pyx_v_sptr = (__pyx_v_sptr + 2);
5838 
5839         /* "tables/indexesextension.pyx":298
5840  *                 sptr += 2
5841  *
5842  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
5843  *                 isptr[1] = ipr
5844  *                 isptr += 2
5845  */
5846         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
5847 
5848         /* "tables/indexesextension.pyx":299
5849  *
5850  *                 isptr[0] = ipi + elsize2
5851  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
5852  *                 isptr += 2
5853  *
5854  */
5855         (__pyx_v_isptr[1]) = __pyx_v_ipr;
5856 
5857         /* "tables/indexesextension.pyx":300
5858  *                 isptr[0] = ipi + elsize2
5859  *                 isptr[1] = ipr
5860  *                 isptr += 2             # <<<<<<<<<<<<<<
5861  *
5862  *                 pr = pi - 1
5863  */
5864         __pyx_v_isptr = (__pyx_v_isptr + 2);
5865 
5866         /* "tables/indexesextension.pyx":302
5867  *                 isptr += 2
5868  *
5869  *                 pr = pi - 1             # <<<<<<<<<<<<<<
5870  *                 ipr = ipi - elsize2
5871  *             else:
5872  */
5873         __pyx_v_pr = (__pyx_v_pi - 1);
5874 
5875         /* "tables/indexesextension.pyx":303
5876  *
5877  *                 pr = pi - 1
5878  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
5879  *             else:
5880  *                 sptr[0] = pl
5881  */
5882         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
5883 
5884         /* "tables/indexesextension.pyx":293
5885  *
5886  *             # push largest partition on stack and proceed with the other
5887  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
5888  *                 sptr[0] = pi + 1
5889  *                 sptr[1] = pr
5890  */
5891         goto __pyx_L17;
5892       }
5893 
5894       /* "tables/indexesextension.pyx":305
5895  *                 ipr = ipi - elsize2
5896  *             else:
5897  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
5898  *                 sptr[1] = pi - 1
5899  *                 sptr += 2
5900  */
5901       /*else*/ {
5902         (__pyx_v_sptr[0]) = __pyx_v_pl;
5903 
5904         /* "tables/indexesextension.pyx":306
5905  *             else:
5906  *                 sptr[0] = pl
5907  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
5908  *                 sptr += 2
5909  *
5910  */
5911         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
5912 
5913         /* "tables/indexesextension.pyx":307
5914  *                 sptr[0] = pl
5915  *                 sptr[1] = pi - 1
5916  *                 sptr += 2             # <<<<<<<<<<<<<<
5917  *
5918  *                 isptr[0] = ipl
5919  */
5920         __pyx_v_sptr = (__pyx_v_sptr + 2);
5921 
5922         /* "tables/indexesextension.pyx":309
5923  *                 sptr += 2
5924  *
5925  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
5926  *                 isptr[1] = ipi - elsize2
5927  *                 isptr += 2
5928  */
5929         (__pyx_v_isptr[0]) = __pyx_v_ipl;
5930 
5931         /* "tables/indexesextension.pyx":310
5932  *
5933  *                 isptr[0] = ipl
5934  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
5935  *                 isptr += 2
5936  *
5937  */
5938         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
5939 
5940         /* "tables/indexesextension.pyx":311
5941  *                 isptr[0] = ipl
5942  *                 isptr[1] = ipi - elsize2
5943  *                 isptr += 2             # <<<<<<<<<<<<<<
5944  *
5945  *                 pl = pi + 1
5946  */
5947         __pyx_v_isptr = (__pyx_v_isptr + 2);
5948 
5949         /* "tables/indexesextension.pyx":313
5950  *                 isptr += 2
5951  *
5952  *                 pl = pi + 1             # <<<<<<<<<<<<<<
5953  *                 ipl = ipi + elsize2
5954  *
5955  */
5956         __pyx_v_pl = (__pyx_v_pi + 1);
5957 
5958         /* "tables/indexesextension.pyx":314
5959  *
5960  *                 pl = pi + 1
5961  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
5962  *
5963  *         pi = pl + 1
5964  */
5965         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
5966       }
5967       __pyx_L17:;
5968     }
5969 
5970     /* "tables/indexesextension.pyx":316
5971  *                 ipl = ipi + elsize2
5972  *
5973  *         pi = pl + 1             # <<<<<<<<<<<<<<
5974  *         ipi = ipl + elsize2
5975  *         while pi <= pr:
5976  */
5977     __pyx_v_pi = (__pyx_v_pl + 1);
5978 
5979     /* "tables/indexesextension.pyx":317
5980  *
5981  *         pi = pl + 1
5982  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
5983  *         while pi <= pr:
5984  *             vp = pi[0]
5985  */
5986     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
5987 
5988     /* "tables/indexesextension.pyx":318
5989  *         pi = pl + 1
5990  *         ipi = ipl + elsize2
5991  *         while pi <= pr:             # <<<<<<<<<<<<<<
5992  *             vp = pi[0]
5993  *             memcpy(ivp, ipi, elsize2)
5994  */
5995     while (1) {
5996       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
5997       if (!__pyx_t_1) break;
5998 
5999       /* "tables/indexesextension.pyx":319
6000  *         ipi = ipl + elsize2
6001  *         while pi <= pr:
6002  *             vp = pi[0]             # <<<<<<<<<<<<<<
6003  *             memcpy(ivp, ipi, elsize2)
6004  *
6005  */
6006       __pyx_v_vp = (__pyx_v_pi[0]);
6007 
6008       /* "tables/indexesextension.pyx":320
6009  *         while pi <= pr:
6010  *             vp = pi[0]
6011  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
6012  *
6013  *             pj = pi
6014  */
6015       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
6016 
6017       /* "tables/indexesextension.pyx":322
6018  *             memcpy(ivp, ipi, elsize2)
6019  *
6020  *             pj = pi             # <<<<<<<<<<<<<<
6021  *             pt = pi - 1
6022  *
6023  */
6024       __pyx_v_pj = __pyx_v_pi;
6025 
6026       /* "tables/indexesextension.pyx":323
6027  *
6028  *             pj = pi
6029  *             pt = pi - 1             # <<<<<<<<<<<<<<
6030  *
6031  *             ipj = ipi
6032  */
6033       __pyx_v_pt = (__pyx_v_pi - 1);
6034 
6035       /* "tables/indexesextension.pyx":325
6036  *             pt = pi - 1
6037  *
6038  *             ipj = ipi             # <<<<<<<<<<<<<<
6039  *             ipt = ipi - elsize2
6040  *
6041  */
6042       __pyx_v_ipj = __pyx_v_ipi;
6043 
6044       /* "tables/indexesextension.pyx":326
6045  *
6046  *             ipj = ipi
6047  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
6048  *
6049  *             while pj > pl and less_than(&vp, pt):
6050  */
6051       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
6052 
6053       /* "tables/indexesextension.pyx":328
6054  *             ipt = ipi - elsize2
6055  *
6056  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
6057  *                 pj[0] = pt[0]
6058  *                 pj -= 1
6059  */
6060       while (1) {
6061         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
6062         if (__pyx_t_4) {
6063         } else {
6064           __pyx_t_1 = __pyx_t_4;
6065           goto __pyx_L22_bool_binop_done;
6066         }
6067         __pyx_t_4 = (__pyx_fuse_2__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
6068         __pyx_t_1 = __pyx_t_4;
6069         __pyx_L22_bool_binop_done:;
6070         if (!__pyx_t_1) break;
6071 
6072         /* "tables/indexesextension.pyx":329
6073  *
6074  *             while pj > pl and less_than(&vp, pt):
6075  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
6076  *                 pj -= 1
6077  *                 pt -= 1
6078  */
6079         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
6080 
6081         /* "tables/indexesextension.pyx":330
6082  *             while pj > pl and less_than(&vp, pt):
6083  *                 pj[0] = pt[0]
6084  *                 pj -= 1             # <<<<<<<<<<<<<<
6085  *                 pt -= 1
6086  *
6087  */
6088         __pyx_v_pj = (__pyx_v_pj - 1);
6089 
6090         /* "tables/indexesextension.pyx":331
6091  *                 pj[0] = pt[0]
6092  *                 pj -= 1
6093  *                 pt -= 1             # <<<<<<<<<<<<<<
6094  *
6095  *                 memcpy(ipj, ipt, elsize2)
6096  */
6097         __pyx_v_pt = (__pyx_v_pt - 1);
6098 
6099         /* "tables/indexesextension.pyx":333
6100  *                 pt -= 1
6101  *
6102  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
6103  *                 ipj -= elsize2
6104  *                 ipt -= elsize2
6105  */
6106         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
6107 
6108         /* "tables/indexesextension.pyx":334
6109  *
6110  *                 memcpy(ipj, ipt, elsize2)
6111  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
6112  *                 ipt -= elsize2
6113  *
6114  */
6115         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
6116 
6117         /* "tables/indexesextension.pyx":335
6118  *                 memcpy(ipj, ipt, elsize2)
6119  *                 ipj -= elsize2
6120  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
6121  *
6122  *             pj[0] = vp
6123  */
6124         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
6125       }
6126 
6127       /* "tables/indexesextension.pyx":337
6128  *                 ipt -= elsize2
6129  *
6130  *             pj[0] = vp             # <<<<<<<<<<<<<<
6131  *             memcpy(ipj, ivp, elsize2)
6132  *
6133  */
6134       (__pyx_v_pj[0]) = __pyx_v_vp;
6135 
6136       /* "tables/indexesextension.pyx":338
6137  *
6138  *             pj[0] = vp
6139  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
6140  *
6141  *             pi += 1
6142  */
6143       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
6144 
6145       /* "tables/indexesextension.pyx":340
6146  *             memcpy(ipj, ivp, elsize2)
6147  *
6148  *             pi += 1             # <<<<<<<<<<<<<<
6149  *             ipi += elsize2
6150  *
6151  */
6152       __pyx_v_pi = (__pyx_v_pi + 1);
6153 
6154       /* "tables/indexesextension.pyx":341
6155  *
6156  *             pi += 1
6157  *             ipi += elsize2             # <<<<<<<<<<<<<<
6158  *
6159  *         if sptr == stack:
6160  */
6161       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
6162     }
6163 
6164     /* "tables/indexesextension.pyx":343
6165  *             ipi += elsize2
6166  *
6167  *         if sptr == stack:             # <<<<<<<<<<<<<<
6168  *             break
6169  *
6170  */
6171     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
6172     if (__pyx_t_1) {
6173 
6174       /* "tables/indexesextension.pyx":344
6175  *
6176  *         if sptr == stack:
6177  *             break             # <<<<<<<<<<<<<<
6178  *
6179  *         sptr -= 2
6180  */
6181       goto __pyx_L4_break;
6182 
6183       /* "tables/indexesextension.pyx":343
6184  *             ipi += elsize2
6185  *
6186  *         if sptr == stack:             # <<<<<<<<<<<<<<
6187  *             break
6188  *
6189  */
6190     }
6191 
6192     /* "tables/indexesextension.pyx":346
6193  *             break
6194  *
6195  *         sptr -= 2             # <<<<<<<<<<<<<<
6196  *         pl = sptr[0]
6197  *         pr = sptr[1]
6198  */
6199     __pyx_v_sptr = (__pyx_v_sptr - 2);
6200 
6201     /* "tables/indexesextension.pyx":347
6202  *
6203  *         sptr -= 2
6204  *         pl = sptr[0]             # <<<<<<<<<<<<<<
6205  *         pr = sptr[1]
6206  *
6207  */
6208     __pyx_v_pl = (__pyx_v_sptr[0]);
6209 
6210     /* "tables/indexesextension.pyx":348
6211  *         sptr -= 2
6212  *         pl = sptr[0]
6213  *         pr = sptr[1]             # <<<<<<<<<<<<<<
6214  *
6215  *         isptr -= 2
6216  */
6217     __pyx_v_pr = (__pyx_v_sptr[1]);
6218 
6219     /* "tables/indexesextension.pyx":350
6220  *         pr = sptr[1]
6221  *
6222  *         isptr -= 2             # <<<<<<<<<<<<<<
6223  *         ipl = isptr[0]
6224  *         ipr = isptr[1]
6225  */
6226     __pyx_v_isptr = (__pyx_v_isptr - 2);
6227 
6228     /* "tables/indexesextension.pyx":351
6229  *
6230  *         isptr -= 2
6231  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
6232  *         ipr = isptr[1]
6233  *
6234  */
6235     __pyx_v_ipl = (__pyx_v_isptr[0]);
6236 
6237     /* "tables/indexesextension.pyx":352
6238  *         isptr -= 2
6239  *         ipl = isptr[0]
6240  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
6241  *
6242  *     free(ivp)
6243  */
6244     __pyx_v_ipr = (__pyx_v_isptr[1]);
6245   }
6246   __pyx_L4_break:;
6247 
6248   /* "tables/indexesextension.pyx":354
6249  *         ipr = isptr[1]
6250  *
6251  *     free(ivp)             # <<<<<<<<<<<<<<
6252  *
6253  *
6254  */
6255   free(__pyx_v_ivp);
6256 
6257   /* "tables/indexesextension.pyx":215
6258  *
6259  * @cython.cdivision(True)
6260  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
6261  *     cdef number_type *pl = start1
6262  *     cdef number_type *pr = start1 + (n - 1)
6263  */
6264 
6265   /* function exit code */
6266 }
6267 
__pyx_fuse_3__pyx_f_6tables_16indexesextension__keysort(npy_int64 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)6268 static void __pyx_fuse_3__pyx_f_6tables_16indexesextension__keysort(npy_int64 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
6269   npy_int64 *__pyx_v_pl;
6270   npy_int64 *__pyx_v_pr;
6271   char *__pyx_v_ipl;
6272   char *__pyx_v_ipr;
6273   npy_int64 __pyx_v_vp;
6274   char *__pyx_v_ivp;
6275   npy_int64 *__pyx_v_stack[0x64];
6276   npy_int64 **__pyx_v_sptr;
6277   char *__pyx_v_istack[0x64];
6278   char **__pyx_v_isptr;
6279   CYTHON_UNUSED size_t __pyx_v_stack_index;
6280   npy_int64 *__pyx_v_pm;
6281   npy_int64 *__pyx_v_pi;
6282   npy_int64 *__pyx_v_pj;
6283   npy_int64 *__pyx_v_pt;
6284   char *__pyx_v_ipm;
6285   char *__pyx_v_ipi;
6286   char *__pyx_v_ipj;
6287   char *__pyx_v_ipt;
6288   int __pyx_t_1;
6289   npy_int64 __pyx_t_2;
6290   npy_int64 __pyx_t_3;
6291   int __pyx_t_4;
6292 
6293   /* "tables/indexesextension.pyx":216
6294  * @cython.cdivision(True)
6295  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
6296  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
6297  *     cdef number_type *pr = start1 + (n - 1)
6298  *
6299  */
6300   __pyx_v_pl = __pyx_v_start1;
6301 
6302   /* "tables/indexesextension.pyx":217
6303  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
6304  *     cdef number_type *pl = start1
6305  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
6306  *
6307  *     cdef char *ipl = start2
6308  */
6309   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
6310 
6311   /* "tables/indexesextension.pyx":219
6312  *     cdef number_type *pr = start1 + (n - 1)
6313  *
6314  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
6315  *     cdef char *ipr = start2 + (n - 1) * elsize2
6316  *
6317  */
6318   __pyx_v_ipl = __pyx_v_start2;
6319 
6320   /* "tables/indexesextension.pyx":220
6321  *
6322  *     cdef char *ipl = start2
6323  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
6324  *
6325  *     cdef number_type vp
6326  */
6327   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
6328 
6329   /* "tables/indexesextension.pyx":223
6330  *
6331  *     cdef number_type vp
6332  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
6333  *
6334  *     cdef number_type *stack[PYA_QS_STACK]
6335  */
6336   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
6337 
6338   /* "tables/indexesextension.pyx":226
6339  *
6340  *     cdef number_type *stack[PYA_QS_STACK]
6341  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
6342  *
6343  *     cdef char *istack[PYA_QS_STACK]
6344  */
6345   __pyx_v_sptr = __pyx_v_stack;
6346 
6347   /* "tables/indexesextension.pyx":229
6348  *
6349  *     cdef char *istack[PYA_QS_STACK]
6350  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
6351  *
6352  *     cdef size_t stack_index = 0
6353  */
6354   __pyx_v_isptr = __pyx_v_istack;
6355 
6356   /* "tables/indexesextension.pyx":231
6357  *     cdef char **isptr = istack
6358  *
6359  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
6360  *
6361  *     cdef number_type *pm
6362  */
6363   __pyx_v_stack_index = 0;
6364 
6365   /* "tables/indexesextension.pyx":242
6366  *     cdef char *ipt
6367  *
6368  *     while True:             # <<<<<<<<<<<<<<
6369  *         while pr - pl > SMALL_QUICKSORT:
6370  *             pm  = pl + ((pr - pl) >> 1)
6371  */
6372   while (1) {
6373 
6374     /* "tables/indexesextension.pyx":243
6375  *
6376  *     while True:
6377  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
6378  *             pm  = pl + ((pr - pl) >> 1)
6379  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
6380  */
6381     while (1) {
6382       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
6383       if (!__pyx_t_1) break;
6384 
6385       /* "tables/indexesextension.pyx":244
6386  *     while True:
6387  *         while pr - pl > SMALL_QUICKSORT:
6388  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
6389  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
6390  *
6391  */
6392       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
6393 
6394       /* "tables/indexesextension.pyx":245
6395  *         while pr - pl > SMALL_QUICKSORT:
6396  *             pm  = pl + ((pr - pl) >> 1)
6397  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
6398  *
6399  *             if less_than(pm, pl):
6400  */
6401       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
6402 
6403       /* "tables/indexesextension.pyx":247
6404  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
6405  *
6406  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
6407  *                 pm[0], pl[0] =  pl[0], pm[0]
6408  *                 swap_bytes(ipm, ipl, elsize2)
6409  */
6410       __pyx_t_1 = (__pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
6411       if (__pyx_t_1) {
6412 
6413         /* "tables/indexesextension.pyx":248
6414  *
6415  *             if less_than(pm, pl):
6416  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
6417  *                 swap_bytes(ipm, ipl, elsize2)
6418  *
6419  */
6420         __pyx_t_2 = (__pyx_v_pl[0]);
6421         __pyx_t_3 = (__pyx_v_pm[0]);
6422         (__pyx_v_pm[0]) = __pyx_t_2;
6423         (__pyx_v_pl[0]) = __pyx_t_3;
6424 
6425         /* "tables/indexesextension.pyx":249
6426  *             if less_than(pm, pl):
6427  *                 pm[0], pl[0] =  pl[0], pm[0]
6428  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
6429  *
6430  *             if less_than(pr, pm):
6431  */
6432         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
6433 
6434         /* "tables/indexesextension.pyx":247
6435  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
6436  *
6437  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
6438  *                 pm[0], pl[0] =  pl[0], pm[0]
6439  *                 swap_bytes(ipm, ipl, elsize2)
6440  */
6441       }
6442 
6443       /* "tables/indexesextension.pyx":251
6444  *                 swap_bytes(ipm, ipl, elsize2)
6445  *
6446  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
6447  *                 pr[0], pm[0] =  pm[0], pr[0]
6448  *                 swap_bytes(ipr, ipm, elsize2)
6449  */
6450       __pyx_t_1 = (__pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
6451       if (__pyx_t_1) {
6452 
6453         /* "tables/indexesextension.pyx":252
6454  *
6455  *             if less_than(pr, pm):
6456  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
6457  *                 swap_bytes(ipr, ipm, elsize2)
6458  *
6459  */
6460         __pyx_t_3 = (__pyx_v_pm[0]);
6461         __pyx_t_2 = (__pyx_v_pr[0]);
6462         (__pyx_v_pr[0]) = __pyx_t_3;
6463         (__pyx_v_pm[0]) = __pyx_t_2;
6464 
6465         /* "tables/indexesextension.pyx":253
6466  *             if less_than(pr, pm):
6467  *                 pr[0], pm[0] =  pm[0], pr[0]
6468  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
6469  *
6470  *             if less_than(pm, pl):
6471  */
6472         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
6473 
6474         /* "tables/indexesextension.pyx":251
6475  *                 swap_bytes(ipm, ipl, elsize2)
6476  *
6477  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
6478  *                 pr[0], pm[0] =  pm[0], pr[0]
6479  *                 swap_bytes(ipr, ipm, elsize2)
6480  */
6481       }
6482 
6483       /* "tables/indexesextension.pyx":255
6484  *                 swap_bytes(ipr, ipm, elsize2)
6485  *
6486  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
6487  *                 pm[0], pl[0] =  pl[0], pm[0]
6488  *                 swap_bytes(ipm, ipl, elsize2)
6489  */
6490       __pyx_t_1 = (__pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
6491       if (__pyx_t_1) {
6492 
6493         /* "tables/indexesextension.pyx":256
6494  *
6495  *             if less_than(pm, pl):
6496  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
6497  *                 swap_bytes(ipm, ipl, elsize2)
6498  *
6499  */
6500         __pyx_t_2 = (__pyx_v_pl[0]);
6501         __pyx_t_3 = (__pyx_v_pm[0]);
6502         (__pyx_v_pm[0]) = __pyx_t_2;
6503         (__pyx_v_pl[0]) = __pyx_t_3;
6504 
6505         /* "tables/indexesextension.pyx":257
6506  *             if less_than(pm, pl):
6507  *                 pm[0], pl[0] =  pl[0], pm[0]
6508  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
6509  *
6510  *             vp = pm[0]
6511  */
6512         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
6513 
6514         /* "tables/indexesextension.pyx":255
6515  *                 swap_bytes(ipr, ipm, elsize2)
6516  *
6517  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
6518  *                 pm[0], pl[0] =  pl[0], pm[0]
6519  *                 swap_bytes(ipm, ipl, elsize2)
6520  */
6521       }
6522 
6523       /* "tables/indexesextension.pyx":259
6524  *                 swap_bytes(ipm, ipl, elsize2)
6525  *
6526  *             vp = pm[0]             # <<<<<<<<<<<<<<
6527  *
6528  *             pi = pl
6529  */
6530       __pyx_v_vp = (__pyx_v_pm[0]);
6531 
6532       /* "tables/indexesextension.pyx":261
6533  *             vp = pm[0]
6534  *
6535  *             pi = pl             # <<<<<<<<<<<<<<
6536  *             ipi = ipl
6537  *
6538  */
6539       __pyx_v_pi = __pyx_v_pl;
6540 
6541       /* "tables/indexesextension.pyx":262
6542  *
6543  *             pi = pl
6544  *             ipi = ipl             # <<<<<<<<<<<<<<
6545  *
6546  *             pj = pr - 1
6547  */
6548       __pyx_v_ipi = __pyx_v_ipl;
6549 
6550       /* "tables/indexesextension.pyx":264
6551  *             ipi = ipl
6552  *
6553  *             pj = pr - 1             # <<<<<<<<<<<<<<
6554  *             ipj = ipr - elsize2
6555  *
6556  */
6557       __pyx_v_pj = (__pyx_v_pr - 1);
6558 
6559       /* "tables/indexesextension.pyx":265
6560  *
6561  *             pj = pr - 1
6562  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
6563  *
6564  *             pm[0], pj[0] = pj[0], pm[0]
6565  */
6566       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
6567 
6568       /* "tables/indexesextension.pyx":267
6569  *             ipj = ipr - elsize2
6570  *
6571  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
6572  *             swap_bytes(ipm, ipj, elsize2)
6573  *
6574  */
6575       __pyx_t_3 = (__pyx_v_pj[0]);
6576       __pyx_t_2 = (__pyx_v_pm[0]);
6577       (__pyx_v_pm[0]) = __pyx_t_3;
6578       (__pyx_v_pj[0]) = __pyx_t_2;
6579 
6580       /* "tables/indexesextension.pyx":268
6581  *
6582  *             pm[0], pj[0] = pj[0], pm[0]
6583  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
6584  *
6585  *             while True:
6586  */
6587       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
6588 
6589       /* "tables/indexesextension.pyx":270
6590  *             swap_bytes(ipm, ipj, elsize2)
6591  *
6592  *             while True:             # <<<<<<<<<<<<<<
6593  *                 pi += 1
6594  *                 ipi += elsize2
6595  */
6596       while (1) {
6597 
6598         /* "tables/indexesextension.pyx":271
6599  *
6600  *             while True:
6601  *                 pi += 1             # <<<<<<<<<<<<<<
6602  *                 ipi += elsize2
6603  *                 while less_than(pi, &vp):
6604  */
6605         __pyx_v_pi = (__pyx_v_pi + 1);
6606 
6607         /* "tables/indexesextension.pyx":272
6608  *             while True:
6609  *                 pi += 1
6610  *                 ipi += elsize2             # <<<<<<<<<<<<<<
6611  *                 while less_than(pi, &vp):
6612  *                     pi += 1
6613  */
6614         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
6615 
6616         /* "tables/indexesextension.pyx":273
6617  *                 pi += 1
6618  *                 ipi += elsize2
6619  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
6620  *                     pi += 1
6621  *                     ipi += elsize2
6622  */
6623         while (1) {
6624           __pyx_t_1 = (__pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
6625           if (!__pyx_t_1) break;
6626 
6627           /* "tables/indexesextension.pyx":274
6628  *                 ipi += elsize2
6629  *                 while less_than(pi, &vp):
6630  *                     pi += 1             # <<<<<<<<<<<<<<
6631  *                     ipi += elsize2
6632  *
6633  */
6634           __pyx_v_pi = (__pyx_v_pi + 1);
6635 
6636           /* "tables/indexesextension.pyx":275
6637  *                 while less_than(pi, &vp):
6638  *                     pi += 1
6639  *                     ipi += elsize2             # <<<<<<<<<<<<<<
6640  *
6641  *                 pj -= 1
6642  */
6643           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
6644         }
6645 
6646         /* "tables/indexesextension.pyx":277
6647  *                     ipi += elsize2
6648  *
6649  *                 pj -= 1             # <<<<<<<<<<<<<<
6650  *                 ipj -= elsize2
6651  *                 while less_than(&vp, pj):
6652  */
6653         __pyx_v_pj = (__pyx_v_pj - 1);
6654 
6655         /* "tables/indexesextension.pyx":278
6656  *
6657  *                 pj -= 1
6658  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
6659  *                 while less_than(&vp, pj):
6660  *                     pj -= 1
6661  */
6662         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
6663 
6664         /* "tables/indexesextension.pyx":279
6665  *                 pj -= 1
6666  *                 ipj -= elsize2
6667  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
6668  *                     pj -= 1
6669  *                     ipj -= elsize2
6670  */
6671         while (1) {
6672           __pyx_t_1 = (__pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
6673           if (!__pyx_t_1) break;
6674 
6675           /* "tables/indexesextension.pyx":280
6676  *                 ipj -= elsize2
6677  *                 while less_than(&vp, pj):
6678  *                     pj -= 1             # <<<<<<<<<<<<<<
6679  *                     ipj -= elsize2
6680  *
6681  */
6682           __pyx_v_pj = (__pyx_v_pj - 1);
6683 
6684           /* "tables/indexesextension.pyx":281
6685  *                 while less_than(&vp, pj):
6686  *                     pj -= 1
6687  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
6688  *
6689  *                 if pi >= pj:
6690  */
6691           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
6692         }
6693 
6694         /* "tables/indexesextension.pyx":283
6695  *                     ipj -= elsize2
6696  *
6697  *                 if pi >= pj:             # <<<<<<<<<<<<<<
6698  *                     break
6699  *
6700  */
6701         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
6702         if (__pyx_t_1) {
6703 
6704           /* "tables/indexesextension.pyx":284
6705  *
6706  *                 if pi >= pj:
6707  *                     break             # <<<<<<<<<<<<<<
6708  *
6709  *                 pi[0], pj[0] = pj[0], pi[0]
6710  */
6711           goto __pyx_L11_break;
6712 
6713           /* "tables/indexesextension.pyx":283
6714  *                     ipj -= elsize2
6715  *
6716  *                 if pi >= pj:             # <<<<<<<<<<<<<<
6717  *                     break
6718  *
6719  */
6720         }
6721 
6722         /* "tables/indexesextension.pyx":286
6723  *                     break
6724  *
6725  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
6726  *                 swap_bytes(ipi, ipj, elsize2)
6727  *
6728  */
6729         __pyx_t_2 = (__pyx_v_pj[0]);
6730         __pyx_t_3 = (__pyx_v_pi[0]);
6731         (__pyx_v_pi[0]) = __pyx_t_2;
6732         (__pyx_v_pj[0]) = __pyx_t_3;
6733 
6734         /* "tables/indexesextension.pyx":287
6735  *
6736  *                 pi[0], pj[0] = pj[0], pi[0]
6737  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
6738  *
6739  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
6740  */
6741         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
6742       }
6743       __pyx_L11_break:;
6744 
6745       /* "tables/indexesextension.pyx":289
6746  *                 swap_bytes(ipi, ipj, elsize2)
6747  *
6748  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
6749  *             swap_bytes(ipi, ipr-elsize2, elsize2)
6750  *
6751  */
6752       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
6753       __pyx_t_2 = (__pyx_v_pi[0]);
6754       (__pyx_v_pi[0]) = __pyx_t_3;
6755       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
6756 
6757       /* "tables/indexesextension.pyx":290
6758  *
6759  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
6760  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
6761  *
6762  *             # push largest partition on stack and proceed with the other
6763  */
6764       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
6765 
6766       /* "tables/indexesextension.pyx":293
6767  *
6768  *             # push largest partition on stack and proceed with the other
6769  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
6770  *                 sptr[0] = pi + 1
6771  *                 sptr[1] = pr
6772  */
6773       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
6774       if (__pyx_t_1) {
6775 
6776         /* "tables/indexesextension.pyx":294
6777  *             # push largest partition on stack and proceed with the other
6778  *             if (pi - pl) < (pr - pi):
6779  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
6780  *                 sptr[1] = pr
6781  *                 sptr += 2
6782  */
6783         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
6784 
6785         /* "tables/indexesextension.pyx":295
6786  *             if (pi - pl) < (pr - pi):
6787  *                 sptr[0] = pi + 1
6788  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
6789  *                 sptr += 2
6790  *
6791  */
6792         (__pyx_v_sptr[1]) = __pyx_v_pr;
6793 
6794         /* "tables/indexesextension.pyx":296
6795  *                 sptr[0] = pi + 1
6796  *                 sptr[1] = pr
6797  *                 sptr += 2             # <<<<<<<<<<<<<<
6798  *
6799  *                 isptr[0] = ipi + elsize2
6800  */
6801         __pyx_v_sptr = (__pyx_v_sptr + 2);
6802 
6803         /* "tables/indexesextension.pyx":298
6804  *                 sptr += 2
6805  *
6806  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
6807  *                 isptr[1] = ipr
6808  *                 isptr += 2
6809  */
6810         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
6811 
6812         /* "tables/indexesextension.pyx":299
6813  *
6814  *                 isptr[0] = ipi + elsize2
6815  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
6816  *                 isptr += 2
6817  *
6818  */
6819         (__pyx_v_isptr[1]) = __pyx_v_ipr;
6820 
6821         /* "tables/indexesextension.pyx":300
6822  *                 isptr[0] = ipi + elsize2
6823  *                 isptr[1] = ipr
6824  *                 isptr += 2             # <<<<<<<<<<<<<<
6825  *
6826  *                 pr = pi - 1
6827  */
6828         __pyx_v_isptr = (__pyx_v_isptr + 2);
6829 
6830         /* "tables/indexesextension.pyx":302
6831  *                 isptr += 2
6832  *
6833  *                 pr = pi - 1             # <<<<<<<<<<<<<<
6834  *                 ipr = ipi - elsize2
6835  *             else:
6836  */
6837         __pyx_v_pr = (__pyx_v_pi - 1);
6838 
6839         /* "tables/indexesextension.pyx":303
6840  *
6841  *                 pr = pi - 1
6842  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
6843  *             else:
6844  *                 sptr[0] = pl
6845  */
6846         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
6847 
6848         /* "tables/indexesextension.pyx":293
6849  *
6850  *             # push largest partition on stack and proceed with the other
6851  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
6852  *                 sptr[0] = pi + 1
6853  *                 sptr[1] = pr
6854  */
6855         goto __pyx_L17;
6856       }
6857 
6858       /* "tables/indexesextension.pyx":305
6859  *                 ipr = ipi - elsize2
6860  *             else:
6861  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
6862  *                 sptr[1] = pi - 1
6863  *                 sptr += 2
6864  */
6865       /*else*/ {
6866         (__pyx_v_sptr[0]) = __pyx_v_pl;
6867 
6868         /* "tables/indexesextension.pyx":306
6869  *             else:
6870  *                 sptr[0] = pl
6871  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
6872  *                 sptr += 2
6873  *
6874  */
6875         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
6876 
6877         /* "tables/indexesextension.pyx":307
6878  *                 sptr[0] = pl
6879  *                 sptr[1] = pi - 1
6880  *                 sptr += 2             # <<<<<<<<<<<<<<
6881  *
6882  *                 isptr[0] = ipl
6883  */
6884         __pyx_v_sptr = (__pyx_v_sptr + 2);
6885 
6886         /* "tables/indexesextension.pyx":309
6887  *                 sptr += 2
6888  *
6889  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
6890  *                 isptr[1] = ipi - elsize2
6891  *                 isptr += 2
6892  */
6893         (__pyx_v_isptr[0]) = __pyx_v_ipl;
6894 
6895         /* "tables/indexesextension.pyx":310
6896  *
6897  *                 isptr[0] = ipl
6898  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
6899  *                 isptr += 2
6900  *
6901  */
6902         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
6903 
6904         /* "tables/indexesextension.pyx":311
6905  *                 isptr[0] = ipl
6906  *                 isptr[1] = ipi - elsize2
6907  *                 isptr += 2             # <<<<<<<<<<<<<<
6908  *
6909  *                 pl = pi + 1
6910  */
6911         __pyx_v_isptr = (__pyx_v_isptr + 2);
6912 
6913         /* "tables/indexesextension.pyx":313
6914  *                 isptr += 2
6915  *
6916  *                 pl = pi + 1             # <<<<<<<<<<<<<<
6917  *                 ipl = ipi + elsize2
6918  *
6919  */
6920         __pyx_v_pl = (__pyx_v_pi + 1);
6921 
6922         /* "tables/indexesextension.pyx":314
6923  *
6924  *                 pl = pi + 1
6925  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
6926  *
6927  *         pi = pl + 1
6928  */
6929         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
6930       }
6931       __pyx_L17:;
6932     }
6933 
6934     /* "tables/indexesextension.pyx":316
6935  *                 ipl = ipi + elsize2
6936  *
6937  *         pi = pl + 1             # <<<<<<<<<<<<<<
6938  *         ipi = ipl + elsize2
6939  *         while pi <= pr:
6940  */
6941     __pyx_v_pi = (__pyx_v_pl + 1);
6942 
6943     /* "tables/indexesextension.pyx":317
6944  *
6945  *         pi = pl + 1
6946  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
6947  *         while pi <= pr:
6948  *             vp = pi[0]
6949  */
6950     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
6951 
6952     /* "tables/indexesextension.pyx":318
6953  *         pi = pl + 1
6954  *         ipi = ipl + elsize2
6955  *         while pi <= pr:             # <<<<<<<<<<<<<<
6956  *             vp = pi[0]
6957  *             memcpy(ivp, ipi, elsize2)
6958  */
6959     while (1) {
6960       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
6961       if (!__pyx_t_1) break;
6962 
6963       /* "tables/indexesextension.pyx":319
6964  *         ipi = ipl + elsize2
6965  *         while pi <= pr:
6966  *             vp = pi[0]             # <<<<<<<<<<<<<<
6967  *             memcpy(ivp, ipi, elsize2)
6968  *
6969  */
6970       __pyx_v_vp = (__pyx_v_pi[0]);
6971 
6972       /* "tables/indexesextension.pyx":320
6973  *         while pi <= pr:
6974  *             vp = pi[0]
6975  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
6976  *
6977  *             pj = pi
6978  */
6979       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
6980 
6981       /* "tables/indexesextension.pyx":322
6982  *             memcpy(ivp, ipi, elsize2)
6983  *
6984  *             pj = pi             # <<<<<<<<<<<<<<
6985  *             pt = pi - 1
6986  *
6987  */
6988       __pyx_v_pj = __pyx_v_pi;
6989 
6990       /* "tables/indexesextension.pyx":323
6991  *
6992  *             pj = pi
6993  *             pt = pi - 1             # <<<<<<<<<<<<<<
6994  *
6995  *             ipj = ipi
6996  */
6997       __pyx_v_pt = (__pyx_v_pi - 1);
6998 
6999       /* "tables/indexesextension.pyx":325
7000  *             pt = pi - 1
7001  *
7002  *             ipj = ipi             # <<<<<<<<<<<<<<
7003  *             ipt = ipi - elsize2
7004  *
7005  */
7006       __pyx_v_ipj = __pyx_v_ipi;
7007 
7008       /* "tables/indexesextension.pyx":326
7009  *
7010  *             ipj = ipi
7011  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
7012  *
7013  *             while pj > pl and less_than(&vp, pt):
7014  */
7015       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
7016 
7017       /* "tables/indexesextension.pyx":328
7018  *             ipt = ipi - elsize2
7019  *
7020  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
7021  *                 pj[0] = pt[0]
7022  *                 pj -= 1
7023  */
7024       while (1) {
7025         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
7026         if (__pyx_t_4) {
7027         } else {
7028           __pyx_t_1 = __pyx_t_4;
7029           goto __pyx_L22_bool_binop_done;
7030         }
7031         __pyx_t_4 = (__pyx_fuse_3__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
7032         __pyx_t_1 = __pyx_t_4;
7033         __pyx_L22_bool_binop_done:;
7034         if (!__pyx_t_1) break;
7035 
7036         /* "tables/indexesextension.pyx":329
7037  *
7038  *             while pj > pl and less_than(&vp, pt):
7039  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
7040  *                 pj -= 1
7041  *                 pt -= 1
7042  */
7043         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
7044 
7045         /* "tables/indexesextension.pyx":330
7046  *             while pj > pl and less_than(&vp, pt):
7047  *                 pj[0] = pt[0]
7048  *                 pj -= 1             # <<<<<<<<<<<<<<
7049  *                 pt -= 1
7050  *
7051  */
7052         __pyx_v_pj = (__pyx_v_pj - 1);
7053 
7054         /* "tables/indexesextension.pyx":331
7055  *                 pj[0] = pt[0]
7056  *                 pj -= 1
7057  *                 pt -= 1             # <<<<<<<<<<<<<<
7058  *
7059  *                 memcpy(ipj, ipt, elsize2)
7060  */
7061         __pyx_v_pt = (__pyx_v_pt - 1);
7062 
7063         /* "tables/indexesextension.pyx":333
7064  *                 pt -= 1
7065  *
7066  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
7067  *                 ipj -= elsize2
7068  *                 ipt -= elsize2
7069  */
7070         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
7071 
7072         /* "tables/indexesextension.pyx":334
7073  *
7074  *                 memcpy(ipj, ipt, elsize2)
7075  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
7076  *                 ipt -= elsize2
7077  *
7078  */
7079         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
7080 
7081         /* "tables/indexesextension.pyx":335
7082  *                 memcpy(ipj, ipt, elsize2)
7083  *                 ipj -= elsize2
7084  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
7085  *
7086  *             pj[0] = vp
7087  */
7088         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
7089       }
7090 
7091       /* "tables/indexesextension.pyx":337
7092  *                 ipt -= elsize2
7093  *
7094  *             pj[0] = vp             # <<<<<<<<<<<<<<
7095  *             memcpy(ipj, ivp, elsize2)
7096  *
7097  */
7098       (__pyx_v_pj[0]) = __pyx_v_vp;
7099 
7100       /* "tables/indexesextension.pyx":338
7101  *
7102  *             pj[0] = vp
7103  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
7104  *
7105  *             pi += 1
7106  */
7107       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
7108 
7109       /* "tables/indexesextension.pyx":340
7110  *             memcpy(ipj, ivp, elsize2)
7111  *
7112  *             pi += 1             # <<<<<<<<<<<<<<
7113  *             ipi += elsize2
7114  *
7115  */
7116       __pyx_v_pi = (__pyx_v_pi + 1);
7117 
7118       /* "tables/indexesextension.pyx":341
7119  *
7120  *             pi += 1
7121  *             ipi += elsize2             # <<<<<<<<<<<<<<
7122  *
7123  *         if sptr == stack:
7124  */
7125       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
7126     }
7127 
7128     /* "tables/indexesextension.pyx":343
7129  *             ipi += elsize2
7130  *
7131  *         if sptr == stack:             # <<<<<<<<<<<<<<
7132  *             break
7133  *
7134  */
7135     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
7136     if (__pyx_t_1) {
7137 
7138       /* "tables/indexesextension.pyx":344
7139  *
7140  *         if sptr == stack:
7141  *             break             # <<<<<<<<<<<<<<
7142  *
7143  *         sptr -= 2
7144  */
7145       goto __pyx_L4_break;
7146 
7147       /* "tables/indexesextension.pyx":343
7148  *             ipi += elsize2
7149  *
7150  *         if sptr == stack:             # <<<<<<<<<<<<<<
7151  *             break
7152  *
7153  */
7154     }
7155 
7156     /* "tables/indexesextension.pyx":346
7157  *             break
7158  *
7159  *         sptr -= 2             # <<<<<<<<<<<<<<
7160  *         pl = sptr[0]
7161  *         pr = sptr[1]
7162  */
7163     __pyx_v_sptr = (__pyx_v_sptr - 2);
7164 
7165     /* "tables/indexesextension.pyx":347
7166  *
7167  *         sptr -= 2
7168  *         pl = sptr[0]             # <<<<<<<<<<<<<<
7169  *         pr = sptr[1]
7170  *
7171  */
7172     __pyx_v_pl = (__pyx_v_sptr[0]);
7173 
7174     /* "tables/indexesextension.pyx":348
7175  *         sptr -= 2
7176  *         pl = sptr[0]
7177  *         pr = sptr[1]             # <<<<<<<<<<<<<<
7178  *
7179  *         isptr -= 2
7180  */
7181     __pyx_v_pr = (__pyx_v_sptr[1]);
7182 
7183     /* "tables/indexesextension.pyx":350
7184  *         pr = sptr[1]
7185  *
7186  *         isptr -= 2             # <<<<<<<<<<<<<<
7187  *         ipl = isptr[0]
7188  *         ipr = isptr[1]
7189  */
7190     __pyx_v_isptr = (__pyx_v_isptr - 2);
7191 
7192     /* "tables/indexesextension.pyx":351
7193  *
7194  *         isptr -= 2
7195  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
7196  *         ipr = isptr[1]
7197  *
7198  */
7199     __pyx_v_ipl = (__pyx_v_isptr[0]);
7200 
7201     /* "tables/indexesextension.pyx":352
7202  *         isptr -= 2
7203  *         ipl = isptr[0]
7204  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
7205  *
7206  *     free(ivp)
7207  */
7208     __pyx_v_ipr = (__pyx_v_isptr[1]);
7209   }
7210   __pyx_L4_break:;
7211 
7212   /* "tables/indexesextension.pyx":354
7213  *         ipr = isptr[1]
7214  *
7215  *     free(ivp)             # <<<<<<<<<<<<<<
7216  *
7217  *
7218  */
7219   free(__pyx_v_ivp);
7220 
7221   /* "tables/indexesextension.pyx":215
7222  *
7223  * @cython.cdivision(True)
7224  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
7225  *     cdef number_type *pl = start1
7226  *     cdef number_type *pr = start1 + (n - 1)
7227  */
7228 
7229   /* function exit code */
7230 }
7231 
__pyx_fuse_4__pyx_f_6tables_16indexesextension__keysort(npy_uint8 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)7232 static void __pyx_fuse_4__pyx_f_6tables_16indexesextension__keysort(npy_uint8 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
7233   npy_uint8 *__pyx_v_pl;
7234   npy_uint8 *__pyx_v_pr;
7235   char *__pyx_v_ipl;
7236   char *__pyx_v_ipr;
7237   npy_uint8 __pyx_v_vp;
7238   char *__pyx_v_ivp;
7239   npy_uint8 *__pyx_v_stack[0x64];
7240   npy_uint8 **__pyx_v_sptr;
7241   char *__pyx_v_istack[0x64];
7242   char **__pyx_v_isptr;
7243   CYTHON_UNUSED size_t __pyx_v_stack_index;
7244   npy_uint8 *__pyx_v_pm;
7245   npy_uint8 *__pyx_v_pi;
7246   npy_uint8 *__pyx_v_pj;
7247   npy_uint8 *__pyx_v_pt;
7248   char *__pyx_v_ipm;
7249   char *__pyx_v_ipi;
7250   char *__pyx_v_ipj;
7251   char *__pyx_v_ipt;
7252   int __pyx_t_1;
7253   npy_uint8 __pyx_t_2;
7254   npy_uint8 __pyx_t_3;
7255   int __pyx_t_4;
7256 
7257   /* "tables/indexesextension.pyx":216
7258  * @cython.cdivision(True)
7259  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
7260  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
7261  *     cdef number_type *pr = start1 + (n - 1)
7262  *
7263  */
7264   __pyx_v_pl = __pyx_v_start1;
7265 
7266   /* "tables/indexesextension.pyx":217
7267  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
7268  *     cdef number_type *pl = start1
7269  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
7270  *
7271  *     cdef char *ipl = start2
7272  */
7273   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
7274 
7275   /* "tables/indexesextension.pyx":219
7276  *     cdef number_type *pr = start1 + (n - 1)
7277  *
7278  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
7279  *     cdef char *ipr = start2 + (n - 1) * elsize2
7280  *
7281  */
7282   __pyx_v_ipl = __pyx_v_start2;
7283 
7284   /* "tables/indexesextension.pyx":220
7285  *
7286  *     cdef char *ipl = start2
7287  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
7288  *
7289  *     cdef number_type vp
7290  */
7291   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
7292 
7293   /* "tables/indexesextension.pyx":223
7294  *
7295  *     cdef number_type vp
7296  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
7297  *
7298  *     cdef number_type *stack[PYA_QS_STACK]
7299  */
7300   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
7301 
7302   /* "tables/indexesextension.pyx":226
7303  *
7304  *     cdef number_type *stack[PYA_QS_STACK]
7305  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
7306  *
7307  *     cdef char *istack[PYA_QS_STACK]
7308  */
7309   __pyx_v_sptr = __pyx_v_stack;
7310 
7311   /* "tables/indexesextension.pyx":229
7312  *
7313  *     cdef char *istack[PYA_QS_STACK]
7314  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
7315  *
7316  *     cdef size_t stack_index = 0
7317  */
7318   __pyx_v_isptr = __pyx_v_istack;
7319 
7320   /* "tables/indexesextension.pyx":231
7321  *     cdef char **isptr = istack
7322  *
7323  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
7324  *
7325  *     cdef number_type *pm
7326  */
7327   __pyx_v_stack_index = 0;
7328 
7329   /* "tables/indexesextension.pyx":242
7330  *     cdef char *ipt
7331  *
7332  *     while True:             # <<<<<<<<<<<<<<
7333  *         while pr - pl > SMALL_QUICKSORT:
7334  *             pm  = pl + ((pr - pl) >> 1)
7335  */
7336   while (1) {
7337 
7338     /* "tables/indexesextension.pyx":243
7339  *
7340  *     while True:
7341  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
7342  *             pm  = pl + ((pr - pl) >> 1)
7343  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
7344  */
7345     while (1) {
7346       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
7347       if (!__pyx_t_1) break;
7348 
7349       /* "tables/indexesextension.pyx":244
7350  *     while True:
7351  *         while pr - pl > SMALL_QUICKSORT:
7352  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
7353  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
7354  *
7355  */
7356       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
7357 
7358       /* "tables/indexesextension.pyx":245
7359  *         while pr - pl > SMALL_QUICKSORT:
7360  *             pm  = pl + ((pr - pl) >> 1)
7361  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
7362  *
7363  *             if less_than(pm, pl):
7364  */
7365       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
7366 
7367       /* "tables/indexesextension.pyx":247
7368  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
7369  *
7370  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
7371  *                 pm[0], pl[0] =  pl[0], pm[0]
7372  *                 swap_bytes(ipm, ipl, elsize2)
7373  */
7374       __pyx_t_1 = (__pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
7375       if (__pyx_t_1) {
7376 
7377         /* "tables/indexesextension.pyx":248
7378  *
7379  *             if less_than(pm, pl):
7380  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
7381  *                 swap_bytes(ipm, ipl, elsize2)
7382  *
7383  */
7384         __pyx_t_2 = (__pyx_v_pl[0]);
7385         __pyx_t_3 = (__pyx_v_pm[0]);
7386         (__pyx_v_pm[0]) = __pyx_t_2;
7387         (__pyx_v_pl[0]) = __pyx_t_3;
7388 
7389         /* "tables/indexesextension.pyx":249
7390  *             if less_than(pm, pl):
7391  *                 pm[0], pl[0] =  pl[0], pm[0]
7392  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
7393  *
7394  *             if less_than(pr, pm):
7395  */
7396         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
7397 
7398         /* "tables/indexesextension.pyx":247
7399  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
7400  *
7401  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
7402  *                 pm[0], pl[0] =  pl[0], pm[0]
7403  *                 swap_bytes(ipm, ipl, elsize2)
7404  */
7405       }
7406 
7407       /* "tables/indexesextension.pyx":251
7408  *                 swap_bytes(ipm, ipl, elsize2)
7409  *
7410  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
7411  *                 pr[0], pm[0] =  pm[0], pr[0]
7412  *                 swap_bytes(ipr, ipm, elsize2)
7413  */
7414       __pyx_t_1 = (__pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
7415       if (__pyx_t_1) {
7416 
7417         /* "tables/indexesextension.pyx":252
7418  *
7419  *             if less_than(pr, pm):
7420  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
7421  *                 swap_bytes(ipr, ipm, elsize2)
7422  *
7423  */
7424         __pyx_t_3 = (__pyx_v_pm[0]);
7425         __pyx_t_2 = (__pyx_v_pr[0]);
7426         (__pyx_v_pr[0]) = __pyx_t_3;
7427         (__pyx_v_pm[0]) = __pyx_t_2;
7428 
7429         /* "tables/indexesextension.pyx":253
7430  *             if less_than(pr, pm):
7431  *                 pr[0], pm[0] =  pm[0], pr[0]
7432  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
7433  *
7434  *             if less_than(pm, pl):
7435  */
7436         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
7437 
7438         /* "tables/indexesextension.pyx":251
7439  *                 swap_bytes(ipm, ipl, elsize2)
7440  *
7441  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
7442  *                 pr[0], pm[0] =  pm[0], pr[0]
7443  *                 swap_bytes(ipr, ipm, elsize2)
7444  */
7445       }
7446 
7447       /* "tables/indexesextension.pyx":255
7448  *                 swap_bytes(ipr, ipm, elsize2)
7449  *
7450  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
7451  *                 pm[0], pl[0] =  pl[0], pm[0]
7452  *                 swap_bytes(ipm, ipl, elsize2)
7453  */
7454       __pyx_t_1 = (__pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
7455       if (__pyx_t_1) {
7456 
7457         /* "tables/indexesextension.pyx":256
7458  *
7459  *             if less_than(pm, pl):
7460  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
7461  *                 swap_bytes(ipm, ipl, elsize2)
7462  *
7463  */
7464         __pyx_t_2 = (__pyx_v_pl[0]);
7465         __pyx_t_3 = (__pyx_v_pm[0]);
7466         (__pyx_v_pm[0]) = __pyx_t_2;
7467         (__pyx_v_pl[0]) = __pyx_t_3;
7468 
7469         /* "tables/indexesextension.pyx":257
7470  *             if less_than(pm, pl):
7471  *                 pm[0], pl[0] =  pl[0], pm[0]
7472  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
7473  *
7474  *             vp = pm[0]
7475  */
7476         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
7477 
7478         /* "tables/indexesextension.pyx":255
7479  *                 swap_bytes(ipr, ipm, elsize2)
7480  *
7481  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
7482  *                 pm[0], pl[0] =  pl[0], pm[0]
7483  *                 swap_bytes(ipm, ipl, elsize2)
7484  */
7485       }
7486 
7487       /* "tables/indexesextension.pyx":259
7488  *                 swap_bytes(ipm, ipl, elsize2)
7489  *
7490  *             vp = pm[0]             # <<<<<<<<<<<<<<
7491  *
7492  *             pi = pl
7493  */
7494       __pyx_v_vp = (__pyx_v_pm[0]);
7495 
7496       /* "tables/indexesextension.pyx":261
7497  *             vp = pm[0]
7498  *
7499  *             pi = pl             # <<<<<<<<<<<<<<
7500  *             ipi = ipl
7501  *
7502  */
7503       __pyx_v_pi = __pyx_v_pl;
7504 
7505       /* "tables/indexesextension.pyx":262
7506  *
7507  *             pi = pl
7508  *             ipi = ipl             # <<<<<<<<<<<<<<
7509  *
7510  *             pj = pr - 1
7511  */
7512       __pyx_v_ipi = __pyx_v_ipl;
7513 
7514       /* "tables/indexesextension.pyx":264
7515  *             ipi = ipl
7516  *
7517  *             pj = pr - 1             # <<<<<<<<<<<<<<
7518  *             ipj = ipr - elsize2
7519  *
7520  */
7521       __pyx_v_pj = (__pyx_v_pr - 1);
7522 
7523       /* "tables/indexesextension.pyx":265
7524  *
7525  *             pj = pr - 1
7526  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
7527  *
7528  *             pm[0], pj[0] = pj[0], pm[0]
7529  */
7530       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
7531 
7532       /* "tables/indexesextension.pyx":267
7533  *             ipj = ipr - elsize2
7534  *
7535  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
7536  *             swap_bytes(ipm, ipj, elsize2)
7537  *
7538  */
7539       __pyx_t_3 = (__pyx_v_pj[0]);
7540       __pyx_t_2 = (__pyx_v_pm[0]);
7541       (__pyx_v_pm[0]) = __pyx_t_3;
7542       (__pyx_v_pj[0]) = __pyx_t_2;
7543 
7544       /* "tables/indexesextension.pyx":268
7545  *
7546  *             pm[0], pj[0] = pj[0], pm[0]
7547  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
7548  *
7549  *             while True:
7550  */
7551       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
7552 
7553       /* "tables/indexesextension.pyx":270
7554  *             swap_bytes(ipm, ipj, elsize2)
7555  *
7556  *             while True:             # <<<<<<<<<<<<<<
7557  *                 pi += 1
7558  *                 ipi += elsize2
7559  */
7560       while (1) {
7561 
7562         /* "tables/indexesextension.pyx":271
7563  *
7564  *             while True:
7565  *                 pi += 1             # <<<<<<<<<<<<<<
7566  *                 ipi += elsize2
7567  *                 while less_than(pi, &vp):
7568  */
7569         __pyx_v_pi = (__pyx_v_pi + 1);
7570 
7571         /* "tables/indexesextension.pyx":272
7572  *             while True:
7573  *                 pi += 1
7574  *                 ipi += elsize2             # <<<<<<<<<<<<<<
7575  *                 while less_than(pi, &vp):
7576  *                     pi += 1
7577  */
7578         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
7579 
7580         /* "tables/indexesextension.pyx":273
7581  *                 pi += 1
7582  *                 ipi += elsize2
7583  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
7584  *                     pi += 1
7585  *                     ipi += elsize2
7586  */
7587         while (1) {
7588           __pyx_t_1 = (__pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
7589           if (!__pyx_t_1) break;
7590 
7591           /* "tables/indexesextension.pyx":274
7592  *                 ipi += elsize2
7593  *                 while less_than(pi, &vp):
7594  *                     pi += 1             # <<<<<<<<<<<<<<
7595  *                     ipi += elsize2
7596  *
7597  */
7598           __pyx_v_pi = (__pyx_v_pi + 1);
7599 
7600           /* "tables/indexesextension.pyx":275
7601  *                 while less_than(pi, &vp):
7602  *                     pi += 1
7603  *                     ipi += elsize2             # <<<<<<<<<<<<<<
7604  *
7605  *                 pj -= 1
7606  */
7607           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
7608         }
7609 
7610         /* "tables/indexesextension.pyx":277
7611  *                     ipi += elsize2
7612  *
7613  *                 pj -= 1             # <<<<<<<<<<<<<<
7614  *                 ipj -= elsize2
7615  *                 while less_than(&vp, pj):
7616  */
7617         __pyx_v_pj = (__pyx_v_pj - 1);
7618 
7619         /* "tables/indexesextension.pyx":278
7620  *
7621  *                 pj -= 1
7622  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
7623  *                 while less_than(&vp, pj):
7624  *                     pj -= 1
7625  */
7626         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
7627 
7628         /* "tables/indexesextension.pyx":279
7629  *                 pj -= 1
7630  *                 ipj -= elsize2
7631  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
7632  *                     pj -= 1
7633  *                     ipj -= elsize2
7634  */
7635         while (1) {
7636           __pyx_t_1 = (__pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
7637           if (!__pyx_t_1) break;
7638 
7639           /* "tables/indexesextension.pyx":280
7640  *                 ipj -= elsize2
7641  *                 while less_than(&vp, pj):
7642  *                     pj -= 1             # <<<<<<<<<<<<<<
7643  *                     ipj -= elsize2
7644  *
7645  */
7646           __pyx_v_pj = (__pyx_v_pj - 1);
7647 
7648           /* "tables/indexesextension.pyx":281
7649  *                 while less_than(&vp, pj):
7650  *                     pj -= 1
7651  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
7652  *
7653  *                 if pi >= pj:
7654  */
7655           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
7656         }
7657 
7658         /* "tables/indexesextension.pyx":283
7659  *                     ipj -= elsize2
7660  *
7661  *                 if pi >= pj:             # <<<<<<<<<<<<<<
7662  *                     break
7663  *
7664  */
7665         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
7666         if (__pyx_t_1) {
7667 
7668           /* "tables/indexesextension.pyx":284
7669  *
7670  *                 if pi >= pj:
7671  *                     break             # <<<<<<<<<<<<<<
7672  *
7673  *                 pi[0], pj[0] = pj[0], pi[0]
7674  */
7675           goto __pyx_L11_break;
7676 
7677           /* "tables/indexesextension.pyx":283
7678  *                     ipj -= elsize2
7679  *
7680  *                 if pi >= pj:             # <<<<<<<<<<<<<<
7681  *                     break
7682  *
7683  */
7684         }
7685 
7686         /* "tables/indexesextension.pyx":286
7687  *                     break
7688  *
7689  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
7690  *                 swap_bytes(ipi, ipj, elsize2)
7691  *
7692  */
7693         __pyx_t_2 = (__pyx_v_pj[0]);
7694         __pyx_t_3 = (__pyx_v_pi[0]);
7695         (__pyx_v_pi[0]) = __pyx_t_2;
7696         (__pyx_v_pj[0]) = __pyx_t_3;
7697 
7698         /* "tables/indexesextension.pyx":287
7699  *
7700  *                 pi[0], pj[0] = pj[0], pi[0]
7701  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
7702  *
7703  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
7704  */
7705         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
7706       }
7707       __pyx_L11_break:;
7708 
7709       /* "tables/indexesextension.pyx":289
7710  *                 swap_bytes(ipi, ipj, elsize2)
7711  *
7712  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
7713  *             swap_bytes(ipi, ipr-elsize2, elsize2)
7714  *
7715  */
7716       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
7717       __pyx_t_2 = (__pyx_v_pi[0]);
7718       (__pyx_v_pi[0]) = __pyx_t_3;
7719       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
7720 
7721       /* "tables/indexesextension.pyx":290
7722  *
7723  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
7724  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
7725  *
7726  *             # push largest partition on stack and proceed with the other
7727  */
7728       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
7729 
7730       /* "tables/indexesextension.pyx":293
7731  *
7732  *             # push largest partition on stack and proceed with the other
7733  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
7734  *                 sptr[0] = pi + 1
7735  *                 sptr[1] = pr
7736  */
7737       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
7738       if (__pyx_t_1) {
7739 
7740         /* "tables/indexesextension.pyx":294
7741  *             # push largest partition on stack and proceed with the other
7742  *             if (pi - pl) < (pr - pi):
7743  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
7744  *                 sptr[1] = pr
7745  *                 sptr += 2
7746  */
7747         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
7748 
7749         /* "tables/indexesextension.pyx":295
7750  *             if (pi - pl) < (pr - pi):
7751  *                 sptr[0] = pi + 1
7752  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
7753  *                 sptr += 2
7754  *
7755  */
7756         (__pyx_v_sptr[1]) = __pyx_v_pr;
7757 
7758         /* "tables/indexesextension.pyx":296
7759  *                 sptr[0] = pi + 1
7760  *                 sptr[1] = pr
7761  *                 sptr += 2             # <<<<<<<<<<<<<<
7762  *
7763  *                 isptr[0] = ipi + elsize2
7764  */
7765         __pyx_v_sptr = (__pyx_v_sptr + 2);
7766 
7767         /* "tables/indexesextension.pyx":298
7768  *                 sptr += 2
7769  *
7770  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
7771  *                 isptr[1] = ipr
7772  *                 isptr += 2
7773  */
7774         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
7775 
7776         /* "tables/indexesextension.pyx":299
7777  *
7778  *                 isptr[0] = ipi + elsize2
7779  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
7780  *                 isptr += 2
7781  *
7782  */
7783         (__pyx_v_isptr[1]) = __pyx_v_ipr;
7784 
7785         /* "tables/indexesextension.pyx":300
7786  *                 isptr[0] = ipi + elsize2
7787  *                 isptr[1] = ipr
7788  *                 isptr += 2             # <<<<<<<<<<<<<<
7789  *
7790  *                 pr = pi - 1
7791  */
7792         __pyx_v_isptr = (__pyx_v_isptr + 2);
7793 
7794         /* "tables/indexesextension.pyx":302
7795  *                 isptr += 2
7796  *
7797  *                 pr = pi - 1             # <<<<<<<<<<<<<<
7798  *                 ipr = ipi - elsize2
7799  *             else:
7800  */
7801         __pyx_v_pr = (__pyx_v_pi - 1);
7802 
7803         /* "tables/indexesextension.pyx":303
7804  *
7805  *                 pr = pi - 1
7806  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
7807  *             else:
7808  *                 sptr[0] = pl
7809  */
7810         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
7811 
7812         /* "tables/indexesextension.pyx":293
7813  *
7814  *             # push largest partition on stack and proceed with the other
7815  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
7816  *                 sptr[0] = pi + 1
7817  *                 sptr[1] = pr
7818  */
7819         goto __pyx_L17;
7820       }
7821 
7822       /* "tables/indexesextension.pyx":305
7823  *                 ipr = ipi - elsize2
7824  *             else:
7825  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
7826  *                 sptr[1] = pi - 1
7827  *                 sptr += 2
7828  */
7829       /*else*/ {
7830         (__pyx_v_sptr[0]) = __pyx_v_pl;
7831 
7832         /* "tables/indexesextension.pyx":306
7833  *             else:
7834  *                 sptr[0] = pl
7835  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
7836  *                 sptr += 2
7837  *
7838  */
7839         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
7840 
7841         /* "tables/indexesextension.pyx":307
7842  *                 sptr[0] = pl
7843  *                 sptr[1] = pi - 1
7844  *                 sptr += 2             # <<<<<<<<<<<<<<
7845  *
7846  *                 isptr[0] = ipl
7847  */
7848         __pyx_v_sptr = (__pyx_v_sptr + 2);
7849 
7850         /* "tables/indexesextension.pyx":309
7851  *                 sptr += 2
7852  *
7853  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
7854  *                 isptr[1] = ipi - elsize2
7855  *                 isptr += 2
7856  */
7857         (__pyx_v_isptr[0]) = __pyx_v_ipl;
7858 
7859         /* "tables/indexesextension.pyx":310
7860  *
7861  *                 isptr[0] = ipl
7862  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
7863  *                 isptr += 2
7864  *
7865  */
7866         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
7867 
7868         /* "tables/indexesextension.pyx":311
7869  *                 isptr[0] = ipl
7870  *                 isptr[1] = ipi - elsize2
7871  *                 isptr += 2             # <<<<<<<<<<<<<<
7872  *
7873  *                 pl = pi + 1
7874  */
7875         __pyx_v_isptr = (__pyx_v_isptr + 2);
7876 
7877         /* "tables/indexesextension.pyx":313
7878  *                 isptr += 2
7879  *
7880  *                 pl = pi + 1             # <<<<<<<<<<<<<<
7881  *                 ipl = ipi + elsize2
7882  *
7883  */
7884         __pyx_v_pl = (__pyx_v_pi + 1);
7885 
7886         /* "tables/indexesextension.pyx":314
7887  *
7888  *                 pl = pi + 1
7889  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
7890  *
7891  *         pi = pl + 1
7892  */
7893         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
7894       }
7895       __pyx_L17:;
7896     }
7897 
7898     /* "tables/indexesextension.pyx":316
7899  *                 ipl = ipi + elsize2
7900  *
7901  *         pi = pl + 1             # <<<<<<<<<<<<<<
7902  *         ipi = ipl + elsize2
7903  *         while pi <= pr:
7904  */
7905     __pyx_v_pi = (__pyx_v_pl + 1);
7906 
7907     /* "tables/indexesextension.pyx":317
7908  *
7909  *         pi = pl + 1
7910  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
7911  *         while pi <= pr:
7912  *             vp = pi[0]
7913  */
7914     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
7915 
7916     /* "tables/indexesextension.pyx":318
7917  *         pi = pl + 1
7918  *         ipi = ipl + elsize2
7919  *         while pi <= pr:             # <<<<<<<<<<<<<<
7920  *             vp = pi[0]
7921  *             memcpy(ivp, ipi, elsize2)
7922  */
7923     while (1) {
7924       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
7925       if (!__pyx_t_1) break;
7926 
7927       /* "tables/indexesextension.pyx":319
7928  *         ipi = ipl + elsize2
7929  *         while pi <= pr:
7930  *             vp = pi[0]             # <<<<<<<<<<<<<<
7931  *             memcpy(ivp, ipi, elsize2)
7932  *
7933  */
7934       __pyx_v_vp = (__pyx_v_pi[0]);
7935 
7936       /* "tables/indexesextension.pyx":320
7937  *         while pi <= pr:
7938  *             vp = pi[0]
7939  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
7940  *
7941  *             pj = pi
7942  */
7943       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
7944 
7945       /* "tables/indexesextension.pyx":322
7946  *             memcpy(ivp, ipi, elsize2)
7947  *
7948  *             pj = pi             # <<<<<<<<<<<<<<
7949  *             pt = pi - 1
7950  *
7951  */
7952       __pyx_v_pj = __pyx_v_pi;
7953 
7954       /* "tables/indexesextension.pyx":323
7955  *
7956  *             pj = pi
7957  *             pt = pi - 1             # <<<<<<<<<<<<<<
7958  *
7959  *             ipj = ipi
7960  */
7961       __pyx_v_pt = (__pyx_v_pi - 1);
7962 
7963       /* "tables/indexesextension.pyx":325
7964  *             pt = pi - 1
7965  *
7966  *             ipj = ipi             # <<<<<<<<<<<<<<
7967  *             ipt = ipi - elsize2
7968  *
7969  */
7970       __pyx_v_ipj = __pyx_v_ipi;
7971 
7972       /* "tables/indexesextension.pyx":326
7973  *
7974  *             ipj = ipi
7975  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
7976  *
7977  *             while pj > pl and less_than(&vp, pt):
7978  */
7979       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
7980 
7981       /* "tables/indexesextension.pyx":328
7982  *             ipt = ipi - elsize2
7983  *
7984  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
7985  *                 pj[0] = pt[0]
7986  *                 pj -= 1
7987  */
7988       while (1) {
7989         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
7990         if (__pyx_t_4) {
7991         } else {
7992           __pyx_t_1 = __pyx_t_4;
7993           goto __pyx_L22_bool_binop_done;
7994         }
7995         __pyx_t_4 = (__pyx_fuse_4__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
7996         __pyx_t_1 = __pyx_t_4;
7997         __pyx_L22_bool_binop_done:;
7998         if (!__pyx_t_1) break;
7999 
8000         /* "tables/indexesextension.pyx":329
8001  *
8002  *             while pj > pl and less_than(&vp, pt):
8003  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
8004  *                 pj -= 1
8005  *                 pt -= 1
8006  */
8007         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
8008 
8009         /* "tables/indexesextension.pyx":330
8010  *             while pj > pl and less_than(&vp, pt):
8011  *                 pj[0] = pt[0]
8012  *                 pj -= 1             # <<<<<<<<<<<<<<
8013  *                 pt -= 1
8014  *
8015  */
8016         __pyx_v_pj = (__pyx_v_pj - 1);
8017 
8018         /* "tables/indexesextension.pyx":331
8019  *                 pj[0] = pt[0]
8020  *                 pj -= 1
8021  *                 pt -= 1             # <<<<<<<<<<<<<<
8022  *
8023  *                 memcpy(ipj, ipt, elsize2)
8024  */
8025         __pyx_v_pt = (__pyx_v_pt - 1);
8026 
8027         /* "tables/indexesextension.pyx":333
8028  *                 pt -= 1
8029  *
8030  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
8031  *                 ipj -= elsize2
8032  *                 ipt -= elsize2
8033  */
8034         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
8035 
8036         /* "tables/indexesextension.pyx":334
8037  *
8038  *                 memcpy(ipj, ipt, elsize2)
8039  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
8040  *                 ipt -= elsize2
8041  *
8042  */
8043         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
8044 
8045         /* "tables/indexesextension.pyx":335
8046  *                 memcpy(ipj, ipt, elsize2)
8047  *                 ipj -= elsize2
8048  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
8049  *
8050  *             pj[0] = vp
8051  */
8052         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
8053       }
8054 
8055       /* "tables/indexesextension.pyx":337
8056  *                 ipt -= elsize2
8057  *
8058  *             pj[0] = vp             # <<<<<<<<<<<<<<
8059  *             memcpy(ipj, ivp, elsize2)
8060  *
8061  */
8062       (__pyx_v_pj[0]) = __pyx_v_vp;
8063 
8064       /* "tables/indexesextension.pyx":338
8065  *
8066  *             pj[0] = vp
8067  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
8068  *
8069  *             pi += 1
8070  */
8071       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
8072 
8073       /* "tables/indexesextension.pyx":340
8074  *             memcpy(ipj, ivp, elsize2)
8075  *
8076  *             pi += 1             # <<<<<<<<<<<<<<
8077  *             ipi += elsize2
8078  *
8079  */
8080       __pyx_v_pi = (__pyx_v_pi + 1);
8081 
8082       /* "tables/indexesextension.pyx":341
8083  *
8084  *             pi += 1
8085  *             ipi += elsize2             # <<<<<<<<<<<<<<
8086  *
8087  *         if sptr == stack:
8088  */
8089       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
8090     }
8091 
8092     /* "tables/indexesextension.pyx":343
8093  *             ipi += elsize2
8094  *
8095  *         if sptr == stack:             # <<<<<<<<<<<<<<
8096  *             break
8097  *
8098  */
8099     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
8100     if (__pyx_t_1) {
8101 
8102       /* "tables/indexesextension.pyx":344
8103  *
8104  *         if sptr == stack:
8105  *             break             # <<<<<<<<<<<<<<
8106  *
8107  *         sptr -= 2
8108  */
8109       goto __pyx_L4_break;
8110 
8111       /* "tables/indexesextension.pyx":343
8112  *             ipi += elsize2
8113  *
8114  *         if sptr == stack:             # <<<<<<<<<<<<<<
8115  *             break
8116  *
8117  */
8118     }
8119 
8120     /* "tables/indexesextension.pyx":346
8121  *             break
8122  *
8123  *         sptr -= 2             # <<<<<<<<<<<<<<
8124  *         pl = sptr[0]
8125  *         pr = sptr[1]
8126  */
8127     __pyx_v_sptr = (__pyx_v_sptr - 2);
8128 
8129     /* "tables/indexesextension.pyx":347
8130  *
8131  *         sptr -= 2
8132  *         pl = sptr[0]             # <<<<<<<<<<<<<<
8133  *         pr = sptr[1]
8134  *
8135  */
8136     __pyx_v_pl = (__pyx_v_sptr[0]);
8137 
8138     /* "tables/indexesextension.pyx":348
8139  *         sptr -= 2
8140  *         pl = sptr[0]
8141  *         pr = sptr[1]             # <<<<<<<<<<<<<<
8142  *
8143  *         isptr -= 2
8144  */
8145     __pyx_v_pr = (__pyx_v_sptr[1]);
8146 
8147     /* "tables/indexesextension.pyx":350
8148  *         pr = sptr[1]
8149  *
8150  *         isptr -= 2             # <<<<<<<<<<<<<<
8151  *         ipl = isptr[0]
8152  *         ipr = isptr[1]
8153  */
8154     __pyx_v_isptr = (__pyx_v_isptr - 2);
8155 
8156     /* "tables/indexesextension.pyx":351
8157  *
8158  *         isptr -= 2
8159  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
8160  *         ipr = isptr[1]
8161  *
8162  */
8163     __pyx_v_ipl = (__pyx_v_isptr[0]);
8164 
8165     /* "tables/indexesextension.pyx":352
8166  *         isptr -= 2
8167  *         ipl = isptr[0]
8168  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
8169  *
8170  *     free(ivp)
8171  */
8172     __pyx_v_ipr = (__pyx_v_isptr[1]);
8173   }
8174   __pyx_L4_break:;
8175 
8176   /* "tables/indexesextension.pyx":354
8177  *         ipr = isptr[1]
8178  *
8179  *     free(ivp)             # <<<<<<<<<<<<<<
8180  *
8181  *
8182  */
8183   free(__pyx_v_ivp);
8184 
8185   /* "tables/indexesextension.pyx":215
8186  *
8187  * @cython.cdivision(True)
8188  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
8189  *     cdef number_type *pl = start1
8190  *     cdef number_type *pr = start1 + (n - 1)
8191  */
8192 
8193   /* function exit code */
8194 }
8195 
__pyx_fuse_5__pyx_f_6tables_16indexesextension__keysort(npy_uint16 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)8196 static void __pyx_fuse_5__pyx_f_6tables_16indexesextension__keysort(npy_uint16 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
8197   npy_uint16 *__pyx_v_pl;
8198   npy_uint16 *__pyx_v_pr;
8199   char *__pyx_v_ipl;
8200   char *__pyx_v_ipr;
8201   npy_uint16 __pyx_v_vp;
8202   char *__pyx_v_ivp;
8203   npy_uint16 *__pyx_v_stack[0x64];
8204   npy_uint16 **__pyx_v_sptr;
8205   char *__pyx_v_istack[0x64];
8206   char **__pyx_v_isptr;
8207   CYTHON_UNUSED size_t __pyx_v_stack_index;
8208   npy_uint16 *__pyx_v_pm;
8209   npy_uint16 *__pyx_v_pi;
8210   npy_uint16 *__pyx_v_pj;
8211   npy_uint16 *__pyx_v_pt;
8212   char *__pyx_v_ipm;
8213   char *__pyx_v_ipi;
8214   char *__pyx_v_ipj;
8215   char *__pyx_v_ipt;
8216   int __pyx_t_1;
8217   npy_uint16 __pyx_t_2;
8218   npy_uint16 __pyx_t_3;
8219   int __pyx_t_4;
8220 
8221   /* "tables/indexesextension.pyx":216
8222  * @cython.cdivision(True)
8223  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
8224  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
8225  *     cdef number_type *pr = start1 + (n - 1)
8226  *
8227  */
8228   __pyx_v_pl = __pyx_v_start1;
8229 
8230   /* "tables/indexesextension.pyx":217
8231  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
8232  *     cdef number_type *pl = start1
8233  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
8234  *
8235  *     cdef char *ipl = start2
8236  */
8237   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
8238 
8239   /* "tables/indexesextension.pyx":219
8240  *     cdef number_type *pr = start1 + (n - 1)
8241  *
8242  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
8243  *     cdef char *ipr = start2 + (n - 1) * elsize2
8244  *
8245  */
8246   __pyx_v_ipl = __pyx_v_start2;
8247 
8248   /* "tables/indexesextension.pyx":220
8249  *
8250  *     cdef char *ipl = start2
8251  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
8252  *
8253  *     cdef number_type vp
8254  */
8255   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
8256 
8257   /* "tables/indexesextension.pyx":223
8258  *
8259  *     cdef number_type vp
8260  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
8261  *
8262  *     cdef number_type *stack[PYA_QS_STACK]
8263  */
8264   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
8265 
8266   /* "tables/indexesextension.pyx":226
8267  *
8268  *     cdef number_type *stack[PYA_QS_STACK]
8269  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
8270  *
8271  *     cdef char *istack[PYA_QS_STACK]
8272  */
8273   __pyx_v_sptr = __pyx_v_stack;
8274 
8275   /* "tables/indexesextension.pyx":229
8276  *
8277  *     cdef char *istack[PYA_QS_STACK]
8278  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
8279  *
8280  *     cdef size_t stack_index = 0
8281  */
8282   __pyx_v_isptr = __pyx_v_istack;
8283 
8284   /* "tables/indexesextension.pyx":231
8285  *     cdef char **isptr = istack
8286  *
8287  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
8288  *
8289  *     cdef number_type *pm
8290  */
8291   __pyx_v_stack_index = 0;
8292 
8293   /* "tables/indexesextension.pyx":242
8294  *     cdef char *ipt
8295  *
8296  *     while True:             # <<<<<<<<<<<<<<
8297  *         while pr - pl > SMALL_QUICKSORT:
8298  *             pm  = pl + ((pr - pl) >> 1)
8299  */
8300   while (1) {
8301 
8302     /* "tables/indexesextension.pyx":243
8303  *
8304  *     while True:
8305  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
8306  *             pm  = pl + ((pr - pl) >> 1)
8307  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
8308  */
8309     while (1) {
8310       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
8311       if (!__pyx_t_1) break;
8312 
8313       /* "tables/indexesextension.pyx":244
8314  *     while True:
8315  *         while pr - pl > SMALL_QUICKSORT:
8316  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
8317  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
8318  *
8319  */
8320       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
8321 
8322       /* "tables/indexesextension.pyx":245
8323  *         while pr - pl > SMALL_QUICKSORT:
8324  *             pm  = pl + ((pr - pl) >> 1)
8325  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
8326  *
8327  *             if less_than(pm, pl):
8328  */
8329       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
8330 
8331       /* "tables/indexesextension.pyx":247
8332  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
8333  *
8334  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
8335  *                 pm[0], pl[0] =  pl[0], pm[0]
8336  *                 swap_bytes(ipm, ipl, elsize2)
8337  */
8338       __pyx_t_1 = (__pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
8339       if (__pyx_t_1) {
8340 
8341         /* "tables/indexesextension.pyx":248
8342  *
8343  *             if less_than(pm, pl):
8344  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
8345  *                 swap_bytes(ipm, ipl, elsize2)
8346  *
8347  */
8348         __pyx_t_2 = (__pyx_v_pl[0]);
8349         __pyx_t_3 = (__pyx_v_pm[0]);
8350         (__pyx_v_pm[0]) = __pyx_t_2;
8351         (__pyx_v_pl[0]) = __pyx_t_3;
8352 
8353         /* "tables/indexesextension.pyx":249
8354  *             if less_than(pm, pl):
8355  *                 pm[0], pl[0] =  pl[0], pm[0]
8356  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
8357  *
8358  *             if less_than(pr, pm):
8359  */
8360         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
8361 
8362         /* "tables/indexesextension.pyx":247
8363  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
8364  *
8365  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
8366  *                 pm[0], pl[0] =  pl[0], pm[0]
8367  *                 swap_bytes(ipm, ipl, elsize2)
8368  */
8369       }
8370 
8371       /* "tables/indexesextension.pyx":251
8372  *                 swap_bytes(ipm, ipl, elsize2)
8373  *
8374  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
8375  *                 pr[0], pm[0] =  pm[0], pr[0]
8376  *                 swap_bytes(ipr, ipm, elsize2)
8377  */
8378       __pyx_t_1 = (__pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
8379       if (__pyx_t_1) {
8380 
8381         /* "tables/indexesextension.pyx":252
8382  *
8383  *             if less_than(pr, pm):
8384  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
8385  *                 swap_bytes(ipr, ipm, elsize2)
8386  *
8387  */
8388         __pyx_t_3 = (__pyx_v_pm[0]);
8389         __pyx_t_2 = (__pyx_v_pr[0]);
8390         (__pyx_v_pr[0]) = __pyx_t_3;
8391         (__pyx_v_pm[0]) = __pyx_t_2;
8392 
8393         /* "tables/indexesextension.pyx":253
8394  *             if less_than(pr, pm):
8395  *                 pr[0], pm[0] =  pm[0], pr[0]
8396  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
8397  *
8398  *             if less_than(pm, pl):
8399  */
8400         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
8401 
8402         /* "tables/indexesextension.pyx":251
8403  *                 swap_bytes(ipm, ipl, elsize2)
8404  *
8405  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
8406  *                 pr[0], pm[0] =  pm[0], pr[0]
8407  *                 swap_bytes(ipr, ipm, elsize2)
8408  */
8409       }
8410 
8411       /* "tables/indexesextension.pyx":255
8412  *                 swap_bytes(ipr, ipm, elsize2)
8413  *
8414  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
8415  *                 pm[0], pl[0] =  pl[0], pm[0]
8416  *                 swap_bytes(ipm, ipl, elsize2)
8417  */
8418       __pyx_t_1 = (__pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
8419       if (__pyx_t_1) {
8420 
8421         /* "tables/indexesextension.pyx":256
8422  *
8423  *             if less_than(pm, pl):
8424  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
8425  *                 swap_bytes(ipm, ipl, elsize2)
8426  *
8427  */
8428         __pyx_t_2 = (__pyx_v_pl[0]);
8429         __pyx_t_3 = (__pyx_v_pm[0]);
8430         (__pyx_v_pm[0]) = __pyx_t_2;
8431         (__pyx_v_pl[0]) = __pyx_t_3;
8432 
8433         /* "tables/indexesextension.pyx":257
8434  *             if less_than(pm, pl):
8435  *                 pm[0], pl[0] =  pl[0], pm[0]
8436  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
8437  *
8438  *             vp = pm[0]
8439  */
8440         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
8441 
8442         /* "tables/indexesextension.pyx":255
8443  *                 swap_bytes(ipr, ipm, elsize2)
8444  *
8445  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
8446  *                 pm[0], pl[0] =  pl[0], pm[0]
8447  *                 swap_bytes(ipm, ipl, elsize2)
8448  */
8449       }
8450 
8451       /* "tables/indexesextension.pyx":259
8452  *                 swap_bytes(ipm, ipl, elsize2)
8453  *
8454  *             vp = pm[0]             # <<<<<<<<<<<<<<
8455  *
8456  *             pi = pl
8457  */
8458       __pyx_v_vp = (__pyx_v_pm[0]);
8459 
8460       /* "tables/indexesextension.pyx":261
8461  *             vp = pm[0]
8462  *
8463  *             pi = pl             # <<<<<<<<<<<<<<
8464  *             ipi = ipl
8465  *
8466  */
8467       __pyx_v_pi = __pyx_v_pl;
8468 
8469       /* "tables/indexesextension.pyx":262
8470  *
8471  *             pi = pl
8472  *             ipi = ipl             # <<<<<<<<<<<<<<
8473  *
8474  *             pj = pr - 1
8475  */
8476       __pyx_v_ipi = __pyx_v_ipl;
8477 
8478       /* "tables/indexesextension.pyx":264
8479  *             ipi = ipl
8480  *
8481  *             pj = pr - 1             # <<<<<<<<<<<<<<
8482  *             ipj = ipr - elsize2
8483  *
8484  */
8485       __pyx_v_pj = (__pyx_v_pr - 1);
8486 
8487       /* "tables/indexesextension.pyx":265
8488  *
8489  *             pj = pr - 1
8490  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
8491  *
8492  *             pm[0], pj[0] = pj[0], pm[0]
8493  */
8494       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
8495 
8496       /* "tables/indexesextension.pyx":267
8497  *             ipj = ipr - elsize2
8498  *
8499  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
8500  *             swap_bytes(ipm, ipj, elsize2)
8501  *
8502  */
8503       __pyx_t_3 = (__pyx_v_pj[0]);
8504       __pyx_t_2 = (__pyx_v_pm[0]);
8505       (__pyx_v_pm[0]) = __pyx_t_3;
8506       (__pyx_v_pj[0]) = __pyx_t_2;
8507 
8508       /* "tables/indexesextension.pyx":268
8509  *
8510  *             pm[0], pj[0] = pj[0], pm[0]
8511  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
8512  *
8513  *             while True:
8514  */
8515       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
8516 
8517       /* "tables/indexesextension.pyx":270
8518  *             swap_bytes(ipm, ipj, elsize2)
8519  *
8520  *             while True:             # <<<<<<<<<<<<<<
8521  *                 pi += 1
8522  *                 ipi += elsize2
8523  */
8524       while (1) {
8525 
8526         /* "tables/indexesextension.pyx":271
8527  *
8528  *             while True:
8529  *                 pi += 1             # <<<<<<<<<<<<<<
8530  *                 ipi += elsize2
8531  *                 while less_than(pi, &vp):
8532  */
8533         __pyx_v_pi = (__pyx_v_pi + 1);
8534 
8535         /* "tables/indexesextension.pyx":272
8536  *             while True:
8537  *                 pi += 1
8538  *                 ipi += elsize2             # <<<<<<<<<<<<<<
8539  *                 while less_than(pi, &vp):
8540  *                     pi += 1
8541  */
8542         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
8543 
8544         /* "tables/indexesextension.pyx":273
8545  *                 pi += 1
8546  *                 ipi += elsize2
8547  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
8548  *                     pi += 1
8549  *                     ipi += elsize2
8550  */
8551         while (1) {
8552           __pyx_t_1 = (__pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
8553           if (!__pyx_t_1) break;
8554 
8555           /* "tables/indexesextension.pyx":274
8556  *                 ipi += elsize2
8557  *                 while less_than(pi, &vp):
8558  *                     pi += 1             # <<<<<<<<<<<<<<
8559  *                     ipi += elsize2
8560  *
8561  */
8562           __pyx_v_pi = (__pyx_v_pi + 1);
8563 
8564           /* "tables/indexesextension.pyx":275
8565  *                 while less_than(pi, &vp):
8566  *                     pi += 1
8567  *                     ipi += elsize2             # <<<<<<<<<<<<<<
8568  *
8569  *                 pj -= 1
8570  */
8571           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
8572         }
8573 
8574         /* "tables/indexesextension.pyx":277
8575  *                     ipi += elsize2
8576  *
8577  *                 pj -= 1             # <<<<<<<<<<<<<<
8578  *                 ipj -= elsize2
8579  *                 while less_than(&vp, pj):
8580  */
8581         __pyx_v_pj = (__pyx_v_pj - 1);
8582 
8583         /* "tables/indexesextension.pyx":278
8584  *
8585  *                 pj -= 1
8586  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
8587  *                 while less_than(&vp, pj):
8588  *                     pj -= 1
8589  */
8590         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
8591 
8592         /* "tables/indexesextension.pyx":279
8593  *                 pj -= 1
8594  *                 ipj -= elsize2
8595  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
8596  *                     pj -= 1
8597  *                     ipj -= elsize2
8598  */
8599         while (1) {
8600           __pyx_t_1 = (__pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
8601           if (!__pyx_t_1) break;
8602 
8603           /* "tables/indexesextension.pyx":280
8604  *                 ipj -= elsize2
8605  *                 while less_than(&vp, pj):
8606  *                     pj -= 1             # <<<<<<<<<<<<<<
8607  *                     ipj -= elsize2
8608  *
8609  */
8610           __pyx_v_pj = (__pyx_v_pj - 1);
8611 
8612           /* "tables/indexesextension.pyx":281
8613  *                 while less_than(&vp, pj):
8614  *                     pj -= 1
8615  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
8616  *
8617  *                 if pi >= pj:
8618  */
8619           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
8620         }
8621 
8622         /* "tables/indexesextension.pyx":283
8623  *                     ipj -= elsize2
8624  *
8625  *                 if pi >= pj:             # <<<<<<<<<<<<<<
8626  *                     break
8627  *
8628  */
8629         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
8630         if (__pyx_t_1) {
8631 
8632           /* "tables/indexesextension.pyx":284
8633  *
8634  *                 if pi >= pj:
8635  *                     break             # <<<<<<<<<<<<<<
8636  *
8637  *                 pi[0], pj[0] = pj[0], pi[0]
8638  */
8639           goto __pyx_L11_break;
8640 
8641           /* "tables/indexesextension.pyx":283
8642  *                     ipj -= elsize2
8643  *
8644  *                 if pi >= pj:             # <<<<<<<<<<<<<<
8645  *                     break
8646  *
8647  */
8648         }
8649 
8650         /* "tables/indexesextension.pyx":286
8651  *                     break
8652  *
8653  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
8654  *                 swap_bytes(ipi, ipj, elsize2)
8655  *
8656  */
8657         __pyx_t_2 = (__pyx_v_pj[0]);
8658         __pyx_t_3 = (__pyx_v_pi[0]);
8659         (__pyx_v_pi[0]) = __pyx_t_2;
8660         (__pyx_v_pj[0]) = __pyx_t_3;
8661 
8662         /* "tables/indexesextension.pyx":287
8663  *
8664  *                 pi[0], pj[0] = pj[0], pi[0]
8665  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
8666  *
8667  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
8668  */
8669         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
8670       }
8671       __pyx_L11_break:;
8672 
8673       /* "tables/indexesextension.pyx":289
8674  *                 swap_bytes(ipi, ipj, elsize2)
8675  *
8676  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
8677  *             swap_bytes(ipi, ipr-elsize2, elsize2)
8678  *
8679  */
8680       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
8681       __pyx_t_2 = (__pyx_v_pi[0]);
8682       (__pyx_v_pi[0]) = __pyx_t_3;
8683       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
8684 
8685       /* "tables/indexesextension.pyx":290
8686  *
8687  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
8688  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
8689  *
8690  *             # push largest partition on stack and proceed with the other
8691  */
8692       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
8693 
8694       /* "tables/indexesextension.pyx":293
8695  *
8696  *             # push largest partition on stack and proceed with the other
8697  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
8698  *                 sptr[0] = pi + 1
8699  *                 sptr[1] = pr
8700  */
8701       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
8702       if (__pyx_t_1) {
8703 
8704         /* "tables/indexesextension.pyx":294
8705  *             # push largest partition on stack and proceed with the other
8706  *             if (pi - pl) < (pr - pi):
8707  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
8708  *                 sptr[1] = pr
8709  *                 sptr += 2
8710  */
8711         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
8712 
8713         /* "tables/indexesextension.pyx":295
8714  *             if (pi - pl) < (pr - pi):
8715  *                 sptr[0] = pi + 1
8716  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
8717  *                 sptr += 2
8718  *
8719  */
8720         (__pyx_v_sptr[1]) = __pyx_v_pr;
8721 
8722         /* "tables/indexesextension.pyx":296
8723  *                 sptr[0] = pi + 1
8724  *                 sptr[1] = pr
8725  *                 sptr += 2             # <<<<<<<<<<<<<<
8726  *
8727  *                 isptr[0] = ipi + elsize2
8728  */
8729         __pyx_v_sptr = (__pyx_v_sptr + 2);
8730 
8731         /* "tables/indexesextension.pyx":298
8732  *                 sptr += 2
8733  *
8734  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
8735  *                 isptr[1] = ipr
8736  *                 isptr += 2
8737  */
8738         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
8739 
8740         /* "tables/indexesextension.pyx":299
8741  *
8742  *                 isptr[0] = ipi + elsize2
8743  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
8744  *                 isptr += 2
8745  *
8746  */
8747         (__pyx_v_isptr[1]) = __pyx_v_ipr;
8748 
8749         /* "tables/indexesextension.pyx":300
8750  *                 isptr[0] = ipi + elsize2
8751  *                 isptr[1] = ipr
8752  *                 isptr += 2             # <<<<<<<<<<<<<<
8753  *
8754  *                 pr = pi - 1
8755  */
8756         __pyx_v_isptr = (__pyx_v_isptr + 2);
8757 
8758         /* "tables/indexesextension.pyx":302
8759  *                 isptr += 2
8760  *
8761  *                 pr = pi - 1             # <<<<<<<<<<<<<<
8762  *                 ipr = ipi - elsize2
8763  *             else:
8764  */
8765         __pyx_v_pr = (__pyx_v_pi - 1);
8766 
8767         /* "tables/indexesextension.pyx":303
8768  *
8769  *                 pr = pi - 1
8770  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
8771  *             else:
8772  *                 sptr[0] = pl
8773  */
8774         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
8775 
8776         /* "tables/indexesextension.pyx":293
8777  *
8778  *             # push largest partition on stack and proceed with the other
8779  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
8780  *                 sptr[0] = pi + 1
8781  *                 sptr[1] = pr
8782  */
8783         goto __pyx_L17;
8784       }
8785 
8786       /* "tables/indexesextension.pyx":305
8787  *                 ipr = ipi - elsize2
8788  *             else:
8789  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
8790  *                 sptr[1] = pi - 1
8791  *                 sptr += 2
8792  */
8793       /*else*/ {
8794         (__pyx_v_sptr[0]) = __pyx_v_pl;
8795 
8796         /* "tables/indexesextension.pyx":306
8797  *             else:
8798  *                 sptr[0] = pl
8799  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
8800  *                 sptr += 2
8801  *
8802  */
8803         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
8804 
8805         /* "tables/indexesextension.pyx":307
8806  *                 sptr[0] = pl
8807  *                 sptr[1] = pi - 1
8808  *                 sptr += 2             # <<<<<<<<<<<<<<
8809  *
8810  *                 isptr[0] = ipl
8811  */
8812         __pyx_v_sptr = (__pyx_v_sptr + 2);
8813 
8814         /* "tables/indexesextension.pyx":309
8815  *                 sptr += 2
8816  *
8817  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
8818  *                 isptr[1] = ipi - elsize2
8819  *                 isptr += 2
8820  */
8821         (__pyx_v_isptr[0]) = __pyx_v_ipl;
8822 
8823         /* "tables/indexesextension.pyx":310
8824  *
8825  *                 isptr[0] = ipl
8826  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
8827  *                 isptr += 2
8828  *
8829  */
8830         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
8831 
8832         /* "tables/indexesextension.pyx":311
8833  *                 isptr[0] = ipl
8834  *                 isptr[1] = ipi - elsize2
8835  *                 isptr += 2             # <<<<<<<<<<<<<<
8836  *
8837  *                 pl = pi + 1
8838  */
8839         __pyx_v_isptr = (__pyx_v_isptr + 2);
8840 
8841         /* "tables/indexesextension.pyx":313
8842  *                 isptr += 2
8843  *
8844  *                 pl = pi + 1             # <<<<<<<<<<<<<<
8845  *                 ipl = ipi + elsize2
8846  *
8847  */
8848         __pyx_v_pl = (__pyx_v_pi + 1);
8849 
8850         /* "tables/indexesextension.pyx":314
8851  *
8852  *                 pl = pi + 1
8853  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
8854  *
8855  *         pi = pl + 1
8856  */
8857         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
8858       }
8859       __pyx_L17:;
8860     }
8861 
8862     /* "tables/indexesextension.pyx":316
8863  *                 ipl = ipi + elsize2
8864  *
8865  *         pi = pl + 1             # <<<<<<<<<<<<<<
8866  *         ipi = ipl + elsize2
8867  *         while pi <= pr:
8868  */
8869     __pyx_v_pi = (__pyx_v_pl + 1);
8870 
8871     /* "tables/indexesextension.pyx":317
8872  *
8873  *         pi = pl + 1
8874  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
8875  *         while pi <= pr:
8876  *             vp = pi[0]
8877  */
8878     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
8879 
8880     /* "tables/indexesextension.pyx":318
8881  *         pi = pl + 1
8882  *         ipi = ipl + elsize2
8883  *         while pi <= pr:             # <<<<<<<<<<<<<<
8884  *             vp = pi[0]
8885  *             memcpy(ivp, ipi, elsize2)
8886  */
8887     while (1) {
8888       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
8889       if (!__pyx_t_1) break;
8890 
8891       /* "tables/indexesextension.pyx":319
8892  *         ipi = ipl + elsize2
8893  *         while pi <= pr:
8894  *             vp = pi[0]             # <<<<<<<<<<<<<<
8895  *             memcpy(ivp, ipi, elsize2)
8896  *
8897  */
8898       __pyx_v_vp = (__pyx_v_pi[0]);
8899 
8900       /* "tables/indexesextension.pyx":320
8901  *         while pi <= pr:
8902  *             vp = pi[0]
8903  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
8904  *
8905  *             pj = pi
8906  */
8907       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
8908 
8909       /* "tables/indexesextension.pyx":322
8910  *             memcpy(ivp, ipi, elsize2)
8911  *
8912  *             pj = pi             # <<<<<<<<<<<<<<
8913  *             pt = pi - 1
8914  *
8915  */
8916       __pyx_v_pj = __pyx_v_pi;
8917 
8918       /* "tables/indexesextension.pyx":323
8919  *
8920  *             pj = pi
8921  *             pt = pi - 1             # <<<<<<<<<<<<<<
8922  *
8923  *             ipj = ipi
8924  */
8925       __pyx_v_pt = (__pyx_v_pi - 1);
8926 
8927       /* "tables/indexesextension.pyx":325
8928  *             pt = pi - 1
8929  *
8930  *             ipj = ipi             # <<<<<<<<<<<<<<
8931  *             ipt = ipi - elsize2
8932  *
8933  */
8934       __pyx_v_ipj = __pyx_v_ipi;
8935 
8936       /* "tables/indexesextension.pyx":326
8937  *
8938  *             ipj = ipi
8939  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
8940  *
8941  *             while pj > pl and less_than(&vp, pt):
8942  */
8943       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
8944 
8945       /* "tables/indexesextension.pyx":328
8946  *             ipt = ipi - elsize2
8947  *
8948  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
8949  *                 pj[0] = pt[0]
8950  *                 pj -= 1
8951  */
8952       while (1) {
8953         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
8954         if (__pyx_t_4) {
8955         } else {
8956           __pyx_t_1 = __pyx_t_4;
8957           goto __pyx_L22_bool_binop_done;
8958         }
8959         __pyx_t_4 = (__pyx_fuse_5__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
8960         __pyx_t_1 = __pyx_t_4;
8961         __pyx_L22_bool_binop_done:;
8962         if (!__pyx_t_1) break;
8963 
8964         /* "tables/indexesextension.pyx":329
8965  *
8966  *             while pj > pl and less_than(&vp, pt):
8967  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
8968  *                 pj -= 1
8969  *                 pt -= 1
8970  */
8971         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
8972 
8973         /* "tables/indexesextension.pyx":330
8974  *             while pj > pl and less_than(&vp, pt):
8975  *                 pj[0] = pt[0]
8976  *                 pj -= 1             # <<<<<<<<<<<<<<
8977  *                 pt -= 1
8978  *
8979  */
8980         __pyx_v_pj = (__pyx_v_pj - 1);
8981 
8982         /* "tables/indexesextension.pyx":331
8983  *                 pj[0] = pt[0]
8984  *                 pj -= 1
8985  *                 pt -= 1             # <<<<<<<<<<<<<<
8986  *
8987  *                 memcpy(ipj, ipt, elsize2)
8988  */
8989         __pyx_v_pt = (__pyx_v_pt - 1);
8990 
8991         /* "tables/indexesextension.pyx":333
8992  *                 pt -= 1
8993  *
8994  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
8995  *                 ipj -= elsize2
8996  *                 ipt -= elsize2
8997  */
8998         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
8999 
9000         /* "tables/indexesextension.pyx":334
9001  *
9002  *                 memcpy(ipj, ipt, elsize2)
9003  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
9004  *                 ipt -= elsize2
9005  *
9006  */
9007         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
9008 
9009         /* "tables/indexesextension.pyx":335
9010  *                 memcpy(ipj, ipt, elsize2)
9011  *                 ipj -= elsize2
9012  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
9013  *
9014  *             pj[0] = vp
9015  */
9016         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
9017       }
9018 
9019       /* "tables/indexesextension.pyx":337
9020  *                 ipt -= elsize2
9021  *
9022  *             pj[0] = vp             # <<<<<<<<<<<<<<
9023  *             memcpy(ipj, ivp, elsize2)
9024  *
9025  */
9026       (__pyx_v_pj[0]) = __pyx_v_vp;
9027 
9028       /* "tables/indexesextension.pyx":338
9029  *
9030  *             pj[0] = vp
9031  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
9032  *
9033  *             pi += 1
9034  */
9035       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
9036 
9037       /* "tables/indexesextension.pyx":340
9038  *             memcpy(ipj, ivp, elsize2)
9039  *
9040  *             pi += 1             # <<<<<<<<<<<<<<
9041  *             ipi += elsize2
9042  *
9043  */
9044       __pyx_v_pi = (__pyx_v_pi + 1);
9045 
9046       /* "tables/indexesextension.pyx":341
9047  *
9048  *             pi += 1
9049  *             ipi += elsize2             # <<<<<<<<<<<<<<
9050  *
9051  *         if sptr == stack:
9052  */
9053       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
9054     }
9055 
9056     /* "tables/indexesextension.pyx":343
9057  *             ipi += elsize2
9058  *
9059  *         if sptr == stack:             # <<<<<<<<<<<<<<
9060  *             break
9061  *
9062  */
9063     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
9064     if (__pyx_t_1) {
9065 
9066       /* "tables/indexesextension.pyx":344
9067  *
9068  *         if sptr == stack:
9069  *             break             # <<<<<<<<<<<<<<
9070  *
9071  *         sptr -= 2
9072  */
9073       goto __pyx_L4_break;
9074 
9075       /* "tables/indexesextension.pyx":343
9076  *             ipi += elsize2
9077  *
9078  *         if sptr == stack:             # <<<<<<<<<<<<<<
9079  *             break
9080  *
9081  */
9082     }
9083 
9084     /* "tables/indexesextension.pyx":346
9085  *             break
9086  *
9087  *         sptr -= 2             # <<<<<<<<<<<<<<
9088  *         pl = sptr[0]
9089  *         pr = sptr[1]
9090  */
9091     __pyx_v_sptr = (__pyx_v_sptr - 2);
9092 
9093     /* "tables/indexesextension.pyx":347
9094  *
9095  *         sptr -= 2
9096  *         pl = sptr[0]             # <<<<<<<<<<<<<<
9097  *         pr = sptr[1]
9098  *
9099  */
9100     __pyx_v_pl = (__pyx_v_sptr[0]);
9101 
9102     /* "tables/indexesextension.pyx":348
9103  *         sptr -= 2
9104  *         pl = sptr[0]
9105  *         pr = sptr[1]             # <<<<<<<<<<<<<<
9106  *
9107  *         isptr -= 2
9108  */
9109     __pyx_v_pr = (__pyx_v_sptr[1]);
9110 
9111     /* "tables/indexesextension.pyx":350
9112  *         pr = sptr[1]
9113  *
9114  *         isptr -= 2             # <<<<<<<<<<<<<<
9115  *         ipl = isptr[0]
9116  *         ipr = isptr[1]
9117  */
9118     __pyx_v_isptr = (__pyx_v_isptr - 2);
9119 
9120     /* "tables/indexesextension.pyx":351
9121  *
9122  *         isptr -= 2
9123  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
9124  *         ipr = isptr[1]
9125  *
9126  */
9127     __pyx_v_ipl = (__pyx_v_isptr[0]);
9128 
9129     /* "tables/indexesextension.pyx":352
9130  *         isptr -= 2
9131  *         ipl = isptr[0]
9132  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
9133  *
9134  *     free(ivp)
9135  */
9136     __pyx_v_ipr = (__pyx_v_isptr[1]);
9137   }
9138   __pyx_L4_break:;
9139 
9140   /* "tables/indexesextension.pyx":354
9141  *         ipr = isptr[1]
9142  *
9143  *     free(ivp)             # <<<<<<<<<<<<<<
9144  *
9145  *
9146  */
9147   free(__pyx_v_ivp);
9148 
9149   /* "tables/indexesextension.pyx":215
9150  *
9151  * @cython.cdivision(True)
9152  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
9153  *     cdef number_type *pl = start1
9154  *     cdef number_type *pr = start1 + (n - 1)
9155  */
9156 
9157   /* function exit code */
9158 }
9159 
__pyx_fuse_6__pyx_f_6tables_16indexesextension__keysort(npy_uint32 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)9160 static void __pyx_fuse_6__pyx_f_6tables_16indexesextension__keysort(npy_uint32 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
9161   npy_uint32 *__pyx_v_pl;
9162   npy_uint32 *__pyx_v_pr;
9163   char *__pyx_v_ipl;
9164   char *__pyx_v_ipr;
9165   npy_uint32 __pyx_v_vp;
9166   char *__pyx_v_ivp;
9167   npy_uint32 *__pyx_v_stack[0x64];
9168   npy_uint32 **__pyx_v_sptr;
9169   char *__pyx_v_istack[0x64];
9170   char **__pyx_v_isptr;
9171   CYTHON_UNUSED size_t __pyx_v_stack_index;
9172   npy_uint32 *__pyx_v_pm;
9173   npy_uint32 *__pyx_v_pi;
9174   npy_uint32 *__pyx_v_pj;
9175   npy_uint32 *__pyx_v_pt;
9176   char *__pyx_v_ipm;
9177   char *__pyx_v_ipi;
9178   char *__pyx_v_ipj;
9179   char *__pyx_v_ipt;
9180   int __pyx_t_1;
9181   npy_uint32 __pyx_t_2;
9182   npy_uint32 __pyx_t_3;
9183   int __pyx_t_4;
9184 
9185   /* "tables/indexesextension.pyx":216
9186  * @cython.cdivision(True)
9187  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
9188  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
9189  *     cdef number_type *pr = start1 + (n - 1)
9190  *
9191  */
9192   __pyx_v_pl = __pyx_v_start1;
9193 
9194   /* "tables/indexesextension.pyx":217
9195  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
9196  *     cdef number_type *pl = start1
9197  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
9198  *
9199  *     cdef char *ipl = start2
9200  */
9201   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
9202 
9203   /* "tables/indexesextension.pyx":219
9204  *     cdef number_type *pr = start1 + (n - 1)
9205  *
9206  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
9207  *     cdef char *ipr = start2 + (n - 1) * elsize2
9208  *
9209  */
9210   __pyx_v_ipl = __pyx_v_start2;
9211 
9212   /* "tables/indexesextension.pyx":220
9213  *
9214  *     cdef char *ipl = start2
9215  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
9216  *
9217  *     cdef number_type vp
9218  */
9219   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
9220 
9221   /* "tables/indexesextension.pyx":223
9222  *
9223  *     cdef number_type vp
9224  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
9225  *
9226  *     cdef number_type *stack[PYA_QS_STACK]
9227  */
9228   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
9229 
9230   /* "tables/indexesextension.pyx":226
9231  *
9232  *     cdef number_type *stack[PYA_QS_STACK]
9233  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
9234  *
9235  *     cdef char *istack[PYA_QS_STACK]
9236  */
9237   __pyx_v_sptr = __pyx_v_stack;
9238 
9239   /* "tables/indexesextension.pyx":229
9240  *
9241  *     cdef char *istack[PYA_QS_STACK]
9242  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
9243  *
9244  *     cdef size_t stack_index = 0
9245  */
9246   __pyx_v_isptr = __pyx_v_istack;
9247 
9248   /* "tables/indexesextension.pyx":231
9249  *     cdef char **isptr = istack
9250  *
9251  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
9252  *
9253  *     cdef number_type *pm
9254  */
9255   __pyx_v_stack_index = 0;
9256 
9257   /* "tables/indexesextension.pyx":242
9258  *     cdef char *ipt
9259  *
9260  *     while True:             # <<<<<<<<<<<<<<
9261  *         while pr - pl > SMALL_QUICKSORT:
9262  *             pm  = pl + ((pr - pl) >> 1)
9263  */
9264   while (1) {
9265 
9266     /* "tables/indexesextension.pyx":243
9267  *
9268  *     while True:
9269  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
9270  *             pm  = pl + ((pr - pl) >> 1)
9271  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
9272  */
9273     while (1) {
9274       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
9275       if (!__pyx_t_1) break;
9276 
9277       /* "tables/indexesextension.pyx":244
9278  *     while True:
9279  *         while pr - pl > SMALL_QUICKSORT:
9280  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
9281  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
9282  *
9283  */
9284       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
9285 
9286       /* "tables/indexesextension.pyx":245
9287  *         while pr - pl > SMALL_QUICKSORT:
9288  *             pm  = pl + ((pr - pl) >> 1)
9289  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
9290  *
9291  *             if less_than(pm, pl):
9292  */
9293       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
9294 
9295       /* "tables/indexesextension.pyx":247
9296  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
9297  *
9298  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
9299  *                 pm[0], pl[0] =  pl[0], pm[0]
9300  *                 swap_bytes(ipm, ipl, elsize2)
9301  */
9302       __pyx_t_1 = (__pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
9303       if (__pyx_t_1) {
9304 
9305         /* "tables/indexesextension.pyx":248
9306  *
9307  *             if less_than(pm, pl):
9308  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
9309  *                 swap_bytes(ipm, ipl, elsize2)
9310  *
9311  */
9312         __pyx_t_2 = (__pyx_v_pl[0]);
9313         __pyx_t_3 = (__pyx_v_pm[0]);
9314         (__pyx_v_pm[0]) = __pyx_t_2;
9315         (__pyx_v_pl[0]) = __pyx_t_3;
9316 
9317         /* "tables/indexesextension.pyx":249
9318  *             if less_than(pm, pl):
9319  *                 pm[0], pl[0] =  pl[0], pm[0]
9320  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
9321  *
9322  *             if less_than(pr, pm):
9323  */
9324         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
9325 
9326         /* "tables/indexesextension.pyx":247
9327  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
9328  *
9329  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
9330  *                 pm[0], pl[0] =  pl[0], pm[0]
9331  *                 swap_bytes(ipm, ipl, elsize2)
9332  */
9333       }
9334 
9335       /* "tables/indexesextension.pyx":251
9336  *                 swap_bytes(ipm, ipl, elsize2)
9337  *
9338  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
9339  *                 pr[0], pm[0] =  pm[0], pr[0]
9340  *                 swap_bytes(ipr, ipm, elsize2)
9341  */
9342       __pyx_t_1 = (__pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
9343       if (__pyx_t_1) {
9344 
9345         /* "tables/indexesextension.pyx":252
9346  *
9347  *             if less_than(pr, pm):
9348  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
9349  *                 swap_bytes(ipr, ipm, elsize2)
9350  *
9351  */
9352         __pyx_t_3 = (__pyx_v_pm[0]);
9353         __pyx_t_2 = (__pyx_v_pr[0]);
9354         (__pyx_v_pr[0]) = __pyx_t_3;
9355         (__pyx_v_pm[0]) = __pyx_t_2;
9356 
9357         /* "tables/indexesextension.pyx":253
9358  *             if less_than(pr, pm):
9359  *                 pr[0], pm[0] =  pm[0], pr[0]
9360  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
9361  *
9362  *             if less_than(pm, pl):
9363  */
9364         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
9365 
9366         /* "tables/indexesextension.pyx":251
9367  *                 swap_bytes(ipm, ipl, elsize2)
9368  *
9369  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
9370  *                 pr[0], pm[0] =  pm[0], pr[0]
9371  *                 swap_bytes(ipr, ipm, elsize2)
9372  */
9373       }
9374 
9375       /* "tables/indexesextension.pyx":255
9376  *                 swap_bytes(ipr, ipm, elsize2)
9377  *
9378  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
9379  *                 pm[0], pl[0] =  pl[0], pm[0]
9380  *                 swap_bytes(ipm, ipl, elsize2)
9381  */
9382       __pyx_t_1 = (__pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
9383       if (__pyx_t_1) {
9384 
9385         /* "tables/indexesextension.pyx":256
9386  *
9387  *             if less_than(pm, pl):
9388  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
9389  *                 swap_bytes(ipm, ipl, elsize2)
9390  *
9391  */
9392         __pyx_t_2 = (__pyx_v_pl[0]);
9393         __pyx_t_3 = (__pyx_v_pm[0]);
9394         (__pyx_v_pm[0]) = __pyx_t_2;
9395         (__pyx_v_pl[0]) = __pyx_t_3;
9396 
9397         /* "tables/indexesextension.pyx":257
9398  *             if less_than(pm, pl):
9399  *                 pm[0], pl[0] =  pl[0], pm[0]
9400  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
9401  *
9402  *             vp = pm[0]
9403  */
9404         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
9405 
9406         /* "tables/indexesextension.pyx":255
9407  *                 swap_bytes(ipr, ipm, elsize2)
9408  *
9409  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
9410  *                 pm[0], pl[0] =  pl[0], pm[0]
9411  *                 swap_bytes(ipm, ipl, elsize2)
9412  */
9413       }
9414 
9415       /* "tables/indexesextension.pyx":259
9416  *                 swap_bytes(ipm, ipl, elsize2)
9417  *
9418  *             vp = pm[0]             # <<<<<<<<<<<<<<
9419  *
9420  *             pi = pl
9421  */
9422       __pyx_v_vp = (__pyx_v_pm[0]);
9423 
9424       /* "tables/indexesextension.pyx":261
9425  *             vp = pm[0]
9426  *
9427  *             pi = pl             # <<<<<<<<<<<<<<
9428  *             ipi = ipl
9429  *
9430  */
9431       __pyx_v_pi = __pyx_v_pl;
9432 
9433       /* "tables/indexesextension.pyx":262
9434  *
9435  *             pi = pl
9436  *             ipi = ipl             # <<<<<<<<<<<<<<
9437  *
9438  *             pj = pr - 1
9439  */
9440       __pyx_v_ipi = __pyx_v_ipl;
9441 
9442       /* "tables/indexesextension.pyx":264
9443  *             ipi = ipl
9444  *
9445  *             pj = pr - 1             # <<<<<<<<<<<<<<
9446  *             ipj = ipr - elsize2
9447  *
9448  */
9449       __pyx_v_pj = (__pyx_v_pr - 1);
9450 
9451       /* "tables/indexesextension.pyx":265
9452  *
9453  *             pj = pr - 1
9454  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
9455  *
9456  *             pm[0], pj[0] = pj[0], pm[0]
9457  */
9458       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
9459 
9460       /* "tables/indexesextension.pyx":267
9461  *             ipj = ipr - elsize2
9462  *
9463  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
9464  *             swap_bytes(ipm, ipj, elsize2)
9465  *
9466  */
9467       __pyx_t_3 = (__pyx_v_pj[0]);
9468       __pyx_t_2 = (__pyx_v_pm[0]);
9469       (__pyx_v_pm[0]) = __pyx_t_3;
9470       (__pyx_v_pj[0]) = __pyx_t_2;
9471 
9472       /* "tables/indexesextension.pyx":268
9473  *
9474  *             pm[0], pj[0] = pj[0], pm[0]
9475  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
9476  *
9477  *             while True:
9478  */
9479       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
9480 
9481       /* "tables/indexesextension.pyx":270
9482  *             swap_bytes(ipm, ipj, elsize2)
9483  *
9484  *             while True:             # <<<<<<<<<<<<<<
9485  *                 pi += 1
9486  *                 ipi += elsize2
9487  */
9488       while (1) {
9489 
9490         /* "tables/indexesextension.pyx":271
9491  *
9492  *             while True:
9493  *                 pi += 1             # <<<<<<<<<<<<<<
9494  *                 ipi += elsize2
9495  *                 while less_than(pi, &vp):
9496  */
9497         __pyx_v_pi = (__pyx_v_pi + 1);
9498 
9499         /* "tables/indexesextension.pyx":272
9500  *             while True:
9501  *                 pi += 1
9502  *                 ipi += elsize2             # <<<<<<<<<<<<<<
9503  *                 while less_than(pi, &vp):
9504  *                     pi += 1
9505  */
9506         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
9507 
9508         /* "tables/indexesextension.pyx":273
9509  *                 pi += 1
9510  *                 ipi += elsize2
9511  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
9512  *                     pi += 1
9513  *                     ipi += elsize2
9514  */
9515         while (1) {
9516           __pyx_t_1 = (__pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
9517           if (!__pyx_t_1) break;
9518 
9519           /* "tables/indexesextension.pyx":274
9520  *                 ipi += elsize2
9521  *                 while less_than(pi, &vp):
9522  *                     pi += 1             # <<<<<<<<<<<<<<
9523  *                     ipi += elsize2
9524  *
9525  */
9526           __pyx_v_pi = (__pyx_v_pi + 1);
9527 
9528           /* "tables/indexesextension.pyx":275
9529  *                 while less_than(pi, &vp):
9530  *                     pi += 1
9531  *                     ipi += elsize2             # <<<<<<<<<<<<<<
9532  *
9533  *                 pj -= 1
9534  */
9535           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
9536         }
9537 
9538         /* "tables/indexesextension.pyx":277
9539  *                     ipi += elsize2
9540  *
9541  *                 pj -= 1             # <<<<<<<<<<<<<<
9542  *                 ipj -= elsize2
9543  *                 while less_than(&vp, pj):
9544  */
9545         __pyx_v_pj = (__pyx_v_pj - 1);
9546 
9547         /* "tables/indexesextension.pyx":278
9548  *
9549  *                 pj -= 1
9550  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
9551  *                 while less_than(&vp, pj):
9552  *                     pj -= 1
9553  */
9554         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
9555 
9556         /* "tables/indexesextension.pyx":279
9557  *                 pj -= 1
9558  *                 ipj -= elsize2
9559  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
9560  *                     pj -= 1
9561  *                     ipj -= elsize2
9562  */
9563         while (1) {
9564           __pyx_t_1 = (__pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
9565           if (!__pyx_t_1) break;
9566 
9567           /* "tables/indexesextension.pyx":280
9568  *                 ipj -= elsize2
9569  *                 while less_than(&vp, pj):
9570  *                     pj -= 1             # <<<<<<<<<<<<<<
9571  *                     ipj -= elsize2
9572  *
9573  */
9574           __pyx_v_pj = (__pyx_v_pj - 1);
9575 
9576           /* "tables/indexesextension.pyx":281
9577  *                 while less_than(&vp, pj):
9578  *                     pj -= 1
9579  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
9580  *
9581  *                 if pi >= pj:
9582  */
9583           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
9584         }
9585 
9586         /* "tables/indexesextension.pyx":283
9587  *                     ipj -= elsize2
9588  *
9589  *                 if pi >= pj:             # <<<<<<<<<<<<<<
9590  *                     break
9591  *
9592  */
9593         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
9594         if (__pyx_t_1) {
9595 
9596           /* "tables/indexesextension.pyx":284
9597  *
9598  *                 if pi >= pj:
9599  *                     break             # <<<<<<<<<<<<<<
9600  *
9601  *                 pi[0], pj[0] = pj[0], pi[0]
9602  */
9603           goto __pyx_L11_break;
9604 
9605           /* "tables/indexesextension.pyx":283
9606  *                     ipj -= elsize2
9607  *
9608  *                 if pi >= pj:             # <<<<<<<<<<<<<<
9609  *                     break
9610  *
9611  */
9612         }
9613 
9614         /* "tables/indexesextension.pyx":286
9615  *                     break
9616  *
9617  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
9618  *                 swap_bytes(ipi, ipj, elsize2)
9619  *
9620  */
9621         __pyx_t_2 = (__pyx_v_pj[0]);
9622         __pyx_t_3 = (__pyx_v_pi[0]);
9623         (__pyx_v_pi[0]) = __pyx_t_2;
9624         (__pyx_v_pj[0]) = __pyx_t_3;
9625 
9626         /* "tables/indexesextension.pyx":287
9627  *
9628  *                 pi[0], pj[0] = pj[0], pi[0]
9629  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
9630  *
9631  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
9632  */
9633         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
9634       }
9635       __pyx_L11_break:;
9636 
9637       /* "tables/indexesextension.pyx":289
9638  *                 swap_bytes(ipi, ipj, elsize2)
9639  *
9640  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
9641  *             swap_bytes(ipi, ipr-elsize2, elsize2)
9642  *
9643  */
9644       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
9645       __pyx_t_2 = (__pyx_v_pi[0]);
9646       (__pyx_v_pi[0]) = __pyx_t_3;
9647       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
9648 
9649       /* "tables/indexesextension.pyx":290
9650  *
9651  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
9652  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
9653  *
9654  *             # push largest partition on stack and proceed with the other
9655  */
9656       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
9657 
9658       /* "tables/indexesextension.pyx":293
9659  *
9660  *             # push largest partition on stack and proceed with the other
9661  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
9662  *                 sptr[0] = pi + 1
9663  *                 sptr[1] = pr
9664  */
9665       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
9666       if (__pyx_t_1) {
9667 
9668         /* "tables/indexesextension.pyx":294
9669  *             # push largest partition on stack and proceed with the other
9670  *             if (pi - pl) < (pr - pi):
9671  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
9672  *                 sptr[1] = pr
9673  *                 sptr += 2
9674  */
9675         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
9676 
9677         /* "tables/indexesextension.pyx":295
9678  *             if (pi - pl) < (pr - pi):
9679  *                 sptr[0] = pi + 1
9680  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
9681  *                 sptr += 2
9682  *
9683  */
9684         (__pyx_v_sptr[1]) = __pyx_v_pr;
9685 
9686         /* "tables/indexesextension.pyx":296
9687  *                 sptr[0] = pi + 1
9688  *                 sptr[1] = pr
9689  *                 sptr += 2             # <<<<<<<<<<<<<<
9690  *
9691  *                 isptr[0] = ipi + elsize2
9692  */
9693         __pyx_v_sptr = (__pyx_v_sptr + 2);
9694 
9695         /* "tables/indexesextension.pyx":298
9696  *                 sptr += 2
9697  *
9698  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
9699  *                 isptr[1] = ipr
9700  *                 isptr += 2
9701  */
9702         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
9703 
9704         /* "tables/indexesextension.pyx":299
9705  *
9706  *                 isptr[0] = ipi + elsize2
9707  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
9708  *                 isptr += 2
9709  *
9710  */
9711         (__pyx_v_isptr[1]) = __pyx_v_ipr;
9712 
9713         /* "tables/indexesextension.pyx":300
9714  *                 isptr[0] = ipi + elsize2
9715  *                 isptr[1] = ipr
9716  *                 isptr += 2             # <<<<<<<<<<<<<<
9717  *
9718  *                 pr = pi - 1
9719  */
9720         __pyx_v_isptr = (__pyx_v_isptr + 2);
9721 
9722         /* "tables/indexesextension.pyx":302
9723  *                 isptr += 2
9724  *
9725  *                 pr = pi - 1             # <<<<<<<<<<<<<<
9726  *                 ipr = ipi - elsize2
9727  *             else:
9728  */
9729         __pyx_v_pr = (__pyx_v_pi - 1);
9730 
9731         /* "tables/indexesextension.pyx":303
9732  *
9733  *                 pr = pi - 1
9734  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
9735  *             else:
9736  *                 sptr[0] = pl
9737  */
9738         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
9739 
9740         /* "tables/indexesextension.pyx":293
9741  *
9742  *             # push largest partition on stack and proceed with the other
9743  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
9744  *                 sptr[0] = pi + 1
9745  *                 sptr[1] = pr
9746  */
9747         goto __pyx_L17;
9748       }
9749 
9750       /* "tables/indexesextension.pyx":305
9751  *                 ipr = ipi - elsize2
9752  *             else:
9753  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
9754  *                 sptr[1] = pi - 1
9755  *                 sptr += 2
9756  */
9757       /*else*/ {
9758         (__pyx_v_sptr[0]) = __pyx_v_pl;
9759 
9760         /* "tables/indexesextension.pyx":306
9761  *             else:
9762  *                 sptr[0] = pl
9763  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
9764  *                 sptr += 2
9765  *
9766  */
9767         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
9768 
9769         /* "tables/indexesextension.pyx":307
9770  *                 sptr[0] = pl
9771  *                 sptr[1] = pi - 1
9772  *                 sptr += 2             # <<<<<<<<<<<<<<
9773  *
9774  *                 isptr[0] = ipl
9775  */
9776         __pyx_v_sptr = (__pyx_v_sptr + 2);
9777 
9778         /* "tables/indexesextension.pyx":309
9779  *                 sptr += 2
9780  *
9781  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
9782  *                 isptr[1] = ipi - elsize2
9783  *                 isptr += 2
9784  */
9785         (__pyx_v_isptr[0]) = __pyx_v_ipl;
9786 
9787         /* "tables/indexesextension.pyx":310
9788  *
9789  *                 isptr[0] = ipl
9790  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
9791  *                 isptr += 2
9792  *
9793  */
9794         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
9795 
9796         /* "tables/indexesextension.pyx":311
9797  *                 isptr[0] = ipl
9798  *                 isptr[1] = ipi - elsize2
9799  *                 isptr += 2             # <<<<<<<<<<<<<<
9800  *
9801  *                 pl = pi + 1
9802  */
9803         __pyx_v_isptr = (__pyx_v_isptr + 2);
9804 
9805         /* "tables/indexesextension.pyx":313
9806  *                 isptr += 2
9807  *
9808  *                 pl = pi + 1             # <<<<<<<<<<<<<<
9809  *                 ipl = ipi + elsize2
9810  *
9811  */
9812         __pyx_v_pl = (__pyx_v_pi + 1);
9813 
9814         /* "tables/indexesextension.pyx":314
9815  *
9816  *                 pl = pi + 1
9817  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
9818  *
9819  *         pi = pl + 1
9820  */
9821         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
9822       }
9823       __pyx_L17:;
9824     }
9825 
9826     /* "tables/indexesextension.pyx":316
9827  *                 ipl = ipi + elsize2
9828  *
9829  *         pi = pl + 1             # <<<<<<<<<<<<<<
9830  *         ipi = ipl + elsize2
9831  *         while pi <= pr:
9832  */
9833     __pyx_v_pi = (__pyx_v_pl + 1);
9834 
9835     /* "tables/indexesextension.pyx":317
9836  *
9837  *         pi = pl + 1
9838  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
9839  *         while pi <= pr:
9840  *             vp = pi[0]
9841  */
9842     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
9843 
9844     /* "tables/indexesextension.pyx":318
9845  *         pi = pl + 1
9846  *         ipi = ipl + elsize2
9847  *         while pi <= pr:             # <<<<<<<<<<<<<<
9848  *             vp = pi[0]
9849  *             memcpy(ivp, ipi, elsize2)
9850  */
9851     while (1) {
9852       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
9853       if (!__pyx_t_1) break;
9854 
9855       /* "tables/indexesextension.pyx":319
9856  *         ipi = ipl + elsize2
9857  *         while pi <= pr:
9858  *             vp = pi[0]             # <<<<<<<<<<<<<<
9859  *             memcpy(ivp, ipi, elsize2)
9860  *
9861  */
9862       __pyx_v_vp = (__pyx_v_pi[0]);
9863 
9864       /* "tables/indexesextension.pyx":320
9865  *         while pi <= pr:
9866  *             vp = pi[0]
9867  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
9868  *
9869  *             pj = pi
9870  */
9871       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
9872 
9873       /* "tables/indexesextension.pyx":322
9874  *             memcpy(ivp, ipi, elsize2)
9875  *
9876  *             pj = pi             # <<<<<<<<<<<<<<
9877  *             pt = pi - 1
9878  *
9879  */
9880       __pyx_v_pj = __pyx_v_pi;
9881 
9882       /* "tables/indexesextension.pyx":323
9883  *
9884  *             pj = pi
9885  *             pt = pi - 1             # <<<<<<<<<<<<<<
9886  *
9887  *             ipj = ipi
9888  */
9889       __pyx_v_pt = (__pyx_v_pi - 1);
9890 
9891       /* "tables/indexesextension.pyx":325
9892  *             pt = pi - 1
9893  *
9894  *             ipj = ipi             # <<<<<<<<<<<<<<
9895  *             ipt = ipi - elsize2
9896  *
9897  */
9898       __pyx_v_ipj = __pyx_v_ipi;
9899 
9900       /* "tables/indexesextension.pyx":326
9901  *
9902  *             ipj = ipi
9903  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
9904  *
9905  *             while pj > pl and less_than(&vp, pt):
9906  */
9907       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
9908 
9909       /* "tables/indexesextension.pyx":328
9910  *             ipt = ipi - elsize2
9911  *
9912  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
9913  *                 pj[0] = pt[0]
9914  *                 pj -= 1
9915  */
9916       while (1) {
9917         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
9918         if (__pyx_t_4) {
9919         } else {
9920           __pyx_t_1 = __pyx_t_4;
9921           goto __pyx_L22_bool_binop_done;
9922         }
9923         __pyx_t_4 = (__pyx_fuse_6__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
9924         __pyx_t_1 = __pyx_t_4;
9925         __pyx_L22_bool_binop_done:;
9926         if (!__pyx_t_1) break;
9927 
9928         /* "tables/indexesextension.pyx":329
9929  *
9930  *             while pj > pl and less_than(&vp, pt):
9931  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
9932  *                 pj -= 1
9933  *                 pt -= 1
9934  */
9935         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
9936 
9937         /* "tables/indexesextension.pyx":330
9938  *             while pj > pl and less_than(&vp, pt):
9939  *                 pj[0] = pt[0]
9940  *                 pj -= 1             # <<<<<<<<<<<<<<
9941  *                 pt -= 1
9942  *
9943  */
9944         __pyx_v_pj = (__pyx_v_pj - 1);
9945 
9946         /* "tables/indexesextension.pyx":331
9947  *                 pj[0] = pt[0]
9948  *                 pj -= 1
9949  *                 pt -= 1             # <<<<<<<<<<<<<<
9950  *
9951  *                 memcpy(ipj, ipt, elsize2)
9952  */
9953         __pyx_v_pt = (__pyx_v_pt - 1);
9954 
9955         /* "tables/indexesextension.pyx":333
9956  *                 pt -= 1
9957  *
9958  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
9959  *                 ipj -= elsize2
9960  *                 ipt -= elsize2
9961  */
9962         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
9963 
9964         /* "tables/indexesextension.pyx":334
9965  *
9966  *                 memcpy(ipj, ipt, elsize2)
9967  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
9968  *                 ipt -= elsize2
9969  *
9970  */
9971         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
9972 
9973         /* "tables/indexesextension.pyx":335
9974  *                 memcpy(ipj, ipt, elsize2)
9975  *                 ipj -= elsize2
9976  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
9977  *
9978  *             pj[0] = vp
9979  */
9980         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
9981       }
9982 
9983       /* "tables/indexesextension.pyx":337
9984  *                 ipt -= elsize2
9985  *
9986  *             pj[0] = vp             # <<<<<<<<<<<<<<
9987  *             memcpy(ipj, ivp, elsize2)
9988  *
9989  */
9990       (__pyx_v_pj[0]) = __pyx_v_vp;
9991 
9992       /* "tables/indexesextension.pyx":338
9993  *
9994  *             pj[0] = vp
9995  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
9996  *
9997  *             pi += 1
9998  */
9999       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
10000 
10001       /* "tables/indexesextension.pyx":340
10002  *             memcpy(ipj, ivp, elsize2)
10003  *
10004  *             pi += 1             # <<<<<<<<<<<<<<
10005  *             ipi += elsize2
10006  *
10007  */
10008       __pyx_v_pi = (__pyx_v_pi + 1);
10009 
10010       /* "tables/indexesextension.pyx":341
10011  *
10012  *             pi += 1
10013  *             ipi += elsize2             # <<<<<<<<<<<<<<
10014  *
10015  *         if sptr == stack:
10016  */
10017       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
10018     }
10019 
10020     /* "tables/indexesextension.pyx":343
10021  *             ipi += elsize2
10022  *
10023  *         if sptr == stack:             # <<<<<<<<<<<<<<
10024  *             break
10025  *
10026  */
10027     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
10028     if (__pyx_t_1) {
10029 
10030       /* "tables/indexesextension.pyx":344
10031  *
10032  *         if sptr == stack:
10033  *             break             # <<<<<<<<<<<<<<
10034  *
10035  *         sptr -= 2
10036  */
10037       goto __pyx_L4_break;
10038 
10039       /* "tables/indexesextension.pyx":343
10040  *             ipi += elsize2
10041  *
10042  *         if sptr == stack:             # <<<<<<<<<<<<<<
10043  *             break
10044  *
10045  */
10046     }
10047 
10048     /* "tables/indexesextension.pyx":346
10049  *             break
10050  *
10051  *         sptr -= 2             # <<<<<<<<<<<<<<
10052  *         pl = sptr[0]
10053  *         pr = sptr[1]
10054  */
10055     __pyx_v_sptr = (__pyx_v_sptr - 2);
10056 
10057     /* "tables/indexesextension.pyx":347
10058  *
10059  *         sptr -= 2
10060  *         pl = sptr[0]             # <<<<<<<<<<<<<<
10061  *         pr = sptr[1]
10062  *
10063  */
10064     __pyx_v_pl = (__pyx_v_sptr[0]);
10065 
10066     /* "tables/indexesextension.pyx":348
10067  *         sptr -= 2
10068  *         pl = sptr[0]
10069  *         pr = sptr[1]             # <<<<<<<<<<<<<<
10070  *
10071  *         isptr -= 2
10072  */
10073     __pyx_v_pr = (__pyx_v_sptr[1]);
10074 
10075     /* "tables/indexesextension.pyx":350
10076  *         pr = sptr[1]
10077  *
10078  *         isptr -= 2             # <<<<<<<<<<<<<<
10079  *         ipl = isptr[0]
10080  *         ipr = isptr[1]
10081  */
10082     __pyx_v_isptr = (__pyx_v_isptr - 2);
10083 
10084     /* "tables/indexesextension.pyx":351
10085  *
10086  *         isptr -= 2
10087  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
10088  *         ipr = isptr[1]
10089  *
10090  */
10091     __pyx_v_ipl = (__pyx_v_isptr[0]);
10092 
10093     /* "tables/indexesextension.pyx":352
10094  *         isptr -= 2
10095  *         ipl = isptr[0]
10096  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
10097  *
10098  *     free(ivp)
10099  */
10100     __pyx_v_ipr = (__pyx_v_isptr[1]);
10101   }
10102   __pyx_L4_break:;
10103 
10104   /* "tables/indexesextension.pyx":354
10105  *         ipr = isptr[1]
10106  *
10107  *     free(ivp)             # <<<<<<<<<<<<<<
10108  *
10109  *
10110  */
10111   free(__pyx_v_ivp);
10112 
10113   /* "tables/indexesextension.pyx":215
10114  *
10115  * @cython.cdivision(True)
10116  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
10117  *     cdef number_type *pl = start1
10118  *     cdef number_type *pr = start1 + (n - 1)
10119  */
10120 
10121   /* function exit code */
10122 }
10123 
__pyx_fuse_7__pyx_f_6tables_16indexesextension__keysort(npy_uint64 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)10124 static void __pyx_fuse_7__pyx_f_6tables_16indexesextension__keysort(npy_uint64 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
10125   npy_uint64 *__pyx_v_pl;
10126   npy_uint64 *__pyx_v_pr;
10127   char *__pyx_v_ipl;
10128   char *__pyx_v_ipr;
10129   npy_uint64 __pyx_v_vp;
10130   char *__pyx_v_ivp;
10131   npy_uint64 *__pyx_v_stack[0x64];
10132   npy_uint64 **__pyx_v_sptr;
10133   char *__pyx_v_istack[0x64];
10134   char **__pyx_v_isptr;
10135   CYTHON_UNUSED size_t __pyx_v_stack_index;
10136   npy_uint64 *__pyx_v_pm;
10137   npy_uint64 *__pyx_v_pi;
10138   npy_uint64 *__pyx_v_pj;
10139   npy_uint64 *__pyx_v_pt;
10140   char *__pyx_v_ipm;
10141   char *__pyx_v_ipi;
10142   char *__pyx_v_ipj;
10143   char *__pyx_v_ipt;
10144   int __pyx_t_1;
10145   npy_uint64 __pyx_t_2;
10146   npy_uint64 __pyx_t_3;
10147   int __pyx_t_4;
10148 
10149   /* "tables/indexesextension.pyx":216
10150  * @cython.cdivision(True)
10151  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
10152  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
10153  *     cdef number_type *pr = start1 + (n - 1)
10154  *
10155  */
10156   __pyx_v_pl = __pyx_v_start1;
10157 
10158   /* "tables/indexesextension.pyx":217
10159  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
10160  *     cdef number_type *pl = start1
10161  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
10162  *
10163  *     cdef char *ipl = start2
10164  */
10165   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
10166 
10167   /* "tables/indexesextension.pyx":219
10168  *     cdef number_type *pr = start1 + (n - 1)
10169  *
10170  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
10171  *     cdef char *ipr = start2 + (n - 1) * elsize2
10172  *
10173  */
10174   __pyx_v_ipl = __pyx_v_start2;
10175 
10176   /* "tables/indexesextension.pyx":220
10177  *
10178  *     cdef char *ipl = start2
10179  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
10180  *
10181  *     cdef number_type vp
10182  */
10183   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
10184 
10185   /* "tables/indexesextension.pyx":223
10186  *
10187  *     cdef number_type vp
10188  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
10189  *
10190  *     cdef number_type *stack[PYA_QS_STACK]
10191  */
10192   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
10193 
10194   /* "tables/indexesextension.pyx":226
10195  *
10196  *     cdef number_type *stack[PYA_QS_STACK]
10197  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
10198  *
10199  *     cdef char *istack[PYA_QS_STACK]
10200  */
10201   __pyx_v_sptr = __pyx_v_stack;
10202 
10203   /* "tables/indexesextension.pyx":229
10204  *
10205  *     cdef char *istack[PYA_QS_STACK]
10206  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
10207  *
10208  *     cdef size_t stack_index = 0
10209  */
10210   __pyx_v_isptr = __pyx_v_istack;
10211 
10212   /* "tables/indexesextension.pyx":231
10213  *     cdef char **isptr = istack
10214  *
10215  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
10216  *
10217  *     cdef number_type *pm
10218  */
10219   __pyx_v_stack_index = 0;
10220 
10221   /* "tables/indexesextension.pyx":242
10222  *     cdef char *ipt
10223  *
10224  *     while True:             # <<<<<<<<<<<<<<
10225  *         while pr - pl > SMALL_QUICKSORT:
10226  *             pm  = pl + ((pr - pl) >> 1)
10227  */
10228   while (1) {
10229 
10230     /* "tables/indexesextension.pyx":243
10231  *
10232  *     while True:
10233  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
10234  *             pm  = pl + ((pr - pl) >> 1)
10235  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
10236  */
10237     while (1) {
10238       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
10239       if (!__pyx_t_1) break;
10240 
10241       /* "tables/indexesextension.pyx":244
10242  *     while True:
10243  *         while pr - pl > SMALL_QUICKSORT:
10244  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
10245  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
10246  *
10247  */
10248       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
10249 
10250       /* "tables/indexesextension.pyx":245
10251  *         while pr - pl > SMALL_QUICKSORT:
10252  *             pm  = pl + ((pr - pl) >> 1)
10253  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
10254  *
10255  *             if less_than(pm, pl):
10256  */
10257       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
10258 
10259       /* "tables/indexesextension.pyx":247
10260  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
10261  *
10262  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
10263  *                 pm[0], pl[0] =  pl[0], pm[0]
10264  *                 swap_bytes(ipm, ipl, elsize2)
10265  */
10266       __pyx_t_1 = (__pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
10267       if (__pyx_t_1) {
10268 
10269         /* "tables/indexesextension.pyx":248
10270  *
10271  *             if less_than(pm, pl):
10272  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
10273  *                 swap_bytes(ipm, ipl, elsize2)
10274  *
10275  */
10276         __pyx_t_2 = (__pyx_v_pl[0]);
10277         __pyx_t_3 = (__pyx_v_pm[0]);
10278         (__pyx_v_pm[0]) = __pyx_t_2;
10279         (__pyx_v_pl[0]) = __pyx_t_3;
10280 
10281         /* "tables/indexesextension.pyx":249
10282  *             if less_than(pm, pl):
10283  *                 pm[0], pl[0] =  pl[0], pm[0]
10284  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
10285  *
10286  *             if less_than(pr, pm):
10287  */
10288         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
10289 
10290         /* "tables/indexesextension.pyx":247
10291  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
10292  *
10293  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
10294  *                 pm[0], pl[0] =  pl[0], pm[0]
10295  *                 swap_bytes(ipm, ipl, elsize2)
10296  */
10297       }
10298 
10299       /* "tables/indexesextension.pyx":251
10300  *                 swap_bytes(ipm, ipl, elsize2)
10301  *
10302  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
10303  *                 pr[0], pm[0] =  pm[0], pr[0]
10304  *                 swap_bytes(ipr, ipm, elsize2)
10305  */
10306       __pyx_t_1 = (__pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
10307       if (__pyx_t_1) {
10308 
10309         /* "tables/indexesextension.pyx":252
10310  *
10311  *             if less_than(pr, pm):
10312  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
10313  *                 swap_bytes(ipr, ipm, elsize2)
10314  *
10315  */
10316         __pyx_t_3 = (__pyx_v_pm[0]);
10317         __pyx_t_2 = (__pyx_v_pr[0]);
10318         (__pyx_v_pr[0]) = __pyx_t_3;
10319         (__pyx_v_pm[0]) = __pyx_t_2;
10320 
10321         /* "tables/indexesextension.pyx":253
10322  *             if less_than(pr, pm):
10323  *                 pr[0], pm[0] =  pm[0], pr[0]
10324  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
10325  *
10326  *             if less_than(pm, pl):
10327  */
10328         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
10329 
10330         /* "tables/indexesextension.pyx":251
10331  *                 swap_bytes(ipm, ipl, elsize2)
10332  *
10333  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
10334  *                 pr[0], pm[0] =  pm[0], pr[0]
10335  *                 swap_bytes(ipr, ipm, elsize2)
10336  */
10337       }
10338 
10339       /* "tables/indexesextension.pyx":255
10340  *                 swap_bytes(ipr, ipm, elsize2)
10341  *
10342  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
10343  *                 pm[0], pl[0] =  pl[0], pm[0]
10344  *                 swap_bytes(ipm, ipl, elsize2)
10345  */
10346       __pyx_t_1 = (__pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
10347       if (__pyx_t_1) {
10348 
10349         /* "tables/indexesextension.pyx":256
10350  *
10351  *             if less_than(pm, pl):
10352  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
10353  *                 swap_bytes(ipm, ipl, elsize2)
10354  *
10355  */
10356         __pyx_t_2 = (__pyx_v_pl[0]);
10357         __pyx_t_3 = (__pyx_v_pm[0]);
10358         (__pyx_v_pm[0]) = __pyx_t_2;
10359         (__pyx_v_pl[0]) = __pyx_t_3;
10360 
10361         /* "tables/indexesextension.pyx":257
10362  *             if less_than(pm, pl):
10363  *                 pm[0], pl[0] =  pl[0], pm[0]
10364  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
10365  *
10366  *             vp = pm[0]
10367  */
10368         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
10369 
10370         /* "tables/indexesextension.pyx":255
10371  *                 swap_bytes(ipr, ipm, elsize2)
10372  *
10373  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
10374  *                 pm[0], pl[0] =  pl[0], pm[0]
10375  *                 swap_bytes(ipm, ipl, elsize2)
10376  */
10377       }
10378 
10379       /* "tables/indexesextension.pyx":259
10380  *                 swap_bytes(ipm, ipl, elsize2)
10381  *
10382  *             vp = pm[0]             # <<<<<<<<<<<<<<
10383  *
10384  *             pi = pl
10385  */
10386       __pyx_v_vp = (__pyx_v_pm[0]);
10387 
10388       /* "tables/indexesextension.pyx":261
10389  *             vp = pm[0]
10390  *
10391  *             pi = pl             # <<<<<<<<<<<<<<
10392  *             ipi = ipl
10393  *
10394  */
10395       __pyx_v_pi = __pyx_v_pl;
10396 
10397       /* "tables/indexesextension.pyx":262
10398  *
10399  *             pi = pl
10400  *             ipi = ipl             # <<<<<<<<<<<<<<
10401  *
10402  *             pj = pr - 1
10403  */
10404       __pyx_v_ipi = __pyx_v_ipl;
10405 
10406       /* "tables/indexesextension.pyx":264
10407  *             ipi = ipl
10408  *
10409  *             pj = pr - 1             # <<<<<<<<<<<<<<
10410  *             ipj = ipr - elsize2
10411  *
10412  */
10413       __pyx_v_pj = (__pyx_v_pr - 1);
10414 
10415       /* "tables/indexesextension.pyx":265
10416  *
10417  *             pj = pr - 1
10418  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
10419  *
10420  *             pm[0], pj[0] = pj[0], pm[0]
10421  */
10422       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
10423 
10424       /* "tables/indexesextension.pyx":267
10425  *             ipj = ipr - elsize2
10426  *
10427  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
10428  *             swap_bytes(ipm, ipj, elsize2)
10429  *
10430  */
10431       __pyx_t_3 = (__pyx_v_pj[0]);
10432       __pyx_t_2 = (__pyx_v_pm[0]);
10433       (__pyx_v_pm[0]) = __pyx_t_3;
10434       (__pyx_v_pj[0]) = __pyx_t_2;
10435 
10436       /* "tables/indexesextension.pyx":268
10437  *
10438  *             pm[0], pj[0] = pj[0], pm[0]
10439  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
10440  *
10441  *             while True:
10442  */
10443       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
10444 
10445       /* "tables/indexesextension.pyx":270
10446  *             swap_bytes(ipm, ipj, elsize2)
10447  *
10448  *             while True:             # <<<<<<<<<<<<<<
10449  *                 pi += 1
10450  *                 ipi += elsize2
10451  */
10452       while (1) {
10453 
10454         /* "tables/indexesextension.pyx":271
10455  *
10456  *             while True:
10457  *                 pi += 1             # <<<<<<<<<<<<<<
10458  *                 ipi += elsize2
10459  *                 while less_than(pi, &vp):
10460  */
10461         __pyx_v_pi = (__pyx_v_pi + 1);
10462 
10463         /* "tables/indexesextension.pyx":272
10464  *             while True:
10465  *                 pi += 1
10466  *                 ipi += elsize2             # <<<<<<<<<<<<<<
10467  *                 while less_than(pi, &vp):
10468  *                     pi += 1
10469  */
10470         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
10471 
10472         /* "tables/indexesextension.pyx":273
10473  *                 pi += 1
10474  *                 ipi += elsize2
10475  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
10476  *                     pi += 1
10477  *                     ipi += elsize2
10478  */
10479         while (1) {
10480           __pyx_t_1 = (__pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
10481           if (!__pyx_t_1) break;
10482 
10483           /* "tables/indexesextension.pyx":274
10484  *                 ipi += elsize2
10485  *                 while less_than(pi, &vp):
10486  *                     pi += 1             # <<<<<<<<<<<<<<
10487  *                     ipi += elsize2
10488  *
10489  */
10490           __pyx_v_pi = (__pyx_v_pi + 1);
10491 
10492           /* "tables/indexesextension.pyx":275
10493  *                 while less_than(pi, &vp):
10494  *                     pi += 1
10495  *                     ipi += elsize2             # <<<<<<<<<<<<<<
10496  *
10497  *                 pj -= 1
10498  */
10499           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
10500         }
10501 
10502         /* "tables/indexesextension.pyx":277
10503  *                     ipi += elsize2
10504  *
10505  *                 pj -= 1             # <<<<<<<<<<<<<<
10506  *                 ipj -= elsize2
10507  *                 while less_than(&vp, pj):
10508  */
10509         __pyx_v_pj = (__pyx_v_pj - 1);
10510 
10511         /* "tables/indexesextension.pyx":278
10512  *
10513  *                 pj -= 1
10514  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
10515  *                 while less_than(&vp, pj):
10516  *                     pj -= 1
10517  */
10518         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
10519 
10520         /* "tables/indexesextension.pyx":279
10521  *                 pj -= 1
10522  *                 ipj -= elsize2
10523  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
10524  *                     pj -= 1
10525  *                     ipj -= elsize2
10526  */
10527         while (1) {
10528           __pyx_t_1 = (__pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
10529           if (!__pyx_t_1) break;
10530 
10531           /* "tables/indexesextension.pyx":280
10532  *                 ipj -= elsize2
10533  *                 while less_than(&vp, pj):
10534  *                     pj -= 1             # <<<<<<<<<<<<<<
10535  *                     ipj -= elsize2
10536  *
10537  */
10538           __pyx_v_pj = (__pyx_v_pj - 1);
10539 
10540           /* "tables/indexesextension.pyx":281
10541  *                 while less_than(&vp, pj):
10542  *                     pj -= 1
10543  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
10544  *
10545  *                 if pi >= pj:
10546  */
10547           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
10548         }
10549 
10550         /* "tables/indexesextension.pyx":283
10551  *                     ipj -= elsize2
10552  *
10553  *                 if pi >= pj:             # <<<<<<<<<<<<<<
10554  *                     break
10555  *
10556  */
10557         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
10558         if (__pyx_t_1) {
10559 
10560           /* "tables/indexesextension.pyx":284
10561  *
10562  *                 if pi >= pj:
10563  *                     break             # <<<<<<<<<<<<<<
10564  *
10565  *                 pi[0], pj[0] = pj[0], pi[0]
10566  */
10567           goto __pyx_L11_break;
10568 
10569           /* "tables/indexesextension.pyx":283
10570  *                     ipj -= elsize2
10571  *
10572  *                 if pi >= pj:             # <<<<<<<<<<<<<<
10573  *                     break
10574  *
10575  */
10576         }
10577 
10578         /* "tables/indexesextension.pyx":286
10579  *                     break
10580  *
10581  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
10582  *                 swap_bytes(ipi, ipj, elsize2)
10583  *
10584  */
10585         __pyx_t_2 = (__pyx_v_pj[0]);
10586         __pyx_t_3 = (__pyx_v_pi[0]);
10587         (__pyx_v_pi[0]) = __pyx_t_2;
10588         (__pyx_v_pj[0]) = __pyx_t_3;
10589 
10590         /* "tables/indexesextension.pyx":287
10591  *
10592  *                 pi[0], pj[0] = pj[0], pi[0]
10593  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
10594  *
10595  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
10596  */
10597         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
10598       }
10599       __pyx_L11_break:;
10600 
10601       /* "tables/indexesextension.pyx":289
10602  *                 swap_bytes(ipi, ipj, elsize2)
10603  *
10604  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
10605  *             swap_bytes(ipi, ipr-elsize2, elsize2)
10606  *
10607  */
10608       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
10609       __pyx_t_2 = (__pyx_v_pi[0]);
10610       (__pyx_v_pi[0]) = __pyx_t_3;
10611       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
10612 
10613       /* "tables/indexesextension.pyx":290
10614  *
10615  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
10616  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
10617  *
10618  *             # push largest partition on stack and proceed with the other
10619  */
10620       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
10621 
10622       /* "tables/indexesextension.pyx":293
10623  *
10624  *             # push largest partition on stack and proceed with the other
10625  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
10626  *                 sptr[0] = pi + 1
10627  *                 sptr[1] = pr
10628  */
10629       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
10630       if (__pyx_t_1) {
10631 
10632         /* "tables/indexesextension.pyx":294
10633  *             # push largest partition on stack and proceed with the other
10634  *             if (pi - pl) < (pr - pi):
10635  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
10636  *                 sptr[1] = pr
10637  *                 sptr += 2
10638  */
10639         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
10640 
10641         /* "tables/indexesextension.pyx":295
10642  *             if (pi - pl) < (pr - pi):
10643  *                 sptr[0] = pi + 1
10644  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
10645  *                 sptr += 2
10646  *
10647  */
10648         (__pyx_v_sptr[1]) = __pyx_v_pr;
10649 
10650         /* "tables/indexesextension.pyx":296
10651  *                 sptr[0] = pi + 1
10652  *                 sptr[1] = pr
10653  *                 sptr += 2             # <<<<<<<<<<<<<<
10654  *
10655  *                 isptr[0] = ipi + elsize2
10656  */
10657         __pyx_v_sptr = (__pyx_v_sptr + 2);
10658 
10659         /* "tables/indexesextension.pyx":298
10660  *                 sptr += 2
10661  *
10662  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
10663  *                 isptr[1] = ipr
10664  *                 isptr += 2
10665  */
10666         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
10667 
10668         /* "tables/indexesextension.pyx":299
10669  *
10670  *                 isptr[0] = ipi + elsize2
10671  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
10672  *                 isptr += 2
10673  *
10674  */
10675         (__pyx_v_isptr[1]) = __pyx_v_ipr;
10676 
10677         /* "tables/indexesextension.pyx":300
10678  *                 isptr[0] = ipi + elsize2
10679  *                 isptr[1] = ipr
10680  *                 isptr += 2             # <<<<<<<<<<<<<<
10681  *
10682  *                 pr = pi - 1
10683  */
10684         __pyx_v_isptr = (__pyx_v_isptr + 2);
10685 
10686         /* "tables/indexesextension.pyx":302
10687  *                 isptr += 2
10688  *
10689  *                 pr = pi - 1             # <<<<<<<<<<<<<<
10690  *                 ipr = ipi - elsize2
10691  *             else:
10692  */
10693         __pyx_v_pr = (__pyx_v_pi - 1);
10694 
10695         /* "tables/indexesextension.pyx":303
10696  *
10697  *                 pr = pi - 1
10698  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
10699  *             else:
10700  *                 sptr[0] = pl
10701  */
10702         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
10703 
10704         /* "tables/indexesextension.pyx":293
10705  *
10706  *             # push largest partition on stack and proceed with the other
10707  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
10708  *                 sptr[0] = pi + 1
10709  *                 sptr[1] = pr
10710  */
10711         goto __pyx_L17;
10712       }
10713 
10714       /* "tables/indexesextension.pyx":305
10715  *                 ipr = ipi - elsize2
10716  *             else:
10717  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
10718  *                 sptr[1] = pi - 1
10719  *                 sptr += 2
10720  */
10721       /*else*/ {
10722         (__pyx_v_sptr[0]) = __pyx_v_pl;
10723 
10724         /* "tables/indexesextension.pyx":306
10725  *             else:
10726  *                 sptr[0] = pl
10727  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
10728  *                 sptr += 2
10729  *
10730  */
10731         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
10732 
10733         /* "tables/indexesextension.pyx":307
10734  *                 sptr[0] = pl
10735  *                 sptr[1] = pi - 1
10736  *                 sptr += 2             # <<<<<<<<<<<<<<
10737  *
10738  *                 isptr[0] = ipl
10739  */
10740         __pyx_v_sptr = (__pyx_v_sptr + 2);
10741 
10742         /* "tables/indexesextension.pyx":309
10743  *                 sptr += 2
10744  *
10745  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
10746  *                 isptr[1] = ipi - elsize2
10747  *                 isptr += 2
10748  */
10749         (__pyx_v_isptr[0]) = __pyx_v_ipl;
10750 
10751         /* "tables/indexesextension.pyx":310
10752  *
10753  *                 isptr[0] = ipl
10754  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
10755  *                 isptr += 2
10756  *
10757  */
10758         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
10759 
10760         /* "tables/indexesextension.pyx":311
10761  *                 isptr[0] = ipl
10762  *                 isptr[1] = ipi - elsize2
10763  *                 isptr += 2             # <<<<<<<<<<<<<<
10764  *
10765  *                 pl = pi + 1
10766  */
10767         __pyx_v_isptr = (__pyx_v_isptr + 2);
10768 
10769         /* "tables/indexesextension.pyx":313
10770  *                 isptr += 2
10771  *
10772  *                 pl = pi + 1             # <<<<<<<<<<<<<<
10773  *                 ipl = ipi + elsize2
10774  *
10775  */
10776         __pyx_v_pl = (__pyx_v_pi + 1);
10777 
10778         /* "tables/indexesextension.pyx":314
10779  *
10780  *                 pl = pi + 1
10781  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
10782  *
10783  *         pi = pl + 1
10784  */
10785         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
10786       }
10787       __pyx_L17:;
10788     }
10789 
10790     /* "tables/indexesextension.pyx":316
10791  *                 ipl = ipi + elsize2
10792  *
10793  *         pi = pl + 1             # <<<<<<<<<<<<<<
10794  *         ipi = ipl + elsize2
10795  *         while pi <= pr:
10796  */
10797     __pyx_v_pi = (__pyx_v_pl + 1);
10798 
10799     /* "tables/indexesextension.pyx":317
10800  *
10801  *         pi = pl + 1
10802  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
10803  *         while pi <= pr:
10804  *             vp = pi[0]
10805  */
10806     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
10807 
10808     /* "tables/indexesextension.pyx":318
10809  *         pi = pl + 1
10810  *         ipi = ipl + elsize2
10811  *         while pi <= pr:             # <<<<<<<<<<<<<<
10812  *             vp = pi[0]
10813  *             memcpy(ivp, ipi, elsize2)
10814  */
10815     while (1) {
10816       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
10817       if (!__pyx_t_1) break;
10818 
10819       /* "tables/indexesextension.pyx":319
10820  *         ipi = ipl + elsize2
10821  *         while pi <= pr:
10822  *             vp = pi[0]             # <<<<<<<<<<<<<<
10823  *             memcpy(ivp, ipi, elsize2)
10824  *
10825  */
10826       __pyx_v_vp = (__pyx_v_pi[0]);
10827 
10828       /* "tables/indexesextension.pyx":320
10829  *         while pi <= pr:
10830  *             vp = pi[0]
10831  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
10832  *
10833  *             pj = pi
10834  */
10835       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
10836 
10837       /* "tables/indexesextension.pyx":322
10838  *             memcpy(ivp, ipi, elsize2)
10839  *
10840  *             pj = pi             # <<<<<<<<<<<<<<
10841  *             pt = pi - 1
10842  *
10843  */
10844       __pyx_v_pj = __pyx_v_pi;
10845 
10846       /* "tables/indexesextension.pyx":323
10847  *
10848  *             pj = pi
10849  *             pt = pi - 1             # <<<<<<<<<<<<<<
10850  *
10851  *             ipj = ipi
10852  */
10853       __pyx_v_pt = (__pyx_v_pi - 1);
10854 
10855       /* "tables/indexesextension.pyx":325
10856  *             pt = pi - 1
10857  *
10858  *             ipj = ipi             # <<<<<<<<<<<<<<
10859  *             ipt = ipi - elsize2
10860  *
10861  */
10862       __pyx_v_ipj = __pyx_v_ipi;
10863 
10864       /* "tables/indexesextension.pyx":326
10865  *
10866  *             ipj = ipi
10867  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
10868  *
10869  *             while pj > pl and less_than(&vp, pt):
10870  */
10871       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
10872 
10873       /* "tables/indexesextension.pyx":328
10874  *             ipt = ipi - elsize2
10875  *
10876  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
10877  *                 pj[0] = pt[0]
10878  *                 pj -= 1
10879  */
10880       while (1) {
10881         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
10882         if (__pyx_t_4) {
10883         } else {
10884           __pyx_t_1 = __pyx_t_4;
10885           goto __pyx_L22_bool_binop_done;
10886         }
10887         __pyx_t_4 = (__pyx_fuse_7__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
10888         __pyx_t_1 = __pyx_t_4;
10889         __pyx_L22_bool_binop_done:;
10890         if (!__pyx_t_1) break;
10891 
10892         /* "tables/indexesextension.pyx":329
10893  *
10894  *             while pj > pl and less_than(&vp, pt):
10895  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
10896  *                 pj -= 1
10897  *                 pt -= 1
10898  */
10899         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
10900 
10901         /* "tables/indexesextension.pyx":330
10902  *             while pj > pl and less_than(&vp, pt):
10903  *                 pj[0] = pt[0]
10904  *                 pj -= 1             # <<<<<<<<<<<<<<
10905  *                 pt -= 1
10906  *
10907  */
10908         __pyx_v_pj = (__pyx_v_pj - 1);
10909 
10910         /* "tables/indexesextension.pyx":331
10911  *                 pj[0] = pt[0]
10912  *                 pj -= 1
10913  *                 pt -= 1             # <<<<<<<<<<<<<<
10914  *
10915  *                 memcpy(ipj, ipt, elsize2)
10916  */
10917         __pyx_v_pt = (__pyx_v_pt - 1);
10918 
10919         /* "tables/indexesextension.pyx":333
10920  *                 pt -= 1
10921  *
10922  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
10923  *                 ipj -= elsize2
10924  *                 ipt -= elsize2
10925  */
10926         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
10927 
10928         /* "tables/indexesextension.pyx":334
10929  *
10930  *                 memcpy(ipj, ipt, elsize2)
10931  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
10932  *                 ipt -= elsize2
10933  *
10934  */
10935         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
10936 
10937         /* "tables/indexesextension.pyx":335
10938  *                 memcpy(ipj, ipt, elsize2)
10939  *                 ipj -= elsize2
10940  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
10941  *
10942  *             pj[0] = vp
10943  */
10944         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
10945       }
10946 
10947       /* "tables/indexesextension.pyx":337
10948  *                 ipt -= elsize2
10949  *
10950  *             pj[0] = vp             # <<<<<<<<<<<<<<
10951  *             memcpy(ipj, ivp, elsize2)
10952  *
10953  */
10954       (__pyx_v_pj[0]) = __pyx_v_vp;
10955 
10956       /* "tables/indexesextension.pyx":338
10957  *
10958  *             pj[0] = vp
10959  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
10960  *
10961  *             pi += 1
10962  */
10963       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
10964 
10965       /* "tables/indexesextension.pyx":340
10966  *             memcpy(ipj, ivp, elsize2)
10967  *
10968  *             pi += 1             # <<<<<<<<<<<<<<
10969  *             ipi += elsize2
10970  *
10971  */
10972       __pyx_v_pi = (__pyx_v_pi + 1);
10973 
10974       /* "tables/indexesextension.pyx":341
10975  *
10976  *             pi += 1
10977  *             ipi += elsize2             # <<<<<<<<<<<<<<
10978  *
10979  *         if sptr == stack:
10980  */
10981       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
10982     }
10983 
10984     /* "tables/indexesextension.pyx":343
10985  *             ipi += elsize2
10986  *
10987  *         if sptr == stack:             # <<<<<<<<<<<<<<
10988  *             break
10989  *
10990  */
10991     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
10992     if (__pyx_t_1) {
10993 
10994       /* "tables/indexesextension.pyx":344
10995  *
10996  *         if sptr == stack:
10997  *             break             # <<<<<<<<<<<<<<
10998  *
10999  *         sptr -= 2
11000  */
11001       goto __pyx_L4_break;
11002 
11003       /* "tables/indexesextension.pyx":343
11004  *             ipi += elsize2
11005  *
11006  *         if sptr == stack:             # <<<<<<<<<<<<<<
11007  *             break
11008  *
11009  */
11010     }
11011 
11012     /* "tables/indexesextension.pyx":346
11013  *             break
11014  *
11015  *         sptr -= 2             # <<<<<<<<<<<<<<
11016  *         pl = sptr[0]
11017  *         pr = sptr[1]
11018  */
11019     __pyx_v_sptr = (__pyx_v_sptr - 2);
11020 
11021     /* "tables/indexesextension.pyx":347
11022  *
11023  *         sptr -= 2
11024  *         pl = sptr[0]             # <<<<<<<<<<<<<<
11025  *         pr = sptr[1]
11026  *
11027  */
11028     __pyx_v_pl = (__pyx_v_sptr[0]);
11029 
11030     /* "tables/indexesextension.pyx":348
11031  *         sptr -= 2
11032  *         pl = sptr[0]
11033  *         pr = sptr[1]             # <<<<<<<<<<<<<<
11034  *
11035  *         isptr -= 2
11036  */
11037     __pyx_v_pr = (__pyx_v_sptr[1]);
11038 
11039     /* "tables/indexesextension.pyx":350
11040  *         pr = sptr[1]
11041  *
11042  *         isptr -= 2             # <<<<<<<<<<<<<<
11043  *         ipl = isptr[0]
11044  *         ipr = isptr[1]
11045  */
11046     __pyx_v_isptr = (__pyx_v_isptr - 2);
11047 
11048     /* "tables/indexesextension.pyx":351
11049  *
11050  *         isptr -= 2
11051  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
11052  *         ipr = isptr[1]
11053  *
11054  */
11055     __pyx_v_ipl = (__pyx_v_isptr[0]);
11056 
11057     /* "tables/indexesextension.pyx":352
11058  *         isptr -= 2
11059  *         ipl = isptr[0]
11060  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
11061  *
11062  *     free(ivp)
11063  */
11064     __pyx_v_ipr = (__pyx_v_isptr[1]);
11065   }
11066   __pyx_L4_break:;
11067 
11068   /* "tables/indexesextension.pyx":354
11069  *         ipr = isptr[1]
11070  *
11071  *     free(ivp)             # <<<<<<<<<<<<<<
11072  *
11073  *
11074  */
11075   free(__pyx_v_ivp);
11076 
11077   /* "tables/indexesextension.pyx":215
11078  *
11079  * @cython.cdivision(True)
11080  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
11081  *     cdef number_type *pl = start1
11082  *     cdef number_type *pr = start1 + (n - 1)
11083  */
11084 
11085   /* function exit code */
11086 }
11087 
__pyx_fuse_8__pyx_f_6tables_16indexesextension__keysort(npy_float32 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)11088 static void __pyx_fuse_8__pyx_f_6tables_16indexesextension__keysort(npy_float32 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
11089   npy_float32 *__pyx_v_pl;
11090   npy_float32 *__pyx_v_pr;
11091   char *__pyx_v_ipl;
11092   char *__pyx_v_ipr;
11093   npy_float32 __pyx_v_vp;
11094   char *__pyx_v_ivp;
11095   npy_float32 *__pyx_v_stack[0x64];
11096   npy_float32 **__pyx_v_sptr;
11097   char *__pyx_v_istack[0x64];
11098   char **__pyx_v_isptr;
11099   CYTHON_UNUSED size_t __pyx_v_stack_index;
11100   npy_float32 *__pyx_v_pm;
11101   npy_float32 *__pyx_v_pi;
11102   npy_float32 *__pyx_v_pj;
11103   npy_float32 *__pyx_v_pt;
11104   char *__pyx_v_ipm;
11105   char *__pyx_v_ipi;
11106   char *__pyx_v_ipj;
11107   char *__pyx_v_ipt;
11108   int __pyx_t_1;
11109   npy_float32 __pyx_t_2;
11110   npy_float32 __pyx_t_3;
11111   int __pyx_t_4;
11112 
11113   /* "tables/indexesextension.pyx":216
11114  * @cython.cdivision(True)
11115  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
11116  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
11117  *     cdef number_type *pr = start1 + (n - 1)
11118  *
11119  */
11120   __pyx_v_pl = __pyx_v_start1;
11121 
11122   /* "tables/indexesextension.pyx":217
11123  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
11124  *     cdef number_type *pl = start1
11125  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
11126  *
11127  *     cdef char *ipl = start2
11128  */
11129   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
11130 
11131   /* "tables/indexesextension.pyx":219
11132  *     cdef number_type *pr = start1 + (n - 1)
11133  *
11134  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
11135  *     cdef char *ipr = start2 + (n - 1) * elsize2
11136  *
11137  */
11138   __pyx_v_ipl = __pyx_v_start2;
11139 
11140   /* "tables/indexesextension.pyx":220
11141  *
11142  *     cdef char *ipl = start2
11143  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
11144  *
11145  *     cdef number_type vp
11146  */
11147   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
11148 
11149   /* "tables/indexesextension.pyx":223
11150  *
11151  *     cdef number_type vp
11152  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
11153  *
11154  *     cdef number_type *stack[PYA_QS_STACK]
11155  */
11156   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
11157 
11158   /* "tables/indexesextension.pyx":226
11159  *
11160  *     cdef number_type *stack[PYA_QS_STACK]
11161  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
11162  *
11163  *     cdef char *istack[PYA_QS_STACK]
11164  */
11165   __pyx_v_sptr = __pyx_v_stack;
11166 
11167   /* "tables/indexesextension.pyx":229
11168  *
11169  *     cdef char *istack[PYA_QS_STACK]
11170  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
11171  *
11172  *     cdef size_t stack_index = 0
11173  */
11174   __pyx_v_isptr = __pyx_v_istack;
11175 
11176   /* "tables/indexesextension.pyx":231
11177  *     cdef char **isptr = istack
11178  *
11179  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
11180  *
11181  *     cdef number_type *pm
11182  */
11183   __pyx_v_stack_index = 0;
11184 
11185   /* "tables/indexesextension.pyx":242
11186  *     cdef char *ipt
11187  *
11188  *     while True:             # <<<<<<<<<<<<<<
11189  *         while pr - pl > SMALL_QUICKSORT:
11190  *             pm  = pl + ((pr - pl) >> 1)
11191  */
11192   while (1) {
11193 
11194     /* "tables/indexesextension.pyx":243
11195  *
11196  *     while True:
11197  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
11198  *             pm  = pl + ((pr - pl) >> 1)
11199  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
11200  */
11201     while (1) {
11202       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
11203       if (!__pyx_t_1) break;
11204 
11205       /* "tables/indexesextension.pyx":244
11206  *     while True:
11207  *         while pr - pl > SMALL_QUICKSORT:
11208  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
11209  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
11210  *
11211  */
11212       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
11213 
11214       /* "tables/indexesextension.pyx":245
11215  *         while pr - pl > SMALL_QUICKSORT:
11216  *             pm  = pl + ((pr - pl) >> 1)
11217  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
11218  *
11219  *             if less_than(pm, pl):
11220  */
11221       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
11222 
11223       /* "tables/indexesextension.pyx":247
11224  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
11225  *
11226  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
11227  *                 pm[0], pl[0] =  pl[0], pm[0]
11228  *                 swap_bytes(ipm, ipl, elsize2)
11229  */
11230       __pyx_t_1 = (__pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
11231       if (__pyx_t_1) {
11232 
11233         /* "tables/indexesextension.pyx":248
11234  *
11235  *             if less_than(pm, pl):
11236  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
11237  *                 swap_bytes(ipm, ipl, elsize2)
11238  *
11239  */
11240         __pyx_t_2 = (__pyx_v_pl[0]);
11241         __pyx_t_3 = (__pyx_v_pm[0]);
11242         (__pyx_v_pm[0]) = __pyx_t_2;
11243         (__pyx_v_pl[0]) = __pyx_t_3;
11244 
11245         /* "tables/indexesextension.pyx":249
11246  *             if less_than(pm, pl):
11247  *                 pm[0], pl[0] =  pl[0], pm[0]
11248  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
11249  *
11250  *             if less_than(pr, pm):
11251  */
11252         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
11253 
11254         /* "tables/indexesextension.pyx":247
11255  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
11256  *
11257  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
11258  *                 pm[0], pl[0] =  pl[0], pm[0]
11259  *                 swap_bytes(ipm, ipl, elsize2)
11260  */
11261       }
11262 
11263       /* "tables/indexesextension.pyx":251
11264  *                 swap_bytes(ipm, ipl, elsize2)
11265  *
11266  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
11267  *                 pr[0], pm[0] =  pm[0], pr[0]
11268  *                 swap_bytes(ipr, ipm, elsize2)
11269  */
11270       __pyx_t_1 = (__pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
11271       if (__pyx_t_1) {
11272 
11273         /* "tables/indexesextension.pyx":252
11274  *
11275  *             if less_than(pr, pm):
11276  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
11277  *                 swap_bytes(ipr, ipm, elsize2)
11278  *
11279  */
11280         __pyx_t_3 = (__pyx_v_pm[0]);
11281         __pyx_t_2 = (__pyx_v_pr[0]);
11282         (__pyx_v_pr[0]) = __pyx_t_3;
11283         (__pyx_v_pm[0]) = __pyx_t_2;
11284 
11285         /* "tables/indexesextension.pyx":253
11286  *             if less_than(pr, pm):
11287  *                 pr[0], pm[0] =  pm[0], pr[0]
11288  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
11289  *
11290  *             if less_than(pm, pl):
11291  */
11292         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
11293 
11294         /* "tables/indexesextension.pyx":251
11295  *                 swap_bytes(ipm, ipl, elsize2)
11296  *
11297  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
11298  *                 pr[0], pm[0] =  pm[0], pr[0]
11299  *                 swap_bytes(ipr, ipm, elsize2)
11300  */
11301       }
11302 
11303       /* "tables/indexesextension.pyx":255
11304  *                 swap_bytes(ipr, ipm, elsize2)
11305  *
11306  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
11307  *                 pm[0], pl[0] =  pl[0], pm[0]
11308  *                 swap_bytes(ipm, ipl, elsize2)
11309  */
11310       __pyx_t_1 = (__pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
11311       if (__pyx_t_1) {
11312 
11313         /* "tables/indexesextension.pyx":256
11314  *
11315  *             if less_than(pm, pl):
11316  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
11317  *                 swap_bytes(ipm, ipl, elsize2)
11318  *
11319  */
11320         __pyx_t_2 = (__pyx_v_pl[0]);
11321         __pyx_t_3 = (__pyx_v_pm[0]);
11322         (__pyx_v_pm[0]) = __pyx_t_2;
11323         (__pyx_v_pl[0]) = __pyx_t_3;
11324 
11325         /* "tables/indexesextension.pyx":257
11326  *             if less_than(pm, pl):
11327  *                 pm[0], pl[0] =  pl[0], pm[0]
11328  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
11329  *
11330  *             vp = pm[0]
11331  */
11332         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
11333 
11334         /* "tables/indexesextension.pyx":255
11335  *                 swap_bytes(ipr, ipm, elsize2)
11336  *
11337  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
11338  *                 pm[0], pl[0] =  pl[0], pm[0]
11339  *                 swap_bytes(ipm, ipl, elsize2)
11340  */
11341       }
11342 
11343       /* "tables/indexesextension.pyx":259
11344  *                 swap_bytes(ipm, ipl, elsize2)
11345  *
11346  *             vp = pm[0]             # <<<<<<<<<<<<<<
11347  *
11348  *             pi = pl
11349  */
11350       __pyx_v_vp = (__pyx_v_pm[0]);
11351 
11352       /* "tables/indexesextension.pyx":261
11353  *             vp = pm[0]
11354  *
11355  *             pi = pl             # <<<<<<<<<<<<<<
11356  *             ipi = ipl
11357  *
11358  */
11359       __pyx_v_pi = __pyx_v_pl;
11360 
11361       /* "tables/indexesextension.pyx":262
11362  *
11363  *             pi = pl
11364  *             ipi = ipl             # <<<<<<<<<<<<<<
11365  *
11366  *             pj = pr - 1
11367  */
11368       __pyx_v_ipi = __pyx_v_ipl;
11369 
11370       /* "tables/indexesextension.pyx":264
11371  *             ipi = ipl
11372  *
11373  *             pj = pr - 1             # <<<<<<<<<<<<<<
11374  *             ipj = ipr - elsize2
11375  *
11376  */
11377       __pyx_v_pj = (__pyx_v_pr - 1);
11378 
11379       /* "tables/indexesextension.pyx":265
11380  *
11381  *             pj = pr - 1
11382  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
11383  *
11384  *             pm[0], pj[0] = pj[0], pm[0]
11385  */
11386       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
11387 
11388       /* "tables/indexesextension.pyx":267
11389  *             ipj = ipr - elsize2
11390  *
11391  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
11392  *             swap_bytes(ipm, ipj, elsize2)
11393  *
11394  */
11395       __pyx_t_3 = (__pyx_v_pj[0]);
11396       __pyx_t_2 = (__pyx_v_pm[0]);
11397       (__pyx_v_pm[0]) = __pyx_t_3;
11398       (__pyx_v_pj[0]) = __pyx_t_2;
11399 
11400       /* "tables/indexesextension.pyx":268
11401  *
11402  *             pm[0], pj[0] = pj[0], pm[0]
11403  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
11404  *
11405  *             while True:
11406  */
11407       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
11408 
11409       /* "tables/indexesextension.pyx":270
11410  *             swap_bytes(ipm, ipj, elsize2)
11411  *
11412  *             while True:             # <<<<<<<<<<<<<<
11413  *                 pi += 1
11414  *                 ipi += elsize2
11415  */
11416       while (1) {
11417 
11418         /* "tables/indexesextension.pyx":271
11419  *
11420  *             while True:
11421  *                 pi += 1             # <<<<<<<<<<<<<<
11422  *                 ipi += elsize2
11423  *                 while less_than(pi, &vp):
11424  */
11425         __pyx_v_pi = (__pyx_v_pi + 1);
11426 
11427         /* "tables/indexesextension.pyx":272
11428  *             while True:
11429  *                 pi += 1
11430  *                 ipi += elsize2             # <<<<<<<<<<<<<<
11431  *                 while less_than(pi, &vp):
11432  *                     pi += 1
11433  */
11434         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
11435 
11436         /* "tables/indexesextension.pyx":273
11437  *                 pi += 1
11438  *                 ipi += elsize2
11439  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
11440  *                     pi += 1
11441  *                     ipi += elsize2
11442  */
11443         while (1) {
11444           __pyx_t_1 = (__pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
11445           if (!__pyx_t_1) break;
11446 
11447           /* "tables/indexesextension.pyx":274
11448  *                 ipi += elsize2
11449  *                 while less_than(pi, &vp):
11450  *                     pi += 1             # <<<<<<<<<<<<<<
11451  *                     ipi += elsize2
11452  *
11453  */
11454           __pyx_v_pi = (__pyx_v_pi + 1);
11455 
11456           /* "tables/indexesextension.pyx":275
11457  *                 while less_than(pi, &vp):
11458  *                     pi += 1
11459  *                     ipi += elsize2             # <<<<<<<<<<<<<<
11460  *
11461  *                 pj -= 1
11462  */
11463           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
11464         }
11465 
11466         /* "tables/indexesextension.pyx":277
11467  *                     ipi += elsize2
11468  *
11469  *                 pj -= 1             # <<<<<<<<<<<<<<
11470  *                 ipj -= elsize2
11471  *                 while less_than(&vp, pj):
11472  */
11473         __pyx_v_pj = (__pyx_v_pj - 1);
11474 
11475         /* "tables/indexesextension.pyx":278
11476  *
11477  *                 pj -= 1
11478  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
11479  *                 while less_than(&vp, pj):
11480  *                     pj -= 1
11481  */
11482         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
11483 
11484         /* "tables/indexesextension.pyx":279
11485  *                 pj -= 1
11486  *                 ipj -= elsize2
11487  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
11488  *                     pj -= 1
11489  *                     ipj -= elsize2
11490  */
11491         while (1) {
11492           __pyx_t_1 = (__pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
11493           if (!__pyx_t_1) break;
11494 
11495           /* "tables/indexesextension.pyx":280
11496  *                 ipj -= elsize2
11497  *                 while less_than(&vp, pj):
11498  *                     pj -= 1             # <<<<<<<<<<<<<<
11499  *                     ipj -= elsize2
11500  *
11501  */
11502           __pyx_v_pj = (__pyx_v_pj - 1);
11503 
11504           /* "tables/indexesextension.pyx":281
11505  *                 while less_than(&vp, pj):
11506  *                     pj -= 1
11507  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
11508  *
11509  *                 if pi >= pj:
11510  */
11511           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
11512         }
11513 
11514         /* "tables/indexesextension.pyx":283
11515  *                     ipj -= elsize2
11516  *
11517  *                 if pi >= pj:             # <<<<<<<<<<<<<<
11518  *                     break
11519  *
11520  */
11521         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
11522         if (__pyx_t_1) {
11523 
11524           /* "tables/indexesextension.pyx":284
11525  *
11526  *                 if pi >= pj:
11527  *                     break             # <<<<<<<<<<<<<<
11528  *
11529  *                 pi[0], pj[0] = pj[0], pi[0]
11530  */
11531           goto __pyx_L11_break;
11532 
11533           /* "tables/indexesextension.pyx":283
11534  *                     ipj -= elsize2
11535  *
11536  *                 if pi >= pj:             # <<<<<<<<<<<<<<
11537  *                     break
11538  *
11539  */
11540         }
11541 
11542         /* "tables/indexesextension.pyx":286
11543  *                     break
11544  *
11545  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
11546  *                 swap_bytes(ipi, ipj, elsize2)
11547  *
11548  */
11549         __pyx_t_2 = (__pyx_v_pj[0]);
11550         __pyx_t_3 = (__pyx_v_pi[0]);
11551         (__pyx_v_pi[0]) = __pyx_t_2;
11552         (__pyx_v_pj[0]) = __pyx_t_3;
11553 
11554         /* "tables/indexesextension.pyx":287
11555  *
11556  *                 pi[0], pj[0] = pj[0], pi[0]
11557  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
11558  *
11559  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
11560  */
11561         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
11562       }
11563       __pyx_L11_break:;
11564 
11565       /* "tables/indexesextension.pyx":289
11566  *                 swap_bytes(ipi, ipj, elsize2)
11567  *
11568  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
11569  *             swap_bytes(ipi, ipr-elsize2, elsize2)
11570  *
11571  */
11572       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
11573       __pyx_t_2 = (__pyx_v_pi[0]);
11574       (__pyx_v_pi[0]) = __pyx_t_3;
11575       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
11576 
11577       /* "tables/indexesextension.pyx":290
11578  *
11579  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
11580  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
11581  *
11582  *             # push largest partition on stack and proceed with the other
11583  */
11584       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
11585 
11586       /* "tables/indexesextension.pyx":293
11587  *
11588  *             # push largest partition on stack and proceed with the other
11589  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
11590  *                 sptr[0] = pi + 1
11591  *                 sptr[1] = pr
11592  */
11593       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
11594       if (__pyx_t_1) {
11595 
11596         /* "tables/indexesextension.pyx":294
11597  *             # push largest partition on stack and proceed with the other
11598  *             if (pi - pl) < (pr - pi):
11599  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
11600  *                 sptr[1] = pr
11601  *                 sptr += 2
11602  */
11603         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
11604 
11605         /* "tables/indexesextension.pyx":295
11606  *             if (pi - pl) < (pr - pi):
11607  *                 sptr[0] = pi + 1
11608  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
11609  *                 sptr += 2
11610  *
11611  */
11612         (__pyx_v_sptr[1]) = __pyx_v_pr;
11613 
11614         /* "tables/indexesextension.pyx":296
11615  *                 sptr[0] = pi + 1
11616  *                 sptr[1] = pr
11617  *                 sptr += 2             # <<<<<<<<<<<<<<
11618  *
11619  *                 isptr[0] = ipi + elsize2
11620  */
11621         __pyx_v_sptr = (__pyx_v_sptr + 2);
11622 
11623         /* "tables/indexesextension.pyx":298
11624  *                 sptr += 2
11625  *
11626  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
11627  *                 isptr[1] = ipr
11628  *                 isptr += 2
11629  */
11630         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
11631 
11632         /* "tables/indexesextension.pyx":299
11633  *
11634  *                 isptr[0] = ipi + elsize2
11635  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
11636  *                 isptr += 2
11637  *
11638  */
11639         (__pyx_v_isptr[1]) = __pyx_v_ipr;
11640 
11641         /* "tables/indexesextension.pyx":300
11642  *                 isptr[0] = ipi + elsize2
11643  *                 isptr[1] = ipr
11644  *                 isptr += 2             # <<<<<<<<<<<<<<
11645  *
11646  *                 pr = pi - 1
11647  */
11648         __pyx_v_isptr = (__pyx_v_isptr + 2);
11649 
11650         /* "tables/indexesextension.pyx":302
11651  *                 isptr += 2
11652  *
11653  *                 pr = pi - 1             # <<<<<<<<<<<<<<
11654  *                 ipr = ipi - elsize2
11655  *             else:
11656  */
11657         __pyx_v_pr = (__pyx_v_pi - 1);
11658 
11659         /* "tables/indexesextension.pyx":303
11660  *
11661  *                 pr = pi - 1
11662  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
11663  *             else:
11664  *                 sptr[0] = pl
11665  */
11666         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
11667 
11668         /* "tables/indexesextension.pyx":293
11669  *
11670  *             # push largest partition on stack and proceed with the other
11671  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
11672  *                 sptr[0] = pi + 1
11673  *                 sptr[1] = pr
11674  */
11675         goto __pyx_L17;
11676       }
11677 
11678       /* "tables/indexesextension.pyx":305
11679  *                 ipr = ipi - elsize2
11680  *             else:
11681  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
11682  *                 sptr[1] = pi - 1
11683  *                 sptr += 2
11684  */
11685       /*else*/ {
11686         (__pyx_v_sptr[0]) = __pyx_v_pl;
11687 
11688         /* "tables/indexesextension.pyx":306
11689  *             else:
11690  *                 sptr[0] = pl
11691  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
11692  *                 sptr += 2
11693  *
11694  */
11695         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
11696 
11697         /* "tables/indexesextension.pyx":307
11698  *                 sptr[0] = pl
11699  *                 sptr[1] = pi - 1
11700  *                 sptr += 2             # <<<<<<<<<<<<<<
11701  *
11702  *                 isptr[0] = ipl
11703  */
11704         __pyx_v_sptr = (__pyx_v_sptr + 2);
11705 
11706         /* "tables/indexesextension.pyx":309
11707  *                 sptr += 2
11708  *
11709  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
11710  *                 isptr[1] = ipi - elsize2
11711  *                 isptr += 2
11712  */
11713         (__pyx_v_isptr[0]) = __pyx_v_ipl;
11714 
11715         /* "tables/indexesextension.pyx":310
11716  *
11717  *                 isptr[0] = ipl
11718  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
11719  *                 isptr += 2
11720  *
11721  */
11722         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
11723 
11724         /* "tables/indexesextension.pyx":311
11725  *                 isptr[0] = ipl
11726  *                 isptr[1] = ipi - elsize2
11727  *                 isptr += 2             # <<<<<<<<<<<<<<
11728  *
11729  *                 pl = pi + 1
11730  */
11731         __pyx_v_isptr = (__pyx_v_isptr + 2);
11732 
11733         /* "tables/indexesextension.pyx":313
11734  *                 isptr += 2
11735  *
11736  *                 pl = pi + 1             # <<<<<<<<<<<<<<
11737  *                 ipl = ipi + elsize2
11738  *
11739  */
11740         __pyx_v_pl = (__pyx_v_pi + 1);
11741 
11742         /* "tables/indexesextension.pyx":314
11743  *
11744  *                 pl = pi + 1
11745  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
11746  *
11747  *         pi = pl + 1
11748  */
11749         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
11750       }
11751       __pyx_L17:;
11752     }
11753 
11754     /* "tables/indexesextension.pyx":316
11755  *                 ipl = ipi + elsize2
11756  *
11757  *         pi = pl + 1             # <<<<<<<<<<<<<<
11758  *         ipi = ipl + elsize2
11759  *         while pi <= pr:
11760  */
11761     __pyx_v_pi = (__pyx_v_pl + 1);
11762 
11763     /* "tables/indexesextension.pyx":317
11764  *
11765  *         pi = pl + 1
11766  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
11767  *         while pi <= pr:
11768  *             vp = pi[0]
11769  */
11770     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
11771 
11772     /* "tables/indexesextension.pyx":318
11773  *         pi = pl + 1
11774  *         ipi = ipl + elsize2
11775  *         while pi <= pr:             # <<<<<<<<<<<<<<
11776  *             vp = pi[0]
11777  *             memcpy(ivp, ipi, elsize2)
11778  */
11779     while (1) {
11780       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
11781       if (!__pyx_t_1) break;
11782 
11783       /* "tables/indexesextension.pyx":319
11784  *         ipi = ipl + elsize2
11785  *         while pi <= pr:
11786  *             vp = pi[0]             # <<<<<<<<<<<<<<
11787  *             memcpy(ivp, ipi, elsize2)
11788  *
11789  */
11790       __pyx_v_vp = (__pyx_v_pi[0]);
11791 
11792       /* "tables/indexesextension.pyx":320
11793  *         while pi <= pr:
11794  *             vp = pi[0]
11795  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
11796  *
11797  *             pj = pi
11798  */
11799       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
11800 
11801       /* "tables/indexesextension.pyx":322
11802  *             memcpy(ivp, ipi, elsize2)
11803  *
11804  *             pj = pi             # <<<<<<<<<<<<<<
11805  *             pt = pi - 1
11806  *
11807  */
11808       __pyx_v_pj = __pyx_v_pi;
11809 
11810       /* "tables/indexesextension.pyx":323
11811  *
11812  *             pj = pi
11813  *             pt = pi - 1             # <<<<<<<<<<<<<<
11814  *
11815  *             ipj = ipi
11816  */
11817       __pyx_v_pt = (__pyx_v_pi - 1);
11818 
11819       /* "tables/indexesextension.pyx":325
11820  *             pt = pi - 1
11821  *
11822  *             ipj = ipi             # <<<<<<<<<<<<<<
11823  *             ipt = ipi - elsize2
11824  *
11825  */
11826       __pyx_v_ipj = __pyx_v_ipi;
11827 
11828       /* "tables/indexesextension.pyx":326
11829  *
11830  *             ipj = ipi
11831  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
11832  *
11833  *             while pj > pl and less_than(&vp, pt):
11834  */
11835       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
11836 
11837       /* "tables/indexesextension.pyx":328
11838  *             ipt = ipi - elsize2
11839  *
11840  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
11841  *                 pj[0] = pt[0]
11842  *                 pj -= 1
11843  */
11844       while (1) {
11845         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
11846         if (__pyx_t_4) {
11847         } else {
11848           __pyx_t_1 = __pyx_t_4;
11849           goto __pyx_L22_bool_binop_done;
11850         }
11851         __pyx_t_4 = (__pyx_fuse_8__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
11852         __pyx_t_1 = __pyx_t_4;
11853         __pyx_L22_bool_binop_done:;
11854         if (!__pyx_t_1) break;
11855 
11856         /* "tables/indexesextension.pyx":329
11857  *
11858  *             while pj > pl and less_than(&vp, pt):
11859  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
11860  *                 pj -= 1
11861  *                 pt -= 1
11862  */
11863         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
11864 
11865         /* "tables/indexesextension.pyx":330
11866  *             while pj > pl and less_than(&vp, pt):
11867  *                 pj[0] = pt[0]
11868  *                 pj -= 1             # <<<<<<<<<<<<<<
11869  *                 pt -= 1
11870  *
11871  */
11872         __pyx_v_pj = (__pyx_v_pj - 1);
11873 
11874         /* "tables/indexesextension.pyx":331
11875  *                 pj[0] = pt[0]
11876  *                 pj -= 1
11877  *                 pt -= 1             # <<<<<<<<<<<<<<
11878  *
11879  *                 memcpy(ipj, ipt, elsize2)
11880  */
11881         __pyx_v_pt = (__pyx_v_pt - 1);
11882 
11883         /* "tables/indexesextension.pyx":333
11884  *                 pt -= 1
11885  *
11886  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
11887  *                 ipj -= elsize2
11888  *                 ipt -= elsize2
11889  */
11890         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
11891 
11892         /* "tables/indexesextension.pyx":334
11893  *
11894  *                 memcpy(ipj, ipt, elsize2)
11895  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
11896  *                 ipt -= elsize2
11897  *
11898  */
11899         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
11900 
11901         /* "tables/indexesextension.pyx":335
11902  *                 memcpy(ipj, ipt, elsize2)
11903  *                 ipj -= elsize2
11904  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
11905  *
11906  *             pj[0] = vp
11907  */
11908         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
11909       }
11910 
11911       /* "tables/indexesextension.pyx":337
11912  *                 ipt -= elsize2
11913  *
11914  *             pj[0] = vp             # <<<<<<<<<<<<<<
11915  *             memcpy(ipj, ivp, elsize2)
11916  *
11917  */
11918       (__pyx_v_pj[0]) = __pyx_v_vp;
11919 
11920       /* "tables/indexesextension.pyx":338
11921  *
11922  *             pj[0] = vp
11923  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
11924  *
11925  *             pi += 1
11926  */
11927       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
11928 
11929       /* "tables/indexesextension.pyx":340
11930  *             memcpy(ipj, ivp, elsize2)
11931  *
11932  *             pi += 1             # <<<<<<<<<<<<<<
11933  *             ipi += elsize2
11934  *
11935  */
11936       __pyx_v_pi = (__pyx_v_pi + 1);
11937 
11938       /* "tables/indexesextension.pyx":341
11939  *
11940  *             pi += 1
11941  *             ipi += elsize2             # <<<<<<<<<<<<<<
11942  *
11943  *         if sptr == stack:
11944  */
11945       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
11946     }
11947 
11948     /* "tables/indexesextension.pyx":343
11949  *             ipi += elsize2
11950  *
11951  *         if sptr == stack:             # <<<<<<<<<<<<<<
11952  *             break
11953  *
11954  */
11955     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
11956     if (__pyx_t_1) {
11957 
11958       /* "tables/indexesextension.pyx":344
11959  *
11960  *         if sptr == stack:
11961  *             break             # <<<<<<<<<<<<<<
11962  *
11963  *         sptr -= 2
11964  */
11965       goto __pyx_L4_break;
11966 
11967       /* "tables/indexesextension.pyx":343
11968  *             ipi += elsize2
11969  *
11970  *         if sptr == stack:             # <<<<<<<<<<<<<<
11971  *             break
11972  *
11973  */
11974     }
11975 
11976     /* "tables/indexesextension.pyx":346
11977  *             break
11978  *
11979  *         sptr -= 2             # <<<<<<<<<<<<<<
11980  *         pl = sptr[0]
11981  *         pr = sptr[1]
11982  */
11983     __pyx_v_sptr = (__pyx_v_sptr - 2);
11984 
11985     /* "tables/indexesextension.pyx":347
11986  *
11987  *         sptr -= 2
11988  *         pl = sptr[0]             # <<<<<<<<<<<<<<
11989  *         pr = sptr[1]
11990  *
11991  */
11992     __pyx_v_pl = (__pyx_v_sptr[0]);
11993 
11994     /* "tables/indexesextension.pyx":348
11995  *         sptr -= 2
11996  *         pl = sptr[0]
11997  *         pr = sptr[1]             # <<<<<<<<<<<<<<
11998  *
11999  *         isptr -= 2
12000  */
12001     __pyx_v_pr = (__pyx_v_sptr[1]);
12002 
12003     /* "tables/indexesextension.pyx":350
12004  *         pr = sptr[1]
12005  *
12006  *         isptr -= 2             # <<<<<<<<<<<<<<
12007  *         ipl = isptr[0]
12008  *         ipr = isptr[1]
12009  */
12010     __pyx_v_isptr = (__pyx_v_isptr - 2);
12011 
12012     /* "tables/indexesextension.pyx":351
12013  *
12014  *         isptr -= 2
12015  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
12016  *         ipr = isptr[1]
12017  *
12018  */
12019     __pyx_v_ipl = (__pyx_v_isptr[0]);
12020 
12021     /* "tables/indexesextension.pyx":352
12022  *         isptr -= 2
12023  *         ipl = isptr[0]
12024  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
12025  *
12026  *     free(ivp)
12027  */
12028     __pyx_v_ipr = (__pyx_v_isptr[1]);
12029   }
12030   __pyx_L4_break:;
12031 
12032   /* "tables/indexesextension.pyx":354
12033  *         ipr = isptr[1]
12034  *
12035  *     free(ivp)             # <<<<<<<<<<<<<<
12036  *
12037  *
12038  */
12039   free(__pyx_v_ivp);
12040 
12041   /* "tables/indexesextension.pyx":215
12042  *
12043  * @cython.cdivision(True)
12044  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
12045  *     cdef number_type *pl = start1
12046  *     cdef number_type *pr = start1 + (n - 1)
12047  */
12048 
12049   /* function exit code */
12050 }
12051 
__pyx_fuse_9__pyx_f_6tables_16indexesextension__keysort(npy_float64 * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)12052 static void __pyx_fuse_9__pyx_f_6tables_16indexesextension__keysort(npy_float64 *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
12053   npy_float64 *__pyx_v_pl;
12054   npy_float64 *__pyx_v_pr;
12055   char *__pyx_v_ipl;
12056   char *__pyx_v_ipr;
12057   npy_float64 __pyx_v_vp;
12058   char *__pyx_v_ivp;
12059   npy_float64 *__pyx_v_stack[0x64];
12060   npy_float64 **__pyx_v_sptr;
12061   char *__pyx_v_istack[0x64];
12062   char **__pyx_v_isptr;
12063   CYTHON_UNUSED size_t __pyx_v_stack_index;
12064   npy_float64 *__pyx_v_pm;
12065   npy_float64 *__pyx_v_pi;
12066   npy_float64 *__pyx_v_pj;
12067   npy_float64 *__pyx_v_pt;
12068   char *__pyx_v_ipm;
12069   char *__pyx_v_ipi;
12070   char *__pyx_v_ipj;
12071   char *__pyx_v_ipt;
12072   int __pyx_t_1;
12073   npy_float64 __pyx_t_2;
12074   npy_float64 __pyx_t_3;
12075   int __pyx_t_4;
12076 
12077   /* "tables/indexesextension.pyx":216
12078  * @cython.cdivision(True)
12079  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
12080  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
12081  *     cdef number_type *pr = start1 + (n - 1)
12082  *
12083  */
12084   __pyx_v_pl = __pyx_v_start1;
12085 
12086   /* "tables/indexesextension.pyx":217
12087  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
12088  *     cdef number_type *pl = start1
12089  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
12090  *
12091  *     cdef char *ipl = start2
12092  */
12093   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
12094 
12095   /* "tables/indexesextension.pyx":219
12096  *     cdef number_type *pr = start1 + (n - 1)
12097  *
12098  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
12099  *     cdef char *ipr = start2 + (n - 1) * elsize2
12100  *
12101  */
12102   __pyx_v_ipl = __pyx_v_start2;
12103 
12104   /* "tables/indexesextension.pyx":220
12105  *
12106  *     cdef char *ipl = start2
12107  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
12108  *
12109  *     cdef number_type vp
12110  */
12111   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
12112 
12113   /* "tables/indexesextension.pyx":223
12114  *
12115  *     cdef number_type vp
12116  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
12117  *
12118  *     cdef number_type *stack[PYA_QS_STACK]
12119  */
12120   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
12121 
12122   /* "tables/indexesextension.pyx":226
12123  *
12124  *     cdef number_type *stack[PYA_QS_STACK]
12125  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
12126  *
12127  *     cdef char *istack[PYA_QS_STACK]
12128  */
12129   __pyx_v_sptr = __pyx_v_stack;
12130 
12131   /* "tables/indexesextension.pyx":229
12132  *
12133  *     cdef char *istack[PYA_QS_STACK]
12134  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
12135  *
12136  *     cdef size_t stack_index = 0
12137  */
12138   __pyx_v_isptr = __pyx_v_istack;
12139 
12140   /* "tables/indexesextension.pyx":231
12141  *     cdef char **isptr = istack
12142  *
12143  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
12144  *
12145  *     cdef number_type *pm
12146  */
12147   __pyx_v_stack_index = 0;
12148 
12149   /* "tables/indexesextension.pyx":242
12150  *     cdef char *ipt
12151  *
12152  *     while True:             # <<<<<<<<<<<<<<
12153  *         while pr - pl > SMALL_QUICKSORT:
12154  *             pm  = pl + ((pr - pl) >> 1)
12155  */
12156   while (1) {
12157 
12158     /* "tables/indexesextension.pyx":243
12159  *
12160  *     while True:
12161  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
12162  *             pm  = pl + ((pr - pl) >> 1)
12163  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
12164  */
12165     while (1) {
12166       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
12167       if (!__pyx_t_1) break;
12168 
12169       /* "tables/indexesextension.pyx":244
12170  *     while True:
12171  *         while pr - pl > SMALL_QUICKSORT:
12172  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
12173  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
12174  *
12175  */
12176       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
12177 
12178       /* "tables/indexesextension.pyx":245
12179  *         while pr - pl > SMALL_QUICKSORT:
12180  *             pm  = pl + ((pr - pl) >> 1)
12181  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
12182  *
12183  *             if less_than(pm, pl):
12184  */
12185       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
12186 
12187       /* "tables/indexesextension.pyx":247
12188  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
12189  *
12190  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
12191  *                 pm[0], pl[0] =  pl[0], pm[0]
12192  *                 swap_bytes(ipm, ipl, elsize2)
12193  */
12194       __pyx_t_1 = (__pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
12195       if (__pyx_t_1) {
12196 
12197         /* "tables/indexesextension.pyx":248
12198  *
12199  *             if less_than(pm, pl):
12200  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
12201  *                 swap_bytes(ipm, ipl, elsize2)
12202  *
12203  */
12204         __pyx_t_2 = (__pyx_v_pl[0]);
12205         __pyx_t_3 = (__pyx_v_pm[0]);
12206         (__pyx_v_pm[0]) = __pyx_t_2;
12207         (__pyx_v_pl[0]) = __pyx_t_3;
12208 
12209         /* "tables/indexesextension.pyx":249
12210  *             if less_than(pm, pl):
12211  *                 pm[0], pl[0] =  pl[0], pm[0]
12212  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
12213  *
12214  *             if less_than(pr, pm):
12215  */
12216         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
12217 
12218         /* "tables/indexesextension.pyx":247
12219  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
12220  *
12221  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
12222  *                 pm[0], pl[0] =  pl[0], pm[0]
12223  *                 swap_bytes(ipm, ipl, elsize2)
12224  */
12225       }
12226 
12227       /* "tables/indexesextension.pyx":251
12228  *                 swap_bytes(ipm, ipl, elsize2)
12229  *
12230  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
12231  *                 pr[0], pm[0] =  pm[0], pr[0]
12232  *                 swap_bytes(ipr, ipm, elsize2)
12233  */
12234       __pyx_t_1 = (__pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
12235       if (__pyx_t_1) {
12236 
12237         /* "tables/indexesextension.pyx":252
12238  *
12239  *             if less_than(pr, pm):
12240  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
12241  *                 swap_bytes(ipr, ipm, elsize2)
12242  *
12243  */
12244         __pyx_t_3 = (__pyx_v_pm[0]);
12245         __pyx_t_2 = (__pyx_v_pr[0]);
12246         (__pyx_v_pr[0]) = __pyx_t_3;
12247         (__pyx_v_pm[0]) = __pyx_t_2;
12248 
12249         /* "tables/indexesextension.pyx":253
12250  *             if less_than(pr, pm):
12251  *                 pr[0], pm[0] =  pm[0], pr[0]
12252  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
12253  *
12254  *             if less_than(pm, pl):
12255  */
12256         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
12257 
12258         /* "tables/indexesextension.pyx":251
12259  *                 swap_bytes(ipm, ipl, elsize2)
12260  *
12261  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
12262  *                 pr[0], pm[0] =  pm[0], pr[0]
12263  *                 swap_bytes(ipr, ipm, elsize2)
12264  */
12265       }
12266 
12267       /* "tables/indexesextension.pyx":255
12268  *                 swap_bytes(ipr, ipm, elsize2)
12269  *
12270  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
12271  *                 pm[0], pl[0] =  pl[0], pm[0]
12272  *                 swap_bytes(ipm, ipl, elsize2)
12273  */
12274       __pyx_t_1 = (__pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
12275       if (__pyx_t_1) {
12276 
12277         /* "tables/indexesextension.pyx":256
12278  *
12279  *             if less_than(pm, pl):
12280  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
12281  *                 swap_bytes(ipm, ipl, elsize2)
12282  *
12283  */
12284         __pyx_t_2 = (__pyx_v_pl[0]);
12285         __pyx_t_3 = (__pyx_v_pm[0]);
12286         (__pyx_v_pm[0]) = __pyx_t_2;
12287         (__pyx_v_pl[0]) = __pyx_t_3;
12288 
12289         /* "tables/indexesextension.pyx":257
12290  *             if less_than(pm, pl):
12291  *                 pm[0], pl[0] =  pl[0], pm[0]
12292  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
12293  *
12294  *             vp = pm[0]
12295  */
12296         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
12297 
12298         /* "tables/indexesextension.pyx":255
12299  *                 swap_bytes(ipr, ipm, elsize2)
12300  *
12301  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
12302  *                 pm[0], pl[0] =  pl[0], pm[0]
12303  *                 swap_bytes(ipm, ipl, elsize2)
12304  */
12305       }
12306 
12307       /* "tables/indexesextension.pyx":259
12308  *                 swap_bytes(ipm, ipl, elsize2)
12309  *
12310  *             vp = pm[0]             # <<<<<<<<<<<<<<
12311  *
12312  *             pi = pl
12313  */
12314       __pyx_v_vp = (__pyx_v_pm[0]);
12315 
12316       /* "tables/indexesextension.pyx":261
12317  *             vp = pm[0]
12318  *
12319  *             pi = pl             # <<<<<<<<<<<<<<
12320  *             ipi = ipl
12321  *
12322  */
12323       __pyx_v_pi = __pyx_v_pl;
12324 
12325       /* "tables/indexesextension.pyx":262
12326  *
12327  *             pi = pl
12328  *             ipi = ipl             # <<<<<<<<<<<<<<
12329  *
12330  *             pj = pr - 1
12331  */
12332       __pyx_v_ipi = __pyx_v_ipl;
12333 
12334       /* "tables/indexesextension.pyx":264
12335  *             ipi = ipl
12336  *
12337  *             pj = pr - 1             # <<<<<<<<<<<<<<
12338  *             ipj = ipr - elsize2
12339  *
12340  */
12341       __pyx_v_pj = (__pyx_v_pr - 1);
12342 
12343       /* "tables/indexesextension.pyx":265
12344  *
12345  *             pj = pr - 1
12346  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
12347  *
12348  *             pm[0], pj[0] = pj[0], pm[0]
12349  */
12350       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
12351 
12352       /* "tables/indexesextension.pyx":267
12353  *             ipj = ipr - elsize2
12354  *
12355  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
12356  *             swap_bytes(ipm, ipj, elsize2)
12357  *
12358  */
12359       __pyx_t_3 = (__pyx_v_pj[0]);
12360       __pyx_t_2 = (__pyx_v_pm[0]);
12361       (__pyx_v_pm[0]) = __pyx_t_3;
12362       (__pyx_v_pj[0]) = __pyx_t_2;
12363 
12364       /* "tables/indexesextension.pyx":268
12365  *
12366  *             pm[0], pj[0] = pj[0], pm[0]
12367  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
12368  *
12369  *             while True:
12370  */
12371       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
12372 
12373       /* "tables/indexesextension.pyx":270
12374  *             swap_bytes(ipm, ipj, elsize2)
12375  *
12376  *             while True:             # <<<<<<<<<<<<<<
12377  *                 pi += 1
12378  *                 ipi += elsize2
12379  */
12380       while (1) {
12381 
12382         /* "tables/indexesextension.pyx":271
12383  *
12384  *             while True:
12385  *                 pi += 1             # <<<<<<<<<<<<<<
12386  *                 ipi += elsize2
12387  *                 while less_than(pi, &vp):
12388  */
12389         __pyx_v_pi = (__pyx_v_pi + 1);
12390 
12391         /* "tables/indexesextension.pyx":272
12392  *             while True:
12393  *                 pi += 1
12394  *                 ipi += elsize2             # <<<<<<<<<<<<<<
12395  *                 while less_than(pi, &vp):
12396  *                     pi += 1
12397  */
12398         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
12399 
12400         /* "tables/indexesextension.pyx":273
12401  *                 pi += 1
12402  *                 ipi += elsize2
12403  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
12404  *                     pi += 1
12405  *                     ipi += elsize2
12406  */
12407         while (1) {
12408           __pyx_t_1 = (__pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
12409           if (!__pyx_t_1) break;
12410 
12411           /* "tables/indexesextension.pyx":274
12412  *                 ipi += elsize2
12413  *                 while less_than(pi, &vp):
12414  *                     pi += 1             # <<<<<<<<<<<<<<
12415  *                     ipi += elsize2
12416  *
12417  */
12418           __pyx_v_pi = (__pyx_v_pi + 1);
12419 
12420           /* "tables/indexesextension.pyx":275
12421  *                 while less_than(pi, &vp):
12422  *                     pi += 1
12423  *                     ipi += elsize2             # <<<<<<<<<<<<<<
12424  *
12425  *                 pj -= 1
12426  */
12427           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
12428         }
12429 
12430         /* "tables/indexesextension.pyx":277
12431  *                     ipi += elsize2
12432  *
12433  *                 pj -= 1             # <<<<<<<<<<<<<<
12434  *                 ipj -= elsize2
12435  *                 while less_than(&vp, pj):
12436  */
12437         __pyx_v_pj = (__pyx_v_pj - 1);
12438 
12439         /* "tables/indexesextension.pyx":278
12440  *
12441  *                 pj -= 1
12442  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
12443  *                 while less_than(&vp, pj):
12444  *                     pj -= 1
12445  */
12446         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
12447 
12448         /* "tables/indexesextension.pyx":279
12449  *                 pj -= 1
12450  *                 ipj -= elsize2
12451  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
12452  *                     pj -= 1
12453  *                     ipj -= elsize2
12454  */
12455         while (1) {
12456           __pyx_t_1 = (__pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
12457           if (!__pyx_t_1) break;
12458 
12459           /* "tables/indexesextension.pyx":280
12460  *                 ipj -= elsize2
12461  *                 while less_than(&vp, pj):
12462  *                     pj -= 1             # <<<<<<<<<<<<<<
12463  *                     ipj -= elsize2
12464  *
12465  */
12466           __pyx_v_pj = (__pyx_v_pj - 1);
12467 
12468           /* "tables/indexesextension.pyx":281
12469  *                 while less_than(&vp, pj):
12470  *                     pj -= 1
12471  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
12472  *
12473  *                 if pi >= pj:
12474  */
12475           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
12476         }
12477 
12478         /* "tables/indexesextension.pyx":283
12479  *                     ipj -= elsize2
12480  *
12481  *                 if pi >= pj:             # <<<<<<<<<<<<<<
12482  *                     break
12483  *
12484  */
12485         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
12486         if (__pyx_t_1) {
12487 
12488           /* "tables/indexesextension.pyx":284
12489  *
12490  *                 if pi >= pj:
12491  *                     break             # <<<<<<<<<<<<<<
12492  *
12493  *                 pi[0], pj[0] = pj[0], pi[0]
12494  */
12495           goto __pyx_L11_break;
12496 
12497           /* "tables/indexesextension.pyx":283
12498  *                     ipj -= elsize2
12499  *
12500  *                 if pi >= pj:             # <<<<<<<<<<<<<<
12501  *                     break
12502  *
12503  */
12504         }
12505 
12506         /* "tables/indexesextension.pyx":286
12507  *                     break
12508  *
12509  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
12510  *                 swap_bytes(ipi, ipj, elsize2)
12511  *
12512  */
12513         __pyx_t_2 = (__pyx_v_pj[0]);
12514         __pyx_t_3 = (__pyx_v_pi[0]);
12515         (__pyx_v_pi[0]) = __pyx_t_2;
12516         (__pyx_v_pj[0]) = __pyx_t_3;
12517 
12518         /* "tables/indexesextension.pyx":287
12519  *
12520  *                 pi[0], pj[0] = pj[0], pi[0]
12521  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
12522  *
12523  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
12524  */
12525         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
12526       }
12527       __pyx_L11_break:;
12528 
12529       /* "tables/indexesextension.pyx":289
12530  *                 swap_bytes(ipi, ipj, elsize2)
12531  *
12532  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
12533  *             swap_bytes(ipi, ipr-elsize2, elsize2)
12534  *
12535  */
12536       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
12537       __pyx_t_2 = (__pyx_v_pi[0]);
12538       (__pyx_v_pi[0]) = __pyx_t_3;
12539       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
12540 
12541       /* "tables/indexesextension.pyx":290
12542  *
12543  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
12544  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
12545  *
12546  *             # push largest partition on stack and proceed with the other
12547  */
12548       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
12549 
12550       /* "tables/indexesextension.pyx":293
12551  *
12552  *             # push largest partition on stack and proceed with the other
12553  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
12554  *                 sptr[0] = pi + 1
12555  *                 sptr[1] = pr
12556  */
12557       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
12558       if (__pyx_t_1) {
12559 
12560         /* "tables/indexesextension.pyx":294
12561  *             # push largest partition on stack and proceed with the other
12562  *             if (pi - pl) < (pr - pi):
12563  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
12564  *                 sptr[1] = pr
12565  *                 sptr += 2
12566  */
12567         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
12568 
12569         /* "tables/indexesextension.pyx":295
12570  *             if (pi - pl) < (pr - pi):
12571  *                 sptr[0] = pi + 1
12572  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
12573  *                 sptr += 2
12574  *
12575  */
12576         (__pyx_v_sptr[1]) = __pyx_v_pr;
12577 
12578         /* "tables/indexesextension.pyx":296
12579  *                 sptr[0] = pi + 1
12580  *                 sptr[1] = pr
12581  *                 sptr += 2             # <<<<<<<<<<<<<<
12582  *
12583  *                 isptr[0] = ipi + elsize2
12584  */
12585         __pyx_v_sptr = (__pyx_v_sptr + 2);
12586 
12587         /* "tables/indexesextension.pyx":298
12588  *                 sptr += 2
12589  *
12590  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
12591  *                 isptr[1] = ipr
12592  *                 isptr += 2
12593  */
12594         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
12595 
12596         /* "tables/indexesextension.pyx":299
12597  *
12598  *                 isptr[0] = ipi + elsize2
12599  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
12600  *                 isptr += 2
12601  *
12602  */
12603         (__pyx_v_isptr[1]) = __pyx_v_ipr;
12604 
12605         /* "tables/indexesextension.pyx":300
12606  *                 isptr[0] = ipi + elsize2
12607  *                 isptr[1] = ipr
12608  *                 isptr += 2             # <<<<<<<<<<<<<<
12609  *
12610  *                 pr = pi - 1
12611  */
12612         __pyx_v_isptr = (__pyx_v_isptr + 2);
12613 
12614         /* "tables/indexesextension.pyx":302
12615  *                 isptr += 2
12616  *
12617  *                 pr = pi - 1             # <<<<<<<<<<<<<<
12618  *                 ipr = ipi - elsize2
12619  *             else:
12620  */
12621         __pyx_v_pr = (__pyx_v_pi - 1);
12622 
12623         /* "tables/indexesextension.pyx":303
12624  *
12625  *                 pr = pi - 1
12626  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
12627  *             else:
12628  *                 sptr[0] = pl
12629  */
12630         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
12631 
12632         /* "tables/indexesextension.pyx":293
12633  *
12634  *             # push largest partition on stack and proceed with the other
12635  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
12636  *                 sptr[0] = pi + 1
12637  *                 sptr[1] = pr
12638  */
12639         goto __pyx_L17;
12640       }
12641 
12642       /* "tables/indexesextension.pyx":305
12643  *                 ipr = ipi - elsize2
12644  *             else:
12645  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
12646  *                 sptr[1] = pi - 1
12647  *                 sptr += 2
12648  */
12649       /*else*/ {
12650         (__pyx_v_sptr[0]) = __pyx_v_pl;
12651 
12652         /* "tables/indexesextension.pyx":306
12653  *             else:
12654  *                 sptr[0] = pl
12655  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
12656  *                 sptr += 2
12657  *
12658  */
12659         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
12660 
12661         /* "tables/indexesextension.pyx":307
12662  *                 sptr[0] = pl
12663  *                 sptr[1] = pi - 1
12664  *                 sptr += 2             # <<<<<<<<<<<<<<
12665  *
12666  *                 isptr[0] = ipl
12667  */
12668         __pyx_v_sptr = (__pyx_v_sptr + 2);
12669 
12670         /* "tables/indexesextension.pyx":309
12671  *                 sptr += 2
12672  *
12673  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
12674  *                 isptr[1] = ipi - elsize2
12675  *                 isptr += 2
12676  */
12677         (__pyx_v_isptr[0]) = __pyx_v_ipl;
12678 
12679         /* "tables/indexesextension.pyx":310
12680  *
12681  *                 isptr[0] = ipl
12682  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
12683  *                 isptr += 2
12684  *
12685  */
12686         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
12687 
12688         /* "tables/indexesextension.pyx":311
12689  *                 isptr[0] = ipl
12690  *                 isptr[1] = ipi - elsize2
12691  *                 isptr += 2             # <<<<<<<<<<<<<<
12692  *
12693  *                 pl = pi + 1
12694  */
12695         __pyx_v_isptr = (__pyx_v_isptr + 2);
12696 
12697         /* "tables/indexesextension.pyx":313
12698  *                 isptr += 2
12699  *
12700  *                 pl = pi + 1             # <<<<<<<<<<<<<<
12701  *                 ipl = ipi + elsize2
12702  *
12703  */
12704         __pyx_v_pl = (__pyx_v_pi + 1);
12705 
12706         /* "tables/indexesextension.pyx":314
12707  *
12708  *                 pl = pi + 1
12709  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
12710  *
12711  *         pi = pl + 1
12712  */
12713         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
12714       }
12715       __pyx_L17:;
12716     }
12717 
12718     /* "tables/indexesextension.pyx":316
12719  *                 ipl = ipi + elsize2
12720  *
12721  *         pi = pl + 1             # <<<<<<<<<<<<<<
12722  *         ipi = ipl + elsize2
12723  *         while pi <= pr:
12724  */
12725     __pyx_v_pi = (__pyx_v_pl + 1);
12726 
12727     /* "tables/indexesextension.pyx":317
12728  *
12729  *         pi = pl + 1
12730  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
12731  *         while pi <= pr:
12732  *             vp = pi[0]
12733  */
12734     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
12735 
12736     /* "tables/indexesextension.pyx":318
12737  *         pi = pl + 1
12738  *         ipi = ipl + elsize2
12739  *         while pi <= pr:             # <<<<<<<<<<<<<<
12740  *             vp = pi[0]
12741  *             memcpy(ivp, ipi, elsize2)
12742  */
12743     while (1) {
12744       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
12745       if (!__pyx_t_1) break;
12746 
12747       /* "tables/indexesextension.pyx":319
12748  *         ipi = ipl + elsize2
12749  *         while pi <= pr:
12750  *             vp = pi[0]             # <<<<<<<<<<<<<<
12751  *             memcpy(ivp, ipi, elsize2)
12752  *
12753  */
12754       __pyx_v_vp = (__pyx_v_pi[0]);
12755 
12756       /* "tables/indexesextension.pyx":320
12757  *         while pi <= pr:
12758  *             vp = pi[0]
12759  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
12760  *
12761  *             pj = pi
12762  */
12763       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
12764 
12765       /* "tables/indexesextension.pyx":322
12766  *             memcpy(ivp, ipi, elsize2)
12767  *
12768  *             pj = pi             # <<<<<<<<<<<<<<
12769  *             pt = pi - 1
12770  *
12771  */
12772       __pyx_v_pj = __pyx_v_pi;
12773 
12774       /* "tables/indexesextension.pyx":323
12775  *
12776  *             pj = pi
12777  *             pt = pi - 1             # <<<<<<<<<<<<<<
12778  *
12779  *             ipj = ipi
12780  */
12781       __pyx_v_pt = (__pyx_v_pi - 1);
12782 
12783       /* "tables/indexesextension.pyx":325
12784  *             pt = pi - 1
12785  *
12786  *             ipj = ipi             # <<<<<<<<<<<<<<
12787  *             ipt = ipi - elsize2
12788  *
12789  */
12790       __pyx_v_ipj = __pyx_v_ipi;
12791 
12792       /* "tables/indexesextension.pyx":326
12793  *
12794  *             ipj = ipi
12795  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
12796  *
12797  *             while pj > pl and less_than(&vp, pt):
12798  */
12799       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
12800 
12801       /* "tables/indexesextension.pyx":328
12802  *             ipt = ipi - elsize2
12803  *
12804  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
12805  *                 pj[0] = pt[0]
12806  *                 pj -= 1
12807  */
12808       while (1) {
12809         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
12810         if (__pyx_t_4) {
12811         } else {
12812           __pyx_t_1 = __pyx_t_4;
12813           goto __pyx_L22_bool_binop_done;
12814         }
12815         __pyx_t_4 = (__pyx_fuse_9__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
12816         __pyx_t_1 = __pyx_t_4;
12817         __pyx_L22_bool_binop_done:;
12818         if (!__pyx_t_1) break;
12819 
12820         /* "tables/indexesextension.pyx":329
12821  *
12822  *             while pj > pl and less_than(&vp, pt):
12823  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
12824  *                 pj -= 1
12825  *                 pt -= 1
12826  */
12827         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
12828 
12829         /* "tables/indexesextension.pyx":330
12830  *             while pj > pl and less_than(&vp, pt):
12831  *                 pj[0] = pt[0]
12832  *                 pj -= 1             # <<<<<<<<<<<<<<
12833  *                 pt -= 1
12834  *
12835  */
12836         __pyx_v_pj = (__pyx_v_pj - 1);
12837 
12838         /* "tables/indexesextension.pyx":331
12839  *                 pj[0] = pt[0]
12840  *                 pj -= 1
12841  *                 pt -= 1             # <<<<<<<<<<<<<<
12842  *
12843  *                 memcpy(ipj, ipt, elsize2)
12844  */
12845         __pyx_v_pt = (__pyx_v_pt - 1);
12846 
12847         /* "tables/indexesextension.pyx":333
12848  *                 pt -= 1
12849  *
12850  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
12851  *                 ipj -= elsize2
12852  *                 ipt -= elsize2
12853  */
12854         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
12855 
12856         /* "tables/indexesextension.pyx":334
12857  *
12858  *                 memcpy(ipj, ipt, elsize2)
12859  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
12860  *                 ipt -= elsize2
12861  *
12862  */
12863         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
12864 
12865         /* "tables/indexesextension.pyx":335
12866  *                 memcpy(ipj, ipt, elsize2)
12867  *                 ipj -= elsize2
12868  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
12869  *
12870  *             pj[0] = vp
12871  */
12872         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
12873       }
12874 
12875       /* "tables/indexesextension.pyx":337
12876  *                 ipt -= elsize2
12877  *
12878  *             pj[0] = vp             # <<<<<<<<<<<<<<
12879  *             memcpy(ipj, ivp, elsize2)
12880  *
12881  */
12882       (__pyx_v_pj[0]) = __pyx_v_vp;
12883 
12884       /* "tables/indexesextension.pyx":338
12885  *
12886  *             pj[0] = vp
12887  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
12888  *
12889  *             pi += 1
12890  */
12891       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
12892 
12893       /* "tables/indexesextension.pyx":340
12894  *             memcpy(ipj, ivp, elsize2)
12895  *
12896  *             pi += 1             # <<<<<<<<<<<<<<
12897  *             ipi += elsize2
12898  *
12899  */
12900       __pyx_v_pi = (__pyx_v_pi + 1);
12901 
12902       /* "tables/indexesextension.pyx":341
12903  *
12904  *             pi += 1
12905  *             ipi += elsize2             # <<<<<<<<<<<<<<
12906  *
12907  *         if sptr == stack:
12908  */
12909       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
12910     }
12911 
12912     /* "tables/indexesextension.pyx":343
12913  *             ipi += elsize2
12914  *
12915  *         if sptr == stack:             # <<<<<<<<<<<<<<
12916  *             break
12917  *
12918  */
12919     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
12920     if (__pyx_t_1) {
12921 
12922       /* "tables/indexesextension.pyx":344
12923  *
12924  *         if sptr == stack:
12925  *             break             # <<<<<<<<<<<<<<
12926  *
12927  *         sptr -= 2
12928  */
12929       goto __pyx_L4_break;
12930 
12931       /* "tables/indexesextension.pyx":343
12932  *             ipi += elsize2
12933  *
12934  *         if sptr == stack:             # <<<<<<<<<<<<<<
12935  *             break
12936  *
12937  */
12938     }
12939 
12940     /* "tables/indexesextension.pyx":346
12941  *             break
12942  *
12943  *         sptr -= 2             # <<<<<<<<<<<<<<
12944  *         pl = sptr[0]
12945  *         pr = sptr[1]
12946  */
12947     __pyx_v_sptr = (__pyx_v_sptr - 2);
12948 
12949     /* "tables/indexesextension.pyx":347
12950  *
12951  *         sptr -= 2
12952  *         pl = sptr[0]             # <<<<<<<<<<<<<<
12953  *         pr = sptr[1]
12954  *
12955  */
12956     __pyx_v_pl = (__pyx_v_sptr[0]);
12957 
12958     /* "tables/indexesextension.pyx":348
12959  *         sptr -= 2
12960  *         pl = sptr[0]
12961  *         pr = sptr[1]             # <<<<<<<<<<<<<<
12962  *
12963  *         isptr -= 2
12964  */
12965     __pyx_v_pr = (__pyx_v_sptr[1]);
12966 
12967     /* "tables/indexesextension.pyx":350
12968  *         pr = sptr[1]
12969  *
12970  *         isptr -= 2             # <<<<<<<<<<<<<<
12971  *         ipl = isptr[0]
12972  *         ipr = isptr[1]
12973  */
12974     __pyx_v_isptr = (__pyx_v_isptr - 2);
12975 
12976     /* "tables/indexesextension.pyx":351
12977  *
12978  *         isptr -= 2
12979  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
12980  *         ipr = isptr[1]
12981  *
12982  */
12983     __pyx_v_ipl = (__pyx_v_isptr[0]);
12984 
12985     /* "tables/indexesextension.pyx":352
12986  *         isptr -= 2
12987  *         ipl = isptr[0]
12988  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
12989  *
12990  *     free(ivp)
12991  */
12992     __pyx_v_ipr = (__pyx_v_isptr[1]);
12993   }
12994   __pyx_L4_break:;
12995 
12996   /* "tables/indexesextension.pyx":354
12997  *         ipr = isptr[1]
12998  *
12999  *     free(ivp)             # <<<<<<<<<<<<<<
13000  *
13001  *
13002  */
13003   free(__pyx_v_ivp);
13004 
13005   /* "tables/indexesextension.pyx":215
13006  *
13007  * @cython.cdivision(True)
13008  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
13009  *     cdef number_type *pl = start1
13010  *     cdef number_type *pr = start1 + (n - 1)
13011  */
13012 
13013   /* function exit code */
13014 }
13015 
__pyx_fuse_10__pyx_f_6tables_16indexesextension__keysort(npy_longdouble * __pyx_v_start1,char * __pyx_v_start2,size_t __pyx_v_elsize2,size_t __pyx_v_n)13016 static void __pyx_fuse_10__pyx_f_6tables_16indexesextension__keysort(npy_longdouble *__pyx_v_start1, char *__pyx_v_start2, size_t __pyx_v_elsize2, size_t __pyx_v_n) {
13017   npy_longdouble *__pyx_v_pl;
13018   npy_longdouble *__pyx_v_pr;
13019   char *__pyx_v_ipl;
13020   char *__pyx_v_ipr;
13021   npy_longdouble __pyx_v_vp;
13022   char *__pyx_v_ivp;
13023   npy_longdouble *__pyx_v_stack[0x64];
13024   npy_longdouble **__pyx_v_sptr;
13025   char *__pyx_v_istack[0x64];
13026   char **__pyx_v_isptr;
13027   CYTHON_UNUSED size_t __pyx_v_stack_index;
13028   npy_longdouble *__pyx_v_pm;
13029   npy_longdouble *__pyx_v_pi;
13030   npy_longdouble *__pyx_v_pj;
13031   npy_longdouble *__pyx_v_pt;
13032   char *__pyx_v_ipm;
13033   char *__pyx_v_ipi;
13034   char *__pyx_v_ipj;
13035   char *__pyx_v_ipt;
13036   int __pyx_t_1;
13037   npy_longdouble __pyx_t_2;
13038   npy_longdouble __pyx_t_3;
13039   int __pyx_t_4;
13040 
13041   /* "tables/indexesextension.pyx":216
13042  * @cython.cdivision(True)
13043  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
13044  *     cdef number_type *pl = start1             # <<<<<<<<<<<<<<
13045  *     cdef number_type *pr = start1 + (n - 1)
13046  *
13047  */
13048   __pyx_v_pl = __pyx_v_start1;
13049 
13050   /* "tables/indexesextension.pyx":217
13051  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:
13052  *     cdef number_type *pl = start1
13053  *     cdef number_type *pr = start1 + (n - 1)             # <<<<<<<<<<<<<<
13054  *
13055  *     cdef char *ipl = start2
13056  */
13057   __pyx_v_pr = (__pyx_v_start1 + (__pyx_v_n - 1));
13058 
13059   /* "tables/indexesextension.pyx":219
13060  *     cdef number_type *pr = start1 + (n - 1)
13061  *
13062  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
13063  *     cdef char *ipr = start2 + (n - 1) * elsize2
13064  *
13065  */
13066   __pyx_v_ipl = __pyx_v_start2;
13067 
13068   /* "tables/indexesextension.pyx":220
13069  *
13070  *     cdef char *ipl = start2
13071  *     cdef char *ipr = start2 + (n - 1) * elsize2             # <<<<<<<<<<<<<<
13072  *
13073  *     cdef number_type vp
13074  */
13075   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_elsize2));
13076 
13077   /* "tables/indexesextension.pyx":223
13078  *
13079  *     cdef number_type vp
13080  *     cdef char *ivp = <char *> malloc(elsize2)             # <<<<<<<<<<<<<<
13081  *
13082  *     cdef number_type *stack[PYA_QS_STACK]
13083  */
13084   __pyx_v_ivp = ((char *)malloc(__pyx_v_elsize2));
13085 
13086   /* "tables/indexesextension.pyx":226
13087  *
13088  *     cdef number_type *stack[PYA_QS_STACK]
13089  *     cdef number_type **sptr = stack             # <<<<<<<<<<<<<<
13090  *
13091  *     cdef char *istack[PYA_QS_STACK]
13092  */
13093   __pyx_v_sptr = __pyx_v_stack;
13094 
13095   /* "tables/indexesextension.pyx":229
13096  *
13097  *     cdef char *istack[PYA_QS_STACK]
13098  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
13099  *
13100  *     cdef size_t stack_index = 0
13101  */
13102   __pyx_v_isptr = __pyx_v_istack;
13103 
13104   /* "tables/indexesextension.pyx":231
13105  *     cdef char **isptr = istack
13106  *
13107  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
13108  *
13109  *     cdef number_type *pm
13110  */
13111   __pyx_v_stack_index = 0;
13112 
13113   /* "tables/indexesextension.pyx":242
13114  *     cdef char *ipt
13115  *
13116  *     while True:             # <<<<<<<<<<<<<<
13117  *         while pr - pl > SMALL_QUICKSORT:
13118  *             pm  = pl + ((pr - pl) >> 1)
13119  */
13120   while (1) {
13121 
13122     /* "tables/indexesextension.pyx":243
13123  *
13124  *     while True:
13125  *         while pr - pl > SMALL_QUICKSORT:             # <<<<<<<<<<<<<<
13126  *             pm  = pl + ((pr - pl) >> 1)
13127  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
13128  */
13129     while (1) {
13130       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > 15) != 0);
13131       if (!__pyx_t_1) break;
13132 
13133       /* "tables/indexesextension.pyx":244
13134  *     while True:
13135  *         while pr - pl > SMALL_QUICKSORT:
13136  *             pm  = pl + ((pr - pl) >> 1)             # <<<<<<<<<<<<<<
13137  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
13138  *
13139  */
13140       __pyx_v_pm = (__pyx_v_pl + ((__pyx_v_pr - __pyx_v_pl) >> 1));
13141 
13142       /* "tables/indexesextension.pyx":245
13143  *         while pr - pl > SMALL_QUICKSORT:
13144  *             pm  = pl + ((pr - pl) >> 1)
13145  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2             # <<<<<<<<<<<<<<
13146  *
13147  *             if less_than(pm, pl):
13148  */
13149       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_elsize2) >> 1) * __pyx_v_elsize2));
13150 
13151       /* "tables/indexesextension.pyx":247
13152  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
13153  *
13154  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
13155  *                 pm[0], pl[0] =  pl[0], pm[0]
13156  *                 swap_bytes(ipm, ipl, elsize2)
13157  */
13158       __pyx_t_1 = (__pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
13159       if (__pyx_t_1) {
13160 
13161         /* "tables/indexesextension.pyx":248
13162  *
13163  *             if less_than(pm, pl):
13164  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
13165  *                 swap_bytes(ipm, ipl, elsize2)
13166  *
13167  */
13168         __pyx_t_2 = (__pyx_v_pl[0]);
13169         __pyx_t_3 = (__pyx_v_pm[0]);
13170         (__pyx_v_pm[0]) = __pyx_t_2;
13171         (__pyx_v_pl[0]) = __pyx_t_3;
13172 
13173         /* "tables/indexesextension.pyx":249
13174  *             if less_than(pm, pl):
13175  *                 pm[0], pl[0] =  pl[0], pm[0]
13176  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
13177  *
13178  *             if less_than(pr, pm):
13179  */
13180         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
13181 
13182         /* "tables/indexesextension.pyx":247
13183  *             ipm  = ipl + ((ipr - ipl)/elsize2 >> 1)*elsize2
13184  *
13185  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
13186  *                 pm[0], pl[0] =  pl[0], pm[0]
13187  *                 swap_bytes(ipm, ipl, elsize2)
13188  */
13189       }
13190 
13191       /* "tables/indexesextension.pyx":251
13192  *                 swap_bytes(ipm, ipl, elsize2)
13193  *
13194  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
13195  *                 pr[0], pm[0] =  pm[0], pr[0]
13196  *                 swap_bytes(ipr, ipm, elsize2)
13197  */
13198       __pyx_t_1 = (__pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pr, __pyx_v_pm) != 0);
13199       if (__pyx_t_1) {
13200 
13201         /* "tables/indexesextension.pyx":252
13202  *
13203  *             if less_than(pr, pm):
13204  *                 pr[0], pm[0] =  pm[0], pr[0]             # <<<<<<<<<<<<<<
13205  *                 swap_bytes(ipr, ipm, elsize2)
13206  *
13207  */
13208         __pyx_t_3 = (__pyx_v_pm[0]);
13209         __pyx_t_2 = (__pyx_v_pr[0]);
13210         (__pyx_v_pr[0]) = __pyx_t_3;
13211         (__pyx_v_pm[0]) = __pyx_t_2;
13212 
13213         /* "tables/indexesextension.pyx":253
13214  *             if less_than(pr, pm):
13215  *                 pr[0], pm[0] =  pm[0], pr[0]
13216  *                 swap_bytes(ipr, ipm, elsize2)             # <<<<<<<<<<<<<<
13217  *
13218  *             if less_than(pm, pl):
13219  */
13220         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_elsize2);
13221 
13222         /* "tables/indexesextension.pyx":251
13223  *                 swap_bytes(ipm, ipl, elsize2)
13224  *
13225  *             if less_than(pr, pm):             # <<<<<<<<<<<<<<
13226  *                 pr[0], pm[0] =  pm[0], pr[0]
13227  *                 swap_bytes(ipr, ipm, elsize2)
13228  */
13229       }
13230 
13231       /* "tables/indexesextension.pyx":255
13232  *                 swap_bytes(ipr, ipm, elsize2)
13233  *
13234  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
13235  *                 pm[0], pl[0] =  pl[0], pm[0]
13236  *                 swap_bytes(ipm, ipl, elsize2)
13237  */
13238       __pyx_t_1 = (__pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pm, __pyx_v_pl) != 0);
13239       if (__pyx_t_1) {
13240 
13241         /* "tables/indexesextension.pyx":256
13242  *
13243  *             if less_than(pm, pl):
13244  *                 pm[0], pl[0] =  pl[0], pm[0]             # <<<<<<<<<<<<<<
13245  *                 swap_bytes(ipm, ipl, elsize2)
13246  *
13247  */
13248         __pyx_t_2 = (__pyx_v_pl[0]);
13249         __pyx_t_3 = (__pyx_v_pm[0]);
13250         (__pyx_v_pm[0]) = __pyx_t_2;
13251         (__pyx_v_pl[0]) = __pyx_t_3;
13252 
13253         /* "tables/indexesextension.pyx":257
13254  *             if less_than(pm, pl):
13255  *                 pm[0], pl[0] =  pl[0], pm[0]
13256  *                 swap_bytes(ipm, ipl, elsize2)             # <<<<<<<<<<<<<<
13257  *
13258  *             vp = pm[0]
13259  */
13260         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_elsize2);
13261 
13262         /* "tables/indexesextension.pyx":255
13263  *                 swap_bytes(ipr, ipm, elsize2)
13264  *
13265  *             if less_than(pm, pl):             # <<<<<<<<<<<<<<
13266  *                 pm[0], pl[0] =  pl[0], pm[0]
13267  *                 swap_bytes(ipm, ipl, elsize2)
13268  */
13269       }
13270 
13271       /* "tables/indexesextension.pyx":259
13272  *                 swap_bytes(ipm, ipl, elsize2)
13273  *
13274  *             vp = pm[0]             # <<<<<<<<<<<<<<
13275  *
13276  *             pi = pl
13277  */
13278       __pyx_v_vp = (__pyx_v_pm[0]);
13279 
13280       /* "tables/indexesextension.pyx":261
13281  *             vp = pm[0]
13282  *
13283  *             pi = pl             # <<<<<<<<<<<<<<
13284  *             ipi = ipl
13285  *
13286  */
13287       __pyx_v_pi = __pyx_v_pl;
13288 
13289       /* "tables/indexesextension.pyx":262
13290  *
13291  *             pi = pl
13292  *             ipi = ipl             # <<<<<<<<<<<<<<
13293  *
13294  *             pj = pr - 1
13295  */
13296       __pyx_v_ipi = __pyx_v_ipl;
13297 
13298       /* "tables/indexesextension.pyx":264
13299  *             ipi = ipl
13300  *
13301  *             pj = pr - 1             # <<<<<<<<<<<<<<
13302  *             ipj = ipr - elsize2
13303  *
13304  */
13305       __pyx_v_pj = (__pyx_v_pr - 1);
13306 
13307       /* "tables/indexesextension.pyx":265
13308  *
13309  *             pj = pr - 1
13310  *             ipj = ipr - elsize2             # <<<<<<<<<<<<<<
13311  *
13312  *             pm[0], pj[0] = pj[0], pm[0]
13313  */
13314       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_elsize2);
13315 
13316       /* "tables/indexesextension.pyx":267
13317  *             ipj = ipr - elsize2
13318  *
13319  *             pm[0], pj[0] = pj[0], pm[0]             # <<<<<<<<<<<<<<
13320  *             swap_bytes(ipm, ipj, elsize2)
13321  *
13322  */
13323       __pyx_t_3 = (__pyx_v_pj[0]);
13324       __pyx_t_2 = (__pyx_v_pm[0]);
13325       (__pyx_v_pm[0]) = __pyx_t_3;
13326       (__pyx_v_pj[0]) = __pyx_t_2;
13327 
13328       /* "tables/indexesextension.pyx":268
13329  *
13330  *             pm[0], pj[0] = pj[0], pm[0]
13331  *             swap_bytes(ipm, ipj, elsize2)             # <<<<<<<<<<<<<<
13332  *
13333  *             while True:
13334  */
13335       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_elsize2);
13336 
13337       /* "tables/indexesextension.pyx":270
13338  *             swap_bytes(ipm, ipj, elsize2)
13339  *
13340  *             while True:             # <<<<<<<<<<<<<<
13341  *                 pi += 1
13342  *                 ipi += elsize2
13343  */
13344       while (1) {
13345 
13346         /* "tables/indexesextension.pyx":271
13347  *
13348  *             while True:
13349  *                 pi += 1             # <<<<<<<<<<<<<<
13350  *                 ipi += elsize2
13351  *                 while less_than(pi, &vp):
13352  */
13353         __pyx_v_pi = (__pyx_v_pi + 1);
13354 
13355         /* "tables/indexesextension.pyx":272
13356  *             while True:
13357  *                 pi += 1
13358  *                 ipi += elsize2             # <<<<<<<<<<<<<<
13359  *                 while less_than(pi, &vp):
13360  *                     pi += 1
13361  */
13362         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
13363 
13364         /* "tables/indexesextension.pyx":273
13365  *                 pi += 1
13366  *                 ipi += elsize2
13367  *                 while less_than(pi, &vp):             # <<<<<<<<<<<<<<
13368  *                     pi += 1
13369  *                     ipi += elsize2
13370  */
13371         while (1) {
13372           __pyx_t_1 = (__pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than(__pyx_v_pi, (&__pyx_v_vp)) != 0);
13373           if (!__pyx_t_1) break;
13374 
13375           /* "tables/indexesextension.pyx":274
13376  *                 ipi += elsize2
13377  *                 while less_than(pi, &vp):
13378  *                     pi += 1             # <<<<<<<<<<<<<<
13379  *                     ipi += elsize2
13380  *
13381  */
13382           __pyx_v_pi = (__pyx_v_pi + 1);
13383 
13384           /* "tables/indexesextension.pyx":275
13385  *                 while less_than(pi, &vp):
13386  *                     pi += 1
13387  *                     ipi += elsize2             # <<<<<<<<<<<<<<
13388  *
13389  *                 pj -= 1
13390  */
13391           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
13392         }
13393 
13394         /* "tables/indexesextension.pyx":277
13395  *                     ipi += elsize2
13396  *
13397  *                 pj -= 1             # <<<<<<<<<<<<<<
13398  *                 ipj -= elsize2
13399  *                 while less_than(&vp, pj):
13400  */
13401         __pyx_v_pj = (__pyx_v_pj - 1);
13402 
13403         /* "tables/indexesextension.pyx":278
13404  *
13405  *                 pj -= 1
13406  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
13407  *                 while less_than(&vp, pj):
13408  *                     pj -= 1
13409  */
13410         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
13411 
13412         /* "tables/indexesextension.pyx":279
13413  *                 pj -= 1
13414  *                 ipj -= elsize2
13415  *                 while less_than(&vp, pj):             # <<<<<<<<<<<<<<
13416  *                     pj -= 1
13417  *                     ipj -= elsize2
13418  */
13419         while (1) {
13420           __pyx_t_1 = (__pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pj) != 0);
13421           if (!__pyx_t_1) break;
13422 
13423           /* "tables/indexesextension.pyx":280
13424  *                 ipj -= elsize2
13425  *                 while less_than(&vp, pj):
13426  *                     pj -= 1             # <<<<<<<<<<<<<<
13427  *                     ipj -= elsize2
13428  *
13429  */
13430           __pyx_v_pj = (__pyx_v_pj - 1);
13431 
13432           /* "tables/indexesextension.pyx":281
13433  *                 while less_than(&vp, pj):
13434  *                     pj -= 1
13435  *                     ipj -= elsize2             # <<<<<<<<<<<<<<
13436  *
13437  *                 if pi >= pj:
13438  */
13439           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
13440         }
13441 
13442         /* "tables/indexesextension.pyx":283
13443  *                     ipj -= elsize2
13444  *
13445  *                 if pi >= pj:             # <<<<<<<<<<<<<<
13446  *                     break
13447  *
13448  */
13449         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
13450         if (__pyx_t_1) {
13451 
13452           /* "tables/indexesextension.pyx":284
13453  *
13454  *                 if pi >= pj:
13455  *                     break             # <<<<<<<<<<<<<<
13456  *
13457  *                 pi[0], pj[0] = pj[0], pi[0]
13458  */
13459           goto __pyx_L11_break;
13460 
13461           /* "tables/indexesextension.pyx":283
13462  *                     ipj -= elsize2
13463  *
13464  *                 if pi >= pj:             # <<<<<<<<<<<<<<
13465  *                     break
13466  *
13467  */
13468         }
13469 
13470         /* "tables/indexesextension.pyx":286
13471  *                     break
13472  *
13473  *                 pi[0], pj[0] = pj[0], pi[0]             # <<<<<<<<<<<<<<
13474  *                 swap_bytes(ipi, ipj, elsize2)
13475  *
13476  */
13477         __pyx_t_2 = (__pyx_v_pj[0]);
13478         __pyx_t_3 = (__pyx_v_pi[0]);
13479         (__pyx_v_pi[0]) = __pyx_t_2;
13480         (__pyx_v_pj[0]) = __pyx_t_3;
13481 
13482         /* "tables/indexesextension.pyx":287
13483  *
13484  *                 pi[0], pj[0] = pj[0], pi[0]
13485  *                 swap_bytes(ipi, ipj, elsize2)             # <<<<<<<<<<<<<<
13486  *
13487  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
13488  */
13489         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_elsize2);
13490       }
13491       __pyx_L11_break:;
13492 
13493       /* "tables/indexesextension.pyx":289
13494  *                 swap_bytes(ipi, ipj, elsize2)
13495  *
13496  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]             # <<<<<<<<<<<<<<
13497  *             swap_bytes(ipi, ipr-elsize2, elsize2)
13498  *
13499  */
13500       __pyx_t_3 = ((__pyx_v_pr - 1)[0]);
13501       __pyx_t_2 = (__pyx_v_pi[0]);
13502       (__pyx_v_pi[0]) = __pyx_t_3;
13503       ((__pyx_v_pr - 1)[0]) = __pyx_t_2;
13504 
13505       /* "tables/indexesextension.pyx":290
13506  *
13507  *             pi[0], (pr-1)[0] = (pr-1)[0], pi[0]
13508  *             swap_bytes(ipi, ipr-elsize2, elsize2)             # <<<<<<<<<<<<<<
13509  *
13510  *             # push largest partition on stack and proceed with the other
13511  */
13512       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_elsize2), __pyx_v_elsize2);
13513 
13514       /* "tables/indexesextension.pyx":293
13515  *
13516  *             # push largest partition on stack and proceed with the other
13517  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
13518  *                 sptr[0] = pi + 1
13519  *                 sptr[1] = pr
13520  */
13521       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
13522       if (__pyx_t_1) {
13523 
13524         /* "tables/indexesextension.pyx":294
13525  *             # push largest partition on stack and proceed with the other
13526  *             if (pi - pl) < (pr - pi):
13527  *                 sptr[0] = pi + 1             # <<<<<<<<<<<<<<
13528  *                 sptr[1] = pr
13529  *                 sptr += 2
13530  */
13531         (__pyx_v_sptr[0]) = (__pyx_v_pi + 1);
13532 
13533         /* "tables/indexesextension.pyx":295
13534  *             if (pi - pl) < (pr - pi):
13535  *                 sptr[0] = pi + 1
13536  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
13537  *                 sptr += 2
13538  *
13539  */
13540         (__pyx_v_sptr[1]) = __pyx_v_pr;
13541 
13542         /* "tables/indexesextension.pyx":296
13543  *                 sptr[0] = pi + 1
13544  *                 sptr[1] = pr
13545  *                 sptr += 2             # <<<<<<<<<<<<<<
13546  *
13547  *                 isptr[0] = ipi + elsize2
13548  */
13549         __pyx_v_sptr = (__pyx_v_sptr + 2);
13550 
13551         /* "tables/indexesextension.pyx":298
13552  *                 sptr += 2
13553  *
13554  *                 isptr[0] = ipi + elsize2             # <<<<<<<<<<<<<<
13555  *                 isptr[1] = ipr
13556  *                 isptr += 2
13557  */
13558         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_elsize2);
13559 
13560         /* "tables/indexesextension.pyx":299
13561  *
13562  *                 isptr[0] = ipi + elsize2
13563  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
13564  *                 isptr += 2
13565  *
13566  */
13567         (__pyx_v_isptr[1]) = __pyx_v_ipr;
13568 
13569         /* "tables/indexesextension.pyx":300
13570  *                 isptr[0] = ipi + elsize2
13571  *                 isptr[1] = ipr
13572  *                 isptr += 2             # <<<<<<<<<<<<<<
13573  *
13574  *                 pr = pi - 1
13575  */
13576         __pyx_v_isptr = (__pyx_v_isptr + 2);
13577 
13578         /* "tables/indexesextension.pyx":302
13579  *                 isptr += 2
13580  *
13581  *                 pr = pi - 1             # <<<<<<<<<<<<<<
13582  *                 ipr = ipi - elsize2
13583  *             else:
13584  */
13585         __pyx_v_pr = (__pyx_v_pi - 1);
13586 
13587         /* "tables/indexesextension.pyx":303
13588  *
13589  *                 pr = pi - 1
13590  *                 ipr = ipi - elsize2             # <<<<<<<<<<<<<<
13591  *             else:
13592  *                 sptr[0] = pl
13593  */
13594         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_elsize2);
13595 
13596         /* "tables/indexesextension.pyx":293
13597  *
13598  *             # push largest partition on stack and proceed with the other
13599  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
13600  *                 sptr[0] = pi + 1
13601  *                 sptr[1] = pr
13602  */
13603         goto __pyx_L17;
13604       }
13605 
13606       /* "tables/indexesextension.pyx":305
13607  *                 ipr = ipi - elsize2
13608  *             else:
13609  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
13610  *                 sptr[1] = pi - 1
13611  *                 sptr += 2
13612  */
13613       /*else*/ {
13614         (__pyx_v_sptr[0]) = __pyx_v_pl;
13615 
13616         /* "tables/indexesextension.pyx":306
13617  *             else:
13618  *                 sptr[0] = pl
13619  *                 sptr[1] = pi - 1             # <<<<<<<<<<<<<<
13620  *                 sptr += 2
13621  *
13622  */
13623         (__pyx_v_sptr[1]) = (__pyx_v_pi - 1);
13624 
13625         /* "tables/indexesextension.pyx":307
13626  *                 sptr[0] = pl
13627  *                 sptr[1] = pi - 1
13628  *                 sptr += 2             # <<<<<<<<<<<<<<
13629  *
13630  *                 isptr[0] = ipl
13631  */
13632         __pyx_v_sptr = (__pyx_v_sptr + 2);
13633 
13634         /* "tables/indexesextension.pyx":309
13635  *                 sptr += 2
13636  *
13637  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
13638  *                 isptr[1] = ipi - elsize2
13639  *                 isptr += 2
13640  */
13641         (__pyx_v_isptr[0]) = __pyx_v_ipl;
13642 
13643         /* "tables/indexesextension.pyx":310
13644  *
13645  *                 isptr[0] = ipl
13646  *                 isptr[1] = ipi - elsize2             # <<<<<<<<<<<<<<
13647  *                 isptr += 2
13648  *
13649  */
13650         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_elsize2);
13651 
13652         /* "tables/indexesextension.pyx":311
13653  *                 isptr[0] = ipl
13654  *                 isptr[1] = ipi - elsize2
13655  *                 isptr += 2             # <<<<<<<<<<<<<<
13656  *
13657  *                 pl = pi + 1
13658  */
13659         __pyx_v_isptr = (__pyx_v_isptr + 2);
13660 
13661         /* "tables/indexesextension.pyx":313
13662  *                 isptr += 2
13663  *
13664  *                 pl = pi + 1             # <<<<<<<<<<<<<<
13665  *                 ipl = ipi + elsize2
13666  *
13667  */
13668         __pyx_v_pl = (__pyx_v_pi + 1);
13669 
13670         /* "tables/indexesextension.pyx":314
13671  *
13672  *                 pl = pi + 1
13673  *                 ipl = ipi + elsize2             # <<<<<<<<<<<<<<
13674  *
13675  *         pi = pl + 1
13676  */
13677         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_elsize2);
13678       }
13679       __pyx_L17:;
13680     }
13681 
13682     /* "tables/indexesextension.pyx":316
13683  *                 ipl = ipi + elsize2
13684  *
13685  *         pi = pl + 1             # <<<<<<<<<<<<<<
13686  *         ipi = ipl + elsize2
13687  *         while pi <= pr:
13688  */
13689     __pyx_v_pi = (__pyx_v_pl + 1);
13690 
13691     /* "tables/indexesextension.pyx":317
13692  *
13693  *         pi = pl + 1
13694  *         ipi = ipl + elsize2             # <<<<<<<<<<<<<<
13695  *         while pi <= pr:
13696  *             vp = pi[0]
13697  */
13698     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_elsize2);
13699 
13700     /* "tables/indexesextension.pyx":318
13701  *         pi = pl + 1
13702  *         ipi = ipl + elsize2
13703  *         while pi <= pr:             # <<<<<<<<<<<<<<
13704  *             vp = pi[0]
13705  *             memcpy(ivp, ipi, elsize2)
13706  */
13707     while (1) {
13708       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
13709       if (!__pyx_t_1) break;
13710 
13711       /* "tables/indexesextension.pyx":319
13712  *         ipi = ipl + elsize2
13713  *         while pi <= pr:
13714  *             vp = pi[0]             # <<<<<<<<<<<<<<
13715  *             memcpy(ivp, ipi, elsize2)
13716  *
13717  */
13718       __pyx_v_vp = (__pyx_v_pi[0]);
13719 
13720       /* "tables/indexesextension.pyx":320
13721  *         while pi <= pr:
13722  *             vp = pi[0]
13723  *             memcpy(ivp, ipi, elsize2)             # <<<<<<<<<<<<<<
13724  *
13725  *             pj = pi
13726  */
13727       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_elsize2));
13728 
13729       /* "tables/indexesextension.pyx":322
13730  *             memcpy(ivp, ipi, elsize2)
13731  *
13732  *             pj = pi             # <<<<<<<<<<<<<<
13733  *             pt = pi - 1
13734  *
13735  */
13736       __pyx_v_pj = __pyx_v_pi;
13737 
13738       /* "tables/indexesextension.pyx":323
13739  *
13740  *             pj = pi
13741  *             pt = pi - 1             # <<<<<<<<<<<<<<
13742  *
13743  *             ipj = ipi
13744  */
13745       __pyx_v_pt = (__pyx_v_pi - 1);
13746 
13747       /* "tables/indexesextension.pyx":325
13748  *             pt = pi - 1
13749  *
13750  *             ipj = ipi             # <<<<<<<<<<<<<<
13751  *             ipt = ipi - elsize2
13752  *
13753  */
13754       __pyx_v_ipj = __pyx_v_ipi;
13755 
13756       /* "tables/indexesextension.pyx":326
13757  *
13758  *             ipj = ipi
13759  *             ipt = ipi - elsize2             # <<<<<<<<<<<<<<
13760  *
13761  *             while pj > pl and less_than(&vp, pt):
13762  */
13763       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_elsize2);
13764 
13765       /* "tables/indexesextension.pyx":328
13766  *             ipt = ipi - elsize2
13767  *
13768  *             while pj > pl and less_than(&vp, pt):             # <<<<<<<<<<<<<<
13769  *                 pj[0] = pt[0]
13770  *                 pj -= 1
13771  */
13772       while (1) {
13773         __pyx_t_4 = ((__pyx_v_pj > __pyx_v_pl) != 0);
13774         if (__pyx_t_4) {
13775         } else {
13776           __pyx_t_1 = __pyx_t_4;
13777           goto __pyx_L22_bool_binop_done;
13778         }
13779         __pyx_t_4 = (__pyx_fuse_10__pyx_f_6tables_16indexesextension_less_than((&__pyx_v_vp), __pyx_v_pt) != 0);
13780         __pyx_t_1 = __pyx_t_4;
13781         __pyx_L22_bool_binop_done:;
13782         if (!__pyx_t_1) break;
13783 
13784         /* "tables/indexesextension.pyx":329
13785  *
13786  *             while pj > pl and less_than(&vp, pt):
13787  *                 pj[0] = pt[0]             # <<<<<<<<<<<<<<
13788  *                 pj -= 1
13789  *                 pt -= 1
13790  */
13791         (__pyx_v_pj[0]) = (__pyx_v_pt[0]);
13792 
13793         /* "tables/indexesextension.pyx":330
13794  *             while pj > pl and less_than(&vp, pt):
13795  *                 pj[0] = pt[0]
13796  *                 pj -= 1             # <<<<<<<<<<<<<<
13797  *                 pt -= 1
13798  *
13799  */
13800         __pyx_v_pj = (__pyx_v_pj - 1);
13801 
13802         /* "tables/indexesextension.pyx":331
13803  *                 pj[0] = pt[0]
13804  *                 pj -= 1
13805  *                 pt -= 1             # <<<<<<<<<<<<<<
13806  *
13807  *                 memcpy(ipj, ipt, elsize2)
13808  */
13809         __pyx_v_pt = (__pyx_v_pt - 1);
13810 
13811         /* "tables/indexesextension.pyx":333
13812  *                 pt -= 1
13813  *
13814  *                 memcpy(ipj, ipt, elsize2)             # <<<<<<<<<<<<<<
13815  *                 ipj -= elsize2
13816  *                 ipt -= elsize2
13817  */
13818         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_elsize2));
13819 
13820         /* "tables/indexesextension.pyx":334
13821  *
13822  *                 memcpy(ipj, ipt, elsize2)
13823  *                 ipj -= elsize2             # <<<<<<<<<<<<<<
13824  *                 ipt -= elsize2
13825  *
13826  */
13827         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_elsize2);
13828 
13829         /* "tables/indexesextension.pyx":335
13830  *                 memcpy(ipj, ipt, elsize2)
13831  *                 ipj -= elsize2
13832  *                 ipt -= elsize2             # <<<<<<<<<<<<<<
13833  *
13834  *             pj[0] = vp
13835  */
13836         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_elsize2);
13837       }
13838 
13839       /* "tables/indexesextension.pyx":337
13840  *                 ipt -= elsize2
13841  *
13842  *             pj[0] = vp             # <<<<<<<<<<<<<<
13843  *             memcpy(ipj, ivp, elsize2)
13844  *
13845  */
13846       (__pyx_v_pj[0]) = __pyx_v_vp;
13847 
13848       /* "tables/indexesextension.pyx":338
13849  *
13850  *             pj[0] = vp
13851  *             memcpy(ipj, ivp, elsize2)             # <<<<<<<<<<<<<<
13852  *
13853  *             pi += 1
13854  */
13855       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_elsize2));
13856 
13857       /* "tables/indexesextension.pyx":340
13858  *             memcpy(ipj, ivp, elsize2)
13859  *
13860  *             pi += 1             # <<<<<<<<<<<<<<
13861  *             ipi += elsize2
13862  *
13863  */
13864       __pyx_v_pi = (__pyx_v_pi + 1);
13865 
13866       /* "tables/indexesextension.pyx":341
13867  *
13868  *             pi += 1
13869  *             ipi += elsize2             # <<<<<<<<<<<<<<
13870  *
13871  *         if sptr == stack:
13872  */
13873       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_elsize2);
13874     }
13875 
13876     /* "tables/indexesextension.pyx":343
13877  *             ipi += elsize2
13878  *
13879  *         if sptr == stack:             # <<<<<<<<<<<<<<
13880  *             break
13881  *
13882  */
13883     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
13884     if (__pyx_t_1) {
13885 
13886       /* "tables/indexesextension.pyx":344
13887  *
13888  *         if sptr == stack:
13889  *             break             # <<<<<<<<<<<<<<
13890  *
13891  *         sptr -= 2
13892  */
13893       goto __pyx_L4_break;
13894 
13895       /* "tables/indexesextension.pyx":343
13896  *             ipi += elsize2
13897  *
13898  *         if sptr == stack:             # <<<<<<<<<<<<<<
13899  *             break
13900  *
13901  */
13902     }
13903 
13904     /* "tables/indexesextension.pyx":346
13905  *             break
13906  *
13907  *         sptr -= 2             # <<<<<<<<<<<<<<
13908  *         pl = sptr[0]
13909  *         pr = sptr[1]
13910  */
13911     __pyx_v_sptr = (__pyx_v_sptr - 2);
13912 
13913     /* "tables/indexesextension.pyx":347
13914  *
13915  *         sptr -= 2
13916  *         pl = sptr[0]             # <<<<<<<<<<<<<<
13917  *         pr = sptr[1]
13918  *
13919  */
13920     __pyx_v_pl = (__pyx_v_sptr[0]);
13921 
13922     /* "tables/indexesextension.pyx":348
13923  *         sptr -= 2
13924  *         pl = sptr[0]
13925  *         pr = sptr[1]             # <<<<<<<<<<<<<<
13926  *
13927  *         isptr -= 2
13928  */
13929     __pyx_v_pr = (__pyx_v_sptr[1]);
13930 
13931     /* "tables/indexesextension.pyx":350
13932  *         pr = sptr[1]
13933  *
13934  *         isptr -= 2             # <<<<<<<<<<<<<<
13935  *         ipl = isptr[0]
13936  *         ipr = isptr[1]
13937  */
13938     __pyx_v_isptr = (__pyx_v_isptr - 2);
13939 
13940     /* "tables/indexesextension.pyx":351
13941  *
13942  *         isptr -= 2
13943  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
13944  *         ipr = isptr[1]
13945  *
13946  */
13947     __pyx_v_ipl = (__pyx_v_isptr[0]);
13948 
13949     /* "tables/indexesextension.pyx":352
13950  *         isptr -= 2
13951  *         ipl = isptr[0]
13952  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
13953  *
13954  *     free(ivp)
13955  */
13956     __pyx_v_ipr = (__pyx_v_isptr[1]);
13957   }
13958   __pyx_L4_break:;
13959 
13960   /* "tables/indexesextension.pyx":354
13961  *         ipr = isptr[1]
13962  *
13963  *     free(ivp)             # <<<<<<<<<<<<<<
13964  *
13965  *
13966  */
13967   free(__pyx_v_ivp);
13968 
13969   /* "tables/indexesextension.pyx":215
13970  *
13971  * @cython.cdivision(True)
13972  * cdef void _keysort(number_type* start1, char* start2, size_t elsize2, size_t n) nogil:             # <<<<<<<<<<<<<<
13973  *     cdef number_type *pl = start1
13974  *     cdef number_type *pr = start1 + (n - 1)
13975  */
13976 
13977   /* function exit code */
13978 }
13979 
13980 /* "tables/indexesextension.pyx":358
13981  *
13982  * @cython.cdivision(True)
13983  * cdef void _keysort_string(char* start1, size_t ss, char* start2, size_t ts, size_t n) nogil:             # <<<<<<<<<<<<<<
13984  *     cdef char *pl = start1
13985  *     cdef char *pr = start1 + (n - 1) * ss
13986  */
13987 
__pyx_f_6tables_16indexesextension__keysort_string(char * __pyx_v_start1,size_t __pyx_v_ss,char * __pyx_v_start2,size_t __pyx_v_ts,size_t __pyx_v_n)13988 static void __pyx_f_6tables_16indexesextension__keysort_string(char *__pyx_v_start1, size_t __pyx_v_ss, char *__pyx_v_start2, size_t __pyx_v_ts, size_t __pyx_v_n) {
13989   char *__pyx_v_pl;
13990   char *__pyx_v_pr;
13991   char *__pyx_v_ipl;
13992   char *__pyx_v_ipr;
13993   char *__pyx_v_vp;
13994   char *__pyx_v_ivp;
13995   char *__pyx_v_stack[0x64];
13996   char **__pyx_v_sptr;
13997   char *__pyx_v_istack[0x64];
13998   char **__pyx_v_isptr;
13999   CYTHON_UNUSED size_t __pyx_v_stack_index;
14000   char *__pyx_v_pm;
14001   char *__pyx_v_pi;
14002   char *__pyx_v_pj;
14003   char *__pyx_v_pt;
14004   char *__pyx_v_ipm;
14005   char *__pyx_v_ipi;
14006   char *__pyx_v_ipj;
14007   char *__pyx_v_ipt;
14008   int __pyx_t_1;
14009   int __pyx_t_2;
14010 
14011   /* "tables/indexesextension.pyx":359
14012  * @cython.cdivision(True)
14013  * cdef void _keysort_string(char* start1, size_t ss, char* start2, size_t ts, size_t n) nogil:
14014  *     cdef char *pl = start1             # <<<<<<<<<<<<<<
14015  *     cdef char *pr = start1 + (n - 1) * ss
14016  *
14017  */
14018   __pyx_v_pl = __pyx_v_start1;
14019 
14020   /* "tables/indexesextension.pyx":360
14021  * cdef void _keysort_string(char* start1, size_t ss, char* start2, size_t ts, size_t n) nogil:
14022  *     cdef char *pl = start1
14023  *     cdef char *pr = start1 + (n - 1) * ss             # <<<<<<<<<<<<<<
14024  *
14025  *     cdef char *ipl = start2
14026  */
14027   __pyx_v_pr = (__pyx_v_start1 + ((__pyx_v_n - 1) * __pyx_v_ss));
14028 
14029   /* "tables/indexesextension.pyx":362
14030  *     cdef char *pr = start1 + (n - 1) * ss
14031  *
14032  *     cdef char *ipl = start2             # <<<<<<<<<<<<<<
14033  *     cdef char *ipr = start2 + (n - 1) * ts
14034  *
14035  */
14036   __pyx_v_ipl = __pyx_v_start2;
14037 
14038   /* "tables/indexesextension.pyx":363
14039  *
14040  *     cdef char *ipl = start2
14041  *     cdef char *ipr = start2 + (n - 1) * ts             # <<<<<<<<<<<<<<
14042  *
14043  *     cdef char *vp = <char *>malloc(ss)
14044  */
14045   __pyx_v_ipr = (__pyx_v_start2 + ((__pyx_v_n - 1) * __pyx_v_ts));
14046 
14047   /* "tables/indexesextension.pyx":365
14048  *     cdef char *ipr = start2 + (n - 1) * ts
14049  *
14050  *     cdef char *vp = <char *>malloc(ss)             # <<<<<<<<<<<<<<
14051  *     cdef char *ivp = <char *>malloc(ts)
14052  *
14053  */
14054   __pyx_v_vp = ((char *)malloc(__pyx_v_ss));
14055 
14056   /* "tables/indexesextension.pyx":366
14057  *
14058  *     cdef char *vp = <char *>malloc(ss)
14059  *     cdef char *ivp = <char *>malloc(ts)             # <<<<<<<<<<<<<<
14060  *
14061  *     cdef char *stack[PYA_QS_STACK]
14062  */
14063   __pyx_v_ivp = ((char *)malloc(__pyx_v_ts));
14064 
14065   /* "tables/indexesextension.pyx":369
14066  *
14067  *     cdef char *stack[PYA_QS_STACK]
14068  *     cdef char **sptr = stack             # <<<<<<<<<<<<<<
14069  *
14070  *     cdef char *istack[PYA_QS_STACK]
14071  */
14072   __pyx_v_sptr = __pyx_v_stack;
14073 
14074   /* "tables/indexesextension.pyx":372
14075  *
14076  *     cdef char *istack[PYA_QS_STACK]
14077  *     cdef char **isptr = istack             # <<<<<<<<<<<<<<
14078  *
14079  *     cdef size_t stack_index = 0
14080  */
14081   __pyx_v_isptr = __pyx_v_istack;
14082 
14083   /* "tables/indexesextension.pyx":374
14084  *     cdef char **isptr = istack
14085  *
14086  *     cdef size_t stack_index = 0             # <<<<<<<<<<<<<<
14087  *
14088  *     cdef char *pm
14089  */
14090   __pyx_v_stack_index = 0;
14091 
14092   /* "tables/indexesextension.pyx":386
14093  *     cdef char *ipt
14094  *
14095  *     while True:             # <<<<<<<<<<<<<<
14096  *         while pr - pl > SMALL_QUICKSORT * ss:
14097  *             pm  = pl + ((pr - pl)/ss >> 1)*ss
14098  */
14099   while (1) {
14100 
14101     /* "tables/indexesextension.pyx":387
14102  *
14103  *     while True:
14104  *         while pr - pl > SMALL_QUICKSORT * ss:             # <<<<<<<<<<<<<<
14105  *             pm  = pl + ((pr - pl)/ss >> 1)*ss
14106  *             ipm  = ipl + ((ipr - ipl)/ts >> 1)*ts
14107  */
14108     while (1) {
14109       __pyx_t_1 = (((__pyx_v_pr - __pyx_v_pl) > (15 * __pyx_v_ss)) != 0);
14110       if (!__pyx_t_1) break;
14111 
14112       /* "tables/indexesextension.pyx":388
14113  *     while True:
14114  *         while pr - pl > SMALL_QUICKSORT * ss:
14115  *             pm  = pl + ((pr - pl)/ss >> 1)*ss             # <<<<<<<<<<<<<<
14116  *             ipm  = ipl + ((ipr - ipl)/ts >> 1)*ts
14117  *
14118  */
14119       __pyx_v_pm = (__pyx_v_pl + ((((__pyx_v_pr - __pyx_v_pl) / __pyx_v_ss) >> 1) * __pyx_v_ss));
14120 
14121       /* "tables/indexesextension.pyx":389
14122  *         while pr - pl > SMALL_QUICKSORT * ss:
14123  *             pm  = pl + ((pr - pl)/ss >> 1)*ss
14124  *             ipm  = ipl + ((ipr - ipl)/ts >> 1)*ts             # <<<<<<<<<<<<<<
14125  *
14126  *             if strncmp(pm, pl, ss) < 0:
14127  */
14128       __pyx_v_ipm = (__pyx_v_ipl + ((((__pyx_v_ipr - __pyx_v_ipl) / __pyx_v_ts) >> 1) * __pyx_v_ts));
14129 
14130       /* "tables/indexesextension.pyx":391
14131  *             ipm  = ipl + ((ipr - ipl)/ts >> 1)*ts
14132  *
14133  *             if strncmp(pm, pl, ss) < 0:             # <<<<<<<<<<<<<<
14134  *                 swap_bytes(pm, pl, ss)
14135  *                 swap_bytes(ipm, ipl, ts)
14136  */
14137       __pyx_t_1 = ((strncmp(__pyx_v_pm, __pyx_v_pl, __pyx_v_ss) < 0) != 0);
14138       if (__pyx_t_1) {
14139 
14140         /* "tables/indexesextension.pyx":392
14141  *
14142  *             if strncmp(pm, pl, ss) < 0:
14143  *                 swap_bytes(pm, pl, ss)             # <<<<<<<<<<<<<<
14144  *                 swap_bytes(ipm, ipl, ts)
14145  *
14146  */
14147         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_pm, __pyx_v_pl, __pyx_v_ss);
14148 
14149         /* "tables/indexesextension.pyx":393
14150  *             if strncmp(pm, pl, ss) < 0:
14151  *                 swap_bytes(pm, pl, ss)
14152  *                 swap_bytes(ipm, ipl, ts)             # <<<<<<<<<<<<<<
14153  *
14154  *             if strncmp(pr, pm, ss) < 0:
14155  */
14156         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_ts);
14157 
14158         /* "tables/indexesextension.pyx":391
14159  *             ipm  = ipl + ((ipr - ipl)/ts >> 1)*ts
14160  *
14161  *             if strncmp(pm, pl, ss) < 0:             # <<<<<<<<<<<<<<
14162  *                 swap_bytes(pm, pl, ss)
14163  *                 swap_bytes(ipm, ipl, ts)
14164  */
14165       }
14166 
14167       /* "tables/indexesextension.pyx":395
14168  *                 swap_bytes(ipm, ipl, ts)
14169  *
14170  *             if strncmp(pr, pm, ss) < 0:             # <<<<<<<<<<<<<<
14171  *                 swap_bytes(pr, pm, ss)
14172  *                 swap_bytes(ipr, ipm, ts)
14173  */
14174       __pyx_t_1 = ((strncmp(__pyx_v_pr, __pyx_v_pm, __pyx_v_ss) < 0) != 0);
14175       if (__pyx_t_1) {
14176 
14177         /* "tables/indexesextension.pyx":396
14178  *
14179  *             if strncmp(pr, pm, ss) < 0:
14180  *                 swap_bytes(pr, pm, ss)             # <<<<<<<<<<<<<<
14181  *                 swap_bytes(ipr, ipm, ts)
14182  *
14183  */
14184         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_pr, __pyx_v_pm, __pyx_v_ss);
14185 
14186         /* "tables/indexesextension.pyx":397
14187  *             if strncmp(pr, pm, ss) < 0:
14188  *                 swap_bytes(pr, pm, ss)
14189  *                 swap_bytes(ipr, ipm, ts)             # <<<<<<<<<<<<<<
14190  *
14191  *             if strncmp(pm, pl, ss) < 0:
14192  */
14193         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipr, __pyx_v_ipm, __pyx_v_ts);
14194 
14195         /* "tables/indexesextension.pyx":395
14196  *                 swap_bytes(ipm, ipl, ts)
14197  *
14198  *             if strncmp(pr, pm, ss) < 0:             # <<<<<<<<<<<<<<
14199  *                 swap_bytes(pr, pm, ss)
14200  *                 swap_bytes(ipr, ipm, ts)
14201  */
14202       }
14203 
14204       /* "tables/indexesextension.pyx":399
14205  *                 swap_bytes(ipr, ipm, ts)
14206  *
14207  *             if strncmp(pm, pl, ss) < 0:             # <<<<<<<<<<<<<<
14208  *                 swap_bytes(pm, pl, ss)
14209  *                 swap_bytes(ipm, ipl, ts)
14210  */
14211       __pyx_t_1 = ((strncmp(__pyx_v_pm, __pyx_v_pl, __pyx_v_ss) < 0) != 0);
14212       if (__pyx_t_1) {
14213 
14214         /* "tables/indexesextension.pyx":400
14215  *
14216  *             if strncmp(pm, pl, ss) < 0:
14217  *                 swap_bytes(pm, pl, ss)             # <<<<<<<<<<<<<<
14218  *                 swap_bytes(ipm, ipl, ts)
14219  *
14220  */
14221         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_pm, __pyx_v_pl, __pyx_v_ss);
14222 
14223         /* "tables/indexesextension.pyx":401
14224  *             if strncmp(pm, pl, ss) < 0:
14225  *                 swap_bytes(pm, pl, ss)
14226  *                 swap_bytes(ipm, ipl, ts)             # <<<<<<<<<<<<<<
14227  *
14228  *             memcpy(vp, pm, ss)
14229  */
14230         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipl, __pyx_v_ts);
14231 
14232         /* "tables/indexesextension.pyx":399
14233  *                 swap_bytes(ipr, ipm, ts)
14234  *
14235  *             if strncmp(pm, pl, ss) < 0:             # <<<<<<<<<<<<<<
14236  *                 swap_bytes(pm, pl, ss)
14237  *                 swap_bytes(ipm, ipl, ts)
14238  */
14239       }
14240 
14241       /* "tables/indexesextension.pyx":403
14242  *                 swap_bytes(ipm, ipl, ts)
14243  *
14244  *             memcpy(vp, pm, ss)             # <<<<<<<<<<<<<<
14245  *
14246  *             pi = pl
14247  */
14248       (void)(memcpy(__pyx_v_vp, __pyx_v_pm, __pyx_v_ss));
14249 
14250       /* "tables/indexesextension.pyx":405
14251  *             memcpy(vp, pm, ss)
14252  *
14253  *             pi = pl             # <<<<<<<<<<<<<<
14254  *             ipi = ipl
14255  *
14256  */
14257       __pyx_v_pi = __pyx_v_pl;
14258 
14259       /* "tables/indexesextension.pyx":406
14260  *
14261  *             pi = pl
14262  *             ipi = ipl             # <<<<<<<<<<<<<<
14263  *
14264  *             pj = pr - ss
14265  */
14266       __pyx_v_ipi = __pyx_v_ipl;
14267 
14268       /* "tables/indexesextension.pyx":408
14269  *             ipi = ipl
14270  *
14271  *             pj = pr - ss             # <<<<<<<<<<<<<<
14272  *             ipj = ipr - ts
14273  *
14274  */
14275       __pyx_v_pj = (__pyx_v_pr - __pyx_v_ss);
14276 
14277       /* "tables/indexesextension.pyx":409
14278  *
14279  *             pj = pr - ss
14280  *             ipj = ipr - ts             # <<<<<<<<<<<<<<
14281  *
14282  *             swap_bytes(pm, pj, ss)
14283  */
14284       __pyx_v_ipj = (__pyx_v_ipr - __pyx_v_ts);
14285 
14286       /* "tables/indexesextension.pyx":411
14287  *             ipj = ipr - ts
14288  *
14289  *             swap_bytes(pm, pj, ss)             # <<<<<<<<<<<<<<
14290  *             swap_bytes(ipm, ipj, ts)
14291  *
14292  */
14293       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_pm, __pyx_v_pj, __pyx_v_ss);
14294 
14295       /* "tables/indexesextension.pyx":412
14296  *
14297  *             swap_bytes(pm, pj, ss)
14298  *             swap_bytes(ipm, ipj, ts)             # <<<<<<<<<<<<<<
14299  *
14300  *             while True:
14301  */
14302       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipm, __pyx_v_ipj, __pyx_v_ts);
14303 
14304       /* "tables/indexesextension.pyx":414
14305  *             swap_bytes(ipm, ipj, ts)
14306  *
14307  *             while True:             # <<<<<<<<<<<<<<
14308  *                 pi += ss
14309  *                 ipi += ts
14310  */
14311       while (1) {
14312 
14313         /* "tables/indexesextension.pyx":415
14314  *
14315  *             while True:
14316  *                 pi += ss             # <<<<<<<<<<<<<<
14317  *                 ipi += ts
14318  *                 while strncmp(pi, vp, ss) < 0:
14319  */
14320         __pyx_v_pi = (__pyx_v_pi + __pyx_v_ss);
14321 
14322         /* "tables/indexesextension.pyx":416
14323  *             while True:
14324  *                 pi += ss
14325  *                 ipi += ts             # <<<<<<<<<<<<<<
14326  *                 while strncmp(pi, vp, ss) < 0:
14327  *                     pi += ss
14328  */
14329         __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_ts);
14330 
14331         /* "tables/indexesextension.pyx":417
14332  *                 pi += ss
14333  *                 ipi += ts
14334  *                 while strncmp(pi, vp, ss) < 0:             # <<<<<<<<<<<<<<
14335  *                     pi += ss
14336  *                     ipi += ts
14337  */
14338         while (1) {
14339           __pyx_t_1 = ((strncmp(__pyx_v_pi, __pyx_v_vp, __pyx_v_ss) < 0) != 0);
14340           if (!__pyx_t_1) break;
14341 
14342           /* "tables/indexesextension.pyx":418
14343  *                 ipi += ts
14344  *                 while strncmp(pi, vp, ss) < 0:
14345  *                     pi += ss             # <<<<<<<<<<<<<<
14346  *                     ipi += ts
14347  *
14348  */
14349           __pyx_v_pi = (__pyx_v_pi + __pyx_v_ss);
14350 
14351           /* "tables/indexesextension.pyx":419
14352  *                 while strncmp(pi, vp, ss) < 0:
14353  *                     pi += ss
14354  *                     ipi += ts             # <<<<<<<<<<<<<<
14355  *
14356  *                 pj -= ss
14357  */
14358           __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_ts);
14359         }
14360 
14361         /* "tables/indexesextension.pyx":421
14362  *                     ipi += ts
14363  *
14364  *                 pj -= ss             # <<<<<<<<<<<<<<
14365  *                 ipj -= ts
14366  *                 while strncmp(vp, pj, ss) < 0:
14367  */
14368         __pyx_v_pj = (__pyx_v_pj - __pyx_v_ss);
14369 
14370         /* "tables/indexesextension.pyx":422
14371  *
14372  *                 pj -= ss
14373  *                 ipj -= ts             # <<<<<<<<<<<<<<
14374  *                 while strncmp(vp, pj, ss) < 0:
14375  *                     pj -= ss
14376  */
14377         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_ts);
14378 
14379         /* "tables/indexesextension.pyx":423
14380  *                 pj -= ss
14381  *                 ipj -= ts
14382  *                 while strncmp(vp, pj, ss) < 0:             # <<<<<<<<<<<<<<
14383  *                     pj -= ss
14384  *                     ipj -= ts
14385  */
14386         while (1) {
14387           __pyx_t_1 = ((strncmp(__pyx_v_vp, __pyx_v_pj, __pyx_v_ss) < 0) != 0);
14388           if (!__pyx_t_1) break;
14389 
14390           /* "tables/indexesextension.pyx":424
14391  *                 ipj -= ts
14392  *                 while strncmp(vp, pj, ss) < 0:
14393  *                     pj -= ss             # <<<<<<<<<<<<<<
14394  *                     ipj -= ts
14395  *
14396  */
14397           __pyx_v_pj = (__pyx_v_pj - __pyx_v_ss);
14398 
14399           /* "tables/indexesextension.pyx":425
14400  *                 while strncmp(vp, pj, ss) < 0:
14401  *                     pj -= ss
14402  *                     ipj -= ts             # <<<<<<<<<<<<<<
14403  *
14404  *                 if pi >= pj:
14405  */
14406           __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_ts);
14407         }
14408 
14409         /* "tables/indexesextension.pyx":427
14410  *                     ipj -= ts
14411  *
14412  *                 if pi >= pj:             # <<<<<<<<<<<<<<
14413  *                     break
14414  *
14415  */
14416         __pyx_t_1 = ((__pyx_v_pi >= __pyx_v_pj) != 0);
14417         if (__pyx_t_1) {
14418 
14419           /* "tables/indexesextension.pyx":428
14420  *
14421  *                 if pi >= pj:
14422  *                     break             # <<<<<<<<<<<<<<
14423  *
14424  *                 swap_bytes(pi, pj, ss)
14425  */
14426           goto __pyx_L11_break;
14427 
14428           /* "tables/indexesextension.pyx":427
14429  *                     ipj -= ts
14430  *
14431  *                 if pi >= pj:             # <<<<<<<<<<<<<<
14432  *                     break
14433  *
14434  */
14435         }
14436 
14437         /* "tables/indexesextension.pyx":430
14438  *                     break
14439  *
14440  *                 swap_bytes(pi, pj, ss)             # <<<<<<<<<<<<<<
14441  *                 swap_bytes(ipi, ipj, ts)
14442  *
14443  */
14444         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_pi, __pyx_v_pj, __pyx_v_ss);
14445 
14446         /* "tables/indexesextension.pyx":431
14447  *
14448  *                 swap_bytes(pi, pj, ss)
14449  *                 swap_bytes(ipi, ipj, ts)             # <<<<<<<<<<<<<<
14450  *
14451  *             swap_bytes(pi, pr-ss, ss)
14452  */
14453         __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, __pyx_v_ipj, __pyx_v_ts);
14454       }
14455       __pyx_L11_break:;
14456 
14457       /* "tables/indexesextension.pyx":433
14458  *                 swap_bytes(ipi, ipj, ts)
14459  *
14460  *             swap_bytes(pi, pr-ss, ss)             # <<<<<<<<<<<<<<
14461  *             swap_bytes(ipi, ipr-ts, ts)
14462  *
14463  */
14464       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_pi, (__pyx_v_pr - __pyx_v_ss), __pyx_v_ss);
14465 
14466       /* "tables/indexesextension.pyx":434
14467  *
14468  *             swap_bytes(pi, pr-ss, ss)
14469  *             swap_bytes(ipi, ipr-ts, ts)             # <<<<<<<<<<<<<<
14470  *
14471  *             # push largest partition on stack and proceed with the other
14472  */
14473       __pyx_f_6tables_16indexesextension_swap_bytes(__pyx_v_ipi, (__pyx_v_ipr - __pyx_v_ts), __pyx_v_ts);
14474 
14475       /* "tables/indexesextension.pyx":437
14476  *
14477  *             # push largest partition on stack and proceed with the other
14478  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
14479  *                 sptr[0] = pi + ss
14480  *                 sptr[1] = pr
14481  */
14482       __pyx_t_1 = (((__pyx_v_pi - __pyx_v_pl) < (__pyx_v_pr - __pyx_v_pi)) != 0);
14483       if (__pyx_t_1) {
14484 
14485         /* "tables/indexesextension.pyx":438
14486  *             # push largest partition on stack and proceed with the other
14487  *             if (pi - pl) < (pr - pi):
14488  *                 sptr[0] = pi + ss             # <<<<<<<<<<<<<<
14489  *                 sptr[1] = pr
14490  *                 sptr += 2
14491  */
14492         (__pyx_v_sptr[0]) = (__pyx_v_pi + __pyx_v_ss);
14493 
14494         /* "tables/indexesextension.pyx":439
14495  *             if (pi - pl) < (pr - pi):
14496  *                 sptr[0] = pi + ss
14497  *                 sptr[1] = pr             # <<<<<<<<<<<<<<
14498  *                 sptr += 2
14499  *
14500  */
14501         (__pyx_v_sptr[1]) = __pyx_v_pr;
14502 
14503         /* "tables/indexesextension.pyx":440
14504  *                 sptr[0] = pi + ss
14505  *                 sptr[1] = pr
14506  *                 sptr += 2             # <<<<<<<<<<<<<<
14507  *
14508  *                 isptr[0] = ipi + ts
14509  */
14510         __pyx_v_sptr = (__pyx_v_sptr + 2);
14511 
14512         /* "tables/indexesextension.pyx":442
14513  *                 sptr += 2
14514  *
14515  *                 isptr[0] = ipi + ts             # <<<<<<<<<<<<<<
14516  *                 isptr[1] = ipr
14517  *                 isptr += 2
14518  */
14519         (__pyx_v_isptr[0]) = (__pyx_v_ipi + __pyx_v_ts);
14520 
14521         /* "tables/indexesextension.pyx":443
14522  *
14523  *                 isptr[0] = ipi + ts
14524  *                 isptr[1] = ipr             # <<<<<<<<<<<<<<
14525  *                 isptr += 2
14526  *
14527  */
14528         (__pyx_v_isptr[1]) = __pyx_v_ipr;
14529 
14530         /* "tables/indexesextension.pyx":444
14531  *                 isptr[0] = ipi + ts
14532  *                 isptr[1] = ipr
14533  *                 isptr += 2             # <<<<<<<<<<<<<<
14534  *
14535  *                 pr = pi - ss
14536  */
14537         __pyx_v_isptr = (__pyx_v_isptr + 2);
14538 
14539         /* "tables/indexesextension.pyx":446
14540  *                 isptr += 2
14541  *
14542  *                 pr = pi - ss             # <<<<<<<<<<<<<<
14543  *                 ipr = ipi - ts
14544  *             else:
14545  */
14546         __pyx_v_pr = (__pyx_v_pi - __pyx_v_ss);
14547 
14548         /* "tables/indexesextension.pyx":447
14549  *
14550  *                 pr = pi - ss
14551  *                 ipr = ipi - ts             # <<<<<<<<<<<<<<
14552  *             else:
14553  *                 sptr[0] = pl
14554  */
14555         __pyx_v_ipr = (__pyx_v_ipi - __pyx_v_ts);
14556 
14557         /* "tables/indexesextension.pyx":437
14558  *
14559  *             # push largest partition on stack and proceed with the other
14560  *             if (pi - pl) < (pr - pi):             # <<<<<<<<<<<<<<
14561  *                 sptr[0] = pi + ss
14562  *                 sptr[1] = pr
14563  */
14564         goto __pyx_L17;
14565       }
14566 
14567       /* "tables/indexesextension.pyx":449
14568  *                 ipr = ipi - ts
14569  *             else:
14570  *                 sptr[0] = pl             # <<<<<<<<<<<<<<
14571  *                 sptr[1] = pi - ss
14572  *                 sptr += 2
14573  */
14574       /*else*/ {
14575         (__pyx_v_sptr[0]) = __pyx_v_pl;
14576 
14577         /* "tables/indexesextension.pyx":450
14578  *             else:
14579  *                 sptr[0] = pl
14580  *                 sptr[1] = pi - ss             # <<<<<<<<<<<<<<
14581  *                 sptr += 2
14582  *
14583  */
14584         (__pyx_v_sptr[1]) = (__pyx_v_pi - __pyx_v_ss);
14585 
14586         /* "tables/indexesextension.pyx":451
14587  *                 sptr[0] = pl
14588  *                 sptr[1] = pi - ss
14589  *                 sptr += 2             # <<<<<<<<<<<<<<
14590  *
14591  *                 isptr[0] = ipl
14592  */
14593         __pyx_v_sptr = (__pyx_v_sptr + 2);
14594 
14595         /* "tables/indexesextension.pyx":453
14596  *                 sptr += 2
14597  *
14598  *                 isptr[0] = ipl             # <<<<<<<<<<<<<<
14599  *                 isptr[1] = ipi - ts
14600  *                 isptr += 2
14601  */
14602         (__pyx_v_isptr[0]) = __pyx_v_ipl;
14603 
14604         /* "tables/indexesextension.pyx":454
14605  *
14606  *                 isptr[0] = ipl
14607  *                 isptr[1] = ipi - ts             # <<<<<<<<<<<<<<
14608  *                 isptr += 2
14609  *
14610  */
14611         (__pyx_v_isptr[1]) = (__pyx_v_ipi - __pyx_v_ts);
14612 
14613         /* "tables/indexesextension.pyx":455
14614  *                 isptr[0] = ipl
14615  *                 isptr[1] = ipi - ts
14616  *                 isptr += 2             # <<<<<<<<<<<<<<
14617  *
14618  *                 pl = pi + ss
14619  */
14620         __pyx_v_isptr = (__pyx_v_isptr + 2);
14621 
14622         /* "tables/indexesextension.pyx":457
14623  *                 isptr += 2
14624  *
14625  *                 pl = pi + ss             # <<<<<<<<<<<<<<
14626  *                 ipl = ipi + ts
14627  *
14628  */
14629         __pyx_v_pl = (__pyx_v_pi + __pyx_v_ss);
14630 
14631         /* "tables/indexesextension.pyx":458
14632  *
14633  *                 pl = pi + ss
14634  *                 ipl = ipi + ts             # <<<<<<<<<<<<<<
14635  *
14636  *         pi = pl + ss
14637  */
14638         __pyx_v_ipl = (__pyx_v_ipi + __pyx_v_ts);
14639       }
14640       __pyx_L17:;
14641     }
14642 
14643     /* "tables/indexesextension.pyx":460
14644  *                 ipl = ipi + ts
14645  *
14646  *         pi = pl + ss             # <<<<<<<<<<<<<<
14647  *         ipi = ipl + ts
14648  *
14649  */
14650     __pyx_v_pi = (__pyx_v_pl + __pyx_v_ss);
14651 
14652     /* "tables/indexesextension.pyx":461
14653  *
14654  *         pi = pl + ss
14655  *         ipi = ipl + ts             # <<<<<<<<<<<<<<
14656  *
14657  *         while pi <= pr:
14658  */
14659     __pyx_v_ipi = (__pyx_v_ipl + __pyx_v_ts);
14660 
14661     /* "tables/indexesextension.pyx":463
14662  *         ipi = ipl + ts
14663  *
14664  *         while pi <= pr:             # <<<<<<<<<<<<<<
14665  *             memcpy(vp, pi, ss)
14666  *             memcpy(ivp, ipi, ts)
14667  */
14668     while (1) {
14669       __pyx_t_1 = ((__pyx_v_pi <= __pyx_v_pr) != 0);
14670       if (!__pyx_t_1) break;
14671 
14672       /* "tables/indexesextension.pyx":464
14673  *
14674  *         while pi <= pr:
14675  *             memcpy(vp, pi, ss)             # <<<<<<<<<<<<<<
14676  *             memcpy(ivp, ipi, ts)
14677  *
14678  */
14679       (void)(memcpy(__pyx_v_vp, __pyx_v_pi, __pyx_v_ss));
14680 
14681       /* "tables/indexesextension.pyx":465
14682  *         while pi <= pr:
14683  *             memcpy(vp, pi, ss)
14684  *             memcpy(ivp, ipi, ts)             # <<<<<<<<<<<<<<
14685  *
14686  *             pj = pi
14687  */
14688       (void)(memcpy(__pyx_v_ivp, __pyx_v_ipi, __pyx_v_ts));
14689 
14690       /* "tables/indexesextension.pyx":467
14691  *             memcpy(ivp, ipi, ts)
14692  *
14693  *             pj = pi             # <<<<<<<<<<<<<<
14694  *             pt = pi - ss
14695  *
14696  */
14697       __pyx_v_pj = __pyx_v_pi;
14698 
14699       /* "tables/indexesextension.pyx":468
14700  *
14701  *             pj = pi
14702  *             pt = pi - ss             # <<<<<<<<<<<<<<
14703  *
14704  *             ipj = ipi
14705  */
14706       __pyx_v_pt = (__pyx_v_pi - __pyx_v_ss);
14707 
14708       /* "tables/indexesextension.pyx":470
14709  *             pt = pi - ss
14710  *
14711  *             ipj = ipi             # <<<<<<<<<<<<<<
14712  *             ipt = ipi - ts
14713  *
14714  */
14715       __pyx_v_ipj = __pyx_v_ipi;
14716 
14717       /* "tables/indexesextension.pyx":471
14718  *
14719  *             ipj = ipi
14720  *             ipt = ipi - ts             # <<<<<<<<<<<<<<
14721  *
14722  *             while pj > pl and strncmp(vp, pt, ss) < 0:
14723  */
14724       __pyx_v_ipt = (__pyx_v_ipi - __pyx_v_ts);
14725 
14726       /* "tables/indexesextension.pyx":473
14727  *             ipt = ipi - ts
14728  *
14729  *             while pj > pl and strncmp(vp, pt, ss) < 0:             # <<<<<<<<<<<<<<
14730  *                 memcpy(pj, pt, ss)
14731  *                 pj -= ss
14732  */
14733       while (1) {
14734         __pyx_t_2 = ((__pyx_v_pj > __pyx_v_pl) != 0);
14735         if (__pyx_t_2) {
14736         } else {
14737           __pyx_t_1 = __pyx_t_2;
14738           goto __pyx_L22_bool_binop_done;
14739         }
14740         __pyx_t_2 = ((strncmp(__pyx_v_vp, __pyx_v_pt, __pyx_v_ss) < 0) != 0);
14741         __pyx_t_1 = __pyx_t_2;
14742         __pyx_L22_bool_binop_done:;
14743         if (!__pyx_t_1) break;
14744 
14745         /* "tables/indexesextension.pyx":474
14746  *
14747  *             while pj > pl and strncmp(vp, pt, ss) < 0:
14748  *                 memcpy(pj, pt, ss)             # <<<<<<<<<<<<<<
14749  *                 pj -= ss
14750  *                 pt -= ss
14751  */
14752         (void)(memcpy(__pyx_v_pj, __pyx_v_pt, __pyx_v_ss));
14753 
14754         /* "tables/indexesextension.pyx":475
14755  *             while pj > pl and strncmp(vp, pt, ss) < 0:
14756  *                 memcpy(pj, pt, ss)
14757  *                 pj -= ss             # <<<<<<<<<<<<<<
14758  *                 pt -= ss
14759  *
14760  */
14761         __pyx_v_pj = (__pyx_v_pj - __pyx_v_ss);
14762 
14763         /* "tables/indexesextension.pyx":476
14764  *                 memcpy(pj, pt, ss)
14765  *                 pj -= ss
14766  *                 pt -= ss             # <<<<<<<<<<<<<<
14767  *
14768  *                 memcpy(ipj, ipt, ts)
14769  */
14770         __pyx_v_pt = (__pyx_v_pt - __pyx_v_ss);
14771 
14772         /* "tables/indexesextension.pyx":478
14773  *                 pt -= ss
14774  *
14775  *                 memcpy(ipj, ipt, ts)             # <<<<<<<<<<<<<<
14776  *                 ipj -= ts
14777  *                 ipt -= ts
14778  */
14779         (void)(memcpy(__pyx_v_ipj, __pyx_v_ipt, __pyx_v_ts));
14780 
14781         /* "tables/indexesextension.pyx":479
14782  *
14783  *                 memcpy(ipj, ipt, ts)
14784  *                 ipj -= ts             # <<<<<<<<<<<<<<
14785  *                 ipt -= ts
14786  *
14787  */
14788         __pyx_v_ipj = (__pyx_v_ipj - __pyx_v_ts);
14789 
14790         /* "tables/indexesextension.pyx":480
14791  *                 memcpy(ipj, ipt, ts)
14792  *                 ipj -= ts
14793  *                 ipt -= ts             # <<<<<<<<<<<<<<
14794  *
14795  *             memcpy(pj, vp, ss)
14796  */
14797         __pyx_v_ipt = (__pyx_v_ipt - __pyx_v_ts);
14798       }
14799 
14800       /* "tables/indexesextension.pyx":482
14801  *                 ipt -= ts
14802  *
14803  *             memcpy(pj, vp, ss)             # <<<<<<<<<<<<<<
14804  *             memcpy(ipj, ivp, ts)
14805  *
14806  */
14807       (void)(memcpy(__pyx_v_pj, __pyx_v_vp, __pyx_v_ss));
14808 
14809       /* "tables/indexesextension.pyx":483
14810  *
14811  *             memcpy(pj, vp, ss)
14812  *             memcpy(ipj, ivp, ts)             # <<<<<<<<<<<<<<
14813  *
14814  *             pi += ss
14815  */
14816       (void)(memcpy(__pyx_v_ipj, __pyx_v_ivp, __pyx_v_ts));
14817 
14818       /* "tables/indexesextension.pyx":485
14819  *             memcpy(ipj, ivp, ts)
14820  *
14821  *             pi += ss             # <<<<<<<<<<<<<<
14822  *             ipi += ts
14823  *
14824  */
14825       __pyx_v_pi = (__pyx_v_pi + __pyx_v_ss);
14826 
14827       /* "tables/indexesextension.pyx":486
14828  *
14829  *             pi += ss
14830  *             ipi += ts             # <<<<<<<<<<<<<<
14831  *
14832  *         if sptr == stack:
14833  */
14834       __pyx_v_ipi = (__pyx_v_ipi + __pyx_v_ts);
14835     }
14836 
14837     /* "tables/indexesextension.pyx":488
14838  *             ipi += ts
14839  *
14840  *         if sptr == stack:             # <<<<<<<<<<<<<<
14841  *             break
14842  *
14843  */
14844     __pyx_t_1 = ((__pyx_v_sptr == __pyx_v_stack) != 0);
14845     if (__pyx_t_1) {
14846 
14847       /* "tables/indexesextension.pyx":489
14848  *
14849  *         if sptr == stack:
14850  *             break             # <<<<<<<<<<<<<<
14851  *
14852  *         sptr -= 2
14853  */
14854       goto __pyx_L4_break;
14855 
14856       /* "tables/indexesextension.pyx":488
14857  *             ipi += ts
14858  *
14859  *         if sptr == stack:             # <<<<<<<<<<<<<<
14860  *             break
14861  *
14862  */
14863     }
14864 
14865     /* "tables/indexesextension.pyx":491
14866  *             break
14867  *
14868  *         sptr -= 2             # <<<<<<<<<<<<<<
14869  *         pl = sptr[0]
14870  *         pr = sptr[1]
14871  */
14872     __pyx_v_sptr = (__pyx_v_sptr - 2);
14873 
14874     /* "tables/indexesextension.pyx":492
14875  *
14876  *         sptr -= 2
14877  *         pl = sptr[0]             # <<<<<<<<<<<<<<
14878  *         pr = sptr[1]
14879  *
14880  */
14881     __pyx_v_pl = (__pyx_v_sptr[0]);
14882 
14883     /* "tables/indexesextension.pyx":493
14884  *         sptr -= 2
14885  *         pl = sptr[0]
14886  *         pr = sptr[1]             # <<<<<<<<<<<<<<
14887  *
14888  *         isptr -= 2
14889  */
14890     __pyx_v_pr = (__pyx_v_sptr[1]);
14891 
14892     /* "tables/indexesextension.pyx":495
14893  *         pr = sptr[1]
14894  *
14895  *         isptr -= 2             # <<<<<<<<<<<<<<
14896  *         ipl = isptr[0]
14897  *         ipr = isptr[1]
14898  */
14899     __pyx_v_isptr = (__pyx_v_isptr - 2);
14900 
14901     /* "tables/indexesextension.pyx":496
14902  *
14903  *         isptr -= 2
14904  *         ipl = isptr[0]             # <<<<<<<<<<<<<<
14905  *         ipr = isptr[1]
14906  *
14907  */
14908     __pyx_v_ipl = (__pyx_v_isptr[0]);
14909 
14910     /* "tables/indexesextension.pyx":497
14911  *         isptr -= 2
14912  *         ipl = isptr[0]
14913  *         ipr = isptr[1]             # <<<<<<<<<<<<<<
14914  *
14915  *     free(vp)
14916  */
14917     __pyx_v_ipr = (__pyx_v_isptr[1]);
14918   }
14919   __pyx_L4_break:;
14920 
14921   /* "tables/indexesextension.pyx":499
14922  *         ipr = isptr[1]
14923  *
14924  *     free(vp)             # <<<<<<<<<<<<<<
14925  *     free(ivp)
14926  *
14927  */
14928   free(__pyx_v_vp);
14929 
14930   /* "tables/indexesextension.pyx":500
14931  *
14932  *     free(vp)
14933  *     free(ivp)             # <<<<<<<<<<<<<<
14934  *
14935  * #---------------------------------------------------------------------------
14936  */
14937   free(__pyx_v_ivp);
14938 
14939   /* "tables/indexesextension.pyx":358
14940  *
14941  * @cython.cdivision(True)
14942  * cdef void _keysort_string(char* start1, size_t ss, char* start2, size_t ts, size_t n) nogil:             # <<<<<<<<<<<<<<
14943  *     cdef char *pl = start1
14944  *     cdef char *pr = start1 + (n - 1) * ss
14945  */
14946 
14947   /* function exit code */
14948 }
14949 
14950 /* "tables/indexesextension.pyx":510
14951  * # because I forsee that this should be a very common case.
14952  * # 2004-05-20
14953  * def _bisect_left(a, x, int hi):             # <<<<<<<<<<<<<<
14954  *   """Return the index where to insert item x in list a, assuming a is sorted.
14955  *
14956  */
14957 
14958 /* Python wrapper */
14959 static PyObject *__pyx_pw_6tables_16indexesextension_3_bisect_left(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14960 static char __pyx_doc_6tables_16indexesextension_2_bisect_left[] = "Return the index where to insert item x in list a, assuming a is sorted.\n\n  The return value i is such that all e in a[:i] have e < x, and all e in\n  a[i:] have e >= x.  So if x already appears in the list, i points just\n  before the leftmost x already there.\n\n  ";
14961 static PyMethodDef __pyx_mdef_6tables_16indexesextension_3_bisect_left = {"_bisect_left", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_3_bisect_left, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_16indexesextension_2_bisect_left};
__pyx_pw_6tables_16indexesextension_3_bisect_left(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)14962 static PyObject *__pyx_pw_6tables_16indexesextension_3_bisect_left(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14963   PyObject *__pyx_v_a = 0;
14964   PyObject *__pyx_v_x = 0;
14965   int __pyx_v_hi;
14966   PyObject *__pyx_r = 0;
14967   __Pyx_RefNannyDeclarations
14968   __Pyx_RefNannySetupContext("_bisect_left (wrapper)", 0);
14969   {
14970     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_x,&__pyx_n_s_hi,0};
14971     PyObject* values[3] = {0,0,0};
14972     if (unlikely(__pyx_kwds)) {
14973       Py_ssize_t kw_args;
14974       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14975       switch (pos_args) {
14976         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14977         CYTHON_FALLTHROUGH;
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_a)) != 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_x)) != 0)) kw_args--;
14993         else {
14994           __Pyx_RaiseArgtupleInvalid("_bisect_left", 1, 3, 3, 1); __PYX_ERR(0, 510, __pyx_L3_error)
14995         }
14996         CYTHON_FALLTHROUGH;
14997         case  2:
14998         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--;
14999         else {
15000           __Pyx_RaiseArgtupleInvalid("_bisect_left", 1, 3, 3, 2); __PYX_ERR(0, 510, __pyx_L3_error)
15001         }
15002       }
15003       if (unlikely(kw_args > 0)) {
15004         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_bisect_left") < 0)) __PYX_ERR(0, 510, __pyx_L3_error)
15005       }
15006     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15007       goto __pyx_L5_argtuple_error;
15008     } else {
15009       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15010       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15011       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15012     }
15013     __pyx_v_a = values[0];
15014     __pyx_v_x = values[1];
15015     __pyx_v_hi = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_hi == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L3_error)
15016   }
15017   goto __pyx_L4_argument_unpacking_done;
15018   __pyx_L5_argtuple_error:;
15019   __Pyx_RaiseArgtupleInvalid("_bisect_left", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 510, __pyx_L3_error)
15020   __pyx_L3_error:;
15021   __Pyx_AddTraceback("tables.indexesextension._bisect_left", __pyx_clineno, __pyx_lineno, __pyx_filename);
15022   __Pyx_RefNannyFinishContext();
15023   return NULL;
15024   __pyx_L4_argument_unpacking_done:;
15025   __pyx_r = __pyx_pf_6tables_16indexesextension_2_bisect_left(__pyx_self, __pyx_v_a, __pyx_v_x, __pyx_v_hi);
15026 
15027   /* function exit code */
15028   __Pyx_RefNannyFinishContext();
15029   return __pyx_r;
15030 }
15031 
__pyx_pf_6tables_16indexesextension_2_bisect_left(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v_a,PyObject * __pyx_v_x,int __pyx_v_hi)15032 static PyObject *__pyx_pf_6tables_16indexesextension_2_bisect_left(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_x, int __pyx_v_hi) {
15033   int __pyx_v_lo;
15034   int __pyx_v_mid;
15035   PyObject *__pyx_r = NULL;
15036   __Pyx_RefNannyDeclarations
15037   PyObject *__pyx_t_1 = NULL;
15038   PyObject *__pyx_t_2 = NULL;
15039   int __pyx_t_3;
15040   __Pyx_RefNannySetupContext("_bisect_left", 0);
15041 
15042   /* "tables/indexesextension.pyx":521
15043  *   cdef int lo, mid
15044  *
15045  *   lo = 0             # <<<<<<<<<<<<<<
15046  *   if x <= a[0]: return 0
15047  *   if a[-1] < x: return hi
15048  */
15049   __pyx_v_lo = 0;
15050 
15051   /* "tables/indexesextension.pyx":522
15052  *
15053  *   lo = 0
15054  *   if x <= a[0]: return 0             # <<<<<<<<<<<<<<
15055  *   if a[-1] < x: return hi
15056  *   while lo < hi:
15057  */
15058   __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
15059   __Pyx_GOTREF(__pyx_t_1);
15060   __pyx_t_2 = PyObject_RichCompare(__pyx_v_x, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
15061   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15062   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 522, __pyx_L1_error)
15063   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15064   if (__pyx_t_3) {
15065     __Pyx_XDECREF(__pyx_r);
15066     __Pyx_INCREF(__pyx_int_0);
15067     __pyx_r = __pyx_int_0;
15068     goto __pyx_L0;
15069   }
15070 
15071   /* "tables/indexesextension.pyx":523
15072  *   lo = 0
15073  *   if x <= a[0]: return 0
15074  *   if a[-1] < x: return hi             # <<<<<<<<<<<<<<
15075  *   while lo < hi:
15076  *       mid = (lo+hi)/2
15077  */
15078   __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
15079   __Pyx_GOTREF(__pyx_t_2);
15080   __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_x, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
15081   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15082   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
15083   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15084   if (__pyx_t_3) {
15085     __Pyx_XDECREF(__pyx_r);
15086     __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
15087     __Pyx_GOTREF(__pyx_t_1);
15088     __pyx_r = __pyx_t_1;
15089     __pyx_t_1 = 0;
15090     goto __pyx_L0;
15091   }
15092 
15093   /* "tables/indexesextension.pyx":524
15094  *   if x <= a[0]: return 0
15095  *   if a[-1] < x: return hi
15096  *   while lo < hi:             # <<<<<<<<<<<<<<
15097  *       mid = (lo+hi)/2
15098  *       if a[mid] < x: lo = mid+1
15099  */
15100   while (1) {
15101     __pyx_t_3 = ((__pyx_v_lo < __pyx_v_hi) != 0);
15102     if (!__pyx_t_3) break;
15103 
15104     /* "tables/indexesextension.pyx":525
15105  *   if a[-1] < x: return hi
15106  *   while lo < hi:
15107  *       mid = (lo+hi)/2             # <<<<<<<<<<<<<<
15108  *       if a[mid] < x: lo = mid+1
15109  *       else: hi = mid
15110  */
15111     __pyx_v_mid = __Pyx_div_long((__pyx_v_lo + __pyx_v_hi), 2);
15112 
15113     /* "tables/indexesextension.pyx":526
15114  *   while lo < hi:
15115  *       mid = (lo+hi)/2
15116  *       if a[mid] < x: lo = mid+1             # <<<<<<<<<<<<<<
15117  *       else: hi = mid
15118  *   return lo
15119  */
15120     __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, __pyx_v_mid, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
15121     __Pyx_GOTREF(__pyx_t_1);
15122     __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_x, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
15123     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15124     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 526, __pyx_L1_error)
15125     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15126     if (__pyx_t_3) {
15127       __pyx_v_lo = (__pyx_v_mid + 1);
15128       goto __pyx_L7;
15129     }
15130 
15131     /* "tables/indexesextension.pyx":527
15132  *       mid = (lo+hi)/2
15133  *       if a[mid] < x: lo = mid+1
15134  *       else: hi = mid             # <<<<<<<<<<<<<<
15135  *   return lo
15136  *
15137  */
15138     /*else*/ {
15139       __pyx_v_hi = __pyx_v_mid;
15140     }
15141     __pyx_L7:;
15142   }
15143 
15144   /* "tables/indexesextension.pyx":528
15145  *       if a[mid] < x: lo = mid+1
15146  *       else: hi = mid
15147  *   return lo             # <<<<<<<<<<<<<<
15148  *
15149  *
15150  */
15151   __Pyx_XDECREF(__pyx_r);
15152   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_lo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error)
15153   __Pyx_GOTREF(__pyx_t_2);
15154   __pyx_r = __pyx_t_2;
15155   __pyx_t_2 = 0;
15156   goto __pyx_L0;
15157 
15158   /* "tables/indexesextension.pyx":510
15159  * # because I forsee that this should be a very common case.
15160  * # 2004-05-20
15161  * def _bisect_left(a, x, int hi):             # <<<<<<<<<<<<<<
15162  *   """Return the index where to insert item x in list a, assuming a is sorted.
15163  *
15164  */
15165 
15166   /* function exit code */
15167   __pyx_L1_error:;
15168   __Pyx_XDECREF(__pyx_t_1);
15169   __Pyx_XDECREF(__pyx_t_2);
15170   __Pyx_AddTraceback("tables.indexesextension._bisect_left", __pyx_clineno, __pyx_lineno, __pyx_filename);
15171   __pyx_r = NULL;
15172   __pyx_L0:;
15173   __Pyx_XGIVEREF(__pyx_r);
15174   __Pyx_RefNannyFinishContext();
15175   return __pyx_r;
15176 }
15177 
15178 /* "tables/indexesextension.pyx":531
15179  *
15180  *
15181  * def _bisect_right(a, x, int hi):             # <<<<<<<<<<<<<<
15182  *   """Return the index where to insert item x in list a, assuming a is sorted.
15183  *
15184  */
15185 
15186 /* Python wrapper */
15187 static PyObject *__pyx_pw_6tables_16indexesextension_5_bisect_right(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15188 static char __pyx_doc_6tables_16indexesextension_4_bisect_right[] = "Return the index where to insert item x in list a, assuming a is sorted.\n\n  The return value i is such that all e in a[:i] have e <= x, and all e in\n  a[i:] have e > x.  So if x already appears in the list, i points just\n  beyond the rightmost x already there.\n\n  ";
15189 static PyMethodDef __pyx_mdef_6tables_16indexesextension_5_bisect_right = {"_bisect_right", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_5_bisect_right, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_16indexesextension_4_bisect_right};
__pyx_pw_6tables_16indexesextension_5_bisect_right(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)15190 static PyObject *__pyx_pw_6tables_16indexesextension_5_bisect_right(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15191   PyObject *__pyx_v_a = 0;
15192   PyObject *__pyx_v_x = 0;
15193   int __pyx_v_hi;
15194   PyObject *__pyx_r = 0;
15195   __Pyx_RefNannyDeclarations
15196   __Pyx_RefNannySetupContext("_bisect_right (wrapper)", 0);
15197   {
15198     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_x,&__pyx_n_s_hi,0};
15199     PyObject* values[3] = {0,0,0};
15200     if (unlikely(__pyx_kwds)) {
15201       Py_ssize_t kw_args;
15202       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15203       switch (pos_args) {
15204         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15205         CYTHON_FALLTHROUGH;
15206         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15207         CYTHON_FALLTHROUGH;
15208         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15209         CYTHON_FALLTHROUGH;
15210         case  0: break;
15211         default: goto __pyx_L5_argtuple_error;
15212       }
15213       kw_args = PyDict_Size(__pyx_kwds);
15214       switch (pos_args) {
15215         case  0:
15216         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
15217         else goto __pyx_L5_argtuple_error;
15218         CYTHON_FALLTHROUGH;
15219         case  1:
15220         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
15221         else {
15222           __Pyx_RaiseArgtupleInvalid("_bisect_right", 1, 3, 3, 1); __PYX_ERR(0, 531, __pyx_L3_error)
15223         }
15224         CYTHON_FALLTHROUGH;
15225         case  2:
15226         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hi)) != 0)) kw_args--;
15227         else {
15228           __Pyx_RaiseArgtupleInvalid("_bisect_right", 1, 3, 3, 2); __PYX_ERR(0, 531, __pyx_L3_error)
15229         }
15230       }
15231       if (unlikely(kw_args > 0)) {
15232         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_bisect_right") < 0)) __PYX_ERR(0, 531, __pyx_L3_error)
15233       }
15234     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15235       goto __pyx_L5_argtuple_error;
15236     } else {
15237       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15238       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15239       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15240     }
15241     __pyx_v_a = values[0];
15242     __pyx_v_x = values[1];
15243     __pyx_v_hi = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_hi == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 531, __pyx_L3_error)
15244   }
15245   goto __pyx_L4_argument_unpacking_done;
15246   __pyx_L5_argtuple_error:;
15247   __Pyx_RaiseArgtupleInvalid("_bisect_right", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 531, __pyx_L3_error)
15248   __pyx_L3_error:;
15249   __Pyx_AddTraceback("tables.indexesextension._bisect_right", __pyx_clineno, __pyx_lineno, __pyx_filename);
15250   __Pyx_RefNannyFinishContext();
15251   return NULL;
15252   __pyx_L4_argument_unpacking_done:;
15253   __pyx_r = __pyx_pf_6tables_16indexesextension_4_bisect_right(__pyx_self, __pyx_v_a, __pyx_v_x, __pyx_v_hi);
15254 
15255   /* function exit code */
15256   __Pyx_RefNannyFinishContext();
15257   return __pyx_r;
15258 }
15259 
__pyx_pf_6tables_16indexesextension_4_bisect_right(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v_a,PyObject * __pyx_v_x,int __pyx_v_hi)15260 static PyObject *__pyx_pf_6tables_16indexesextension_4_bisect_right(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_x, int __pyx_v_hi) {
15261   int __pyx_v_lo;
15262   int __pyx_v_mid;
15263   PyObject *__pyx_r = NULL;
15264   __Pyx_RefNannyDeclarations
15265   PyObject *__pyx_t_1 = NULL;
15266   PyObject *__pyx_t_2 = NULL;
15267   int __pyx_t_3;
15268   __Pyx_RefNannySetupContext("_bisect_right", 0);
15269 
15270   /* "tables/indexesextension.pyx":542
15271  *   cdef int lo, mid
15272  *
15273  *   lo = 0             # <<<<<<<<<<<<<<
15274  *   if x < a[0]: return 0
15275  *   if a[-1] <= x: return hi
15276  */
15277   __pyx_v_lo = 0;
15278 
15279   /* "tables/indexesextension.pyx":543
15280  *
15281  *   lo = 0
15282  *   if x < a[0]: return 0             # <<<<<<<<<<<<<<
15283  *   if a[-1] <= x: return hi
15284  *   while lo < hi:
15285  */
15286   __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
15287   __Pyx_GOTREF(__pyx_t_1);
15288   __pyx_t_2 = PyObject_RichCompare(__pyx_v_x, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
15289   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15290   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 543, __pyx_L1_error)
15291   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15292   if (__pyx_t_3) {
15293     __Pyx_XDECREF(__pyx_r);
15294     __Pyx_INCREF(__pyx_int_0);
15295     __pyx_r = __pyx_int_0;
15296     goto __pyx_L0;
15297   }
15298 
15299   /* "tables/indexesextension.pyx":544
15300  *   lo = 0
15301  *   if x < a[0]: return 0
15302  *   if a[-1] <= x: return hi             # <<<<<<<<<<<<<<
15303  *   while lo < hi:
15304  *     mid = (lo+hi)/2
15305  */
15306   __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
15307   __Pyx_GOTREF(__pyx_t_2);
15308   __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_x, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
15309   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15310   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 544, __pyx_L1_error)
15311   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15312   if (__pyx_t_3) {
15313     __Pyx_XDECREF(__pyx_r);
15314     __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_hi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
15315     __Pyx_GOTREF(__pyx_t_1);
15316     __pyx_r = __pyx_t_1;
15317     __pyx_t_1 = 0;
15318     goto __pyx_L0;
15319   }
15320 
15321   /* "tables/indexesextension.pyx":545
15322  *   if x < a[0]: return 0
15323  *   if a[-1] <= x: return hi
15324  *   while lo < hi:             # <<<<<<<<<<<<<<
15325  *     mid = (lo+hi)/2
15326  *     if x < a[mid]: hi = mid
15327  */
15328   while (1) {
15329     __pyx_t_3 = ((__pyx_v_lo < __pyx_v_hi) != 0);
15330     if (!__pyx_t_3) break;
15331 
15332     /* "tables/indexesextension.pyx":546
15333  *   if a[-1] <= x: return hi
15334  *   while lo < hi:
15335  *     mid = (lo+hi)/2             # <<<<<<<<<<<<<<
15336  *     if x < a[mid]: hi = mid
15337  *     else: lo = mid+1
15338  */
15339     __pyx_v_mid = __Pyx_div_long((__pyx_v_lo + __pyx_v_hi), 2);
15340 
15341     /* "tables/indexesextension.pyx":547
15342  *   while lo < hi:
15343  *     mid = (lo+hi)/2
15344  *     if x < a[mid]: hi = mid             # <<<<<<<<<<<<<<
15345  *     else: lo = mid+1
15346  *   return lo
15347  */
15348     __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, __pyx_v_mid, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
15349     __Pyx_GOTREF(__pyx_t_1);
15350     __pyx_t_2 = PyObject_RichCompare(__pyx_v_x, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
15351     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15352     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
15353     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15354     if (__pyx_t_3) {
15355       __pyx_v_hi = __pyx_v_mid;
15356       goto __pyx_L7;
15357     }
15358 
15359     /* "tables/indexesextension.pyx":548
15360  *     mid = (lo+hi)/2
15361  *     if x < a[mid]: hi = mid
15362  *     else: lo = mid+1             # <<<<<<<<<<<<<<
15363  *   return lo
15364  *
15365  */
15366     /*else*/ {
15367       __pyx_v_lo = (__pyx_v_mid + 1);
15368     }
15369     __pyx_L7:;
15370   }
15371 
15372   /* "tables/indexesextension.pyx":549
15373  *     if x < a[mid]: hi = mid
15374  *     else: lo = mid+1
15375  *   return lo             # <<<<<<<<<<<<<<
15376  *
15377  *
15378  */
15379   __Pyx_XDECREF(__pyx_r);
15380   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_lo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error)
15381   __Pyx_GOTREF(__pyx_t_2);
15382   __pyx_r = __pyx_t_2;
15383   __pyx_t_2 = 0;
15384   goto __pyx_L0;
15385 
15386   /* "tables/indexesextension.pyx":531
15387  *
15388  *
15389  * def _bisect_right(a, x, int hi):             # <<<<<<<<<<<<<<
15390  *   """Return the index where to insert item x in list a, assuming a is sorted.
15391  *
15392  */
15393 
15394   /* function exit code */
15395   __pyx_L1_error:;
15396   __Pyx_XDECREF(__pyx_t_1);
15397   __Pyx_XDECREF(__pyx_t_2);
15398   __Pyx_AddTraceback("tables.indexesextension._bisect_right", __pyx_clineno, __pyx_lineno, __pyx_filename);
15399   __pyx_r = NULL;
15400   __pyx_L0:;
15401   __Pyx_XGIVEREF(__pyx_r);
15402   __Pyx_RefNannyFinishContext();
15403   return __pyx_r;
15404 }
15405 
15406 /* "(tree fragment)":1
15407  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
15408  *     cdef tuple state
15409  *     cdef object _dict
15410  */
15411 
15412 /* Python wrapper */
15413 static PyObject *__pyx_pw_6tables_16indexesextension_5Index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_16indexesextension_5Index_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)15414 static PyObject *__pyx_pw_6tables_16indexesextension_5Index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
15415   PyObject *__pyx_r = 0;
15416   __Pyx_RefNannyDeclarations
15417   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
15418   __pyx_r = __pyx_pf_6tables_16indexesextension_5Index___reduce_cython__(((struct __pyx_obj_6tables_16indexesextension_Index *)__pyx_v_self));
15419 
15420   /* function exit code */
15421   __Pyx_RefNannyFinishContext();
15422   return __pyx_r;
15423 }
15424 
__pyx_pf_6tables_16indexesextension_5Index___reduce_cython__(struct __pyx_obj_6tables_16indexesextension_Index * __pyx_v_self)15425 static PyObject *__pyx_pf_6tables_16indexesextension_5Index___reduce_cython__(struct __pyx_obj_6tables_16indexesextension_Index *__pyx_v_self) {
15426   PyObject *__pyx_v_state = 0;
15427   PyObject *__pyx_v__dict = 0;
15428   int __pyx_v_use_setstate;
15429   PyObject *__pyx_r = NULL;
15430   __Pyx_RefNannyDeclarations
15431   PyObject *__pyx_t_1 = NULL;
15432   int __pyx_t_2;
15433   int __pyx_t_3;
15434   PyObject *__pyx_t_4 = NULL;
15435   PyObject *__pyx_t_5 = NULL;
15436   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
15437 
15438   /* "(tree fragment)":5
15439  *     cdef object _dict
15440  *     cdef bint use_setstate
15441  *     state = ()             # <<<<<<<<<<<<<<
15442  *     _dict = getattr(self, '__dict__', None)
15443  *     if _dict is not None:
15444  */
15445   __Pyx_INCREF(__pyx_empty_tuple);
15446   __pyx_v_state = __pyx_empty_tuple;
15447 
15448   /* "(tree fragment)":6
15449  *     cdef bint use_setstate
15450  *     state = ()
15451  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
15452  *     if _dict is not None:
15453  *         state += (_dict,)
15454  */
15455   __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)
15456   __Pyx_GOTREF(__pyx_t_1);
15457   __pyx_v__dict = __pyx_t_1;
15458   __pyx_t_1 = 0;
15459 
15460   /* "(tree fragment)":7
15461  *     state = ()
15462  *     _dict = getattr(self, '__dict__', None)
15463  *     if _dict is not None:             # <<<<<<<<<<<<<<
15464  *         state += (_dict,)
15465  *         use_setstate = True
15466  */
15467   __pyx_t_2 = (__pyx_v__dict != Py_None);
15468   __pyx_t_3 = (__pyx_t_2 != 0);
15469   if (__pyx_t_3) {
15470 
15471     /* "(tree fragment)":8
15472  *     _dict = getattr(self, '__dict__', None)
15473  *     if _dict is not None:
15474  *         state += (_dict,)             # <<<<<<<<<<<<<<
15475  *         use_setstate = True
15476  *     else:
15477  */
15478     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
15479     __Pyx_GOTREF(__pyx_t_1);
15480     __Pyx_INCREF(__pyx_v__dict);
15481     __Pyx_GIVEREF(__pyx_v__dict);
15482     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
15483     __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
15484     __Pyx_GOTREF(__pyx_t_4);
15485     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15486     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
15487     __pyx_t_4 = 0;
15488 
15489     /* "(tree fragment)":9
15490  *     if _dict is not None:
15491  *         state += (_dict,)
15492  *         use_setstate = True             # <<<<<<<<<<<<<<
15493  *     else:
15494  *         use_setstate = False
15495  */
15496     __pyx_v_use_setstate = 1;
15497 
15498     /* "(tree fragment)":7
15499  *     state = ()
15500  *     _dict = getattr(self, '__dict__', None)
15501  *     if _dict is not None:             # <<<<<<<<<<<<<<
15502  *         state += (_dict,)
15503  *         use_setstate = True
15504  */
15505     goto __pyx_L3;
15506   }
15507 
15508   /* "(tree fragment)":11
15509  *         use_setstate = True
15510  *     else:
15511  *         use_setstate = False             # <<<<<<<<<<<<<<
15512  *     if use_setstate:
15513  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, None), state
15514  */
15515   /*else*/ {
15516     __pyx_v_use_setstate = 0;
15517   }
15518   __pyx_L3:;
15519 
15520   /* "(tree fragment)":12
15521  *     else:
15522  *         use_setstate = False
15523  *     if use_setstate:             # <<<<<<<<<<<<<<
15524  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, None), state
15525  *     else:
15526  */
15527   __pyx_t_3 = (__pyx_v_use_setstate != 0);
15528   if (__pyx_t_3) {
15529 
15530     /* "(tree fragment)":13
15531  *         use_setstate = False
15532  *     if use_setstate:
15533  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
15534  *     else:
15535  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, state)
15536  */
15537     __Pyx_XDECREF(__pyx_r);
15538     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
15539     __Pyx_GOTREF(__pyx_t_4);
15540     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
15541     __Pyx_GOTREF(__pyx_t_1);
15542     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
15543     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
15544     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
15545     __Pyx_INCREF(__pyx_int_222419149);
15546     __Pyx_GIVEREF(__pyx_int_222419149);
15547     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
15548     __Pyx_INCREF(Py_None);
15549     __Pyx_GIVEREF(Py_None);
15550     PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
15551     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
15552     __Pyx_GOTREF(__pyx_t_5);
15553     __Pyx_GIVEREF(__pyx_t_4);
15554     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
15555     __Pyx_GIVEREF(__pyx_t_1);
15556     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
15557     __Pyx_INCREF(__pyx_v_state);
15558     __Pyx_GIVEREF(__pyx_v_state);
15559     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
15560     __pyx_t_4 = 0;
15561     __pyx_t_1 = 0;
15562     __pyx_r = __pyx_t_5;
15563     __pyx_t_5 = 0;
15564     goto __pyx_L0;
15565 
15566     /* "(tree fragment)":12
15567  *     else:
15568  *         use_setstate = False
15569  *     if use_setstate:             # <<<<<<<<<<<<<<
15570  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, None), state
15571  *     else:
15572  */
15573   }
15574 
15575   /* "(tree fragment)":15
15576  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, None), state
15577  *     else:
15578  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
15579  * def __setstate_cython__(self, __pyx_state):
15580  *     __pyx_unpickle_Index__set_state(self, __pyx_state)
15581  */
15582   /*else*/ {
15583     __Pyx_XDECREF(__pyx_r);
15584     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Index); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
15585     __Pyx_GOTREF(__pyx_t_5);
15586     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
15587     __Pyx_GOTREF(__pyx_t_1);
15588     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
15589     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
15590     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
15591     __Pyx_INCREF(__pyx_int_222419149);
15592     __Pyx_GIVEREF(__pyx_int_222419149);
15593     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
15594     __Pyx_INCREF(__pyx_v_state);
15595     __Pyx_GIVEREF(__pyx_v_state);
15596     PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
15597     __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
15598     __Pyx_GOTREF(__pyx_t_4);
15599     __Pyx_GIVEREF(__pyx_t_5);
15600     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
15601     __Pyx_GIVEREF(__pyx_t_1);
15602     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
15603     __pyx_t_5 = 0;
15604     __pyx_t_1 = 0;
15605     __pyx_r = __pyx_t_4;
15606     __pyx_t_4 = 0;
15607     goto __pyx_L0;
15608   }
15609 
15610   /* "(tree fragment)":1
15611  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
15612  *     cdef tuple state
15613  *     cdef object _dict
15614  */
15615 
15616   /* function exit code */
15617   __pyx_L1_error:;
15618   __Pyx_XDECREF(__pyx_t_1);
15619   __Pyx_XDECREF(__pyx_t_4);
15620   __Pyx_XDECREF(__pyx_t_5);
15621   __Pyx_AddTraceback("tables.indexesextension.Index.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15622   __pyx_r = NULL;
15623   __pyx_L0:;
15624   __Pyx_XDECREF(__pyx_v_state);
15625   __Pyx_XDECREF(__pyx_v__dict);
15626   __Pyx_XGIVEREF(__pyx_r);
15627   __Pyx_RefNannyFinishContext();
15628   return __pyx_r;
15629 }
15630 
15631 /* "(tree fragment)":16
15632  *     else:
15633  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, state)
15634  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
15635  *     __pyx_unpickle_Index__set_state(self, __pyx_state)
15636  */
15637 
15638 /* Python wrapper */
15639 static PyObject *__pyx_pw_6tables_16indexesextension_5Index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_6tables_16indexesextension_5Index_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)15640 static PyObject *__pyx_pw_6tables_16indexesextension_5Index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
15641   PyObject *__pyx_r = 0;
15642   __Pyx_RefNannyDeclarations
15643   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
15644   __pyx_r = __pyx_pf_6tables_16indexesextension_5Index_2__setstate_cython__(((struct __pyx_obj_6tables_16indexesextension_Index *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
15645 
15646   /* function exit code */
15647   __Pyx_RefNannyFinishContext();
15648   return __pyx_r;
15649 }
15650 
__pyx_pf_6tables_16indexesextension_5Index_2__setstate_cython__(struct __pyx_obj_6tables_16indexesextension_Index * __pyx_v_self,PyObject * __pyx_v___pyx_state)15651 static PyObject *__pyx_pf_6tables_16indexesextension_5Index_2__setstate_cython__(struct __pyx_obj_6tables_16indexesextension_Index *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
15652   PyObject *__pyx_r = NULL;
15653   __Pyx_RefNannyDeclarations
15654   PyObject *__pyx_t_1 = NULL;
15655   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
15656 
15657   /* "(tree fragment)":17
15658  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, state)
15659  * def __setstate_cython__(self, __pyx_state):
15660  *     __pyx_unpickle_Index__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
15661  */
15662   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)
15663   __pyx_t_1 = __pyx_f_6tables_16indexesextension___pyx_unpickle_Index__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
15664   __Pyx_GOTREF(__pyx_t_1);
15665   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15666 
15667   /* "(tree fragment)":16
15668  *     else:
15669  *         return __pyx_unpickle_Index, (type(self), 0xd41d8cd, state)
15670  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
15671  *     __pyx_unpickle_Index__set_state(self, __pyx_state)
15672  */
15673 
15674   /* function exit code */
15675   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15676   goto __pyx_L0;
15677   __pyx_L1_error:;
15678   __Pyx_XDECREF(__pyx_t_1);
15679   __Pyx_AddTraceback("tables.indexesextension.Index.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15680   __pyx_r = NULL;
15681   __pyx_L0:;
15682   __Pyx_XGIVEREF(__pyx_r);
15683   __Pyx_RefNannyFinishContext();
15684   return __pyx_r;
15685 }
15686 
15687 /* "tables/indexesextension.pyx":567
15688  *   cdef hid_t mem_space_id
15689  *
15690  *   cdef initread(self, int nbounds):             # <<<<<<<<<<<<<<
15691  *     # "Actions to accelerate the reads afterwards."
15692  *
15693  */
15694 
__pyx_f_6tables_16indexesextension_10CacheArray_initread(struct __pyx_obj_6tables_16indexesextension_CacheArray * __pyx_v_self,int __pyx_v_nbounds)15695 static PyObject *__pyx_f_6tables_16indexesextension_10CacheArray_initread(struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self, int __pyx_v_nbounds) {
15696   PyObject *__pyx_r = NULL;
15697   __Pyx_RefNannyDeclarations
15698   int __pyx_t_1;
15699   PyObject *__pyx_t_2 = NULL;
15700   PyObject *__pyx_t_3 = NULL;
15701   PyObject *__pyx_t_4 = NULL;
15702   __Pyx_RefNannySetupContext("initread", 0);
15703 
15704   /* "tables/indexesextension.pyx":572
15705  *     # Precompute the mem_space_id
15706  *     if (H5ARRAYOinit_readSlice(self.dataset_id, &self.mem_space_id,
15707  *                                nbounds) < 0):             # <<<<<<<<<<<<<<
15708  *       raise HDF5ExtError("Problems initializing the bounds array data.")
15709  *     return
15710  */
15711   __pyx_t_1 = ((H5ARRAYOinit_readSlice(__pyx_v_self->__pyx_base.__pyx_base.dataset_id, (&__pyx_v_self->mem_space_id), __pyx_v_nbounds) < 0) != 0);
15712 
15713   /* "tables/indexesextension.pyx":571
15714  *
15715  *     # Precompute the mem_space_id
15716  *     if (H5ARRAYOinit_readSlice(self.dataset_id, &self.mem_space_id,             # <<<<<<<<<<<<<<
15717  *                                nbounds) < 0):
15718  *       raise HDF5ExtError("Problems initializing the bounds array data.")
15719  */
15720   if (unlikely(__pyx_t_1)) {
15721 
15722     /* "tables/indexesextension.pyx":573
15723  *     if (H5ARRAYOinit_readSlice(self.dataset_id, &self.mem_space_id,
15724  *                                nbounds) < 0):
15725  *       raise HDF5ExtError("Problems initializing the bounds array data.")             # <<<<<<<<<<<<<<
15726  *     return
15727  *
15728  */
15729     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
15730     __Pyx_GOTREF(__pyx_t_3);
15731     __pyx_t_4 = NULL;
15732     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
15733       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
15734       if (likely(__pyx_t_4)) {
15735         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
15736         __Pyx_INCREF(__pyx_t_4);
15737         __Pyx_INCREF(function);
15738         __Pyx_DECREF_SET(__pyx_t_3, function);
15739       }
15740     }
15741     __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Problems_initializing_the_bounds) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Problems_initializing_the_bounds);
15742     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15743     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
15744     __Pyx_GOTREF(__pyx_t_2);
15745     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15746     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15747     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15748     __PYX_ERR(0, 573, __pyx_L1_error)
15749 
15750     /* "tables/indexesextension.pyx":571
15751  *
15752  *     # Precompute the mem_space_id
15753  *     if (H5ARRAYOinit_readSlice(self.dataset_id, &self.mem_space_id,             # <<<<<<<<<<<<<<
15754  *                                nbounds) < 0):
15755  *       raise HDF5ExtError("Problems initializing the bounds array data.")
15756  */
15757   }
15758 
15759   /* "tables/indexesextension.pyx":574
15760  *                                nbounds) < 0):
15761  *       raise HDF5ExtError("Problems initializing the bounds array data.")
15762  *     return             # <<<<<<<<<<<<<<
15763  *
15764  *   cdef read_slice(self, hsize_t nrow, hsize_t start, hsize_t stop, void *rbuf):
15765  */
15766   __Pyx_XDECREF(__pyx_r);
15767   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15768   goto __pyx_L0;
15769 
15770   /* "tables/indexesextension.pyx":567
15771  *   cdef hid_t mem_space_id
15772  *
15773  *   cdef initread(self, int nbounds):             # <<<<<<<<<<<<<<
15774  *     # "Actions to accelerate the reads afterwards."
15775  *
15776  */
15777 
15778   /* function exit code */
15779   __pyx_L1_error:;
15780   __Pyx_XDECREF(__pyx_t_2);
15781   __Pyx_XDECREF(__pyx_t_3);
15782   __Pyx_XDECREF(__pyx_t_4);
15783   __Pyx_AddTraceback("tables.indexesextension.CacheArray.initread", __pyx_clineno, __pyx_lineno, __pyx_filename);
15784   __pyx_r = 0;
15785   __pyx_L0:;
15786   __Pyx_XGIVEREF(__pyx_r);
15787   __Pyx_RefNannyFinishContext();
15788   return __pyx_r;
15789 }
15790 
15791 /* "tables/indexesextension.pyx":576
15792  *     return
15793  *
15794  *   cdef read_slice(self, hsize_t nrow, hsize_t start, hsize_t stop, void *rbuf):             # <<<<<<<<<<<<<<
15795  *     # "Read an slice of bounds."
15796  *
15797  */
15798 
__pyx_f_6tables_16indexesextension_10CacheArray_read_slice(struct __pyx_obj_6tables_16indexesextension_CacheArray * __pyx_v_self,hsize_t __pyx_v_nrow,hsize_t __pyx_v_start,hsize_t __pyx_v_stop,void * __pyx_v_rbuf)15799 static PyObject *__pyx_f_6tables_16indexesextension_10CacheArray_read_slice(struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self, hsize_t __pyx_v_nrow, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, void *__pyx_v_rbuf) {
15800   PyObject *__pyx_r = NULL;
15801   __Pyx_RefNannyDeclarations
15802   int __pyx_t_1;
15803   PyObject *__pyx_t_2 = NULL;
15804   PyObject *__pyx_t_3 = NULL;
15805   PyObject *__pyx_t_4 = NULL;
15806   __Pyx_RefNannySetupContext("read_slice", 0);
15807 
15808   /* "tables/indexesextension.pyx":581
15809  *     if (H5ARRAYOread_readBoundsSlice(
15810  *       self.dataset_id, self.mem_space_id, self.type_id,
15811  *       nrow, start, stop, rbuf) < 0):             # <<<<<<<<<<<<<<
15812  *       raise HDF5ExtError("Problems reading the bounds array data.")
15813  *     return
15814  */
15815   __pyx_t_1 = ((H5ARRAYOread_readBoundsSlice(__pyx_v_self->__pyx_base.__pyx_base.dataset_id, __pyx_v_self->mem_space_id, __pyx_v_self->__pyx_base.__pyx_base.type_id, __pyx_v_nrow, __pyx_v_start, __pyx_v_stop, __pyx_v_rbuf) < 0) != 0);
15816 
15817   /* "tables/indexesextension.pyx":579
15818  *     # "Read an slice of bounds."
15819  *
15820  *     if (H5ARRAYOread_readBoundsSlice(             # <<<<<<<<<<<<<<
15821  *       self.dataset_id, self.mem_space_id, self.type_id,
15822  *       nrow, start, stop, rbuf) < 0):
15823  */
15824   if (unlikely(__pyx_t_1)) {
15825 
15826     /* "tables/indexesextension.pyx":582
15827  *       self.dataset_id, self.mem_space_id, self.type_id,
15828  *       nrow, start, stop, rbuf) < 0):
15829  *       raise HDF5ExtError("Problems reading the bounds array data.")             # <<<<<<<<<<<<<<
15830  *     return
15831  *
15832  */
15833     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error)
15834     __Pyx_GOTREF(__pyx_t_3);
15835     __pyx_t_4 = NULL;
15836     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
15837       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
15838       if (likely(__pyx_t_4)) {
15839         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
15840         __Pyx_INCREF(__pyx_t_4);
15841         __Pyx_INCREF(function);
15842         __Pyx_DECREF_SET(__pyx_t_3, function);
15843       }
15844     }
15845     __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Problems_reading_the_bounds_arra) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Problems_reading_the_bounds_arra);
15846     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15847     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
15848     __Pyx_GOTREF(__pyx_t_2);
15849     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15850     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15851     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15852     __PYX_ERR(0, 582, __pyx_L1_error)
15853 
15854     /* "tables/indexesextension.pyx":579
15855  *     # "Read an slice of bounds."
15856  *
15857  *     if (H5ARRAYOread_readBoundsSlice(             # <<<<<<<<<<<<<<
15858  *       self.dataset_id, self.mem_space_id, self.type_id,
15859  *       nrow, start, stop, rbuf) < 0):
15860  */
15861   }
15862 
15863   /* "tables/indexesextension.pyx":583
15864  *       nrow, start, stop, rbuf) < 0):
15865  *       raise HDF5ExtError("Problems reading the bounds array data.")
15866  *     return             # <<<<<<<<<<<<<<
15867  *
15868  *   def _g_close(self):
15869  */
15870   __Pyx_XDECREF(__pyx_r);
15871   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15872   goto __pyx_L0;
15873 
15874   /* "tables/indexesextension.pyx":576
15875  *     return
15876  *
15877  *   cdef read_slice(self, hsize_t nrow, hsize_t start, hsize_t stop, void *rbuf):             # <<<<<<<<<<<<<<
15878  *     # "Read an slice of bounds."
15879  *
15880  */
15881 
15882   /* function exit code */
15883   __pyx_L1_error:;
15884   __Pyx_XDECREF(__pyx_t_2);
15885   __Pyx_XDECREF(__pyx_t_3);
15886   __Pyx_XDECREF(__pyx_t_4);
15887   __Pyx_AddTraceback("tables.indexesextension.CacheArray.read_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15888   __pyx_r = 0;
15889   __pyx_L0:;
15890   __Pyx_XGIVEREF(__pyx_r);
15891   __Pyx_RefNannyFinishContext();
15892   return __pyx_r;
15893 }
15894 
15895 /* "tables/indexesextension.pyx":585
15896  *     return
15897  *
15898  *   def _g_close(self):             # <<<<<<<<<<<<<<
15899  *     super(Array, self)._g_close()
15900  *     # Release specific resources of this class
15901  */
15902 
15903 /* Python wrapper */
15904 static PyObject *__pyx_pw_6tables_16indexesextension_10CacheArray_1_g_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_16indexesextension_10CacheArray_1_g_close(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)15905 static PyObject *__pyx_pw_6tables_16indexesextension_10CacheArray_1_g_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
15906   PyObject *__pyx_r = 0;
15907   __Pyx_RefNannyDeclarations
15908   __Pyx_RefNannySetupContext("_g_close (wrapper)", 0);
15909   __pyx_r = __pyx_pf_6tables_16indexesextension_10CacheArray__g_close(((struct __pyx_obj_6tables_16indexesextension_CacheArray *)__pyx_v_self));
15910 
15911   /* function exit code */
15912   __Pyx_RefNannyFinishContext();
15913   return __pyx_r;
15914 }
15915 
__pyx_pf_6tables_16indexesextension_10CacheArray__g_close(struct __pyx_obj_6tables_16indexesextension_CacheArray * __pyx_v_self)15916 static PyObject *__pyx_pf_6tables_16indexesextension_10CacheArray__g_close(struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self) {
15917   PyObject *__pyx_r = NULL;
15918   __Pyx_RefNannyDeclarations
15919   PyObject *__pyx_t_1 = NULL;
15920   PyObject *__pyx_t_2 = NULL;
15921   PyObject *__pyx_t_3 = NULL;
15922   int __pyx_t_4;
15923   __Pyx_RefNannySetupContext("_g_close", 0);
15924 
15925   /* "tables/indexesextension.pyx":586
15926  *
15927  *   def _g_close(self):
15928  *     super(Array, self)._g_close()             # <<<<<<<<<<<<<<
15929  *     # Release specific resources of this class
15930  *     if self.mem_space_id > 0:
15931  */
15932   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
15933   __Pyx_GOTREF(__pyx_t_2);
15934   __Pyx_INCREF(((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array));
15935   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array));
15936   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array));
15937   __Pyx_INCREF(((PyObject *)__pyx_v_self));
15938   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
15939   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
15940   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
15941   __Pyx_GOTREF(__pyx_t_3);
15942   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15943   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_g_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
15944   __Pyx_GOTREF(__pyx_t_2);
15945   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15946   __pyx_t_3 = NULL;
15947   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
15948     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
15949     if (likely(__pyx_t_3)) {
15950       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
15951       __Pyx_INCREF(__pyx_t_3);
15952       __Pyx_INCREF(function);
15953       __Pyx_DECREF_SET(__pyx_t_2, function);
15954     }
15955   }
15956   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
15957   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15958   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
15959   __Pyx_GOTREF(__pyx_t_1);
15960   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15961   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15962 
15963   /* "tables/indexesextension.pyx":588
15964  *     super(Array, self)._g_close()
15965  *     # Release specific resources of this class
15966  *     if self.mem_space_id > 0:             # <<<<<<<<<<<<<<
15967  *       H5Sclose(self.mem_space_id)
15968  *
15969  */
15970   __pyx_t_4 = ((__pyx_v_self->mem_space_id > 0) != 0);
15971   if (__pyx_t_4) {
15972 
15973     /* "tables/indexesextension.pyx":589
15974  *     # Release specific resources of this class
15975  *     if self.mem_space_id > 0:
15976  *       H5Sclose(self.mem_space_id)             # <<<<<<<<<<<<<<
15977  *
15978  *
15979  */
15980     (void)(H5Sclose(__pyx_v_self->mem_space_id));
15981 
15982     /* "tables/indexesextension.pyx":588
15983  *     super(Array, self)._g_close()
15984  *     # Release specific resources of this class
15985  *     if self.mem_space_id > 0:             # <<<<<<<<<<<<<<
15986  *       H5Sclose(self.mem_space_id)
15987  *
15988  */
15989   }
15990 
15991   /* "tables/indexesextension.pyx":585
15992  *     return
15993  *
15994  *   def _g_close(self):             # <<<<<<<<<<<<<<
15995  *     super(Array, self)._g_close()
15996  *     # Release specific resources of this class
15997  */
15998 
15999   /* function exit code */
16000   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16001   goto __pyx_L0;
16002   __pyx_L1_error:;
16003   __Pyx_XDECREF(__pyx_t_1);
16004   __Pyx_XDECREF(__pyx_t_2);
16005   __Pyx_XDECREF(__pyx_t_3);
16006   __Pyx_AddTraceback("tables.indexesextension.CacheArray._g_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
16007   __pyx_r = NULL;
16008   __pyx_L0:;
16009   __Pyx_XGIVEREF(__pyx_r);
16010   __Pyx_RefNannyFinishContext();
16011   return __pyx_r;
16012 }
16013 
16014 /* "(tree fragment)":1
16015  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
16016  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
16017  * def __setstate_cython__(self, __pyx_state):
16018  */
16019 
16020 /* Python wrapper */
16021 static PyObject *__pyx_pw_6tables_16indexesextension_10CacheArray_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_16indexesextension_10CacheArray_3__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)16022 static PyObject *__pyx_pw_6tables_16indexesextension_10CacheArray_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
16023   PyObject *__pyx_r = 0;
16024   __Pyx_RefNannyDeclarations
16025   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
16026   __pyx_r = __pyx_pf_6tables_16indexesextension_10CacheArray_2__reduce_cython__(((struct __pyx_obj_6tables_16indexesextension_CacheArray *)__pyx_v_self));
16027 
16028   /* function exit code */
16029   __Pyx_RefNannyFinishContext();
16030   return __pyx_r;
16031 }
16032 
__pyx_pf_6tables_16indexesextension_10CacheArray_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_CacheArray * __pyx_v_self)16033 static PyObject *__pyx_pf_6tables_16indexesextension_10CacheArray_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self) {
16034   PyObject *__pyx_r = NULL;
16035   __Pyx_RefNannyDeclarations
16036   PyObject *__pyx_t_1 = NULL;
16037   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
16038 
16039   /* "(tree fragment)":2
16040  * def __reduce_cython__(self):
16041  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
16042  * def __setstate_cython__(self, __pyx_state):
16043  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
16044  */
16045   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
16046   __Pyx_GOTREF(__pyx_t_1);
16047   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
16048   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16049   __PYX_ERR(1, 2, __pyx_L1_error)
16050 
16051   /* "(tree fragment)":1
16052  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
16053  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
16054  * def __setstate_cython__(self, __pyx_state):
16055  */
16056 
16057   /* function exit code */
16058   __pyx_L1_error:;
16059   __Pyx_XDECREF(__pyx_t_1);
16060   __Pyx_AddTraceback("tables.indexesextension.CacheArray.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16061   __pyx_r = NULL;
16062   __Pyx_XGIVEREF(__pyx_r);
16063   __Pyx_RefNannyFinishContext();
16064   return __pyx_r;
16065 }
16066 
16067 /* "(tree fragment)":3
16068  * def __reduce_cython__(self):
16069  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
16070  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
16071  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
16072  */
16073 
16074 /* Python wrapper */
16075 static PyObject *__pyx_pw_6tables_16indexesextension_10CacheArray_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_6tables_16indexesextension_10CacheArray_5__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)16076 static PyObject *__pyx_pw_6tables_16indexesextension_10CacheArray_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
16077   PyObject *__pyx_r = 0;
16078   __Pyx_RefNannyDeclarations
16079   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
16080   __pyx_r = __pyx_pf_6tables_16indexesextension_10CacheArray_4__setstate_cython__(((struct __pyx_obj_6tables_16indexesextension_CacheArray *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
16081 
16082   /* function exit code */
16083   __Pyx_RefNannyFinishContext();
16084   return __pyx_r;
16085 }
16086 
__pyx_pf_6tables_16indexesextension_10CacheArray_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_CacheArray * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)16087 static PyObject *__pyx_pf_6tables_16indexesextension_10CacheArray_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_CacheArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
16088   PyObject *__pyx_r = NULL;
16089   __Pyx_RefNannyDeclarations
16090   PyObject *__pyx_t_1 = NULL;
16091   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
16092 
16093   /* "(tree fragment)":4
16094  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
16095  * def __setstate_cython__(self, __pyx_state):
16096  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
16097  */
16098   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
16099   __Pyx_GOTREF(__pyx_t_1);
16100   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
16101   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16102   __PYX_ERR(1, 4, __pyx_L1_error)
16103 
16104   /* "(tree fragment)":3
16105  * def __reduce_cython__(self):
16106  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
16107  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
16108  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
16109  */
16110 
16111   /* function exit code */
16112   __pyx_L1_error:;
16113   __Pyx_XDECREF(__pyx_t_1);
16114   __Pyx_AddTraceback("tables.indexesextension.CacheArray.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16115   __pyx_r = NULL;
16116   __Pyx_XGIVEREF(__pyx_r);
16117   __Pyx_RefNannyFinishContext();
16118   return __pyx_r;
16119 }
16120 
16121 /* "tables/indexesextension.pyx":606
16122  *   cdef ndarray bufferbc, bufferlb
16123  *
16124  *   def _read_index_slice(self, hsize_t irow, hsize_t start, hsize_t stop,             # <<<<<<<<<<<<<<
16125  *                       ndarray idx):
16126  *     cdef herr_t ret
16127  */
16128 
16129 /* Python wrapper */
16130 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_1_read_index_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_1_read_index_slice(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)16131 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_1_read_index_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16132   hsize_t __pyx_v_irow;
16133   hsize_t __pyx_v_start;
16134   hsize_t __pyx_v_stop;
16135   PyArrayObject *__pyx_v_idx = 0;
16136   PyObject *__pyx_r = 0;
16137   __Pyx_RefNannyDeclarations
16138   __Pyx_RefNannySetupContext("_read_index_slice (wrapper)", 0);
16139   {
16140     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_irow,&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_idx,0};
16141     PyObject* values[4] = {0,0,0,0};
16142     if (unlikely(__pyx_kwds)) {
16143       Py_ssize_t kw_args;
16144       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16145       switch (pos_args) {
16146         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16147         CYTHON_FALLTHROUGH;
16148         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16149         CYTHON_FALLTHROUGH;
16150         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16151         CYTHON_FALLTHROUGH;
16152         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16153         CYTHON_FALLTHROUGH;
16154         case  0: break;
16155         default: goto __pyx_L5_argtuple_error;
16156       }
16157       kw_args = PyDict_Size(__pyx_kwds);
16158       switch (pos_args) {
16159         case  0:
16160         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_irow)) != 0)) kw_args--;
16161         else goto __pyx_L5_argtuple_error;
16162         CYTHON_FALLTHROUGH;
16163         case  1:
16164         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
16165         else {
16166           __Pyx_RaiseArgtupleInvalid("_read_index_slice", 1, 4, 4, 1); __PYX_ERR(0, 606, __pyx_L3_error)
16167         }
16168         CYTHON_FALLTHROUGH;
16169         case  2:
16170         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stop)) != 0)) kw_args--;
16171         else {
16172           __Pyx_RaiseArgtupleInvalid("_read_index_slice", 1, 4, 4, 2); __PYX_ERR(0, 606, __pyx_L3_error)
16173         }
16174         CYTHON_FALLTHROUGH;
16175         case  3:
16176         if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_idx)) != 0)) kw_args--;
16177         else {
16178           __Pyx_RaiseArgtupleInvalid("_read_index_slice", 1, 4, 4, 3); __PYX_ERR(0, 606, __pyx_L3_error)
16179         }
16180       }
16181       if (unlikely(kw_args > 0)) {
16182         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_read_index_slice") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
16183       }
16184     } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
16185       goto __pyx_L5_argtuple_error;
16186     } else {
16187       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16188       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16189       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16190       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16191     }
16192     __pyx_v_irow = __Pyx_PyInt_As_hsize_t(values[0]); if (unlikely((__pyx_v_irow == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 606, __pyx_L3_error)
16193     __pyx_v_start = __Pyx_PyInt_As_hsize_t(values[1]); if (unlikely((__pyx_v_start == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 606, __pyx_L3_error)
16194     __pyx_v_stop = __Pyx_PyInt_As_hsize_t(values[2]); if (unlikely((__pyx_v_stop == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 606, __pyx_L3_error)
16195     __pyx_v_idx = ((PyArrayObject *)values[3]);
16196   }
16197   goto __pyx_L4_argument_unpacking_done;
16198   __pyx_L5_argtuple_error:;
16199   __Pyx_RaiseArgtupleInvalid("_read_index_slice", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
16200   __pyx_L3_error:;
16201   __Pyx_AddTraceback("tables.indexesextension.IndexArray._read_index_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16202   __Pyx_RefNannyFinishContext();
16203   return NULL;
16204   __pyx_L4_argument_unpacking_done:;
16205   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idx), __pyx_ptype_5numpy_ndarray, 1, "idx", 0))) __PYX_ERR(0, 607, __pyx_L1_error)
16206   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray__read_index_slice(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_irow, __pyx_v_start, __pyx_v_stop, __pyx_v_idx);
16207 
16208   /* function exit code */
16209   goto __pyx_L0;
16210   __pyx_L1_error:;
16211   __pyx_r = NULL;
16212   __pyx_L0:;
16213   __Pyx_RefNannyFinishContext();
16214   return __pyx_r;
16215 }
16216 
__pyx_pf_6tables_16indexesextension_10IndexArray__read_index_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,hsize_t __pyx_v_irow,hsize_t __pyx_v_start,hsize_t __pyx_v_stop,PyArrayObject * __pyx_v_idx)16217 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray__read_index_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, hsize_t __pyx_v_irow, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, PyArrayObject *__pyx_v_idx) {
16218   herr_t __pyx_v_ret;
16219   PyObject *__pyx_r = NULL;
16220   __Pyx_RefNannyDeclarations
16221   int __pyx_t_1;
16222   PyObject *__pyx_t_2 = NULL;
16223   PyObject *__pyx_t_3 = NULL;
16224   PyObject *__pyx_t_4 = NULL;
16225   __Pyx_RefNannySetupContext("_read_index_slice", 0);
16226 
16227   /* "tables/indexesextension.pyx":611
16228  *
16229  *     # Do the physical read
16230  *     with nogil:             # <<<<<<<<<<<<<<
16231  *         ret = H5ARRAYOread_readSlice(self.dataset_id, self.type_id,
16232  *                                      irow, start, stop, idx.data)
16233  */
16234   {
16235       #ifdef WITH_THREAD
16236       PyThreadState *_save;
16237       Py_UNBLOCK_THREADS
16238       __Pyx_FastGIL_Remember();
16239       #endif
16240       /*try:*/ {
16241 
16242         /* "tables/indexesextension.pyx":612
16243  *     # Do the physical read
16244  *     with nogil:
16245  *         ret = H5ARRAYOread_readSlice(self.dataset_id, self.type_id,             # <<<<<<<<<<<<<<
16246  *                                      irow, start, stop, idx.data)
16247  *
16248  */
16249         __pyx_v_ret = H5ARRAYOread_readSlice(__pyx_v_self->__pyx_base.__pyx_base.dataset_id, __pyx_v_self->__pyx_base.__pyx_base.type_id, __pyx_v_irow, __pyx_v_start, __pyx_v_stop, __pyx_v_idx->data);
16250       }
16251 
16252       /* "tables/indexesextension.pyx":611
16253  *
16254  *     # Do the physical read
16255  *     with nogil:             # <<<<<<<<<<<<<<
16256  *         ret = H5ARRAYOread_readSlice(self.dataset_id, self.type_id,
16257  *                                      irow, start, stop, idx.data)
16258  */
16259       /*finally:*/ {
16260         /*normal exit:*/{
16261           #ifdef WITH_THREAD
16262           __Pyx_FastGIL_Forget();
16263           Py_BLOCK_THREADS
16264           #endif
16265           goto __pyx_L5;
16266         }
16267         __pyx_L5:;
16268       }
16269   }
16270 
16271   /* "tables/indexesextension.pyx":615
16272  *                                      irow, start, stop, idx.data)
16273  *
16274  *     if ret < 0:             # <<<<<<<<<<<<<<
16275  *       raise HDF5ExtError("Problems reading the index indices.")
16276  *
16277  */
16278   __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
16279   if (unlikely(__pyx_t_1)) {
16280 
16281     /* "tables/indexesextension.pyx":616
16282  *
16283  *     if ret < 0:
16284  *       raise HDF5ExtError("Problems reading the index indices.")             # <<<<<<<<<<<<<<
16285  *
16286  *
16287  */
16288     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error)
16289     __Pyx_GOTREF(__pyx_t_3);
16290     __pyx_t_4 = NULL;
16291     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
16292       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
16293       if (likely(__pyx_t_4)) {
16294         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
16295         __Pyx_INCREF(__pyx_t_4);
16296         __Pyx_INCREF(function);
16297         __Pyx_DECREF_SET(__pyx_t_3, function);
16298       }
16299     }
16300     __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Problems_reading_the_index_indic) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Problems_reading_the_index_indic);
16301     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16302     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
16303     __Pyx_GOTREF(__pyx_t_2);
16304     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16305     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
16306     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16307     __PYX_ERR(0, 616, __pyx_L1_error)
16308 
16309     /* "tables/indexesextension.pyx":615
16310  *                                      irow, start, stop, idx.data)
16311  *
16312  *     if ret < 0:             # <<<<<<<<<<<<<<
16313  *       raise HDF5ExtError("Problems reading the index indices.")
16314  *
16315  */
16316   }
16317 
16318   /* "tables/indexesextension.pyx":606
16319  *   cdef ndarray bufferbc, bufferlb
16320  *
16321  *   def _read_index_slice(self, hsize_t irow, hsize_t start, hsize_t stop,             # <<<<<<<<<<<<<<
16322  *                       ndarray idx):
16323  *     cdef herr_t ret
16324  */
16325 
16326   /* function exit code */
16327   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16328   goto __pyx_L0;
16329   __pyx_L1_error:;
16330   __Pyx_XDECREF(__pyx_t_2);
16331   __Pyx_XDECREF(__pyx_t_3);
16332   __Pyx_XDECREF(__pyx_t_4);
16333   __Pyx_AddTraceback("tables.indexesextension.IndexArray._read_index_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16334   __pyx_r = NULL;
16335   __pyx_L0:;
16336   __Pyx_XGIVEREF(__pyx_r);
16337   __Pyx_RefNannyFinishContext();
16338   return __pyx_r;
16339 }
16340 
16341 /* "tables/indexesextension.pyx":619
16342  *
16343  *
16344  *   def _init_sorted_slice(self, index):             # <<<<<<<<<<<<<<
16345  *     """Initialize the structures for doing a binary search."""
16346  *
16347  */
16348 
16349 /* Python wrapper */
16350 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_3_init_sorted_slice(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
16351 static char __pyx_doc_6tables_16indexesextension_10IndexArray_2_init_sorted_slice[] = "Initialize the structures for doing a binary search.";
__pyx_pw_6tables_16indexesextension_10IndexArray_3_init_sorted_slice(PyObject * __pyx_v_self,PyObject * __pyx_v_index)16352 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_3_init_sorted_slice(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
16353   PyObject *__pyx_r = 0;
16354   __Pyx_RefNannyDeclarations
16355   __Pyx_RefNannySetupContext("_init_sorted_slice (wrapper)", 0);
16356   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_2_init_sorted_slice(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), ((PyObject *)__pyx_v_index));
16357 
16358   /* function exit code */
16359   __Pyx_RefNannyFinishContext();
16360   return __pyx_r;
16361 }
16362 
__pyx_pf_6tables_16indexesextension_10IndexArray_2_init_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,PyObject * __pyx_v_index)16363 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_2_init_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, PyObject *__pyx_v_index) {
16364   int __pyx_v_rank;
16365   hsize_t __pyx_v_count[2];
16366   PyArrayObject *__pyx_v_starts = 0;
16367   PyArrayObject *__pyx_v_lengths = 0;
16368   PyArrayObject *__pyx_v_rvcache = 0;
16369   PyObject *__pyx_v_maxslots = 0;
16370   PyObject *__pyx_v_rowsize = 0;
16371   PyObject *__pyx_v_dtype = NULL;
16372   PyObject *__pyx_v_params = NULL;
16373   PyObject *__pyx_r = NULL;
16374   __Pyx_RefNannyDeclarations
16375   PyObject *__pyx_t_1 = NULL;
16376   PyObject *__pyx_t_2 = NULL;
16377   int __pyx_t_3;
16378   int __pyx_t_4;
16379   PyObject *__pyx_t_5 = NULL;
16380   char *__pyx_t_6;
16381   hsize_t __pyx_t_7;
16382   int __pyx_t_8;
16383   PyObject *__pyx_t_9 = NULL;
16384   __Pyx_RefNannySetupContext("_init_sorted_slice", 0);
16385 
16386   /* "tables/indexesextension.pyx":629
16387  *     cdef object maxslots, rowsize
16388  *
16389  *     dtype = self.atom.dtype             # <<<<<<<<<<<<<<
16390  *     # Create the buffer for reading sorted data chunks if not created yet
16391  *     if <object>self.bufferlb is None:
16392  */
16393   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_atom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
16394   __Pyx_GOTREF(__pyx_t_1);
16395   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
16396   __Pyx_GOTREF(__pyx_t_2);
16397   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16398   __pyx_v_dtype = __pyx_t_2;
16399   __pyx_t_2 = 0;
16400 
16401   /* "tables/indexesextension.pyx":631
16402  *     dtype = self.atom.dtype
16403  *     # Create the buffer for reading sorted data chunks if not created yet
16404  *     if <object>self.bufferlb is None:             # <<<<<<<<<<<<<<
16405  *       # Internal buffers
16406  *       self.bufferlb = numpy.empty(dtype=dtype, shape=self.chunksize)
16407  */
16408   __pyx_t_3 = (((PyObject *)__pyx_v_self->bufferlb) == Py_None);
16409   __pyx_t_4 = (__pyx_t_3 != 0);
16410   if (__pyx_t_4) {
16411 
16412     /* "tables/indexesextension.pyx":633
16413  *     if <object>self.bufferlb is None:
16414  *       # Internal buffers
16415  *       self.bufferlb = numpy.empty(dtype=dtype, shape=self.chunksize)             # <<<<<<<<<<<<<<
16416  *       # Get the pointers to the different buffer data areas
16417  *       self.rbuflb = self.bufferlb.data
16418  */
16419     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
16420     __Pyx_GOTREF(__pyx_t_2);
16421     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
16422     __Pyx_GOTREF(__pyx_t_1);
16423     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16424     __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
16425     __Pyx_GOTREF(__pyx_t_2);
16426     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
16427     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_chunksize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 633, __pyx_L1_error)
16428     __Pyx_GOTREF(__pyx_t_5);
16429     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
16430     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16431     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 633, __pyx_L1_error)
16432     __Pyx_GOTREF(__pyx_t_5);
16433     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16434     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16435     if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 633, __pyx_L1_error)
16436     __Pyx_GIVEREF(__pyx_t_5);
16437     __Pyx_GOTREF(__pyx_v_self->bufferlb);
16438     __Pyx_DECREF(((PyObject *)__pyx_v_self->bufferlb));
16439     __pyx_v_self->bufferlb = ((PyArrayObject *)__pyx_t_5);
16440     __pyx_t_5 = 0;
16441 
16442     /* "tables/indexesextension.pyx":635
16443  *       self.bufferlb = numpy.empty(dtype=dtype, shape=self.chunksize)
16444  *       # Get the pointers to the different buffer data areas
16445  *       self.rbuflb = self.bufferlb.data             # <<<<<<<<<<<<<<
16446  *       # Init structures for accelerating sorted array reads
16447  *       rank = 2
16448  */
16449     __pyx_t_6 = __pyx_v_self->bufferlb->data;
16450     __pyx_v_self->rbuflb = __pyx_t_6;
16451 
16452     /* "tables/indexesextension.pyx":637
16453  *       self.rbuflb = self.bufferlb.data
16454  *       # Init structures for accelerating sorted array reads
16455  *       rank = 2             # <<<<<<<<<<<<<<
16456  *       count[0] = 1
16457  *       count[1] = self.chunksize
16458  */
16459     __pyx_v_rank = 2;
16460 
16461     /* "tables/indexesextension.pyx":638
16462  *       # Init structures for accelerating sorted array reads
16463  *       rank = 2
16464  *       count[0] = 1             # <<<<<<<<<<<<<<
16465  *       count[1] = self.chunksize
16466  *       self.mem_space_id = H5Screate_simple(rank, count, NULL)
16467  */
16468     (__pyx_v_count[0]) = 1;
16469 
16470     /* "tables/indexesextension.pyx":639
16471  *       rank = 2
16472  *       count[0] = 1
16473  *       count[1] = self.chunksize             # <<<<<<<<<<<<<<
16474  *       self.mem_space_id = H5Screate_simple(rank, count, NULL)
16475  *       # Cache some counters in local extension variables
16476  */
16477     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_chunksize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error)
16478     __Pyx_GOTREF(__pyx_t_5);
16479     __pyx_t_7 = __Pyx_PyInt_As_hsize_t(__pyx_t_5); if (unlikely((__pyx_t_7 == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L1_error)
16480     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16481     (__pyx_v_count[1]) = __pyx_t_7;
16482 
16483     /* "tables/indexesextension.pyx":640
16484  *       count[0] = 1
16485  *       count[1] = self.chunksize
16486  *       self.mem_space_id = H5Screate_simple(rank, count, NULL)             # <<<<<<<<<<<<<<
16487  *       # Cache some counters in local extension variables
16488  *       self.l_chunksize = self.chunksize
16489  */
16490     __pyx_v_self->mem_space_id = H5Screate_simple(__pyx_v_rank, __pyx_v_count, NULL);
16491 
16492     /* "tables/indexesextension.pyx":642
16493  *       self.mem_space_id = H5Screate_simple(rank, count, NULL)
16494  *       # Cache some counters in local extension variables
16495  *       self.l_chunksize = self.chunksize             # <<<<<<<<<<<<<<
16496  *       self.l_slicesize = self.slicesize
16497  *
16498  */
16499     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_chunksize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error)
16500     __Pyx_GOTREF(__pyx_t_5);
16501     __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error)
16502     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16503     __pyx_v_self->l_chunksize = __pyx_t_8;
16504 
16505     /* "tables/indexesextension.pyx":643
16506  *       # Cache some counters in local extension variables
16507  *       self.l_chunksize = self.chunksize
16508  *       self.l_slicesize = self.slicesize             # <<<<<<<<<<<<<<
16509  *
16510  *     # Get the addresses of buffer data
16511  */
16512     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_slicesize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
16513     __Pyx_GOTREF(__pyx_t_5);
16514     __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 643, __pyx_L1_error)
16515     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16516     __pyx_v_self->l_slicesize = __pyx_t_8;
16517 
16518     /* "tables/indexesextension.pyx":631
16519  *     dtype = self.atom.dtype
16520  *     # Create the buffer for reading sorted data chunks if not created yet
16521  *     if <object>self.bufferlb is None:             # <<<<<<<<<<<<<<
16522  *       # Internal buffers
16523  *       self.bufferlb = numpy.empty(dtype=dtype, shape=self.chunksize)
16524  */
16525   }
16526 
16527   /* "tables/indexesextension.pyx":646
16528  *
16529  *     # Get the addresses of buffer data
16530  *     starts = index.starts             # <<<<<<<<<<<<<<
16531  *     lengths = index.lengths
16532  *     self.rbufst = starts.data
16533  */
16534   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_starts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 646, __pyx_L1_error)
16535   __Pyx_GOTREF(__pyx_t_5);
16536   if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 646, __pyx_L1_error)
16537   __pyx_v_starts = ((PyArrayObject *)__pyx_t_5);
16538   __pyx_t_5 = 0;
16539 
16540   /* "tables/indexesextension.pyx":647
16541  *     # Get the addresses of buffer data
16542  *     starts = index.starts
16543  *     lengths = index.lengths             # <<<<<<<<<<<<<<
16544  *     self.rbufst = starts.data
16545  *     self.rbufln = lengths.data
16546  */
16547   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_lengths); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 647, __pyx_L1_error)
16548   __Pyx_GOTREF(__pyx_t_5);
16549   if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 647, __pyx_L1_error)
16550   __pyx_v_lengths = ((PyArrayObject *)__pyx_t_5);
16551   __pyx_t_5 = 0;
16552 
16553   /* "tables/indexesextension.pyx":648
16554  *     starts = index.starts
16555  *     lengths = index.lengths
16556  *     self.rbufst = starts.data             # <<<<<<<<<<<<<<
16557  *     self.rbufln = lengths.data
16558  *     # The 1st cache is loaded completely in memory and needs to be reloaded
16559  */
16560   __pyx_t_6 = __pyx_v_starts->data;
16561   __pyx_v_self->rbufst = __pyx_t_6;
16562 
16563   /* "tables/indexesextension.pyx":649
16564  *     lengths = index.lengths
16565  *     self.rbufst = starts.data
16566  *     self.rbufln = lengths.data             # <<<<<<<<<<<<<<
16567  *     # The 1st cache is loaded completely in memory and needs to be reloaded
16568  *     rvcache = index.ranges[:]
16569  */
16570   __pyx_t_6 = __pyx_v_lengths->data;
16571   __pyx_v_self->rbufln = __pyx_t_6;
16572 
16573   /* "tables/indexesextension.pyx":651
16574  *     self.rbufln = lengths.data
16575  *     # The 1st cache is loaded completely in memory and needs to be reloaded
16576  *     rvcache = index.ranges[:]             # <<<<<<<<<<<<<<
16577  *     self.rbufrv = rvcache.data
16578  *     index.rvcache = <object>rvcache
16579  */
16580   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_ranges); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 651, __pyx_L1_error)
16581   __Pyx_GOTREF(__pyx_t_5);
16582   __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, NULL, NULL, &__pyx_slice__4, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
16583   __Pyx_GOTREF(__pyx_t_2);
16584   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16585   if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 651, __pyx_L1_error)
16586   __pyx_v_rvcache = ((PyArrayObject *)__pyx_t_2);
16587   __pyx_t_2 = 0;
16588 
16589   /* "tables/indexesextension.pyx":652
16590  *     # The 1st cache is loaded completely in memory and needs to be reloaded
16591  *     rvcache = index.ranges[:]
16592  *     self.rbufrv = rvcache.data             # <<<<<<<<<<<<<<
16593  *     index.rvcache = <object>rvcache
16594  *     # Init the bounds array for reading
16595  */
16596   __pyx_t_6 = __pyx_v_rvcache->data;
16597   __pyx_v_self->rbufrv = __pyx_t_6;
16598 
16599   /* "tables/indexesextension.pyx":653
16600  *     rvcache = index.ranges[:]
16601  *     self.rbufrv = rvcache.data
16602  *     index.rvcache = <object>rvcache             # <<<<<<<<<<<<<<
16603  *     # Init the bounds array for reading
16604  *     self.nbounds = index.bounds.shape[1]
16605  */
16606   __pyx_t_2 = ((PyObject *)__pyx_v_rvcache);
16607   __Pyx_INCREF(__pyx_t_2);
16608   if (__Pyx_PyObject_SetAttrStr(__pyx_v_index, __pyx_n_s_rvcache, __pyx_t_2) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
16609   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16610 
16611   /* "tables/indexesextension.pyx":655
16612  *     index.rvcache = <object>rvcache
16613  *     # Init the bounds array for reading
16614  *     self.nbounds = index.bounds.shape[1]             # <<<<<<<<<<<<<<
16615  *     self.bounds_ext = <CacheArray>index.bounds
16616  *     self.bounds_ext.initread(self.nbounds)
16617  */
16618   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_bounds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
16619   __Pyx_GOTREF(__pyx_t_2);
16620   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error)
16621   __Pyx_GOTREF(__pyx_t_5);
16622   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16623   __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
16624   __Pyx_GOTREF(__pyx_t_2);
16625   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16626   __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 655, __pyx_L1_error)
16627   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16628   __pyx_v_self->nbounds = __pyx_t_8;
16629 
16630   /* "tables/indexesextension.pyx":656
16631  *     # Init the bounds array for reading
16632  *     self.nbounds = index.bounds.shape[1]
16633  *     self.bounds_ext = <CacheArray>index.bounds             # <<<<<<<<<<<<<<
16634  *     self.bounds_ext.initread(self.nbounds)
16635  *     if str(dtype) in self._v_parent.opt_search_types:
16636  */
16637   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_bounds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
16638   __Pyx_GOTREF(__pyx_t_2);
16639   __pyx_t_5 = __pyx_t_2;
16640   __Pyx_INCREF(__pyx_t_5);
16641   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16642   __Pyx_GIVEREF(__pyx_t_5);
16643   __Pyx_GOTREF(__pyx_v_self->bounds_ext);
16644   __Pyx_DECREF(((PyObject *)__pyx_v_self->bounds_ext));
16645   __pyx_v_self->bounds_ext = ((struct __pyx_obj_6tables_16indexesextension_CacheArray *)__pyx_t_5);
16646   __pyx_t_5 = 0;
16647 
16648   /* "tables/indexesextension.pyx":657
16649  *     self.nbounds = index.bounds.shape[1]
16650  *     self.bounds_ext = <CacheArray>index.bounds
16651  *     self.bounds_ext.initread(self.nbounds)             # <<<<<<<<<<<<<<
16652  *     if str(dtype) in self._v_parent.opt_search_types:
16653  *       # The next caches should be defined only for optimized search types.
16654  */
16655   __pyx_t_5 = ((struct __pyx_vtabstruct_6tables_16indexesextension_CacheArray *)__pyx_v_self->bounds_ext->__pyx_base.__pyx_base.__pyx_vtab)->initread(__pyx_v_self->bounds_ext, __pyx_v_self->nbounds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 657, __pyx_L1_error)
16656   __Pyx_GOTREF(__pyx_t_5);
16657   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16658 
16659   /* "tables/indexesextension.pyx":658
16660  *     self.bounds_ext = <CacheArray>index.bounds
16661  *     self.bounds_ext.initread(self.nbounds)
16662  *     if str(dtype) in self._v_parent.opt_search_types:             # <<<<<<<<<<<<<<
16663  *       # The next caches should be defined only for optimized search types.
16664  *       # The 2nd level cache will replace the already existing ObjectCache and
16665  */
16666   __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 658, __pyx_L1_error)
16667   __Pyx_GOTREF(__pyx_t_5);
16668   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_v_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
16669   __Pyx_GOTREF(__pyx_t_2);
16670   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_opt_search_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
16671   __Pyx_GOTREF(__pyx_t_1);
16672   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16673   __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 658, __pyx_L1_error)
16674   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16675   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16676   __pyx_t_3 = (__pyx_t_4 != 0);
16677   if (__pyx_t_3) {
16678 
16679     /* "tables/indexesextension.pyx":663
16680  *       # already bound to the boundscache attribute. This way, the cache will
16681  *       # not be duplicated (I know, this smells badly, but anyway).
16682  *       params = self._v_file.params             # <<<<<<<<<<<<<<
16683  *       rowsize = (self.bounds_ext._v_chunkshape[1] * dtype.itemsize)
16684  *       maxslots = params['BOUNDS_MAX_SIZE'] / rowsize
16685  */
16686     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
16687     __Pyx_GOTREF(__pyx_t_1);
16688     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_params); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
16689     __Pyx_GOTREF(__pyx_t_5);
16690     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16691     __pyx_v_params = __pyx_t_5;
16692     __pyx_t_5 = 0;
16693 
16694     /* "tables/indexesextension.pyx":664
16695  *       # not be duplicated (I know, this smells badly, but anyway).
16696  *       params = self._v_file.params
16697  *       rowsize = (self.bounds_ext._v_chunkshape[1] * dtype.itemsize)             # <<<<<<<<<<<<<<
16698  *       maxslots = params['BOUNDS_MAX_SIZE'] / rowsize
16699  *       self.boundscache = <NumCache>NumCache(
16700  */
16701     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->bounds_ext), __pyx_n_s_v_chunkshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
16702     __Pyx_GOTREF(__pyx_t_5);
16703     __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error)
16704     __Pyx_GOTREF(__pyx_t_1);
16705     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16706     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
16707     __Pyx_GOTREF(__pyx_t_5);
16708     __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
16709     __Pyx_GOTREF(__pyx_t_2);
16710     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16711     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16712     __pyx_v_rowsize = __pyx_t_2;
16713     __pyx_t_2 = 0;
16714 
16715     /* "tables/indexesextension.pyx":665
16716  *       params = self._v_file.params
16717  *       rowsize = (self.bounds_ext._v_chunkshape[1] * dtype.itemsize)
16718  *       maxslots = params['BOUNDS_MAX_SIZE'] / rowsize             # <<<<<<<<<<<<<<
16719  *       self.boundscache = <NumCache>NumCache(
16720  *         (maxslots, self.nbounds), dtype, 'non-opt types bounds')
16721  */
16722     __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_params, __pyx_n_s_BOUNDS_MAX_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
16723     __Pyx_GOTREF(__pyx_t_2);
16724     __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_v_rowsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 665, __pyx_L1_error)
16725     __Pyx_GOTREF(__pyx_t_5);
16726     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16727     __pyx_v_maxslots = __pyx_t_5;
16728     __pyx_t_5 = 0;
16729 
16730     /* "tables/indexesextension.pyx":667
16731  *       maxslots = params['BOUNDS_MAX_SIZE'] / rowsize
16732  *       self.boundscache = <NumCache>NumCache(
16733  *         (maxslots, self.nbounds), dtype, 'non-opt types bounds')             # <<<<<<<<<<<<<<
16734  *       self.bufferbc = numpy.empty(dtype=dtype, shape=self.nbounds)
16735  *       # Get the pointer for the internal buffer for 2nd level cache
16736  */
16737     __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->nbounds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)
16738     __Pyx_GOTREF(__pyx_t_5);
16739     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
16740     __Pyx_GOTREF(__pyx_t_2);
16741     __Pyx_INCREF(__pyx_v_maxslots);
16742     __Pyx_GIVEREF(__pyx_v_maxslots);
16743     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_maxslots);
16744     __Pyx_GIVEREF(__pyx_t_5);
16745     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
16746     __pyx_t_5 = 0;
16747 
16748     /* "tables/indexesextension.pyx":666
16749  *       rowsize = (self.bounds_ext._v_chunkshape[1] * dtype.itemsize)
16750  *       maxslots = params['BOUNDS_MAX_SIZE'] / rowsize
16751  *       self.boundscache = <NumCache>NumCache(             # <<<<<<<<<<<<<<
16752  *         (maxslots, self.nbounds), dtype, 'non-opt types bounds')
16753  *       self.bufferbc = numpy.empty(dtype=dtype, shape=self.nbounds)
16754  */
16755     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
16756     __Pyx_GOTREF(__pyx_t_5);
16757     __Pyx_GIVEREF(__pyx_t_2);
16758     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
16759     __Pyx_INCREF(__pyx_v_dtype);
16760     __Pyx_GIVEREF(__pyx_v_dtype);
16761     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_dtype);
16762     __Pyx_INCREF(__pyx_kp_s_non_opt_types_bounds);
16763     __Pyx_GIVEREF(__pyx_kp_s_non_opt_types_bounds);
16764     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_s_non_opt_types_bounds);
16765     __pyx_t_2 = 0;
16766     __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6tables_17lrucacheextension_NumCache), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
16767     __Pyx_GOTREF(__pyx_t_2);
16768     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16769     __pyx_t_5 = __pyx_t_2;
16770     __Pyx_INCREF(__pyx_t_5);
16771     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16772     __Pyx_GIVEREF(__pyx_t_5);
16773     __Pyx_GOTREF(__pyx_v_self->boundscache);
16774     __Pyx_DECREF(((PyObject *)__pyx_v_self->boundscache));
16775     __pyx_v_self->boundscache = ((struct __pyx_obj_6tables_17lrucacheextension_NumCache *)__pyx_t_5);
16776     __pyx_t_5 = 0;
16777 
16778     /* "tables/indexesextension.pyx":668
16779  *       self.boundscache = <NumCache>NumCache(
16780  *         (maxslots, self.nbounds), dtype, 'non-opt types bounds')
16781  *       self.bufferbc = numpy.empty(dtype=dtype, shape=self.nbounds)             # <<<<<<<<<<<<<<
16782  *       # Get the pointer for the internal buffer for 2nd level cache
16783  *       self.rbufbc = self.bufferbc.data
16784  */
16785     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error)
16786     __Pyx_GOTREF(__pyx_t_5);
16787     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
16788     __Pyx_GOTREF(__pyx_t_2);
16789     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16790     __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error)
16791     __Pyx_GOTREF(__pyx_t_5);
16792     if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_v_dtype) < 0) __PYX_ERR(0, 668, __pyx_L1_error)
16793     __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nbounds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
16794     __Pyx_GOTREF(__pyx_t_1);
16795     if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shape, __pyx_t_1) < 0) __PYX_ERR(0, 668, __pyx_L1_error)
16796     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16797     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
16798     __Pyx_GOTREF(__pyx_t_1);
16799     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16800     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16801     if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 668, __pyx_L1_error)
16802     __Pyx_GIVEREF(__pyx_t_1);
16803     __Pyx_GOTREF(__pyx_v_self->bufferbc);
16804     __Pyx_DECREF(((PyObject *)__pyx_v_self->bufferbc));
16805     __pyx_v_self->bufferbc = ((PyArrayObject *)__pyx_t_1);
16806     __pyx_t_1 = 0;
16807 
16808     /* "tables/indexesextension.pyx":670
16809  *       self.bufferbc = numpy.empty(dtype=dtype, shape=self.nbounds)
16810  *       # Get the pointer for the internal buffer for 2nd level cache
16811  *       self.rbufbc = self.bufferbc.data             # <<<<<<<<<<<<<<
16812  *       # Another NumCache for the sorted values
16813  *       rowsize = (self.chunksize*dtype.itemsize)
16814  */
16815     __pyx_t_6 = __pyx_v_self->bufferbc->data;
16816     __pyx_v_self->rbufbc = __pyx_t_6;
16817 
16818     /* "tables/indexesextension.pyx":672
16819  *       self.rbufbc = self.bufferbc.data
16820  *       # Another NumCache for the sorted values
16821  *       rowsize = (self.chunksize*dtype.itemsize)             # <<<<<<<<<<<<<<
16822  *       maxslots = params['SORTED_MAX_SIZE'] / (self.chunksize*dtype.itemsize)
16823  *       self.sortedcache = <NumCache>NumCache(
16824  */
16825     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_chunksize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
16826     __Pyx_GOTREF(__pyx_t_1);
16827     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error)
16828     __Pyx_GOTREF(__pyx_t_5);
16829     __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
16830     __Pyx_GOTREF(__pyx_t_2);
16831     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16832     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16833     __Pyx_DECREF_SET(__pyx_v_rowsize, __pyx_t_2);
16834     __pyx_t_2 = 0;
16835 
16836     /* "tables/indexesextension.pyx":673
16837  *       # Another NumCache for the sorted values
16838  *       rowsize = (self.chunksize*dtype.itemsize)
16839  *       maxslots = params['SORTED_MAX_SIZE'] / (self.chunksize*dtype.itemsize)             # <<<<<<<<<<<<<<
16840  *       self.sortedcache = <NumCache>NumCache(
16841  *         (maxslots, self.chunksize), dtype, 'sorted')
16842  */
16843     __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_params, __pyx_n_s_SORTED_MAX_SIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 673, __pyx_L1_error)
16844     __Pyx_GOTREF(__pyx_t_2);
16845     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_chunksize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
16846     __Pyx_GOTREF(__pyx_t_5);
16847     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
16848     __Pyx_GOTREF(__pyx_t_1);
16849     __pyx_t_9 = PyNumber_Multiply(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 673, __pyx_L1_error)
16850     __Pyx_GOTREF(__pyx_t_9);
16851     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16852     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16853     __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
16854     __Pyx_GOTREF(__pyx_t_1);
16855     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16856     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16857     __Pyx_DECREF_SET(__pyx_v_maxslots, __pyx_t_1);
16858     __pyx_t_1 = 0;
16859 
16860     /* "tables/indexesextension.pyx":675
16861  *       maxslots = params['SORTED_MAX_SIZE'] / (self.chunksize*dtype.itemsize)
16862  *       self.sortedcache = <NumCache>NumCache(
16863  *         (maxslots, self.chunksize), dtype, 'sorted')             # <<<<<<<<<<<<<<
16864  *
16865  *
16866  */
16867     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_chunksize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
16868     __Pyx_GOTREF(__pyx_t_1);
16869     __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 675, __pyx_L1_error)
16870     __Pyx_GOTREF(__pyx_t_9);
16871     __Pyx_INCREF(__pyx_v_maxslots);
16872     __Pyx_GIVEREF(__pyx_v_maxslots);
16873     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_maxslots);
16874     __Pyx_GIVEREF(__pyx_t_1);
16875     PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1);
16876     __pyx_t_1 = 0;
16877 
16878     /* "tables/indexesextension.pyx":674
16879  *       rowsize = (self.chunksize*dtype.itemsize)
16880  *       maxslots = params['SORTED_MAX_SIZE'] / (self.chunksize*dtype.itemsize)
16881  *       self.sortedcache = <NumCache>NumCache(             # <<<<<<<<<<<<<<
16882  *         (maxslots, self.chunksize), dtype, 'sorted')
16883  *
16884  */
16885     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
16886     __Pyx_GOTREF(__pyx_t_1);
16887     __Pyx_GIVEREF(__pyx_t_9);
16888     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
16889     __Pyx_INCREF(__pyx_v_dtype);
16890     __Pyx_GIVEREF(__pyx_v_dtype);
16891     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_dtype);
16892     __Pyx_INCREF(__pyx_n_s_sorted);
16893     __Pyx_GIVEREF(__pyx_n_s_sorted);
16894     PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_sorted);
16895     __pyx_t_9 = 0;
16896     __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6tables_17lrucacheextension_NumCache), __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 674, __pyx_L1_error)
16897     __Pyx_GOTREF(__pyx_t_9);
16898     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16899     __pyx_t_1 = __pyx_t_9;
16900     __Pyx_INCREF(__pyx_t_1);
16901     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16902     __Pyx_GIVEREF(__pyx_t_1);
16903     __Pyx_GOTREF(__pyx_v_self->sortedcache);
16904     __Pyx_DECREF(((PyObject *)__pyx_v_self->sortedcache));
16905     __pyx_v_self->sortedcache = ((struct __pyx_obj_6tables_17lrucacheextension_NumCache *)__pyx_t_1);
16906     __pyx_t_1 = 0;
16907 
16908     /* "tables/indexesextension.pyx":658
16909  *     self.bounds_ext = <CacheArray>index.bounds
16910  *     self.bounds_ext.initread(self.nbounds)
16911  *     if str(dtype) in self._v_parent.opt_search_types:             # <<<<<<<<<<<<<<
16912  *       # The next caches should be defined only for optimized search types.
16913  *       # The 2nd level cache will replace the already existing ObjectCache and
16914  */
16915   }
16916 
16917   /* "tables/indexesextension.pyx":619
16918  *
16919  *
16920  *   def _init_sorted_slice(self, index):             # <<<<<<<<<<<<<<
16921  *     """Initialize the structures for doing a binary search."""
16922  *
16923  */
16924 
16925   /* function exit code */
16926   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16927   goto __pyx_L0;
16928   __pyx_L1_error:;
16929   __Pyx_XDECREF(__pyx_t_1);
16930   __Pyx_XDECREF(__pyx_t_2);
16931   __Pyx_XDECREF(__pyx_t_5);
16932   __Pyx_XDECREF(__pyx_t_9);
16933   __Pyx_AddTraceback("tables.indexesextension.IndexArray._init_sorted_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16934   __pyx_r = NULL;
16935   __pyx_L0:;
16936   __Pyx_XDECREF((PyObject *)__pyx_v_starts);
16937   __Pyx_XDECREF((PyObject *)__pyx_v_lengths);
16938   __Pyx_XDECREF((PyObject *)__pyx_v_rvcache);
16939   __Pyx_XDECREF(__pyx_v_maxslots);
16940   __Pyx_XDECREF(__pyx_v_rowsize);
16941   __Pyx_XDECREF(__pyx_v_dtype);
16942   __Pyx_XDECREF(__pyx_v_params);
16943   __Pyx_XGIVEREF(__pyx_r);
16944   __Pyx_RefNannyFinishContext();
16945   return __pyx_r;
16946 }
16947 
16948 /* "tables/indexesextension.pyx":679
16949  *
16950  *
16951  *   cdef void *_g_read_sorted_slice(self, hsize_t irow, hsize_t start,             # <<<<<<<<<<<<<<
16952  *                                 hsize_t stop):
16953  *     """Read the sorted part of an index."""
16954  */
16955 
__pyx_f_6tables_16indexesextension_10IndexArray__g_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,hsize_t __pyx_v_irow,hsize_t __pyx_v_start,hsize_t __pyx_v_stop)16956 static void *__pyx_f_6tables_16indexesextension_10IndexArray__g_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, hsize_t __pyx_v_irow, hsize_t __pyx_v_start, hsize_t __pyx_v_stop) {
16957   herr_t __pyx_v_ret;
16958   void *__pyx_r;
16959   __Pyx_RefNannyDeclarations
16960   int __pyx_t_1;
16961   PyObject *__pyx_t_2 = NULL;
16962   PyObject *__pyx_t_3 = NULL;
16963   PyObject *__pyx_t_4 = NULL;
16964   __Pyx_RefNannySetupContext("_g_read_sorted_slice", 0);
16965 
16966   /* "tables/indexesextension.pyx":683
16967  *     """Read the sorted part of an index."""
16968  *
16969  *     with nogil:             # <<<<<<<<<<<<<<
16970  *         ret = H5ARRAYOread_readSortedSlice(
16971  *           self.dataset_id, self.mem_space_id, self.type_id,
16972  */
16973   {
16974       #ifdef WITH_THREAD
16975       PyThreadState *_save;
16976       Py_UNBLOCK_THREADS
16977       __Pyx_FastGIL_Remember();
16978       #endif
16979       /*try:*/ {
16980 
16981         /* "tables/indexesextension.pyx":684
16982  *
16983  *     with nogil:
16984  *         ret = H5ARRAYOread_readSortedSlice(             # <<<<<<<<<<<<<<
16985  *           self.dataset_id, self.mem_space_id, self.type_id,
16986  *           irow, start, stop, self.rbuflb)
16987  */
16988         __pyx_v_ret = H5ARRAYOread_readSortedSlice(__pyx_v_self->__pyx_base.__pyx_base.dataset_id, __pyx_v_self->mem_space_id, __pyx_v_self->__pyx_base.__pyx_base.type_id, __pyx_v_irow, __pyx_v_start, __pyx_v_stop, __pyx_v_self->rbuflb);
16989       }
16990 
16991       /* "tables/indexesextension.pyx":683
16992  *     """Read the sorted part of an index."""
16993  *
16994  *     with nogil:             # <<<<<<<<<<<<<<
16995  *         ret = H5ARRAYOread_readSortedSlice(
16996  *           self.dataset_id, self.mem_space_id, self.type_id,
16997  */
16998       /*finally:*/ {
16999         /*normal exit:*/{
17000           #ifdef WITH_THREAD
17001           __Pyx_FastGIL_Forget();
17002           Py_BLOCK_THREADS
17003           #endif
17004           goto __pyx_L5;
17005         }
17006         __pyx_L5:;
17007       }
17008   }
17009 
17010   /* "tables/indexesextension.pyx":688
17011  *           irow, start, stop, self.rbuflb)
17012  *
17013  *     if ret < 0:             # <<<<<<<<<<<<<<
17014  *       raise HDF5ExtError("Problems reading the array data.")
17015  *
17016  */
17017   __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
17018   if (unlikely(__pyx_t_1)) {
17019 
17020     /* "tables/indexesextension.pyx":689
17021  *
17022  *     if ret < 0:
17023  *       raise HDF5ExtError("Problems reading the array data.")             # <<<<<<<<<<<<<<
17024  *
17025  *     return self.rbuflb
17026  */
17027     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
17028     __Pyx_GOTREF(__pyx_t_3);
17029     __pyx_t_4 = NULL;
17030     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
17031       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
17032       if (likely(__pyx_t_4)) {
17033         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17034         __Pyx_INCREF(__pyx_t_4);
17035         __Pyx_INCREF(function);
17036         __Pyx_DECREF_SET(__pyx_t_3, function);
17037       }
17038     }
17039     __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Problems_reading_the_array_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Problems_reading_the_array_data);
17040     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17041     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
17042     __Pyx_GOTREF(__pyx_t_2);
17043     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17044     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
17045     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17046     __PYX_ERR(0, 689, __pyx_L1_error)
17047 
17048     /* "tables/indexesextension.pyx":688
17049  *           irow, start, stop, self.rbuflb)
17050  *
17051  *     if ret < 0:             # <<<<<<<<<<<<<<
17052  *       raise HDF5ExtError("Problems reading the array data.")
17053  *
17054  */
17055   }
17056 
17057   /* "tables/indexesextension.pyx":691
17058  *       raise HDF5ExtError("Problems reading the array data.")
17059  *
17060  *     return self.rbuflb             # <<<<<<<<<<<<<<
17061  *
17062  *   # can't time machine since this function is cdef'd
17063  */
17064   __pyx_r = __pyx_v_self->rbuflb;
17065   goto __pyx_L0;
17066 
17067   /* "tables/indexesextension.pyx":679
17068  *
17069  *
17070  *   cdef void *_g_read_sorted_slice(self, hsize_t irow, hsize_t start,             # <<<<<<<<<<<<<<
17071  *                                 hsize_t stop):
17072  *     """Read the sorted part of an index."""
17073  */
17074 
17075   /* function exit code */
17076   __pyx_L1_error:;
17077   __Pyx_XDECREF(__pyx_t_2);
17078   __Pyx_XDECREF(__pyx_t_3);
17079   __Pyx_XDECREF(__pyx_t_4);
17080   __Pyx_WriteUnraisable("tables.indexesextension.IndexArray._g_read_sorted_slice", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
17081   __pyx_r = 0;
17082   __pyx_L0:;
17083   __Pyx_RefNannyFinishContext();
17084   return __pyx_r;
17085 }
17086 
17087 /* "tables/indexesextension.pyx":697
17088  *
17089  *   # This is callable from python
17090  *   def _read_sorted_slice(self, hsize_t irow, hsize_t start, hsize_t stop):             # <<<<<<<<<<<<<<
17091  *     """Read the sorted part of an index."""
17092  *
17093  */
17094 
17095 /* Python wrapper */
17096 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_5_read_sorted_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17097 static char __pyx_doc_6tables_16indexesextension_10IndexArray_4_read_sorted_slice[] = "Read the sorted part of an index.";
__pyx_pw_6tables_16indexesextension_10IndexArray_5_read_sorted_slice(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)17098 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_5_read_sorted_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17099   hsize_t __pyx_v_irow;
17100   hsize_t __pyx_v_start;
17101   hsize_t __pyx_v_stop;
17102   PyObject *__pyx_r = 0;
17103   __Pyx_RefNannyDeclarations
17104   __Pyx_RefNannySetupContext("_read_sorted_slice (wrapper)", 0);
17105   {
17106     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_irow,&__pyx_n_s_start,&__pyx_n_s_stop,0};
17107     PyObject* values[3] = {0,0,0};
17108     if (unlikely(__pyx_kwds)) {
17109       Py_ssize_t kw_args;
17110       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17111       switch (pos_args) {
17112         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17113         CYTHON_FALLTHROUGH;
17114         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17115         CYTHON_FALLTHROUGH;
17116         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17117         CYTHON_FALLTHROUGH;
17118         case  0: break;
17119         default: goto __pyx_L5_argtuple_error;
17120       }
17121       kw_args = PyDict_Size(__pyx_kwds);
17122       switch (pos_args) {
17123         case  0:
17124         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_irow)) != 0)) kw_args--;
17125         else goto __pyx_L5_argtuple_error;
17126         CYTHON_FALLTHROUGH;
17127         case  1:
17128         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
17129         else {
17130           __Pyx_RaiseArgtupleInvalid("_read_sorted_slice", 1, 3, 3, 1); __PYX_ERR(0, 697, __pyx_L3_error)
17131         }
17132         CYTHON_FALLTHROUGH;
17133         case  2:
17134         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stop)) != 0)) kw_args--;
17135         else {
17136           __Pyx_RaiseArgtupleInvalid("_read_sorted_slice", 1, 3, 3, 2); __PYX_ERR(0, 697, __pyx_L3_error)
17137         }
17138       }
17139       if (unlikely(kw_args > 0)) {
17140         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_read_sorted_slice") < 0)) __PYX_ERR(0, 697, __pyx_L3_error)
17141       }
17142     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
17143       goto __pyx_L5_argtuple_error;
17144     } else {
17145       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17146       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17147       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17148     }
17149     __pyx_v_irow = __Pyx_PyInt_As_hsize_t(values[0]); if (unlikely((__pyx_v_irow == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
17150     __pyx_v_start = __Pyx_PyInt_As_hsize_t(values[1]); if (unlikely((__pyx_v_start == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
17151     __pyx_v_stop = __Pyx_PyInt_As_hsize_t(values[2]); if (unlikely((__pyx_v_stop == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L3_error)
17152   }
17153   goto __pyx_L4_argument_unpacking_done;
17154   __pyx_L5_argtuple_error:;
17155   __Pyx_RaiseArgtupleInvalid("_read_sorted_slice", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 697, __pyx_L3_error)
17156   __pyx_L3_error:;
17157   __Pyx_AddTraceback("tables.indexesextension.IndexArray._read_sorted_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
17158   __Pyx_RefNannyFinishContext();
17159   return NULL;
17160   __pyx_L4_argument_unpacking_done:;
17161   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_4_read_sorted_slice(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_irow, __pyx_v_start, __pyx_v_stop);
17162 
17163   /* function exit code */
17164   __Pyx_RefNannyFinishContext();
17165   return __pyx_r;
17166 }
17167 
__pyx_pf_6tables_16indexesextension_10IndexArray_4_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,hsize_t __pyx_v_irow,hsize_t __pyx_v_start,hsize_t __pyx_v_stop)17168 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_4_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, hsize_t __pyx_v_irow, hsize_t __pyx_v_start, hsize_t __pyx_v_stop) {
17169   PyObject *__pyx_r = NULL;
17170   __Pyx_RefNannyDeclarations
17171   __Pyx_RefNannySetupContext("_read_sorted_slice", 0);
17172 
17173   /* "tables/indexesextension.pyx":700
17174  *     """Read the sorted part of an index."""
17175  *
17176  *     self._g_read_sorted_slice(irow, start, stop)             # <<<<<<<<<<<<<<
17177  *     return self.bufferlb
17178  *
17179  */
17180   (void)(((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_g_read_sorted_slice(__pyx_v_self, __pyx_v_irow, __pyx_v_start, __pyx_v_stop));
17181 
17182   /* "tables/indexesextension.pyx":701
17183  *
17184  *     self._g_read_sorted_slice(irow, start, stop)
17185  *     return self.bufferlb             # <<<<<<<<<<<<<<
17186  *
17187  *
17188  */
17189   __Pyx_XDECREF(__pyx_r);
17190   __Pyx_INCREF(((PyObject *)__pyx_v_self->bufferlb));
17191   __pyx_r = ((PyObject *)__pyx_v_self->bufferlb);
17192   goto __pyx_L0;
17193 
17194   /* "tables/indexesextension.pyx":697
17195  *
17196  *   # This is callable from python
17197  *   def _read_sorted_slice(self, hsize_t irow, hsize_t start, hsize_t stop):             # <<<<<<<<<<<<<<
17198  *     """Read the sorted part of an index."""
17199  *
17200  */
17201 
17202   /* function exit code */
17203   __pyx_L0:;
17204   __Pyx_XGIVEREF(__pyx_r);
17205   __Pyx_RefNannyFinishContext();
17206   return __pyx_r;
17207 }
17208 
17209 /* "tables/indexesextension.pyx":704
17210  *
17211  *
17212  *   cdef void *get_lru_bounds(self, int nrow, int nbounds):             # <<<<<<<<<<<<<<
17213  *     """Get the bounds from the cache, or read them."""
17214  *
17215  */
17216 
__pyx_f_6tables_16indexesextension_10IndexArray_get_lru_bounds(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,int __pyx_v_nrow,int __pyx_v_nbounds)17217 static void *__pyx_f_6tables_16indexesextension_10IndexArray_get_lru_bounds(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, int __pyx_v_nrow, int __pyx_v_nbounds) {
17218   void *__pyx_v_vpointer;
17219   long __pyx_v_nslot;
17220   void *__pyx_r;
17221   __Pyx_RefNannyDeclarations
17222   int __pyx_t_1;
17223   PyObject *__pyx_t_2 = NULL;
17224   void *__pyx_t_3;
17225   __Pyx_RefNannySetupContext("get_lru_bounds", 0);
17226 
17227   /* "tables/indexesextension.pyx":710
17228  *     cdef long nslot
17229  *
17230  *     nslot = self.boundscache.getslot_(nrow)             # <<<<<<<<<<<<<<
17231  *     if nslot >= 0:
17232  *       vpointer = self.boundscache.getitem1_(nslot)
17233  */
17234   __pyx_v_nslot = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_self->boundscache->__pyx_base.__pyx_vtab)->getslot_(__pyx_v_self->boundscache, __pyx_v_nrow);
17235 
17236   /* "tables/indexesextension.pyx":711
17237  *
17238  *     nslot = self.boundscache.getslot_(nrow)
17239  *     if nslot >= 0:             # <<<<<<<<<<<<<<
17240  *       vpointer = self.boundscache.getitem1_(nslot)
17241  *     else:
17242  */
17243   __pyx_t_1 = ((__pyx_v_nslot >= 0) != 0);
17244   if (__pyx_t_1) {
17245 
17246     /* "tables/indexesextension.pyx":712
17247  *     nslot = self.boundscache.getslot_(nrow)
17248  *     if nslot >= 0:
17249  *       vpointer = self.boundscache.getitem1_(nslot)             # <<<<<<<<<<<<<<
17250  *     else:
17251  *       # Bounds row is not in cache. Read it and put it in the LRU cache.
17252  */
17253     __pyx_v_vpointer = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_self->boundscache->__pyx_base.__pyx_vtab)->getitem1_(__pyx_v_self->boundscache, __pyx_v_nslot);
17254 
17255     /* "tables/indexesextension.pyx":711
17256  *
17257  *     nslot = self.boundscache.getslot_(nrow)
17258  *     if nslot >= 0:             # <<<<<<<<<<<<<<
17259  *       vpointer = self.boundscache.getitem1_(nslot)
17260  *     else:
17261  */
17262     goto __pyx_L3;
17263   }
17264 
17265   /* "tables/indexesextension.pyx":715
17266  *     else:
17267  *       # Bounds row is not in cache. Read it and put it in the LRU cache.
17268  *       self.bounds_ext.read_slice(nrow, 0, nbounds, self.rbufbc)             # <<<<<<<<<<<<<<
17269  *       self.boundscache.setitem_(nrow, self.rbufbc, 0)
17270  *       vpointer = self.rbufbc
17271  */
17272   /*else*/ {
17273     __pyx_t_2 = ((struct __pyx_vtabstruct_6tables_16indexesextension_CacheArray *)__pyx_v_self->bounds_ext->__pyx_base.__pyx_base.__pyx_vtab)->read_slice(__pyx_v_self->bounds_ext, __pyx_v_nrow, 0, __pyx_v_nbounds, __pyx_v_self->rbufbc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
17274     __Pyx_GOTREF(__pyx_t_2);
17275     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17276 
17277     /* "tables/indexesextension.pyx":716
17278  *       # Bounds row is not in cache. Read it and put it in the LRU cache.
17279  *       self.bounds_ext.read_slice(nrow, 0, nbounds, self.rbufbc)
17280  *       self.boundscache.setitem_(nrow, self.rbufbc, 0)             # <<<<<<<<<<<<<<
17281  *       vpointer = self.rbufbc
17282  *     return vpointer
17283  */
17284     (void)(((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_self->boundscache->__pyx_base.__pyx_vtab)->setitem_(__pyx_v_self->boundscache, __pyx_v_nrow, __pyx_v_self->rbufbc, 0));
17285 
17286     /* "tables/indexesextension.pyx":717
17287  *       self.bounds_ext.read_slice(nrow, 0, nbounds, self.rbufbc)
17288  *       self.boundscache.setitem_(nrow, self.rbufbc, 0)
17289  *       vpointer = self.rbufbc             # <<<<<<<<<<<<<<
17290  *     return vpointer
17291  *
17292  */
17293     __pyx_t_3 = __pyx_v_self->rbufbc;
17294     __pyx_v_vpointer = __pyx_t_3;
17295   }
17296   __pyx_L3:;
17297 
17298   /* "tables/indexesextension.pyx":718
17299  *       self.boundscache.setitem_(nrow, self.rbufbc, 0)
17300  *       vpointer = self.rbufbc
17301  *     return vpointer             # <<<<<<<<<<<<<<
17302  *
17303  *   # can't time machine since get_lru_bounds() function is cdef'd
17304  */
17305   __pyx_r = __pyx_v_vpointer;
17306   goto __pyx_L0;
17307 
17308   /* "tables/indexesextension.pyx":704
17309  *
17310  *
17311  *   cdef void *get_lru_bounds(self, int nrow, int nbounds):             # <<<<<<<<<<<<<<
17312  *     """Get the bounds from the cache, or read them."""
17313  *
17314  */
17315 
17316   /* function exit code */
17317   __pyx_L1_error:;
17318   __Pyx_XDECREF(__pyx_t_2);
17319   __Pyx_WriteUnraisable("tables.indexesextension.IndexArray.get_lru_bounds", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
17320   __pyx_r = 0;
17321   __pyx_L0:;
17322   __Pyx_RefNannyFinishContext();
17323   return __pyx_r;
17324 }
17325 
17326 /* "tables/indexesextension.pyx":722
17327  *   # can't time machine since get_lru_bounds() function is cdef'd
17328  *
17329  *   cdef void *get_lru_sorted(self, int nrow, int ncs, int nchunk, int cs):             # <<<<<<<<<<<<<<
17330  *     """Get the sorted row from the cache or read it."""
17331  *
17332  */
17333 
__pyx_f_6tables_16indexesextension_10IndexArray_get_lru_sorted(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,int __pyx_v_nrow,int __pyx_v_ncs,int __pyx_v_nchunk,int __pyx_v_cs)17334 static void *__pyx_f_6tables_16indexesextension_10IndexArray_get_lru_sorted(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, int __pyx_v_nrow, int __pyx_v_ncs, int __pyx_v_nchunk, int __pyx_v_cs) {
17335   void *__pyx_v_vpointer;
17336   npy_int64 __pyx_v_nckey;
17337   long __pyx_v_nslot;
17338   hsize_t __pyx_v_start;
17339   hsize_t __pyx_v_stop;
17340   void *__pyx_r;
17341   __Pyx_RefNannyDeclarations
17342   int __pyx_t_1;
17343   __Pyx_RefNannySetupContext("get_lru_sorted", 0);
17344 
17345   /* "tables/indexesextension.pyx":731
17346  *
17347  *     # Compute the number of chunk read and use it as the key for the cache.
17348  *     nckey = nrow*ncs+nchunk             # <<<<<<<<<<<<<<
17349  *     nslot = self.sortedcache.getslot_(nckey)
17350  *     if nslot >= 0:
17351  */
17352   __pyx_v_nckey = ((__pyx_v_nrow * __pyx_v_ncs) + __pyx_v_nchunk);
17353 
17354   /* "tables/indexesextension.pyx":732
17355  *     # Compute the number of chunk read and use it as the key for the cache.
17356  *     nckey = nrow*ncs+nchunk
17357  *     nslot = self.sortedcache.getslot_(nckey)             # <<<<<<<<<<<<<<
17358  *     if nslot >= 0:
17359  *       vpointer = self.sortedcache.getitem1_(nslot)
17360  */
17361   __pyx_v_nslot = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_self->sortedcache->__pyx_base.__pyx_vtab)->getslot_(__pyx_v_self->sortedcache, __pyx_v_nckey);
17362 
17363   /* "tables/indexesextension.pyx":733
17364  *     nckey = nrow*ncs+nchunk
17365  *     nslot = self.sortedcache.getslot_(nckey)
17366  *     if nslot >= 0:             # <<<<<<<<<<<<<<
17367  *       vpointer = self.sortedcache.getitem1_(nslot)
17368  *     else:
17369  */
17370   __pyx_t_1 = ((__pyx_v_nslot >= 0) != 0);
17371   if (__pyx_t_1) {
17372 
17373     /* "tables/indexesextension.pyx":734
17374  *     nslot = self.sortedcache.getslot_(nckey)
17375  *     if nslot >= 0:
17376  *       vpointer = self.sortedcache.getitem1_(nslot)             # <<<<<<<<<<<<<<
17377  *     else:
17378  *       # The sorted chunk is not in cache. Read it and put it in the LRU cache.
17379  */
17380     __pyx_v_vpointer = ((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_self->sortedcache->__pyx_base.__pyx_vtab)->getitem1_(__pyx_v_self->sortedcache, __pyx_v_nslot);
17381 
17382     /* "tables/indexesextension.pyx":733
17383  *     nckey = nrow*ncs+nchunk
17384  *     nslot = self.sortedcache.getslot_(nckey)
17385  *     if nslot >= 0:             # <<<<<<<<<<<<<<
17386  *       vpointer = self.sortedcache.getitem1_(nslot)
17387  *     else:
17388  */
17389     goto __pyx_L3;
17390   }
17391 
17392   /* "tables/indexesextension.pyx":737
17393  *     else:
17394  *       # The sorted chunk is not in cache. Read it and put it in the LRU cache.
17395  *       start = cs*nchunk             # <<<<<<<<<<<<<<
17396  *       stop = cs*(nchunk+1)
17397  *       vpointer = self._g_read_sorted_slice(nrow, start, stop)
17398  */
17399   /*else*/ {
17400     __pyx_v_start = (__pyx_v_cs * __pyx_v_nchunk);
17401 
17402     /* "tables/indexesextension.pyx":738
17403  *       # The sorted chunk is not in cache. Read it and put it in the LRU cache.
17404  *       start = cs*nchunk
17405  *       stop = cs*(nchunk+1)             # <<<<<<<<<<<<<<
17406  *       vpointer = self._g_read_sorted_slice(nrow, start, stop)
17407  *       self.sortedcache.setitem_(nckey, vpointer, 0)
17408  */
17409     __pyx_v_stop = (__pyx_v_cs * (__pyx_v_nchunk + 1));
17410 
17411     /* "tables/indexesextension.pyx":739
17412  *       start = cs*nchunk
17413  *       stop = cs*(nchunk+1)
17414  *       vpointer = self._g_read_sorted_slice(nrow, start, stop)             # <<<<<<<<<<<<<<
17415  *       self.sortedcache.setitem_(nckey, vpointer, 0)
17416  *     return vpointer
17417  */
17418     __pyx_v_vpointer = ((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_g_read_sorted_slice(__pyx_v_self, __pyx_v_nrow, __pyx_v_start, __pyx_v_stop);
17419 
17420     /* "tables/indexesextension.pyx":740
17421  *       stop = cs*(nchunk+1)
17422  *       vpointer = self._g_read_sorted_slice(nrow, start, stop)
17423  *       self.sortedcache.setitem_(nckey, vpointer, 0)             # <<<<<<<<<<<<<<
17424  *     return vpointer
17425  *
17426  */
17427     (void)(((struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache *)__pyx_v_self->sortedcache->__pyx_base.__pyx_vtab)->setitem_(__pyx_v_self->sortedcache, __pyx_v_nckey, __pyx_v_vpointer, 0));
17428   }
17429   __pyx_L3:;
17430 
17431   /* "tables/indexesextension.pyx":741
17432  *       vpointer = self._g_read_sorted_slice(nrow, start, stop)
17433  *       self.sortedcache.setitem_(nckey, vpointer, 0)
17434  *     return vpointer             # <<<<<<<<<<<<<<
17435  *
17436  *   # can't time machine since get_lru_sorted() function is cdef'd
17437  */
17438   __pyx_r = __pyx_v_vpointer;
17439   goto __pyx_L0;
17440 
17441   /* "tables/indexesextension.pyx":722
17442  *   # can't time machine since get_lru_bounds() function is cdef'd
17443  *
17444  *   cdef void *get_lru_sorted(self, int nrow, int ncs, int nchunk, int cs):             # <<<<<<<<<<<<<<
17445  *     """Get the sorted row from the cache or read it."""
17446  *
17447  */
17448 
17449   /* function exit code */
17450   __pyx_L0:;
17451   __Pyx_RefNannyFinishContext();
17452   return __pyx_r;
17453 }
17454 
17455 /* "tables/indexesextension.pyx":746
17456  *
17457  *   # Optimized version for int8
17458  *   def _search_bin_na_b(self, long item1, long item2):             # <<<<<<<<<<<<<<
17459  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
17460  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
17461  */
17462 
17463 /* Python wrapper */
17464 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_7_search_bin_na_b(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_7_search_bin_na_b(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)17465 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_7_search_bin_na_b(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17466   long __pyx_v_item1;
17467   long __pyx_v_item2;
17468   PyObject *__pyx_r = 0;
17469   __Pyx_RefNannyDeclarations
17470   __Pyx_RefNannySetupContext("_search_bin_na_b (wrapper)", 0);
17471   {
17472     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
17473     PyObject* values[2] = {0,0};
17474     if (unlikely(__pyx_kwds)) {
17475       Py_ssize_t kw_args;
17476       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17477       switch (pos_args) {
17478         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17479         CYTHON_FALLTHROUGH;
17480         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17481         CYTHON_FALLTHROUGH;
17482         case  0: break;
17483         default: goto __pyx_L5_argtuple_error;
17484       }
17485       kw_args = PyDict_Size(__pyx_kwds);
17486       switch (pos_args) {
17487         case  0:
17488         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
17489         else goto __pyx_L5_argtuple_error;
17490         CYTHON_FALLTHROUGH;
17491         case  1:
17492         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
17493         else {
17494           __Pyx_RaiseArgtupleInvalid("_search_bin_na_b", 1, 2, 2, 1); __PYX_ERR(0, 746, __pyx_L3_error)
17495         }
17496       }
17497       if (unlikely(kw_args > 0)) {
17498         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_b") < 0)) __PYX_ERR(0, 746, __pyx_L3_error)
17499       }
17500     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17501       goto __pyx_L5_argtuple_error;
17502     } else {
17503       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17504       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17505     }
17506     __pyx_v_item1 = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_item1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error)
17507     __pyx_v_item2 = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_item2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error)
17508   }
17509   goto __pyx_L4_argument_unpacking_done;
17510   __pyx_L5_argtuple_error:;
17511   __Pyx_RaiseArgtupleInvalid("_search_bin_na_b", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 746, __pyx_L3_error)
17512   __pyx_L3_error:;
17513   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_b", __pyx_clineno, __pyx_lineno, __pyx_filename);
17514   __Pyx_RefNannyFinishContext();
17515   return NULL;
17516   __pyx_L4_argument_unpacking_done:;
17517   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_6_search_bin_na_b(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
17518 
17519   /* function exit code */
17520   __Pyx_RefNannyFinishContext();
17521   return __pyx_r;
17522 }
17523 
__pyx_pf_6tables_16indexesextension_10IndexArray_6_search_bin_na_b(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,long __pyx_v_item1,long __pyx_v_item2)17524 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_6_search_bin_na_b(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2) {
17525   int __pyx_v_cs;
17526   int __pyx_v_ss;
17527   int __pyx_v_ncs;
17528   int __pyx_v_nrow;
17529   int __pyx_v_nrows;
17530   int __pyx_v_nbounds;
17531   int __pyx_v_rvrow;
17532   int __pyx_v_start;
17533   int __pyx_v_stop;
17534   int __pyx_v_tlength;
17535   int __pyx_v_length;
17536   int __pyx_v_bread;
17537   int __pyx_v_nchunk;
17538   int __pyx_v_nchunk2;
17539   int *__pyx_v_rbufst;
17540   int *__pyx_v_rbufln;
17541   npy_int8 *__pyx_v_rbufrv;
17542   npy_int8 *__pyx_v_rbufbc;
17543   npy_int8 *__pyx_v_rbuflb;
17544   PyObject *__pyx_r = NULL;
17545   __Pyx_RefNannyDeclarations
17546   int __pyx_t_1;
17547   PyObject *__pyx_t_2 = NULL;
17548   int __pyx_t_3;
17549   __Pyx_RefNannySetupContext("_search_bin_na_b", 0);
17550 
17551   /* "tables/indexesextension.pyx":754
17552  *     # Variables with specific type
17553  *     cdef npy_int8 *rbufrv
17554  *     cdef npy_int8 *rbufbc = NULL             # <<<<<<<<<<<<<<
17555  *     cdef npy_int8 *rbuflb = NULL
17556  *
17557  */
17558   __pyx_v_rbufbc = NULL;
17559 
17560   /* "tables/indexesextension.pyx":755
17561  *     cdef npy_int8 *rbufrv
17562  *     cdef npy_int8 *rbufbc = NULL
17563  *     cdef npy_int8 *rbuflb = NULL             # <<<<<<<<<<<<<<
17564  *
17565  *     cs = self.l_chunksize
17566  */
17567   __pyx_v_rbuflb = NULL;
17568 
17569   /* "tables/indexesextension.pyx":757
17570  *     cdef npy_int8 *rbuflb = NULL
17571  *
17572  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
17573  *     ss = self.l_slicesize
17574  *     ncs = ss / cs
17575  */
17576   __pyx_t_1 = __pyx_v_self->l_chunksize;
17577   __pyx_v_cs = __pyx_t_1;
17578 
17579   /* "tables/indexesextension.pyx":758
17580  *
17581  *     cs = self.l_chunksize
17582  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
17583  *     ncs = ss / cs
17584  *     nbounds = self.nbounds
17585  */
17586   __pyx_t_1 = __pyx_v_self->l_slicesize;
17587   __pyx_v_ss = __pyx_t_1;
17588 
17589   /* "tables/indexesextension.pyx":759
17590  *     cs = self.l_chunksize
17591  *     ss = self.l_slicesize
17592  *     ncs = ss / cs             # <<<<<<<<<<<<<<
17593  *     nbounds = self.nbounds
17594  *     nrows = self.nrows
17595  */
17596   if (unlikely(__pyx_v_cs == 0)) {
17597     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
17598     __PYX_ERR(0, 759, __pyx_L1_error)
17599   }
17600   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
17601     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
17602     __PYX_ERR(0, 759, __pyx_L1_error)
17603   }
17604   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
17605 
17606   /* "tables/indexesextension.pyx":760
17607  *     ss = self.l_slicesize
17608  *     ncs = ss / cs
17609  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
17610  *     nrows = self.nrows
17611  *     rbufst = <int *>self.rbufst
17612  */
17613   __pyx_t_1 = __pyx_v_self->nbounds;
17614   __pyx_v_nbounds = __pyx_t_1;
17615 
17616   /* "tables/indexesextension.pyx":761
17617  *     ncs = ss / cs
17618  *     nbounds = self.nbounds
17619  *     nrows = self.nrows             # <<<<<<<<<<<<<<
17620  *     rbufst = <int *>self.rbufst
17621  *     rbufln = <int *>self.rbufln
17622  */
17623   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error)
17624   __Pyx_GOTREF(__pyx_t_2);
17625   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error)
17626   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17627   __pyx_v_nrows = __pyx_t_1;
17628 
17629   /* "tables/indexesextension.pyx":762
17630  *     nbounds = self.nbounds
17631  *     nrows = self.nrows
17632  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
17633  *     rbufln = <int *>self.rbufln
17634  *     rbufrv = <npy_int8 *>self.rbufrv
17635  */
17636   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
17637 
17638   /* "tables/indexesextension.pyx":763
17639  *     nrows = self.nrows
17640  *     rbufst = <int *>self.rbufst
17641  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
17642  *     rbufrv = <npy_int8 *>self.rbufrv
17643  *     tlength = 0
17644  */
17645   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
17646 
17647   /* "tables/indexesextension.pyx":764
17648  *     rbufst = <int *>self.rbufst
17649  *     rbufln = <int *>self.rbufln
17650  *     rbufrv = <npy_int8 *>self.rbufrv             # <<<<<<<<<<<<<<
17651  *     tlength = 0
17652  *     for nrow from 0 <= nrow < nrows:
17653  */
17654   __pyx_v_rbufrv = ((npy_int8 *)__pyx_v_self->rbufrv);
17655 
17656   /* "tables/indexesextension.pyx":765
17657  *     rbufln = <int *>self.rbufln
17658  *     rbufrv = <npy_int8 *>self.rbufrv
17659  *     tlength = 0             # <<<<<<<<<<<<<<
17660  *     for nrow from 0 <= nrow < nrows:
17661  *       rvrow = nrow*2
17662  */
17663   __pyx_v_tlength = 0;
17664 
17665   /* "tables/indexesextension.pyx":766
17666  *     rbufrv = <npy_int8 *>self.rbufrv
17667  *     tlength = 0
17668  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
17669  *       rvrow = nrow*2
17670  *       bread = 0
17671  */
17672   __pyx_t_1 = __pyx_v_nrows;
17673   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
17674 
17675     /* "tables/indexesextension.pyx":767
17676  *     tlength = 0
17677  *     for nrow from 0 <= nrow < nrows:
17678  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
17679  *       bread = 0
17680  *       nchunk = -1
17681  */
17682     __pyx_v_rvrow = (__pyx_v_nrow * 2);
17683 
17684     /* "tables/indexesextension.pyx":768
17685  *     for nrow from 0 <= nrow < nrows:
17686  *       rvrow = nrow*2
17687  *       bread = 0             # <<<<<<<<<<<<<<
17688  *       nchunk = -1
17689  *
17690  */
17691     __pyx_v_bread = 0;
17692 
17693     /* "tables/indexesextension.pyx":769
17694  *       rvrow = nrow*2
17695  *       bread = 0
17696  *       nchunk = -1             # <<<<<<<<<<<<<<
17697  *
17698  *       # Look if item1 is in this row
17699  */
17700     __pyx_v_nchunk = -1;
17701 
17702     /* "tables/indexesextension.pyx":772
17703  *
17704  *       # Look if item1 is in this row
17705  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
17706  *         if item1 <= rbufrv[rvrow+1]:
17707  *           # Get the bounds row from the LRU cache or read them.
17708  */
17709     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
17710     if (__pyx_t_3) {
17711 
17712       /* "tables/indexesextension.pyx":773
17713  *       # Look if item1 is in this row
17714  *       if item1 > rbufrv[rvrow]:
17715  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
17716  *           # Get the bounds row from the LRU cache or read them.
17717  *           rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17718  */
17719       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
17720       if (__pyx_t_3) {
17721 
17722         /* "tables/indexesextension.pyx":775
17723  *         if item1 <= rbufrv[rvrow+1]:
17724  *           # Get the bounds row from the LRU cache or read them.
17725  *           rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
17726  *           bread = 1
17727  *           nchunk = bisect_left_b(rbufbc, item1, nbounds, 0)
17728  */
17729         __pyx_v_rbufbc = ((npy_int8 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
17730 
17731         /* "tables/indexesextension.pyx":776
17732  *           # Get the bounds row from the LRU cache or read them.
17733  *           rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17734  *           bread = 1             # <<<<<<<<<<<<<<
17735  *           nchunk = bisect_left_b(rbufbc, item1, nbounds, 0)
17736  *           # Get the sorted row from the LRU cache or read it.
17737  */
17738         __pyx_v_bread = 1;
17739 
17740         /* "tables/indexesextension.pyx":777
17741  *           rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17742  *           bread = 1
17743  *           nchunk = bisect_left_b(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
17744  *           # Get the sorted row from the LRU cache or read it.
17745  *           rbuflb = <npy_int8 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
17746  */
17747         __pyx_v_nchunk = bisect_left_b(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
17748 
17749         /* "tables/indexesextension.pyx":779
17750  *           nchunk = bisect_left_b(rbufbc, item1, nbounds, 0)
17751  *           # Get the sorted row from the LRU cache or read it.
17752  *           rbuflb = <npy_int8 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
17753  *           start = bisect_left_b(rbuflb, item1, cs, 0) + cs*nchunk
17754  *         else:
17755  */
17756         __pyx_v_rbuflb = ((npy_int8 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
17757 
17758         /* "tables/indexesextension.pyx":780
17759  *           # Get the sorted row from the LRU cache or read it.
17760  *           rbuflb = <npy_int8 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
17761  *           start = bisect_left_b(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
17762  *         else:
17763  *           start = ss
17764  */
17765         __pyx_v_start = (bisect_left_b(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
17766 
17767         /* "tables/indexesextension.pyx":773
17768  *       # Look if item1 is in this row
17769  *       if item1 > rbufrv[rvrow]:
17770  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
17771  *           # Get the bounds row from the LRU cache or read them.
17772  *           rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17773  */
17774         goto __pyx_L6;
17775       }
17776 
17777       /* "tables/indexesextension.pyx":782
17778  *           start = bisect_left_b(rbuflb, item1, cs, 0) + cs*nchunk
17779  *         else:
17780  *           start = ss             # <<<<<<<<<<<<<<
17781  *       else:
17782  *         start = 0
17783  */
17784       /*else*/ {
17785         __pyx_v_start = __pyx_v_ss;
17786       }
17787       __pyx_L6:;
17788 
17789       /* "tables/indexesextension.pyx":772
17790  *
17791  *       # Look if item1 is in this row
17792  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
17793  *         if item1 <= rbufrv[rvrow+1]:
17794  *           # Get the bounds row from the LRU cache or read them.
17795  */
17796       goto __pyx_L5;
17797     }
17798 
17799     /* "tables/indexesextension.pyx":784
17800  *           start = ss
17801  *       else:
17802  *         start = 0             # <<<<<<<<<<<<<<
17803  *       # Now, for item2
17804  *       if item2 >= rbufrv[rvrow]:
17805  */
17806     /*else*/ {
17807       __pyx_v_start = 0;
17808     }
17809     __pyx_L5:;
17810 
17811     /* "tables/indexesextension.pyx":786
17812  *         start = 0
17813  *       # Now, for item2
17814  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
17815  *         if item2 < rbufrv[rvrow+1]:
17816  *           if not bread:
17817  */
17818     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
17819     if (__pyx_t_3) {
17820 
17821       /* "tables/indexesextension.pyx":787
17822  *       # Now, for item2
17823  *       if item2 >= rbufrv[rvrow]:
17824  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
17825  *           if not bread:
17826  *             # Get the bounds row from the LRU cache or read them.
17827  */
17828       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
17829       if (__pyx_t_3) {
17830 
17831         /* "tables/indexesextension.pyx":788
17832  *       if item2 >= rbufrv[rvrow]:
17833  *         if item2 < rbufrv[rvrow+1]:
17834  *           if not bread:             # <<<<<<<<<<<<<<
17835  *             # Get the bounds row from the LRU cache or read them.
17836  *             rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17837  */
17838         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
17839         if (__pyx_t_3) {
17840 
17841           /* "tables/indexesextension.pyx":790
17842  *           if not bread:
17843  *             # Get the bounds row from the LRU cache or read them.
17844  *             rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
17845  *           nchunk2 = bisect_right_b(rbufbc, item2, nbounds, 0)
17846  *           if nchunk2 <> nchunk:
17847  */
17848           __pyx_v_rbufbc = ((npy_int8 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
17849 
17850           /* "tables/indexesextension.pyx":788
17851  *       if item2 >= rbufrv[rvrow]:
17852  *         if item2 < rbufrv[rvrow+1]:
17853  *           if not bread:             # <<<<<<<<<<<<<<
17854  *             # Get the bounds row from the LRU cache or read them.
17855  *             rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17856  */
17857         }
17858 
17859         /* "tables/indexesextension.pyx":791
17860  *             # Get the bounds row from the LRU cache or read them.
17861  *             rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17862  *           nchunk2 = bisect_right_b(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
17863  *           if nchunk2 <> nchunk:
17864  *             # Get the sorted row from the LRU cache or read it.
17865  */
17866         __pyx_v_nchunk2 = bisect_right_b(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
17867 
17868         /* "tables/indexesextension.pyx":792
17869  *             rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17870  *           nchunk2 = bisect_right_b(rbufbc, item2, nbounds, 0)
17871  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
17872  *             # Get the sorted row from the LRU cache or read it.
17873  *             rbuflb = <npy_int8 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
17874  */
17875         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
17876         if (__pyx_t_3) {
17877 
17878           /* "tables/indexesextension.pyx":794
17879  *           if nchunk2 <> nchunk:
17880  *             # Get the sorted row from the LRU cache or read it.
17881  *             rbuflb = <npy_int8 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
17882  *           stop = bisect_right_b(rbuflb, item2, cs, 0) + cs*nchunk2
17883  *         else:
17884  */
17885           __pyx_v_rbuflb = ((npy_int8 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
17886 
17887           /* "tables/indexesextension.pyx":792
17888  *             rbufbc = <npy_int8 *>self.get_lru_bounds(nrow, nbounds)
17889  *           nchunk2 = bisect_right_b(rbufbc, item2, nbounds, 0)
17890  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
17891  *             # Get the sorted row from the LRU cache or read it.
17892  *             rbuflb = <npy_int8 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
17893  */
17894         }
17895 
17896         /* "tables/indexesextension.pyx":795
17897  *             # Get the sorted row from the LRU cache or read it.
17898  *             rbuflb = <npy_int8 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
17899  *           stop = bisect_right_b(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
17900  *         else:
17901  *           stop = ss
17902  */
17903         __pyx_v_stop = (bisect_right_b(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
17904 
17905         /* "tables/indexesextension.pyx":787
17906  *       # Now, for item2
17907  *       if item2 >= rbufrv[rvrow]:
17908  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
17909  *           if not bread:
17910  *             # Get the bounds row from the LRU cache or read them.
17911  */
17912         goto __pyx_L8;
17913       }
17914 
17915       /* "tables/indexesextension.pyx":797
17916  *           stop = bisect_right_b(rbuflb, item2, cs, 0) + cs*nchunk2
17917  *         else:
17918  *           stop = ss             # <<<<<<<<<<<<<<
17919  *       else:
17920  *         stop = 0
17921  */
17922       /*else*/ {
17923         __pyx_v_stop = __pyx_v_ss;
17924       }
17925       __pyx_L8:;
17926 
17927       /* "tables/indexesextension.pyx":786
17928  *         start = 0
17929  *       # Now, for item2
17930  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
17931  *         if item2 < rbufrv[rvrow+1]:
17932  *           if not bread:
17933  */
17934       goto __pyx_L7;
17935     }
17936 
17937     /* "tables/indexesextension.pyx":799
17938  *           stop = ss
17939  *       else:
17940  *         stop = 0             # <<<<<<<<<<<<<<
17941  *       length = stop - start
17942  *       tlength = tlength + length
17943  */
17944     /*else*/ {
17945       __pyx_v_stop = 0;
17946     }
17947     __pyx_L7:;
17948 
17949     /* "tables/indexesextension.pyx":800
17950  *       else:
17951  *         stop = 0
17952  *       length = stop - start             # <<<<<<<<<<<<<<
17953  *       tlength = tlength + length
17954  *       rbufst[nrow] = start
17955  */
17956     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
17957 
17958     /* "tables/indexesextension.pyx":801
17959  *         stop = 0
17960  *       length = stop - start
17961  *       tlength = tlength + length             # <<<<<<<<<<<<<<
17962  *       rbufst[nrow] = start
17963  *       rbufln[nrow] = length
17964  */
17965     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
17966 
17967     /* "tables/indexesextension.pyx":802
17968  *       length = stop - start
17969  *       tlength = tlength + length
17970  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
17971  *       rbufln[nrow] = length
17972  *     return tlength
17973  */
17974     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
17975 
17976     /* "tables/indexesextension.pyx":803
17977  *       tlength = tlength + length
17978  *       rbufst[nrow] = start
17979  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
17980  *     return tlength
17981  *
17982  */
17983     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
17984   }
17985 
17986   /* "tables/indexesextension.pyx":804
17987  *       rbufst[nrow] = start
17988  *       rbufln[nrow] = length
17989  *     return tlength             # <<<<<<<<<<<<<<
17990  *
17991  *
17992  */
17993   __Pyx_XDECREF(__pyx_r);
17994   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error)
17995   __Pyx_GOTREF(__pyx_t_2);
17996   __pyx_r = __pyx_t_2;
17997   __pyx_t_2 = 0;
17998   goto __pyx_L0;
17999 
18000   /* "tables/indexesextension.pyx":746
18001  *
18002  *   # Optimized version for int8
18003  *   def _search_bin_na_b(self, long item1, long item2):             # <<<<<<<<<<<<<<
18004  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
18005  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
18006  */
18007 
18008   /* function exit code */
18009   __pyx_L1_error:;
18010   __Pyx_XDECREF(__pyx_t_2);
18011   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_b", __pyx_clineno, __pyx_lineno, __pyx_filename);
18012   __pyx_r = NULL;
18013   __pyx_L0:;
18014   __Pyx_XGIVEREF(__pyx_r);
18015   __Pyx_RefNannyFinishContext();
18016   return __pyx_r;
18017 }
18018 
18019 /* "tables/indexesextension.pyx":808
18020  *
18021  *   # Optimized version for uint8
18022  *   def _search_bin_na_ub(self, long item1, long item2):             # <<<<<<<<<<<<<<
18023  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
18024  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
18025  */
18026 
18027 /* Python wrapper */
18028 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_9_search_bin_na_ub(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_9_search_bin_na_ub(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)18029 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_9_search_bin_na_ub(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18030   long __pyx_v_item1;
18031   long __pyx_v_item2;
18032   PyObject *__pyx_r = 0;
18033   __Pyx_RefNannyDeclarations
18034   __Pyx_RefNannySetupContext("_search_bin_na_ub (wrapper)", 0);
18035   {
18036     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
18037     PyObject* values[2] = {0,0};
18038     if (unlikely(__pyx_kwds)) {
18039       Py_ssize_t kw_args;
18040       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18041       switch (pos_args) {
18042         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18043         CYTHON_FALLTHROUGH;
18044         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18045         CYTHON_FALLTHROUGH;
18046         case  0: break;
18047         default: goto __pyx_L5_argtuple_error;
18048       }
18049       kw_args = PyDict_Size(__pyx_kwds);
18050       switch (pos_args) {
18051         case  0:
18052         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
18053         else goto __pyx_L5_argtuple_error;
18054         CYTHON_FALLTHROUGH;
18055         case  1:
18056         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
18057         else {
18058           __Pyx_RaiseArgtupleInvalid("_search_bin_na_ub", 1, 2, 2, 1); __PYX_ERR(0, 808, __pyx_L3_error)
18059         }
18060       }
18061       if (unlikely(kw_args > 0)) {
18062         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_ub") < 0)) __PYX_ERR(0, 808, __pyx_L3_error)
18063       }
18064     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18065       goto __pyx_L5_argtuple_error;
18066     } else {
18067       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18068       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18069     }
18070     __pyx_v_item1 = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_item1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 808, __pyx_L3_error)
18071     __pyx_v_item2 = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_item2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 808, __pyx_L3_error)
18072   }
18073   goto __pyx_L4_argument_unpacking_done;
18074   __pyx_L5_argtuple_error:;
18075   __Pyx_RaiseArgtupleInvalid("_search_bin_na_ub", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 808, __pyx_L3_error)
18076   __pyx_L3_error:;
18077   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_ub", __pyx_clineno, __pyx_lineno, __pyx_filename);
18078   __Pyx_RefNannyFinishContext();
18079   return NULL;
18080   __pyx_L4_argument_unpacking_done:;
18081   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_8_search_bin_na_ub(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
18082 
18083   /* function exit code */
18084   __Pyx_RefNannyFinishContext();
18085   return __pyx_r;
18086 }
18087 
__pyx_pf_6tables_16indexesextension_10IndexArray_8_search_bin_na_ub(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,long __pyx_v_item1,long __pyx_v_item2)18088 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_8_search_bin_na_ub(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2) {
18089   int __pyx_v_cs;
18090   int __pyx_v_ss;
18091   int __pyx_v_ncs;
18092   int __pyx_v_nrow;
18093   int __pyx_v_nrows;
18094   int __pyx_v_nbounds;
18095   int __pyx_v_rvrow;
18096   int __pyx_v_start;
18097   int __pyx_v_stop;
18098   int __pyx_v_tlength;
18099   int __pyx_v_length;
18100   int __pyx_v_bread;
18101   int __pyx_v_nchunk;
18102   int __pyx_v_nchunk2;
18103   int *__pyx_v_rbufst;
18104   int *__pyx_v_rbufln;
18105   npy_uint8 *__pyx_v_rbufrv;
18106   npy_uint8 *__pyx_v_rbufbc;
18107   npy_uint8 *__pyx_v_rbuflb;
18108   PyObject *__pyx_r = NULL;
18109   __Pyx_RefNannyDeclarations
18110   int __pyx_t_1;
18111   PyObject *__pyx_t_2 = NULL;
18112   int __pyx_t_3;
18113   __Pyx_RefNannySetupContext("_search_bin_na_ub", 0);
18114 
18115   /* "tables/indexesextension.pyx":816
18116  *     # Variables with specific type
18117  *     cdef npy_uint8 *rbufrv
18118  *     cdef npy_uint8 *rbufbc = NULL             # <<<<<<<<<<<<<<
18119  *     cdef npy_uint8 *rbuflb = NULL
18120  *
18121  */
18122   __pyx_v_rbufbc = NULL;
18123 
18124   /* "tables/indexesextension.pyx":817
18125  *     cdef npy_uint8 *rbufrv
18126  *     cdef npy_uint8 *rbufbc = NULL
18127  *     cdef npy_uint8 *rbuflb = NULL             # <<<<<<<<<<<<<<
18128  *
18129  *     cs = self.l_chunksize
18130  */
18131   __pyx_v_rbuflb = NULL;
18132 
18133   /* "tables/indexesextension.pyx":819
18134  *     cdef npy_uint8 *rbuflb = NULL
18135  *
18136  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
18137  *     ss = self.l_slicesize
18138  *     ncs = ss / cs
18139  */
18140   __pyx_t_1 = __pyx_v_self->l_chunksize;
18141   __pyx_v_cs = __pyx_t_1;
18142 
18143   /* "tables/indexesextension.pyx":820
18144  *
18145  *     cs = self.l_chunksize
18146  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
18147  *     ncs = ss / cs
18148  *     nbounds = self.nbounds
18149  */
18150   __pyx_t_1 = __pyx_v_self->l_slicesize;
18151   __pyx_v_ss = __pyx_t_1;
18152 
18153   /* "tables/indexesextension.pyx":821
18154  *     cs = self.l_chunksize
18155  *     ss = self.l_slicesize
18156  *     ncs = ss / cs             # <<<<<<<<<<<<<<
18157  *     nbounds = self.nbounds
18158  *     nrows = self.nrows
18159  */
18160   if (unlikely(__pyx_v_cs == 0)) {
18161     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
18162     __PYX_ERR(0, 821, __pyx_L1_error)
18163   }
18164   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
18165     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
18166     __PYX_ERR(0, 821, __pyx_L1_error)
18167   }
18168   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
18169 
18170   /* "tables/indexesextension.pyx":822
18171  *     ss = self.l_slicesize
18172  *     ncs = ss / cs
18173  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
18174  *     nrows = self.nrows
18175  *     rbufst = <int *>self.rbufst
18176  */
18177   __pyx_t_1 = __pyx_v_self->nbounds;
18178   __pyx_v_nbounds = __pyx_t_1;
18179 
18180   /* "tables/indexesextension.pyx":823
18181  *     ncs = ss / cs
18182  *     nbounds = self.nbounds
18183  *     nrows = self.nrows             # <<<<<<<<<<<<<<
18184  *     rbufst = <int *>self.rbufst
18185  *     rbufln = <int *>self.rbufln
18186  */
18187   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)
18188   __Pyx_GOTREF(__pyx_t_2);
18189   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 823, __pyx_L1_error)
18190   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18191   __pyx_v_nrows = __pyx_t_1;
18192 
18193   /* "tables/indexesextension.pyx":824
18194  *     nbounds = self.nbounds
18195  *     nrows = self.nrows
18196  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
18197  *     rbufln = <int *>self.rbufln
18198  *     rbufrv = <npy_uint8 *>self.rbufrv
18199  */
18200   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
18201 
18202   /* "tables/indexesextension.pyx":825
18203  *     nrows = self.nrows
18204  *     rbufst = <int *>self.rbufst
18205  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
18206  *     rbufrv = <npy_uint8 *>self.rbufrv
18207  *     tlength = 0
18208  */
18209   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
18210 
18211   /* "tables/indexesextension.pyx":826
18212  *     rbufst = <int *>self.rbufst
18213  *     rbufln = <int *>self.rbufln
18214  *     rbufrv = <npy_uint8 *>self.rbufrv             # <<<<<<<<<<<<<<
18215  *     tlength = 0
18216  *     for nrow from 0 <= nrow < nrows:
18217  */
18218   __pyx_v_rbufrv = ((npy_uint8 *)__pyx_v_self->rbufrv);
18219 
18220   /* "tables/indexesextension.pyx":827
18221  *     rbufln = <int *>self.rbufln
18222  *     rbufrv = <npy_uint8 *>self.rbufrv
18223  *     tlength = 0             # <<<<<<<<<<<<<<
18224  *     for nrow from 0 <= nrow < nrows:
18225  *       rvrow = nrow*2
18226  */
18227   __pyx_v_tlength = 0;
18228 
18229   /* "tables/indexesextension.pyx":828
18230  *     rbufrv = <npy_uint8 *>self.rbufrv
18231  *     tlength = 0
18232  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
18233  *       rvrow = nrow*2
18234  *       bread = 0
18235  */
18236   __pyx_t_1 = __pyx_v_nrows;
18237   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
18238 
18239     /* "tables/indexesextension.pyx":829
18240  *     tlength = 0
18241  *     for nrow from 0 <= nrow < nrows:
18242  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
18243  *       bread = 0
18244  *       nchunk = -1
18245  */
18246     __pyx_v_rvrow = (__pyx_v_nrow * 2);
18247 
18248     /* "tables/indexesextension.pyx":830
18249  *     for nrow from 0 <= nrow < nrows:
18250  *       rvrow = nrow*2
18251  *       bread = 0             # <<<<<<<<<<<<<<
18252  *       nchunk = -1
18253  *
18254  */
18255     __pyx_v_bread = 0;
18256 
18257     /* "tables/indexesextension.pyx":831
18258  *       rvrow = nrow*2
18259  *       bread = 0
18260  *       nchunk = -1             # <<<<<<<<<<<<<<
18261  *
18262  *       # Look if item1 is in this row
18263  */
18264     __pyx_v_nchunk = -1;
18265 
18266     /* "tables/indexesextension.pyx":834
18267  *
18268  *       # Look if item1 is in this row
18269  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
18270  *         if item1 <= rbufrv[rvrow+1]:
18271  *           # Get the bounds row from the LRU cache or read them.
18272  */
18273     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
18274     if (__pyx_t_3) {
18275 
18276       /* "tables/indexesextension.pyx":835
18277  *       # Look if item1 is in this row
18278  *       if item1 > rbufrv[rvrow]:
18279  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
18280  *           # Get the bounds row from the LRU cache or read them.
18281  *           rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18282  */
18283       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
18284       if (__pyx_t_3) {
18285 
18286         /* "tables/indexesextension.pyx":837
18287  *         if item1 <= rbufrv[rvrow+1]:
18288  *           # Get the bounds row from the LRU cache or read them.
18289  *           rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
18290  *           bread = 1
18291  *           nchunk = bisect_left_ub(rbufbc, item1, nbounds, 0)
18292  */
18293         __pyx_v_rbufbc = ((npy_uint8 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
18294 
18295         /* "tables/indexesextension.pyx":838
18296  *           # Get the bounds row from the LRU cache or read them.
18297  *           rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18298  *           bread = 1             # <<<<<<<<<<<<<<
18299  *           nchunk = bisect_left_ub(rbufbc, item1, nbounds, 0)
18300  *           # Get the sorted row from the LRU cache or read it.
18301  */
18302         __pyx_v_bread = 1;
18303 
18304         /* "tables/indexesextension.pyx":839
18305  *           rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18306  *           bread = 1
18307  *           nchunk = bisect_left_ub(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
18308  *           # Get the sorted row from the LRU cache or read it.
18309  *           rbuflb = <npy_uint8 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
18310  */
18311         __pyx_v_nchunk = bisect_left_ub(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
18312 
18313         /* "tables/indexesextension.pyx":841
18314  *           nchunk = bisect_left_ub(rbufbc, item1, nbounds, 0)
18315  *           # Get the sorted row from the LRU cache or read it.
18316  *           rbuflb = <npy_uint8 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
18317  *           start = bisect_left_ub(rbuflb, item1, cs, 0) + cs*nchunk
18318  *         else:
18319  */
18320         __pyx_v_rbuflb = ((npy_uint8 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
18321 
18322         /* "tables/indexesextension.pyx":842
18323  *           # Get the sorted row from the LRU cache or read it.
18324  *           rbuflb = <npy_uint8 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
18325  *           start = bisect_left_ub(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
18326  *         else:
18327  *           start = ss
18328  */
18329         __pyx_v_start = (bisect_left_ub(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
18330 
18331         /* "tables/indexesextension.pyx":835
18332  *       # Look if item1 is in this row
18333  *       if item1 > rbufrv[rvrow]:
18334  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
18335  *           # Get the bounds row from the LRU cache or read them.
18336  *           rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18337  */
18338         goto __pyx_L6;
18339       }
18340 
18341       /* "tables/indexesextension.pyx":844
18342  *           start = bisect_left_ub(rbuflb, item1, cs, 0) + cs*nchunk
18343  *         else:
18344  *           start = ss             # <<<<<<<<<<<<<<
18345  *       else:
18346  *         start = 0
18347  */
18348       /*else*/ {
18349         __pyx_v_start = __pyx_v_ss;
18350       }
18351       __pyx_L6:;
18352 
18353       /* "tables/indexesextension.pyx":834
18354  *
18355  *       # Look if item1 is in this row
18356  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
18357  *         if item1 <= rbufrv[rvrow+1]:
18358  *           # Get the bounds row from the LRU cache or read them.
18359  */
18360       goto __pyx_L5;
18361     }
18362 
18363     /* "tables/indexesextension.pyx":846
18364  *           start = ss
18365  *       else:
18366  *         start = 0             # <<<<<<<<<<<<<<
18367  *       # Now, for item2
18368  *       if item2 >= rbufrv[rvrow]:
18369  */
18370     /*else*/ {
18371       __pyx_v_start = 0;
18372     }
18373     __pyx_L5:;
18374 
18375     /* "tables/indexesextension.pyx":848
18376  *         start = 0
18377  *       # Now, for item2
18378  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
18379  *         if item2 < rbufrv[rvrow+1]:
18380  *           if not bread:
18381  */
18382     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
18383     if (__pyx_t_3) {
18384 
18385       /* "tables/indexesextension.pyx":849
18386  *       # Now, for item2
18387  *       if item2 >= rbufrv[rvrow]:
18388  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
18389  *           if not bread:
18390  *             # Get the bounds row from the LRU cache or read them.
18391  */
18392       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
18393       if (__pyx_t_3) {
18394 
18395         /* "tables/indexesextension.pyx":850
18396  *       if item2 >= rbufrv[rvrow]:
18397  *         if item2 < rbufrv[rvrow+1]:
18398  *           if not bread:             # <<<<<<<<<<<<<<
18399  *             # Get the bounds row from the LRU cache or read them.
18400  *             rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18401  */
18402         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
18403         if (__pyx_t_3) {
18404 
18405           /* "tables/indexesextension.pyx":852
18406  *           if not bread:
18407  *             # Get the bounds row from the LRU cache or read them.
18408  *             rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
18409  *           nchunk2 = bisect_right_ub(rbufbc, item2, nbounds, 0)
18410  *           if nchunk2 <> nchunk:
18411  */
18412           __pyx_v_rbufbc = ((npy_uint8 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
18413 
18414           /* "tables/indexesextension.pyx":850
18415  *       if item2 >= rbufrv[rvrow]:
18416  *         if item2 < rbufrv[rvrow+1]:
18417  *           if not bread:             # <<<<<<<<<<<<<<
18418  *             # Get the bounds row from the LRU cache or read them.
18419  *             rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18420  */
18421         }
18422 
18423         /* "tables/indexesextension.pyx":853
18424  *             # Get the bounds row from the LRU cache or read them.
18425  *             rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18426  *           nchunk2 = bisect_right_ub(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
18427  *           if nchunk2 <> nchunk:
18428  *             # Get the sorted row from the LRU cache or read it.
18429  */
18430         __pyx_v_nchunk2 = bisect_right_ub(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
18431 
18432         /* "tables/indexesextension.pyx":854
18433  *             rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18434  *           nchunk2 = bisect_right_ub(rbufbc, item2, nbounds, 0)
18435  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
18436  *             # Get the sorted row from the LRU cache or read it.
18437  *             rbuflb = <npy_uint8 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
18438  */
18439         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
18440         if (__pyx_t_3) {
18441 
18442           /* "tables/indexesextension.pyx":856
18443  *           if nchunk2 <> nchunk:
18444  *             # Get the sorted row from the LRU cache or read it.
18445  *             rbuflb = <npy_uint8 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
18446  *           stop = bisect_right_ub(rbuflb, item2, cs, 0) + cs*nchunk2
18447  *         else:
18448  */
18449           __pyx_v_rbuflb = ((npy_uint8 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
18450 
18451           /* "tables/indexesextension.pyx":854
18452  *             rbufbc = <npy_uint8 *>self.get_lru_bounds(nrow, nbounds)
18453  *           nchunk2 = bisect_right_ub(rbufbc, item2, nbounds, 0)
18454  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
18455  *             # Get the sorted row from the LRU cache or read it.
18456  *             rbuflb = <npy_uint8 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
18457  */
18458         }
18459 
18460         /* "tables/indexesextension.pyx":857
18461  *             # Get the sorted row from the LRU cache or read it.
18462  *             rbuflb = <npy_uint8 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
18463  *           stop = bisect_right_ub(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
18464  *         else:
18465  *           stop = ss
18466  */
18467         __pyx_v_stop = (bisect_right_ub(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
18468 
18469         /* "tables/indexesextension.pyx":849
18470  *       # Now, for item2
18471  *       if item2 >= rbufrv[rvrow]:
18472  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
18473  *           if not bread:
18474  *             # Get the bounds row from the LRU cache or read them.
18475  */
18476         goto __pyx_L8;
18477       }
18478 
18479       /* "tables/indexesextension.pyx":859
18480  *           stop = bisect_right_ub(rbuflb, item2, cs, 0) + cs*nchunk2
18481  *         else:
18482  *           stop = ss             # <<<<<<<<<<<<<<
18483  *       else:
18484  *         stop = 0
18485  */
18486       /*else*/ {
18487         __pyx_v_stop = __pyx_v_ss;
18488       }
18489       __pyx_L8:;
18490 
18491       /* "tables/indexesextension.pyx":848
18492  *         start = 0
18493  *       # Now, for item2
18494  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
18495  *         if item2 < rbufrv[rvrow+1]:
18496  *           if not bread:
18497  */
18498       goto __pyx_L7;
18499     }
18500 
18501     /* "tables/indexesextension.pyx":861
18502  *           stop = ss
18503  *       else:
18504  *         stop = 0             # <<<<<<<<<<<<<<
18505  *       length = stop - start
18506  *       tlength = tlength + length
18507  */
18508     /*else*/ {
18509       __pyx_v_stop = 0;
18510     }
18511     __pyx_L7:;
18512 
18513     /* "tables/indexesextension.pyx":862
18514  *       else:
18515  *         stop = 0
18516  *       length = stop - start             # <<<<<<<<<<<<<<
18517  *       tlength = tlength + length
18518  *       rbufst[nrow] = start
18519  */
18520     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
18521 
18522     /* "tables/indexesextension.pyx":863
18523  *         stop = 0
18524  *       length = stop - start
18525  *       tlength = tlength + length             # <<<<<<<<<<<<<<
18526  *       rbufst[nrow] = start
18527  *       rbufln[nrow] = length
18528  */
18529     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
18530 
18531     /* "tables/indexesextension.pyx":864
18532  *       length = stop - start
18533  *       tlength = tlength + length
18534  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
18535  *       rbufln[nrow] = length
18536  *     return tlength
18537  */
18538     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
18539 
18540     /* "tables/indexesextension.pyx":865
18541  *       tlength = tlength + length
18542  *       rbufst[nrow] = start
18543  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
18544  *     return tlength
18545  *
18546  */
18547     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
18548   }
18549 
18550   /* "tables/indexesextension.pyx":866
18551  *       rbufst[nrow] = start
18552  *       rbufln[nrow] = length
18553  *     return tlength             # <<<<<<<<<<<<<<
18554  *
18555  *
18556  */
18557   __Pyx_XDECREF(__pyx_r);
18558   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error)
18559   __Pyx_GOTREF(__pyx_t_2);
18560   __pyx_r = __pyx_t_2;
18561   __pyx_t_2 = 0;
18562   goto __pyx_L0;
18563 
18564   /* "tables/indexesextension.pyx":808
18565  *
18566  *   # Optimized version for uint8
18567  *   def _search_bin_na_ub(self, long item1, long item2):             # <<<<<<<<<<<<<<
18568  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
18569  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
18570  */
18571 
18572   /* function exit code */
18573   __pyx_L1_error:;
18574   __Pyx_XDECREF(__pyx_t_2);
18575   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_ub", __pyx_clineno, __pyx_lineno, __pyx_filename);
18576   __pyx_r = NULL;
18577   __pyx_L0:;
18578   __Pyx_XGIVEREF(__pyx_r);
18579   __Pyx_RefNannyFinishContext();
18580   return __pyx_r;
18581 }
18582 
18583 /* "tables/indexesextension.pyx":870
18584  *
18585  *   # Optimized version for int16
18586  *   def _search_bin_na_s(self, long item1, long item2):             # <<<<<<<<<<<<<<
18587  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
18588  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
18589  */
18590 
18591 /* Python wrapper */
18592 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_11_search_bin_na_s(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_11_search_bin_na_s(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)18593 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_11_search_bin_na_s(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18594   long __pyx_v_item1;
18595   long __pyx_v_item2;
18596   PyObject *__pyx_r = 0;
18597   __Pyx_RefNannyDeclarations
18598   __Pyx_RefNannySetupContext("_search_bin_na_s (wrapper)", 0);
18599   {
18600     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
18601     PyObject* values[2] = {0,0};
18602     if (unlikely(__pyx_kwds)) {
18603       Py_ssize_t kw_args;
18604       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18605       switch (pos_args) {
18606         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18607         CYTHON_FALLTHROUGH;
18608         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18609         CYTHON_FALLTHROUGH;
18610         case  0: break;
18611         default: goto __pyx_L5_argtuple_error;
18612       }
18613       kw_args = PyDict_Size(__pyx_kwds);
18614       switch (pos_args) {
18615         case  0:
18616         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
18617         else goto __pyx_L5_argtuple_error;
18618         CYTHON_FALLTHROUGH;
18619         case  1:
18620         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
18621         else {
18622           __Pyx_RaiseArgtupleInvalid("_search_bin_na_s", 1, 2, 2, 1); __PYX_ERR(0, 870, __pyx_L3_error)
18623         }
18624       }
18625       if (unlikely(kw_args > 0)) {
18626         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_s") < 0)) __PYX_ERR(0, 870, __pyx_L3_error)
18627       }
18628     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18629       goto __pyx_L5_argtuple_error;
18630     } else {
18631       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18632       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18633     }
18634     __pyx_v_item1 = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_item1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 870, __pyx_L3_error)
18635     __pyx_v_item2 = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_item2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 870, __pyx_L3_error)
18636   }
18637   goto __pyx_L4_argument_unpacking_done;
18638   __pyx_L5_argtuple_error:;
18639   __Pyx_RaiseArgtupleInvalid("_search_bin_na_s", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 870, __pyx_L3_error)
18640   __pyx_L3_error:;
18641   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_s", __pyx_clineno, __pyx_lineno, __pyx_filename);
18642   __Pyx_RefNannyFinishContext();
18643   return NULL;
18644   __pyx_L4_argument_unpacking_done:;
18645   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_10_search_bin_na_s(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
18646 
18647   /* function exit code */
18648   __Pyx_RefNannyFinishContext();
18649   return __pyx_r;
18650 }
18651 
__pyx_pf_6tables_16indexesextension_10IndexArray_10_search_bin_na_s(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,long __pyx_v_item1,long __pyx_v_item2)18652 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_10_search_bin_na_s(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2) {
18653   int __pyx_v_cs;
18654   int __pyx_v_ss;
18655   int __pyx_v_ncs;
18656   int __pyx_v_nrow;
18657   int __pyx_v_nrows;
18658   int __pyx_v_nbounds;
18659   int __pyx_v_rvrow;
18660   int __pyx_v_start;
18661   int __pyx_v_stop;
18662   int __pyx_v_tlength;
18663   int __pyx_v_length;
18664   int __pyx_v_bread;
18665   int __pyx_v_nchunk;
18666   int __pyx_v_nchunk2;
18667   int *__pyx_v_rbufst;
18668   int *__pyx_v_rbufln;
18669   npy_int16 *__pyx_v_rbufrv;
18670   npy_int16 *__pyx_v_rbufbc;
18671   npy_int16 *__pyx_v_rbuflb;
18672   PyObject *__pyx_r = NULL;
18673   __Pyx_RefNannyDeclarations
18674   int __pyx_t_1;
18675   PyObject *__pyx_t_2 = NULL;
18676   int __pyx_t_3;
18677   __Pyx_RefNannySetupContext("_search_bin_na_s", 0);
18678 
18679   /* "tables/indexesextension.pyx":878
18680  *     # Variables with specific type
18681  *     cdef npy_int16 *rbufrv
18682  *     cdef npy_int16 *rbufbc = NULL             # <<<<<<<<<<<<<<
18683  *     cdef npy_int16 *rbuflb = NULL
18684  *
18685  */
18686   __pyx_v_rbufbc = NULL;
18687 
18688   /* "tables/indexesextension.pyx":879
18689  *     cdef npy_int16 *rbufrv
18690  *     cdef npy_int16 *rbufbc = NULL
18691  *     cdef npy_int16 *rbuflb = NULL             # <<<<<<<<<<<<<<
18692  *
18693  *     cs = self.l_chunksize
18694  */
18695   __pyx_v_rbuflb = NULL;
18696 
18697   /* "tables/indexesextension.pyx":881
18698  *     cdef npy_int16 *rbuflb = NULL
18699  *
18700  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
18701  *     ss = self.l_slicesize
18702  *     ncs = ss / cs
18703  */
18704   __pyx_t_1 = __pyx_v_self->l_chunksize;
18705   __pyx_v_cs = __pyx_t_1;
18706 
18707   /* "tables/indexesextension.pyx":882
18708  *
18709  *     cs = self.l_chunksize
18710  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
18711  *     ncs = ss / cs
18712  *     nbounds = self.nbounds
18713  */
18714   __pyx_t_1 = __pyx_v_self->l_slicesize;
18715   __pyx_v_ss = __pyx_t_1;
18716 
18717   /* "tables/indexesextension.pyx":883
18718  *     cs = self.l_chunksize
18719  *     ss = self.l_slicesize
18720  *     ncs = ss / cs             # <<<<<<<<<<<<<<
18721  *     nbounds = self.nbounds
18722  *     nrows = self.nrows
18723  */
18724   if (unlikely(__pyx_v_cs == 0)) {
18725     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
18726     __PYX_ERR(0, 883, __pyx_L1_error)
18727   }
18728   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
18729     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
18730     __PYX_ERR(0, 883, __pyx_L1_error)
18731   }
18732   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
18733 
18734   /* "tables/indexesextension.pyx":884
18735  *     ss = self.l_slicesize
18736  *     ncs = ss / cs
18737  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
18738  *     nrows = self.nrows
18739  *     rbufst = <int *>self.rbufst
18740  */
18741   __pyx_t_1 = __pyx_v_self->nbounds;
18742   __pyx_v_nbounds = __pyx_t_1;
18743 
18744   /* "tables/indexesextension.pyx":885
18745  *     ncs = ss / cs
18746  *     nbounds = self.nbounds
18747  *     nrows = self.nrows             # <<<<<<<<<<<<<<
18748  *     rbufst = <int *>self.rbufst
18749  *     rbufln = <int *>self.rbufln
18750  */
18751   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error)
18752   __Pyx_GOTREF(__pyx_t_2);
18753   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L1_error)
18754   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18755   __pyx_v_nrows = __pyx_t_1;
18756 
18757   /* "tables/indexesextension.pyx":886
18758  *     nbounds = self.nbounds
18759  *     nrows = self.nrows
18760  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
18761  *     rbufln = <int *>self.rbufln
18762  *     rbufrv = <npy_int16 *>self.rbufrv
18763  */
18764   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
18765 
18766   /* "tables/indexesextension.pyx":887
18767  *     nrows = self.nrows
18768  *     rbufst = <int *>self.rbufst
18769  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
18770  *     rbufrv = <npy_int16 *>self.rbufrv
18771  *     tlength = 0
18772  */
18773   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
18774 
18775   /* "tables/indexesextension.pyx":888
18776  *     rbufst = <int *>self.rbufst
18777  *     rbufln = <int *>self.rbufln
18778  *     rbufrv = <npy_int16 *>self.rbufrv             # <<<<<<<<<<<<<<
18779  *     tlength = 0
18780  *     for nrow from 0 <= nrow < nrows:
18781  */
18782   __pyx_v_rbufrv = ((npy_int16 *)__pyx_v_self->rbufrv);
18783 
18784   /* "tables/indexesextension.pyx":889
18785  *     rbufln = <int *>self.rbufln
18786  *     rbufrv = <npy_int16 *>self.rbufrv
18787  *     tlength = 0             # <<<<<<<<<<<<<<
18788  *     for nrow from 0 <= nrow < nrows:
18789  *       rvrow = nrow*2
18790  */
18791   __pyx_v_tlength = 0;
18792 
18793   /* "tables/indexesextension.pyx":890
18794  *     rbufrv = <npy_int16 *>self.rbufrv
18795  *     tlength = 0
18796  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
18797  *       rvrow = nrow*2
18798  *       bread = 0
18799  */
18800   __pyx_t_1 = __pyx_v_nrows;
18801   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
18802 
18803     /* "tables/indexesextension.pyx":891
18804  *     tlength = 0
18805  *     for nrow from 0 <= nrow < nrows:
18806  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
18807  *       bread = 0
18808  *       nchunk = -1
18809  */
18810     __pyx_v_rvrow = (__pyx_v_nrow * 2);
18811 
18812     /* "tables/indexesextension.pyx":892
18813  *     for nrow from 0 <= nrow < nrows:
18814  *       rvrow = nrow*2
18815  *       bread = 0             # <<<<<<<<<<<<<<
18816  *       nchunk = -1
18817  *       # Look if item1 is in this row
18818  */
18819     __pyx_v_bread = 0;
18820 
18821     /* "tables/indexesextension.pyx":893
18822  *       rvrow = nrow*2
18823  *       bread = 0
18824  *       nchunk = -1             # <<<<<<<<<<<<<<
18825  *       # Look if item1 is in this row
18826  *       if item1 > rbufrv[rvrow]:
18827  */
18828     __pyx_v_nchunk = -1;
18829 
18830     /* "tables/indexesextension.pyx":895
18831  *       nchunk = -1
18832  *       # Look if item1 is in this row
18833  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
18834  *         if item1 <= rbufrv[rvrow+1]:
18835  *           # Get the bounds row from the LRU cache or read them.
18836  */
18837     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
18838     if (__pyx_t_3) {
18839 
18840       /* "tables/indexesextension.pyx":896
18841  *       # Look if item1 is in this row
18842  *       if item1 > rbufrv[rvrow]:
18843  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
18844  *           # Get the bounds row from the LRU cache or read them.
18845  *           rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
18846  */
18847       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
18848       if (__pyx_t_3) {
18849 
18850         /* "tables/indexesextension.pyx":898
18851  *         if item1 <= rbufrv[rvrow+1]:
18852  *           # Get the bounds row from the LRU cache or read them.
18853  *           rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
18854  *           bread = 1
18855  *           nchunk = bisect_left_s(rbufbc, item1, nbounds, 0)
18856  */
18857         __pyx_v_rbufbc = ((npy_int16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
18858 
18859         /* "tables/indexesextension.pyx":899
18860  *           # Get the bounds row from the LRU cache or read them.
18861  *           rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
18862  *           bread = 1             # <<<<<<<<<<<<<<
18863  *           nchunk = bisect_left_s(rbufbc, item1, nbounds, 0)
18864  *           # Get the sorted row from the LRU cache or read it.
18865  */
18866         __pyx_v_bread = 1;
18867 
18868         /* "tables/indexesextension.pyx":900
18869  *           rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
18870  *           bread = 1
18871  *           nchunk = bisect_left_s(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
18872  *           # Get the sorted row from the LRU cache or read it.
18873  *           rbuflb = <npy_int16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
18874  */
18875         __pyx_v_nchunk = bisect_left_s(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
18876 
18877         /* "tables/indexesextension.pyx":902
18878  *           nchunk = bisect_left_s(rbufbc, item1, nbounds, 0)
18879  *           # Get the sorted row from the LRU cache or read it.
18880  *           rbuflb = <npy_int16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
18881  *           start = bisect_left_s(rbuflb, item1, cs, 0) + cs*nchunk
18882  *         else:
18883  */
18884         __pyx_v_rbuflb = ((npy_int16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
18885 
18886         /* "tables/indexesextension.pyx":903
18887  *           # Get the sorted row from the LRU cache or read it.
18888  *           rbuflb = <npy_int16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
18889  *           start = bisect_left_s(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
18890  *         else:
18891  *           start = ss
18892  */
18893         __pyx_v_start = (bisect_left_s(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
18894 
18895         /* "tables/indexesextension.pyx":896
18896  *       # Look if item1 is in this row
18897  *       if item1 > rbufrv[rvrow]:
18898  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
18899  *           # Get the bounds row from the LRU cache or read them.
18900  *           rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
18901  */
18902         goto __pyx_L6;
18903       }
18904 
18905       /* "tables/indexesextension.pyx":905
18906  *           start = bisect_left_s(rbuflb, item1, cs, 0) + cs*nchunk
18907  *         else:
18908  *           start = ss             # <<<<<<<<<<<<<<
18909  *       else:
18910  *         start = 0
18911  */
18912       /*else*/ {
18913         __pyx_v_start = __pyx_v_ss;
18914       }
18915       __pyx_L6:;
18916 
18917       /* "tables/indexesextension.pyx":895
18918  *       nchunk = -1
18919  *       # Look if item1 is in this row
18920  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
18921  *         if item1 <= rbufrv[rvrow+1]:
18922  *           # Get the bounds row from the LRU cache or read them.
18923  */
18924       goto __pyx_L5;
18925     }
18926 
18927     /* "tables/indexesextension.pyx":907
18928  *           start = ss
18929  *       else:
18930  *         start = 0             # <<<<<<<<<<<<<<
18931  *       # Now, for item2
18932  *       if item2 >= rbufrv[rvrow]:
18933  */
18934     /*else*/ {
18935       __pyx_v_start = 0;
18936     }
18937     __pyx_L5:;
18938 
18939     /* "tables/indexesextension.pyx":909
18940  *         start = 0
18941  *       # Now, for item2
18942  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
18943  *         if item2 < rbufrv[rvrow+1]:
18944  *           if not bread:
18945  */
18946     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
18947     if (__pyx_t_3) {
18948 
18949       /* "tables/indexesextension.pyx":910
18950  *       # Now, for item2
18951  *       if item2 >= rbufrv[rvrow]:
18952  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
18953  *           if not bread:
18954  *             # Get the bounds row from the LRU cache or read them.
18955  */
18956       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
18957       if (__pyx_t_3) {
18958 
18959         /* "tables/indexesextension.pyx":911
18960  *       if item2 >= rbufrv[rvrow]:
18961  *         if item2 < rbufrv[rvrow+1]:
18962  *           if not bread:             # <<<<<<<<<<<<<<
18963  *             # Get the bounds row from the LRU cache or read them.
18964  *             rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
18965  */
18966         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
18967         if (__pyx_t_3) {
18968 
18969           /* "tables/indexesextension.pyx":913
18970  *           if not bread:
18971  *             # Get the bounds row from the LRU cache or read them.
18972  *             rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
18973  *           nchunk2 = bisect_right_s(rbufbc, item2, nbounds, 0)
18974  *           if nchunk2 <> nchunk:
18975  */
18976           __pyx_v_rbufbc = ((npy_int16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
18977 
18978           /* "tables/indexesextension.pyx":911
18979  *       if item2 >= rbufrv[rvrow]:
18980  *         if item2 < rbufrv[rvrow+1]:
18981  *           if not bread:             # <<<<<<<<<<<<<<
18982  *             # Get the bounds row from the LRU cache or read them.
18983  *             rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
18984  */
18985         }
18986 
18987         /* "tables/indexesextension.pyx":914
18988  *             # Get the bounds row from the LRU cache or read them.
18989  *             rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
18990  *           nchunk2 = bisect_right_s(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
18991  *           if nchunk2 <> nchunk:
18992  *             # Get the sorted row from the LRU cache or read it.
18993  */
18994         __pyx_v_nchunk2 = bisect_right_s(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
18995 
18996         /* "tables/indexesextension.pyx":915
18997  *             rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
18998  *           nchunk2 = bisect_right_s(rbufbc, item2, nbounds, 0)
18999  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
19000  *             # Get the sorted row from the LRU cache or read it.
19001  *             rbuflb = <npy_int16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
19002  */
19003         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
19004         if (__pyx_t_3) {
19005 
19006           /* "tables/indexesextension.pyx":917
19007  *           if nchunk2 <> nchunk:
19008  *             # Get the sorted row from the LRU cache or read it.
19009  *             rbuflb = <npy_int16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
19010  *           stop = bisect_right_s(rbuflb, item2, cs, 0) + cs*nchunk2
19011  *         else:
19012  */
19013           __pyx_v_rbuflb = ((npy_int16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
19014 
19015           /* "tables/indexesextension.pyx":915
19016  *             rbufbc = <npy_int16 *>self.get_lru_bounds(nrow, nbounds)
19017  *           nchunk2 = bisect_right_s(rbufbc, item2, nbounds, 0)
19018  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
19019  *             # Get the sorted row from the LRU cache or read it.
19020  *             rbuflb = <npy_int16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
19021  */
19022         }
19023 
19024         /* "tables/indexesextension.pyx":918
19025  *             # Get the sorted row from the LRU cache or read it.
19026  *             rbuflb = <npy_int16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
19027  *           stop = bisect_right_s(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
19028  *         else:
19029  *           stop = ss
19030  */
19031         __pyx_v_stop = (bisect_right_s(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
19032 
19033         /* "tables/indexesextension.pyx":910
19034  *       # Now, for item2
19035  *       if item2 >= rbufrv[rvrow]:
19036  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
19037  *           if not bread:
19038  *             # Get the bounds row from the LRU cache or read them.
19039  */
19040         goto __pyx_L8;
19041       }
19042 
19043       /* "tables/indexesextension.pyx":920
19044  *           stop = bisect_right_s(rbuflb, item2, cs, 0) + cs*nchunk2
19045  *         else:
19046  *           stop = ss             # <<<<<<<<<<<<<<
19047  *       else:
19048  *         stop = 0
19049  */
19050       /*else*/ {
19051         __pyx_v_stop = __pyx_v_ss;
19052       }
19053       __pyx_L8:;
19054 
19055       /* "tables/indexesextension.pyx":909
19056  *         start = 0
19057  *       # Now, for item2
19058  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
19059  *         if item2 < rbufrv[rvrow+1]:
19060  *           if not bread:
19061  */
19062       goto __pyx_L7;
19063     }
19064 
19065     /* "tables/indexesextension.pyx":922
19066  *           stop = ss
19067  *       else:
19068  *         stop = 0             # <<<<<<<<<<<<<<
19069  *       length = stop - start
19070  *       tlength = tlength + length
19071  */
19072     /*else*/ {
19073       __pyx_v_stop = 0;
19074     }
19075     __pyx_L7:;
19076 
19077     /* "tables/indexesextension.pyx":923
19078  *       else:
19079  *         stop = 0
19080  *       length = stop - start             # <<<<<<<<<<<<<<
19081  *       tlength = tlength + length
19082  *       rbufst[nrow] = start
19083  */
19084     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
19085 
19086     /* "tables/indexesextension.pyx":924
19087  *         stop = 0
19088  *       length = stop - start
19089  *       tlength = tlength + length             # <<<<<<<<<<<<<<
19090  *       rbufst[nrow] = start
19091  *       rbufln[nrow] = length
19092  */
19093     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
19094 
19095     /* "tables/indexesextension.pyx":925
19096  *       length = stop - start
19097  *       tlength = tlength + length
19098  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
19099  *       rbufln[nrow] = length
19100  *     return tlength
19101  */
19102     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
19103 
19104     /* "tables/indexesextension.pyx":926
19105  *       tlength = tlength + length
19106  *       rbufst[nrow] = start
19107  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
19108  *     return tlength
19109  *
19110  */
19111     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
19112   }
19113 
19114   /* "tables/indexesextension.pyx":927
19115  *       rbufst[nrow] = start
19116  *       rbufln[nrow] = length
19117  *     return tlength             # <<<<<<<<<<<<<<
19118  *
19119  *
19120  */
19121   __Pyx_XDECREF(__pyx_r);
19122   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
19123   __Pyx_GOTREF(__pyx_t_2);
19124   __pyx_r = __pyx_t_2;
19125   __pyx_t_2 = 0;
19126   goto __pyx_L0;
19127 
19128   /* "tables/indexesextension.pyx":870
19129  *
19130  *   # Optimized version for int16
19131  *   def _search_bin_na_s(self, long item1, long item2):             # <<<<<<<<<<<<<<
19132  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
19133  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
19134  */
19135 
19136   /* function exit code */
19137   __pyx_L1_error:;
19138   __Pyx_XDECREF(__pyx_t_2);
19139   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_s", __pyx_clineno, __pyx_lineno, __pyx_filename);
19140   __pyx_r = NULL;
19141   __pyx_L0:;
19142   __Pyx_XGIVEREF(__pyx_r);
19143   __Pyx_RefNannyFinishContext();
19144   return __pyx_r;
19145 }
19146 
19147 /* "tables/indexesextension.pyx":931
19148  *
19149  *   # Optimized version for uint16
19150  *   def _search_bin_na_us(self, long item1, long item2):             # <<<<<<<<<<<<<<
19151  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
19152  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
19153  */
19154 
19155 /* Python wrapper */
19156 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_13_search_bin_na_us(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_13_search_bin_na_us(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)19157 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_13_search_bin_na_us(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19158   long __pyx_v_item1;
19159   long __pyx_v_item2;
19160   PyObject *__pyx_r = 0;
19161   __Pyx_RefNannyDeclarations
19162   __Pyx_RefNannySetupContext("_search_bin_na_us (wrapper)", 0);
19163   {
19164     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
19165     PyObject* values[2] = {0,0};
19166     if (unlikely(__pyx_kwds)) {
19167       Py_ssize_t kw_args;
19168       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19169       switch (pos_args) {
19170         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19171         CYTHON_FALLTHROUGH;
19172         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19173         CYTHON_FALLTHROUGH;
19174         case  0: break;
19175         default: goto __pyx_L5_argtuple_error;
19176       }
19177       kw_args = PyDict_Size(__pyx_kwds);
19178       switch (pos_args) {
19179         case  0:
19180         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
19181         else goto __pyx_L5_argtuple_error;
19182         CYTHON_FALLTHROUGH;
19183         case  1:
19184         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
19185         else {
19186           __Pyx_RaiseArgtupleInvalid("_search_bin_na_us", 1, 2, 2, 1); __PYX_ERR(0, 931, __pyx_L3_error)
19187         }
19188       }
19189       if (unlikely(kw_args > 0)) {
19190         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_us") < 0)) __PYX_ERR(0, 931, __pyx_L3_error)
19191       }
19192     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
19193       goto __pyx_L5_argtuple_error;
19194     } else {
19195       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19196       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19197     }
19198     __pyx_v_item1 = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_item1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L3_error)
19199     __pyx_v_item2 = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_item2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L3_error)
19200   }
19201   goto __pyx_L4_argument_unpacking_done;
19202   __pyx_L5_argtuple_error:;
19203   __Pyx_RaiseArgtupleInvalid("_search_bin_na_us", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 931, __pyx_L3_error)
19204   __pyx_L3_error:;
19205   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
19206   __Pyx_RefNannyFinishContext();
19207   return NULL;
19208   __pyx_L4_argument_unpacking_done:;
19209   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_12_search_bin_na_us(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
19210 
19211   /* function exit code */
19212   __Pyx_RefNannyFinishContext();
19213   return __pyx_r;
19214 }
19215 
__pyx_pf_6tables_16indexesextension_10IndexArray_12_search_bin_na_us(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,long __pyx_v_item1,long __pyx_v_item2)19216 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_12_search_bin_na_us(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2) {
19217   int __pyx_v_cs;
19218   int __pyx_v_ss;
19219   int __pyx_v_ncs;
19220   int __pyx_v_nrow;
19221   int __pyx_v_nrows;
19222   int __pyx_v_nbounds;
19223   int __pyx_v_rvrow;
19224   int __pyx_v_start;
19225   int __pyx_v_stop;
19226   int __pyx_v_tlength;
19227   int __pyx_v_length;
19228   int __pyx_v_bread;
19229   int __pyx_v_nchunk;
19230   int __pyx_v_nchunk2;
19231   int *__pyx_v_rbufst;
19232   int *__pyx_v_rbufln;
19233   npy_uint16 *__pyx_v_rbufrv;
19234   npy_uint16 *__pyx_v_rbufbc;
19235   npy_uint16 *__pyx_v_rbuflb;
19236   PyObject *__pyx_r = NULL;
19237   __Pyx_RefNannyDeclarations
19238   int __pyx_t_1;
19239   PyObject *__pyx_t_2 = NULL;
19240   int __pyx_t_3;
19241   __Pyx_RefNannySetupContext("_search_bin_na_us", 0);
19242 
19243   /* "tables/indexesextension.pyx":939
19244  *     # Variables with specific type
19245  *     cdef npy_uint16 *rbufrv
19246  *     cdef npy_uint16 *rbufbc = NULL             # <<<<<<<<<<<<<<
19247  *     cdef npy_uint16 *rbuflb = NULL
19248  *
19249  */
19250   __pyx_v_rbufbc = NULL;
19251 
19252   /* "tables/indexesextension.pyx":940
19253  *     cdef npy_uint16 *rbufrv
19254  *     cdef npy_uint16 *rbufbc = NULL
19255  *     cdef npy_uint16 *rbuflb = NULL             # <<<<<<<<<<<<<<
19256  *
19257  *     cs = self.l_chunksize
19258  */
19259   __pyx_v_rbuflb = NULL;
19260 
19261   /* "tables/indexesextension.pyx":942
19262  *     cdef npy_uint16 *rbuflb = NULL
19263  *
19264  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
19265  *     ss = self.l_slicesize
19266  *     ncs = ss / cs
19267  */
19268   __pyx_t_1 = __pyx_v_self->l_chunksize;
19269   __pyx_v_cs = __pyx_t_1;
19270 
19271   /* "tables/indexesextension.pyx":943
19272  *
19273  *     cs = self.l_chunksize
19274  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
19275  *     ncs = ss / cs
19276  *     nbounds = self.nbounds
19277  */
19278   __pyx_t_1 = __pyx_v_self->l_slicesize;
19279   __pyx_v_ss = __pyx_t_1;
19280 
19281   /* "tables/indexesextension.pyx":944
19282  *     cs = self.l_chunksize
19283  *     ss = self.l_slicesize
19284  *     ncs = ss / cs             # <<<<<<<<<<<<<<
19285  *     nbounds = self.nbounds
19286  *     nrows = self.nrows
19287  */
19288   if (unlikely(__pyx_v_cs == 0)) {
19289     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
19290     __PYX_ERR(0, 944, __pyx_L1_error)
19291   }
19292   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
19293     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
19294     __PYX_ERR(0, 944, __pyx_L1_error)
19295   }
19296   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
19297 
19298   /* "tables/indexesextension.pyx":945
19299  *     ss = self.l_slicesize
19300  *     ncs = ss / cs
19301  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
19302  *     nrows = self.nrows
19303  *     rbufst = <int *>self.rbufst
19304  */
19305   __pyx_t_1 = __pyx_v_self->nbounds;
19306   __pyx_v_nbounds = __pyx_t_1;
19307 
19308   /* "tables/indexesextension.pyx":946
19309  *     ncs = ss / cs
19310  *     nbounds = self.nbounds
19311  *     nrows = self.nrows             # <<<<<<<<<<<<<<
19312  *     rbufst = <int *>self.rbufst
19313  *     rbufln = <int *>self.rbufln
19314  */
19315   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
19316   __Pyx_GOTREF(__pyx_t_2);
19317   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 946, __pyx_L1_error)
19318   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19319   __pyx_v_nrows = __pyx_t_1;
19320 
19321   /* "tables/indexesextension.pyx":947
19322  *     nbounds = self.nbounds
19323  *     nrows = self.nrows
19324  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
19325  *     rbufln = <int *>self.rbufln
19326  *     rbufrv = <npy_uint16 *>self.rbufrv
19327  */
19328   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
19329 
19330   /* "tables/indexesextension.pyx":948
19331  *     nrows = self.nrows
19332  *     rbufst = <int *>self.rbufst
19333  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
19334  *     rbufrv = <npy_uint16 *>self.rbufrv
19335  *     tlength = 0
19336  */
19337   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
19338 
19339   /* "tables/indexesextension.pyx":949
19340  *     rbufst = <int *>self.rbufst
19341  *     rbufln = <int *>self.rbufln
19342  *     rbufrv = <npy_uint16 *>self.rbufrv             # <<<<<<<<<<<<<<
19343  *     tlength = 0
19344  *     for nrow from 0 <= nrow < nrows:
19345  */
19346   __pyx_v_rbufrv = ((npy_uint16 *)__pyx_v_self->rbufrv);
19347 
19348   /* "tables/indexesextension.pyx":950
19349  *     rbufln = <int *>self.rbufln
19350  *     rbufrv = <npy_uint16 *>self.rbufrv
19351  *     tlength = 0             # <<<<<<<<<<<<<<
19352  *     for nrow from 0 <= nrow < nrows:
19353  *       rvrow = nrow*2
19354  */
19355   __pyx_v_tlength = 0;
19356 
19357   /* "tables/indexesextension.pyx":951
19358  *     rbufrv = <npy_uint16 *>self.rbufrv
19359  *     tlength = 0
19360  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
19361  *       rvrow = nrow*2
19362  *       bread = 0
19363  */
19364   __pyx_t_1 = __pyx_v_nrows;
19365   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
19366 
19367     /* "tables/indexesextension.pyx":952
19368  *     tlength = 0
19369  *     for nrow from 0 <= nrow < nrows:
19370  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
19371  *       bread = 0
19372  *       nchunk = -1
19373  */
19374     __pyx_v_rvrow = (__pyx_v_nrow * 2);
19375 
19376     /* "tables/indexesextension.pyx":953
19377  *     for nrow from 0 <= nrow < nrows:
19378  *       rvrow = nrow*2
19379  *       bread = 0             # <<<<<<<<<<<<<<
19380  *       nchunk = -1
19381  *       # Look if item1 is in this row
19382  */
19383     __pyx_v_bread = 0;
19384 
19385     /* "tables/indexesextension.pyx":954
19386  *       rvrow = nrow*2
19387  *       bread = 0
19388  *       nchunk = -1             # <<<<<<<<<<<<<<
19389  *       # Look if item1 is in this row
19390  *       if item1 > rbufrv[rvrow]:
19391  */
19392     __pyx_v_nchunk = -1;
19393 
19394     /* "tables/indexesextension.pyx":956
19395  *       nchunk = -1
19396  *       # Look if item1 is in this row
19397  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
19398  *         if item1 <= rbufrv[rvrow+1]:
19399  *           # Get the bounds row from the LRU cache or read them.
19400  */
19401     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
19402     if (__pyx_t_3) {
19403 
19404       /* "tables/indexesextension.pyx":957
19405  *       # Look if item1 is in this row
19406  *       if item1 > rbufrv[rvrow]:
19407  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
19408  *           # Get the bounds row from the LRU cache or read them.
19409  *           rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19410  */
19411       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
19412       if (__pyx_t_3) {
19413 
19414         /* "tables/indexesextension.pyx":959
19415  *         if item1 <= rbufrv[rvrow+1]:
19416  *           # Get the bounds row from the LRU cache or read them.
19417  *           rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
19418  *           bread = 1
19419  *           nchunk = bisect_left_us(rbufbc, item1, nbounds, 0)
19420  */
19421         __pyx_v_rbufbc = ((npy_uint16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
19422 
19423         /* "tables/indexesextension.pyx":960
19424  *           # Get the bounds row from the LRU cache or read them.
19425  *           rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19426  *           bread = 1             # <<<<<<<<<<<<<<
19427  *           nchunk = bisect_left_us(rbufbc, item1, nbounds, 0)
19428  *           # Get the sorted row from the LRU cache or read it.
19429  */
19430         __pyx_v_bread = 1;
19431 
19432         /* "tables/indexesextension.pyx":961
19433  *           rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19434  *           bread = 1
19435  *           nchunk = bisect_left_us(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
19436  *           # Get the sorted row from the LRU cache or read it.
19437  *           rbuflb = <npy_uint16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
19438  */
19439         __pyx_v_nchunk = bisect_left_us(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
19440 
19441         /* "tables/indexesextension.pyx":963
19442  *           nchunk = bisect_left_us(rbufbc, item1, nbounds, 0)
19443  *           # Get the sorted row from the LRU cache or read it.
19444  *           rbuflb = <npy_uint16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
19445  *           start = bisect_left_us(rbuflb, item1, cs, 0) + cs*nchunk
19446  *         else:
19447  */
19448         __pyx_v_rbuflb = ((npy_uint16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
19449 
19450         /* "tables/indexesextension.pyx":964
19451  *           # Get the sorted row from the LRU cache or read it.
19452  *           rbuflb = <npy_uint16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
19453  *           start = bisect_left_us(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
19454  *         else:
19455  *           start = ss
19456  */
19457         __pyx_v_start = (bisect_left_us(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
19458 
19459         /* "tables/indexesextension.pyx":957
19460  *       # Look if item1 is in this row
19461  *       if item1 > rbufrv[rvrow]:
19462  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
19463  *           # Get the bounds row from the LRU cache or read them.
19464  *           rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19465  */
19466         goto __pyx_L6;
19467       }
19468 
19469       /* "tables/indexesextension.pyx":966
19470  *           start = bisect_left_us(rbuflb, item1, cs, 0) + cs*nchunk
19471  *         else:
19472  *           start = ss             # <<<<<<<<<<<<<<
19473  *       else:
19474  *         start = 0
19475  */
19476       /*else*/ {
19477         __pyx_v_start = __pyx_v_ss;
19478       }
19479       __pyx_L6:;
19480 
19481       /* "tables/indexesextension.pyx":956
19482  *       nchunk = -1
19483  *       # Look if item1 is in this row
19484  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
19485  *         if item1 <= rbufrv[rvrow+1]:
19486  *           # Get the bounds row from the LRU cache or read them.
19487  */
19488       goto __pyx_L5;
19489     }
19490 
19491     /* "tables/indexesextension.pyx":968
19492  *           start = ss
19493  *       else:
19494  *         start = 0             # <<<<<<<<<<<<<<
19495  *       # Now, for item2
19496  *       if item2 >= rbufrv[rvrow]:
19497  */
19498     /*else*/ {
19499       __pyx_v_start = 0;
19500     }
19501     __pyx_L5:;
19502 
19503     /* "tables/indexesextension.pyx":970
19504  *         start = 0
19505  *       # Now, for item2
19506  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
19507  *         if item2 < rbufrv[rvrow+1]:
19508  *           if not bread:
19509  */
19510     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
19511     if (__pyx_t_3) {
19512 
19513       /* "tables/indexesextension.pyx":971
19514  *       # Now, for item2
19515  *       if item2 >= rbufrv[rvrow]:
19516  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
19517  *           if not bread:
19518  *             # Get the bounds row from the LRU cache or read them.
19519  */
19520       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
19521       if (__pyx_t_3) {
19522 
19523         /* "tables/indexesextension.pyx":972
19524  *       if item2 >= rbufrv[rvrow]:
19525  *         if item2 < rbufrv[rvrow+1]:
19526  *           if not bread:             # <<<<<<<<<<<<<<
19527  *             # Get the bounds row from the LRU cache or read them.
19528  *             rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19529  */
19530         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
19531         if (__pyx_t_3) {
19532 
19533           /* "tables/indexesextension.pyx":974
19534  *           if not bread:
19535  *             # Get the bounds row from the LRU cache or read them.
19536  *             rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
19537  *           nchunk2 = bisect_right_us(rbufbc, item2, nbounds, 0)
19538  *           if nchunk2 <> nchunk:
19539  */
19540           __pyx_v_rbufbc = ((npy_uint16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
19541 
19542           /* "tables/indexesextension.pyx":972
19543  *       if item2 >= rbufrv[rvrow]:
19544  *         if item2 < rbufrv[rvrow+1]:
19545  *           if not bread:             # <<<<<<<<<<<<<<
19546  *             # Get the bounds row from the LRU cache or read them.
19547  *             rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19548  */
19549         }
19550 
19551         /* "tables/indexesextension.pyx":975
19552  *             # Get the bounds row from the LRU cache or read them.
19553  *             rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19554  *           nchunk2 = bisect_right_us(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
19555  *           if nchunk2 <> nchunk:
19556  *             # Get the sorted row from the LRU cache or read it.
19557  */
19558         __pyx_v_nchunk2 = bisect_right_us(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
19559 
19560         /* "tables/indexesextension.pyx":976
19561  *             rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19562  *           nchunk2 = bisect_right_us(rbufbc, item2, nbounds, 0)
19563  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
19564  *             # Get the sorted row from the LRU cache or read it.
19565  *             rbuflb = <npy_uint16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
19566  */
19567         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
19568         if (__pyx_t_3) {
19569 
19570           /* "tables/indexesextension.pyx":978
19571  *           if nchunk2 <> nchunk:
19572  *             # Get the sorted row from the LRU cache or read it.
19573  *             rbuflb = <npy_uint16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
19574  *           stop = bisect_right_us(rbuflb, item2, cs, 0) + cs*nchunk2
19575  *         else:
19576  */
19577           __pyx_v_rbuflb = ((npy_uint16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
19578 
19579           /* "tables/indexesextension.pyx":976
19580  *             rbufbc = <npy_uint16 *>self.get_lru_bounds(nrow, nbounds)
19581  *           nchunk2 = bisect_right_us(rbufbc, item2, nbounds, 0)
19582  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
19583  *             # Get the sorted row from the LRU cache or read it.
19584  *             rbuflb = <npy_uint16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
19585  */
19586         }
19587 
19588         /* "tables/indexesextension.pyx":979
19589  *             # Get the sorted row from the LRU cache or read it.
19590  *             rbuflb = <npy_uint16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
19591  *           stop = bisect_right_us(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
19592  *         else:
19593  *           stop = ss
19594  */
19595         __pyx_v_stop = (bisect_right_us(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
19596 
19597         /* "tables/indexesextension.pyx":971
19598  *       # Now, for item2
19599  *       if item2 >= rbufrv[rvrow]:
19600  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
19601  *           if not bread:
19602  *             # Get the bounds row from the LRU cache or read them.
19603  */
19604         goto __pyx_L8;
19605       }
19606 
19607       /* "tables/indexesextension.pyx":981
19608  *           stop = bisect_right_us(rbuflb, item2, cs, 0) + cs*nchunk2
19609  *         else:
19610  *           stop = ss             # <<<<<<<<<<<<<<
19611  *       else:
19612  *         stop = 0
19613  */
19614       /*else*/ {
19615         __pyx_v_stop = __pyx_v_ss;
19616       }
19617       __pyx_L8:;
19618 
19619       /* "tables/indexesextension.pyx":970
19620  *         start = 0
19621  *       # Now, for item2
19622  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
19623  *         if item2 < rbufrv[rvrow+1]:
19624  *           if not bread:
19625  */
19626       goto __pyx_L7;
19627     }
19628 
19629     /* "tables/indexesextension.pyx":983
19630  *           stop = ss
19631  *       else:
19632  *         stop = 0             # <<<<<<<<<<<<<<
19633  *       length = stop - start
19634  *       tlength = tlength + length
19635  */
19636     /*else*/ {
19637       __pyx_v_stop = 0;
19638     }
19639     __pyx_L7:;
19640 
19641     /* "tables/indexesextension.pyx":984
19642  *       else:
19643  *         stop = 0
19644  *       length = stop - start             # <<<<<<<<<<<<<<
19645  *       tlength = tlength + length
19646  *       rbufst[nrow] = start
19647  */
19648     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
19649 
19650     /* "tables/indexesextension.pyx":985
19651  *         stop = 0
19652  *       length = stop - start
19653  *       tlength = tlength + length             # <<<<<<<<<<<<<<
19654  *       rbufst[nrow] = start
19655  *       rbufln[nrow] = length
19656  */
19657     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
19658 
19659     /* "tables/indexesextension.pyx":986
19660  *       length = stop - start
19661  *       tlength = tlength + length
19662  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
19663  *       rbufln[nrow] = length
19664  *     return tlength
19665  */
19666     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
19667 
19668     /* "tables/indexesextension.pyx":987
19669  *       tlength = tlength + length
19670  *       rbufst[nrow] = start
19671  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
19672  *     return tlength
19673  *
19674  */
19675     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
19676   }
19677 
19678   /* "tables/indexesextension.pyx":988
19679  *       rbufst[nrow] = start
19680  *       rbufln[nrow] = length
19681  *     return tlength             # <<<<<<<<<<<<<<
19682  *
19683  *
19684  */
19685   __Pyx_XDECREF(__pyx_r);
19686   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
19687   __Pyx_GOTREF(__pyx_t_2);
19688   __pyx_r = __pyx_t_2;
19689   __pyx_t_2 = 0;
19690   goto __pyx_L0;
19691 
19692   /* "tables/indexesextension.pyx":931
19693  *
19694  *   # Optimized version for uint16
19695  *   def _search_bin_na_us(self, long item1, long item2):             # <<<<<<<<<<<<<<
19696  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
19697  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
19698  */
19699 
19700   /* function exit code */
19701   __pyx_L1_error:;
19702   __Pyx_XDECREF(__pyx_t_2);
19703   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
19704   __pyx_r = NULL;
19705   __pyx_L0:;
19706   __Pyx_XGIVEREF(__pyx_r);
19707   __Pyx_RefNannyFinishContext();
19708   return __pyx_r;
19709 }
19710 
19711 /* "tables/indexesextension.pyx":992
19712  *
19713  *   # Optimized version for int32
19714  *   def _search_bin_na_i(self, long item1, long item2):             # <<<<<<<<<<<<<<
19715  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
19716  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
19717  */
19718 
19719 /* Python wrapper */
19720 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_15_search_bin_na_i(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_15_search_bin_na_i(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)19721 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_15_search_bin_na_i(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19722   long __pyx_v_item1;
19723   long __pyx_v_item2;
19724   PyObject *__pyx_r = 0;
19725   __Pyx_RefNannyDeclarations
19726   __Pyx_RefNannySetupContext("_search_bin_na_i (wrapper)", 0);
19727   {
19728     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
19729     PyObject* values[2] = {0,0};
19730     if (unlikely(__pyx_kwds)) {
19731       Py_ssize_t kw_args;
19732       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19733       switch (pos_args) {
19734         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19735         CYTHON_FALLTHROUGH;
19736         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19737         CYTHON_FALLTHROUGH;
19738         case  0: break;
19739         default: goto __pyx_L5_argtuple_error;
19740       }
19741       kw_args = PyDict_Size(__pyx_kwds);
19742       switch (pos_args) {
19743         case  0:
19744         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
19745         else goto __pyx_L5_argtuple_error;
19746         CYTHON_FALLTHROUGH;
19747         case  1:
19748         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
19749         else {
19750           __Pyx_RaiseArgtupleInvalid("_search_bin_na_i", 1, 2, 2, 1); __PYX_ERR(0, 992, __pyx_L3_error)
19751         }
19752       }
19753       if (unlikely(kw_args > 0)) {
19754         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_i") < 0)) __PYX_ERR(0, 992, __pyx_L3_error)
19755       }
19756     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
19757       goto __pyx_L5_argtuple_error;
19758     } else {
19759       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19760       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19761     }
19762     __pyx_v_item1 = __Pyx_PyInt_As_long(values[0]); if (unlikely((__pyx_v_item1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L3_error)
19763     __pyx_v_item2 = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v_item2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L3_error)
19764   }
19765   goto __pyx_L4_argument_unpacking_done;
19766   __pyx_L5_argtuple_error:;
19767   __Pyx_RaiseArgtupleInvalid("_search_bin_na_i", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 992, __pyx_L3_error)
19768   __pyx_L3_error:;
19769   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_i", __pyx_clineno, __pyx_lineno, __pyx_filename);
19770   __Pyx_RefNannyFinishContext();
19771   return NULL;
19772   __pyx_L4_argument_unpacking_done:;
19773   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_14_search_bin_na_i(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
19774 
19775   /* function exit code */
19776   __Pyx_RefNannyFinishContext();
19777   return __pyx_r;
19778 }
19779 
__pyx_pf_6tables_16indexesextension_10IndexArray_14_search_bin_na_i(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,long __pyx_v_item1,long __pyx_v_item2)19780 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_14_search_bin_na_i(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, long __pyx_v_item1, long __pyx_v_item2) {
19781   int __pyx_v_cs;
19782   int __pyx_v_ss;
19783   int __pyx_v_ncs;
19784   int __pyx_v_nrow;
19785   int __pyx_v_nrows;
19786   int __pyx_v_nbounds;
19787   int __pyx_v_rvrow;
19788   int __pyx_v_start;
19789   int __pyx_v_stop;
19790   int __pyx_v_tlength;
19791   int __pyx_v_length;
19792   int __pyx_v_bread;
19793   int __pyx_v_nchunk;
19794   int __pyx_v_nchunk2;
19795   int *__pyx_v_rbufst;
19796   int *__pyx_v_rbufln;
19797   npy_int32 *__pyx_v_rbufrv;
19798   npy_int32 *__pyx_v_rbufbc;
19799   npy_int32 *__pyx_v_rbuflb;
19800   PyObject *__pyx_r = NULL;
19801   __Pyx_RefNannyDeclarations
19802   int __pyx_t_1;
19803   PyObject *__pyx_t_2 = NULL;
19804   int __pyx_t_3;
19805   __Pyx_RefNannySetupContext("_search_bin_na_i", 0);
19806 
19807   /* "tables/indexesextension.pyx":1000
19808  *     # Variables with specific type
19809  *     cdef npy_int32 *rbufrv
19810  *     cdef npy_int32 *rbufbc = NULL             # <<<<<<<<<<<<<<
19811  *     cdef npy_int32 *rbuflb = NULL
19812  *
19813  */
19814   __pyx_v_rbufbc = NULL;
19815 
19816   /* "tables/indexesextension.pyx":1001
19817  *     cdef npy_int32 *rbufrv
19818  *     cdef npy_int32 *rbufbc = NULL
19819  *     cdef npy_int32 *rbuflb = NULL             # <<<<<<<<<<<<<<
19820  *
19821  *     cs = self.l_chunksize
19822  */
19823   __pyx_v_rbuflb = NULL;
19824 
19825   /* "tables/indexesextension.pyx":1003
19826  *     cdef npy_int32 *rbuflb = NULL
19827  *
19828  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
19829  *     ss = self.l_slicesize
19830  *     ncs = ss / cs
19831  */
19832   __pyx_t_1 = __pyx_v_self->l_chunksize;
19833   __pyx_v_cs = __pyx_t_1;
19834 
19835   /* "tables/indexesextension.pyx":1004
19836  *
19837  *     cs = self.l_chunksize
19838  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
19839  *     ncs = ss / cs
19840  *     nbounds = self.nbounds
19841  */
19842   __pyx_t_1 = __pyx_v_self->l_slicesize;
19843   __pyx_v_ss = __pyx_t_1;
19844 
19845   /* "tables/indexesextension.pyx":1005
19846  *     cs = self.l_chunksize
19847  *     ss = self.l_slicesize
19848  *     ncs = ss / cs             # <<<<<<<<<<<<<<
19849  *     nbounds = self.nbounds
19850  *     nrows = self.nrows
19851  */
19852   if (unlikely(__pyx_v_cs == 0)) {
19853     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
19854     __PYX_ERR(0, 1005, __pyx_L1_error)
19855   }
19856   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
19857     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
19858     __PYX_ERR(0, 1005, __pyx_L1_error)
19859   }
19860   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
19861 
19862   /* "tables/indexesextension.pyx":1006
19863  *     ss = self.l_slicesize
19864  *     ncs = ss / cs
19865  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
19866  *     nrows = self.nrows
19867  *     rbufst = <int *>self.rbufst
19868  */
19869   __pyx_t_1 = __pyx_v_self->nbounds;
19870   __pyx_v_nbounds = __pyx_t_1;
19871 
19872   /* "tables/indexesextension.pyx":1007
19873  *     ncs = ss / cs
19874  *     nbounds = self.nbounds
19875  *     nrows = self.nrows             # <<<<<<<<<<<<<<
19876  *     rbufst = <int *>self.rbufst
19877  *     rbufln = <int *>self.rbufln
19878  */
19879   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)
19880   __Pyx_GOTREF(__pyx_t_2);
19881   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L1_error)
19882   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19883   __pyx_v_nrows = __pyx_t_1;
19884 
19885   /* "tables/indexesextension.pyx":1008
19886  *     nbounds = self.nbounds
19887  *     nrows = self.nrows
19888  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
19889  *     rbufln = <int *>self.rbufln
19890  *     rbufrv = <npy_int32 *>self.rbufrv
19891  */
19892   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
19893 
19894   /* "tables/indexesextension.pyx":1009
19895  *     nrows = self.nrows
19896  *     rbufst = <int *>self.rbufst
19897  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
19898  *     rbufrv = <npy_int32 *>self.rbufrv
19899  *     tlength = 0
19900  */
19901   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
19902 
19903   /* "tables/indexesextension.pyx":1010
19904  *     rbufst = <int *>self.rbufst
19905  *     rbufln = <int *>self.rbufln
19906  *     rbufrv = <npy_int32 *>self.rbufrv             # <<<<<<<<<<<<<<
19907  *     tlength = 0
19908  *     for nrow from 0 <= nrow < nrows:
19909  */
19910   __pyx_v_rbufrv = ((npy_int32 *)__pyx_v_self->rbufrv);
19911 
19912   /* "tables/indexesextension.pyx":1011
19913  *     rbufln = <int *>self.rbufln
19914  *     rbufrv = <npy_int32 *>self.rbufrv
19915  *     tlength = 0             # <<<<<<<<<<<<<<
19916  *     for nrow from 0 <= nrow < nrows:
19917  *       rvrow = nrow*2
19918  */
19919   __pyx_v_tlength = 0;
19920 
19921   /* "tables/indexesextension.pyx":1012
19922  *     rbufrv = <npy_int32 *>self.rbufrv
19923  *     tlength = 0
19924  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
19925  *       rvrow = nrow*2
19926  *       bread = 0
19927  */
19928   __pyx_t_1 = __pyx_v_nrows;
19929   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
19930 
19931     /* "tables/indexesextension.pyx":1013
19932  *     tlength = 0
19933  *     for nrow from 0 <= nrow < nrows:
19934  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
19935  *       bread = 0
19936  *       nchunk = -1
19937  */
19938     __pyx_v_rvrow = (__pyx_v_nrow * 2);
19939 
19940     /* "tables/indexesextension.pyx":1014
19941  *     for nrow from 0 <= nrow < nrows:
19942  *       rvrow = nrow*2
19943  *       bread = 0             # <<<<<<<<<<<<<<
19944  *       nchunk = -1
19945  *       # Look if item1 is in this row
19946  */
19947     __pyx_v_bread = 0;
19948 
19949     /* "tables/indexesextension.pyx":1015
19950  *       rvrow = nrow*2
19951  *       bread = 0
19952  *       nchunk = -1             # <<<<<<<<<<<<<<
19953  *       # Look if item1 is in this row
19954  *       if item1 > rbufrv[rvrow]:
19955  */
19956     __pyx_v_nchunk = -1;
19957 
19958     /* "tables/indexesextension.pyx":1017
19959  *       nchunk = -1
19960  *       # Look if item1 is in this row
19961  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
19962  *         if item1 <= rbufrv[rvrow+1]:
19963  *           # Get the bounds row from the LRU cache or read them.
19964  */
19965     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
19966     if (__pyx_t_3) {
19967 
19968       /* "tables/indexesextension.pyx":1018
19969  *       # Look if item1 is in this row
19970  *       if item1 > rbufrv[rvrow]:
19971  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
19972  *           # Get the bounds row from the LRU cache or read them.
19973  *           rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
19974  */
19975       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
19976       if (__pyx_t_3) {
19977 
19978         /* "tables/indexesextension.pyx":1020
19979  *         if item1 <= rbufrv[rvrow+1]:
19980  *           # Get the bounds row from the LRU cache or read them.
19981  *           rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
19982  *           bread = 1
19983  *           nchunk = bisect_left_i(rbufbc, item1, nbounds, 0)
19984  */
19985         __pyx_v_rbufbc = ((npy_int32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
19986 
19987         /* "tables/indexesextension.pyx":1021
19988  *           # Get the bounds row from the LRU cache or read them.
19989  *           rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
19990  *           bread = 1             # <<<<<<<<<<<<<<
19991  *           nchunk = bisect_left_i(rbufbc, item1, nbounds, 0)
19992  *           # Get the sorted row from the LRU cache or read it.
19993  */
19994         __pyx_v_bread = 1;
19995 
19996         /* "tables/indexesextension.pyx":1022
19997  *           rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
19998  *           bread = 1
19999  *           nchunk = bisect_left_i(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
20000  *           # Get the sorted row from the LRU cache or read it.
20001  *           rbuflb = <npy_int32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
20002  */
20003         __pyx_v_nchunk = bisect_left_i(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
20004 
20005         /* "tables/indexesextension.pyx":1024
20006  *           nchunk = bisect_left_i(rbufbc, item1, nbounds, 0)
20007  *           # Get the sorted row from the LRU cache or read it.
20008  *           rbuflb = <npy_int32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
20009  *           start = bisect_left_i(rbuflb, item1, cs, 0) + cs*nchunk
20010  *         else:
20011  */
20012         __pyx_v_rbuflb = ((npy_int32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
20013 
20014         /* "tables/indexesextension.pyx":1025
20015  *           # Get the sorted row from the LRU cache or read it.
20016  *           rbuflb = <npy_int32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
20017  *           start = bisect_left_i(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
20018  *         else:
20019  *           start = ss
20020  */
20021         __pyx_v_start = (bisect_left_i(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
20022 
20023         /* "tables/indexesextension.pyx":1018
20024  *       # Look if item1 is in this row
20025  *       if item1 > rbufrv[rvrow]:
20026  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
20027  *           # Get the bounds row from the LRU cache or read them.
20028  *           rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
20029  */
20030         goto __pyx_L6;
20031       }
20032 
20033       /* "tables/indexesextension.pyx":1027
20034  *           start = bisect_left_i(rbuflb, item1, cs, 0) + cs*nchunk
20035  *         else:
20036  *           start = ss             # <<<<<<<<<<<<<<
20037  *       else:
20038  *         start = 0
20039  */
20040       /*else*/ {
20041         __pyx_v_start = __pyx_v_ss;
20042       }
20043       __pyx_L6:;
20044 
20045       /* "tables/indexesextension.pyx":1017
20046  *       nchunk = -1
20047  *       # Look if item1 is in this row
20048  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
20049  *         if item1 <= rbufrv[rvrow+1]:
20050  *           # Get the bounds row from the LRU cache or read them.
20051  */
20052       goto __pyx_L5;
20053     }
20054 
20055     /* "tables/indexesextension.pyx":1029
20056  *           start = ss
20057  *       else:
20058  *         start = 0             # <<<<<<<<<<<<<<
20059  *       # Now, for item2
20060  *       if item2 >= rbufrv[rvrow]:
20061  */
20062     /*else*/ {
20063       __pyx_v_start = 0;
20064     }
20065     __pyx_L5:;
20066 
20067     /* "tables/indexesextension.pyx":1031
20068  *         start = 0
20069  *       # Now, for item2
20070  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
20071  *         if item2 < rbufrv[rvrow+1]:
20072  *           if not bread:
20073  */
20074     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
20075     if (__pyx_t_3) {
20076 
20077       /* "tables/indexesextension.pyx":1032
20078  *       # Now, for item2
20079  *       if item2 >= rbufrv[rvrow]:
20080  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
20081  *           if not bread:
20082  *             # Get the bounds row from the LRU cache or read them.
20083  */
20084       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
20085       if (__pyx_t_3) {
20086 
20087         /* "tables/indexesextension.pyx":1033
20088  *       if item2 >= rbufrv[rvrow]:
20089  *         if item2 < rbufrv[rvrow+1]:
20090  *           if not bread:             # <<<<<<<<<<<<<<
20091  *             # Get the bounds row from the LRU cache or read them.
20092  *             rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
20093  */
20094         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
20095         if (__pyx_t_3) {
20096 
20097           /* "tables/indexesextension.pyx":1035
20098  *           if not bread:
20099  *             # Get the bounds row from the LRU cache or read them.
20100  *             rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
20101  *           nchunk2 = bisect_right_i(rbufbc, item2, nbounds, 0)
20102  *           if nchunk2 <> nchunk:
20103  */
20104           __pyx_v_rbufbc = ((npy_int32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
20105 
20106           /* "tables/indexesextension.pyx":1033
20107  *       if item2 >= rbufrv[rvrow]:
20108  *         if item2 < rbufrv[rvrow+1]:
20109  *           if not bread:             # <<<<<<<<<<<<<<
20110  *             # Get the bounds row from the LRU cache or read them.
20111  *             rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
20112  */
20113         }
20114 
20115         /* "tables/indexesextension.pyx":1036
20116  *             # Get the bounds row from the LRU cache or read them.
20117  *             rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
20118  *           nchunk2 = bisect_right_i(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
20119  *           if nchunk2 <> nchunk:
20120  *             # Get the sorted row from the LRU cache or read it.
20121  */
20122         __pyx_v_nchunk2 = bisect_right_i(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
20123 
20124         /* "tables/indexesextension.pyx":1037
20125  *             rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
20126  *           nchunk2 = bisect_right_i(rbufbc, item2, nbounds, 0)
20127  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
20128  *             # Get the sorted row from the LRU cache or read it.
20129  *             rbuflb = <npy_int32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
20130  */
20131         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
20132         if (__pyx_t_3) {
20133 
20134           /* "tables/indexesextension.pyx":1039
20135  *           if nchunk2 <> nchunk:
20136  *             # Get the sorted row from the LRU cache or read it.
20137  *             rbuflb = <npy_int32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
20138  *           stop = bisect_right_i(rbuflb, item2, cs, 0) + cs*nchunk2
20139  *         else:
20140  */
20141           __pyx_v_rbuflb = ((npy_int32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
20142 
20143           /* "tables/indexesextension.pyx":1037
20144  *             rbufbc = <npy_int32 *>self.get_lru_bounds(nrow, nbounds)
20145  *           nchunk2 = bisect_right_i(rbufbc, item2, nbounds, 0)
20146  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
20147  *             # Get the sorted row from the LRU cache or read it.
20148  *             rbuflb = <npy_int32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
20149  */
20150         }
20151 
20152         /* "tables/indexesextension.pyx":1040
20153  *             # Get the sorted row from the LRU cache or read it.
20154  *             rbuflb = <npy_int32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
20155  *           stop = bisect_right_i(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
20156  *         else:
20157  *           stop = ss
20158  */
20159         __pyx_v_stop = (bisect_right_i(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
20160 
20161         /* "tables/indexesextension.pyx":1032
20162  *       # Now, for item2
20163  *       if item2 >= rbufrv[rvrow]:
20164  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
20165  *           if not bread:
20166  *             # Get the bounds row from the LRU cache or read them.
20167  */
20168         goto __pyx_L8;
20169       }
20170 
20171       /* "tables/indexesextension.pyx":1042
20172  *           stop = bisect_right_i(rbuflb, item2, cs, 0) + cs*nchunk2
20173  *         else:
20174  *           stop = ss             # <<<<<<<<<<<<<<
20175  *       else:
20176  *         stop = 0
20177  */
20178       /*else*/ {
20179         __pyx_v_stop = __pyx_v_ss;
20180       }
20181       __pyx_L8:;
20182 
20183       /* "tables/indexesextension.pyx":1031
20184  *         start = 0
20185  *       # Now, for item2
20186  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
20187  *         if item2 < rbufrv[rvrow+1]:
20188  *           if not bread:
20189  */
20190       goto __pyx_L7;
20191     }
20192 
20193     /* "tables/indexesextension.pyx":1044
20194  *           stop = ss
20195  *       else:
20196  *         stop = 0             # <<<<<<<<<<<<<<
20197  *       length = stop - start
20198  *       tlength = tlength + length
20199  */
20200     /*else*/ {
20201       __pyx_v_stop = 0;
20202     }
20203     __pyx_L7:;
20204 
20205     /* "tables/indexesextension.pyx":1045
20206  *       else:
20207  *         stop = 0
20208  *       length = stop - start             # <<<<<<<<<<<<<<
20209  *       tlength = tlength + length
20210  *       rbufst[nrow] = start
20211  */
20212     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
20213 
20214     /* "tables/indexesextension.pyx":1046
20215  *         stop = 0
20216  *       length = stop - start
20217  *       tlength = tlength + length             # <<<<<<<<<<<<<<
20218  *       rbufst[nrow] = start
20219  *       rbufln[nrow] = length
20220  */
20221     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
20222 
20223     /* "tables/indexesextension.pyx":1047
20224  *       length = stop - start
20225  *       tlength = tlength + length
20226  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
20227  *       rbufln[nrow] = length
20228  *     return tlength
20229  */
20230     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
20231 
20232     /* "tables/indexesextension.pyx":1048
20233  *       tlength = tlength + length
20234  *       rbufst[nrow] = start
20235  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
20236  *     return tlength
20237  *
20238  */
20239     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
20240   }
20241 
20242   /* "tables/indexesextension.pyx":1049
20243  *       rbufst[nrow] = start
20244  *       rbufln[nrow] = length
20245  *     return tlength             # <<<<<<<<<<<<<<
20246  *
20247  *
20248  */
20249   __Pyx_XDECREF(__pyx_r);
20250   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
20251   __Pyx_GOTREF(__pyx_t_2);
20252   __pyx_r = __pyx_t_2;
20253   __pyx_t_2 = 0;
20254   goto __pyx_L0;
20255 
20256   /* "tables/indexesextension.pyx":992
20257  *
20258  *   # Optimized version for int32
20259  *   def _search_bin_na_i(self, long item1, long item2):             # <<<<<<<<<<<<<<
20260  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
20261  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
20262  */
20263 
20264   /* function exit code */
20265   __pyx_L1_error:;
20266   __Pyx_XDECREF(__pyx_t_2);
20267   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_i", __pyx_clineno, __pyx_lineno, __pyx_filename);
20268   __pyx_r = NULL;
20269   __pyx_L0:;
20270   __Pyx_XGIVEREF(__pyx_r);
20271   __Pyx_RefNannyFinishContext();
20272   return __pyx_r;
20273 }
20274 
20275 /* "tables/indexesextension.pyx":1053
20276  *
20277  *   # Optimized version for uint32
20278  *   def _search_bin_na_ui(self, npy_uint32 item1, npy_uint32 item2):             # <<<<<<<<<<<<<<
20279  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
20280  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
20281  */
20282 
20283 /* Python wrapper */
20284 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_17_search_bin_na_ui(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_17_search_bin_na_ui(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)20285 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_17_search_bin_na_ui(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20286   npy_uint32 __pyx_v_item1;
20287   npy_uint32 __pyx_v_item2;
20288   PyObject *__pyx_r = 0;
20289   __Pyx_RefNannyDeclarations
20290   __Pyx_RefNannySetupContext("_search_bin_na_ui (wrapper)", 0);
20291   {
20292     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
20293     PyObject* values[2] = {0,0};
20294     if (unlikely(__pyx_kwds)) {
20295       Py_ssize_t kw_args;
20296       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20297       switch (pos_args) {
20298         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20299         CYTHON_FALLTHROUGH;
20300         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20301         CYTHON_FALLTHROUGH;
20302         case  0: break;
20303         default: goto __pyx_L5_argtuple_error;
20304       }
20305       kw_args = PyDict_Size(__pyx_kwds);
20306       switch (pos_args) {
20307         case  0:
20308         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
20309         else goto __pyx_L5_argtuple_error;
20310         CYTHON_FALLTHROUGH;
20311         case  1:
20312         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
20313         else {
20314           __Pyx_RaiseArgtupleInvalid("_search_bin_na_ui", 1, 2, 2, 1); __PYX_ERR(0, 1053, __pyx_L3_error)
20315         }
20316       }
20317       if (unlikely(kw_args > 0)) {
20318         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_ui") < 0)) __PYX_ERR(0, 1053, __pyx_L3_error)
20319       }
20320     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20321       goto __pyx_L5_argtuple_error;
20322     } else {
20323       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20324       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20325     }
20326     __pyx_v_item1 = __Pyx_PyInt_As_npy_uint32(values[0]); if (unlikely((__pyx_v_item1 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L3_error)
20327     __pyx_v_item2 = __Pyx_PyInt_As_npy_uint32(values[1]); if (unlikely((__pyx_v_item2 == ((npy_uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L3_error)
20328   }
20329   goto __pyx_L4_argument_unpacking_done;
20330   __pyx_L5_argtuple_error:;
20331   __Pyx_RaiseArgtupleInvalid("_search_bin_na_ui", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1053, __pyx_L3_error)
20332   __pyx_L3_error:;
20333   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_ui", __pyx_clineno, __pyx_lineno, __pyx_filename);
20334   __Pyx_RefNannyFinishContext();
20335   return NULL;
20336   __pyx_L4_argument_unpacking_done:;
20337   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_16_search_bin_na_ui(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
20338 
20339   /* function exit code */
20340   __Pyx_RefNannyFinishContext();
20341   return __pyx_r;
20342 }
20343 
__pyx_pf_6tables_16indexesextension_10IndexArray_16_search_bin_na_ui(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,npy_uint32 __pyx_v_item1,npy_uint32 __pyx_v_item2)20344 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_16_search_bin_na_ui(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_uint32 __pyx_v_item1, npy_uint32 __pyx_v_item2) {
20345   int __pyx_v_cs;
20346   int __pyx_v_ss;
20347   int __pyx_v_ncs;
20348   int __pyx_v_nrow;
20349   int __pyx_v_nrows;
20350   int __pyx_v_nbounds;
20351   int __pyx_v_rvrow;
20352   int __pyx_v_start;
20353   int __pyx_v_stop;
20354   int __pyx_v_tlength;
20355   int __pyx_v_length;
20356   int __pyx_v_bread;
20357   int __pyx_v_nchunk;
20358   int __pyx_v_nchunk2;
20359   int *__pyx_v_rbufst;
20360   int *__pyx_v_rbufln;
20361   npy_uint32 *__pyx_v_rbufrv;
20362   npy_uint32 *__pyx_v_rbufbc;
20363   npy_uint32 *__pyx_v_rbuflb;
20364   PyObject *__pyx_r = NULL;
20365   __Pyx_RefNannyDeclarations
20366   int __pyx_t_1;
20367   PyObject *__pyx_t_2 = NULL;
20368   int __pyx_t_3;
20369   __Pyx_RefNannySetupContext("_search_bin_na_ui", 0);
20370 
20371   /* "tables/indexesextension.pyx":1061
20372  *     # Variables with specific type
20373  *     cdef npy_uint32 *rbufrv
20374  *     cdef npy_uint32 *rbufbc = NULL             # <<<<<<<<<<<<<<
20375  *     cdef npy_uint32 *rbuflb = NULL
20376  *
20377  */
20378   __pyx_v_rbufbc = NULL;
20379 
20380   /* "tables/indexesextension.pyx":1062
20381  *     cdef npy_uint32 *rbufrv
20382  *     cdef npy_uint32 *rbufbc = NULL
20383  *     cdef npy_uint32 *rbuflb = NULL             # <<<<<<<<<<<<<<
20384  *
20385  *     cs = self.l_chunksize
20386  */
20387   __pyx_v_rbuflb = NULL;
20388 
20389   /* "tables/indexesextension.pyx":1064
20390  *     cdef npy_uint32 *rbuflb = NULL
20391  *
20392  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
20393  *     ss = self.l_slicesize
20394  *     ncs = ss / cs
20395  */
20396   __pyx_t_1 = __pyx_v_self->l_chunksize;
20397   __pyx_v_cs = __pyx_t_1;
20398 
20399   /* "tables/indexesextension.pyx":1065
20400  *
20401  *     cs = self.l_chunksize
20402  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
20403  *     ncs = ss / cs
20404  *     nbounds = self.nbounds
20405  */
20406   __pyx_t_1 = __pyx_v_self->l_slicesize;
20407   __pyx_v_ss = __pyx_t_1;
20408 
20409   /* "tables/indexesextension.pyx":1066
20410  *     cs = self.l_chunksize
20411  *     ss = self.l_slicesize
20412  *     ncs = ss / cs             # <<<<<<<<<<<<<<
20413  *     nbounds = self.nbounds
20414  *     nrows = self.nrows
20415  */
20416   if (unlikely(__pyx_v_cs == 0)) {
20417     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
20418     __PYX_ERR(0, 1066, __pyx_L1_error)
20419   }
20420   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
20421     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
20422     __PYX_ERR(0, 1066, __pyx_L1_error)
20423   }
20424   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
20425 
20426   /* "tables/indexesextension.pyx":1067
20427  *     ss = self.l_slicesize
20428  *     ncs = ss / cs
20429  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
20430  *     nrows = self.nrows
20431  *     rbufst = <int *>self.rbufst
20432  */
20433   __pyx_t_1 = __pyx_v_self->nbounds;
20434   __pyx_v_nbounds = __pyx_t_1;
20435 
20436   /* "tables/indexesextension.pyx":1068
20437  *     ncs = ss / cs
20438  *     nbounds = self.nbounds
20439  *     nrows = self.nrows             # <<<<<<<<<<<<<<
20440  *     rbufst = <int *>self.rbufst
20441  *     rbufln = <int *>self.rbufln
20442  */
20443   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error)
20444   __Pyx_GOTREF(__pyx_t_2);
20445   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1068, __pyx_L1_error)
20446   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20447   __pyx_v_nrows = __pyx_t_1;
20448 
20449   /* "tables/indexesextension.pyx":1069
20450  *     nbounds = self.nbounds
20451  *     nrows = self.nrows
20452  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
20453  *     rbufln = <int *>self.rbufln
20454  *     rbufrv = <npy_uint32 *>self.rbufrv
20455  */
20456   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
20457 
20458   /* "tables/indexesextension.pyx":1070
20459  *     nrows = self.nrows
20460  *     rbufst = <int *>self.rbufst
20461  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
20462  *     rbufrv = <npy_uint32 *>self.rbufrv
20463  *     tlength = 0
20464  */
20465   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
20466 
20467   /* "tables/indexesextension.pyx":1071
20468  *     rbufst = <int *>self.rbufst
20469  *     rbufln = <int *>self.rbufln
20470  *     rbufrv = <npy_uint32 *>self.rbufrv             # <<<<<<<<<<<<<<
20471  *     tlength = 0
20472  *     for nrow from 0 <= nrow < nrows:
20473  */
20474   __pyx_v_rbufrv = ((npy_uint32 *)__pyx_v_self->rbufrv);
20475 
20476   /* "tables/indexesextension.pyx":1072
20477  *     rbufln = <int *>self.rbufln
20478  *     rbufrv = <npy_uint32 *>self.rbufrv
20479  *     tlength = 0             # <<<<<<<<<<<<<<
20480  *     for nrow from 0 <= nrow < nrows:
20481  *       rvrow = nrow*2
20482  */
20483   __pyx_v_tlength = 0;
20484 
20485   /* "tables/indexesextension.pyx":1073
20486  *     rbufrv = <npy_uint32 *>self.rbufrv
20487  *     tlength = 0
20488  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
20489  *       rvrow = nrow*2
20490  *       bread = 0
20491  */
20492   __pyx_t_1 = __pyx_v_nrows;
20493   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
20494 
20495     /* "tables/indexesextension.pyx":1074
20496  *     tlength = 0
20497  *     for nrow from 0 <= nrow < nrows:
20498  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
20499  *       bread = 0
20500  *       nchunk = -1
20501  */
20502     __pyx_v_rvrow = (__pyx_v_nrow * 2);
20503 
20504     /* "tables/indexesextension.pyx":1075
20505  *     for nrow from 0 <= nrow < nrows:
20506  *       rvrow = nrow*2
20507  *       bread = 0             # <<<<<<<<<<<<<<
20508  *       nchunk = -1
20509  *       # Look if item1 is in this row
20510  */
20511     __pyx_v_bread = 0;
20512 
20513     /* "tables/indexesextension.pyx":1076
20514  *       rvrow = nrow*2
20515  *       bread = 0
20516  *       nchunk = -1             # <<<<<<<<<<<<<<
20517  *       # Look if item1 is in this row
20518  *       if item1 > rbufrv[rvrow]:
20519  */
20520     __pyx_v_nchunk = -1;
20521 
20522     /* "tables/indexesextension.pyx":1078
20523  *       nchunk = -1
20524  *       # Look if item1 is in this row
20525  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
20526  *         if item1 <= rbufrv[rvrow+1]:
20527  *           # Get the bounds row from the LRU cache or read them.
20528  */
20529     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
20530     if (__pyx_t_3) {
20531 
20532       /* "tables/indexesextension.pyx":1079
20533  *       # Look if item1 is in this row
20534  *       if item1 > rbufrv[rvrow]:
20535  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
20536  *           # Get the bounds row from the LRU cache or read them.
20537  *           rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20538  */
20539       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
20540       if (__pyx_t_3) {
20541 
20542         /* "tables/indexesextension.pyx":1081
20543  *         if item1 <= rbufrv[rvrow+1]:
20544  *           # Get the bounds row from the LRU cache or read them.
20545  *           rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
20546  *           bread = 1
20547  *           nchunk = bisect_left_ui(rbufbc, item1, nbounds, 0)
20548  */
20549         __pyx_v_rbufbc = ((npy_uint32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
20550 
20551         /* "tables/indexesextension.pyx":1082
20552  *           # Get the bounds row from the LRU cache or read them.
20553  *           rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20554  *           bread = 1             # <<<<<<<<<<<<<<
20555  *           nchunk = bisect_left_ui(rbufbc, item1, nbounds, 0)
20556  *           # Get the sorted row from the LRU cache or read it.
20557  */
20558         __pyx_v_bread = 1;
20559 
20560         /* "tables/indexesextension.pyx":1083
20561  *           rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20562  *           bread = 1
20563  *           nchunk = bisect_left_ui(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
20564  *           # Get the sorted row from the LRU cache or read it.
20565  *           rbuflb = <npy_uint32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
20566  */
20567         __pyx_v_nchunk = bisect_left_ui(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
20568 
20569         /* "tables/indexesextension.pyx":1085
20570  *           nchunk = bisect_left_ui(rbufbc, item1, nbounds, 0)
20571  *           # Get the sorted row from the LRU cache or read it.
20572  *           rbuflb = <npy_uint32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
20573  *           start = bisect_left_ui(rbuflb, item1, cs, 0) + cs*nchunk
20574  *         else:
20575  */
20576         __pyx_v_rbuflb = ((npy_uint32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
20577 
20578         /* "tables/indexesextension.pyx":1086
20579  *           # Get the sorted row from the LRU cache or read it.
20580  *           rbuflb = <npy_uint32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
20581  *           start = bisect_left_ui(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
20582  *         else:
20583  *           start = ss
20584  */
20585         __pyx_v_start = (bisect_left_ui(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
20586 
20587         /* "tables/indexesextension.pyx":1079
20588  *       # Look if item1 is in this row
20589  *       if item1 > rbufrv[rvrow]:
20590  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
20591  *           # Get the bounds row from the LRU cache or read them.
20592  *           rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20593  */
20594         goto __pyx_L6;
20595       }
20596 
20597       /* "tables/indexesextension.pyx":1088
20598  *           start = bisect_left_ui(rbuflb, item1, cs, 0) + cs*nchunk
20599  *         else:
20600  *           start = ss             # <<<<<<<<<<<<<<
20601  *       else:
20602  *         start = 0
20603  */
20604       /*else*/ {
20605         __pyx_v_start = __pyx_v_ss;
20606       }
20607       __pyx_L6:;
20608 
20609       /* "tables/indexesextension.pyx":1078
20610  *       nchunk = -1
20611  *       # Look if item1 is in this row
20612  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
20613  *         if item1 <= rbufrv[rvrow+1]:
20614  *           # Get the bounds row from the LRU cache or read them.
20615  */
20616       goto __pyx_L5;
20617     }
20618 
20619     /* "tables/indexesextension.pyx":1090
20620  *           start = ss
20621  *       else:
20622  *         start = 0             # <<<<<<<<<<<<<<
20623  *       # Now, for item2
20624  *       if item2 >= rbufrv[rvrow]:
20625  */
20626     /*else*/ {
20627       __pyx_v_start = 0;
20628     }
20629     __pyx_L5:;
20630 
20631     /* "tables/indexesextension.pyx":1092
20632  *         start = 0
20633  *       # Now, for item2
20634  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
20635  *         if item2 < rbufrv[rvrow+1]:
20636  *           if not bread:
20637  */
20638     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
20639     if (__pyx_t_3) {
20640 
20641       /* "tables/indexesextension.pyx":1093
20642  *       # Now, for item2
20643  *       if item2 >= rbufrv[rvrow]:
20644  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
20645  *           if not bread:
20646  *             # Get the bounds row from the LRU cache or read them.
20647  */
20648       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
20649       if (__pyx_t_3) {
20650 
20651         /* "tables/indexesextension.pyx":1094
20652  *       if item2 >= rbufrv[rvrow]:
20653  *         if item2 < rbufrv[rvrow+1]:
20654  *           if not bread:             # <<<<<<<<<<<<<<
20655  *             # Get the bounds row from the LRU cache or read them.
20656  *             rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20657  */
20658         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
20659         if (__pyx_t_3) {
20660 
20661           /* "tables/indexesextension.pyx":1096
20662  *           if not bread:
20663  *             # Get the bounds row from the LRU cache or read them.
20664  *             rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
20665  *           nchunk2 = bisect_right_ui(rbufbc, item2, nbounds, 0)
20666  *           if nchunk2 <> nchunk:
20667  */
20668           __pyx_v_rbufbc = ((npy_uint32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
20669 
20670           /* "tables/indexesextension.pyx":1094
20671  *       if item2 >= rbufrv[rvrow]:
20672  *         if item2 < rbufrv[rvrow+1]:
20673  *           if not bread:             # <<<<<<<<<<<<<<
20674  *             # Get the bounds row from the LRU cache or read them.
20675  *             rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20676  */
20677         }
20678 
20679         /* "tables/indexesextension.pyx":1097
20680  *             # Get the bounds row from the LRU cache or read them.
20681  *             rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20682  *           nchunk2 = bisect_right_ui(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
20683  *           if nchunk2 <> nchunk:
20684  *             # Get the sorted row from the LRU cache or read it.
20685  */
20686         __pyx_v_nchunk2 = bisect_right_ui(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
20687 
20688         /* "tables/indexesextension.pyx":1098
20689  *             rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20690  *           nchunk2 = bisect_right_ui(rbufbc, item2, nbounds, 0)
20691  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
20692  *             # Get the sorted row from the LRU cache or read it.
20693  *             rbuflb = <npy_uint32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
20694  */
20695         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
20696         if (__pyx_t_3) {
20697 
20698           /* "tables/indexesextension.pyx":1100
20699  *           if nchunk2 <> nchunk:
20700  *             # Get the sorted row from the LRU cache or read it.
20701  *             rbuflb = <npy_uint32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
20702  *           stop = bisect_right_ui(rbuflb, item2, cs, 0) + cs*nchunk2
20703  *         else:
20704  */
20705           __pyx_v_rbuflb = ((npy_uint32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
20706 
20707           /* "tables/indexesextension.pyx":1098
20708  *             rbufbc = <npy_uint32 *>self.get_lru_bounds(nrow, nbounds)
20709  *           nchunk2 = bisect_right_ui(rbufbc, item2, nbounds, 0)
20710  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
20711  *             # Get the sorted row from the LRU cache or read it.
20712  *             rbuflb = <npy_uint32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
20713  */
20714         }
20715 
20716         /* "tables/indexesextension.pyx":1101
20717  *             # Get the sorted row from the LRU cache or read it.
20718  *             rbuflb = <npy_uint32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
20719  *           stop = bisect_right_ui(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
20720  *         else:
20721  *           stop = ss
20722  */
20723         __pyx_v_stop = (bisect_right_ui(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
20724 
20725         /* "tables/indexesextension.pyx":1093
20726  *       # Now, for item2
20727  *       if item2 >= rbufrv[rvrow]:
20728  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
20729  *           if not bread:
20730  *             # Get the bounds row from the LRU cache or read them.
20731  */
20732         goto __pyx_L8;
20733       }
20734 
20735       /* "tables/indexesextension.pyx":1103
20736  *           stop = bisect_right_ui(rbuflb, item2, cs, 0) + cs*nchunk2
20737  *         else:
20738  *           stop = ss             # <<<<<<<<<<<<<<
20739  *       else:
20740  *         stop = 0
20741  */
20742       /*else*/ {
20743         __pyx_v_stop = __pyx_v_ss;
20744       }
20745       __pyx_L8:;
20746 
20747       /* "tables/indexesextension.pyx":1092
20748  *         start = 0
20749  *       # Now, for item2
20750  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
20751  *         if item2 < rbufrv[rvrow+1]:
20752  *           if not bread:
20753  */
20754       goto __pyx_L7;
20755     }
20756 
20757     /* "tables/indexesextension.pyx":1105
20758  *           stop = ss
20759  *       else:
20760  *         stop = 0             # <<<<<<<<<<<<<<
20761  *       length = stop - start
20762  *       tlength = tlength + length
20763  */
20764     /*else*/ {
20765       __pyx_v_stop = 0;
20766     }
20767     __pyx_L7:;
20768 
20769     /* "tables/indexesextension.pyx":1106
20770  *       else:
20771  *         stop = 0
20772  *       length = stop - start             # <<<<<<<<<<<<<<
20773  *       tlength = tlength + length
20774  *       rbufst[nrow] = start
20775  */
20776     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
20777 
20778     /* "tables/indexesextension.pyx":1107
20779  *         stop = 0
20780  *       length = stop - start
20781  *       tlength = tlength + length             # <<<<<<<<<<<<<<
20782  *       rbufst[nrow] = start
20783  *       rbufln[nrow] = length
20784  */
20785     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
20786 
20787     /* "tables/indexesextension.pyx":1108
20788  *       length = stop - start
20789  *       tlength = tlength + length
20790  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
20791  *       rbufln[nrow] = length
20792  *     return tlength
20793  */
20794     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
20795 
20796     /* "tables/indexesextension.pyx":1109
20797  *       tlength = tlength + length
20798  *       rbufst[nrow] = start
20799  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
20800  *     return tlength
20801  *
20802  */
20803     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
20804   }
20805 
20806   /* "tables/indexesextension.pyx":1110
20807  *       rbufst[nrow] = start
20808  *       rbufln[nrow] = length
20809  *     return tlength             # <<<<<<<<<<<<<<
20810  *
20811  *
20812  */
20813   __Pyx_XDECREF(__pyx_r);
20814   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error)
20815   __Pyx_GOTREF(__pyx_t_2);
20816   __pyx_r = __pyx_t_2;
20817   __pyx_t_2 = 0;
20818   goto __pyx_L0;
20819 
20820   /* "tables/indexesextension.pyx":1053
20821  *
20822  *   # Optimized version for uint32
20823  *   def _search_bin_na_ui(self, npy_uint32 item1, npy_uint32 item2):             # <<<<<<<<<<<<<<
20824  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
20825  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
20826  */
20827 
20828   /* function exit code */
20829   __pyx_L1_error:;
20830   __Pyx_XDECREF(__pyx_t_2);
20831   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_ui", __pyx_clineno, __pyx_lineno, __pyx_filename);
20832   __pyx_r = NULL;
20833   __pyx_L0:;
20834   __Pyx_XGIVEREF(__pyx_r);
20835   __Pyx_RefNannyFinishContext();
20836   return __pyx_r;
20837 }
20838 
20839 /* "tables/indexesextension.pyx":1114
20840  *
20841  *   # Optimized version for int64
20842  *   def _search_bin_na_ll(self, npy_int64 item1, npy_int64 item2):             # <<<<<<<<<<<<<<
20843  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
20844  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
20845  */
20846 
20847 /* Python wrapper */
20848 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_19_search_bin_na_ll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_19_search_bin_na_ll(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)20849 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_19_search_bin_na_ll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20850   npy_int64 __pyx_v_item1;
20851   npy_int64 __pyx_v_item2;
20852   PyObject *__pyx_r = 0;
20853   __Pyx_RefNannyDeclarations
20854   __Pyx_RefNannySetupContext("_search_bin_na_ll (wrapper)", 0);
20855   {
20856     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
20857     PyObject* values[2] = {0,0};
20858     if (unlikely(__pyx_kwds)) {
20859       Py_ssize_t kw_args;
20860       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20861       switch (pos_args) {
20862         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20863         CYTHON_FALLTHROUGH;
20864         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20865         CYTHON_FALLTHROUGH;
20866         case  0: break;
20867         default: goto __pyx_L5_argtuple_error;
20868       }
20869       kw_args = PyDict_Size(__pyx_kwds);
20870       switch (pos_args) {
20871         case  0:
20872         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
20873         else goto __pyx_L5_argtuple_error;
20874         CYTHON_FALLTHROUGH;
20875         case  1:
20876         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
20877         else {
20878           __Pyx_RaiseArgtupleInvalid("_search_bin_na_ll", 1, 2, 2, 1); __PYX_ERR(0, 1114, __pyx_L3_error)
20879         }
20880       }
20881       if (unlikely(kw_args > 0)) {
20882         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_ll") < 0)) __PYX_ERR(0, 1114, __pyx_L3_error)
20883       }
20884     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20885       goto __pyx_L5_argtuple_error;
20886     } else {
20887       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20888       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20889     }
20890     __pyx_v_item1 = __Pyx_PyInt_As_npy_int64(values[0]); if (unlikely((__pyx_v_item1 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L3_error)
20891     __pyx_v_item2 = __Pyx_PyInt_As_npy_int64(values[1]); if (unlikely((__pyx_v_item2 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L3_error)
20892   }
20893   goto __pyx_L4_argument_unpacking_done;
20894   __pyx_L5_argtuple_error:;
20895   __Pyx_RaiseArgtupleInvalid("_search_bin_na_ll", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1114, __pyx_L3_error)
20896   __pyx_L3_error:;
20897   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_ll", __pyx_clineno, __pyx_lineno, __pyx_filename);
20898   __Pyx_RefNannyFinishContext();
20899   return NULL;
20900   __pyx_L4_argument_unpacking_done:;
20901   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_18_search_bin_na_ll(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
20902 
20903   /* function exit code */
20904   __Pyx_RefNannyFinishContext();
20905   return __pyx_r;
20906 }
20907 
__pyx_pf_6tables_16indexesextension_10IndexArray_18_search_bin_na_ll(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,npy_int64 __pyx_v_item1,npy_int64 __pyx_v_item2)20908 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_18_search_bin_na_ll(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_int64 __pyx_v_item1, npy_int64 __pyx_v_item2) {
20909   int __pyx_v_cs;
20910   int __pyx_v_ss;
20911   int __pyx_v_ncs;
20912   int __pyx_v_nrow;
20913   int __pyx_v_nrows;
20914   int __pyx_v_nbounds;
20915   int __pyx_v_rvrow;
20916   int __pyx_v_start;
20917   int __pyx_v_stop;
20918   int __pyx_v_tlength;
20919   int __pyx_v_length;
20920   int __pyx_v_bread;
20921   int __pyx_v_nchunk;
20922   int __pyx_v_nchunk2;
20923   int *__pyx_v_rbufst;
20924   int *__pyx_v_rbufln;
20925   npy_int64 *__pyx_v_rbufrv;
20926   npy_int64 *__pyx_v_rbufbc;
20927   npy_int64 *__pyx_v_rbuflb;
20928   PyObject *__pyx_r = NULL;
20929   __Pyx_RefNannyDeclarations
20930   int __pyx_t_1;
20931   PyObject *__pyx_t_2 = NULL;
20932   int __pyx_t_3;
20933   __Pyx_RefNannySetupContext("_search_bin_na_ll", 0);
20934 
20935   /* "tables/indexesextension.pyx":1122
20936  *     # Variables with specific type
20937  *     cdef npy_int64 *rbufrv
20938  *     cdef npy_int64 *rbufbc = NULL             # <<<<<<<<<<<<<<
20939  *     cdef npy_int64 *rbuflb = NULL
20940  *
20941  */
20942   __pyx_v_rbufbc = NULL;
20943 
20944   /* "tables/indexesextension.pyx":1123
20945  *     cdef npy_int64 *rbufrv
20946  *     cdef npy_int64 *rbufbc = NULL
20947  *     cdef npy_int64 *rbuflb = NULL             # <<<<<<<<<<<<<<
20948  *
20949  *     cs = self.l_chunksize
20950  */
20951   __pyx_v_rbuflb = NULL;
20952 
20953   /* "tables/indexesextension.pyx":1125
20954  *     cdef npy_int64 *rbuflb = NULL
20955  *
20956  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
20957  *     ss = self.l_slicesize
20958  *     ncs = ss / cs
20959  */
20960   __pyx_t_1 = __pyx_v_self->l_chunksize;
20961   __pyx_v_cs = __pyx_t_1;
20962 
20963   /* "tables/indexesextension.pyx":1126
20964  *
20965  *     cs = self.l_chunksize
20966  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
20967  *     ncs = ss / cs
20968  *     nbounds = self.nbounds
20969  */
20970   __pyx_t_1 = __pyx_v_self->l_slicesize;
20971   __pyx_v_ss = __pyx_t_1;
20972 
20973   /* "tables/indexesextension.pyx":1127
20974  *     cs = self.l_chunksize
20975  *     ss = self.l_slicesize
20976  *     ncs = ss / cs             # <<<<<<<<<<<<<<
20977  *     nbounds = self.nbounds
20978  *     nrows = self.nrows
20979  */
20980   if (unlikely(__pyx_v_cs == 0)) {
20981     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
20982     __PYX_ERR(0, 1127, __pyx_L1_error)
20983   }
20984   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
20985     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
20986     __PYX_ERR(0, 1127, __pyx_L1_error)
20987   }
20988   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
20989 
20990   /* "tables/indexesextension.pyx":1128
20991  *     ss = self.l_slicesize
20992  *     ncs = ss / cs
20993  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
20994  *     nrows = self.nrows
20995  *     rbufst = <int *>self.rbufst
20996  */
20997   __pyx_t_1 = __pyx_v_self->nbounds;
20998   __pyx_v_nbounds = __pyx_t_1;
20999 
21000   /* "tables/indexesextension.pyx":1129
21001  *     ncs = ss / cs
21002  *     nbounds = self.nbounds
21003  *     nrows = self.nrows             # <<<<<<<<<<<<<<
21004  *     rbufst = <int *>self.rbufst
21005  *     rbufln = <int *>self.rbufln
21006  */
21007   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
21008   __Pyx_GOTREF(__pyx_t_2);
21009   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1129, __pyx_L1_error)
21010   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21011   __pyx_v_nrows = __pyx_t_1;
21012 
21013   /* "tables/indexesextension.pyx":1130
21014  *     nbounds = self.nbounds
21015  *     nrows = self.nrows
21016  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
21017  *     rbufln = <int *>self.rbufln
21018  *     rbufrv = <npy_int64 *>self.rbufrv
21019  */
21020   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
21021 
21022   /* "tables/indexesextension.pyx":1131
21023  *     nrows = self.nrows
21024  *     rbufst = <int *>self.rbufst
21025  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
21026  *     rbufrv = <npy_int64 *>self.rbufrv
21027  *     tlength = 0
21028  */
21029   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
21030 
21031   /* "tables/indexesextension.pyx":1132
21032  *     rbufst = <int *>self.rbufst
21033  *     rbufln = <int *>self.rbufln
21034  *     rbufrv = <npy_int64 *>self.rbufrv             # <<<<<<<<<<<<<<
21035  *     tlength = 0
21036  *     for nrow from 0 <= nrow < nrows:
21037  */
21038   __pyx_v_rbufrv = ((npy_int64 *)__pyx_v_self->rbufrv);
21039 
21040   /* "tables/indexesextension.pyx":1133
21041  *     rbufln = <int *>self.rbufln
21042  *     rbufrv = <npy_int64 *>self.rbufrv
21043  *     tlength = 0             # <<<<<<<<<<<<<<
21044  *     for nrow from 0 <= nrow < nrows:
21045  *       rvrow = nrow*2
21046  */
21047   __pyx_v_tlength = 0;
21048 
21049   /* "tables/indexesextension.pyx":1134
21050  *     rbufrv = <npy_int64 *>self.rbufrv
21051  *     tlength = 0
21052  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
21053  *       rvrow = nrow*2
21054  *       bread = 0
21055  */
21056   __pyx_t_1 = __pyx_v_nrows;
21057   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
21058 
21059     /* "tables/indexesextension.pyx":1135
21060  *     tlength = 0
21061  *     for nrow from 0 <= nrow < nrows:
21062  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
21063  *       bread = 0
21064  *       nchunk = -1
21065  */
21066     __pyx_v_rvrow = (__pyx_v_nrow * 2);
21067 
21068     /* "tables/indexesextension.pyx":1136
21069  *     for nrow from 0 <= nrow < nrows:
21070  *       rvrow = nrow*2
21071  *       bread = 0             # <<<<<<<<<<<<<<
21072  *       nchunk = -1
21073  *       # Look if item1 is in this row
21074  */
21075     __pyx_v_bread = 0;
21076 
21077     /* "tables/indexesextension.pyx":1137
21078  *       rvrow = nrow*2
21079  *       bread = 0
21080  *       nchunk = -1             # <<<<<<<<<<<<<<
21081  *       # Look if item1 is in this row
21082  *       if item1 > rbufrv[rvrow]:
21083  */
21084     __pyx_v_nchunk = -1;
21085 
21086     /* "tables/indexesextension.pyx":1139
21087  *       nchunk = -1
21088  *       # Look if item1 is in this row
21089  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
21090  *         if item1 <= rbufrv[rvrow+1]:
21091  *           # Get the bounds row from the LRU cache or read them.
21092  */
21093     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
21094     if (__pyx_t_3) {
21095 
21096       /* "tables/indexesextension.pyx":1140
21097  *       # Look if item1 is in this row
21098  *       if item1 > rbufrv[rvrow]:
21099  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
21100  *           # Get the bounds row from the LRU cache or read them.
21101  *           rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21102  */
21103       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
21104       if (__pyx_t_3) {
21105 
21106         /* "tables/indexesextension.pyx":1142
21107  *         if item1 <= rbufrv[rvrow+1]:
21108  *           # Get the bounds row from the LRU cache or read them.
21109  *           rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
21110  *           bread = 1
21111  *           nchunk = bisect_left_ll(rbufbc, item1, nbounds, 0)
21112  */
21113         __pyx_v_rbufbc = ((npy_int64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
21114 
21115         /* "tables/indexesextension.pyx":1143
21116  *           # Get the bounds row from the LRU cache or read them.
21117  *           rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21118  *           bread = 1             # <<<<<<<<<<<<<<
21119  *           nchunk = bisect_left_ll(rbufbc, item1, nbounds, 0)
21120  *           # Get the sorted row from the LRU cache or read it.
21121  */
21122         __pyx_v_bread = 1;
21123 
21124         /* "tables/indexesextension.pyx":1144
21125  *           rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21126  *           bread = 1
21127  *           nchunk = bisect_left_ll(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
21128  *           # Get the sorted row from the LRU cache or read it.
21129  *           rbuflb = <npy_int64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
21130  */
21131         __pyx_v_nchunk = bisect_left_ll(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
21132 
21133         /* "tables/indexesextension.pyx":1146
21134  *           nchunk = bisect_left_ll(rbufbc, item1, nbounds, 0)
21135  *           # Get the sorted row from the LRU cache or read it.
21136  *           rbuflb = <npy_int64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
21137  *           start = bisect_left_ll(rbuflb, item1, cs, 0) + cs*nchunk
21138  *         else:
21139  */
21140         __pyx_v_rbuflb = ((npy_int64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
21141 
21142         /* "tables/indexesextension.pyx":1147
21143  *           # Get the sorted row from the LRU cache or read it.
21144  *           rbuflb = <npy_int64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
21145  *           start = bisect_left_ll(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
21146  *         else:
21147  *           start = ss
21148  */
21149         __pyx_v_start = (bisect_left_ll(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
21150 
21151         /* "tables/indexesextension.pyx":1140
21152  *       # Look if item1 is in this row
21153  *       if item1 > rbufrv[rvrow]:
21154  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
21155  *           # Get the bounds row from the LRU cache or read them.
21156  *           rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21157  */
21158         goto __pyx_L6;
21159       }
21160 
21161       /* "tables/indexesextension.pyx":1149
21162  *           start = bisect_left_ll(rbuflb, item1, cs, 0) + cs*nchunk
21163  *         else:
21164  *           start = ss             # <<<<<<<<<<<<<<
21165  *       else:
21166  *         start = 0
21167  */
21168       /*else*/ {
21169         __pyx_v_start = __pyx_v_ss;
21170       }
21171       __pyx_L6:;
21172 
21173       /* "tables/indexesextension.pyx":1139
21174  *       nchunk = -1
21175  *       # Look if item1 is in this row
21176  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
21177  *         if item1 <= rbufrv[rvrow+1]:
21178  *           # Get the bounds row from the LRU cache or read them.
21179  */
21180       goto __pyx_L5;
21181     }
21182 
21183     /* "tables/indexesextension.pyx":1151
21184  *           start = ss
21185  *       else:
21186  *         start = 0             # <<<<<<<<<<<<<<
21187  *       # Now, for item2
21188  *       if item2 >= rbufrv[rvrow]:
21189  */
21190     /*else*/ {
21191       __pyx_v_start = 0;
21192     }
21193     __pyx_L5:;
21194 
21195     /* "tables/indexesextension.pyx":1153
21196  *         start = 0
21197  *       # Now, for item2
21198  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
21199  *         if item2 < rbufrv[rvrow+1]:
21200  *           if not bread:
21201  */
21202     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
21203     if (__pyx_t_3) {
21204 
21205       /* "tables/indexesextension.pyx":1154
21206  *       # Now, for item2
21207  *       if item2 >= rbufrv[rvrow]:
21208  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
21209  *           if not bread:
21210  *             # Get the bounds row from the LRU cache or read them.
21211  */
21212       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
21213       if (__pyx_t_3) {
21214 
21215         /* "tables/indexesextension.pyx":1155
21216  *       if item2 >= rbufrv[rvrow]:
21217  *         if item2 < rbufrv[rvrow+1]:
21218  *           if not bread:             # <<<<<<<<<<<<<<
21219  *             # Get the bounds row from the LRU cache or read them.
21220  *             rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21221  */
21222         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
21223         if (__pyx_t_3) {
21224 
21225           /* "tables/indexesextension.pyx":1157
21226  *           if not bread:
21227  *             # Get the bounds row from the LRU cache or read them.
21228  *             rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
21229  *           nchunk2 = bisect_right_ll(rbufbc, item2, nbounds, 0)
21230  *           if nchunk2 <> nchunk:
21231  */
21232           __pyx_v_rbufbc = ((npy_int64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
21233 
21234           /* "tables/indexesextension.pyx":1155
21235  *       if item2 >= rbufrv[rvrow]:
21236  *         if item2 < rbufrv[rvrow+1]:
21237  *           if not bread:             # <<<<<<<<<<<<<<
21238  *             # Get the bounds row from the LRU cache or read them.
21239  *             rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21240  */
21241         }
21242 
21243         /* "tables/indexesextension.pyx":1158
21244  *             # Get the bounds row from the LRU cache or read them.
21245  *             rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21246  *           nchunk2 = bisect_right_ll(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
21247  *           if nchunk2 <> nchunk:
21248  *             # Get the sorted row from the LRU cache or read it.
21249  */
21250         __pyx_v_nchunk2 = bisect_right_ll(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
21251 
21252         /* "tables/indexesextension.pyx":1159
21253  *             rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21254  *           nchunk2 = bisect_right_ll(rbufbc, item2, nbounds, 0)
21255  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
21256  *             # Get the sorted row from the LRU cache or read it.
21257  *             rbuflb = <npy_int64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
21258  */
21259         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
21260         if (__pyx_t_3) {
21261 
21262           /* "tables/indexesextension.pyx":1161
21263  *           if nchunk2 <> nchunk:
21264  *             # Get the sorted row from the LRU cache or read it.
21265  *             rbuflb = <npy_int64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
21266  *           stop = bisect_right_ll(rbuflb, item2, cs, 0) + cs*nchunk2
21267  *         else:
21268  */
21269           __pyx_v_rbuflb = ((npy_int64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
21270 
21271           /* "tables/indexesextension.pyx":1159
21272  *             rbufbc = <npy_int64 *>self.get_lru_bounds(nrow, nbounds)
21273  *           nchunk2 = bisect_right_ll(rbufbc, item2, nbounds, 0)
21274  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
21275  *             # Get the sorted row from the LRU cache or read it.
21276  *             rbuflb = <npy_int64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
21277  */
21278         }
21279 
21280         /* "tables/indexesextension.pyx":1162
21281  *             # Get the sorted row from the LRU cache or read it.
21282  *             rbuflb = <npy_int64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
21283  *           stop = bisect_right_ll(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
21284  *         else:
21285  *           stop = ss
21286  */
21287         __pyx_v_stop = (bisect_right_ll(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
21288 
21289         /* "tables/indexesextension.pyx":1154
21290  *       # Now, for item2
21291  *       if item2 >= rbufrv[rvrow]:
21292  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
21293  *           if not bread:
21294  *             # Get the bounds row from the LRU cache or read them.
21295  */
21296         goto __pyx_L8;
21297       }
21298 
21299       /* "tables/indexesextension.pyx":1164
21300  *           stop = bisect_right_ll(rbuflb, item2, cs, 0) + cs*nchunk2
21301  *         else:
21302  *           stop = ss             # <<<<<<<<<<<<<<
21303  *       else:
21304  *         stop = 0
21305  */
21306       /*else*/ {
21307         __pyx_v_stop = __pyx_v_ss;
21308       }
21309       __pyx_L8:;
21310 
21311       /* "tables/indexesextension.pyx":1153
21312  *         start = 0
21313  *       # Now, for item2
21314  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
21315  *         if item2 < rbufrv[rvrow+1]:
21316  *           if not bread:
21317  */
21318       goto __pyx_L7;
21319     }
21320 
21321     /* "tables/indexesextension.pyx":1166
21322  *           stop = ss
21323  *       else:
21324  *         stop = 0             # <<<<<<<<<<<<<<
21325  *       length = stop - start
21326  *       tlength = tlength + length
21327  */
21328     /*else*/ {
21329       __pyx_v_stop = 0;
21330     }
21331     __pyx_L7:;
21332 
21333     /* "tables/indexesextension.pyx":1167
21334  *       else:
21335  *         stop = 0
21336  *       length = stop - start             # <<<<<<<<<<<<<<
21337  *       tlength = tlength + length
21338  *       rbufst[nrow] = start
21339  */
21340     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
21341 
21342     /* "tables/indexesextension.pyx":1168
21343  *         stop = 0
21344  *       length = stop - start
21345  *       tlength = tlength + length             # <<<<<<<<<<<<<<
21346  *       rbufst[nrow] = start
21347  *       rbufln[nrow] = length
21348  */
21349     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
21350 
21351     /* "tables/indexesextension.pyx":1169
21352  *       length = stop - start
21353  *       tlength = tlength + length
21354  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
21355  *       rbufln[nrow] = length
21356  *     return tlength
21357  */
21358     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
21359 
21360     /* "tables/indexesextension.pyx":1170
21361  *       tlength = tlength + length
21362  *       rbufst[nrow] = start
21363  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
21364  *     return tlength
21365  *
21366  */
21367     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
21368   }
21369 
21370   /* "tables/indexesextension.pyx":1171
21371  *       rbufst[nrow] = start
21372  *       rbufln[nrow] = length
21373  *     return tlength             # <<<<<<<<<<<<<<
21374  *
21375  *
21376  */
21377   __Pyx_XDECREF(__pyx_r);
21378   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1171, __pyx_L1_error)
21379   __Pyx_GOTREF(__pyx_t_2);
21380   __pyx_r = __pyx_t_2;
21381   __pyx_t_2 = 0;
21382   goto __pyx_L0;
21383 
21384   /* "tables/indexesextension.pyx":1114
21385  *
21386  *   # Optimized version for int64
21387  *   def _search_bin_na_ll(self, npy_int64 item1, npy_int64 item2):             # <<<<<<<<<<<<<<
21388  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
21389  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
21390  */
21391 
21392   /* function exit code */
21393   __pyx_L1_error:;
21394   __Pyx_XDECREF(__pyx_t_2);
21395   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_ll", __pyx_clineno, __pyx_lineno, __pyx_filename);
21396   __pyx_r = NULL;
21397   __pyx_L0:;
21398   __Pyx_XGIVEREF(__pyx_r);
21399   __Pyx_RefNannyFinishContext();
21400   return __pyx_r;
21401 }
21402 
21403 /* "tables/indexesextension.pyx":1175
21404  *
21405  *   # Optimized version for uint64
21406  *   def _search_bin_na_ull(self, npy_uint64 item1, npy_uint64 item2):             # <<<<<<<<<<<<<<
21407  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
21408  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
21409  */
21410 
21411 /* Python wrapper */
21412 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_21_search_bin_na_ull(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_21_search_bin_na_ull(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)21413 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_21_search_bin_na_ull(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21414   npy_uint64 __pyx_v_item1;
21415   npy_uint64 __pyx_v_item2;
21416   PyObject *__pyx_r = 0;
21417   __Pyx_RefNannyDeclarations
21418   __Pyx_RefNannySetupContext("_search_bin_na_ull (wrapper)", 0);
21419   {
21420     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
21421     PyObject* values[2] = {0,0};
21422     if (unlikely(__pyx_kwds)) {
21423       Py_ssize_t kw_args;
21424       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21425       switch (pos_args) {
21426         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21427         CYTHON_FALLTHROUGH;
21428         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21429         CYTHON_FALLTHROUGH;
21430         case  0: break;
21431         default: goto __pyx_L5_argtuple_error;
21432       }
21433       kw_args = PyDict_Size(__pyx_kwds);
21434       switch (pos_args) {
21435         case  0:
21436         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
21437         else goto __pyx_L5_argtuple_error;
21438         CYTHON_FALLTHROUGH;
21439         case  1:
21440         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
21441         else {
21442           __Pyx_RaiseArgtupleInvalid("_search_bin_na_ull", 1, 2, 2, 1); __PYX_ERR(0, 1175, __pyx_L3_error)
21443         }
21444       }
21445       if (unlikely(kw_args > 0)) {
21446         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_ull") < 0)) __PYX_ERR(0, 1175, __pyx_L3_error)
21447       }
21448     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
21449       goto __pyx_L5_argtuple_error;
21450     } else {
21451       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21452       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21453     }
21454     __pyx_v_item1 = __Pyx_PyInt_As_npy_uint64(values[0]); if (unlikely((__pyx_v_item1 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1175, __pyx_L3_error)
21455     __pyx_v_item2 = __Pyx_PyInt_As_npy_uint64(values[1]); if (unlikely((__pyx_v_item2 == ((npy_uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1175, __pyx_L3_error)
21456   }
21457   goto __pyx_L4_argument_unpacking_done;
21458   __pyx_L5_argtuple_error:;
21459   __Pyx_RaiseArgtupleInvalid("_search_bin_na_ull", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1175, __pyx_L3_error)
21460   __pyx_L3_error:;
21461   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_ull", __pyx_clineno, __pyx_lineno, __pyx_filename);
21462   __Pyx_RefNannyFinishContext();
21463   return NULL;
21464   __pyx_L4_argument_unpacking_done:;
21465   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_20_search_bin_na_ull(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
21466 
21467   /* function exit code */
21468   __Pyx_RefNannyFinishContext();
21469   return __pyx_r;
21470 }
21471 
__pyx_pf_6tables_16indexesextension_10IndexArray_20_search_bin_na_ull(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,npy_uint64 __pyx_v_item1,npy_uint64 __pyx_v_item2)21472 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_20_search_bin_na_ull(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_uint64 __pyx_v_item1, npy_uint64 __pyx_v_item2) {
21473   int __pyx_v_cs;
21474   int __pyx_v_ss;
21475   int __pyx_v_ncs;
21476   int __pyx_v_nrow;
21477   int __pyx_v_nrows;
21478   int __pyx_v_nbounds;
21479   int __pyx_v_rvrow;
21480   int __pyx_v_start;
21481   int __pyx_v_stop;
21482   int __pyx_v_tlength;
21483   int __pyx_v_length;
21484   int __pyx_v_bread;
21485   int __pyx_v_nchunk;
21486   int __pyx_v_nchunk2;
21487   int *__pyx_v_rbufst;
21488   int *__pyx_v_rbufln;
21489   npy_uint64 *__pyx_v_rbufrv;
21490   npy_uint64 *__pyx_v_rbufbc;
21491   npy_uint64 *__pyx_v_rbuflb;
21492   PyObject *__pyx_r = NULL;
21493   __Pyx_RefNannyDeclarations
21494   int __pyx_t_1;
21495   PyObject *__pyx_t_2 = NULL;
21496   int __pyx_t_3;
21497   __Pyx_RefNannySetupContext("_search_bin_na_ull", 0);
21498 
21499   /* "tables/indexesextension.pyx":1183
21500  *     # Variables with specific type
21501  *     cdef npy_uint64 *rbufrv
21502  *     cdef npy_uint64 *rbufbc = NULL             # <<<<<<<<<<<<<<
21503  *     cdef npy_uint64 *rbuflb = NULL
21504  *
21505  */
21506   __pyx_v_rbufbc = NULL;
21507 
21508   /* "tables/indexesextension.pyx":1184
21509  *     cdef npy_uint64 *rbufrv
21510  *     cdef npy_uint64 *rbufbc = NULL
21511  *     cdef npy_uint64 *rbuflb = NULL             # <<<<<<<<<<<<<<
21512  *
21513  *     cs = self.l_chunksize
21514  */
21515   __pyx_v_rbuflb = NULL;
21516 
21517   /* "tables/indexesextension.pyx":1186
21518  *     cdef npy_uint64 *rbuflb = NULL
21519  *
21520  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
21521  *     ss = self.l_slicesize
21522  *     ncs = ss / cs
21523  */
21524   __pyx_t_1 = __pyx_v_self->l_chunksize;
21525   __pyx_v_cs = __pyx_t_1;
21526 
21527   /* "tables/indexesextension.pyx":1187
21528  *
21529  *     cs = self.l_chunksize
21530  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
21531  *     ncs = ss / cs
21532  *     nbounds = self.nbounds
21533  */
21534   __pyx_t_1 = __pyx_v_self->l_slicesize;
21535   __pyx_v_ss = __pyx_t_1;
21536 
21537   /* "tables/indexesextension.pyx":1188
21538  *     cs = self.l_chunksize
21539  *     ss = self.l_slicesize
21540  *     ncs = ss / cs             # <<<<<<<<<<<<<<
21541  *     nbounds = self.nbounds
21542  *     nrows = self.nrows
21543  */
21544   if (unlikely(__pyx_v_cs == 0)) {
21545     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
21546     __PYX_ERR(0, 1188, __pyx_L1_error)
21547   }
21548   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
21549     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
21550     __PYX_ERR(0, 1188, __pyx_L1_error)
21551   }
21552   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
21553 
21554   /* "tables/indexesextension.pyx":1189
21555  *     ss = self.l_slicesize
21556  *     ncs = ss / cs
21557  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
21558  *     nrows = self.nrows
21559  *     rbufst = <int *>self.rbufst
21560  */
21561   __pyx_t_1 = __pyx_v_self->nbounds;
21562   __pyx_v_nbounds = __pyx_t_1;
21563 
21564   /* "tables/indexesextension.pyx":1190
21565  *     ncs = ss / cs
21566  *     nbounds = self.nbounds
21567  *     nrows = self.nrows             # <<<<<<<<<<<<<<
21568  *     rbufst = <int *>self.rbufst
21569  *     rbufln = <int *>self.rbufln
21570  */
21571   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error)
21572   __Pyx_GOTREF(__pyx_t_2);
21573   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L1_error)
21574   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21575   __pyx_v_nrows = __pyx_t_1;
21576 
21577   /* "tables/indexesextension.pyx":1191
21578  *     nbounds = self.nbounds
21579  *     nrows = self.nrows
21580  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
21581  *     rbufln = <int *>self.rbufln
21582  *     rbufrv = <npy_uint64 *>self.rbufrv
21583  */
21584   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
21585 
21586   /* "tables/indexesextension.pyx":1192
21587  *     nrows = self.nrows
21588  *     rbufst = <int *>self.rbufst
21589  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
21590  *     rbufrv = <npy_uint64 *>self.rbufrv
21591  *     tlength = 0
21592  */
21593   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
21594 
21595   /* "tables/indexesextension.pyx":1193
21596  *     rbufst = <int *>self.rbufst
21597  *     rbufln = <int *>self.rbufln
21598  *     rbufrv = <npy_uint64 *>self.rbufrv             # <<<<<<<<<<<<<<
21599  *     tlength = 0
21600  *     for nrow from 0 <= nrow < nrows:
21601  */
21602   __pyx_v_rbufrv = ((npy_uint64 *)__pyx_v_self->rbufrv);
21603 
21604   /* "tables/indexesextension.pyx":1194
21605  *     rbufln = <int *>self.rbufln
21606  *     rbufrv = <npy_uint64 *>self.rbufrv
21607  *     tlength = 0             # <<<<<<<<<<<<<<
21608  *     for nrow from 0 <= nrow < nrows:
21609  *       rvrow = nrow*2
21610  */
21611   __pyx_v_tlength = 0;
21612 
21613   /* "tables/indexesextension.pyx":1195
21614  *     rbufrv = <npy_uint64 *>self.rbufrv
21615  *     tlength = 0
21616  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
21617  *       rvrow = nrow*2
21618  *       bread = 0
21619  */
21620   __pyx_t_1 = __pyx_v_nrows;
21621   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
21622 
21623     /* "tables/indexesextension.pyx":1196
21624  *     tlength = 0
21625  *     for nrow from 0 <= nrow < nrows:
21626  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
21627  *       bread = 0
21628  *       nchunk = -1
21629  */
21630     __pyx_v_rvrow = (__pyx_v_nrow * 2);
21631 
21632     /* "tables/indexesextension.pyx":1197
21633  *     for nrow from 0 <= nrow < nrows:
21634  *       rvrow = nrow*2
21635  *       bread = 0             # <<<<<<<<<<<<<<
21636  *       nchunk = -1
21637  *       # Look if item1 is in this row
21638  */
21639     __pyx_v_bread = 0;
21640 
21641     /* "tables/indexesextension.pyx":1198
21642  *       rvrow = nrow*2
21643  *       bread = 0
21644  *       nchunk = -1             # <<<<<<<<<<<<<<
21645  *       # Look if item1 is in this row
21646  *       if item1 > rbufrv[rvrow]:
21647  */
21648     __pyx_v_nchunk = -1;
21649 
21650     /* "tables/indexesextension.pyx":1200
21651  *       nchunk = -1
21652  *       # Look if item1 is in this row
21653  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
21654  *         if item1 <= rbufrv[rvrow+1]:
21655  *           # Get the bounds row from the LRU cache or read them.
21656  */
21657     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
21658     if (__pyx_t_3) {
21659 
21660       /* "tables/indexesextension.pyx":1201
21661  *       # Look if item1 is in this row
21662  *       if item1 > rbufrv[rvrow]:
21663  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
21664  *           # Get the bounds row from the LRU cache or read them.
21665  *           rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21666  */
21667       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
21668       if (__pyx_t_3) {
21669 
21670         /* "tables/indexesextension.pyx":1203
21671  *         if item1 <= rbufrv[rvrow+1]:
21672  *           # Get the bounds row from the LRU cache or read them.
21673  *           rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
21674  *           bread = 1
21675  *           nchunk = bisect_left_ull(rbufbc, item1, nbounds, 0)
21676  */
21677         __pyx_v_rbufbc = ((npy_uint64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
21678 
21679         /* "tables/indexesextension.pyx":1204
21680  *           # Get the bounds row from the LRU cache or read them.
21681  *           rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21682  *           bread = 1             # <<<<<<<<<<<<<<
21683  *           nchunk = bisect_left_ull(rbufbc, item1, nbounds, 0)
21684  *           # Get the sorted row from the LRU cache or read it.
21685  */
21686         __pyx_v_bread = 1;
21687 
21688         /* "tables/indexesextension.pyx":1205
21689  *           rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21690  *           bread = 1
21691  *           nchunk = bisect_left_ull(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
21692  *           # Get the sorted row from the LRU cache or read it.
21693  *           rbuflb = <npy_uint64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
21694  */
21695         __pyx_v_nchunk = bisect_left_ull(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
21696 
21697         /* "tables/indexesextension.pyx":1207
21698  *           nchunk = bisect_left_ull(rbufbc, item1, nbounds, 0)
21699  *           # Get the sorted row from the LRU cache or read it.
21700  *           rbuflb = <npy_uint64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
21701  *           start = bisect_left_ull(rbuflb, item1, cs, 0) + cs*nchunk
21702  *         else:
21703  */
21704         __pyx_v_rbuflb = ((npy_uint64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
21705 
21706         /* "tables/indexesextension.pyx":1208
21707  *           # Get the sorted row from the LRU cache or read it.
21708  *           rbuflb = <npy_uint64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
21709  *           start = bisect_left_ull(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
21710  *         else:
21711  *           start = ss
21712  */
21713         __pyx_v_start = (bisect_left_ull(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
21714 
21715         /* "tables/indexesextension.pyx":1201
21716  *       # Look if item1 is in this row
21717  *       if item1 > rbufrv[rvrow]:
21718  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
21719  *           # Get the bounds row from the LRU cache or read them.
21720  *           rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21721  */
21722         goto __pyx_L6;
21723       }
21724 
21725       /* "tables/indexesextension.pyx":1210
21726  *           start = bisect_left_ull(rbuflb, item1, cs, 0) + cs*nchunk
21727  *         else:
21728  *           start = ss             # <<<<<<<<<<<<<<
21729  *       else:
21730  *         start = 0
21731  */
21732       /*else*/ {
21733         __pyx_v_start = __pyx_v_ss;
21734       }
21735       __pyx_L6:;
21736 
21737       /* "tables/indexesextension.pyx":1200
21738  *       nchunk = -1
21739  *       # Look if item1 is in this row
21740  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
21741  *         if item1 <= rbufrv[rvrow+1]:
21742  *           # Get the bounds row from the LRU cache or read them.
21743  */
21744       goto __pyx_L5;
21745     }
21746 
21747     /* "tables/indexesextension.pyx":1212
21748  *           start = ss
21749  *       else:
21750  *         start = 0             # <<<<<<<<<<<<<<
21751  *       # Now, for item2
21752  *       if item2 >= rbufrv[rvrow]:
21753  */
21754     /*else*/ {
21755       __pyx_v_start = 0;
21756     }
21757     __pyx_L5:;
21758 
21759     /* "tables/indexesextension.pyx":1214
21760  *         start = 0
21761  *       # Now, for item2
21762  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
21763  *         if item2 < rbufrv[rvrow+1]:
21764  *           if not bread:
21765  */
21766     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
21767     if (__pyx_t_3) {
21768 
21769       /* "tables/indexesextension.pyx":1215
21770  *       # Now, for item2
21771  *       if item2 >= rbufrv[rvrow]:
21772  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
21773  *           if not bread:
21774  *             # Get the bounds row from the LRU cache or read them.
21775  */
21776       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
21777       if (__pyx_t_3) {
21778 
21779         /* "tables/indexesextension.pyx":1216
21780  *       if item2 >= rbufrv[rvrow]:
21781  *         if item2 < rbufrv[rvrow+1]:
21782  *           if not bread:             # <<<<<<<<<<<<<<
21783  *             # Get the bounds row from the LRU cache or read them.
21784  *             rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21785  */
21786         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
21787         if (__pyx_t_3) {
21788 
21789           /* "tables/indexesextension.pyx":1218
21790  *           if not bread:
21791  *             # Get the bounds row from the LRU cache or read them.
21792  *             rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
21793  *           nchunk2 = bisect_right_ull(rbufbc, item2, nbounds, 0)
21794  *           if nchunk2 <> nchunk:
21795  */
21796           __pyx_v_rbufbc = ((npy_uint64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
21797 
21798           /* "tables/indexesextension.pyx":1216
21799  *       if item2 >= rbufrv[rvrow]:
21800  *         if item2 < rbufrv[rvrow+1]:
21801  *           if not bread:             # <<<<<<<<<<<<<<
21802  *             # Get the bounds row from the LRU cache or read them.
21803  *             rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21804  */
21805         }
21806 
21807         /* "tables/indexesextension.pyx":1219
21808  *             # Get the bounds row from the LRU cache or read them.
21809  *             rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21810  *           nchunk2 = bisect_right_ull(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
21811  *           if nchunk2 <> nchunk:
21812  *             # Get the sorted row from the LRU cache or read it.
21813  */
21814         __pyx_v_nchunk2 = bisect_right_ull(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
21815 
21816         /* "tables/indexesextension.pyx":1220
21817  *             rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21818  *           nchunk2 = bisect_right_ull(rbufbc, item2, nbounds, 0)
21819  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
21820  *             # Get the sorted row from the LRU cache or read it.
21821  *             rbuflb = <npy_uint64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
21822  */
21823         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
21824         if (__pyx_t_3) {
21825 
21826           /* "tables/indexesextension.pyx":1222
21827  *           if nchunk2 <> nchunk:
21828  *             # Get the sorted row from the LRU cache or read it.
21829  *             rbuflb = <npy_uint64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
21830  *           stop = bisect_right_ull(rbuflb, item2, cs, 0) + cs*nchunk2
21831  *         else:
21832  */
21833           __pyx_v_rbuflb = ((npy_uint64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
21834 
21835           /* "tables/indexesextension.pyx":1220
21836  *             rbufbc = <npy_uint64 *>self.get_lru_bounds(nrow, nbounds)
21837  *           nchunk2 = bisect_right_ull(rbufbc, item2, nbounds, 0)
21838  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
21839  *             # Get the sorted row from the LRU cache or read it.
21840  *             rbuflb = <npy_uint64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
21841  */
21842         }
21843 
21844         /* "tables/indexesextension.pyx":1223
21845  *             # Get the sorted row from the LRU cache or read it.
21846  *             rbuflb = <npy_uint64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
21847  *           stop = bisect_right_ull(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
21848  *         else:
21849  *           stop = ss
21850  */
21851         __pyx_v_stop = (bisect_right_ull(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
21852 
21853         /* "tables/indexesextension.pyx":1215
21854  *       # Now, for item2
21855  *       if item2 >= rbufrv[rvrow]:
21856  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
21857  *           if not bread:
21858  *             # Get the bounds row from the LRU cache or read them.
21859  */
21860         goto __pyx_L8;
21861       }
21862 
21863       /* "tables/indexesextension.pyx":1225
21864  *           stop = bisect_right_ull(rbuflb, item2, cs, 0) + cs*nchunk2
21865  *         else:
21866  *           stop = ss             # <<<<<<<<<<<<<<
21867  *       else:
21868  *         stop = 0
21869  */
21870       /*else*/ {
21871         __pyx_v_stop = __pyx_v_ss;
21872       }
21873       __pyx_L8:;
21874 
21875       /* "tables/indexesextension.pyx":1214
21876  *         start = 0
21877  *       # Now, for item2
21878  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
21879  *         if item2 < rbufrv[rvrow+1]:
21880  *           if not bread:
21881  */
21882       goto __pyx_L7;
21883     }
21884 
21885     /* "tables/indexesextension.pyx":1227
21886  *           stop = ss
21887  *       else:
21888  *         stop = 0             # <<<<<<<<<<<<<<
21889  *       length = stop - start
21890  *       tlength = tlength + length
21891  */
21892     /*else*/ {
21893       __pyx_v_stop = 0;
21894     }
21895     __pyx_L7:;
21896 
21897     /* "tables/indexesextension.pyx":1228
21898  *       else:
21899  *         stop = 0
21900  *       length = stop - start             # <<<<<<<<<<<<<<
21901  *       tlength = tlength + length
21902  *       rbufst[nrow] = start
21903  */
21904     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
21905 
21906     /* "tables/indexesextension.pyx":1229
21907  *         stop = 0
21908  *       length = stop - start
21909  *       tlength = tlength + length             # <<<<<<<<<<<<<<
21910  *       rbufst[nrow] = start
21911  *       rbufln[nrow] = length
21912  */
21913     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
21914 
21915     /* "tables/indexesextension.pyx":1230
21916  *       length = stop - start
21917  *       tlength = tlength + length
21918  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
21919  *       rbufln[nrow] = length
21920  *     return tlength
21921  */
21922     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
21923 
21924     /* "tables/indexesextension.pyx":1231
21925  *       tlength = tlength + length
21926  *       rbufst[nrow] = start
21927  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
21928  *     return tlength
21929  *
21930  */
21931     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
21932   }
21933 
21934   /* "tables/indexesextension.pyx":1232
21935  *       rbufst[nrow] = start
21936  *       rbufln[nrow] = length
21937  *     return tlength             # <<<<<<<<<<<<<<
21938  *
21939  *
21940  */
21941   __Pyx_XDECREF(__pyx_r);
21942   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error)
21943   __Pyx_GOTREF(__pyx_t_2);
21944   __pyx_r = __pyx_t_2;
21945   __pyx_t_2 = 0;
21946   goto __pyx_L0;
21947 
21948   /* "tables/indexesextension.pyx":1175
21949  *
21950  *   # Optimized version for uint64
21951  *   def _search_bin_na_ull(self, npy_uint64 item1, npy_uint64 item2):             # <<<<<<<<<<<<<<
21952  *     cdef int cs, ss, ncs, nrow, nrows, nbounds, rvrow
21953  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
21954  */
21955 
21956   /* function exit code */
21957   __pyx_L1_error:;
21958   __Pyx_XDECREF(__pyx_t_2);
21959   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_ull", __pyx_clineno, __pyx_lineno, __pyx_filename);
21960   __pyx_r = NULL;
21961   __pyx_L0:;
21962   __Pyx_XGIVEREF(__pyx_r);
21963   __Pyx_RefNannyFinishContext();
21964   return __pyx_r;
21965 }
21966 
21967 /* "tables/indexesextension.pyx":1236
21968  *
21969  *   # Optimized version for float16
21970  *   def _search_bin_na_e(self, npy_float64 item1, npy_float64 item2):             # <<<<<<<<<<<<<<
21971  *     cdef int cs, ss, ncs, nrow, nrows, nrow2, nbounds, rvrow
21972  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
21973  */
21974 
21975 /* Python wrapper */
21976 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_23_search_bin_na_e(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_23_search_bin_na_e(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)21977 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_23_search_bin_na_e(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21978   npy_float64 __pyx_v_item1;
21979   npy_float64 __pyx_v_item2;
21980   PyObject *__pyx_r = 0;
21981   __Pyx_RefNannyDeclarations
21982   __Pyx_RefNannySetupContext("_search_bin_na_e (wrapper)", 0);
21983   {
21984     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
21985     PyObject* values[2] = {0,0};
21986     if (unlikely(__pyx_kwds)) {
21987       Py_ssize_t kw_args;
21988       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21989       switch (pos_args) {
21990         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21991         CYTHON_FALLTHROUGH;
21992         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21993         CYTHON_FALLTHROUGH;
21994         case  0: break;
21995         default: goto __pyx_L5_argtuple_error;
21996       }
21997       kw_args = PyDict_Size(__pyx_kwds);
21998       switch (pos_args) {
21999         case  0:
22000         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
22001         else goto __pyx_L5_argtuple_error;
22002         CYTHON_FALLTHROUGH;
22003         case  1:
22004         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
22005         else {
22006           __Pyx_RaiseArgtupleInvalid("_search_bin_na_e", 1, 2, 2, 1); __PYX_ERR(0, 1236, __pyx_L3_error)
22007         }
22008       }
22009       if (unlikely(kw_args > 0)) {
22010         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_e") < 0)) __PYX_ERR(0, 1236, __pyx_L3_error)
22011       }
22012     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22013       goto __pyx_L5_argtuple_error;
22014     } else {
22015       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22016       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22017     }
22018     __pyx_v_item1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_item1 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1236, __pyx_L3_error)
22019     __pyx_v_item2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_item2 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1236, __pyx_L3_error)
22020   }
22021   goto __pyx_L4_argument_unpacking_done;
22022   __pyx_L5_argtuple_error:;
22023   __Pyx_RaiseArgtupleInvalid("_search_bin_na_e", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1236, __pyx_L3_error)
22024   __pyx_L3_error:;
22025   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_e", __pyx_clineno, __pyx_lineno, __pyx_filename);
22026   __Pyx_RefNannyFinishContext();
22027   return NULL;
22028   __pyx_L4_argument_unpacking_done:;
22029   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_22_search_bin_na_e(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
22030 
22031   /* function exit code */
22032   __Pyx_RefNannyFinishContext();
22033   return __pyx_r;
22034 }
22035 
__pyx_pf_6tables_16indexesextension_10IndexArray_22_search_bin_na_e(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,npy_float64 __pyx_v_item1,npy_float64 __pyx_v_item2)22036 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_22_search_bin_na_e(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_float64 __pyx_v_item1, npy_float64 __pyx_v_item2) {
22037   int __pyx_v_cs;
22038   int __pyx_v_ss;
22039   int __pyx_v_ncs;
22040   int __pyx_v_nrow;
22041   int __pyx_v_nrows;
22042   int __pyx_v_nbounds;
22043   int __pyx_v_rvrow;
22044   int __pyx_v_start;
22045   int __pyx_v_stop;
22046   int __pyx_v_tlength;
22047   int __pyx_v_length;
22048   int __pyx_v_bread;
22049   int __pyx_v_nchunk;
22050   int __pyx_v_nchunk2;
22051   int *__pyx_v_rbufst;
22052   int *__pyx_v_rbufln;
22053   __pyx_t_6tables_16indexesextension_npy_float16 *__pyx_v_rbufrv;
22054   __pyx_t_6tables_16indexesextension_npy_float16 *__pyx_v_rbufbc;
22055   __pyx_t_6tables_16indexesextension_npy_float16 *__pyx_v_rbuflb;
22056   PyObject *__pyx_r = NULL;
22057   __Pyx_RefNannyDeclarations
22058   int __pyx_t_1;
22059   PyObject *__pyx_t_2 = NULL;
22060   int __pyx_t_3;
22061   __Pyx_RefNannySetupContext("_search_bin_na_e", 0);
22062 
22063   /* "tables/indexesextension.pyx":1244
22064  *     # Variables with specific type
22065  *     cdef npy_float16 *rbufrv
22066  *     cdef npy_float16 *rbufbc = NULL             # <<<<<<<<<<<<<<
22067  *     cdef npy_float16 *rbuflb = NULL
22068  *
22069  */
22070   __pyx_v_rbufbc = NULL;
22071 
22072   /* "tables/indexesextension.pyx":1245
22073  *     cdef npy_float16 *rbufrv
22074  *     cdef npy_float16 *rbufbc = NULL
22075  *     cdef npy_float16 *rbuflb = NULL             # <<<<<<<<<<<<<<
22076  *
22077  *     cs = self.l_chunksize
22078  */
22079   __pyx_v_rbuflb = NULL;
22080 
22081   /* "tables/indexesextension.pyx":1247
22082  *     cdef npy_float16 *rbuflb = NULL
22083  *
22084  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
22085  *     ss = self.l_slicesize
22086  *     ncs = ss / cs
22087  */
22088   __pyx_t_1 = __pyx_v_self->l_chunksize;
22089   __pyx_v_cs = __pyx_t_1;
22090 
22091   /* "tables/indexesextension.pyx":1248
22092  *
22093  *     cs = self.l_chunksize
22094  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
22095  *     ncs = ss / cs
22096  *     nbounds = self.nbounds
22097  */
22098   __pyx_t_1 = __pyx_v_self->l_slicesize;
22099   __pyx_v_ss = __pyx_t_1;
22100 
22101   /* "tables/indexesextension.pyx":1249
22102  *     cs = self.l_chunksize
22103  *     ss = self.l_slicesize
22104  *     ncs = ss / cs             # <<<<<<<<<<<<<<
22105  *     nbounds = self.nbounds
22106  *     nrows = self.nrows
22107  */
22108   if (unlikely(__pyx_v_cs == 0)) {
22109     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
22110     __PYX_ERR(0, 1249, __pyx_L1_error)
22111   }
22112   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
22113     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
22114     __PYX_ERR(0, 1249, __pyx_L1_error)
22115   }
22116   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
22117 
22118   /* "tables/indexesextension.pyx":1250
22119  *     ss = self.l_slicesize
22120  *     ncs = ss / cs
22121  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
22122  *     nrows = self.nrows
22123  *     tlength = 0
22124  */
22125   __pyx_t_1 = __pyx_v_self->nbounds;
22126   __pyx_v_nbounds = __pyx_t_1;
22127 
22128   /* "tables/indexesextension.pyx":1251
22129  *     ncs = ss / cs
22130  *     nbounds = self.nbounds
22131  *     nrows = self.nrows             # <<<<<<<<<<<<<<
22132  *     tlength = 0
22133  *     rbufst = <int *>self.rbufst
22134  */
22135   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
22136   __Pyx_GOTREF(__pyx_t_2);
22137   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
22138   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22139   __pyx_v_nrows = __pyx_t_1;
22140 
22141   /* "tables/indexesextension.pyx":1252
22142  *     nbounds = self.nbounds
22143  *     nrows = self.nrows
22144  *     tlength = 0             # <<<<<<<<<<<<<<
22145  *     rbufst = <int *>self.rbufst
22146  *     rbufln = <int *>self.rbufln
22147  */
22148   __pyx_v_tlength = 0;
22149 
22150   /* "tables/indexesextension.pyx":1253
22151  *     nrows = self.nrows
22152  *     tlength = 0
22153  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
22154  *     rbufln = <int *>self.rbufln
22155  *     # Limits not in cache, do a lookup
22156  */
22157   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
22158 
22159   /* "tables/indexesextension.pyx":1254
22160  *     tlength = 0
22161  *     rbufst = <int *>self.rbufst
22162  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
22163  *     # Limits not in cache, do a lookup
22164  *     rbufrv = <npy_float16 *>self.rbufrv
22165  */
22166   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
22167 
22168   /* "tables/indexesextension.pyx":1256
22169  *     rbufln = <int *>self.rbufln
22170  *     # Limits not in cache, do a lookup
22171  *     rbufrv = <npy_float16 *>self.rbufrv             # <<<<<<<<<<<<<<
22172  *     for nrow from 0 <= nrow < nrows:
22173  *       rvrow = nrow*2
22174  */
22175   __pyx_v_rbufrv = ((__pyx_t_6tables_16indexesextension_npy_float16 *)__pyx_v_self->rbufrv);
22176 
22177   /* "tables/indexesextension.pyx":1257
22178  *     # Limits not in cache, do a lookup
22179  *     rbufrv = <npy_float16 *>self.rbufrv
22180  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
22181  *       rvrow = nrow*2
22182  *       bread = 0
22183  */
22184   __pyx_t_1 = __pyx_v_nrows;
22185   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
22186 
22187     /* "tables/indexesextension.pyx":1258
22188  *     rbufrv = <npy_float16 *>self.rbufrv
22189  *     for nrow from 0 <= nrow < nrows:
22190  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
22191  *       bread = 0
22192  *       nchunk = -1
22193  */
22194     __pyx_v_rvrow = (__pyx_v_nrow * 2);
22195 
22196     /* "tables/indexesextension.pyx":1259
22197  *     for nrow from 0 <= nrow < nrows:
22198  *       rvrow = nrow*2
22199  *       bread = 0             # <<<<<<<<<<<<<<
22200  *       nchunk = -1
22201  *
22202  */
22203     __pyx_v_bread = 0;
22204 
22205     /* "tables/indexesextension.pyx":1260
22206  *       rvrow = nrow*2
22207  *       bread = 0
22208  *       nchunk = -1             # <<<<<<<<<<<<<<
22209  *
22210  *       # Look if item1 is in this row
22211  */
22212     __pyx_v_nchunk = -1;
22213 
22214     /* "tables/indexesextension.pyx":1263
22215  *
22216  *       # Look if item1 is in this row
22217  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
22218  *         if item1 <= rbufrv[rvrow+1]:
22219  *           # Get the bounds row from the LRU cache or read them.
22220  */
22221     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
22222     if (__pyx_t_3) {
22223 
22224       /* "tables/indexesextension.pyx":1264
22225  *       # Look if item1 is in this row
22226  *       if item1 > rbufrv[rvrow]:
22227  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
22228  *           # Get the bounds row from the LRU cache or read them.
22229  *           rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22230  */
22231       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
22232       if (__pyx_t_3) {
22233 
22234         /* "tables/indexesextension.pyx":1266
22235  *         if item1 <= rbufrv[rvrow+1]:
22236  *           # Get the bounds row from the LRU cache or read them.
22237  *           rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
22238  *           bread = 1
22239  *           nchunk = bisect_left_e(rbufbc, item1, nbounds, 0)
22240  */
22241         __pyx_v_rbufbc = ((__pyx_t_6tables_16indexesextension_npy_float16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
22242 
22243         /* "tables/indexesextension.pyx":1267
22244  *           # Get the bounds row from the LRU cache or read them.
22245  *           rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22246  *           bread = 1             # <<<<<<<<<<<<<<
22247  *           nchunk = bisect_left_e(rbufbc, item1, nbounds, 0)
22248  *           # Get the sorted row from the LRU cache or read it.
22249  */
22250         __pyx_v_bread = 1;
22251 
22252         /* "tables/indexesextension.pyx":1268
22253  *           rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22254  *           bread = 1
22255  *           nchunk = bisect_left_e(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
22256  *           # Get the sorted row from the LRU cache or read it.
22257  *           rbuflb = <npy_float16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
22258  */
22259         __pyx_v_nchunk = bisect_left_e(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
22260 
22261         /* "tables/indexesextension.pyx":1270
22262  *           nchunk = bisect_left_e(rbufbc, item1, nbounds, 0)
22263  *           # Get the sorted row from the LRU cache or read it.
22264  *           rbuflb = <npy_float16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
22265  *           start = bisect_left_e(rbuflb, item1, cs, 0) + cs*nchunk
22266  *         else:
22267  */
22268         __pyx_v_rbuflb = ((__pyx_t_6tables_16indexesextension_npy_float16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
22269 
22270         /* "tables/indexesextension.pyx":1271
22271  *           # Get the sorted row from the LRU cache or read it.
22272  *           rbuflb = <npy_float16 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
22273  *           start = bisect_left_e(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
22274  *         else:
22275  *           start = ss
22276  */
22277         __pyx_v_start = (bisect_left_e(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
22278 
22279         /* "tables/indexesextension.pyx":1264
22280  *       # Look if item1 is in this row
22281  *       if item1 > rbufrv[rvrow]:
22282  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
22283  *           # Get the bounds row from the LRU cache or read them.
22284  *           rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22285  */
22286         goto __pyx_L6;
22287       }
22288 
22289       /* "tables/indexesextension.pyx":1273
22290  *           start = bisect_left_e(rbuflb, item1, cs, 0) + cs*nchunk
22291  *         else:
22292  *           start = ss             # <<<<<<<<<<<<<<
22293  *       else:
22294  *         start = 0
22295  */
22296       /*else*/ {
22297         __pyx_v_start = __pyx_v_ss;
22298       }
22299       __pyx_L6:;
22300 
22301       /* "tables/indexesextension.pyx":1263
22302  *
22303  *       # Look if item1 is in this row
22304  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
22305  *         if item1 <= rbufrv[rvrow+1]:
22306  *           # Get the bounds row from the LRU cache or read them.
22307  */
22308       goto __pyx_L5;
22309     }
22310 
22311     /* "tables/indexesextension.pyx":1275
22312  *           start = ss
22313  *       else:
22314  *         start = 0             # <<<<<<<<<<<<<<
22315  *       # Now, for item2
22316  *       if item2 >= rbufrv[rvrow]:
22317  */
22318     /*else*/ {
22319       __pyx_v_start = 0;
22320     }
22321     __pyx_L5:;
22322 
22323     /* "tables/indexesextension.pyx":1277
22324  *         start = 0
22325  *       # Now, for item2
22326  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
22327  *         if item2 < rbufrv[rvrow+1]:
22328  *           if not bread:
22329  */
22330     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
22331     if (__pyx_t_3) {
22332 
22333       /* "tables/indexesextension.pyx":1278
22334  *       # Now, for item2
22335  *       if item2 >= rbufrv[rvrow]:
22336  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
22337  *           if not bread:
22338  *             # Get the bounds row from the LRU cache or read them.
22339  */
22340       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
22341       if (__pyx_t_3) {
22342 
22343         /* "tables/indexesextension.pyx":1279
22344  *       if item2 >= rbufrv[rvrow]:
22345  *         if item2 < rbufrv[rvrow+1]:
22346  *           if not bread:             # <<<<<<<<<<<<<<
22347  *             # Get the bounds row from the LRU cache or read them.
22348  *             rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22349  */
22350         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
22351         if (__pyx_t_3) {
22352 
22353           /* "tables/indexesextension.pyx":1281
22354  *           if not bread:
22355  *             # Get the bounds row from the LRU cache or read them.
22356  *             rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
22357  *           nchunk2 = bisect_right_e(rbufbc, item2, nbounds, 0)
22358  *           if nchunk2 <> nchunk:
22359  */
22360           __pyx_v_rbufbc = ((__pyx_t_6tables_16indexesextension_npy_float16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
22361 
22362           /* "tables/indexesextension.pyx":1279
22363  *       if item2 >= rbufrv[rvrow]:
22364  *         if item2 < rbufrv[rvrow+1]:
22365  *           if not bread:             # <<<<<<<<<<<<<<
22366  *             # Get the bounds row from the LRU cache or read them.
22367  *             rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22368  */
22369         }
22370 
22371         /* "tables/indexesextension.pyx":1282
22372  *             # Get the bounds row from the LRU cache or read them.
22373  *             rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22374  *           nchunk2 = bisect_right_e(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
22375  *           if nchunk2 <> nchunk:
22376  *             # Get the sorted row from the LRU cache or read it.
22377  */
22378         __pyx_v_nchunk2 = bisect_right_e(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
22379 
22380         /* "tables/indexesextension.pyx":1283
22381  *             rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22382  *           nchunk2 = bisect_right_e(rbufbc, item2, nbounds, 0)
22383  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
22384  *             # Get the sorted row from the LRU cache or read it.
22385  *             rbuflb = <npy_float16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
22386  */
22387         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
22388         if (__pyx_t_3) {
22389 
22390           /* "tables/indexesextension.pyx":1285
22391  *           if nchunk2 <> nchunk:
22392  *             # Get the sorted row from the LRU cache or read it.
22393  *             rbuflb = <npy_float16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
22394  *           stop = bisect_right_e(rbuflb, item2, cs, 0) + cs*nchunk2
22395  *         else:
22396  */
22397           __pyx_v_rbuflb = ((__pyx_t_6tables_16indexesextension_npy_float16 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
22398 
22399           /* "tables/indexesextension.pyx":1283
22400  *             rbufbc = <npy_float16 *>self.get_lru_bounds(nrow, nbounds)
22401  *           nchunk2 = bisect_right_e(rbufbc, item2, nbounds, 0)
22402  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
22403  *             # Get the sorted row from the LRU cache or read it.
22404  *             rbuflb = <npy_float16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
22405  */
22406         }
22407 
22408         /* "tables/indexesextension.pyx":1286
22409  *             # Get the sorted row from the LRU cache or read it.
22410  *             rbuflb = <npy_float16 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
22411  *           stop = bisect_right_e(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
22412  *         else:
22413  *           stop = ss
22414  */
22415         __pyx_v_stop = (bisect_right_e(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
22416 
22417         /* "tables/indexesextension.pyx":1278
22418  *       # Now, for item2
22419  *       if item2 >= rbufrv[rvrow]:
22420  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
22421  *           if not bread:
22422  *             # Get the bounds row from the LRU cache or read them.
22423  */
22424         goto __pyx_L8;
22425       }
22426 
22427       /* "tables/indexesextension.pyx":1288
22428  *           stop = bisect_right_e(rbuflb, item2, cs, 0) + cs*nchunk2
22429  *         else:
22430  *           stop = ss             # <<<<<<<<<<<<<<
22431  *       else:
22432  *         stop = 0
22433  */
22434       /*else*/ {
22435         __pyx_v_stop = __pyx_v_ss;
22436       }
22437       __pyx_L8:;
22438 
22439       /* "tables/indexesextension.pyx":1277
22440  *         start = 0
22441  *       # Now, for item2
22442  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
22443  *         if item2 < rbufrv[rvrow+1]:
22444  *           if not bread:
22445  */
22446       goto __pyx_L7;
22447     }
22448 
22449     /* "tables/indexesextension.pyx":1290
22450  *           stop = ss
22451  *       else:
22452  *         stop = 0             # <<<<<<<<<<<<<<
22453  *       length = stop - start
22454  *       tlength = tlength + length
22455  */
22456     /*else*/ {
22457       __pyx_v_stop = 0;
22458     }
22459     __pyx_L7:;
22460 
22461     /* "tables/indexesextension.pyx":1291
22462  *       else:
22463  *         stop = 0
22464  *       length = stop - start             # <<<<<<<<<<<<<<
22465  *       tlength = tlength + length
22466  *       rbufst[nrow] = start
22467  */
22468     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
22469 
22470     /* "tables/indexesextension.pyx":1292
22471  *         stop = 0
22472  *       length = stop - start
22473  *       tlength = tlength + length             # <<<<<<<<<<<<<<
22474  *       rbufst[nrow] = start
22475  *       rbufln[nrow] = length
22476  */
22477     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
22478 
22479     /* "tables/indexesextension.pyx":1293
22480  *       length = stop - start
22481  *       tlength = tlength + length
22482  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
22483  *       rbufln[nrow] = length
22484  *     return tlength
22485  */
22486     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
22487 
22488     /* "tables/indexesextension.pyx":1294
22489  *       tlength = tlength + length
22490  *       rbufst[nrow] = start
22491  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
22492  *     return tlength
22493  *
22494  */
22495     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
22496   }
22497 
22498   /* "tables/indexesextension.pyx":1295
22499  *       rbufst[nrow] = start
22500  *       rbufln[nrow] = length
22501  *     return tlength             # <<<<<<<<<<<<<<
22502  *
22503  *
22504  */
22505   __Pyx_XDECREF(__pyx_r);
22506   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1295, __pyx_L1_error)
22507   __Pyx_GOTREF(__pyx_t_2);
22508   __pyx_r = __pyx_t_2;
22509   __pyx_t_2 = 0;
22510   goto __pyx_L0;
22511 
22512   /* "tables/indexesextension.pyx":1236
22513  *
22514  *   # Optimized version for float16
22515  *   def _search_bin_na_e(self, npy_float64 item1, npy_float64 item2):             # <<<<<<<<<<<<<<
22516  *     cdef int cs, ss, ncs, nrow, nrows, nrow2, nbounds, rvrow
22517  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
22518  */
22519 
22520   /* function exit code */
22521   __pyx_L1_error:;
22522   __Pyx_XDECREF(__pyx_t_2);
22523   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_e", __pyx_clineno, __pyx_lineno, __pyx_filename);
22524   __pyx_r = NULL;
22525   __pyx_L0:;
22526   __Pyx_XGIVEREF(__pyx_r);
22527   __Pyx_RefNannyFinishContext();
22528   return __pyx_r;
22529 }
22530 
22531 /* "tables/indexesextension.pyx":1299
22532  *
22533  *   # Optimized version for float32
22534  *   def _search_bin_na_f(self, npy_float64 item1, npy_float64 item2):             # <<<<<<<<<<<<<<
22535  *     cdef int cs, ss, ncs, nrow, nrows, nrow2, nbounds, rvrow
22536  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
22537  */
22538 
22539 /* Python wrapper */
22540 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_25_search_bin_na_f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_25_search_bin_na_f(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)22541 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_25_search_bin_na_f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22542   npy_float64 __pyx_v_item1;
22543   npy_float64 __pyx_v_item2;
22544   PyObject *__pyx_r = 0;
22545   __Pyx_RefNannyDeclarations
22546   __Pyx_RefNannySetupContext("_search_bin_na_f (wrapper)", 0);
22547   {
22548     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
22549     PyObject* values[2] = {0,0};
22550     if (unlikely(__pyx_kwds)) {
22551       Py_ssize_t kw_args;
22552       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22553       switch (pos_args) {
22554         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22555         CYTHON_FALLTHROUGH;
22556         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22557         CYTHON_FALLTHROUGH;
22558         case  0: break;
22559         default: goto __pyx_L5_argtuple_error;
22560       }
22561       kw_args = PyDict_Size(__pyx_kwds);
22562       switch (pos_args) {
22563         case  0:
22564         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
22565         else goto __pyx_L5_argtuple_error;
22566         CYTHON_FALLTHROUGH;
22567         case  1:
22568         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
22569         else {
22570           __Pyx_RaiseArgtupleInvalid("_search_bin_na_f", 1, 2, 2, 1); __PYX_ERR(0, 1299, __pyx_L3_error)
22571         }
22572       }
22573       if (unlikely(kw_args > 0)) {
22574         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_f") < 0)) __PYX_ERR(0, 1299, __pyx_L3_error)
22575       }
22576     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22577       goto __pyx_L5_argtuple_error;
22578     } else {
22579       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22580       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22581     }
22582     __pyx_v_item1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_item1 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L3_error)
22583     __pyx_v_item2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_item2 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L3_error)
22584   }
22585   goto __pyx_L4_argument_unpacking_done;
22586   __pyx_L5_argtuple_error:;
22587   __Pyx_RaiseArgtupleInvalid("_search_bin_na_f", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1299, __pyx_L3_error)
22588   __pyx_L3_error:;
22589   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
22590   __Pyx_RefNannyFinishContext();
22591   return NULL;
22592   __pyx_L4_argument_unpacking_done:;
22593   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_24_search_bin_na_f(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
22594 
22595   /* function exit code */
22596   __Pyx_RefNannyFinishContext();
22597   return __pyx_r;
22598 }
22599 
__pyx_pf_6tables_16indexesextension_10IndexArray_24_search_bin_na_f(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,npy_float64 __pyx_v_item1,npy_float64 __pyx_v_item2)22600 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_24_search_bin_na_f(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_float64 __pyx_v_item1, npy_float64 __pyx_v_item2) {
22601   int __pyx_v_cs;
22602   int __pyx_v_ss;
22603   int __pyx_v_ncs;
22604   int __pyx_v_nrow;
22605   int __pyx_v_nrows;
22606   int __pyx_v_nbounds;
22607   int __pyx_v_rvrow;
22608   int __pyx_v_start;
22609   int __pyx_v_stop;
22610   int __pyx_v_tlength;
22611   int __pyx_v_length;
22612   int __pyx_v_bread;
22613   int __pyx_v_nchunk;
22614   int __pyx_v_nchunk2;
22615   int *__pyx_v_rbufst;
22616   int *__pyx_v_rbufln;
22617   npy_float32 *__pyx_v_rbufrv;
22618   npy_float32 *__pyx_v_rbufbc;
22619   npy_float32 *__pyx_v_rbuflb;
22620   PyObject *__pyx_r = NULL;
22621   __Pyx_RefNannyDeclarations
22622   int __pyx_t_1;
22623   PyObject *__pyx_t_2 = NULL;
22624   int __pyx_t_3;
22625   __Pyx_RefNannySetupContext("_search_bin_na_f", 0);
22626 
22627   /* "tables/indexesextension.pyx":1306
22628  *     # Variables with specific type
22629  *     cdef npy_float32 *rbufrv
22630  *     cdef npy_float32 *rbufbc = NULL             # <<<<<<<<<<<<<<
22631  *     cdef npy_float32 *rbuflb = NULL
22632  *
22633  */
22634   __pyx_v_rbufbc = NULL;
22635 
22636   /* "tables/indexesextension.pyx":1307
22637  *     cdef npy_float32 *rbufrv
22638  *     cdef npy_float32 *rbufbc = NULL
22639  *     cdef npy_float32 *rbuflb = NULL             # <<<<<<<<<<<<<<
22640  *
22641  *     cs = self.l_chunksize
22642  */
22643   __pyx_v_rbuflb = NULL;
22644 
22645   /* "tables/indexesextension.pyx":1309
22646  *     cdef npy_float32 *rbuflb = NULL
22647  *
22648  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
22649  *     ss = self.l_slicesize
22650  *     ncs = ss / cs
22651  */
22652   __pyx_t_1 = __pyx_v_self->l_chunksize;
22653   __pyx_v_cs = __pyx_t_1;
22654 
22655   /* "tables/indexesextension.pyx":1310
22656  *
22657  *     cs = self.l_chunksize
22658  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
22659  *     ncs = ss / cs
22660  *     nbounds = self.nbounds
22661  */
22662   __pyx_t_1 = __pyx_v_self->l_slicesize;
22663   __pyx_v_ss = __pyx_t_1;
22664 
22665   /* "tables/indexesextension.pyx":1311
22666  *     cs = self.l_chunksize
22667  *     ss = self.l_slicesize
22668  *     ncs = ss / cs             # <<<<<<<<<<<<<<
22669  *     nbounds = self.nbounds
22670  *     nrows = self.nrows
22671  */
22672   if (unlikely(__pyx_v_cs == 0)) {
22673     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
22674     __PYX_ERR(0, 1311, __pyx_L1_error)
22675   }
22676   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
22677     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
22678     __PYX_ERR(0, 1311, __pyx_L1_error)
22679   }
22680   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
22681 
22682   /* "tables/indexesextension.pyx":1312
22683  *     ss = self.l_slicesize
22684  *     ncs = ss / cs
22685  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
22686  *     nrows = self.nrows
22687  *     tlength = 0
22688  */
22689   __pyx_t_1 = __pyx_v_self->nbounds;
22690   __pyx_v_nbounds = __pyx_t_1;
22691 
22692   /* "tables/indexesextension.pyx":1313
22693  *     ncs = ss / cs
22694  *     nbounds = self.nbounds
22695  *     nrows = self.nrows             # <<<<<<<<<<<<<<
22696  *     tlength = 0
22697  *     rbufst = <int *>self.rbufst
22698  */
22699   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
22700   __Pyx_GOTREF(__pyx_t_2);
22701   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L1_error)
22702   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22703   __pyx_v_nrows = __pyx_t_1;
22704 
22705   /* "tables/indexesextension.pyx":1314
22706  *     nbounds = self.nbounds
22707  *     nrows = self.nrows
22708  *     tlength = 0             # <<<<<<<<<<<<<<
22709  *     rbufst = <int *>self.rbufst
22710  *     rbufln = <int *>self.rbufln
22711  */
22712   __pyx_v_tlength = 0;
22713 
22714   /* "tables/indexesextension.pyx":1315
22715  *     nrows = self.nrows
22716  *     tlength = 0
22717  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
22718  *     rbufln = <int *>self.rbufln
22719  *
22720  */
22721   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
22722 
22723   /* "tables/indexesextension.pyx":1316
22724  *     tlength = 0
22725  *     rbufst = <int *>self.rbufst
22726  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
22727  *
22728  *     # Limits not in cache, do a lookup
22729  */
22730   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
22731 
22732   /* "tables/indexesextension.pyx":1319
22733  *
22734  *     # Limits not in cache, do a lookup
22735  *     rbufrv = <npy_float32 *>self.rbufrv             # <<<<<<<<<<<<<<
22736  *     for nrow from 0 <= nrow < nrows:
22737  *       rvrow = nrow*2
22738  */
22739   __pyx_v_rbufrv = ((npy_float32 *)__pyx_v_self->rbufrv);
22740 
22741   /* "tables/indexesextension.pyx":1320
22742  *     # Limits not in cache, do a lookup
22743  *     rbufrv = <npy_float32 *>self.rbufrv
22744  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
22745  *       rvrow = nrow*2
22746  *       bread = 0
22747  */
22748   __pyx_t_1 = __pyx_v_nrows;
22749   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
22750 
22751     /* "tables/indexesextension.pyx":1321
22752  *     rbufrv = <npy_float32 *>self.rbufrv
22753  *     for nrow from 0 <= nrow < nrows:
22754  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
22755  *       bread = 0
22756  *       nchunk = -1
22757  */
22758     __pyx_v_rvrow = (__pyx_v_nrow * 2);
22759 
22760     /* "tables/indexesextension.pyx":1322
22761  *     for nrow from 0 <= nrow < nrows:
22762  *       rvrow = nrow*2
22763  *       bread = 0             # <<<<<<<<<<<<<<
22764  *       nchunk = -1
22765  *       # Look if item1 is in this row
22766  */
22767     __pyx_v_bread = 0;
22768 
22769     /* "tables/indexesextension.pyx":1323
22770  *       rvrow = nrow*2
22771  *       bread = 0
22772  *       nchunk = -1             # <<<<<<<<<<<<<<
22773  *       # Look if item1 is in this row
22774  *       if item1 > rbufrv[rvrow]:
22775  */
22776     __pyx_v_nchunk = -1;
22777 
22778     /* "tables/indexesextension.pyx":1325
22779  *       nchunk = -1
22780  *       # Look if item1 is in this row
22781  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
22782  *         if item1 <= rbufrv[rvrow+1]:
22783  *           # Get the bounds row from the LRU cache or read them.
22784  */
22785     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
22786     if (__pyx_t_3) {
22787 
22788       /* "tables/indexesextension.pyx":1326
22789  *       # Look if item1 is in this row
22790  *       if item1 > rbufrv[rvrow]:
22791  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
22792  *           # Get the bounds row from the LRU cache or read them.
22793  *           rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22794  */
22795       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
22796       if (__pyx_t_3) {
22797 
22798         /* "tables/indexesextension.pyx":1328
22799  *         if item1 <= rbufrv[rvrow+1]:
22800  *           # Get the bounds row from the LRU cache or read them.
22801  *           rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
22802  *           bread = 1
22803  *           nchunk = bisect_left_f(rbufbc, item1, nbounds, 0)
22804  */
22805         __pyx_v_rbufbc = ((npy_float32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
22806 
22807         /* "tables/indexesextension.pyx":1329
22808  *           # Get the bounds row from the LRU cache or read them.
22809  *           rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22810  *           bread = 1             # <<<<<<<<<<<<<<
22811  *           nchunk = bisect_left_f(rbufbc, item1, nbounds, 0)
22812  *           # Get the sorted row from the LRU cache or read it.
22813  */
22814         __pyx_v_bread = 1;
22815 
22816         /* "tables/indexesextension.pyx":1330
22817  *           rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22818  *           bread = 1
22819  *           nchunk = bisect_left_f(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
22820  *           # Get the sorted row from the LRU cache or read it.
22821  *           rbuflb = <npy_float32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
22822  */
22823         __pyx_v_nchunk = bisect_left_f(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
22824 
22825         /* "tables/indexesextension.pyx":1332
22826  *           nchunk = bisect_left_f(rbufbc, item1, nbounds, 0)
22827  *           # Get the sorted row from the LRU cache or read it.
22828  *           rbuflb = <npy_float32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
22829  *           start = bisect_left_f(rbuflb, item1, cs, 0) + cs*nchunk
22830  *         else:
22831  */
22832         __pyx_v_rbuflb = ((npy_float32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
22833 
22834         /* "tables/indexesextension.pyx":1333
22835  *           # Get the sorted row from the LRU cache or read it.
22836  *           rbuflb = <npy_float32 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
22837  *           start = bisect_left_f(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
22838  *         else:
22839  *           start = ss
22840  */
22841         __pyx_v_start = (bisect_left_f(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
22842 
22843         /* "tables/indexesextension.pyx":1326
22844  *       # Look if item1 is in this row
22845  *       if item1 > rbufrv[rvrow]:
22846  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
22847  *           # Get the bounds row from the LRU cache or read them.
22848  *           rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22849  */
22850         goto __pyx_L6;
22851       }
22852 
22853       /* "tables/indexesextension.pyx":1335
22854  *           start = bisect_left_f(rbuflb, item1, cs, 0) + cs*nchunk
22855  *         else:
22856  *           start = ss             # <<<<<<<<<<<<<<
22857  *       else:
22858  *         start = 0
22859  */
22860       /*else*/ {
22861         __pyx_v_start = __pyx_v_ss;
22862       }
22863       __pyx_L6:;
22864 
22865       /* "tables/indexesextension.pyx":1325
22866  *       nchunk = -1
22867  *       # Look if item1 is in this row
22868  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
22869  *         if item1 <= rbufrv[rvrow+1]:
22870  *           # Get the bounds row from the LRU cache or read them.
22871  */
22872       goto __pyx_L5;
22873     }
22874 
22875     /* "tables/indexesextension.pyx":1337
22876  *           start = ss
22877  *       else:
22878  *         start = 0             # <<<<<<<<<<<<<<
22879  *       # Now, for item2
22880  *       if item2 >= rbufrv[rvrow]:
22881  */
22882     /*else*/ {
22883       __pyx_v_start = 0;
22884     }
22885     __pyx_L5:;
22886 
22887     /* "tables/indexesextension.pyx":1339
22888  *         start = 0
22889  *       # Now, for item2
22890  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
22891  *         if item2 < rbufrv[rvrow+1]:
22892  *           if not bread:
22893  */
22894     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
22895     if (__pyx_t_3) {
22896 
22897       /* "tables/indexesextension.pyx":1340
22898  *       # Now, for item2
22899  *       if item2 >= rbufrv[rvrow]:
22900  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
22901  *           if not bread:
22902  *             # Get the bounds row from the LRU cache or read them.
22903  */
22904       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
22905       if (__pyx_t_3) {
22906 
22907         /* "tables/indexesextension.pyx":1341
22908  *       if item2 >= rbufrv[rvrow]:
22909  *         if item2 < rbufrv[rvrow+1]:
22910  *           if not bread:             # <<<<<<<<<<<<<<
22911  *             # Get the bounds row from the LRU cache or read them.
22912  *             rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22913  */
22914         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
22915         if (__pyx_t_3) {
22916 
22917           /* "tables/indexesextension.pyx":1343
22918  *           if not bread:
22919  *             # Get the bounds row from the LRU cache or read them.
22920  *             rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
22921  *           nchunk2 = bisect_right_f(rbufbc, item2, nbounds, 0)
22922  *           if nchunk2 <> nchunk:
22923  */
22924           __pyx_v_rbufbc = ((npy_float32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
22925 
22926           /* "tables/indexesextension.pyx":1341
22927  *       if item2 >= rbufrv[rvrow]:
22928  *         if item2 < rbufrv[rvrow+1]:
22929  *           if not bread:             # <<<<<<<<<<<<<<
22930  *             # Get the bounds row from the LRU cache or read them.
22931  *             rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22932  */
22933         }
22934 
22935         /* "tables/indexesextension.pyx":1344
22936  *             # Get the bounds row from the LRU cache or read them.
22937  *             rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22938  *           nchunk2 = bisect_right_f(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
22939  *           if nchunk2 <> nchunk:
22940  *             # Get the sorted row from the LRU cache or read it.
22941  */
22942         __pyx_v_nchunk2 = bisect_right_f(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
22943 
22944         /* "tables/indexesextension.pyx":1345
22945  *             rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22946  *           nchunk2 = bisect_right_f(rbufbc, item2, nbounds, 0)
22947  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
22948  *             # Get the sorted row from the LRU cache or read it.
22949  *             rbuflb = <npy_float32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
22950  */
22951         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
22952         if (__pyx_t_3) {
22953 
22954           /* "tables/indexesextension.pyx":1347
22955  *           if nchunk2 <> nchunk:
22956  *             # Get the sorted row from the LRU cache or read it.
22957  *             rbuflb = <npy_float32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
22958  *           stop = bisect_right_f(rbuflb, item2, cs, 0) + cs*nchunk2
22959  *         else:
22960  */
22961           __pyx_v_rbuflb = ((npy_float32 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
22962 
22963           /* "tables/indexesextension.pyx":1345
22964  *             rbufbc = <npy_float32 *>self.get_lru_bounds(nrow, nbounds)
22965  *           nchunk2 = bisect_right_f(rbufbc, item2, nbounds, 0)
22966  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
22967  *             # Get the sorted row from the LRU cache or read it.
22968  *             rbuflb = <npy_float32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
22969  */
22970         }
22971 
22972         /* "tables/indexesextension.pyx":1348
22973  *             # Get the sorted row from the LRU cache or read it.
22974  *             rbuflb = <npy_float32 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
22975  *           stop = bisect_right_f(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
22976  *         else:
22977  *           stop = ss
22978  */
22979         __pyx_v_stop = (bisect_right_f(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
22980 
22981         /* "tables/indexesextension.pyx":1340
22982  *       # Now, for item2
22983  *       if item2 >= rbufrv[rvrow]:
22984  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
22985  *           if not bread:
22986  *             # Get the bounds row from the LRU cache or read them.
22987  */
22988         goto __pyx_L8;
22989       }
22990 
22991       /* "tables/indexesextension.pyx":1350
22992  *           stop = bisect_right_f(rbuflb, item2, cs, 0) + cs*nchunk2
22993  *         else:
22994  *           stop = ss             # <<<<<<<<<<<<<<
22995  *       else:
22996  *         stop = 0
22997  */
22998       /*else*/ {
22999         __pyx_v_stop = __pyx_v_ss;
23000       }
23001       __pyx_L8:;
23002 
23003       /* "tables/indexesextension.pyx":1339
23004  *         start = 0
23005  *       # Now, for item2
23006  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
23007  *         if item2 < rbufrv[rvrow+1]:
23008  *           if not bread:
23009  */
23010       goto __pyx_L7;
23011     }
23012 
23013     /* "tables/indexesextension.pyx":1352
23014  *           stop = ss
23015  *       else:
23016  *         stop = 0             # <<<<<<<<<<<<<<
23017  *       length = stop - start
23018  *       tlength = tlength + length
23019  */
23020     /*else*/ {
23021       __pyx_v_stop = 0;
23022     }
23023     __pyx_L7:;
23024 
23025     /* "tables/indexesextension.pyx":1353
23026  *       else:
23027  *         stop = 0
23028  *       length = stop - start             # <<<<<<<<<<<<<<
23029  *       tlength = tlength + length
23030  *       rbufst[nrow] = start
23031  */
23032     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
23033 
23034     /* "tables/indexesextension.pyx":1354
23035  *         stop = 0
23036  *       length = stop - start
23037  *       tlength = tlength + length             # <<<<<<<<<<<<<<
23038  *       rbufst[nrow] = start
23039  *       rbufln[nrow] = length
23040  */
23041     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
23042 
23043     /* "tables/indexesextension.pyx":1355
23044  *       length = stop - start
23045  *       tlength = tlength + length
23046  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
23047  *       rbufln[nrow] = length
23048  *     return tlength
23049  */
23050     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
23051 
23052     /* "tables/indexesextension.pyx":1356
23053  *       tlength = tlength + length
23054  *       rbufst[nrow] = start
23055  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
23056  *     return tlength
23057  *
23058  */
23059     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
23060   }
23061 
23062   /* "tables/indexesextension.pyx":1357
23063  *       rbufst[nrow] = start
23064  *       rbufln[nrow] = length
23065  *     return tlength             # <<<<<<<<<<<<<<
23066  *
23067  *
23068  */
23069   __Pyx_XDECREF(__pyx_r);
23070   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
23071   __Pyx_GOTREF(__pyx_t_2);
23072   __pyx_r = __pyx_t_2;
23073   __pyx_t_2 = 0;
23074   goto __pyx_L0;
23075 
23076   /* "tables/indexesextension.pyx":1299
23077  *
23078  *   # Optimized version for float32
23079  *   def _search_bin_na_f(self, npy_float64 item1, npy_float64 item2):             # <<<<<<<<<<<<<<
23080  *     cdef int cs, ss, ncs, nrow, nrows, nrow2, nbounds, rvrow
23081  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
23082  */
23083 
23084   /* function exit code */
23085   __pyx_L1_error:;
23086   __Pyx_XDECREF(__pyx_t_2);
23087   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
23088   __pyx_r = NULL;
23089   __pyx_L0:;
23090   __Pyx_XGIVEREF(__pyx_r);
23091   __Pyx_RefNannyFinishContext();
23092   return __pyx_r;
23093 }
23094 
23095 /* "tables/indexesextension.pyx":1361
23096  *
23097  *   # Optimized version for float64
23098  *   def _search_bin_na_d(self, npy_float64 item1, npy_float64 item2):             # <<<<<<<<<<<<<<
23099  *     cdef int cs, ss, ncs, nrow, nrows, nrow2, nbounds, rvrow
23100  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
23101  */
23102 
23103 /* Python wrapper */
23104 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_27_search_bin_na_d(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_27_search_bin_na_d(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)23105 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_27_search_bin_na_d(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23106   npy_float64 __pyx_v_item1;
23107   npy_float64 __pyx_v_item2;
23108   PyObject *__pyx_r = 0;
23109   __Pyx_RefNannyDeclarations
23110   __Pyx_RefNannySetupContext("_search_bin_na_d (wrapper)", 0);
23111   {
23112     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
23113     PyObject* values[2] = {0,0};
23114     if (unlikely(__pyx_kwds)) {
23115       Py_ssize_t kw_args;
23116       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23117       switch (pos_args) {
23118         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23119         CYTHON_FALLTHROUGH;
23120         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23121         CYTHON_FALLTHROUGH;
23122         case  0: break;
23123         default: goto __pyx_L5_argtuple_error;
23124       }
23125       kw_args = PyDict_Size(__pyx_kwds);
23126       switch (pos_args) {
23127         case  0:
23128         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
23129         else goto __pyx_L5_argtuple_error;
23130         CYTHON_FALLTHROUGH;
23131         case  1:
23132         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
23133         else {
23134           __Pyx_RaiseArgtupleInvalid("_search_bin_na_d", 1, 2, 2, 1); __PYX_ERR(0, 1361, __pyx_L3_error)
23135         }
23136       }
23137       if (unlikely(kw_args > 0)) {
23138         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_d") < 0)) __PYX_ERR(0, 1361, __pyx_L3_error)
23139       }
23140     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
23141       goto __pyx_L5_argtuple_error;
23142     } else {
23143       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23144       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23145     }
23146     __pyx_v_item1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_item1 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1361, __pyx_L3_error)
23147     __pyx_v_item2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_item2 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1361, __pyx_L3_error)
23148   }
23149   goto __pyx_L4_argument_unpacking_done;
23150   __pyx_L5_argtuple_error:;
23151   __Pyx_RaiseArgtupleInvalid("_search_bin_na_d", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1361, __pyx_L3_error)
23152   __pyx_L3_error:;
23153   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_d", __pyx_clineno, __pyx_lineno, __pyx_filename);
23154   __Pyx_RefNannyFinishContext();
23155   return NULL;
23156   __pyx_L4_argument_unpacking_done:;
23157   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_26_search_bin_na_d(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
23158 
23159   /* function exit code */
23160   __Pyx_RefNannyFinishContext();
23161   return __pyx_r;
23162 }
23163 
__pyx_pf_6tables_16indexesextension_10IndexArray_26_search_bin_na_d(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,npy_float64 __pyx_v_item1,npy_float64 __pyx_v_item2)23164 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_26_search_bin_na_d(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_float64 __pyx_v_item1, npy_float64 __pyx_v_item2) {
23165   int __pyx_v_cs;
23166   int __pyx_v_ss;
23167   int __pyx_v_ncs;
23168   int __pyx_v_nrow;
23169   int __pyx_v_nrows;
23170   int __pyx_v_nbounds;
23171   int __pyx_v_rvrow;
23172   int __pyx_v_start;
23173   int __pyx_v_stop;
23174   int __pyx_v_tlength;
23175   int __pyx_v_length;
23176   int __pyx_v_bread;
23177   int __pyx_v_nchunk;
23178   int __pyx_v_nchunk2;
23179   int *__pyx_v_rbufst;
23180   int *__pyx_v_rbufln;
23181   npy_float64 *__pyx_v_rbufrv;
23182   npy_float64 *__pyx_v_rbufbc;
23183   npy_float64 *__pyx_v_rbuflb;
23184   PyObject *__pyx_r = NULL;
23185   __Pyx_RefNannyDeclarations
23186   int __pyx_t_1;
23187   PyObject *__pyx_t_2 = NULL;
23188   int __pyx_t_3;
23189   __Pyx_RefNannySetupContext("_search_bin_na_d", 0);
23190 
23191   /* "tables/indexesextension.pyx":1369
23192  *     # Variables with specific type
23193  *     cdef npy_float64 *rbufrv
23194  *     cdef npy_float64 *rbufbc = NULL             # <<<<<<<<<<<<<<
23195  *     cdef npy_float64 *rbuflb = NULL
23196  *
23197  */
23198   __pyx_v_rbufbc = NULL;
23199 
23200   /* "tables/indexesextension.pyx":1370
23201  *     cdef npy_float64 *rbufrv
23202  *     cdef npy_float64 *rbufbc = NULL
23203  *     cdef npy_float64 *rbuflb = NULL             # <<<<<<<<<<<<<<
23204  *
23205  *     cs = self.l_chunksize
23206  */
23207   __pyx_v_rbuflb = NULL;
23208 
23209   /* "tables/indexesextension.pyx":1372
23210  *     cdef npy_float64 *rbuflb = NULL
23211  *
23212  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
23213  *     ss = self.l_slicesize
23214  *     ncs = ss / cs
23215  */
23216   __pyx_t_1 = __pyx_v_self->l_chunksize;
23217   __pyx_v_cs = __pyx_t_1;
23218 
23219   /* "tables/indexesextension.pyx":1373
23220  *
23221  *     cs = self.l_chunksize
23222  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
23223  *     ncs = ss / cs
23224  *     nbounds = self.nbounds
23225  */
23226   __pyx_t_1 = __pyx_v_self->l_slicesize;
23227   __pyx_v_ss = __pyx_t_1;
23228 
23229   /* "tables/indexesextension.pyx":1374
23230  *     cs = self.l_chunksize
23231  *     ss = self.l_slicesize
23232  *     ncs = ss / cs             # <<<<<<<<<<<<<<
23233  *     nbounds = self.nbounds
23234  *     nrows = self.nrows
23235  */
23236   if (unlikely(__pyx_v_cs == 0)) {
23237     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
23238     __PYX_ERR(0, 1374, __pyx_L1_error)
23239   }
23240   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
23241     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
23242     __PYX_ERR(0, 1374, __pyx_L1_error)
23243   }
23244   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
23245 
23246   /* "tables/indexesextension.pyx":1375
23247  *     ss = self.l_slicesize
23248  *     ncs = ss / cs
23249  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
23250  *     nrows = self.nrows
23251  *     tlength = 0
23252  */
23253   __pyx_t_1 = __pyx_v_self->nbounds;
23254   __pyx_v_nbounds = __pyx_t_1;
23255 
23256   /* "tables/indexesextension.pyx":1376
23257  *     ncs = ss / cs
23258  *     nbounds = self.nbounds
23259  *     nrows = self.nrows             # <<<<<<<<<<<<<<
23260  *     tlength = 0
23261  *     rbufst = <int *>self.rbufst
23262  */
23263   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
23264   __Pyx_GOTREF(__pyx_t_2);
23265   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L1_error)
23266   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23267   __pyx_v_nrows = __pyx_t_1;
23268 
23269   /* "tables/indexesextension.pyx":1377
23270  *     nbounds = self.nbounds
23271  *     nrows = self.nrows
23272  *     tlength = 0             # <<<<<<<<<<<<<<
23273  *     rbufst = <int *>self.rbufst
23274  *     rbufln = <int *>self.rbufln
23275  */
23276   __pyx_v_tlength = 0;
23277 
23278   /* "tables/indexesextension.pyx":1378
23279  *     nrows = self.nrows
23280  *     tlength = 0
23281  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
23282  *     rbufln = <int *>self.rbufln
23283  *
23284  */
23285   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
23286 
23287   /* "tables/indexesextension.pyx":1379
23288  *     tlength = 0
23289  *     rbufst = <int *>self.rbufst
23290  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
23291  *
23292  *     # Limits not in cache, do a lookup
23293  */
23294   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
23295 
23296   /* "tables/indexesextension.pyx":1382
23297  *
23298  *     # Limits not in cache, do a lookup
23299  *     rbufrv = <npy_float64 *>self.rbufrv             # <<<<<<<<<<<<<<
23300  *     for nrow from 0 <= nrow < nrows:
23301  *       rvrow = nrow*2
23302  */
23303   __pyx_v_rbufrv = ((npy_float64 *)__pyx_v_self->rbufrv);
23304 
23305   /* "tables/indexesextension.pyx":1383
23306  *     # Limits not in cache, do a lookup
23307  *     rbufrv = <npy_float64 *>self.rbufrv
23308  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
23309  *       rvrow = nrow*2
23310  *       bread = 0
23311  */
23312   __pyx_t_1 = __pyx_v_nrows;
23313   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
23314 
23315     /* "tables/indexesextension.pyx":1384
23316  *     rbufrv = <npy_float64 *>self.rbufrv
23317  *     for nrow from 0 <= nrow < nrows:
23318  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
23319  *       bread = 0
23320  *       nchunk = -1
23321  */
23322     __pyx_v_rvrow = (__pyx_v_nrow * 2);
23323 
23324     /* "tables/indexesextension.pyx":1385
23325  *     for nrow from 0 <= nrow < nrows:
23326  *       rvrow = nrow*2
23327  *       bread = 0             # <<<<<<<<<<<<<<
23328  *       nchunk = -1
23329  *
23330  */
23331     __pyx_v_bread = 0;
23332 
23333     /* "tables/indexesextension.pyx":1386
23334  *       rvrow = nrow*2
23335  *       bread = 0
23336  *       nchunk = -1             # <<<<<<<<<<<<<<
23337  *
23338  *       # Look if item1 is in this row
23339  */
23340     __pyx_v_nchunk = -1;
23341 
23342     /* "tables/indexesextension.pyx":1389
23343  *
23344  *       # Look if item1 is in this row
23345  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
23346  *         if item1 <= rbufrv[rvrow+1]:
23347  *           # Get the bounds row from the LRU cache or read them.
23348  */
23349     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
23350     if (__pyx_t_3) {
23351 
23352       /* "tables/indexesextension.pyx":1390
23353  *       # Look if item1 is in this row
23354  *       if item1 > rbufrv[rvrow]:
23355  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
23356  *           # Get the bounds row from the LRU cache or read them.
23357  *           rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23358  */
23359       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
23360       if (__pyx_t_3) {
23361 
23362         /* "tables/indexesextension.pyx":1392
23363  *         if item1 <= rbufrv[rvrow+1]:
23364  *           # Get the bounds row from the LRU cache or read them.
23365  *           rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
23366  *           bread = 1
23367  *           nchunk = bisect_left_d(rbufbc, item1, nbounds, 0)
23368  */
23369         __pyx_v_rbufbc = ((npy_float64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
23370 
23371         /* "tables/indexesextension.pyx":1393
23372  *           # Get the bounds row from the LRU cache or read them.
23373  *           rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23374  *           bread = 1             # <<<<<<<<<<<<<<
23375  *           nchunk = bisect_left_d(rbufbc, item1, nbounds, 0)
23376  *           # Get the sorted row from the LRU cache or read it.
23377  */
23378         __pyx_v_bread = 1;
23379 
23380         /* "tables/indexesextension.pyx":1394
23381  *           rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23382  *           bread = 1
23383  *           nchunk = bisect_left_d(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
23384  *           # Get the sorted row from the LRU cache or read it.
23385  *           rbuflb = <npy_float64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
23386  */
23387         __pyx_v_nchunk = bisect_left_d(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
23388 
23389         /* "tables/indexesextension.pyx":1396
23390  *           nchunk = bisect_left_d(rbufbc, item1, nbounds, 0)
23391  *           # Get the sorted row from the LRU cache or read it.
23392  *           rbuflb = <npy_float64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
23393  *           start = bisect_left_d(rbuflb, item1, cs, 0) + cs*nchunk
23394  *         else:
23395  */
23396         __pyx_v_rbuflb = ((npy_float64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
23397 
23398         /* "tables/indexesextension.pyx":1397
23399  *           # Get the sorted row from the LRU cache or read it.
23400  *           rbuflb = <npy_float64 *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
23401  *           start = bisect_left_d(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
23402  *         else:
23403  *           start = ss
23404  */
23405         __pyx_v_start = (bisect_left_d(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
23406 
23407         /* "tables/indexesextension.pyx":1390
23408  *       # Look if item1 is in this row
23409  *       if item1 > rbufrv[rvrow]:
23410  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
23411  *           # Get the bounds row from the LRU cache or read them.
23412  *           rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23413  */
23414         goto __pyx_L6;
23415       }
23416 
23417       /* "tables/indexesextension.pyx":1399
23418  *           start = bisect_left_d(rbuflb, item1, cs, 0) + cs*nchunk
23419  *         else:
23420  *           start = ss             # <<<<<<<<<<<<<<
23421  *       else:
23422  *         start = 0
23423  */
23424       /*else*/ {
23425         __pyx_v_start = __pyx_v_ss;
23426       }
23427       __pyx_L6:;
23428 
23429       /* "tables/indexesextension.pyx":1389
23430  *
23431  *       # Look if item1 is in this row
23432  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
23433  *         if item1 <= rbufrv[rvrow+1]:
23434  *           # Get the bounds row from the LRU cache or read them.
23435  */
23436       goto __pyx_L5;
23437     }
23438 
23439     /* "tables/indexesextension.pyx":1401
23440  *           start = ss
23441  *       else:
23442  *         start = 0             # <<<<<<<<<<<<<<
23443  *       # Now, for item2
23444  *       if item2 >= rbufrv[rvrow]:
23445  */
23446     /*else*/ {
23447       __pyx_v_start = 0;
23448     }
23449     __pyx_L5:;
23450 
23451     /* "tables/indexesextension.pyx":1403
23452  *         start = 0
23453  *       # Now, for item2
23454  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
23455  *         if item2 < rbufrv[rvrow+1]:
23456  *           if not bread:
23457  */
23458     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
23459     if (__pyx_t_3) {
23460 
23461       /* "tables/indexesextension.pyx":1404
23462  *       # Now, for item2
23463  *       if item2 >= rbufrv[rvrow]:
23464  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
23465  *           if not bread:
23466  *             # Get the bounds row from the LRU cache or read them.
23467  */
23468       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
23469       if (__pyx_t_3) {
23470 
23471         /* "tables/indexesextension.pyx":1405
23472  *       if item2 >= rbufrv[rvrow]:
23473  *         if item2 < rbufrv[rvrow+1]:
23474  *           if not bread:             # <<<<<<<<<<<<<<
23475  *             # Get the bounds row from the LRU cache or read them.
23476  *             rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23477  */
23478         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
23479         if (__pyx_t_3) {
23480 
23481           /* "tables/indexesextension.pyx":1407
23482  *           if not bread:
23483  *             # Get the bounds row from the LRU cache or read them.
23484  *             rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
23485  *           nchunk2 = bisect_right_d(rbufbc, item2, nbounds, 0)
23486  *           if nchunk2 <> nchunk:
23487  */
23488           __pyx_v_rbufbc = ((npy_float64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
23489 
23490           /* "tables/indexesextension.pyx":1405
23491  *       if item2 >= rbufrv[rvrow]:
23492  *         if item2 < rbufrv[rvrow+1]:
23493  *           if not bread:             # <<<<<<<<<<<<<<
23494  *             # Get the bounds row from the LRU cache or read them.
23495  *             rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23496  */
23497         }
23498 
23499         /* "tables/indexesextension.pyx":1408
23500  *             # Get the bounds row from the LRU cache or read them.
23501  *             rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23502  *           nchunk2 = bisect_right_d(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
23503  *           if nchunk2 <> nchunk:
23504  *             # Get the sorted row from the LRU cache or read it.
23505  */
23506         __pyx_v_nchunk2 = bisect_right_d(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
23507 
23508         /* "tables/indexesextension.pyx":1409
23509  *             rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23510  *           nchunk2 = bisect_right_d(rbufbc, item2, nbounds, 0)
23511  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
23512  *             # Get the sorted row from the LRU cache or read it.
23513  *             rbuflb = <npy_float64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
23514  */
23515         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
23516         if (__pyx_t_3) {
23517 
23518           /* "tables/indexesextension.pyx":1411
23519  *           if nchunk2 <> nchunk:
23520  *             # Get the sorted row from the LRU cache or read it.
23521  *             rbuflb = <npy_float64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
23522  *           stop = bisect_right_d(rbuflb, item2, cs, 0) + cs*nchunk2
23523  *         else:
23524  */
23525           __pyx_v_rbuflb = ((npy_float64 *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
23526 
23527           /* "tables/indexesextension.pyx":1409
23528  *             rbufbc = <npy_float64 *>self.get_lru_bounds(nrow, nbounds)
23529  *           nchunk2 = bisect_right_d(rbufbc, item2, nbounds, 0)
23530  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
23531  *             # Get the sorted row from the LRU cache or read it.
23532  *             rbuflb = <npy_float64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
23533  */
23534         }
23535 
23536         /* "tables/indexesextension.pyx":1412
23537  *             # Get the sorted row from the LRU cache or read it.
23538  *             rbuflb = <npy_float64 *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
23539  *           stop = bisect_right_d(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
23540  *         else:
23541  *           stop = ss
23542  */
23543         __pyx_v_stop = (bisect_right_d(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
23544 
23545         /* "tables/indexesextension.pyx":1404
23546  *       # Now, for item2
23547  *       if item2 >= rbufrv[rvrow]:
23548  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
23549  *           if not bread:
23550  *             # Get the bounds row from the LRU cache or read them.
23551  */
23552         goto __pyx_L8;
23553       }
23554 
23555       /* "tables/indexesextension.pyx":1414
23556  *           stop = bisect_right_d(rbuflb, item2, cs, 0) + cs*nchunk2
23557  *         else:
23558  *           stop = ss             # <<<<<<<<<<<<<<
23559  *       else:
23560  *         stop = 0
23561  */
23562       /*else*/ {
23563         __pyx_v_stop = __pyx_v_ss;
23564       }
23565       __pyx_L8:;
23566 
23567       /* "tables/indexesextension.pyx":1403
23568  *         start = 0
23569  *       # Now, for item2
23570  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
23571  *         if item2 < rbufrv[rvrow+1]:
23572  *           if not bread:
23573  */
23574       goto __pyx_L7;
23575     }
23576 
23577     /* "tables/indexesextension.pyx":1416
23578  *           stop = ss
23579  *       else:
23580  *         stop = 0             # <<<<<<<<<<<<<<
23581  *       length = stop - start
23582  *       tlength = tlength + length
23583  */
23584     /*else*/ {
23585       __pyx_v_stop = 0;
23586     }
23587     __pyx_L7:;
23588 
23589     /* "tables/indexesextension.pyx":1417
23590  *       else:
23591  *         stop = 0
23592  *       length = stop - start             # <<<<<<<<<<<<<<
23593  *       tlength = tlength + length
23594  *       rbufst[nrow] = start
23595  */
23596     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
23597 
23598     /* "tables/indexesextension.pyx":1418
23599  *         stop = 0
23600  *       length = stop - start
23601  *       tlength = tlength + length             # <<<<<<<<<<<<<<
23602  *       rbufst[nrow] = start
23603  *       rbufln[nrow] = length
23604  */
23605     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
23606 
23607     /* "tables/indexesextension.pyx":1419
23608  *       length = stop - start
23609  *       tlength = tlength + length
23610  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
23611  *       rbufln[nrow] = length
23612  *     return tlength
23613  */
23614     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
23615 
23616     /* "tables/indexesextension.pyx":1420
23617  *       tlength = tlength + length
23618  *       rbufst[nrow] = start
23619  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
23620  *     return tlength
23621  *
23622  */
23623     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
23624   }
23625 
23626   /* "tables/indexesextension.pyx":1421
23627  *       rbufst[nrow] = start
23628  *       rbufln[nrow] = length
23629  *     return tlength             # <<<<<<<<<<<<<<
23630  *
23631  *
23632  */
23633   __Pyx_XDECREF(__pyx_r);
23634   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error)
23635   __Pyx_GOTREF(__pyx_t_2);
23636   __pyx_r = __pyx_t_2;
23637   __pyx_t_2 = 0;
23638   goto __pyx_L0;
23639 
23640   /* "tables/indexesextension.pyx":1361
23641  *
23642  *   # Optimized version for float64
23643  *   def _search_bin_na_d(self, npy_float64 item1, npy_float64 item2):             # <<<<<<<<<<<<<<
23644  *     cdef int cs, ss, ncs, nrow, nrows, nrow2, nbounds, rvrow
23645  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
23646  */
23647 
23648   /* function exit code */
23649   __pyx_L1_error:;
23650   __Pyx_XDECREF(__pyx_t_2);
23651   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_d", __pyx_clineno, __pyx_lineno, __pyx_filename);
23652   __pyx_r = NULL;
23653   __pyx_L0:;
23654   __Pyx_XGIVEREF(__pyx_r);
23655   __Pyx_RefNannyFinishContext();
23656   return __pyx_r;
23657 }
23658 
23659 /* "tables/indexesextension.pyx":1425
23660  *
23661  *   # Optimized version for npy_longdouble/float96/float128
23662  *   def _search_bin_na_g(self, npy_longdouble item1, npy_longdouble item2):             # <<<<<<<<<<<<<<
23663  *     cdef int cs, ss, ncs, nrow, nrows, nrow2, nbounds, rvrow
23664  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
23665  */
23666 
23667 /* Python wrapper */
23668 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_29_search_bin_na_g(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_29_search_bin_na_g(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)23669 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_29_search_bin_na_g(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23670   npy_longdouble __pyx_v_item1;
23671   npy_longdouble __pyx_v_item2;
23672   PyObject *__pyx_r = 0;
23673   __Pyx_RefNannyDeclarations
23674   __Pyx_RefNannySetupContext("_search_bin_na_g (wrapper)", 0);
23675   {
23676     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item1,&__pyx_n_s_item2,0};
23677     PyObject* values[2] = {0,0};
23678     if (unlikely(__pyx_kwds)) {
23679       Py_ssize_t kw_args;
23680       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23681       switch (pos_args) {
23682         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23683         CYTHON_FALLTHROUGH;
23684         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23685         CYTHON_FALLTHROUGH;
23686         case  0: break;
23687         default: goto __pyx_L5_argtuple_error;
23688       }
23689       kw_args = PyDict_Size(__pyx_kwds);
23690       switch (pos_args) {
23691         case  0:
23692         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item1)) != 0)) kw_args--;
23693         else goto __pyx_L5_argtuple_error;
23694         CYTHON_FALLTHROUGH;
23695         case  1:
23696         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item2)) != 0)) kw_args--;
23697         else {
23698           __Pyx_RaiseArgtupleInvalid("_search_bin_na_g", 1, 2, 2, 1); __PYX_ERR(0, 1425, __pyx_L3_error)
23699         }
23700       }
23701       if (unlikely(kw_args > 0)) {
23702         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_search_bin_na_g") < 0)) __PYX_ERR(0, 1425, __pyx_L3_error)
23703       }
23704     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
23705       goto __pyx_L5_argtuple_error;
23706     } else {
23707       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23708       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23709     }
23710     __pyx_v_item1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_item1 == ((npy_longdouble)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1425, __pyx_L3_error)
23711     __pyx_v_item2 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_item2 == ((npy_longdouble)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1425, __pyx_L3_error)
23712   }
23713   goto __pyx_L4_argument_unpacking_done;
23714   __pyx_L5_argtuple_error:;
23715   __Pyx_RaiseArgtupleInvalid("_search_bin_na_g", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1425, __pyx_L3_error)
23716   __pyx_L3_error:;
23717   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_g", __pyx_clineno, __pyx_lineno, __pyx_filename);
23718   __Pyx_RefNannyFinishContext();
23719   return NULL;
23720   __pyx_L4_argument_unpacking_done:;
23721   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_28_search_bin_na_g(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), __pyx_v_item1, __pyx_v_item2);
23722 
23723   /* function exit code */
23724   __Pyx_RefNannyFinishContext();
23725   return __pyx_r;
23726 }
23727 
__pyx_pf_6tables_16indexesextension_10IndexArray_28_search_bin_na_g(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,npy_longdouble __pyx_v_item1,npy_longdouble __pyx_v_item2)23728 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_28_search_bin_na_g(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, npy_longdouble __pyx_v_item1, npy_longdouble __pyx_v_item2) {
23729   int __pyx_v_cs;
23730   int __pyx_v_ss;
23731   int __pyx_v_ncs;
23732   int __pyx_v_nrow;
23733   int __pyx_v_nrows;
23734   int __pyx_v_nbounds;
23735   int __pyx_v_rvrow;
23736   int __pyx_v_start;
23737   int __pyx_v_stop;
23738   int __pyx_v_tlength;
23739   int __pyx_v_length;
23740   int __pyx_v_bread;
23741   int __pyx_v_nchunk;
23742   int __pyx_v_nchunk2;
23743   int *__pyx_v_rbufst;
23744   int *__pyx_v_rbufln;
23745   npy_longdouble *__pyx_v_rbufrv;
23746   npy_longdouble *__pyx_v_rbufbc;
23747   npy_longdouble *__pyx_v_rbuflb;
23748   PyObject *__pyx_r = NULL;
23749   __Pyx_RefNannyDeclarations
23750   int __pyx_t_1;
23751   PyObject *__pyx_t_2 = NULL;
23752   int __pyx_t_3;
23753   __Pyx_RefNannySetupContext("_search_bin_na_g", 0);
23754 
23755   /* "tables/indexesextension.pyx":1433
23756  *     # Variables with specific type
23757  *     cdef npy_longdouble *rbufrv
23758  *     cdef npy_longdouble *rbufbc = NULL             # <<<<<<<<<<<<<<
23759  *     cdef npy_longdouble *rbuflb = NULL
23760  *
23761  */
23762   __pyx_v_rbufbc = NULL;
23763 
23764   /* "tables/indexesextension.pyx":1434
23765  *     cdef npy_longdouble *rbufrv
23766  *     cdef npy_longdouble *rbufbc = NULL
23767  *     cdef npy_longdouble *rbuflb = NULL             # <<<<<<<<<<<<<<
23768  *
23769  *     cs = self.l_chunksize
23770  */
23771   __pyx_v_rbuflb = NULL;
23772 
23773   /* "tables/indexesextension.pyx":1436
23774  *     cdef npy_longdouble *rbuflb = NULL
23775  *
23776  *     cs = self.l_chunksize             # <<<<<<<<<<<<<<
23777  *     ss = self.l_slicesize
23778  *     ncs = ss / cs
23779  */
23780   __pyx_t_1 = __pyx_v_self->l_chunksize;
23781   __pyx_v_cs = __pyx_t_1;
23782 
23783   /* "tables/indexesextension.pyx":1437
23784  *
23785  *     cs = self.l_chunksize
23786  *     ss = self.l_slicesize             # <<<<<<<<<<<<<<
23787  *     ncs = ss / cs
23788  *     nbounds = self.nbounds
23789  */
23790   __pyx_t_1 = __pyx_v_self->l_slicesize;
23791   __pyx_v_ss = __pyx_t_1;
23792 
23793   /* "tables/indexesextension.pyx":1438
23794  *     cs = self.l_chunksize
23795  *     ss = self.l_slicesize
23796  *     ncs = ss / cs             # <<<<<<<<<<<<<<
23797  *     nbounds = self.nbounds
23798  *     nrows = self.nrows
23799  */
23800   if (unlikely(__pyx_v_cs == 0)) {
23801     PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
23802     __PYX_ERR(0, 1438, __pyx_L1_error)
23803   }
23804   else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_cs == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_ss))) {
23805     PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
23806     __PYX_ERR(0, 1438, __pyx_L1_error)
23807   }
23808   __pyx_v_ncs = __Pyx_div_int(__pyx_v_ss, __pyx_v_cs);
23809 
23810   /* "tables/indexesextension.pyx":1439
23811  *     ss = self.l_slicesize
23812  *     ncs = ss / cs
23813  *     nbounds = self.nbounds             # <<<<<<<<<<<<<<
23814  *     nrows = self.nrows
23815  *     tlength = 0
23816  */
23817   __pyx_t_1 = __pyx_v_self->nbounds;
23818   __pyx_v_nbounds = __pyx_t_1;
23819 
23820   /* "tables/indexesextension.pyx":1440
23821  *     ncs = ss / cs
23822  *     nbounds = self.nbounds
23823  *     nrows = self.nrows             # <<<<<<<<<<<<<<
23824  *     tlength = 0
23825  *     rbufst = <int *>self.rbufst
23826  */
23827   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error)
23828   __Pyx_GOTREF(__pyx_t_2);
23829   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1440, __pyx_L1_error)
23830   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23831   __pyx_v_nrows = __pyx_t_1;
23832 
23833   /* "tables/indexesextension.pyx":1441
23834  *     nbounds = self.nbounds
23835  *     nrows = self.nrows
23836  *     tlength = 0             # <<<<<<<<<<<<<<
23837  *     rbufst = <int *>self.rbufst
23838  *     rbufln = <int *>self.rbufln
23839  */
23840   __pyx_v_tlength = 0;
23841 
23842   /* "tables/indexesextension.pyx":1442
23843  *     nrows = self.nrows
23844  *     tlength = 0
23845  *     rbufst = <int *>self.rbufst             # <<<<<<<<<<<<<<
23846  *     rbufln = <int *>self.rbufln
23847  *
23848  */
23849   __pyx_v_rbufst = ((int *)__pyx_v_self->rbufst);
23850 
23851   /* "tables/indexesextension.pyx":1443
23852  *     tlength = 0
23853  *     rbufst = <int *>self.rbufst
23854  *     rbufln = <int *>self.rbufln             # <<<<<<<<<<<<<<
23855  *
23856  *     # Limits not in cache, do a lookup
23857  */
23858   __pyx_v_rbufln = ((int *)__pyx_v_self->rbufln);
23859 
23860   /* "tables/indexesextension.pyx":1446
23861  *
23862  *     # Limits not in cache, do a lookup
23863  *     rbufrv = <npy_longdouble *>self.rbufrv             # <<<<<<<<<<<<<<
23864  *     for nrow from 0 <= nrow < nrows:
23865  *       rvrow = nrow*2
23866  */
23867   __pyx_v_rbufrv = ((npy_longdouble *)__pyx_v_self->rbufrv);
23868 
23869   /* "tables/indexesextension.pyx":1447
23870  *     # Limits not in cache, do a lookup
23871  *     rbufrv = <npy_longdouble *>self.rbufrv
23872  *     for nrow from 0 <= nrow < nrows:             # <<<<<<<<<<<<<<
23873  *       rvrow = nrow*2
23874  *       bread = 0
23875  */
23876   __pyx_t_1 = __pyx_v_nrows;
23877   for (__pyx_v_nrow = 0; __pyx_v_nrow < __pyx_t_1; __pyx_v_nrow++) {
23878 
23879     /* "tables/indexesextension.pyx":1448
23880  *     rbufrv = <npy_longdouble *>self.rbufrv
23881  *     for nrow from 0 <= nrow < nrows:
23882  *       rvrow = nrow*2             # <<<<<<<<<<<<<<
23883  *       bread = 0
23884  *       nchunk = -1
23885  */
23886     __pyx_v_rvrow = (__pyx_v_nrow * 2);
23887 
23888     /* "tables/indexesextension.pyx":1449
23889  *     for nrow from 0 <= nrow < nrows:
23890  *       rvrow = nrow*2
23891  *       bread = 0             # <<<<<<<<<<<<<<
23892  *       nchunk = -1
23893  *
23894  */
23895     __pyx_v_bread = 0;
23896 
23897     /* "tables/indexesextension.pyx":1450
23898  *       rvrow = nrow*2
23899  *       bread = 0
23900  *       nchunk = -1             # <<<<<<<<<<<<<<
23901  *
23902  *       # Look if item1 is in this row
23903  */
23904     __pyx_v_nchunk = -1;
23905 
23906     /* "tables/indexesextension.pyx":1453
23907  *
23908  *       # Look if item1 is in this row
23909  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
23910  *         if item1 <= rbufrv[rvrow+1]:
23911  *           # Get the bounds row from the LRU cache or read them.
23912  */
23913     __pyx_t_3 = ((__pyx_v_item1 > (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
23914     if (__pyx_t_3) {
23915 
23916       /* "tables/indexesextension.pyx":1454
23917  *       # Look if item1 is in this row
23918  *       if item1 > rbufrv[rvrow]:
23919  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
23920  *           # Get the bounds row from the LRU cache or read them.
23921  *           rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
23922  */
23923       __pyx_t_3 = ((__pyx_v_item1 <= (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
23924       if (__pyx_t_3) {
23925 
23926         /* "tables/indexesextension.pyx":1456
23927  *         if item1 <= rbufrv[rvrow+1]:
23928  *           # Get the bounds row from the LRU cache or read them.
23929  *           rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
23930  *           bread = 1
23931  *           nchunk = bisect_left_g(rbufbc, item1, nbounds, 0)
23932  */
23933         __pyx_v_rbufbc = ((npy_longdouble *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
23934 
23935         /* "tables/indexesextension.pyx":1457
23936  *           # Get the bounds row from the LRU cache or read them.
23937  *           rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
23938  *           bread = 1             # <<<<<<<<<<<<<<
23939  *           nchunk = bisect_left_g(rbufbc, item1, nbounds, 0)
23940  *           # Get the sorted row from the LRU cache or read it.
23941  */
23942         __pyx_v_bread = 1;
23943 
23944         /* "tables/indexesextension.pyx":1458
23945  *           rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
23946  *           bread = 1
23947  *           nchunk = bisect_left_g(rbufbc, item1, nbounds, 0)             # <<<<<<<<<<<<<<
23948  *           # Get the sorted row from the LRU cache or read it.
23949  *           rbuflb = <npy_longdouble *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
23950  */
23951         __pyx_v_nchunk = bisect_left_g(__pyx_v_rbufbc, __pyx_v_item1, __pyx_v_nbounds, 0);
23952 
23953         /* "tables/indexesextension.pyx":1460
23954  *           nchunk = bisect_left_g(rbufbc, item1, nbounds, 0)
23955  *           # Get the sorted row from the LRU cache or read it.
23956  *           rbuflb = <npy_longdouble *>self.get_lru_sorted(nrow, ncs, nchunk, cs)             # <<<<<<<<<<<<<<
23957  *           start = bisect_left_g(rbuflb, item1, cs, 0) + cs*nchunk
23958  *         else:
23959  */
23960         __pyx_v_rbuflb = ((npy_longdouble *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk, __pyx_v_cs));
23961 
23962         /* "tables/indexesextension.pyx":1461
23963  *           # Get the sorted row from the LRU cache or read it.
23964  *           rbuflb = <npy_longdouble *>self.get_lru_sorted(nrow, ncs, nchunk, cs)
23965  *           start = bisect_left_g(rbuflb, item1, cs, 0) + cs*nchunk             # <<<<<<<<<<<<<<
23966  *         else:
23967  *           start = ss
23968  */
23969         __pyx_v_start = (bisect_left_g(__pyx_v_rbuflb, __pyx_v_item1, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk));
23970 
23971         /* "tables/indexesextension.pyx":1454
23972  *       # Look if item1 is in this row
23973  *       if item1 > rbufrv[rvrow]:
23974  *         if item1 <= rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
23975  *           # Get the bounds row from the LRU cache or read them.
23976  *           rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
23977  */
23978         goto __pyx_L6;
23979       }
23980 
23981       /* "tables/indexesextension.pyx":1463
23982  *           start = bisect_left_g(rbuflb, item1, cs, 0) + cs*nchunk
23983  *         else:
23984  *           start = ss             # <<<<<<<<<<<<<<
23985  *       else:
23986  *         start = 0
23987  */
23988       /*else*/ {
23989         __pyx_v_start = __pyx_v_ss;
23990       }
23991       __pyx_L6:;
23992 
23993       /* "tables/indexesextension.pyx":1453
23994  *
23995  *       # Look if item1 is in this row
23996  *       if item1 > rbufrv[rvrow]:             # <<<<<<<<<<<<<<
23997  *         if item1 <= rbufrv[rvrow+1]:
23998  *           # Get the bounds row from the LRU cache or read them.
23999  */
24000       goto __pyx_L5;
24001     }
24002 
24003     /* "tables/indexesextension.pyx":1465
24004  *           start = ss
24005  *       else:
24006  *         start = 0             # <<<<<<<<<<<<<<
24007  *       # Now, for item2
24008  *       if item2 >= rbufrv[rvrow]:
24009  */
24010     /*else*/ {
24011       __pyx_v_start = 0;
24012     }
24013     __pyx_L5:;
24014 
24015     /* "tables/indexesextension.pyx":1467
24016  *         start = 0
24017  *       # Now, for item2
24018  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
24019  *         if item2 < rbufrv[rvrow+1]:
24020  *           if not bread:
24021  */
24022     __pyx_t_3 = ((__pyx_v_item2 >= (__pyx_v_rbufrv[__pyx_v_rvrow])) != 0);
24023     if (__pyx_t_3) {
24024 
24025       /* "tables/indexesextension.pyx":1468
24026  *       # Now, for item2
24027  *       if item2 >= rbufrv[rvrow]:
24028  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
24029  *           if not bread:
24030  *             # Get the bounds row from the LRU cache or read them.
24031  */
24032       __pyx_t_3 = ((__pyx_v_item2 < (__pyx_v_rbufrv[(__pyx_v_rvrow + 1)])) != 0);
24033       if (__pyx_t_3) {
24034 
24035         /* "tables/indexesextension.pyx":1469
24036  *       if item2 >= rbufrv[rvrow]:
24037  *         if item2 < rbufrv[rvrow+1]:
24038  *           if not bread:             # <<<<<<<<<<<<<<
24039  *             # Get the bounds row from the LRU cache or read them.
24040  *             rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
24041  */
24042         __pyx_t_3 = ((!(__pyx_v_bread != 0)) != 0);
24043         if (__pyx_t_3) {
24044 
24045           /* "tables/indexesextension.pyx":1471
24046  *           if not bread:
24047  *             # Get the bounds row from the LRU cache or read them.
24048  *             rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)             # <<<<<<<<<<<<<<
24049  *           nchunk2 = bisect_right_g(rbufbc, item2, nbounds, 0)
24050  *           if nchunk2 <> nchunk:
24051  */
24052           __pyx_v_rbufbc = ((npy_longdouble *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_bounds(__pyx_v_self, __pyx_v_nrow, __pyx_v_nbounds));
24053 
24054           /* "tables/indexesextension.pyx":1469
24055  *       if item2 >= rbufrv[rvrow]:
24056  *         if item2 < rbufrv[rvrow+1]:
24057  *           if not bread:             # <<<<<<<<<<<<<<
24058  *             # Get the bounds row from the LRU cache or read them.
24059  *             rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
24060  */
24061         }
24062 
24063         /* "tables/indexesextension.pyx":1472
24064  *             # Get the bounds row from the LRU cache or read them.
24065  *             rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
24066  *           nchunk2 = bisect_right_g(rbufbc, item2, nbounds, 0)             # <<<<<<<<<<<<<<
24067  *           if nchunk2 <> nchunk:
24068  *             # Get the sorted row from the LRU cache or read it.
24069  */
24070         __pyx_v_nchunk2 = bisect_right_g(__pyx_v_rbufbc, __pyx_v_item2, __pyx_v_nbounds, 0);
24071 
24072         /* "tables/indexesextension.pyx":1473
24073  *             rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
24074  *           nchunk2 = bisect_right_g(rbufbc, item2, nbounds, 0)
24075  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
24076  *             # Get the sorted row from the LRU cache or read it.
24077  *             rbuflb = <npy_longdouble *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
24078  */
24079         __pyx_t_3 = ((__pyx_v_nchunk2 != __pyx_v_nchunk) != 0);
24080         if (__pyx_t_3) {
24081 
24082           /* "tables/indexesextension.pyx":1475
24083  *           if nchunk2 <> nchunk:
24084  *             # Get the sorted row from the LRU cache or read it.
24085  *             rbuflb = <npy_longdouble *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)             # <<<<<<<<<<<<<<
24086  *           stop = bisect_right_g(rbuflb, item2, cs, 0) + cs*nchunk2
24087  *         else:
24088  */
24089           __pyx_v_rbuflb = ((npy_longdouble *)((struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_lru_sorted(__pyx_v_self, __pyx_v_nrow, __pyx_v_ncs, __pyx_v_nchunk2, __pyx_v_cs));
24090 
24091           /* "tables/indexesextension.pyx":1473
24092  *             rbufbc = <npy_longdouble *>self.get_lru_bounds(nrow, nbounds)
24093  *           nchunk2 = bisect_right_g(rbufbc, item2, nbounds, 0)
24094  *           if nchunk2 <> nchunk:             # <<<<<<<<<<<<<<
24095  *             # Get the sorted row from the LRU cache or read it.
24096  *             rbuflb = <npy_longdouble *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
24097  */
24098         }
24099 
24100         /* "tables/indexesextension.pyx":1476
24101  *             # Get the sorted row from the LRU cache or read it.
24102  *             rbuflb = <npy_longdouble *>self.get_lru_sorted(nrow, ncs, nchunk2, cs)
24103  *           stop = bisect_right_g(rbuflb, item2, cs, 0) + cs*nchunk2             # <<<<<<<<<<<<<<
24104  *         else:
24105  *           stop = ss
24106  */
24107         __pyx_v_stop = (bisect_right_g(__pyx_v_rbuflb, __pyx_v_item2, __pyx_v_cs, 0) + (__pyx_v_cs * __pyx_v_nchunk2));
24108 
24109         /* "tables/indexesextension.pyx":1468
24110  *       # Now, for item2
24111  *       if item2 >= rbufrv[rvrow]:
24112  *         if item2 < rbufrv[rvrow+1]:             # <<<<<<<<<<<<<<
24113  *           if not bread:
24114  *             # Get the bounds row from the LRU cache or read them.
24115  */
24116         goto __pyx_L8;
24117       }
24118 
24119       /* "tables/indexesextension.pyx":1478
24120  *           stop = bisect_right_g(rbuflb, item2, cs, 0) + cs*nchunk2
24121  *         else:
24122  *           stop = ss             # <<<<<<<<<<<<<<
24123  *       else:
24124  *         stop = 0
24125  */
24126       /*else*/ {
24127         __pyx_v_stop = __pyx_v_ss;
24128       }
24129       __pyx_L8:;
24130 
24131       /* "tables/indexesextension.pyx":1467
24132  *         start = 0
24133  *       # Now, for item2
24134  *       if item2 >= rbufrv[rvrow]:             # <<<<<<<<<<<<<<
24135  *         if item2 < rbufrv[rvrow+1]:
24136  *           if not bread:
24137  */
24138       goto __pyx_L7;
24139     }
24140 
24141     /* "tables/indexesextension.pyx":1480
24142  *           stop = ss
24143  *       else:
24144  *         stop = 0             # <<<<<<<<<<<<<<
24145  *       length = stop - start
24146  *       tlength = tlength + length
24147  */
24148     /*else*/ {
24149       __pyx_v_stop = 0;
24150     }
24151     __pyx_L7:;
24152 
24153     /* "tables/indexesextension.pyx":1481
24154  *       else:
24155  *         stop = 0
24156  *       length = stop - start             # <<<<<<<<<<<<<<
24157  *       tlength = tlength + length
24158  *       rbufst[nrow] = start
24159  */
24160     __pyx_v_length = (__pyx_v_stop - __pyx_v_start);
24161 
24162     /* "tables/indexesextension.pyx":1482
24163  *         stop = 0
24164  *       length = stop - start
24165  *       tlength = tlength + length             # <<<<<<<<<<<<<<
24166  *       rbufst[nrow] = start
24167  *       rbufln[nrow] = length
24168  */
24169     __pyx_v_tlength = (__pyx_v_tlength + __pyx_v_length);
24170 
24171     /* "tables/indexesextension.pyx":1483
24172  *       length = stop - start
24173  *       tlength = tlength + length
24174  *       rbufst[nrow] = start             # <<<<<<<<<<<<<<
24175  *       rbufln[nrow] = length
24176  *     return tlength
24177  */
24178     (__pyx_v_rbufst[__pyx_v_nrow]) = __pyx_v_start;
24179 
24180     /* "tables/indexesextension.pyx":1484
24181  *       tlength = tlength + length
24182  *       rbufst[nrow] = start
24183  *       rbufln[nrow] = length             # <<<<<<<<<<<<<<
24184  *     return tlength
24185  *
24186  */
24187     (__pyx_v_rbufln[__pyx_v_nrow]) = __pyx_v_length;
24188   }
24189 
24190   /* "tables/indexesextension.pyx":1485
24191  *       rbufst[nrow] = start
24192  *       rbufln[nrow] = length
24193  *     return tlength             # <<<<<<<<<<<<<<
24194  *
24195  *
24196  */
24197   __Pyx_XDECREF(__pyx_r);
24198   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_tlength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
24199   __Pyx_GOTREF(__pyx_t_2);
24200   __pyx_r = __pyx_t_2;
24201   __pyx_t_2 = 0;
24202   goto __pyx_L0;
24203 
24204   /* "tables/indexesextension.pyx":1425
24205  *
24206  *   # Optimized version for npy_longdouble/float96/float128
24207  *   def _search_bin_na_g(self, npy_longdouble item1, npy_longdouble item2):             # <<<<<<<<<<<<<<
24208  *     cdef int cs, ss, ncs, nrow, nrows, nrow2, nbounds, rvrow
24209  *     cdef int start, stop, tlength, length, bread, nchunk, nchunk2
24210  */
24211 
24212   /* function exit code */
24213   __pyx_L1_error:;
24214   __Pyx_XDECREF(__pyx_t_2);
24215   __Pyx_AddTraceback("tables.indexesextension.IndexArray._search_bin_na_g", __pyx_clineno, __pyx_lineno, __pyx_filename);
24216   __pyx_r = NULL;
24217   __pyx_L0:;
24218   __Pyx_XGIVEREF(__pyx_r);
24219   __Pyx_RefNannyFinishContext();
24220   return __pyx_r;
24221 }
24222 
24223 /* "tables/indexesextension.pyx":1488
24224  *
24225  *
24226  *   def _g_close(self):             # <<<<<<<<<<<<<<
24227  *     super(Array, self)._g_close()
24228  *     # Release specific resources of this class
24229  */
24230 
24231 /* Python wrapper */
24232 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_31_g_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_31_g_close(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)24233 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_31_g_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
24234   PyObject *__pyx_r = 0;
24235   __Pyx_RefNannyDeclarations
24236   __Pyx_RefNannySetupContext("_g_close (wrapper)", 0);
24237   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_30_g_close(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self));
24238 
24239   /* function exit code */
24240   __Pyx_RefNannyFinishContext();
24241   return __pyx_r;
24242 }
24243 
__pyx_pf_6tables_16indexesextension_10IndexArray_30_g_close(struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self)24244 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_30_g_close(struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self) {
24245   PyObject *__pyx_r = NULL;
24246   __Pyx_RefNannyDeclarations
24247   PyObject *__pyx_t_1 = NULL;
24248   PyObject *__pyx_t_2 = NULL;
24249   PyObject *__pyx_t_3 = NULL;
24250   int __pyx_t_4;
24251   __Pyx_RefNannySetupContext("_g_close", 0);
24252 
24253   /* "tables/indexesextension.pyx":1489
24254  *
24255  *   def _g_close(self):
24256  *     super(Array, self)._g_close()             # <<<<<<<<<<<<<<
24257  *     # Release specific resources of this class
24258  *     if self.mem_space_id > 0:
24259  */
24260   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error)
24261   __Pyx_GOTREF(__pyx_t_2);
24262   __Pyx_INCREF(((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array));
24263   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array));
24264   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6tables_13hdf5extension_Array));
24265   __Pyx_INCREF(((PyObject *)__pyx_v_self));
24266   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
24267   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
24268   __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L1_error)
24269   __Pyx_GOTREF(__pyx_t_3);
24270   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24271   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_g_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error)
24272   __Pyx_GOTREF(__pyx_t_2);
24273   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24274   __pyx_t_3 = NULL;
24275   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24276     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
24277     if (likely(__pyx_t_3)) {
24278       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24279       __Pyx_INCREF(__pyx_t_3);
24280       __Pyx_INCREF(function);
24281       __Pyx_DECREF_SET(__pyx_t_2, function);
24282     }
24283   }
24284   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
24285   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24286   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error)
24287   __Pyx_GOTREF(__pyx_t_1);
24288   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24289   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24290 
24291   /* "tables/indexesextension.pyx":1491
24292  *     super(Array, self)._g_close()
24293  *     # Release specific resources of this class
24294  *     if self.mem_space_id > 0:             # <<<<<<<<<<<<<<
24295  *       H5Sclose(self.mem_space_id)
24296  *
24297  */
24298   __pyx_t_4 = ((__pyx_v_self->mem_space_id > 0) != 0);
24299   if (__pyx_t_4) {
24300 
24301     /* "tables/indexesextension.pyx":1492
24302  *     # Release specific resources of this class
24303  *     if self.mem_space_id > 0:
24304  *       H5Sclose(self.mem_space_id)             # <<<<<<<<<<<<<<
24305  *
24306  *
24307  */
24308     (void)(H5Sclose(__pyx_v_self->mem_space_id));
24309 
24310     /* "tables/indexesextension.pyx":1491
24311  *     super(Array, self)._g_close()
24312  *     # Release specific resources of this class
24313  *     if self.mem_space_id > 0:             # <<<<<<<<<<<<<<
24314  *       H5Sclose(self.mem_space_id)
24315  *
24316  */
24317   }
24318 
24319   /* "tables/indexesextension.pyx":1488
24320  *
24321  *
24322  *   def _g_close(self):             # <<<<<<<<<<<<<<
24323  *     super(Array, self)._g_close()
24324  *     # Release specific resources of this class
24325  */
24326 
24327   /* function exit code */
24328   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24329   goto __pyx_L0;
24330   __pyx_L1_error:;
24331   __Pyx_XDECREF(__pyx_t_1);
24332   __Pyx_XDECREF(__pyx_t_2);
24333   __Pyx_XDECREF(__pyx_t_3);
24334   __Pyx_AddTraceback("tables.indexesextension.IndexArray._g_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
24335   __pyx_r = NULL;
24336   __pyx_L0:;
24337   __Pyx_XGIVEREF(__pyx_r);
24338   __Pyx_RefNannyFinishContext();
24339   return __pyx_r;
24340 }
24341 
24342 /* "(tree fragment)":1
24343  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
24344  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
24345  * def __setstate_cython__(self, __pyx_state):
24346  */
24347 
24348 /* Python wrapper */
24349 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_33__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)24350 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
24351   PyObject *__pyx_r = 0;
24352   __Pyx_RefNannyDeclarations
24353   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
24354   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_32__reduce_cython__(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self));
24355 
24356   /* function exit code */
24357   __Pyx_RefNannyFinishContext();
24358   return __pyx_r;
24359 }
24360 
__pyx_pf_6tables_16indexesextension_10IndexArray_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self)24361 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self) {
24362   PyObject *__pyx_r = NULL;
24363   __Pyx_RefNannyDeclarations
24364   PyObject *__pyx_t_1 = NULL;
24365   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
24366 
24367   /* "(tree fragment)":2
24368  * def __reduce_cython__(self):
24369  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
24370  * def __setstate_cython__(self, __pyx_state):
24371  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
24372  */
24373   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
24374   __Pyx_GOTREF(__pyx_t_1);
24375   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
24376   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24377   __PYX_ERR(1, 2, __pyx_L1_error)
24378 
24379   /* "(tree fragment)":1
24380  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
24381  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
24382  * def __setstate_cython__(self, __pyx_state):
24383  */
24384 
24385   /* function exit code */
24386   __pyx_L1_error:;
24387   __Pyx_XDECREF(__pyx_t_1);
24388   __Pyx_AddTraceback("tables.indexesextension.IndexArray.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24389   __pyx_r = NULL;
24390   __Pyx_XGIVEREF(__pyx_r);
24391   __Pyx_RefNannyFinishContext();
24392   return __pyx_r;
24393 }
24394 
24395 /* "(tree fragment)":3
24396  * def __reduce_cython__(self):
24397  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
24398  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
24399  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
24400  */
24401 
24402 /* Python wrapper */
24403 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_6tables_16indexesextension_10IndexArray_35__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)24404 static PyObject *__pyx_pw_6tables_16indexesextension_10IndexArray_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
24405   PyObject *__pyx_r = 0;
24406   __Pyx_RefNannyDeclarations
24407   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
24408   __pyx_r = __pyx_pf_6tables_16indexesextension_10IndexArray_34__setstate_cython__(((struct __pyx_obj_6tables_16indexesextension_IndexArray *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
24409 
24410   /* function exit code */
24411   __Pyx_RefNannyFinishContext();
24412   return __pyx_r;
24413 }
24414 
__pyx_pf_6tables_16indexesextension_10IndexArray_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)24415 static PyObject *__pyx_pf_6tables_16indexesextension_10IndexArray_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
24416   PyObject *__pyx_r = NULL;
24417   __Pyx_RefNannyDeclarations
24418   PyObject *__pyx_t_1 = NULL;
24419   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
24420 
24421   /* "(tree fragment)":4
24422  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
24423  * def __setstate_cython__(self, __pyx_state):
24424  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
24425  */
24426   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
24427   __Pyx_GOTREF(__pyx_t_1);
24428   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
24429   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24430   __PYX_ERR(1, 4, __pyx_L1_error)
24431 
24432   /* "(tree fragment)":3
24433  * def __reduce_cython__(self):
24434  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
24435  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
24436  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
24437  */
24438 
24439   /* function exit code */
24440   __pyx_L1_error:;
24441   __Pyx_XDECREF(__pyx_t_1);
24442   __Pyx_AddTraceback("tables.indexesextension.IndexArray.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24443   __pyx_r = NULL;
24444   __Pyx_XGIVEREF(__pyx_r);
24445   __Pyx_RefNannyFinishContext();
24446   return __pyx_r;
24447 }
24448 
24449 /* "tables/indexesextension.pyx":1500
24450  *   """
24451  *
24452  *   def _read_index_slice(self, hsize_t start, hsize_t stop, ndarray idx):             # <<<<<<<<<<<<<<
24453  *     """Read the reverse index part of an LR index."""
24454  *
24455  */
24456 
24457 /* Python wrapper */
24458 static PyObject *__pyx_pw_6tables_16indexesextension_12LastRowArray_1_read_index_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24459 static char __pyx_doc_6tables_16indexesextension_12LastRowArray__read_index_slice[] = "Read the reverse index part of an LR index.";
__pyx_pw_6tables_16indexesextension_12LastRowArray_1_read_index_slice(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)24460 static PyObject *__pyx_pw_6tables_16indexesextension_12LastRowArray_1_read_index_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24461   hsize_t __pyx_v_start;
24462   hsize_t __pyx_v_stop;
24463   PyArrayObject *__pyx_v_idx = 0;
24464   PyObject *__pyx_r = 0;
24465   __Pyx_RefNannyDeclarations
24466   __Pyx_RefNannySetupContext("_read_index_slice (wrapper)", 0);
24467   {
24468     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_stop,&__pyx_n_s_idx,0};
24469     PyObject* values[3] = {0,0,0};
24470     if (unlikely(__pyx_kwds)) {
24471       Py_ssize_t kw_args;
24472       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
24473       switch (pos_args) {
24474         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24475         CYTHON_FALLTHROUGH;
24476         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24477         CYTHON_FALLTHROUGH;
24478         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24479         CYTHON_FALLTHROUGH;
24480         case  0: break;
24481         default: goto __pyx_L5_argtuple_error;
24482       }
24483       kw_args = PyDict_Size(__pyx_kwds);
24484       switch (pos_args) {
24485         case  0:
24486         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
24487         else goto __pyx_L5_argtuple_error;
24488         CYTHON_FALLTHROUGH;
24489         case  1:
24490         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stop)) != 0)) kw_args--;
24491         else {
24492           __Pyx_RaiseArgtupleInvalid("_read_index_slice", 1, 3, 3, 1); __PYX_ERR(0, 1500, __pyx_L3_error)
24493         }
24494         CYTHON_FALLTHROUGH;
24495         case  2:
24496         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_idx)) != 0)) kw_args--;
24497         else {
24498           __Pyx_RaiseArgtupleInvalid("_read_index_slice", 1, 3, 3, 2); __PYX_ERR(0, 1500, __pyx_L3_error)
24499         }
24500       }
24501       if (unlikely(kw_args > 0)) {
24502         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_read_index_slice") < 0)) __PYX_ERR(0, 1500, __pyx_L3_error)
24503       }
24504     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
24505       goto __pyx_L5_argtuple_error;
24506     } else {
24507       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24508       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24509       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24510     }
24511     __pyx_v_start = __Pyx_PyInt_As_hsize_t(values[0]); if (unlikely((__pyx_v_start == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L3_error)
24512     __pyx_v_stop = __Pyx_PyInt_As_hsize_t(values[1]); if (unlikely((__pyx_v_stop == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L3_error)
24513     __pyx_v_idx = ((PyArrayObject *)values[2]);
24514   }
24515   goto __pyx_L4_argument_unpacking_done;
24516   __pyx_L5_argtuple_error:;
24517   __Pyx_RaiseArgtupleInvalid("_read_index_slice", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1500, __pyx_L3_error)
24518   __pyx_L3_error:;
24519   __Pyx_AddTraceback("tables.indexesextension.LastRowArray._read_index_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
24520   __Pyx_RefNannyFinishContext();
24521   return NULL;
24522   __pyx_L4_argument_unpacking_done:;
24523   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idx), __pyx_ptype_5numpy_ndarray, 1, "idx", 0))) __PYX_ERR(0, 1500, __pyx_L1_error)
24524   __pyx_r = __pyx_pf_6tables_16indexesextension_12LastRowArray__read_index_slice(((struct __pyx_obj_6tables_16indexesextension_LastRowArray *)__pyx_v_self), __pyx_v_start, __pyx_v_stop, __pyx_v_idx);
24525 
24526   /* function exit code */
24527   goto __pyx_L0;
24528   __pyx_L1_error:;
24529   __pyx_r = NULL;
24530   __pyx_L0:;
24531   __Pyx_RefNannyFinishContext();
24532   return __pyx_r;
24533 }
24534 
__pyx_pf_6tables_16indexesextension_12LastRowArray__read_index_slice(struct __pyx_obj_6tables_16indexesextension_LastRowArray * __pyx_v_self,hsize_t __pyx_v_start,hsize_t __pyx_v_stop,PyArrayObject * __pyx_v_idx)24535 static PyObject *__pyx_pf_6tables_16indexesextension_12LastRowArray__read_index_slice(struct __pyx_obj_6tables_16indexesextension_LastRowArray *__pyx_v_self, hsize_t __pyx_v_start, hsize_t __pyx_v_stop, PyArrayObject *__pyx_v_idx) {
24536   herr_t __pyx_v_ret;
24537   PyObject *__pyx_r = NULL;
24538   __Pyx_RefNannyDeclarations
24539   int __pyx_t_1;
24540   PyObject *__pyx_t_2 = NULL;
24541   PyObject *__pyx_t_3 = NULL;
24542   PyObject *__pyx_t_4 = NULL;
24543   __Pyx_RefNannySetupContext("_read_index_slice", 0);
24544 
24545   /* "tables/indexesextension.pyx":1503
24546  *     """Read the reverse index part of an LR index."""
24547  *
24548  *     with nogil:             # <<<<<<<<<<<<<<
24549  *         ret = H5ARRAYOreadSliceLR(self.dataset_id, self.type_id,
24550  *                                   start, stop, idx.data)
24551  */
24552   {
24553       #ifdef WITH_THREAD
24554       PyThreadState *_save;
24555       Py_UNBLOCK_THREADS
24556       __Pyx_FastGIL_Remember();
24557       #endif
24558       /*try:*/ {
24559 
24560         /* "tables/indexesextension.pyx":1504
24561  *
24562  *     with nogil:
24563  *         ret = H5ARRAYOreadSliceLR(self.dataset_id, self.type_id,             # <<<<<<<<<<<<<<
24564  *                                   start, stop, idx.data)
24565  *
24566  */
24567         __pyx_v_ret = H5ARRAYOreadSliceLR(__pyx_v_self->__pyx_base.__pyx_base.dataset_id, __pyx_v_self->__pyx_base.__pyx_base.type_id, __pyx_v_start, __pyx_v_stop, __pyx_v_idx->data);
24568       }
24569 
24570       /* "tables/indexesextension.pyx":1503
24571  *     """Read the reverse index part of an LR index."""
24572  *
24573  *     with nogil:             # <<<<<<<<<<<<<<
24574  *         ret = H5ARRAYOreadSliceLR(self.dataset_id, self.type_id,
24575  *                                   start, stop, idx.data)
24576  */
24577       /*finally:*/ {
24578         /*normal exit:*/{
24579           #ifdef WITH_THREAD
24580           __Pyx_FastGIL_Forget();
24581           Py_BLOCK_THREADS
24582           #endif
24583           goto __pyx_L5;
24584         }
24585         __pyx_L5:;
24586       }
24587   }
24588 
24589   /* "tables/indexesextension.pyx":1507
24590  *                                   start, stop, idx.data)
24591  *
24592  *     if ret < 0:             # <<<<<<<<<<<<<<
24593  *       raise HDF5ExtError("Problems reading the index data in Last Row.")
24594  *
24595  */
24596   __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
24597   if (unlikely(__pyx_t_1)) {
24598 
24599     /* "tables/indexesextension.pyx":1508
24600  *
24601  *     if ret < 0:
24602  *       raise HDF5ExtError("Problems reading the index data in Last Row.")             # <<<<<<<<<<<<<<
24603  *
24604  *
24605  */
24606     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1508, __pyx_L1_error)
24607     __Pyx_GOTREF(__pyx_t_3);
24608     __pyx_t_4 = NULL;
24609     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
24610       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
24611       if (likely(__pyx_t_4)) {
24612         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24613         __Pyx_INCREF(__pyx_t_4);
24614         __Pyx_INCREF(function);
24615         __Pyx_DECREF_SET(__pyx_t_3, function);
24616       }
24617     }
24618     __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Problems_reading_the_index_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Problems_reading_the_index_data);
24619     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24620     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1508, __pyx_L1_error)
24621     __Pyx_GOTREF(__pyx_t_2);
24622     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24623     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
24624     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24625     __PYX_ERR(0, 1508, __pyx_L1_error)
24626 
24627     /* "tables/indexesextension.pyx":1507
24628  *                                   start, stop, idx.data)
24629  *
24630  *     if ret < 0:             # <<<<<<<<<<<<<<
24631  *       raise HDF5ExtError("Problems reading the index data in Last Row.")
24632  *
24633  */
24634   }
24635 
24636   /* "tables/indexesextension.pyx":1500
24637  *   """
24638  *
24639  *   def _read_index_slice(self, hsize_t start, hsize_t stop, ndarray idx):             # <<<<<<<<<<<<<<
24640  *     """Read the reverse index part of an LR index."""
24641  *
24642  */
24643 
24644   /* function exit code */
24645   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24646   goto __pyx_L0;
24647   __pyx_L1_error:;
24648   __Pyx_XDECREF(__pyx_t_2);
24649   __Pyx_XDECREF(__pyx_t_3);
24650   __Pyx_XDECREF(__pyx_t_4);
24651   __Pyx_AddTraceback("tables.indexesextension.LastRowArray._read_index_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
24652   __pyx_r = NULL;
24653   __pyx_L0:;
24654   __Pyx_XGIVEREF(__pyx_r);
24655   __Pyx_RefNannyFinishContext();
24656   return __pyx_r;
24657 }
24658 
24659 /* "tables/indexesextension.pyx":1511
24660  *
24661  *
24662  *   def _read_sorted_slice(self, IndexArray sorted, hsize_t start, hsize_t stop):             # <<<<<<<<<<<<<<
24663  *     """Read the sorted part of an LR index."""
24664  *
24665  */
24666 
24667 /* Python wrapper */
24668 static PyObject *__pyx_pw_6tables_16indexesextension_12LastRowArray_3_read_sorted_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24669 static char __pyx_doc_6tables_16indexesextension_12LastRowArray_2_read_sorted_slice[] = "Read the sorted part of an LR index.";
__pyx_pw_6tables_16indexesextension_12LastRowArray_3_read_sorted_slice(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)24670 static PyObject *__pyx_pw_6tables_16indexesextension_12LastRowArray_3_read_sorted_slice(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24671   struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_sorted = 0;
24672   hsize_t __pyx_v_start;
24673   hsize_t __pyx_v_stop;
24674   PyObject *__pyx_r = 0;
24675   __Pyx_RefNannyDeclarations
24676   __Pyx_RefNannySetupContext("_read_sorted_slice (wrapper)", 0);
24677   {
24678     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sorted,&__pyx_n_s_start,&__pyx_n_s_stop,0};
24679     PyObject* values[3] = {0,0,0};
24680     if (unlikely(__pyx_kwds)) {
24681       Py_ssize_t kw_args;
24682       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
24683       switch (pos_args) {
24684         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24685         CYTHON_FALLTHROUGH;
24686         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24687         CYTHON_FALLTHROUGH;
24688         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24689         CYTHON_FALLTHROUGH;
24690         case  0: break;
24691         default: goto __pyx_L5_argtuple_error;
24692       }
24693       kw_args = PyDict_Size(__pyx_kwds);
24694       switch (pos_args) {
24695         case  0:
24696         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sorted)) != 0)) kw_args--;
24697         else goto __pyx_L5_argtuple_error;
24698         CYTHON_FALLTHROUGH;
24699         case  1:
24700         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
24701         else {
24702           __Pyx_RaiseArgtupleInvalid("_read_sorted_slice", 1, 3, 3, 1); __PYX_ERR(0, 1511, __pyx_L3_error)
24703         }
24704         CYTHON_FALLTHROUGH;
24705         case  2:
24706         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stop)) != 0)) kw_args--;
24707         else {
24708           __Pyx_RaiseArgtupleInvalid("_read_sorted_slice", 1, 3, 3, 2); __PYX_ERR(0, 1511, __pyx_L3_error)
24709         }
24710       }
24711       if (unlikely(kw_args > 0)) {
24712         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_read_sorted_slice") < 0)) __PYX_ERR(0, 1511, __pyx_L3_error)
24713       }
24714     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
24715       goto __pyx_L5_argtuple_error;
24716     } else {
24717       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
24718       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
24719       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
24720     }
24721     __pyx_v_sorted = ((struct __pyx_obj_6tables_16indexesextension_IndexArray *)values[0]);
24722     __pyx_v_start = __Pyx_PyInt_As_hsize_t(values[1]); if (unlikely((__pyx_v_start == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L3_error)
24723     __pyx_v_stop = __Pyx_PyInt_As_hsize_t(values[2]); if (unlikely((__pyx_v_stop == ((hsize_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L3_error)
24724   }
24725   goto __pyx_L4_argument_unpacking_done;
24726   __pyx_L5_argtuple_error:;
24727   __Pyx_RaiseArgtupleInvalid("_read_sorted_slice", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1511, __pyx_L3_error)
24728   __pyx_L3_error:;
24729   __Pyx_AddTraceback("tables.indexesextension.LastRowArray._read_sorted_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
24730   __Pyx_RefNannyFinishContext();
24731   return NULL;
24732   __pyx_L4_argument_unpacking_done:;
24733   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sorted), __pyx_ptype_6tables_16indexesextension_IndexArray, 1, "sorted", 0))) __PYX_ERR(0, 1511, __pyx_L1_error)
24734   __pyx_r = __pyx_pf_6tables_16indexesextension_12LastRowArray_2_read_sorted_slice(((struct __pyx_obj_6tables_16indexesextension_LastRowArray *)__pyx_v_self), __pyx_v_sorted, __pyx_v_start, __pyx_v_stop);
24735 
24736   /* function exit code */
24737   goto __pyx_L0;
24738   __pyx_L1_error:;
24739   __pyx_r = NULL;
24740   __pyx_L0:;
24741   __Pyx_RefNannyFinishContext();
24742   return __pyx_r;
24743 }
24744 
__pyx_pf_6tables_16indexesextension_12LastRowArray_2_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_LastRowArray * __pyx_v_self,struct __pyx_obj_6tables_16indexesextension_IndexArray * __pyx_v_sorted,hsize_t __pyx_v_start,hsize_t __pyx_v_stop)24745 static PyObject *__pyx_pf_6tables_16indexesextension_12LastRowArray_2_read_sorted_slice(struct __pyx_obj_6tables_16indexesextension_LastRowArray *__pyx_v_self, struct __pyx_obj_6tables_16indexesextension_IndexArray *__pyx_v_sorted, hsize_t __pyx_v_start, hsize_t __pyx_v_stop) {
24746   void *__pyx_v_rbuflb;
24747   herr_t __pyx_v_ret;
24748   PyObject *__pyx_r = NULL;
24749   __Pyx_RefNannyDeclarations
24750   void *__pyx_t_1;
24751   int __pyx_t_2;
24752   PyObject *__pyx_t_3 = NULL;
24753   PyObject *__pyx_t_4 = NULL;
24754   PyObject *__pyx_t_5 = NULL;
24755   __Pyx_RefNannySetupContext("_read_sorted_slice", 0);
24756 
24757   /* "tables/indexesextension.pyx":1516
24758  *     cdef void  *rbuflb
24759  *
24760  *     rbuflb = sorted.rbuflb  # direct access to rbuflb: very fast.             # <<<<<<<<<<<<<<
24761  *     with nogil:
24762  *         ret = H5ARRAYOreadSliceLR(self.dataset_id, self.type_id,
24763  */
24764   __pyx_t_1 = __pyx_v_sorted->rbuflb;
24765   __pyx_v_rbuflb = __pyx_t_1;
24766 
24767   /* "tables/indexesextension.pyx":1517
24768  *
24769  *     rbuflb = sorted.rbuflb  # direct access to rbuflb: very fast.
24770  *     with nogil:             # <<<<<<<<<<<<<<
24771  *         ret = H5ARRAYOreadSliceLR(self.dataset_id, self.type_id,
24772  *                                   start, stop, rbuflb)
24773  */
24774   {
24775       #ifdef WITH_THREAD
24776       PyThreadState *_save;
24777       Py_UNBLOCK_THREADS
24778       __Pyx_FastGIL_Remember();
24779       #endif
24780       /*try:*/ {
24781 
24782         /* "tables/indexesextension.pyx":1518
24783  *     rbuflb = sorted.rbuflb  # direct access to rbuflb: very fast.
24784  *     with nogil:
24785  *         ret = H5ARRAYOreadSliceLR(self.dataset_id, self.type_id,             # <<<<<<<<<<<<<<
24786  *                                   start, stop, rbuflb)
24787  *
24788  */
24789         __pyx_v_ret = H5ARRAYOreadSliceLR(__pyx_v_self->__pyx_base.__pyx_base.dataset_id, __pyx_v_self->__pyx_base.__pyx_base.type_id, __pyx_v_start, __pyx_v_stop, __pyx_v_rbuflb);
24790       }
24791 
24792       /* "tables/indexesextension.pyx":1517
24793  *
24794  *     rbuflb = sorted.rbuflb  # direct access to rbuflb: very fast.
24795  *     with nogil:             # <<<<<<<<<<<<<<
24796  *         ret = H5ARRAYOreadSliceLR(self.dataset_id, self.type_id,
24797  *                                   start, stop, rbuflb)
24798  */
24799       /*finally:*/ {
24800         /*normal exit:*/{
24801           #ifdef WITH_THREAD
24802           __Pyx_FastGIL_Forget();
24803           Py_BLOCK_THREADS
24804           #endif
24805           goto __pyx_L5;
24806         }
24807         __pyx_L5:;
24808       }
24809   }
24810 
24811   /* "tables/indexesextension.pyx":1521
24812  *                                   start, stop, rbuflb)
24813  *
24814  *     if ret < 0:             # <<<<<<<<<<<<<<
24815  *       raise HDF5ExtError("Problems reading the index data.")
24816  *     return sorted.bufferlb[:stop-start]
24817  */
24818   __pyx_t_2 = ((__pyx_v_ret < 0) != 0);
24819   if (unlikely(__pyx_t_2)) {
24820 
24821     /* "tables/indexesextension.pyx":1522
24822  *
24823  *     if ret < 0:
24824  *       raise HDF5ExtError("Problems reading the index data.")             # <<<<<<<<<<<<<<
24825  *     return sorted.bufferlb[:stop-start]
24826  *
24827  */
24828     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1522, __pyx_L1_error)
24829     __Pyx_GOTREF(__pyx_t_4);
24830     __pyx_t_5 = NULL;
24831     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
24832       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
24833       if (likely(__pyx_t_5)) {
24834         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
24835         __Pyx_INCREF(__pyx_t_5);
24836         __Pyx_INCREF(function);
24837         __Pyx_DECREF_SET(__pyx_t_4, function);
24838       }
24839     }
24840     __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Problems_reading_the_index_data_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Problems_reading_the_index_data_2);
24841     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24842     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error)
24843     __Pyx_GOTREF(__pyx_t_3);
24844     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24845     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
24846     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24847     __PYX_ERR(0, 1522, __pyx_L1_error)
24848 
24849     /* "tables/indexesextension.pyx":1521
24850  *                                   start, stop, rbuflb)
24851  *
24852  *     if ret < 0:             # <<<<<<<<<<<<<<
24853  *       raise HDF5ExtError("Problems reading the index data.")
24854  *     return sorted.bufferlb[:stop-start]
24855  */
24856   }
24857 
24858   /* "tables/indexesextension.pyx":1523
24859  *     if ret < 0:
24860  *       raise HDF5ExtError("Problems reading the index data.")
24861  *     return sorted.bufferlb[:stop-start]             # <<<<<<<<<<<<<<
24862  *
24863  *
24864  */
24865   __Pyx_XDECREF(__pyx_r);
24866   __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_sorted->bufferlb), 0, (__pyx_v_stop - __pyx_v_start), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1523, __pyx_L1_error)
24867   __Pyx_GOTREF(__pyx_t_3);
24868   __pyx_r = __pyx_t_3;
24869   __pyx_t_3 = 0;
24870   goto __pyx_L0;
24871 
24872   /* "tables/indexesextension.pyx":1511
24873  *
24874  *
24875  *   def _read_sorted_slice(self, IndexArray sorted, hsize_t start, hsize_t stop):             # <<<<<<<<<<<<<<
24876  *     """Read the sorted part of an LR index."""
24877  *
24878  */
24879 
24880   /* function exit code */
24881   __pyx_L1_error:;
24882   __Pyx_XDECREF(__pyx_t_3);
24883   __Pyx_XDECREF(__pyx_t_4);
24884   __Pyx_XDECREF(__pyx_t_5);
24885   __Pyx_AddTraceback("tables.indexesextension.LastRowArray._read_sorted_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
24886   __pyx_r = NULL;
24887   __pyx_L0:;
24888   __Pyx_XGIVEREF(__pyx_r);
24889   __Pyx_RefNannyFinishContext();
24890   return __pyx_r;
24891 }
24892 
24893 /* "(tree fragment)":1
24894  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
24895  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
24896  * def __setstate_cython__(self, __pyx_state):
24897  */
24898 
24899 /* Python wrapper */
24900 static PyObject *__pyx_pw_6tables_16indexesextension_12LastRowArray_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_6tables_16indexesextension_12LastRowArray_5__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)24901 static PyObject *__pyx_pw_6tables_16indexesextension_12LastRowArray_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
24902   PyObject *__pyx_r = 0;
24903   __Pyx_RefNannyDeclarations
24904   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
24905   __pyx_r = __pyx_pf_6tables_16indexesextension_12LastRowArray_4__reduce_cython__(((struct __pyx_obj_6tables_16indexesextension_LastRowArray *)__pyx_v_self));
24906 
24907   /* function exit code */
24908   __Pyx_RefNannyFinishContext();
24909   return __pyx_r;
24910 }
24911 
__pyx_pf_6tables_16indexesextension_12LastRowArray_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_LastRowArray * __pyx_v_self)24912 static PyObject *__pyx_pf_6tables_16indexesextension_12LastRowArray_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_LastRowArray *__pyx_v_self) {
24913   PyObject *__pyx_r = NULL;
24914   __Pyx_RefNannyDeclarations
24915   PyObject *__pyx_t_1 = NULL;
24916   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
24917 
24918   /* "(tree fragment)":2
24919  * def __reduce_cython__(self):
24920  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
24921  * def __setstate_cython__(self, __pyx_state):
24922  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
24923  */
24924   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
24925   __Pyx_GOTREF(__pyx_t_1);
24926   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
24927   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24928   __PYX_ERR(1, 2, __pyx_L1_error)
24929 
24930   /* "(tree fragment)":1
24931  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
24932  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
24933  * def __setstate_cython__(self, __pyx_state):
24934  */
24935 
24936   /* function exit code */
24937   __pyx_L1_error:;
24938   __Pyx_XDECREF(__pyx_t_1);
24939   __Pyx_AddTraceback("tables.indexesextension.LastRowArray.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24940   __pyx_r = NULL;
24941   __Pyx_XGIVEREF(__pyx_r);
24942   __Pyx_RefNannyFinishContext();
24943   return __pyx_r;
24944 }
24945 
24946 /* "(tree fragment)":3
24947  * def __reduce_cython__(self):
24948  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
24949  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
24950  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
24951  */
24952 
24953 /* Python wrapper */
24954 static PyObject *__pyx_pw_6tables_16indexesextension_12LastRowArray_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw_6tables_16indexesextension_12LastRowArray_7__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)24955 static PyObject *__pyx_pw_6tables_16indexesextension_12LastRowArray_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
24956   PyObject *__pyx_r = 0;
24957   __Pyx_RefNannyDeclarations
24958   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
24959   __pyx_r = __pyx_pf_6tables_16indexesextension_12LastRowArray_6__setstate_cython__(((struct __pyx_obj_6tables_16indexesextension_LastRowArray *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
24960 
24961   /* function exit code */
24962   __Pyx_RefNannyFinishContext();
24963   return __pyx_r;
24964 }
24965 
__pyx_pf_6tables_16indexesextension_12LastRowArray_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_LastRowArray * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)24966 static PyObject *__pyx_pf_6tables_16indexesextension_12LastRowArray_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6tables_16indexesextension_LastRowArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
24967   PyObject *__pyx_r = NULL;
24968   __Pyx_RefNannyDeclarations
24969   PyObject *__pyx_t_1 = NULL;
24970   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
24971 
24972   /* "(tree fragment)":4
24973  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
24974  * def __setstate_cython__(self, __pyx_state):
24975  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
24976  */
24977   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
24978   __Pyx_GOTREF(__pyx_t_1);
24979   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
24980   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24981   __PYX_ERR(1, 4, __pyx_L1_error)
24982 
24983   /* "(tree fragment)":3
24984  * def __reduce_cython__(self):
24985  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
24986  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
24987  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
24988  */
24989 
24990   /* function exit code */
24991   __pyx_L1_error:;
24992   __Pyx_XDECREF(__pyx_t_1);
24993   __Pyx_AddTraceback("tables.indexesextension.LastRowArray.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24994   __pyx_r = NULL;
24995   __Pyx_XGIVEREF(__pyx_r);
24996   __Pyx_RefNannyFinishContext();
24997   return __pyx_r;
24998 }
24999 
25000 /* "(tree fragment)":1
25001  * def __pyx_unpickle_Index(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
25002  *     cdef object __pyx_PickleError
25003  *     cdef object __pyx_result
25004  */
25005 
25006 /* Python wrapper */
25007 static PyObject *__pyx_pw_6tables_16indexesextension_7__pyx_unpickle_Index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25008 static PyMethodDef __pyx_mdef_6tables_16indexesextension_7__pyx_unpickle_Index = {"__pyx_unpickle_Index", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_7__pyx_unpickle_Index, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_6tables_16indexesextension_7__pyx_unpickle_Index(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)25009 static PyObject *__pyx_pw_6tables_16indexesextension_7__pyx_unpickle_Index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25010   PyObject *__pyx_v___pyx_type = 0;
25011   long __pyx_v___pyx_checksum;
25012   PyObject *__pyx_v___pyx_state = 0;
25013   PyObject *__pyx_r = 0;
25014   __Pyx_RefNannyDeclarations
25015   __Pyx_RefNannySetupContext("__pyx_unpickle_Index (wrapper)", 0);
25016   {
25017     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
25018     PyObject* values[3] = {0,0,0};
25019     if (unlikely(__pyx_kwds)) {
25020       Py_ssize_t kw_args;
25021       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25022       switch (pos_args) {
25023         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25024         CYTHON_FALLTHROUGH;
25025         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25026         CYTHON_FALLTHROUGH;
25027         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25028         CYTHON_FALLTHROUGH;
25029         case  0: break;
25030         default: goto __pyx_L5_argtuple_error;
25031       }
25032       kw_args = PyDict_Size(__pyx_kwds);
25033       switch (pos_args) {
25034         case  0:
25035         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
25036         else goto __pyx_L5_argtuple_error;
25037         CYTHON_FALLTHROUGH;
25038         case  1:
25039         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
25040         else {
25041           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Index", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
25042         }
25043         CYTHON_FALLTHROUGH;
25044         case  2:
25045         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
25046         else {
25047           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Index", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
25048         }
25049       }
25050       if (unlikely(kw_args > 0)) {
25051         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Index") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
25052       }
25053     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
25054       goto __pyx_L5_argtuple_error;
25055     } else {
25056       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25057       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25058       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
25059     }
25060     __pyx_v___pyx_type = values[0];
25061     __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)
25062     __pyx_v___pyx_state = values[2];
25063   }
25064   goto __pyx_L4_argument_unpacking_done;
25065   __pyx_L5_argtuple_error:;
25066   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Index", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
25067   __pyx_L3_error:;
25068   __Pyx_AddTraceback("tables.indexesextension.__pyx_unpickle_Index", __pyx_clineno, __pyx_lineno, __pyx_filename);
25069   __Pyx_RefNannyFinishContext();
25070   return NULL;
25071   __pyx_L4_argument_unpacking_done:;
25072   __pyx_r = __pyx_pf_6tables_16indexesextension_6__pyx_unpickle_Index(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
25073 
25074   /* function exit code */
25075   __Pyx_RefNannyFinishContext();
25076   return __pyx_r;
25077 }
25078 
__pyx_pf_6tables_16indexesextension_6__pyx_unpickle_Index(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)25079 static PyObject *__pyx_pf_6tables_16indexesextension_6__pyx_unpickle_Index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
25080   PyObject *__pyx_v___pyx_PickleError = 0;
25081   PyObject *__pyx_v___pyx_result = 0;
25082   PyObject *__pyx_r = NULL;
25083   __Pyx_RefNannyDeclarations
25084   int __pyx_t_1;
25085   PyObject *__pyx_t_2 = NULL;
25086   PyObject *__pyx_t_3 = NULL;
25087   PyObject *__pyx_t_4 = NULL;
25088   PyObject *__pyx_t_5 = NULL;
25089   int __pyx_t_6;
25090   __Pyx_RefNannySetupContext("__pyx_unpickle_Index", 0);
25091 
25092   /* "(tree fragment)":4
25093  *     cdef object __pyx_PickleError
25094  *     cdef object __pyx_result
25095  *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
25096  *         from pickle import PickleError as __pyx_PickleError
25097  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
25098  */
25099   __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
25100   if (__pyx_t_1) {
25101 
25102     /* "(tree fragment)":5
25103  *     cdef object __pyx_result
25104  *     if __pyx_checksum != 0xd41d8cd:
25105  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
25106  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
25107  *     __pyx_result = Index.__new__(__pyx_type)
25108  */
25109     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
25110     __Pyx_GOTREF(__pyx_t_2);
25111     __Pyx_INCREF(__pyx_n_s_PickleError);
25112     __Pyx_GIVEREF(__pyx_n_s_PickleError);
25113     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
25114     __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)
25115     __Pyx_GOTREF(__pyx_t_3);
25116     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25117     __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
25118     __Pyx_GOTREF(__pyx_t_2);
25119     __Pyx_INCREF(__pyx_t_2);
25120     __pyx_v___pyx_PickleError = __pyx_t_2;
25121     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25122     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25123 
25124     /* "(tree fragment)":6
25125  *     if __pyx_checksum != 0xd41d8cd:
25126  *         from pickle import PickleError as __pyx_PickleError
25127  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
25128  *     __pyx_result = Index.__new__(__pyx_type)
25129  *     if __pyx_state is not None:
25130  */
25131     __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
25132     __Pyx_GOTREF(__pyx_t_2);
25133     __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
25134     __Pyx_GOTREF(__pyx_t_4);
25135     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25136     __Pyx_INCREF(__pyx_v___pyx_PickleError);
25137     __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
25138     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
25139       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
25140       if (likely(__pyx_t_5)) {
25141         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25142         __Pyx_INCREF(__pyx_t_5);
25143         __Pyx_INCREF(function);
25144         __Pyx_DECREF_SET(__pyx_t_2, function);
25145       }
25146     }
25147     __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);
25148     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25149     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25150     if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
25151     __Pyx_GOTREF(__pyx_t_3);
25152     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25153     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25154     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25155     __PYX_ERR(1, 6, __pyx_L1_error)
25156 
25157     /* "(tree fragment)":4
25158  *     cdef object __pyx_PickleError
25159  *     cdef object __pyx_result
25160  *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
25161  *         from pickle import PickleError as __pyx_PickleError
25162  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
25163  */
25164   }
25165 
25166   /* "(tree fragment)":7
25167  *         from pickle import PickleError as __pyx_PickleError
25168  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
25169  *     __pyx_result = Index.__new__(__pyx_type)             # <<<<<<<<<<<<<<
25170  *     if __pyx_state is not None:
25171  *         __pyx_unpickle_Index__set_state(<Index> __pyx_result, __pyx_state)
25172  */
25173   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6tables_16indexesextension_Index), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
25174   __Pyx_GOTREF(__pyx_t_2);
25175   __pyx_t_4 = NULL;
25176   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25177     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
25178     if (likely(__pyx_t_4)) {
25179       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25180       __Pyx_INCREF(__pyx_t_4);
25181       __Pyx_INCREF(function);
25182       __Pyx_DECREF_SET(__pyx_t_2, function);
25183     }
25184   }
25185   __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);
25186   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25187   if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
25188   __Pyx_GOTREF(__pyx_t_3);
25189   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25190   __pyx_v___pyx_result = __pyx_t_3;
25191   __pyx_t_3 = 0;
25192 
25193   /* "(tree fragment)":8
25194  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
25195  *     __pyx_result = Index.__new__(__pyx_type)
25196  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
25197  *         __pyx_unpickle_Index__set_state(<Index> __pyx_result, __pyx_state)
25198  *     return __pyx_result
25199  */
25200   __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
25201   __pyx_t_6 = (__pyx_t_1 != 0);
25202   if (__pyx_t_6) {
25203 
25204     /* "(tree fragment)":9
25205  *     __pyx_result = Index.__new__(__pyx_type)
25206  *     if __pyx_state is not None:
25207  *         __pyx_unpickle_Index__set_state(<Index> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
25208  *     return __pyx_result
25209  * cdef __pyx_unpickle_Index__set_state(Index __pyx_result, tuple __pyx_state):
25210  */
25211     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)
25212     __pyx_t_3 = __pyx_f_6tables_16indexesextension___pyx_unpickle_Index__set_state(((struct __pyx_obj_6tables_16indexesextension_Index *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
25213     __Pyx_GOTREF(__pyx_t_3);
25214     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25215 
25216     /* "(tree fragment)":8
25217  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
25218  *     __pyx_result = Index.__new__(__pyx_type)
25219  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
25220  *         __pyx_unpickle_Index__set_state(<Index> __pyx_result, __pyx_state)
25221  *     return __pyx_result
25222  */
25223   }
25224 
25225   /* "(tree fragment)":10
25226  *     if __pyx_state is not None:
25227  *         __pyx_unpickle_Index__set_state(<Index> __pyx_result, __pyx_state)
25228  *     return __pyx_result             # <<<<<<<<<<<<<<
25229  * cdef __pyx_unpickle_Index__set_state(Index __pyx_result, tuple __pyx_state):
25230  *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
25231  */
25232   __Pyx_XDECREF(__pyx_r);
25233   __Pyx_INCREF(__pyx_v___pyx_result);
25234   __pyx_r = __pyx_v___pyx_result;
25235   goto __pyx_L0;
25236 
25237   /* "(tree fragment)":1
25238  * def __pyx_unpickle_Index(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
25239  *     cdef object __pyx_PickleError
25240  *     cdef object __pyx_result
25241  */
25242 
25243   /* function exit code */
25244   __pyx_L1_error:;
25245   __Pyx_XDECREF(__pyx_t_2);
25246   __Pyx_XDECREF(__pyx_t_3);
25247   __Pyx_XDECREF(__pyx_t_4);
25248   __Pyx_XDECREF(__pyx_t_5);
25249   __Pyx_AddTraceback("tables.indexesextension.__pyx_unpickle_Index", __pyx_clineno, __pyx_lineno, __pyx_filename);
25250   __pyx_r = NULL;
25251   __pyx_L0:;
25252   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
25253   __Pyx_XDECREF(__pyx_v___pyx_result);
25254   __Pyx_XGIVEREF(__pyx_r);
25255   __Pyx_RefNannyFinishContext();
25256   return __pyx_r;
25257 }
25258 
25259 /* "(tree fragment)":11
25260  *         __pyx_unpickle_Index__set_state(<Index> __pyx_result, __pyx_state)
25261  *     return __pyx_result
25262  * cdef __pyx_unpickle_Index__set_state(Index __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
25263  *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
25264  *         __pyx_result.__dict__.update(__pyx_state[0])
25265  */
25266 
__pyx_f_6tables_16indexesextension___pyx_unpickle_Index__set_state(struct __pyx_obj_6tables_16indexesextension_Index * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)25267 static PyObject *__pyx_f_6tables_16indexesextension___pyx_unpickle_Index__set_state(struct __pyx_obj_6tables_16indexesextension_Index *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
25268   PyObject *__pyx_r = NULL;
25269   __Pyx_RefNannyDeclarations
25270   int __pyx_t_1;
25271   Py_ssize_t __pyx_t_2;
25272   int __pyx_t_3;
25273   int __pyx_t_4;
25274   PyObject *__pyx_t_5 = NULL;
25275   PyObject *__pyx_t_6 = NULL;
25276   PyObject *__pyx_t_7 = NULL;
25277   PyObject *__pyx_t_8 = NULL;
25278   __Pyx_RefNannySetupContext("__pyx_unpickle_Index__set_state", 0);
25279 
25280   /* "(tree fragment)":12
25281  *     return __pyx_result
25282  * cdef __pyx_unpickle_Index__set_state(Index __pyx_result, tuple __pyx_state):
25283  *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
25284  *         __pyx_result.__dict__.update(__pyx_state[0])
25285  */
25286   if (unlikely(__pyx_v___pyx_state == Py_None)) {
25287     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
25288     __PYX_ERR(1, 12, __pyx_L1_error)
25289   }
25290   __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
25291   __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
25292   if (__pyx_t_3) {
25293   } else {
25294     __pyx_t_1 = __pyx_t_3;
25295     goto __pyx_L4_bool_binop_done;
25296   }
25297   __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
25298   __pyx_t_4 = (__pyx_t_3 != 0);
25299   __pyx_t_1 = __pyx_t_4;
25300   __pyx_L4_bool_binop_done:;
25301   if (__pyx_t_1) {
25302 
25303     /* "(tree fragment)":13
25304  * cdef __pyx_unpickle_Index__set_state(Index __pyx_result, tuple __pyx_state):
25305  *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
25306  *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
25307  */
25308     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
25309     __Pyx_GOTREF(__pyx_t_6);
25310     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
25311     __Pyx_GOTREF(__pyx_t_7);
25312     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25313     if (unlikely(__pyx_v___pyx_state == Py_None)) {
25314       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
25315       __PYX_ERR(1, 13, __pyx_L1_error)
25316     }
25317     __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
25318     __Pyx_GOTREF(__pyx_t_6);
25319     __pyx_t_8 = NULL;
25320     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
25321       __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
25322       if (likely(__pyx_t_8)) {
25323         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
25324         __Pyx_INCREF(__pyx_t_8);
25325         __Pyx_INCREF(function);
25326         __Pyx_DECREF_SET(__pyx_t_7, function);
25327       }
25328     }
25329     __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
25330     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
25331     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25332     if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
25333     __Pyx_GOTREF(__pyx_t_5);
25334     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25335     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25336 
25337     /* "(tree fragment)":12
25338  *     return __pyx_result
25339  * cdef __pyx_unpickle_Index__set_state(Index __pyx_result, tuple __pyx_state):
25340  *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
25341  *         __pyx_result.__dict__.update(__pyx_state[0])
25342  */
25343   }
25344 
25345   /* "(tree fragment)":11
25346  *         __pyx_unpickle_Index__set_state(<Index> __pyx_result, __pyx_state)
25347  *     return __pyx_result
25348  * cdef __pyx_unpickle_Index__set_state(Index __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
25349  *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
25350  *         __pyx_result.__dict__.update(__pyx_state[0])
25351  */
25352 
25353   /* function exit code */
25354   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25355   goto __pyx_L0;
25356   __pyx_L1_error:;
25357   __Pyx_XDECREF(__pyx_t_5);
25358   __Pyx_XDECREF(__pyx_t_6);
25359   __Pyx_XDECREF(__pyx_t_7);
25360   __Pyx_XDECREF(__pyx_t_8);
25361   __Pyx_AddTraceback("tables.indexesextension.__pyx_unpickle_Index__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
25362   __pyx_r = 0;
25363   __pyx_L0:;
25364   __Pyx_XGIVEREF(__pyx_r);
25365   __Pyx_RefNannyFinishContext();
25366   return __pyx_r;
25367 }
25368 
25369 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
25370  *         # experimental exception made for __getbuffer__ and __releasebuffer__
25371  *         # -- the details of this may change.
25372  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
25373  *             # This implementation of getbuffer is geared towards Cython
25374  *             # requirements, and does not yet fulfill the PEP.
25375  */
25376 
25377 /* Python wrapper */
25378 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)25379 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25380   int __pyx_r;
25381   __Pyx_RefNannyDeclarations
25382   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
25383   __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
25384 
25385   /* function exit code */
25386   __Pyx_RefNannyFinishContext();
25387   return __pyx_r;
25388 }
25389 
__pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)25390 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25391   int __pyx_v_i;
25392   int __pyx_v_ndim;
25393   int __pyx_v_endian_detector;
25394   int __pyx_v_little_endian;
25395   int __pyx_v_t;
25396   char *__pyx_v_f;
25397   PyArray_Descr *__pyx_v_descr = 0;
25398   int __pyx_v_offset;
25399   int __pyx_r;
25400   __Pyx_RefNannyDeclarations
25401   int __pyx_t_1;
25402   int __pyx_t_2;
25403   PyObject *__pyx_t_3 = NULL;
25404   int __pyx_t_4;
25405   int __pyx_t_5;
25406   int __pyx_t_6;
25407   PyArray_Descr *__pyx_t_7;
25408   PyObject *__pyx_t_8 = NULL;
25409   char *__pyx_t_9;
25410   if (__pyx_v_info == NULL) {
25411     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
25412     return -1;
25413   }
25414   __Pyx_RefNannySetupContext("__getbuffer__", 0);
25415   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
25416   __Pyx_GIVEREF(__pyx_v_info->obj);
25417 
25418   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
25419  *
25420  *             cdef int i, ndim
25421  *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
25422  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25423  *
25424  */
25425   __pyx_v_endian_detector = 1;
25426 
25427   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
25428  *             cdef int i, ndim
25429  *             cdef int endian_detector = 1
25430  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
25431  *
25432  *             ndim = PyArray_NDIM(self)
25433  */
25434   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
25435 
25436   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
25437  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25438  *
25439  *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
25440  *
25441  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25442  */
25443   __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
25444 
25445   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
25446  *             ndim = PyArray_NDIM(self)
25447  *
25448  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
25449  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25450  *                 raise ValueError(u"ndarray is not C contiguous")
25451  */
25452   __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
25453   if (__pyx_t_2) {
25454   } else {
25455     __pyx_t_1 = __pyx_t_2;
25456     goto __pyx_L4_bool_binop_done;
25457   }
25458 
25459   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
25460  *
25461  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25462  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
25463  *                 raise ValueError(u"ndarray is not C contiguous")
25464  *
25465  */
25466   __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
25467   __pyx_t_1 = __pyx_t_2;
25468   __pyx_L4_bool_binop_done:;
25469 
25470   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
25471  *             ndim = PyArray_NDIM(self)
25472  *
25473  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
25474  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25475  *                 raise ValueError(u"ndarray is not C contiguous")
25476  */
25477   if (unlikely(__pyx_t_1)) {
25478 
25479     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
25480  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25481  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25482  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
25483  *
25484  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25485  */
25486     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error)
25487     __Pyx_GOTREF(__pyx_t_3);
25488     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25489     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25490     __PYX_ERR(2, 272, __pyx_L1_error)
25491 
25492     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
25493  *             ndim = PyArray_NDIM(self)
25494  *
25495  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
25496  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25497  *                 raise ValueError(u"ndarray is not C contiguous")
25498  */
25499   }
25500 
25501   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
25502  *                 raise ValueError(u"ndarray is not C contiguous")
25503  *
25504  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
25505  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25506  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25507  */
25508   __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
25509   if (__pyx_t_2) {
25510   } else {
25511     __pyx_t_1 = __pyx_t_2;
25512     goto __pyx_L7_bool_binop_done;
25513   }
25514 
25515   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
25516  *
25517  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25518  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
25519  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25520  *
25521  */
25522   __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
25523   __pyx_t_1 = __pyx_t_2;
25524   __pyx_L7_bool_binop_done:;
25525 
25526   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
25527  *                 raise ValueError(u"ndarray is not C contiguous")
25528  *
25529  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
25530  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25531  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25532  */
25533   if (unlikely(__pyx_t_1)) {
25534 
25535     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
25536  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25537  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25538  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
25539  *
25540  *             info.buf = PyArray_DATA(self)
25541  */
25542     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error)
25543     __Pyx_GOTREF(__pyx_t_3);
25544     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25545     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25546     __PYX_ERR(2, 276, __pyx_L1_error)
25547 
25548     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
25549  *                 raise ValueError(u"ndarray is not C contiguous")
25550  *
25551  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
25552  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25553  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25554  */
25555   }
25556 
25557   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
25558  *                 raise ValueError(u"ndarray is not Fortran contiguous")
25559  *
25560  *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
25561  *             info.ndim = ndim
25562  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
25563  */
25564   __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
25565 
25566   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
25567  *
25568  *             info.buf = PyArray_DATA(self)
25569  *             info.ndim = ndim             # <<<<<<<<<<<<<<
25570  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
25571  *                 # Allocate new buffer for strides and shape info.
25572  */
25573   __pyx_v_info->ndim = __pyx_v_ndim;
25574 
25575   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
25576  *             info.buf = PyArray_DATA(self)
25577  *             info.ndim = ndim
25578  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
25579  *                 # Allocate new buffer for strides and shape info.
25580  *                 # This is allocated as one block, strides first.
25581  */
25582   __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
25583   if (__pyx_t_1) {
25584 
25585     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
25586  *                 # Allocate new buffer for strides and shape info.
25587  *                 # This is allocated as one block, strides first.
25588  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)             # <<<<<<<<<<<<<<
25589  *                 info.shape = info.strides + ndim
25590  *                 for i in range(ndim):
25591  */
25592     __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
25593 
25594     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
25595  *                 # This is allocated as one block, strides first.
25596  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
25597  *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
25598  *                 for i in range(ndim):
25599  *                     info.strides[i] = PyArray_STRIDES(self)[i]
25600  */
25601     __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
25602 
25603     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
25604  *                 info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
25605  *                 info.shape = info.strides + ndim
25606  *                 for i in range(ndim):             # <<<<<<<<<<<<<<
25607  *                     info.strides[i] = PyArray_STRIDES(self)[i]
25608  *                     info.shape[i] = PyArray_DIMS(self)[i]
25609  */
25610     __pyx_t_4 = __pyx_v_ndim;
25611     __pyx_t_5 = __pyx_t_4;
25612     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
25613       __pyx_v_i = __pyx_t_6;
25614 
25615       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286
25616  *                 info.shape = info.strides + ndim
25617  *                 for i in range(ndim):
25618  *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
25619  *                     info.shape[i] = PyArray_DIMS(self)[i]
25620  *             else:
25621  */
25622       (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
25623 
25624       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287
25625  *                 for i in range(ndim):
25626  *                     info.strides[i] = PyArray_STRIDES(self)[i]
25627  *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
25628  *             else:
25629  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25630  */
25631       (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
25632     }
25633 
25634     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
25635  *             info.buf = PyArray_DATA(self)
25636  *             info.ndim = ndim
25637  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
25638  *                 # Allocate new buffer for strides and shape info.
25639  *                 # This is allocated as one block, strides first.
25640  */
25641     goto __pyx_L9;
25642   }
25643 
25644   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289
25645  *                     info.shape[i] = PyArray_DIMS(self)[i]
25646  *             else:
25647  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
25648  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25649  *             info.suboffsets = NULL
25650  */
25651   /*else*/ {
25652     __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
25653 
25654     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
25655  *             else:
25656  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25657  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
25658  *             info.suboffsets = NULL
25659  *             info.itemsize = PyArray_ITEMSIZE(self)
25660  */
25661     __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
25662   }
25663   __pyx_L9:;
25664 
25665   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
25666  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25667  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25668  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
25669  *             info.itemsize = PyArray_ITEMSIZE(self)
25670  *             info.readonly = not PyArray_ISWRITEABLE(self)
25671  */
25672   __pyx_v_info->suboffsets = NULL;
25673 
25674   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
25675  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25676  *             info.suboffsets = NULL
25677  *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
25678  *             info.readonly = not PyArray_ISWRITEABLE(self)
25679  *
25680  */
25681   __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
25682 
25683   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
25684  *             info.suboffsets = NULL
25685  *             info.itemsize = PyArray_ITEMSIZE(self)
25686  *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
25687  *
25688  *             cdef int t
25689  */
25690   __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
25691 
25692   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296
25693  *
25694  *             cdef int t
25695  *             cdef char* f = NULL             # <<<<<<<<<<<<<<
25696  *             cdef dtype descr = <dtype>PyArray_DESCR(self)
25697  *             cdef int offset
25698  */
25699   __pyx_v_f = NULL;
25700 
25701   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297
25702  *             cdef int t
25703  *             cdef char* f = NULL
25704  *             cdef dtype descr = <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
25705  *             cdef int offset
25706  *
25707  */
25708   __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
25709   __pyx_t_3 = ((PyObject *)__pyx_t_7);
25710   __Pyx_INCREF(__pyx_t_3);
25711   __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
25712   __pyx_t_3 = 0;
25713 
25714   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300
25715  *             cdef int offset
25716  *
25717  *             info.obj = self             # <<<<<<<<<<<<<<
25718  *
25719  *             if not PyDataType_HASFIELDS(descr):
25720  */
25721   __Pyx_INCREF(((PyObject *)__pyx_v_self));
25722   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
25723   __Pyx_GOTREF(__pyx_v_info->obj);
25724   __Pyx_DECREF(__pyx_v_info->obj);
25725   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
25726 
25727   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
25728  *             info.obj = self
25729  *
25730  *             if not PyDataType_HASFIELDS(descr):             # <<<<<<<<<<<<<<
25731  *                 t = descr.type_num
25732  *                 if ((descr.byteorder == c'>' and little_endian) or
25733  */
25734   __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
25735   if (__pyx_t_1) {
25736 
25737     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303
25738  *
25739  *             if not PyDataType_HASFIELDS(descr):
25740  *                 t = descr.type_num             # <<<<<<<<<<<<<<
25741  *                 if ((descr.byteorder == c'>' and little_endian) or
25742  *                     (descr.byteorder == c'<' and not little_endian)):
25743  */
25744     __pyx_t_4 = __pyx_v_descr->type_num;
25745     __pyx_v_t = __pyx_t_4;
25746 
25747     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
25748  *             if not PyDataType_HASFIELDS(descr):
25749  *                 t = descr.type_num
25750  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
25751  *                     (descr.byteorder == c'<' and not little_endian)):
25752  *                     raise ValueError(u"Non-native byte order not supported")
25753  */
25754     __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
25755     if (!__pyx_t_2) {
25756       goto __pyx_L15_next_or;
25757     } else {
25758     }
25759     __pyx_t_2 = (__pyx_v_little_endian != 0);
25760     if (!__pyx_t_2) {
25761     } else {
25762       __pyx_t_1 = __pyx_t_2;
25763       goto __pyx_L14_bool_binop_done;
25764     }
25765     __pyx_L15_next_or:;
25766 
25767     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305
25768  *                 t = descr.type_num
25769  *                 if ((descr.byteorder == c'>' and little_endian) or
25770  *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
25771  *                     raise ValueError(u"Non-native byte order not supported")
25772  *                 if   t == NPY_BYTE:        f = "b"
25773  */
25774     __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
25775     if (__pyx_t_2) {
25776     } else {
25777       __pyx_t_1 = __pyx_t_2;
25778       goto __pyx_L14_bool_binop_done;
25779     }
25780     __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
25781     __pyx_t_1 = __pyx_t_2;
25782     __pyx_L14_bool_binop_done:;
25783 
25784     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
25785  *             if not PyDataType_HASFIELDS(descr):
25786  *                 t = descr.type_num
25787  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
25788  *                     (descr.byteorder == c'<' and not little_endian)):
25789  *                     raise ValueError(u"Non-native byte order not supported")
25790  */
25791     if (unlikely(__pyx_t_1)) {
25792 
25793       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
25794  *                 if ((descr.byteorder == c'>' and little_endian) or
25795  *                     (descr.byteorder == c'<' and not little_endian)):
25796  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
25797  *                 if   t == NPY_BYTE:        f = "b"
25798  *                 elif t == NPY_UBYTE:       f = "B"
25799  */
25800       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error)
25801       __Pyx_GOTREF(__pyx_t_3);
25802       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25803       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25804       __PYX_ERR(2, 306, __pyx_L1_error)
25805 
25806       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
25807  *             if not PyDataType_HASFIELDS(descr):
25808  *                 t = descr.type_num
25809  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
25810  *                     (descr.byteorder == c'<' and not little_endian)):
25811  *                     raise ValueError(u"Non-native byte order not supported")
25812  */
25813     }
25814 
25815     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307
25816  *                     (descr.byteorder == c'<' and not little_endian)):
25817  *                     raise ValueError(u"Non-native byte order not supported")
25818  *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
25819  *                 elif t == NPY_UBYTE:       f = "B"
25820  *                 elif t == NPY_SHORT:       f = "h"
25821  */
25822     switch (__pyx_v_t) {
25823       case NPY_BYTE:
25824       __pyx_v_f = ((char *)"b");
25825       break;
25826       case NPY_UBYTE:
25827 
25828       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308
25829  *                     raise ValueError(u"Non-native byte order not supported")
25830  *                 if   t == NPY_BYTE:        f = "b"
25831  *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
25832  *                 elif t == NPY_SHORT:       f = "h"
25833  *                 elif t == NPY_USHORT:      f = "H"
25834  */
25835       __pyx_v_f = ((char *)"B");
25836       break;
25837       case NPY_SHORT:
25838 
25839       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309
25840  *                 if   t == NPY_BYTE:        f = "b"
25841  *                 elif t == NPY_UBYTE:       f = "B"
25842  *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
25843  *                 elif t == NPY_USHORT:      f = "H"
25844  *                 elif t == NPY_INT:         f = "i"
25845  */
25846       __pyx_v_f = ((char *)"h");
25847       break;
25848       case NPY_USHORT:
25849 
25850       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310
25851  *                 elif t == NPY_UBYTE:       f = "B"
25852  *                 elif t == NPY_SHORT:       f = "h"
25853  *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
25854  *                 elif t == NPY_INT:         f = "i"
25855  *                 elif t == NPY_UINT:        f = "I"
25856  */
25857       __pyx_v_f = ((char *)"H");
25858       break;
25859       case NPY_INT:
25860 
25861       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311
25862  *                 elif t == NPY_SHORT:       f = "h"
25863  *                 elif t == NPY_USHORT:      f = "H"
25864  *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
25865  *                 elif t == NPY_UINT:        f = "I"
25866  *                 elif t == NPY_LONG:        f = "l"
25867  */
25868       __pyx_v_f = ((char *)"i");
25869       break;
25870       case NPY_UINT:
25871 
25872       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312
25873  *                 elif t == NPY_USHORT:      f = "H"
25874  *                 elif t == NPY_INT:         f = "i"
25875  *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
25876  *                 elif t == NPY_LONG:        f = "l"
25877  *                 elif t == NPY_ULONG:       f = "L"
25878  */
25879       __pyx_v_f = ((char *)"I");
25880       break;
25881       case NPY_LONG:
25882 
25883       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313
25884  *                 elif t == NPY_INT:         f = "i"
25885  *                 elif t == NPY_UINT:        f = "I"
25886  *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
25887  *                 elif t == NPY_ULONG:       f = "L"
25888  *                 elif t == NPY_LONGLONG:    f = "q"
25889  */
25890       __pyx_v_f = ((char *)"l");
25891       break;
25892       case NPY_ULONG:
25893 
25894       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314
25895  *                 elif t == NPY_UINT:        f = "I"
25896  *                 elif t == NPY_LONG:        f = "l"
25897  *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
25898  *                 elif t == NPY_LONGLONG:    f = "q"
25899  *                 elif t == NPY_ULONGLONG:   f = "Q"
25900  */
25901       __pyx_v_f = ((char *)"L");
25902       break;
25903       case NPY_LONGLONG:
25904 
25905       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315
25906  *                 elif t == NPY_LONG:        f = "l"
25907  *                 elif t == NPY_ULONG:       f = "L"
25908  *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
25909  *                 elif t == NPY_ULONGLONG:   f = "Q"
25910  *                 elif t == NPY_FLOAT:       f = "f"
25911  */
25912       __pyx_v_f = ((char *)"q");
25913       break;
25914       case NPY_ULONGLONG:
25915 
25916       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316
25917  *                 elif t == NPY_ULONG:       f = "L"
25918  *                 elif t == NPY_LONGLONG:    f = "q"
25919  *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
25920  *                 elif t == NPY_FLOAT:       f = "f"
25921  *                 elif t == NPY_DOUBLE:      f = "d"
25922  */
25923       __pyx_v_f = ((char *)"Q");
25924       break;
25925       case NPY_FLOAT:
25926 
25927       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317
25928  *                 elif t == NPY_LONGLONG:    f = "q"
25929  *                 elif t == NPY_ULONGLONG:   f = "Q"
25930  *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
25931  *                 elif t == NPY_DOUBLE:      f = "d"
25932  *                 elif t == NPY_LONGDOUBLE:  f = "g"
25933  */
25934       __pyx_v_f = ((char *)"f");
25935       break;
25936       case NPY_DOUBLE:
25937 
25938       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318
25939  *                 elif t == NPY_ULONGLONG:   f = "Q"
25940  *                 elif t == NPY_FLOAT:       f = "f"
25941  *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
25942  *                 elif t == NPY_LONGDOUBLE:  f = "g"
25943  *                 elif t == NPY_CFLOAT:      f = "Zf"
25944  */
25945       __pyx_v_f = ((char *)"d");
25946       break;
25947       case NPY_LONGDOUBLE:
25948 
25949       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319
25950  *                 elif t == NPY_FLOAT:       f = "f"
25951  *                 elif t == NPY_DOUBLE:      f = "d"
25952  *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
25953  *                 elif t == NPY_CFLOAT:      f = "Zf"
25954  *                 elif t == NPY_CDOUBLE:     f = "Zd"
25955  */
25956       __pyx_v_f = ((char *)"g");
25957       break;
25958       case NPY_CFLOAT:
25959 
25960       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320
25961  *                 elif t == NPY_DOUBLE:      f = "d"
25962  *                 elif t == NPY_LONGDOUBLE:  f = "g"
25963  *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
25964  *                 elif t == NPY_CDOUBLE:     f = "Zd"
25965  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
25966  */
25967       __pyx_v_f = ((char *)"Zf");
25968       break;
25969       case NPY_CDOUBLE:
25970 
25971       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321
25972  *                 elif t == NPY_LONGDOUBLE:  f = "g"
25973  *                 elif t == NPY_CFLOAT:      f = "Zf"
25974  *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
25975  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
25976  *                 elif t == NPY_OBJECT:      f = "O"
25977  */
25978       __pyx_v_f = ((char *)"Zd");
25979       break;
25980       case NPY_CLONGDOUBLE:
25981 
25982       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322
25983  *                 elif t == NPY_CFLOAT:      f = "Zf"
25984  *                 elif t == NPY_CDOUBLE:     f = "Zd"
25985  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
25986  *                 elif t == NPY_OBJECT:      f = "O"
25987  *                 else:
25988  */
25989       __pyx_v_f = ((char *)"Zg");
25990       break;
25991       case NPY_OBJECT:
25992 
25993       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323
25994  *                 elif t == NPY_CDOUBLE:     f = "Zd"
25995  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
25996  *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
25997  *                 else:
25998  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
25999  */
26000       __pyx_v_f = ((char *)"O");
26001       break;
26002       default:
26003 
26004       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325
26005  *                 elif t == NPY_OBJECT:      f = "O"
26006  *                 else:
26007  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
26008  *                 info.format = f
26009  *                 return
26010  */
26011       __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
26012       __Pyx_GOTREF(__pyx_t_3);
26013       __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)
26014       __Pyx_GOTREF(__pyx_t_8);
26015       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26016       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
26017       __Pyx_GOTREF(__pyx_t_3);
26018       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
26019       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26020       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26021       __PYX_ERR(2, 325, __pyx_L1_error)
26022       break;
26023     }
26024 
26025     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326
26026  *                 else:
26027  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26028  *                 info.format = f             # <<<<<<<<<<<<<<
26029  *                 return
26030  *             else:
26031  */
26032     __pyx_v_info->format = __pyx_v_f;
26033 
26034     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327
26035  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26036  *                 info.format = f
26037  *                 return             # <<<<<<<<<<<<<<
26038  *             else:
26039  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
26040  */
26041     __pyx_r = 0;
26042     goto __pyx_L0;
26043 
26044     /* "../../env/miniconda/envs/py37/lib/python3.7/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   }
26052 
26053   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329
26054  *                 return
26055  *             else:
26056  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
26057  *                 info.format[0] = c'^' # Native data types, manual alignment
26058  *                 offset = 0
26059  */
26060   /*else*/ {
26061     __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
26062 
26063     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330
26064  *             else:
26065  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
26066  *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
26067  *                 offset = 0
26068  *                 f = _util_dtypestring(descr, info.format + 1,
26069  */
26070     (__pyx_v_info->format[0]) = '^';
26071 
26072     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331
26073  *                 info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
26074  *                 info.format[0] = c'^' # Native data types, manual alignment
26075  *                 offset = 0             # <<<<<<<<<<<<<<
26076  *                 f = _util_dtypestring(descr, info.format + 1,
26077  *                                       info.format + _buffer_format_string_len,
26078  */
26079     __pyx_v_offset = 0;
26080 
26081     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332
26082  *                 info.format[0] = c'^' # Native data types, manual alignment
26083  *                 offset = 0
26084  *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
26085  *                                       info.format + _buffer_format_string_len,
26086  *                                       &offset)
26087  */
26088     __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)
26089     __pyx_v_f = __pyx_t_9;
26090 
26091     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335
26092  *                                       info.format + _buffer_format_string_len,
26093  *                                       &offset)
26094  *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
26095  *
26096  *         def __releasebuffer__(ndarray self, Py_buffer* info):
26097  */
26098     (__pyx_v_f[0]) = '\x00';
26099   }
26100 
26101   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
26102  *         # experimental exception made for __getbuffer__ and __releasebuffer__
26103  *         # -- the details of this may change.
26104  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
26105  *             # This implementation of getbuffer is geared towards Cython
26106  *             # requirements, and does not yet fulfill the PEP.
26107  */
26108 
26109   /* function exit code */
26110   __pyx_r = 0;
26111   goto __pyx_L0;
26112   __pyx_L1_error:;
26113   __Pyx_XDECREF(__pyx_t_3);
26114   __Pyx_XDECREF(__pyx_t_8);
26115   __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26116   __pyx_r = -1;
26117   if (__pyx_v_info->obj != NULL) {
26118     __Pyx_GOTREF(__pyx_v_info->obj);
26119     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
26120   }
26121   goto __pyx_L2;
26122   __pyx_L0:;
26123   if (__pyx_v_info->obj == Py_None) {
26124     __Pyx_GOTREF(__pyx_v_info->obj);
26125     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
26126   }
26127   __pyx_L2:;
26128   __Pyx_XDECREF((PyObject *)__pyx_v_descr);
26129   __Pyx_RefNannyFinishContext();
26130   return __pyx_r;
26131 }
26132 
26133 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
26134  *                 f[0] = c'\0' # Terminate format string
26135  *
26136  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
26137  *             if PyArray_HASFIELDS(self):
26138  *                 PyObject_Free(info.format)
26139  */
26140 
26141 /* Python wrapper */
26142 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)26143 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
26144   __Pyx_RefNannyDeclarations
26145   __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
26146   __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
26147 
26148   /* function exit code */
26149   __Pyx_RefNannyFinishContext();
26150 }
26151 
__pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info)26152 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
26153   __Pyx_RefNannyDeclarations
26154   int __pyx_t_1;
26155   __Pyx_RefNannySetupContext("__releasebuffer__", 0);
26156 
26157   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
26158  *
26159  *         def __releasebuffer__(ndarray self, Py_buffer* info):
26160  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
26161  *                 PyObject_Free(info.format)
26162  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
26163  */
26164   __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
26165   if (__pyx_t_1) {
26166 
26167     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339
26168  *         def __releasebuffer__(ndarray self, Py_buffer* info):
26169  *             if PyArray_HASFIELDS(self):
26170  *                 PyObject_Free(info.format)             # <<<<<<<<<<<<<<
26171  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
26172  *                 PyObject_Free(info.strides)
26173  */
26174     PyObject_Free(__pyx_v_info->format);
26175 
26176     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
26177  *
26178  *         def __releasebuffer__(ndarray self, Py_buffer* info):
26179  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
26180  *                 PyObject_Free(info.format)
26181  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
26182  */
26183   }
26184 
26185   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
26186  *             if PyArray_HASFIELDS(self):
26187  *                 PyObject_Free(info.format)
26188  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
26189  *                 PyObject_Free(info.strides)
26190  *                 # info.shape was stored after info.strides in the same block
26191  */
26192   __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
26193   if (__pyx_t_1) {
26194 
26195     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341
26196  *                 PyObject_Free(info.format)
26197  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
26198  *                 PyObject_Free(info.strides)             # <<<<<<<<<<<<<<
26199  *                 # info.shape was stored after info.strides in the same block
26200  *
26201  */
26202     PyObject_Free(__pyx_v_info->strides);
26203 
26204     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
26205  *             if PyArray_HASFIELDS(self):
26206  *                 PyObject_Free(info.format)
26207  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
26208  *                 PyObject_Free(info.strides)
26209  *                 # info.shape was stored after info.strides in the same block
26210  */
26211   }
26212 
26213   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
26214  *                 f[0] = c'\0' # Terminate format string
26215  *
26216  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
26217  *             if PyArray_HASFIELDS(self):
26218  *                 PyObject_Free(info.format)
26219  */
26220 
26221   /* function exit code */
26222   __Pyx_RefNannyFinishContext();
26223 }
26224 
26225 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
26226  * ctypedef npy_cdouble     complex_t
26227  *
26228  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
26229  *     return PyArray_MultiIterNew(1, <void*>a)
26230  *
26231  */
26232 
__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject * __pyx_v_a)26233 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
26234   PyObject *__pyx_r = NULL;
26235   __Pyx_RefNannyDeclarations
26236   PyObject *__pyx_t_1 = NULL;
26237   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
26238 
26239   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
26240  *
26241  * cdef inline object PyArray_MultiIterNew1(a):
26242  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
26243  *
26244  * cdef inline object PyArray_MultiIterNew2(a, b):
26245  */
26246   __Pyx_XDECREF(__pyx_r);
26247   __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error)
26248   __Pyx_GOTREF(__pyx_t_1);
26249   __pyx_r = __pyx_t_1;
26250   __pyx_t_1 = 0;
26251   goto __pyx_L0;
26252 
26253   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
26254  * ctypedef npy_cdouble     complex_t
26255  *
26256  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
26257  *     return PyArray_MultiIterNew(1, <void*>a)
26258  *
26259  */
26260 
26261   /* function exit code */
26262   __pyx_L1_error:;
26263   __Pyx_XDECREF(__pyx_t_1);
26264   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
26265   __pyx_r = 0;
26266   __pyx_L0:;
26267   __Pyx_XGIVEREF(__pyx_r);
26268   __Pyx_RefNannyFinishContext();
26269   return __pyx_r;
26270 }
26271 
26272 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
26273  *     return PyArray_MultiIterNew(1, <void*>a)
26274  *
26275  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
26276  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26277  *
26278  */
26279 
__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject * __pyx_v_a,PyObject * __pyx_v_b)26280 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
26281   PyObject *__pyx_r = NULL;
26282   __Pyx_RefNannyDeclarations
26283   PyObject *__pyx_t_1 = NULL;
26284   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
26285 
26286   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825
26287  *
26288  * cdef inline object PyArray_MultiIterNew2(a, b):
26289  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
26290  *
26291  * cdef inline object PyArray_MultiIterNew3(a, b, c):
26292  */
26293   __Pyx_XDECREF(__pyx_r);
26294   __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)
26295   __Pyx_GOTREF(__pyx_t_1);
26296   __pyx_r = __pyx_t_1;
26297   __pyx_t_1 = 0;
26298   goto __pyx_L0;
26299 
26300   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
26301  *     return PyArray_MultiIterNew(1, <void*>a)
26302  *
26303  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
26304  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26305  *
26306  */
26307 
26308   /* function exit code */
26309   __pyx_L1_error:;
26310   __Pyx_XDECREF(__pyx_t_1);
26311   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
26312   __pyx_r = 0;
26313   __pyx_L0:;
26314   __Pyx_XGIVEREF(__pyx_r);
26315   __Pyx_RefNannyFinishContext();
26316   return __pyx_r;
26317 }
26318 
26319 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
26320  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26321  *
26322  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
26323  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26324  *
26325  */
26326 
__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c)26327 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
26328   PyObject *__pyx_r = NULL;
26329   __Pyx_RefNannyDeclarations
26330   PyObject *__pyx_t_1 = NULL;
26331   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
26332 
26333   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
26334  *
26335  * cdef inline object PyArray_MultiIterNew3(a, b, c):
26336  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
26337  *
26338  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
26339  */
26340   __Pyx_XDECREF(__pyx_r);
26341   __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)
26342   __Pyx_GOTREF(__pyx_t_1);
26343   __pyx_r = __pyx_t_1;
26344   __pyx_t_1 = 0;
26345   goto __pyx_L0;
26346 
26347   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
26348  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26349  *
26350  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
26351  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26352  *
26353  */
26354 
26355   /* function exit code */
26356   __pyx_L1_error:;
26357   __Pyx_XDECREF(__pyx_t_1);
26358   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
26359   __pyx_r = 0;
26360   __pyx_L0:;
26361   __Pyx_XGIVEREF(__pyx_r);
26362   __Pyx_RefNannyFinishContext();
26363   return __pyx_r;
26364 }
26365 
26366 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
26367  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26368  *
26369  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
26370  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26371  *
26372  */
26373 
__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d)26374 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) {
26375   PyObject *__pyx_r = NULL;
26376   __Pyx_RefNannyDeclarations
26377   PyObject *__pyx_t_1 = NULL;
26378   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
26379 
26380   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
26381  *
26382  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
26383  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
26384  *
26385  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
26386  */
26387   __Pyx_XDECREF(__pyx_r);
26388   __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)
26389   __Pyx_GOTREF(__pyx_t_1);
26390   __pyx_r = __pyx_t_1;
26391   __pyx_t_1 = 0;
26392   goto __pyx_L0;
26393 
26394   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
26395  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26396  *
26397  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
26398  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26399  *
26400  */
26401 
26402   /* function exit code */
26403   __pyx_L1_error:;
26404   __Pyx_XDECREF(__pyx_t_1);
26405   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
26406   __pyx_r = 0;
26407   __pyx_L0:;
26408   __Pyx_XGIVEREF(__pyx_r);
26409   __Pyx_RefNannyFinishContext();
26410   return __pyx_r;
26411 }
26412 
26413 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
26414  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26415  *
26416  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
26417  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26418  *
26419  */
26420 
__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)26421 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) {
26422   PyObject *__pyx_r = NULL;
26423   __Pyx_RefNannyDeclarations
26424   PyObject *__pyx_t_1 = NULL;
26425   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
26426 
26427   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
26428  *
26429  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
26430  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
26431  *
26432  * cdef inline tuple PyDataType_SHAPE(dtype d):
26433  */
26434   __Pyx_XDECREF(__pyx_r);
26435   __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)
26436   __Pyx_GOTREF(__pyx_t_1);
26437   __pyx_r = __pyx_t_1;
26438   __pyx_t_1 = 0;
26439   goto __pyx_L0;
26440 
26441   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
26442  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26443  *
26444  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
26445  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26446  *
26447  */
26448 
26449   /* function exit code */
26450   __pyx_L1_error:;
26451   __Pyx_XDECREF(__pyx_t_1);
26452   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
26453   __pyx_r = 0;
26454   __pyx_L0:;
26455   __Pyx_XGIVEREF(__pyx_r);
26456   __Pyx_RefNannyFinishContext();
26457   return __pyx_r;
26458 }
26459 
26460 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
26461  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26462  *
26463  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
26464  *     if PyDataType_HASSUBARRAY(d):
26465  *         return <tuple>d.subarray.shape
26466  */
26467 
__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr * __pyx_v_d)26468 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
26469   PyObject *__pyx_r = NULL;
26470   __Pyx_RefNannyDeclarations
26471   int __pyx_t_1;
26472   __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
26473 
26474   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
26475  *
26476  * cdef inline tuple PyDataType_SHAPE(dtype d):
26477  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
26478  *         return <tuple>d.subarray.shape
26479  *     else:
26480  */
26481   __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
26482   if (__pyx_t_1) {
26483 
26484     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
26485  * cdef inline tuple PyDataType_SHAPE(dtype d):
26486  *     if PyDataType_HASSUBARRAY(d):
26487  *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
26488  *     else:
26489  *         return ()
26490  */
26491     __Pyx_XDECREF(__pyx_r);
26492     __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
26493     __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
26494     goto __pyx_L0;
26495 
26496     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
26497  *
26498  * cdef inline tuple PyDataType_SHAPE(dtype d):
26499  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
26500  *         return <tuple>d.subarray.shape
26501  *     else:
26502  */
26503   }
26504 
26505   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
26506  *         return <tuple>d.subarray.shape
26507  *     else:
26508  *         return ()             # <<<<<<<<<<<<<<
26509  *
26510  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
26511  */
26512   /*else*/ {
26513     __Pyx_XDECREF(__pyx_r);
26514     __Pyx_INCREF(__pyx_empty_tuple);
26515     __pyx_r = __pyx_empty_tuple;
26516     goto __pyx_L0;
26517   }
26518 
26519   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
26520  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26521  *
26522  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
26523  *     if PyDataType_HASSUBARRAY(d):
26524  *         return <tuple>d.subarray.shape
26525  */
26526 
26527   /* function exit code */
26528   __pyx_L0:;
26529   __Pyx_XGIVEREF(__pyx_r);
26530   __Pyx_RefNannyFinishContext();
26531   return __pyx_r;
26532 }
26533 
26534 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
26535  *         return ()
26536  *
26537  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
26538  *     # Recursive utility function used in __getbuffer__ to get format
26539  *     # string. The new location in the format string is returned.
26540  */
26541 
__pyx_f_5numpy__util_dtypestring(PyArray_Descr * __pyx_v_descr,char * __pyx_v_f,char * __pyx_v_end,int * __pyx_v_offset)26542 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) {
26543   PyArray_Descr *__pyx_v_child = 0;
26544   int __pyx_v_endian_detector;
26545   int __pyx_v_little_endian;
26546   PyObject *__pyx_v_fields = 0;
26547   PyObject *__pyx_v_childname = NULL;
26548   PyObject *__pyx_v_new_offset = NULL;
26549   PyObject *__pyx_v_t = NULL;
26550   char *__pyx_r;
26551   __Pyx_RefNannyDeclarations
26552   PyObject *__pyx_t_1 = NULL;
26553   Py_ssize_t __pyx_t_2;
26554   PyObject *__pyx_t_3 = NULL;
26555   PyObject *__pyx_t_4 = NULL;
26556   int __pyx_t_5;
26557   int __pyx_t_6;
26558   int __pyx_t_7;
26559   long __pyx_t_8;
26560   char *__pyx_t_9;
26561   __Pyx_RefNannySetupContext("_util_dtypestring", 0);
26562 
26563   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847
26564  *
26565  *     cdef dtype child
26566  *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
26567  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
26568  *     cdef tuple fields
26569  */
26570   __pyx_v_endian_detector = 1;
26571 
26572   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848
26573  *     cdef dtype child
26574  *     cdef int endian_detector = 1
26575  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
26576  *     cdef tuple fields
26577  *
26578  */
26579   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
26580 
26581   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
26582  *     cdef tuple fields
26583  *
26584  *     for childname in descr.names:             # <<<<<<<<<<<<<<
26585  *         fields = descr.fields[childname]
26586  *         child, new_offset = fields
26587  */
26588   if (unlikely(__pyx_v_descr->names == Py_None)) {
26589     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
26590     __PYX_ERR(2, 851, __pyx_L1_error)
26591   }
26592   __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
26593   for (;;) {
26594     if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
26595     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26596     __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)
26597     #else
26598     __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)
26599     __Pyx_GOTREF(__pyx_t_3);
26600     #endif
26601     __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
26602     __pyx_t_3 = 0;
26603 
26604     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852
26605  *
26606  *     for childname in descr.names:
26607  *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
26608  *         child, new_offset = fields
26609  *
26610  */
26611     if (unlikely(__pyx_v_descr->fields == Py_None)) {
26612       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
26613       __PYX_ERR(2, 852, __pyx_L1_error)
26614     }
26615     __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)
26616     __Pyx_GOTREF(__pyx_t_3);
26617     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)
26618     __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
26619     __pyx_t_3 = 0;
26620 
26621     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853
26622  *     for childname in descr.names:
26623  *         fields = descr.fields[childname]
26624  *         child, new_offset = fields             # <<<<<<<<<<<<<<
26625  *
26626  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
26627  */
26628     if (likely(__pyx_v_fields != Py_None)) {
26629       PyObject* sequence = __pyx_v_fields;
26630       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
26631       if (unlikely(size != 2)) {
26632         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
26633         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
26634         __PYX_ERR(2, 853, __pyx_L1_error)
26635       }
26636       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26637       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
26638       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
26639       __Pyx_INCREF(__pyx_t_3);
26640       __Pyx_INCREF(__pyx_t_4);
26641       #else
26642       __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error)
26643       __Pyx_GOTREF(__pyx_t_3);
26644       __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error)
26645       __Pyx_GOTREF(__pyx_t_4);
26646       #endif
26647     } else {
26648       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error)
26649     }
26650     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error)
26651     __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
26652     __pyx_t_3 = 0;
26653     __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
26654     __pyx_t_4 = 0;
26655 
26656     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
26657  *         child, new_offset = fields
26658  *
26659  *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
26660  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26661  *
26662  */
26663     __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error)
26664     __Pyx_GOTREF(__pyx_t_4);
26665     __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error)
26666     __Pyx_GOTREF(__pyx_t_3);
26667     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26668     __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)
26669     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26670     __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
26671     if (unlikely(__pyx_t_6)) {
26672 
26673       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
26674  *
26675  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
26676  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
26677  *
26678  *         if ((child.byteorder == c'>' and little_endian) or
26679  */
26680       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error)
26681       __Pyx_GOTREF(__pyx_t_3);
26682       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26683       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26684       __PYX_ERR(2, 856, __pyx_L1_error)
26685 
26686       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
26687  *         child, new_offset = fields
26688  *
26689  *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
26690  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26691  *
26692  */
26693     }
26694 
26695     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
26696  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26697  *
26698  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
26699  *             (child.byteorder == c'<' and not little_endian)):
26700  *             raise ValueError(u"Non-native byte order not supported")
26701  */
26702     __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
26703     if (!__pyx_t_7) {
26704       goto __pyx_L8_next_or;
26705     } else {
26706     }
26707     __pyx_t_7 = (__pyx_v_little_endian != 0);
26708     if (!__pyx_t_7) {
26709     } else {
26710       __pyx_t_6 = __pyx_t_7;
26711       goto __pyx_L7_bool_binop_done;
26712     }
26713     __pyx_L8_next_or:;
26714 
26715     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859
26716  *
26717  *         if ((child.byteorder == c'>' and little_endian) or
26718  *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
26719  *             raise ValueError(u"Non-native byte order not supported")
26720  *             # One could encode it in the format string and have Cython
26721  */
26722     __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
26723     if (__pyx_t_7) {
26724     } else {
26725       __pyx_t_6 = __pyx_t_7;
26726       goto __pyx_L7_bool_binop_done;
26727     }
26728     __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
26729     __pyx_t_6 = __pyx_t_7;
26730     __pyx_L7_bool_binop_done:;
26731 
26732     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
26733  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26734  *
26735  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
26736  *             (child.byteorder == c'<' and not little_endian)):
26737  *             raise ValueError(u"Non-native byte order not supported")
26738  */
26739     if (unlikely(__pyx_t_6)) {
26740 
26741       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860
26742  *         if ((child.byteorder == c'>' and little_endian) or
26743  *             (child.byteorder == c'<' and not little_endian)):
26744  *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
26745  *             # One could encode it in the format string and have Cython
26746  *             # complain instead, BUT: < and > in format strings also imply
26747  */
26748       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error)
26749       __Pyx_GOTREF(__pyx_t_3);
26750       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26751       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26752       __PYX_ERR(2, 860, __pyx_L1_error)
26753 
26754       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
26755  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26756  *
26757  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
26758  *             (child.byteorder == c'<' and not little_endian)):
26759  *             raise ValueError(u"Non-native byte order not supported")
26760  */
26761     }
26762 
26763     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870
26764  *
26765  *         # Output padding bytes
26766  *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
26767  *             f[0] = 120 # "x"; pad byte
26768  *             f += 1
26769  */
26770     while (1) {
26771       __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error)
26772       __Pyx_GOTREF(__pyx_t_3);
26773       __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)
26774       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26775       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error)
26776       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26777       if (!__pyx_t_6) break;
26778 
26779       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871
26780  *         # Output padding bytes
26781  *         while offset[0] < new_offset:
26782  *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
26783  *             f += 1
26784  *             offset[0] += 1
26785  */
26786       (__pyx_v_f[0]) = 0x78;
26787 
26788       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872
26789  *         while offset[0] < new_offset:
26790  *             f[0] = 120 # "x"; pad byte
26791  *             f += 1             # <<<<<<<<<<<<<<
26792  *             offset[0] += 1
26793  *
26794  */
26795       __pyx_v_f = (__pyx_v_f + 1);
26796 
26797       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873
26798  *             f[0] = 120 # "x"; pad byte
26799  *             f += 1
26800  *             offset[0] += 1             # <<<<<<<<<<<<<<
26801  *
26802  *         offset[0] += child.itemsize
26803  */
26804       __pyx_t_8 = 0;
26805       (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
26806     }
26807 
26808     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875
26809  *             offset[0] += 1
26810  *
26811  *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
26812  *
26813  *         if not PyDataType_HASFIELDS(child):
26814  */
26815     __pyx_t_8 = 0;
26816     (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
26817 
26818     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
26819  *         offset[0] += child.itemsize
26820  *
26821  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
26822  *             t = child.type_num
26823  *             if end - f < 5:
26824  */
26825     __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
26826     if (__pyx_t_6) {
26827 
26828       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878
26829  *
26830  *         if not PyDataType_HASFIELDS(child):
26831  *             t = child.type_num             # <<<<<<<<<<<<<<
26832  *             if end - f < 5:
26833  *                 raise RuntimeError(u"Format string allocated too short.")
26834  */
26835       __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error)
26836       __Pyx_GOTREF(__pyx_t_4);
26837       __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
26838       __pyx_t_4 = 0;
26839 
26840       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
26841  *         if not PyDataType_HASFIELDS(child):
26842  *             t = child.type_num
26843  *             if end - f < 5:             # <<<<<<<<<<<<<<
26844  *                 raise RuntimeError(u"Format string allocated too short.")
26845  *
26846  */
26847       __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
26848       if (unlikely(__pyx_t_6)) {
26849 
26850         /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
26851  *             t = child.type_num
26852  *             if end - f < 5:
26853  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
26854  *
26855  *             # Until ticket #99 is fixed, use integers to avoid warnings
26856  */
26857         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error)
26858         __Pyx_GOTREF(__pyx_t_4);
26859         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
26860         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26861         __PYX_ERR(2, 880, __pyx_L1_error)
26862 
26863         /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
26864  *         if not PyDataType_HASFIELDS(child):
26865  *             t = child.type_num
26866  *             if end - f < 5:             # <<<<<<<<<<<<<<
26867  *                 raise RuntimeError(u"Format string allocated too short.")
26868  *
26869  */
26870       }
26871 
26872       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883
26873  *
26874  *             # Until ticket #99 is fixed, use integers to avoid warnings
26875  *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
26876  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
26877  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
26878  */
26879       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error)
26880       __Pyx_GOTREF(__pyx_t_4);
26881       __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)
26882       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26883       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error)
26884       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26885       if (__pyx_t_6) {
26886         (__pyx_v_f[0]) = 98;
26887         goto __pyx_L15;
26888       }
26889 
26890       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884
26891  *             # Until ticket #99 is fixed, use integers to avoid warnings
26892  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
26893  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
26894  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
26895  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
26896  */
26897       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error)
26898       __Pyx_GOTREF(__pyx_t_3);
26899       __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)
26900       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26901       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error)
26902       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26903       if (__pyx_t_6) {
26904         (__pyx_v_f[0]) = 66;
26905         goto __pyx_L15;
26906       }
26907 
26908       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885
26909  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
26910  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
26911  *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
26912  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
26913  *             elif t == NPY_INT:         f[0] = 105 #"i"
26914  */
26915       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error)
26916       __Pyx_GOTREF(__pyx_t_4);
26917       __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)
26918       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26919       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error)
26920       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26921       if (__pyx_t_6) {
26922         (__pyx_v_f[0]) = 0x68;
26923         goto __pyx_L15;
26924       }
26925 
26926       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886
26927  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
26928  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
26929  *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
26930  *             elif t == NPY_INT:         f[0] = 105 #"i"
26931  *             elif t == NPY_UINT:        f[0] =  73 #"I"
26932  */
26933       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error)
26934       __Pyx_GOTREF(__pyx_t_3);
26935       __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)
26936       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26937       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error)
26938       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26939       if (__pyx_t_6) {
26940         (__pyx_v_f[0]) = 72;
26941         goto __pyx_L15;
26942       }
26943 
26944       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887
26945  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
26946  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
26947  *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
26948  *             elif t == NPY_UINT:        f[0] =  73 #"I"
26949  *             elif t == NPY_LONG:        f[0] = 108 #"l"
26950  */
26951       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error)
26952       __Pyx_GOTREF(__pyx_t_4);
26953       __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)
26954       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26955       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error)
26956       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26957       if (__pyx_t_6) {
26958         (__pyx_v_f[0]) = 0x69;
26959         goto __pyx_L15;
26960       }
26961 
26962       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888
26963  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
26964  *             elif t == NPY_INT:         f[0] = 105 #"i"
26965  *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
26966  *             elif t == NPY_LONG:        f[0] = 108 #"l"
26967  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
26968  */
26969       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error)
26970       __Pyx_GOTREF(__pyx_t_3);
26971       __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)
26972       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26973       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error)
26974       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26975       if (__pyx_t_6) {
26976         (__pyx_v_f[0]) = 73;
26977         goto __pyx_L15;
26978       }
26979 
26980       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889
26981  *             elif t == NPY_INT:         f[0] = 105 #"i"
26982  *             elif t == NPY_UINT:        f[0] =  73 #"I"
26983  *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
26984  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
26985  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
26986  */
26987       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error)
26988       __Pyx_GOTREF(__pyx_t_4);
26989       __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)
26990       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26991       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error)
26992       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26993       if (__pyx_t_6) {
26994         (__pyx_v_f[0]) = 0x6C;
26995         goto __pyx_L15;
26996       }
26997 
26998       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890
26999  *             elif t == NPY_UINT:        f[0] =  73 #"I"
27000  *             elif t == NPY_LONG:        f[0] = 108 #"l"
27001  *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
27002  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
27003  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
27004  */
27005       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error)
27006       __Pyx_GOTREF(__pyx_t_3);
27007       __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)
27008       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27009       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error)
27010       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27011       if (__pyx_t_6) {
27012         (__pyx_v_f[0]) = 76;
27013         goto __pyx_L15;
27014       }
27015 
27016       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891
27017  *             elif t == NPY_LONG:        f[0] = 108 #"l"
27018  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
27019  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
27020  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
27021  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
27022  */
27023       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error)
27024       __Pyx_GOTREF(__pyx_t_4);
27025       __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)
27026       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27027       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error)
27028       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27029       if (__pyx_t_6) {
27030         (__pyx_v_f[0]) = 0x71;
27031         goto __pyx_L15;
27032       }
27033 
27034       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892
27035  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
27036  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
27037  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
27038  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
27039  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
27040  */
27041       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error)
27042       __Pyx_GOTREF(__pyx_t_3);
27043       __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)
27044       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27045       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error)
27046       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27047       if (__pyx_t_6) {
27048         (__pyx_v_f[0]) = 81;
27049         goto __pyx_L15;
27050       }
27051 
27052       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893
27053  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
27054  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
27055  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
27056  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
27057  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
27058  */
27059       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error)
27060       __Pyx_GOTREF(__pyx_t_4);
27061       __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)
27062       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27063       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error)
27064       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27065       if (__pyx_t_6) {
27066         (__pyx_v_f[0]) = 0x66;
27067         goto __pyx_L15;
27068       }
27069 
27070       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894
27071  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
27072  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
27073  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
27074  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
27075  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
27076  */
27077       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error)
27078       __Pyx_GOTREF(__pyx_t_3);
27079       __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)
27080       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27081       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error)
27082       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27083       if (__pyx_t_6) {
27084         (__pyx_v_f[0]) = 0x64;
27085         goto __pyx_L15;
27086       }
27087 
27088       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895
27089  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
27090  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
27091  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
27092  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
27093  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
27094  */
27095       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error)
27096       __Pyx_GOTREF(__pyx_t_4);
27097       __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)
27098       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27099       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error)
27100       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27101       if (__pyx_t_6) {
27102         (__pyx_v_f[0]) = 0x67;
27103         goto __pyx_L15;
27104       }
27105 
27106       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896
27107  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
27108  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
27109  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
27110  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
27111  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27112  */
27113       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error)
27114       __Pyx_GOTREF(__pyx_t_3);
27115       __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)
27116       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27117       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error)
27118       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27119       if (__pyx_t_6) {
27120         (__pyx_v_f[0]) = 90;
27121         (__pyx_v_f[1]) = 0x66;
27122         __pyx_v_f = (__pyx_v_f + 1);
27123         goto __pyx_L15;
27124       }
27125 
27126       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897
27127  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
27128  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
27129  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
27130  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27131  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
27132  */
27133       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error)
27134       __Pyx_GOTREF(__pyx_t_4);
27135       __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)
27136       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27137       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error)
27138       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27139       if (__pyx_t_6) {
27140         (__pyx_v_f[0]) = 90;
27141         (__pyx_v_f[1]) = 0x64;
27142         __pyx_v_f = (__pyx_v_f + 1);
27143         goto __pyx_L15;
27144       }
27145 
27146       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898
27147  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
27148  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
27149  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
27150  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
27151  *             else:
27152  */
27153       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error)
27154       __Pyx_GOTREF(__pyx_t_3);
27155       __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)
27156       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27157       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error)
27158       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27159       if (__pyx_t_6) {
27160         (__pyx_v_f[0]) = 90;
27161         (__pyx_v_f[1]) = 0x67;
27162         __pyx_v_f = (__pyx_v_f + 1);
27163         goto __pyx_L15;
27164       }
27165 
27166       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899
27167  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
27168  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27169  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
27170  *             else:
27171  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
27172  */
27173       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error)
27174       __Pyx_GOTREF(__pyx_t_4);
27175       __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)
27176       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27177       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error)
27178       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27179       if (likely(__pyx_t_6)) {
27180         (__pyx_v_f[0]) = 79;
27181         goto __pyx_L15;
27182       }
27183 
27184       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901
27185  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
27186  *             else:
27187  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
27188  *             f += 1
27189  *         else:
27190  */
27191       /*else*/ {
27192         __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)
27193         __Pyx_GOTREF(__pyx_t_3);
27194         __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error)
27195         __Pyx_GOTREF(__pyx_t_4);
27196         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27197         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
27198         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27199         __PYX_ERR(2, 901, __pyx_L1_error)
27200       }
27201       __pyx_L15:;
27202 
27203       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902
27204  *             else:
27205  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
27206  *             f += 1             # <<<<<<<<<<<<<<
27207  *         else:
27208  *             # Cython ignores struct boundary information ("T{...}"),
27209  */
27210       __pyx_v_f = (__pyx_v_f + 1);
27211 
27212       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
27213  *         offset[0] += child.itemsize
27214  *
27215  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
27216  *             t = child.type_num
27217  *             if end - f < 5:
27218  */
27219       goto __pyx_L13;
27220     }
27221 
27222     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906
27223  *             # Cython ignores struct boundary information ("T{...}"),
27224  *             # so don't output it
27225  *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
27226  *     return f
27227  *
27228  */
27229     /*else*/ {
27230       __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)
27231       __pyx_v_f = __pyx_t_9;
27232     }
27233     __pyx_L13:;
27234 
27235     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
27236  *     cdef tuple fields
27237  *
27238  *     for childname in descr.names:             # <<<<<<<<<<<<<<
27239  *         fields = descr.fields[childname]
27240  *         child, new_offset = fields
27241  */
27242   }
27243   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27244 
27245   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907
27246  *             # so don't output it
27247  *             f = _util_dtypestring(child, f, end, offset)
27248  *     return f             # <<<<<<<<<<<<<<
27249  *
27250  *
27251  */
27252   __pyx_r = __pyx_v_f;
27253   goto __pyx_L0;
27254 
27255   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
27256  *         return ()
27257  *
27258  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
27259  *     # Recursive utility function used in __getbuffer__ to get format
27260  *     # string. The new location in the format string is returned.
27261  */
27262 
27263   /* function exit code */
27264   __pyx_L1_error:;
27265   __Pyx_XDECREF(__pyx_t_1);
27266   __Pyx_XDECREF(__pyx_t_3);
27267   __Pyx_XDECREF(__pyx_t_4);
27268   __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
27269   __pyx_r = NULL;
27270   __pyx_L0:;
27271   __Pyx_XDECREF((PyObject *)__pyx_v_child);
27272   __Pyx_XDECREF(__pyx_v_fields);
27273   __Pyx_XDECREF(__pyx_v_childname);
27274   __Pyx_XDECREF(__pyx_v_new_offset);
27275   __Pyx_XDECREF(__pyx_v_t);
27276   __Pyx_RefNannyFinishContext();
27277   return __pyx_r;
27278 }
27279 
27280 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
27281  *     int _import_umath() except -1
27282  *
27283  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
27284  *     Py_INCREF(base) # important to do this before stealing the reference below!
27285  *     PyArray_SetBaseObject(arr, base)
27286  */
27287 
__pyx_f_5numpy_set_array_base(PyArrayObject * __pyx_v_arr,PyObject * __pyx_v_base)27288 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
27289   __Pyx_RefNannyDeclarations
27290   __Pyx_RefNannySetupContext("set_array_base", 0);
27291 
27292   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023
27293  *
27294  * cdef inline void set_array_base(ndarray arr, object base):
27295  *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
27296  *     PyArray_SetBaseObject(arr, base)
27297  *
27298  */
27299   Py_INCREF(__pyx_v_base);
27300 
27301   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024
27302  * cdef inline void set_array_base(ndarray arr, object base):
27303  *     Py_INCREF(base) # important to do this before stealing the reference below!
27304  *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
27305  *
27306  * cdef inline object get_array_base(ndarray arr):
27307  */
27308   (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
27309 
27310   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
27311  *     int _import_umath() except -1
27312  *
27313  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
27314  *     Py_INCREF(base) # important to do this before stealing the reference below!
27315  *     PyArray_SetBaseObject(arr, base)
27316  */
27317 
27318   /* function exit code */
27319   __Pyx_RefNannyFinishContext();
27320 }
27321 
27322 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
27323  *     PyArray_SetBaseObject(arr, base)
27324  *
27325  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
27326  *     base = PyArray_BASE(arr)
27327  *     if base is NULL:
27328  */
27329 
__pyx_f_5numpy_get_array_base(PyArrayObject * __pyx_v_arr)27330 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
27331   PyObject *__pyx_v_base;
27332   PyObject *__pyx_r = NULL;
27333   __Pyx_RefNannyDeclarations
27334   int __pyx_t_1;
27335   __Pyx_RefNannySetupContext("get_array_base", 0);
27336 
27337   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027
27338  *
27339  * cdef inline object get_array_base(ndarray arr):
27340  *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
27341  *     if base is NULL:
27342  *         return None
27343  */
27344   __pyx_v_base = PyArray_BASE(__pyx_v_arr);
27345 
27346   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
27347  * cdef inline object get_array_base(ndarray arr):
27348  *     base = PyArray_BASE(arr)
27349  *     if base is NULL:             # <<<<<<<<<<<<<<
27350  *         return None
27351  *     return <object>base
27352  */
27353   __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
27354   if (__pyx_t_1) {
27355 
27356     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029
27357  *     base = PyArray_BASE(arr)
27358  *     if base is NULL:
27359  *         return None             # <<<<<<<<<<<<<<
27360  *     return <object>base
27361  *
27362  */
27363     __Pyx_XDECREF(__pyx_r);
27364     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27365     goto __pyx_L0;
27366 
27367     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
27368  * cdef inline object get_array_base(ndarray arr):
27369  *     base = PyArray_BASE(arr)
27370  *     if base is NULL:             # <<<<<<<<<<<<<<
27371  *         return None
27372  *     return <object>base
27373  */
27374   }
27375 
27376   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030
27377  *     if base is NULL:
27378  *         return None
27379  *     return <object>base             # <<<<<<<<<<<<<<
27380  *
27381  * # Versions of the import_* functions which are more suitable for
27382  */
27383   __Pyx_XDECREF(__pyx_r);
27384   __Pyx_INCREF(((PyObject *)__pyx_v_base));
27385   __pyx_r = ((PyObject *)__pyx_v_base);
27386   goto __pyx_L0;
27387 
27388   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
27389  *     PyArray_SetBaseObject(arr, base)
27390  *
27391  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
27392  *     base = PyArray_BASE(arr)
27393  *     if base is NULL:
27394  */
27395 
27396   /* function exit code */
27397   __pyx_L0:;
27398   __Pyx_XGIVEREF(__pyx_r);
27399   __Pyx_RefNannyFinishContext();
27400   return __pyx_r;
27401 }
27402 
27403 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
27404  * # Versions of the import_* functions which are more suitable for
27405  * # Cython code.
27406  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
27407  *     try:
27408  *         _import_array()
27409  */
27410 
__pyx_f_5numpy_import_array(void)27411 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
27412   int __pyx_r;
27413   __Pyx_RefNannyDeclarations
27414   PyObject *__pyx_t_1 = NULL;
27415   PyObject *__pyx_t_2 = NULL;
27416   PyObject *__pyx_t_3 = NULL;
27417   int __pyx_t_4;
27418   PyObject *__pyx_t_5 = NULL;
27419   PyObject *__pyx_t_6 = NULL;
27420   PyObject *__pyx_t_7 = NULL;
27421   PyObject *__pyx_t_8 = NULL;
27422   __Pyx_RefNannySetupContext("import_array", 0);
27423 
27424   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
27425  * # Cython code.
27426  * cdef inline int import_array() except -1:
27427  *     try:             # <<<<<<<<<<<<<<
27428  *         _import_array()
27429  *     except Exception:
27430  */
27431   {
27432     __Pyx_PyThreadState_declare
27433     __Pyx_PyThreadState_assign
27434     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27435     __Pyx_XGOTREF(__pyx_t_1);
27436     __Pyx_XGOTREF(__pyx_t_2);
27437     __Pyx_XGOTREF(__pyx_t_3);
27438     /*try:*/ {
27439 
27440       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036
27441  * cdef inline int import_array() except -1:
27442  *     try:
27443  *         _import_array()             # <<<<<<<<<<<<<<
27444  *     except Exception:
27445  *         raise ImportError("numpy.core.multiarray failed to import")
27446  */
27447       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error)
27448 
27449       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
27450  * # Cython code.
27451  * cdef inline int import_array() except -1:
27452  *     try:             # <<<<<<<<<<<<<<
27453  *         _import_array()
27454  *     except Exception:
27455  */
27456     }
27457     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27458     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27459     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27460     goto __pyx_L8_try_end;
27461     __pyx_L3_error:;
27462 
27463     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037
27464  *     try:
27465  *         _import_array()
27466  *     except Exception:             # <<<<<<<<<<<<<<
27467  *         raise ImportError("numpy.core.multiarray failed to import")
27468  *
27469  */
27470     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27471     if (__pyx_t_4) {
27472       __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
27473       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error)
27474       __Pyx_GOTREF(__pyx_t_5);
27475       __Pyx_GOTREF(__pyx_t_6);
27476       __Pyx_GOTREF(__pyx_t_7);
27477 
27478       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
27479  *         _import_array()
27480  *     except Exception:
27481  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
27482  *
27483  * cdef inline int import_umath() except -1:
27484  */
27485       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error)
27486       __Pyx_GOTREF(__pyx_t_8);
27487       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27488       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27489       __PYX_ERR(2, 1038, __pyx_L5_except_error)
27490     }
27491     goto __pyx_L5_except_error;
27492     __pyx_L5_except_error:;
27493 
27494     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
27495  * # Cython code.
27496  * cdef inline int import_array() except -1:
27497  *     try:             # <<<<<<<<<<<<<<
27498  *         _import_array()
27499  *     except Exception:
27500  */
27501     __Pyx_XGIVEREF(__pyx_t_1);
27502     __Pyx_XGIVEREF(__pyx_t_2);
27503     __Pyx_XGIVEREF(__pyx_t_3);
27504     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27505     goto __pyx_L1_error;
27506     __pyx_L8_try_end:;
27507   }
27508 
27509   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
27510  * # Versions of the import_* functions which are more suitable for
27511  * # Cython code.
27512  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
27513  *     try:
27514  *         _import_array()
27515  */
27516 
27517   /* function exit code */
27518   __pyx_r = 0;
27519   goto __pyx_L0;
27520   __pyx_L1_error:;
27521   __Pyx_XDECREF(__pyx_t_5);
27522   __Pyx_XDECREF(__pyx_t_6);
27523   __Pyx_XDECREF(__pyx_t_7);
27524   __Pyx_XDECREF(__pyx_t_8);
27525   __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
27526   __pyx_r = -1;
27527   __pyx_L0:;
27528   __Pyx_RefNannyFinishContext();
27529   return __pyx_r;
27530 }
27531 
27532 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
27533  *         raise ImportError("numpy.core.multiarray failed to import")
27534  *
27535  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
27536  *     try:
27537  *         _import_umath()
27538  */
27539 
__pyx_f_5numpy_import_umath(void)27540 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
27541   int __pyx_r;
27542   __Pyx_RefNannyDeclarations
27543   PyObject *__pyx_t_1 = NULL;
27544   PyObject *__pyx_t_2 = NULL;
27545   PyObject *__pyx_t_3 = NULL;
27546   int __pyx_t_4;
27547   PyObject *__pyx_t_5 = NULL;
27548   PyObject *__pyx_t_6 = NULL;
27549   PyObject *__pyx_t_7 = NULL;
27550   PyObject *__pyx_t_8 = NULL;
27551   __Pyx_RefNannySetupContext("import_umath", 0);
27552 
27553   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27554  *
27555  * cdef inline int import_umath() except -1:
27556  *     try:             # <<<<<<<<<<<<<<
27557  *         _import_umath()
27558  *     except Exception:
27559  */
27560   {
27561     __Pyx_PyThreadState_declare
27562     __Pyx_PyThreadState_assign
27563     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27564     __Pyx_XGOTREF(__pyx_t_1);
27565     __Pyx_XGOTREF(__pyx_t_2);
27566     __Pyx_XGOTREF(__pyx_t_3);
27567     /*try:*/ {
27568 
27569       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042
27570  * cdef inline int import_umath() except -1:
27571  *     try:
27572  *         _import_umath()             # <<<<<<<<<<<<<<
27573  *     except Exception:
27574  *         raise ImportError("numpy.core.umath failed to import")
27575  */
27576       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error)
27577 
27578       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27579  *
27580  * cdef inline int import_umath() except -1:
27581  *     try:             # <<<<<<<<<<<<<<
27582  *         _import_umath()
27583  *     except Exception:
27584  */
27585     }
27586     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27587     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27588     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27589     goto __pyx_L8_try_end;
27590     __pyx_L3_error:;
27591 
27592     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043
27593  *     try:
27594  *         _import_umath()
27595  *     except Exception:             # <<<<<<<<<<<<<<
27596  *         raise ImportError("numpy.core.umath failed to import")
27597  *
27598  */
27599     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27600     if (__pyx_t_4) {
27601       __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
27602       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error)
27603       __Pyx_GOTREF(__pyx_t_5);
27604       __Pyx_GOTREF(__pyx_t_6);
27605       __Pyx_GOTREF(__pyx_t_7);
27606 
27607       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
27608  *         _import_umath()
27609  *     except Exception:
27610  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
27611  *
27612  * cdef inline int import_ufunc() except -1:
27613  */
27614       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error)
27615       __Pyx_GOTREF(__pyx_t_8);
27616       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27617       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27618       __PYX_ERR(2, 1044, __pyx_L5_except_error)
27619     }
27620     goto __pyx_L5_except_error;
27621     __pyx_L5_except_error:;
27622 
27623     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27624  *
27625  * cdef inline int import_umath() except -1:
27626  *     try:             # <<<<<<<<<<<<<<
27627  *         _import_umath()
27628  *     except Exception:
27629  */
27630     __Pyx_XGIVEREF(__pyx_t_1);
27631     __Pyx_XGIVEREF(__pyx_t_2);
27632     __Pyx_XGIVEREF(__pyx_t_3);
27633     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27634     goto __pyx_L1_error;
27635     __pyx_L8_try_end:;
27636   }
27637 
27638   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
27639  *         raise ImportError("numpy.core.multiarray failed to import")
27640  *
27641  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
27642  *     try:
27643  *         _import_umath()
27644  */
27645 
27646   /* function exit code */
27647   __pyx_r = 0;
27648   goto __pyx_L0;
27649   __pyx_L1_error:;
27650   __Pyx_XDECREF(__pyx_t_5);
27651   __Pyx_XDECREF(__pyx_t_6);
27652   __Pyx_XDECREF(__pyx_t_7);
27653   __Pyx_XDECREF(__pyx_t_8);
27654   __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
27655   __pyx_r = -1;
27656   __pyx_L0:;
27657   __Pyx_RefNannyFinishContext();
27658   return __pyx_r;
27659 }
27660 
27661 /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
27662  *         raise ImportError("numpy.core.umath failed to import")
27663  *
27664  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
27665  *     try:
27666  *         _import_umath()
27667  */
27668 
__pyx_f_5numpy_import_ufunc(void)27669 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
27670   int __pyx_r;
27671   __Pyx_RefNannyDeclarations
27672   PyObject *__pyx_t_1 = NULL;
27673   PyObject *__pyx_t_2 = NULL;
27674   PyObject *__pyx_t_3 = NULL;
27675   int __pyx_t_4;
27676   PyObject *__pyx_t_5 = NULL;
27677   PyObject *__pyx_t_6 = NULL;
27678   PyObject *__pyx_t_7 = NULL;
27679   PyObject *__pyx_t_8 = NULL;
27680   __Pyx_RefNannySetupContext("import_ufunc", 0);
27681 
27682   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
27683  *
27684  * cdef inline int import_ufunc() except -1:
27685  *     try:             # <<<<<<<<<<<<<<
27686  *         _import_umath()
27687  *     except Exception:
27688  */
27689   {
27690     __Pyx_PyThreadState_declare
27691     __Pyx_PyThreadState_assign
27692     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27693     __Pyx_XGOTREF(__pyx_t_1);
27694     __Pyx_XGOTREF(__pyx_t_2);
27695     __Pyx_XGOTREF(__pyx_t_3);
27696     /*try:*/ {
27697 
27698       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048
27699  * cdef inline int import_ufunc() except -1:
27700  *     try:
27701  *         _import_umath()             # <<<<<<<<<<<<<<
27702  *     except Exception:
27703  *         raise ImportError("numpy.core.umath failed to import")
27704  */
27705       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error)
27706 
27707       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
27708  *
27709  * cdef inline int import_ufunc() except -1:
27710  *     try:             # <<<<<<<<<<<<<<
27711  *         _import_umath()
27712  *     except Exception:
27713  */
27714     }
27715     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27716     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27717     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27718     goto __pyx_L8_try_end;
27719     __pyx_L3_error:;
27720 
27721     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049
27722  *     try:
27723  *         _import_umath()
27724  *     except Exception:             # <<<<<<<<<<<<<<
27725  *         raise ImportError("numpy.core.umath failed to import")
27726  */
27727     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27728     if (__pyx_t_4) {
27729       __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
27730       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error)
27731       __Pyx_GOTREF(__pyx_t_5);
27732       __Pyx_GOTREF(__pyx_t_6);
27733       __Pyx_GOTREF(__pyx_t_7);
27734 
27735       /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050
27736  *         _import_umath()
27737  *     except Exception:
27738  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
27739  */
27740       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error)
27741       __Pyx_GOTREF(__pyx_t_8);
27742       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27743       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27744       __PYX_ERR(2, 1050, __pyx_L5_except_error)
27745     }
27746     goto __pyx_L5_except_error;
27747     __pyx_L5_except_error:;
27748 
27749     /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
27750  *
27751  * cdef inline int import_ufunc() except -1:
27752  *     try:             # <<<<<<<<<<<<<<
27753  *         _import_umath()
27754  *     except Exception:
27755  */
27756     __Pyx_XGIVEREF(__pyx_t_1);
27757     __Pyx_XGIVEREF(__pyx_t_2);
27758     __Pyx_XGIVEREF(__pyx_t_3);
27759     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27760     goto __pyx_L1_error;
27761     __pyx_L8_try_end:;
27762   }
27763 
27764   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
27765  *         raise ImportError("numpy.core.umath failed to import")
27766  *
27767  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
27768  *     try:
27769  *         _import_umath()
27770  */
27771 
27772   /* function exit code */
27773   __pyx_r = 0;
27774   goto __pyx_L0;
27775   __pyx_L1_error:;
27776   __Pyx_XDECREF(__pyx_t_5);
27777   __Pyx_XDECREF(__pyx_t_6);
27778   __Pyx_XDECREF(__pyx_t_7);
27779   __Pyx_XDECREF(__pyx_t_8);
27780   __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
27781   __pyx_r = -1;
27782   __pyx_L0:;
27783   __Pyx_RefNannyFinishContext();
27784   return __pyx_r;
27785 }
27786 
__pyx_tp_new_6tables_16indexesextension_Index(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)27787 static PyObject *__pyx_tp_new_6tables_16indexesextension_Index(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
27788   PyObject *o;
27789   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
27790     o = (*t->tp_alloc)(t, 0);
27791   } else {
27792     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
27793   }
27794   if (unlikely(!o)) return 0;
27795   return o;
27796 }
27797 
__pyx_tp_dealloc_6tables_16indexesextension_Index(PyObject * o)27798 static void __pyx_tp_dealloc_6tables_16indexesextension_Index(PyObject *o) {
27799   #if CYTHON_USE_TP_FINALIZE
27800   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))) {
27801     if (PyObject_CallFinalizerFromDealloc(o)) return;
27802   }
27803   #endif
27804   (*Py_TYPE(o)->tp_free)(o);
27805 }
27806 
27807 static PyMethodDef __pyx_methods_6tables_16indexesextension_Index[] = {
27808   {"__reduce_cython__", (PyCFunction)__pyx_pw_6tables_16indexesextension_5Index_1__reduce_cython__, METH_NOARGS, 0},
27809   {"__setstate_cython__", (PyCFunction)__pyx_pw_6tables_16indexesextension_5Index_3__setstate_cython__, METH_O, 0},
27810   {0, 0, 0, 0}
27811 };
27812 
27813 static PyTypeObject __pyx_type_6tables_16indexesextension_Index = {
27814   PyVarObject_HEAD_INIT(0, 0)
27815   "tables.indexesextension.Index", /*tp_name*/
27816   sizeof(struct __pyx_obj_6tables_16indexesextension_Index), /*tp_basicsize*/
27817   0, /*tp_itemsize*/
27818   __pyx_tp_dealloc_6tables_16indexesextension_Index, /*tp_dealloc*/
27819   0, /*tp_print*/
27820   0, /*tp_getattr*/
27821   0, /*tp_setattr*/
27822   #if PY_MAJOR_VERSION < 3
27823   0, /*tp_compare*/
27824   #endif
27825   #if PY_MAJOR_VERSION >= 3
27826   0, /*tp_as_async*/
27827   #endif
27828   0, /*tp_repr*/
27829   0, /*tp_as_number*/
27830   0, /*tp_as_sequence*/
27831   0, /*tp_as_mapping*/
27832   0, /*tp_hash*/
27833   0, /*tp_call*/
27834   0, /*tp_str*/
27835   0, /*tp_getattro*/
27836   0, /*tp_setattro*/
27837   0, /*tp_as_buffer*/
27838   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
27839   0, /*tp_doc*/
27840   0, /*tp_traverse*/
27841   0, /*tp_clear*/
27842   0, /*tp_richcompare*/
27843   0, /*tp_weaklistoffset*/
27844   0, /*tp_iter*/
27845   0, /*tp_iternext*/
27846   __pyx_methods_6tables_16indexesextension_Index, /*tp_methods*/
27847   0, /*tp_members*/
27848   0, /*tp_getset*/
27849   0, /*tp_base*/
27850   0, /*tp_dict*/
27851   0, /*tp_descr_get*/
27852   0, /*tp_descr_set*/
27853   0, /*tp_dictoffset*/
27854   0, /*tp_init*/
27855   0, /*tp_alloc*/
27856   __pyx_tp_new_6tables_16indexesextension_Index, /*tp_new*/
27857   0, /*tp_free*/
27858   0, /*tp_is_gc*/
27859   0, /*tp_bases*/
27860   0, /*tp_mro*/
27861   0, /*tp_cache*/
27862   0, /*tp_subclasses*/
27863   0, /*tp_weaklist*/
27864   0, /*tp_del*/
27865   0, /*tp_version_tag*/
27866   #if PY_VERSION_HEX >= 0x030400a1
27867   0, /*tp_finalize*/
27868   #endif
27869   #if PY_VERSION_HEX >= 0x030800b1
27870   0, /*tp_vectorcall*/
27871   #endif
27872 };
27873 static struct __pyx_vtabstruct_6tables_16indexesextension_CacheArray __pyx_vtable_6tables_16indexesextension_CacheArray;
27874 
__pyx_tp_new_6tables_16indexesextension_CacheArray(PyTypeObject * t,PyObject * a,PyObject * k)27875 static PyObject *__pyx_tp_new_6tables_16indexesextension_CacheArray(PyTypeObject *t, PyObject *a, PyObject *k) {
27876   struct __pyx_obj_6tables_16indexesextension_CacheArray *p;
27877   PyObject *o = __pyx_ptype_6tables_13hdf5extension_Array->tp_new(t, a, k);
27878   if (unlikely(!o)) return 0;
27879   p = ((struct __pyx_obj_6tables_16indexesextension_CacheArray *)o);
27880   p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__pyx_vtabptr_6tables_16indexesextension_CacheArray;
27881   return o;
27882 }
27883 
__pyx_tp_dealloc_6tables_16indexesextension_CacheArray(PyObject * o)27884 static void __pyx_tp_dealloc_6tables_16indexesextension_CacheArray(PyObject *o) {
27885   #if CYTHON_USE_TP_FINALIZE
27886   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
27887     if (PyObject_CallFinalizerFromDealloc(o)) return;
27888   }
27889   #endif
27890   PyObject_GC_UnTrack(o);
27891   PyObject_GC_Track(o);
27892   if (likely(__pyx_ptype_6tables_13hdf5extension_Array)) __pyx_ptype_6tables_13hdf5extension_Array->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6tables_16indexesextension_CacheArray);
27893 }
27894 
__pyx_tp_traverse_6tables_16indexesextension_CacheArray(PyObject * o,visitproc v,void * a)27895 static int __pyx_tp_traverse_6tables_16indexesextension_CacheArray(PyObject *o, visitproc v, void *a) {
27896   int e;
27897   e = ((likely(__pyx_ptype_6tables_13hdf5extension_Array)) ? ((__pyx_ptype_6tables_13hdf5extension_Array->tp_traverse) ? __pyx_ptype_6tables_13hdf5extension_Array->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6tables_16indexesextension_CacheArray)); if (e) return e;
27898   return 0;
27899 }
27900 
__pyx_tp_clear_6tables_16indexesextension_CacheArray(PyObject * o)27901 static int __pyx_tp_clear_6tables_16indexesextension_CacheArray(PyObject *o) {
27902   if (likely(__pyx_ptype_6tables_13hdf5extension_Array)) { if (__pyx_ptype_6tables_13hdf5extension_Array->tp_clear) __pyx_ptype_6tables_13hdf5extension_Array->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6tables_16indexesextension_CacheArray);
27903   return 0;
27904 }
27905 
27906 static PyMethodDef __pyx_methods_6tables_16indexesextension_CacheArray[] = {
27907   {"_g_close", (PyCFunction)__pyx_pw_6tables_16indexesextension_10CacheArray_1_g_close, METH_NOARGS, 0},
27908   {"__reduce_cython__", (PyCFunction)__pyx_pw_6tables_16indexesextension_10CacheArray_3__reduce_cython__, METH_NOARGS, 0},
27909   {"__setstate_cython__", (PyCFunction)__pyx_pw_6tables_16indexesextension_10CacheArray_5__setstate_cython__, METH_O, 0},
27910   {0, 0, 0, 0}
27911 };
27912 
27913 static PyTypeObject __pyx_type_6tables_16indexesextension_CacheArray = {
27914   PyVarObject_HEAD_INIT(0, 0)
27915   "tables.indexesextension.CacheArray", /*tp_name*/
27916   sizeof(struct __pyx_obj_6tables_16indexesextension_CacheArray), /*tp_basicsize*/
27917   0, /*tp_itemsize*/
27918   __pyx_tp_dealloc_6tables_16indexesextension_CacheArray, /*tp_dealloc*/
27919   0, /*tp_print*/
27920   0, /*tp_getattr*/
27921   0, /*tp_setattr*/
27922   #if PY_MAJOR_VERSION < 3
27923   0, /*tp_compare*/
27924   #endif
27925   #if PY_MAJOR_VERSION >= 3
27926   0, /*tp_as_async*/
27927   #endif
27928   0, /*tp_repr*/
27929   0, /*tp_as_number*/
27930   0, /*tp_as_sequence*/
27931   0, /*tp_as_mapping*/
27932   0, /*tp_hash*/
27933   0, /*tp_call*/
27934   0, /*tp_str*/
27935   0, /*tp_getattro*/
27936   0, /*tp_setattro*/
27937   0, /*tp_as_buffer*/
27938   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
27939   "Container for keeping index caches of 1st and 2nd level.", /*tp_doc*/
27940   __pyx_tp_traverse_6tables_16indexesextension_CacheArray, /*tp_traverse*/
27941   __pyx_tp_clear_6tables_16indexesextension_CacheArray, /*tp_clear*/
27942   0, /*tp_richcompare*/
27943   0, /*tp_weaklistoffset*/
27944   0, /*tp_iter*/
27945   0, /*tp_iternext*/
27946   __pyx_methods_6tables_16indexesextension_CacheArray, /*tp_methods*/
27947   0, /*tp_members*/
27948   0, /*tp_getset*/
27949   0, /*tp_base*/
27950   0, /*tp_dict*/
27951   0, /*tp_descr_get*/
27952   0, /*tp_descr_set*/
27953   0, /*tp_dictoffset*/
27954   0, /*tp_init*/
27955   0, /*tp_alloc*/
27956   __pyx_tp_new_6tables_16indexesextension_CacheArray, /*tp_new*/
27957   0, /*tp_free*/
27958   0, /*tp_is_gc*/
27959   0, /*tp_bases*/
27960   0, /*tp_mro*/
27961   0, /*tp_cache*/
27962   0, /*tp_subclasses*/
27963   0, /*tp_weaklist*/
27964   0, /*tp_del*/
27965   0, /*tp_version_tag*/
27966   #if PY_VERSION_HEX >= 0x030400a1
27967   0, /*tp_finalize*/
27968   #endif
27969   #if PY_VERSION_HEX >= 0x030800b1
27970   0, /*tp_vectorcall*/
27971   #endif
27972 };
27973 static struct __pyx_vtabstruct_6tables_16indexesextension_IndexArray __pyx_vtable_6tables_16indexesextension_IndexArray;
27974 
__pyx_tp_new_6tables_16indexesextension_IndexArray(PyTypeObject * t,PyObject * a,PyObject * k)27975 static PyObject *__pyx_tp_new_6tables_16indexesextension_IndexArray(PyTypeObject *t, PyObject *a, PyObject *k) {
27976   struct __pyx_obj_6tables_16indexesextension_IndexArray *p;
27977   PyObject *o = __pyx_ptype_6tables_13hdf5extension_Array->tp_new(t, a, k);
27978   if (unlikely(!o)) return 0;
27979   p = ((struct __pyx_obj_6tables_16indexesextension_IndexArray *)o);
27980   p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__pyx_vtabptr_6tables_16indexesextension_IndexArray;
27981   p->bounds_ext = ((struct __pyx_obj_6tables_16indexesextension_CacheArray *)Py_None); Py_INCREF(Py_None);
27982   p->boundscache = ((struct __pyx_obj_6tables_17lrucacheextension_NumCache *)Py_None); Py_INCREF(Py_None);
27983   p->sortedcache = ((struct __pyx_obj_6tables_17lrucacheextension_NumCache *)Py_None); Py_INCREF(Py_None);
27984   p->bufferbc = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
27985   p->bufferlb = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
27986   return o;
27987 }
27988 
__pyx_tp_dealloc_6tables_16indexesextension_IndexArray(PyObject * o)27989 static void __pyx_tp_dealloc_6tables_16indexesextension_IndexArray(PyObject *o) {
27990   struct __pyx_obj_6tables_16indexesextension_IndexArray *p = (struct __pyx_obj_6tables_16indexesextension_IndexArray *)o;
27991   #if CYTHON_USE_TP_FINALIZE
27992   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
27993     if (PyObject_CallFinalizerFromDealloc(o)) return;
27994   }
27995   #endif
27996   PyObject_GC_UnTrack(o);
27997   Py_CLEAR(p->bounds_ext);
27998   Py_CLEAR(p->boundscache);
27999   Py_CLEAR(p->sortedcache);
28000   Py_CLEAR(p->bufferbc);
28001   Py_CLEAR(p->bufferlb);
28002   PyObject_GC_Track(o);
28003   if (likely(__pyx_ptype_6tables_13hdf5extension_Array)) __pyx_ptype_6tables_13hdf5extension_Array->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6tables_16indexesextension_IndexArray);
28004 }
28005 
__pyx_tp_traverse_6tables_16indexesextension_IndexArray(PyObject * o,visitproc v,void * a)28006 static int __pyx_tp_traverse_6tables_16indexesextension_IndexArray(PyObject *o, visitproc v, void *a) {
28007   int e;
28008   struct __pyx_obj_6tables_16indexesextension_IndexArray *p = (struct __pyx_obj_6tables_16indexesextension_IndexArray *)o;
28009   e = ((likely(__pyx_ptype_6tables_13hdf5extension_Array)) ? ((__pyx_ptype_6tables_13hdf5extension_Array->tp_traverse) ? __pyx_ptype_6tables_13hdf5extension_Array->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6tables_16indexesextension_IndexArray)); if (e) return e;
28010   if (p->bounds_ext) {
28011     e = (*v)(((PyObject *)p->bounds_ext), a); if (e) return e;
28012   }
28013   if (p->boundscache) {
28014     e = (*v)(((PyObject *)p->boundscache), a); if (e) return e;
28015   }
28016   if (p->sortedcache) {
28017     e = (*v)(((PyObject *)p->sortedcache), a); if (e) return e;
28018   }
28019   if (p->bufferbc) {
28020     e = (*v)(((PyObject *)p->bufferbc), a); if (e) return e;
28021   }
28022   if (p->bufferlb) {
28023     e = (*v)(((PyObject *)p->bufferlb), a); if (e) return e;
28024   }
28025   return 0;
28026 }
28027 
__pyx_tp_clear_6tables_16indexesextension_IndexArray(PyObject * o)28028 static int __pyx_tp_clear_6tables_16indexesextension_IndexArray(PyObject *o) {
28029   PyObject* tmp;
28030   struct __pyx_obj_6tables_16indexesextension_IndexArray *p = (struct __pyx_obj_6tables_16indexesextension_IndexArray *)o;
28031   if (likely(__pyx_ptype_6tables_13hdf5extension_Array)) { if (__pyx_ptype_6tables_13hdf5extension_Array->tp_clear) __pyx_ptype_6tables_13hdf5extension_Array->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6tables_16indexesextension_IndexArray);
28032   tmp = ((PyObject*)p->bounds_ext);
28033   p->bounds_ext = ((struct __pyx_obj_6tables_16indexesextension_CacheArray *)Py_None); Py_INCREF(Py_None);
28034   Py_XDECREF(tmp);
28035   tmp = ((PyObject*)p->boundscache);
28036   p->boundscache = ((struct __pyx_obj_6tables_17lrucacheextension_NumCache *)Py_None); Py_INCREF(Py_None);
28037   Py_XDECREF(tmp);
28038   tmp = ((PyObject*)p->sortedcache);
28039   p->sortedcache = ((struct __pyx_obj_6tables_17lrucacheextension_NumCache *)Py_None); Py_INCREF(Py_None);
28040   Py_XDECREF(tmp);
28041   tmp = ((PyObject*)p->bufferbc);
28042   p->bufferbc = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
28043   Py_XDECREF(tmp);
28044   tmp = ((PyObject*)p->bufferlb);
28045   p->bufferlb = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
28046   Py_XDECREF(tmp);
28047   return 0;
28048 }
28049 
28050 static PyMethodDef __pyx_methods_6tables_16indexesextension_IndexArray[] = {
28051   {"_read_index_slice", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_1_read_index_slice, METH_VARARGS|METH_KEYWORDS, 0},
28052   {"_init_sorted_slice", (PyCFunction)__pyx_pw_6tables_16indexesextension_10IndexArray_3_init_sorted_slice, METH_O, __pyx_doc_6tables_16indexesextension_10IndexArray_2_init_sorted_slice},
28053   {"_read_sorted_slice", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_5_read_sorted_slice, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_16indexesextension_10IndexArray_4_read_sorted_slice},
28054   {"_search_bin_na_b", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_7_search_bin_na_b, METH_VARARGS|METH_KEYWORDS, 0},
28055   {"_search_bin_na_ub", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_9_search_bin_na_ub, METH_VARARGS|METH_KEYWORDS, 0},
28056   {"_search_bin_na_s", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_11_search_bin_na_s, METH_VARARGS|METH_KEYWORDS, 0},
28057   {"_search_bin_na_us", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_13_search_bin_na_us, METH_VARARGS|METH_KEYWORDS, 0},
28058   {"_search_bin_na_i", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_15_search_bin_na_i, METH_VARARGS|METH_KEYWORDS, 0},
28059   {"_search_bin_na_ui", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_17_search_bin_na_ui, METH_VARARGS|METH_KEYWORDS, 0},
28060   {"_search_bin_na_ll", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_19_search_bin_na_ll, METH_VARARGS|METH_KEYWORDS, 0},
28061   {"_search_bin_na_ull", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_21_search_bin_na_ull, METH_VARARGS|METH_KEYWORDS, 0},
28062   {"_search_bin_na_e", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_23_search_bin_na_e, METH_VARARGS|METH_KEYWORDS, 0},
28063   {"_search_bin_na_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_25_search_bin_na_f, METH_VARARGS|METH_KEYWORDS, 0},
28064   {"_search_bin_na_d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_27_search_bin_na_d, METH_VARARGS|METH_KEYWORDS, 0},
28065   {"_search_bin_na_g", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_10IndexArray_29_search_bin_na_g, METH_VARARGS|METH_KEYWORDS, 0},
28066   {"_g_close", (PyCFunction)__pyx_pw_6tables_16indexesextension_10IndexArray_31_g_close, METH_NOARGS, 0},
28067   {"__reduce_cython__", (PyCFunction)__pyx_pw_6tables_16indexesextension_10IndexArray_33__reduce_cython__, METH_NOARGS, 0},
28068   {"__setstate_cython__", (PyCFunction)__pyx_pw_6tables_16indexesextension_10IndexArray_35__setstate_cython__, METH_O, 0},
28069   {0, 0, 0, 0}
28070 };
28071 
28072 static PyTypeObject __pyx_type_6tables_16indexesextension_IndexArray = {
28073   PyVarObject_HEAD_INIT(0, 0)
28074   "tables.indexesextension.IndexArray", /*tp_name*/
28075   sizeof(struct __pyx_obj_6tables_16indexesextension_IndexArray), /*tp_basicsize*/
28076   0, /*tp_itemsize*/
28077   __pyx_tp_dealloc_6tables_16indexesextension_IndexArray, /*tp_dealloc*/
28078   0, /*tp_print*/
28079   0, /*tp_getattr*/
28080   0, /*tp_setattr*/
28081   #if PY_MAJOR_VERSION < 3
28082   0, /*tp_compare*/
28083   #endif
28084   #if PY_MAJOR_VERSION >= 3
28085   0, /*tp_as_async*/
28086   #endif
28087   0, /*tp_repr*/
28088   0, /*tp_as_number*/
28089   0, /*tp_as_sequence*/
28090   0, /*tp_as_mapping*/
28091   0, /*tp_hash*/
28092   0, /*tp_call*/
28093   0, /*tp_str*/
28094   0, /*tp_getattro*/
28095   0, /*tp_setattro*/
28096   0, /*tp_as_buffer*/
28097   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
28098   "Container for keeping sorted and indices values.", /*tp_doc*/
28099   __pyx_tp_traverse_6tables_16indexesextension_IndexArray, /*tp_traverse*/
28100   __pyx_tp_clear_6tables_16indexesextension_IndexArray, /*tp_clear*/
28101   0, /*tp_richcompare*/
28102   0, /*tp_weaklistoffset*/
28103   0, /*tp_iter*/
28104   0, /*tp_iternext*/
28105   __pyx_methods_6tables_16indexesextension_IndexArray, /*tp_methods*/
28106   0, /*tp_members*/
28107   0, /*tp_getset*/
28108   0, /*tp_base*/
28109   0, /*tp_dict*/
28110   0, /*tp_descr_get*/
28111   0, /*tp_descr_set*/
28112   0, /*tp_dictoffset*/
28113   0, /*tp_init*/
28114   0, /*tp_alloc*/
28115   __pyx_tp_new_6tables_16indexesextension_IndexArray, /*tp_new*/
28116   0, /*tp_free*/
28117   0, /*tp_is_gc*/
28118   0, /*tp_bases*/
28119   0, /*tp_mro*/
28120   0, /*tp_cache*/
28121   0, /*tp_subclasses*/
28122   0, /*tp_weaklist*/
28123   0, /*tp_del*/
28124   0, /*tp_version_tag*/
28125   #if PY_VERSION_HEX >= 0x030400a1
28126   0, /*tp_finalize*/
28127   #endif
28128   #if PY_VERSION_HEX >= 0x030800b1
28129   0, /*tp_vectorcall*/
28130   #endif
28131 };
28132 static struct __pyx_vtabstruct_6tables_16indexesextension_LastRowArray __pyx_vtable_6tables_16indexesextension_LastRowArray;
28133 
__pyx_tp_new_6tables_16indexesextension_LastRowArray(PyTypeObject * t,PyObject * a,PyObject * k)28134 static PyObject *__pyx_tp_new_6tables_16indexesextension_LastRowArray(PyTypeObject *t, PyObject *a, PyObject *k) {
28135   struct __pyx_obj_6tables_16indexesextension_LastRowArray *p;
28136   PyObject *o = __pyx_ptype_6tables_13hdf5extension_Array->tp_new(t, a, k);
28137   if (unlikely(!o)) return 0;
28138   p = ((struct __pyx_obj_6tables_16indexesextension_LastRowArray *)o);
28139   p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__pyx_vtabptr_6tables_16indexesextension_LastRowArray;
28140   return o;
28141 }
28142 
__pyx_tp_dealloc_6tables_16indexesextension_LastRowArray(PyObject * o)28143 static void __pyx_tp_dealloc_6tables_16indexesextension_LastRowArray(PyObject *o) {
28144   #if CYTHON_USE_TP_FINALIZE
28145   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
28146     if (PyObject_CallFinalizerFromDealloc(o)) return;
28147   }
28148   #endif
28149   PyObject_GC_UnTrack(o);
28150   PyObject_GC_Track(o);
28151   if (likely(__pyx_ptype_6tables_13hdf5extension_Array)) __pyx_ptype_6tables_13hdf5extension_Array->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6tables_16indexesextension_LastRowArray);
28152 }
28153 
__pyx_tp_traverse_6tables_16indexesextension_LastRowArray(PyObject * o,visitproc v,void * a)28154 static int __pyx_tp_traverse_6tables_16indexesextension_LastRowArray(PyObject *o, visitproc v, void *a) {
28155   int e;
28156   e = ((likely(__pyx_ptype_6tables_13hdf5extension_Array)) ? ((__pyx_ptype_6tables_13hdf5extension_Array->tp_traverse) ? __pyx_ptype_6tables_13hdf5extension_Array->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6tables_16indexesextension_LastRowArray)); if (e) return e;
28157   return 0;
28158 }
28159 
__pyx_tp_clear_6tables_16indexesextension_LastRowArray(PyObject * o)28160 static int __pyx_tp_clear_6tables_16indexesextension_LastRowArray(PyObject *o) {
28161   if (likely(__pyx_ptype_6tables_13hdf5extension_Array)) { if (__pyx_ptype_6tables_13hdf5extension_Array->tp_clear) __pyx_ptype_6tables_13hdf5extension_Array->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6tables_16indexesextension_LastRowArray);
28162   return 0;
28163 }
28164 
28165 static PyMethodDef __pyx_methods_6tables_16indexesextension_LastRowArray[] = {
28166   {"_read_index_slice", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_12LastRowArray_1_read_index_slice, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_16indexesextension_12LastRowArray__read_index_slice},
28167   {"_read_sorted_slice", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6tables_16indexesextension_12LastRowArray_3_read_sorted_slice, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6tables_16indexesextension_12LastRowArray_2_read_sorted_slice},
28168   {"__reduce_cython__", (PyCFunction)__pyx_pw_6tables_16indexesextension_12LastRowArray_5__reduce_cython__, METH_NOARGS, 0},
28169   {"__setstate_cython__", (PyCFunction)__pyx_pw_6tables_16indexesextension_12LastRowArray_7__setstate_cython__, METH_O, 0},
28170   {0, 0, 0, 0}
28171 };
28172 
28173 static PyTypeObject __pyx_type_6tables_16indexesextension_LastRowArray = {
28174   PyVarObject_HEAD_INIT(0, 0)
28175   "tables.indexesextension.LastRowArray", /*tp_name*/
28176   sizeof(struct __pyx_obj_6tables_16indexesextension_LastRowArray), /*tp_basicsize*/
28177   0, /*tp_itemsize*/
28178   __pyx_tp_dealloc_6tables_16indexesextension_LastRowArray, /*tp_dealloc*/
28179   0, /*tp_print*/
28180   0, /*tp_getattr*/
28181   0, /*tp_setattr*/
28182   #if PY_MAJOR_VERSION < 3
28183   0, /*tp_compare*/
28184   #endif
28185   #if PY_MAJOR_VERSION >= 3
28186   0, /*tp_as_async*/
28187   #endif
28188   0, /*tp_repr*/
28189   0, /*tp_as_number*/
28190   0, /*tp_as_sequence*/
28191   0, /*tp_as_mapping*/
28192   0, /*tp_hash*/
28193   0, /*tp_call*/
28194   0, /*tp_str*/
28195   0, /*tp_getattro*/
28196   0, /*tp_setattro*/
28197   0, /*tp_as_buffer*/
28198   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
28199   "\n  Container for keeping sorted and indices values of last rows of an index.\n  ", /*tp_doc*/
28200   __pyx_tp_traverse_6tables_16indexesextension_LastRowArray, /*tp_traverse*/
28201   __pyx_tp_clear_6tables_16indexesextension_LastRowArray, /*tp_clear*/
28202   0, /*tp_richcompare*/
28203   0, /*tp_weaklistoffset*/
28204   0, /*tp_iter*/
28205   0, /*tp_iternext*/
28206   __pyx_methods_6tables_16indexesextension_LastRowArray, /*tp_methods*/
28207   0, /*tp_members*/
28208   0, /*tp_getset*/
28209   0, /*tp_base*/
28210   0, /*tp_dict*/
28211   0, /*tp_descr_get*/
28212   0, /*tp_descr_set*/
28213   0, /*tp_dictoffset*/
28214   0, /*tp_init*/
28215   0, /*tp_alloc*/
28216   __pyx_tp_new_6tables_16indexesextension_LastRowArray, /*tp_new*/
28217   0, /*tp_free*/
28218   0, /*tp_is_gc*/
28219   0, /*tp_bases*/
28220   0, /*tp_mro*/
28221   0, /*tp_cache*/
28222   0, /*tp_subclasses*/
28223   0, /*tp_weaklist*/
28224   0, /*tp_del*/
28225   0, /*tp_version_tag*/
28226   #if PY_VERSION_HEX >= 0x030400a1
28227   0, /*tp_finalize*/
28228   #endif
28229   #if PY_VERSION_HEX >= 0x030800b1
28230   0, /*tp_vectorcall*/
28231   #endif
28232 };
28233 
28234 static PyMethodDef __pyx_methods[] = {
28235   {0, 0, 0, 0}
28236 };
28237 
28238 #if PY_MAJOR_VERSION >= 3
28239 #if CYTHON_PEP489_MULTI_PHASE_INIT
28240 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
28241 static int __pyx_pymod_exec_indexesextension(PyObject* module); /*proto*/
28242 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
28243   {Py_mod_create, (void*)__pyx_pymod_create},
28244   {Py_mod_exec, (void*)__pyx_pymod_exec_indexesextension},
28245   {0, NULL}
28246 };
28247 #endif
28248 
28249 static struct PyModuleDef __pyx_moduledef = {
28250     PyModuleDef_HEAD_INIT,
28251     "indexesextension",
28252     __pyx_k_cython_interface_for_keeping_ind, /* m_doc */
28253   #if CYTHON_PEP489_MULTI_PHASE_INIT
28254     0, /* m_size */
28255   #else
28256     -1, /* m_size */
28257   #endif
28258     __pyx_methods /* m_methods */,
28259   #if CYTHON_PEP489_MULTI_PHASE_INIT
28260     __pyx_moduledef_slots, /* m_slots */
28261   #else
28262     NULL, /* m_reload */
28263   #endif
28264     NULL, /* m_traverse */
28265     NULL, /* m_clear */
28266     NULL /* m_free */
28267 };
28268 #endif
28269 #ifndef CYTHON_SMALL_CODE
28270 #if defined(__clang__)
28271     #define CYTHON_SMALL_CODE
28272 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
28273     #define CYTHON_SMALL_CODE __attribute__((cold))
28274 #else
28275     #define CYTHON_SMALL_CODE
28276 #endif
28277 #endif
28278 
28279 static __Pyx_StringTabEntry __pyx_string_tab[] = {
28280   {&__pyx_n_s_BOUNDS_MAX_SIZE, __pyx_k_BOUNDS_MAX_SIZE, sizeof(__pyx_k_BOUNDS_MAX_SIZE), 0, 0, 1, 1},
28281   {&__pyx_n_s_CacheArray, __pyx_k_CacheArray, sizeof(__pyx_k_CacheArray), 0, 0, 1, 1},
28282   {&__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},
28283   {&__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},
28284   {&__pyx_n_s_HDF5ExtError, __pyx_k_HDF5ExtError, sizeof(__pyx_k_HDF5ExtError), 0, 0, 1, 1},
28285   {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
28286   {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
28287   {&__pyx_n_s_Index, __pyx_k_Index, sizeof(__pyx_k_Index), 0, 0, 1, 1},
28288   {&__pyx_n_s_IndexArray, __pyx_k_IndexArray, sizeof(__pyx_k_IndexArray), 0, 0, 1, 1},
28289   {&__pyx_n_s_LastRowArray, __pyx_k_LastRowArray, sizeof(__pyx_k_LastRowArray), 0, 0, 1, 1},
28290   {&__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},
28291   {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
28292   {&__pyx_kp_s_Problems_initializing_the_bounds, __pyx_k_Problems_initializing_the_bounds, sizeof(__pyx_k_Problems_initializing_the_bounds), 0, 0, 1, 0},
28293   {&__pyx_kp_s_Problems_reading_the_array_data, __pyx_k_Problems_reading_the_array_data, sizeof(__pyx_k_Problems_reading_the_array_data), 0, 0, 1, 0},
28294   {&__pyx_kp_s_Problems_reading_the_bounds_arra, __pyx_k_Problems_reading_the_bounds_arra, sizeof(__pyx_k_Problems_reading_the_bounds_arra), 0, 0, 1, 0},
28295   {&__pyx_kp_s_Problems_reading_the_index_data, __pyx_k_Problems_reading_the_index_data, sizeof(__pyx_k_Problems_reading_the_index_data), 0, 0, 1, 0},
28296   {&__pyx_kp_s_Problems_reading_the_index_data_2, __pyx_k_Problems_reading_the_index_data_2, sizeof(__pyx_k_Problems_reading_the_index_data_2), 0, 0, 1, 0},
28297   {&__pyx_kp_s_Problems_reading_the_index_indic, __pyx_k_Problems_reading_the_index_indic, sizeof(__pyx_k_Problems_reading_the_index_indic), 0, 0, 1, 0},
28298   {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
28299   {&__pyx_n_s_SORTED_MAX_SIZE, __pyx_k_SORTED_MAX_SIZE, sizeof(__pyx_k_SORTED_MAX_SIZE), 0, 0, 1, 1},
28300   {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
28301   {&__pyx_kp_s_Unknown_array_datatype, __pyx_k_Unknown_array_datatype, sizeof(__pyx_k_Unknown_array_datatype), 0, 0, 1, 0},
28302   {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
28303   {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
28304   {&__pyx_n_s_array1, __pyx_k_array1, sizeof(__pyx_k_array1), 0, 0, 1, 1},
28305   {&__pyx_n_s_array2, __pyx_k_array2, sizeof(__pyx_k_array2), 0, 0, 1, 1},
28306   {&__pyx_n_s_atom, __pyx_k_atom, sizeof(__pyx_k_atom), 0, 0, 1, 1},
28307   {&__pyx_n_s_bisect_left, __pyx_k_bisect_left, sizeof(__pyx_k_bisect_left), 0, 0, 1, 1},
28308   {&__pyx_n_s_bisect_right, __pyx_k_bisect_right, sizeof(__pyx_k_bisect_right), 0, 0, 1, 1},
28309   {&__pyx_n_s_bounds, __pyx_k_bounds, sizeof(__pyx_k_bounds), 0, 0, 1, 1},
28310   {&__pyx_n_s_chunksize, __pyx_k_chunksize, sizeof(__pyx_k_chunksize), 0, 0, 1, 1},
28311   {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
28312   {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
28313   {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
28314   {&__pyx_n_s_elsize1, __pyx_k_elsize1, sizeof(__pyx_k_elsize1), 0, 0, 1, 1},
28315   {&__pyx_n_s_elsize2, __pyx_k_elsize2, sizeof(__pyx_k_elsize2), 0, 0, 1, 1},
28316   {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
28317   {&__pyx_n_s_exceptions, __pyx_k_exceptions, sizeof(__pyx_k_exceptions), 0, 0, 1, 1},
28318   {&__pyx_n_s_g_close, __pyx_k_g_close, sizeof(__pyx_k_g_close), 0, 0, 1, 1},
28319   {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
28320   {&__pyx_n_s_hi, __pyx_k_hi, sizeof(__pyx_k_hi), 0, 0, 1, 1},
28321   {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
28322   {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
28323   {&__pyx_n_s_irow, __pyx_k_irow, sizeof(__pyx_k_irow), 0, 0, 1, 1},
28324   {&__pyx_n_s_item1, __pyx_k_item1, sizeof(__pyx_k_item1), 0, 0, 1, 1},
28325   {&__pyx_n_s_item2, __pyx_k_item2, sizeof(__pyx_k_item2), 0, 0, 1, 1},
28326   {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
28327   {&__pyx_n_s_keysort, __pyx_k_keysort, sizeof(__pyx_k_keysort), 0, 0, 1, 1},
28328   {&__pyx_n_s_lengths, __pyx_k_lengths, sizeof(__pyx_k_lengths), 0, 0, 1, 1},
28329   {&__pyx_n_s_lo, __pyx_k_lo, sizeof(__pyx_k_lo), 0, 0, 1, 1},
28330   {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
28331   {&__pyx_n_s_mid, __pyx_k_mid, sizeof(__pyx_k_mid), 0, 0, 1, 1},
28332   {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
28333   {&__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},
28334   {&__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},
28335   {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
28336   {&__pyx_kp_s_non_opt_types_bounds, __pyx_k_non_opt_types_bounds, sizeof(__pyx_k_non_opt_types_bounds), 0, 0, 1, 0},
28337   {&__pyx_n_s_nrows, __pyx_k_nrows, sizeof(__pyx_k_nrows), 0, 0, 1, 1},
28338   {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
28339   {&__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},
28340   {&__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},
28341   {&__pyx_n_s_opt_search_types, __pyx_k_opt_search_types, sizeof(__pyx_k_opt_search_types), 0, 0, 1, 1},
28342   {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
28343   {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
28344   {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
28345   {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
28346   {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
28347   {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
28348   {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
28349   {&__pyx_n_s_pyx_unpickle_Index, __pyx_k_pyx_unpickle_Index, sizeof(__pyx_k_pyx_unpickle_Index), 0, 0, 1, 1},
28350   {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
28351   {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
28352   {&__pyx_n_s_ranges, __pyx_k_ranges, sizeof(__pyx_k_ranges), 0, 0, 1, 1},
28353   {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
28354   {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
28355   {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
28356   {&__pyx_n_s_rvcache, __pyx_k_rvcache, sizeof(__pyx_k_rvcache), 0, 0, 1, 1},
28357   {&__pyx_kp_s_self_dims_self_dims_chunk_self_m, __pyx_k_self_dims_self_dims_chunk_self_m, sizeof(__pyx_k_self_dims_self_dims_chunk_self_m), 0, 0, 1, 0},
28358   {&__pyx_kp_s_self_dims_self_dims_chunk_self_m_2, __pyx_k_self_dims_self_dims_chunk_self_m_2, sizeof(__pyx_k_self_dims_self_dims_chunk_self_m_2), 0, 0, 1, 0},
28359   {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
28360   {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
28361   {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
28362   {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
28363   {&__pyx_n_s_slicesize, __pyx_k_slicesize, sizeof(__pyx_k_slicesize), 0, 0, 1, 1},
28364   {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1},
28365   {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
28366   {&__pyx_n_s_starts, __pyx_k_starts, sizeof(__pyx_k_starts), 0, 0, 1, 1},
28367   {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
28368   {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
28369   {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
28370   {&__pyx_n_s_tables_indexesextension, __pyx_k_tables_indexesextension, sizeof(__pyx_k_tables_indexesextension), 0, 0, 1, 1},
28371   {&__pyx_kp_s_tables_indexesextension_pyx, __pyx_k_tables_indexesextension_pyx, sizeof(__pyx_k_tables_indexesextension_pyx), 0, 0, 1, 0},
28372   {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
28373   {&__pyx_n_s_type_num, __pyx_k_type_num, sizeof(__pyx_k_type_num), 0, 0, 1, 1},
28374   {&__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},
28375   {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
28376   {&__pyx_n_s_v_chunkshape, __pyx_k_v_chunkshape, sizeof(__pyx_k_v_chunkshape), 0, 0, 1, 1},
28377   {&__pyx_n_s_v_file, __pyx_k_v_file, sizeof(__pyx_k_v_file), 0, 0, 1, 1},
28378   {&__pyx_n_s_v_parent, __pyx_k_v_parent, sizeof(__pyx_k_v_parent), 0, 0, 1, 1},
28379   {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
28380   {0, 0, 0, 0, 0, 0, 0}
28381 };
__Pyx_InitCachedBuiltins(void)28382 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
28383   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 192, __pyx_L1_error)
28384   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 203, __pyx_L1_error)
28385   __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 586, __pyx_L1_error)
28386   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
28387   __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error)
28388   __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error)
28389   return 0;
28390   __pyx_L1_error:;
28391   return -1;
28392 }
28393 
__Pyx_InitCachedConstants(void)28394 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
28395   __Pyx_RefNannyDeclarations
28396   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
28397 
28398   /* "tables/indexesextension.pyx":192
28399  *         _keysort_string(array1.data, elsize1, array2.data, elsize2, size)
28400  *     else:
28401  *         raise ValueError("Unknown array datatype")             # <<<<<<<<<<<<<<
28402  *
28403  *
28404  */
28405   __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Unknown_array_datatype); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 192, __pyx_L1_error)
28406   __Pyx_GOTREF(__pyx_tuple_);
28407   __Pyx_GIVEREF(__pyx_tuple_);
28408 
28409   /* "(tree fragment)":2
28410  * def __reduce_cython__(self):
28411  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
28412  * def __setstate_cython__(self, __pyx_state):
28413  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
28414  */
28415   __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self_dims_self_dims_chunk_self_m); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 2, __pyx_L1_error)
28416   __Pyx_GOTREF(__pyx_tuple__2);
28417   __Pyx_GIVEREF(__pyx_tuple__2);
28418 
28419   /* "(tree fragment)":4
28420  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
28421  * def __setstate_cython__(self, __pyx_state):
28422  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
28423  */
28424   __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_self_dims_self_dims_chunk_self_m); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 4, __pyx_L1_error)
28425   __Pyx_GOTREF(__pyx_tuple__3);
28426   __Pyx_GIVEREF(__pyx_tuple__3);
28427 
28428   /* "tables/indexesextension.pyx":651
28429  *     self.rbufln = lengths.data
28430  *     # The 1st cache is loaded completely in memory and needs to be reloaded
28431  *     rvcache = index.ranges[:]             # <<<<<<<<<<<<<<
28432  *     self.rbufrv = rvcache.data
28433  *     index.rvcache = <object>rvcache
28434  */
28435   __pyx_slice__4 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 651, __pyx_L1_error)
28436   __Pyx_GOTREF(__pyx_slice__4);
28437   __Pyx_GIVEREF(__pyx_slice__4);
28438 
28439   /* "(tree fragment)":2
28440  * def __reduce_cython__(self):
28441  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
28442  * def __setstate_cython__(self, __pyx_state):
28443  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
28444  */
28445   __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_dims_self_dims_chunk_self_m_2); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 2, __pyx_L1_error)
28446   __Pyx_GOTREF(__pyx_tuple__5);
28447   __Pyx_GIVEREF(__pyx_tuple__5);
28448 
28449   /* "(tree fragment)":4
28450  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")
28451  * def __setstate_cython__(self, __pyx_state):
28452  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims,self.rbufbc,self.rbuflb,self.rbufln,self.rbufrv,self.rbufst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
28453  */
28454   __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self_dims_self_dims_chunk_self_m_2); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error)
28455   __Pyx_GOTREF(__pyx_tuple__6);
28456   __Pyx_GIVEREF(__pyx_tuple__6);
28457 
28458   /* "(tree fragment)":2
28459  * def __reduce_cython__(self):
28460  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
28461  * def __setstate_cython__(self, __pyx_state):
28462  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
28463  */
28464   __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_self_dims_self_dims_chunk_self_m); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 2, __pyx_L1_error)
28465   __Pyx_GOTREF(__pyx_tuple__7);
28466   __Pyx_GIVEREF(__pyx_tuple__7);
28467 
28468   /* "(tree fragment)":4
28469  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")
28470  * def __setstate_cython__(self, __pyx_state):
28471  *     raise TypeError("self.dims,self.dims_chunk,self.maxdims cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
28472  */
28473   __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_self_dims_self_dims_chunk_self_m); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
28474   __Pyx_GOTREF(__pyx_tuple__8);
28475   __Pyx_GIVEREF(__pyx_tuple__8);
28476 
28477   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
28478  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
28479  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
28480  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
28481  *
28482  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
28483  */
28484   __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 272, __pyx_L1_error)
28485   __Pyx_GOTREF(__pyx_tuple__9);
28486   __Pyx_GIVEREF(__pyx_tuple__9);
28487 
28488   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
28489  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
28490  *                 and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
28491  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
28492  *
28493  *             info.buf = PyArray_DATA(self)
28494  */
28495   __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 276, __pyx_L1_error)
28496   __Pyx_GOTREF(__pyx_tuple__10);
28497   __Pyx_GIVEREF(__pyx_tuple__10);
28498 
28499   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
28500  *                 if ((descr.byteorder == c'>' and little_endian) or
28501  *                     (descr.byteorder == c'<' and not little_endian)):
28502  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
28503  *                 if   t == NPY_BYTE:        f = "b"
28504  *                 elif t == NPY_UBYTE:       f = "B"
28505  */
28506   __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 306, __pyx_L1_error)
28507   __Pyx_GOTREF(__pyx_tuple__11);
28508   __Pyx_GIVEREF(__pyx_tuple__11);
28509 
28510   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
28511  *
28512  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
28513  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
28514  *
28515  *         if ((child.byteorder == c'>' and little_endian) or
28516  */
28517   __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 856, __pyx_L1_error)
28518   __Pyx_GOTREF(__pyx_tuple__12);
28519   __Pyx_GIVEREF(__pyx_tuple__12);
28520 
28521   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
28522  *             t = child.type_num
28523  *             if end - f < 5:
28524  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
28525  *
28526  *             # Until ticket #99 is fixed, use integers to avoid warnings
28527  */
28528   __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(2, 880, __pyx_L1_error)
28529   __Pyx_GOTREF(__pyx_tuple__13);
28530   __Pyx_GIVEREF(__pyx_tuple__13);
28531 
28532   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
28533  *         _import_array()
28534  *     except Exception:
28535  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
28536  *
28537  * cdef inline int import_umath() except -1:
28538  */
28539   __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(2, 1038, __pyx_L1_error)
28540   __Pyx_GOTREF(__pyx_tuple__14);
28541   __Pyx_GIVEREF(__pyx_tuple__14);
28542 
28543   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
28544  *         _import_umath()
28545  *     except Exception:
28546  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
28547  *
28548  * cdef inline int import_ufunc() except -1:
28549  */
28550   __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 1044, __pyx_L1_error)
28551   __Pyx_GOTREF(__pyx_tuple__15);
28552   __Pyx_GIVEREF(__pyx_tuple__15);
28553 
28554   /* "tables/indexesextension.pyx":147
28555  * DEF SMALL_QUICKSORT = 15
28556  *
28557  * def keysort(ndarray array1, ndarray array2):             # <<<<<<<<<<<<<<
28558  *     """Sort array1 in-place. array2 is also sorted following the array1 order.
28559  *
28560  */
28561   __pyx_tuple__16 = PyTuple_Pack(6, __pyx_n_s_array1, __pyx_n_s_array2, __pyx_n_s_size, __pyx_n_s_elsize1, __pyx_n_s_elsize2, __pyx_n_s_type_num); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 147, __pyx_L1_error)
28562   __Pyx_GOTREF(__pyx_tuple__16);
28563   __Pyx_GIVEREF(__pyx_tuple__16);
28564   __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tables_indexesextension_pyx, __pyx_n_s_keysort, 147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 147, __pyx_L1_error)
28565 
28566   /* "tables/indexesextension.pyx":510
28567  * # because I forsee that this should be a very common case.
28568  * # 2004-05-20
28569  * def _bisect_left(a, x, int hi):             # <<<<<<<<<<<<<<
28570  *   """Return the index where to insert item x in list a, assuming a is sorted.
28571  *
28572  */
28573   __pyx_tuple__18 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_x, __pyx_n_s_hi, __pyx_n_s_lo, __pyx_n_s_mid); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 510, __pyx_L1_error)
28574   __Pyx_GOTREF(__pyx_tuple__18);
28575   __Pyx_GIVEREF(__pyx_tuple__18);
28576   __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tables_indexesextension_pyx, __pyx_n_s_bisect_left, 510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 510, __pyx_L1_error)
28577 
28578   /* "tables/indexesextension.pyx":531
28579  *
28580  *
28581  * def _bisect_right(a, x, int hi):             # <<<<<<<<<<<<<<
28582  *   """Return the index where to insert item x in list a, assuming a is sorted.
28583  *
28584  */
28585   __pyx_tuple__20 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_x, __pyx_n_s_hi, __pyx_n_s_lo, __pyx_n_s_mid); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 531, __pyx_L1_error)
28586   __Pyx_GOTREF(__pyx_tuple__20);
28587   __Pyx_GIVEREF(__pyx_tuple__20);
28588   __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tables_indexesextension_pyx, __pyx_n_s_bisect_right, 531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 531, __pyx_L1_error)
28589 
28590   /* "(tree fragment)":1
28591  * def __pyx_unpickle_Index(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
28592  *     cdef object __pyx_PickleError
28593  *     cdef object __pyx_result
28594  */
28595   __pyx_tuple__22 = 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__22)) __PYX_ERR(1, 1, __pyx_L1_error)
28596   __Pyx_GOTREF(__pyx_tuple__22);
28597   __Pyx_GIVEREF(__pyx_tuple__22);
28598   __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Index, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(1, 1, __pyx_L1_error)
28599   __Pyx_RefNannyFinishContext();
28600   return 0;
28601   __pyx_L1_error:;
28602   __Pyx_RefNannyFinishContext();
28603   return -1;
28604 }
28605 
__Pyx_InitGlobals(void)28606 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
28607   if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
28608   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
28609   __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
28610   return 0;
28611   __pyx_L1_error:;
28612   return -1;
28613 }
28614 
28615 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
28616 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
28617 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
28618 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
28619 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
28620 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
28621 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
28622 
__Pyx_modinit_global_init_code(void)28623 static int __Pyx_modinit_global_init_code(void) {
28624   __Pyx_RefNannyDeclarations
28625   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
28626   /*--- Global init code ---*/
28627   __Pyx_RefNannyFinishContext();
28628   return 0;
28629 }
28630 
__Pyx_modinit_variable_export_code(void)28631 static int __Pyx_modinit_variable_export_code(void) {
28632   __Pyx_RefNannyDeclarations
28633   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
28634   /*--- Variable export code ---*/
28635   __Pyx_RefNannyFinishContext();
28636   return 0;
28637 }
28638 
__Pyx_modinit_function_export_code(void)28639 static int __Pyx_modinit_function_export_code(void) {
28640   __Pyx_RefNannyDeclarations
28641   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
28642   /*--- Function export code ---*/
28643   __Pyx_RefNannyFinishContext();
28644   return 0;
28645 }
28646 
__Pyx_modinit_type_init_code(void)28647 static int __Pyx_modinit_type_init_code(void) {
28648   __Pyx_RefNannyDeclarations
28649   PyObject *__pyx_t_1 = NULL;
28650   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
28651   /*--- Type init code ---*/
28652   if (PyType_Ready(&__pyx_type_6tables_16indexesextension_Index) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
28653   #if PY_VERSION_HEX < 0x030800B1
28654   __pyx_type_6tables_16indexesextension_Index.tp_print = 0;
28655   #endif
28656   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6tables_16indexesextension_Index.tp_dictoffset && __pyx_type_6tables_16indexesextension_Index.tp_getattro == PyObject_GenericGetAttr)) {
28657     __pyx_type_6tables_16indexesextension_Index.tp_getattro = __Pyx_PyObject_GenericGetAttr;
28658   }
28659   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Index, (PyObject *)&__pyx_type_6tables_16indexesextension_Index) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
28660   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6tables_16indexesextension_Index) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
28661   __pyx_ptype_6tables_16indexesextension_Index = &__pyx_type_6tables_16indexesextension_Index;
28662   __pyx_t_1 = PyImport_ImportModule("tables.hdf5extension"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
28663   __Pyx_GOTREF(__pyx_t_1);
28664   __pyx_ptype_6tables_13hdf5extension_Array = __Pyx_ImportType(__pyx_t_1, "tables.hdf5extension", "Array", sizeof(struct __pyx_obj_6tables_13hdf5extension_Array), __Pyx_ImportType_CheckSize_Warn);
28665    if (!__pyx_ptype_6tables_13hdf5extension_Array) __PYX_ERR(0, 1, __pyx_L1_error)
28666   __pyx_vtabptr_6tables_13hdf5extension_Array = (struct __pyx_vtabstruct_6tables_13hdf5extension_Array*)__Pyx_GetVtable(__pyx_ptype_6tables_13hdf5extension_Array->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_13hdf5extension_Array)) __PYX_ERR(0, 1, __pyx_L1_error)
28667   __pyx_vtabptr_6tables_16indexesextension_CacheArray = &__pyx_vtable_6tables_16indexesextension_CacheArray;
28668   __pyx_vtable_6tables_16indexesextension_CacheArray.__pyx_base = *__pyx_vtabptr_6tables_13hdf5extension_Array;
28669   __pyx_vtable_6tables_16indexesextension_CacheArray.initread = (PyObject *(*)(struct __pyx_obj_6tables_16indexesextension_CacheArray *, int))__pyx_f_6tables_16indexesextension_10CacheArray_initread;
28670   __pyx_vtable_6tables_16indexesextension_CacheArray.read_slice = (PyObject *(*)(struct __pyx_obj_6tables_16indexesextension_CacheArray *, hsize_t, hsize_t, hsize_t, void *))__pyx_f_6tables_16indexesextension_10CacheArray_read_slice;
28671   __pyx_type_6tables_16indexesextension_CacheArray.tp_base = __pyx_ptype_6tables_13hdf5extension_Array;
28672   if (PyType_Ready(&__pyx_type_6tables_16indexesextension_CacheArray) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
28673   #if PY_VERSION_HEX < 0x030800B1
28674   __pyx_type_6tables_16indexesextension_CacheArray.tp_print = 0;
28675   #endif
28676   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6tables_16indexesextension_CacheArray.tp_dictoffset && __pyx_type_6tables_16indexesextension_CacheArray.tp_getattro == PyObject_GenericGetAttr)) {
28677     __pyx_type_6tables_16indexesextension_CacheArray.tp_getattro = __Pyx_PyObject_GenericGetAttr;
28678   }
28679   if (__Pyx_SetVtable(__pyx_type_6tables_16indexesextension_CacheArray.tp_dict, __pyx_vtabptr_6tables_16indexesextension_CacheArray) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
28680   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CacheArray, (PyObject *)&__pyx_type_6tables_16indexesextension_CacheArray) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
28681   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6tables_16indexesextension_CacheArray) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
28682   __pyx_ptype_6tables_16indexesextension_CacheArray = &__pyx_type_6tables_16indexesextension_CacheArray;
28683   __pyx_vtabptr_6tables_16indexesextension_IndexArray = &__pyx_vtable_6tables_16indexesextension_IndexArray;
28684   __pyx_vtable_6tables_16indexesextension_IndexArray.__pyx_base = *__pyx_vtabptr_6tables_13hdf5extension_Array;
28685   __pyx_vtable_6tables_16indexesextension_IndexArray._g_read_sorted_slice = (void *(*)(struct __pyx_obj_6tables_16indexesextension_IndexArray *, hsize_t, hsize_t, hsize_t))__pyx_f_6tables_16indexesextension_10IndexArray__g_read_sorted_slice;
28686   __pyx_vtable_6tables_16indexesextension_IndexArray.get_lru_bounds = (void *(*)(struct __pyx_obj_6tables_16indexesextension_IndexArray *, int, int))__pyx_f_6tables_16indexesextension_10IndexArray_get_lru_bounds;
28687   __pyx_vtable_6tables_16indexesextension_IndexArray.get_lru_sorted = (void *(*)(struct __pyx_obj_6tables_16indexesextension_IndexArray *, int, int, int, int))__pyx_f_6tables_16indexesextension_10IndexArray_get_lru_sorted;
28688   __pyx_type_6tables_16indexesextension_IndexArray.tp_base = __pyx_ptype_6tables_13hdf5extension_Array;
28689   if (PyType_Ready(&__pyx_type_6tables_16indexesextension_IndexArray) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
28690   #if PY_VERSION_HEX < 0x030800B1
28691   __pyx_type_6tables_16indexesextension_IndexArray.tp_print = 0;
28692   #endif
28693   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6tables_16indexesextension_IndexArray.tp_dictoffset && __pyx_type_6tables_16indexesextension_IndexArray.tp_getattro == PyObject_GenericGetAttr)) {
28694     __pyx_type_6tables_16indexesextension_IndexArray.tp_getattro = __Pyx_PyObject_GenericGetAttr;
28695   }
28696   if (__Pyx_SetVtable(__pyx_type_6tables_16indexesextension_IndexArray.tp_dict, __pyx_vtabptr_6tables_16indexesextension_IndexArray) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
28697   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IndexArray, (PyObject *)&__pyx_type_6tables_16indexesextension_IndexArray) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
28698   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6tables_16indexesextension_IndexArray) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
28699   __pyx_ptype_6tables_16indexesextension_IndexArray = &__pyx_type_6tables_16indexesextension_IndexArray;
28700   __pyx_vtabptr_6tables_16indexesextension_LastRowArray = &__pyx_vtable_6tables_16indexesextension_LastRowArray;
28701   __pyx_vtable_6tables_16indexesextension_LastRowArray.__pyx_base = *__pyx_vtabptr_6tables_13hdf5extension_Array;
28702   __pyx_type_6tables_16indexesextension_LastRowArray.tp_base = __pyx_ptype_6tables_13hdf5extension_Array;
28703   if (PyType_Ready(&__pyx_type_6tables_16indexesextension_LastRowArray) < 0) __PYX_ERR(0, 1495, __pyx_L1_error)
28704   #if PY_VERSION_HEX < 0x030800B1
28705   __pyx_type_6tables_16indexesextension_LastRowArray.tp_print = 0;
28706   #endif
28707   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6tables_16indexesextension_LastRowArray.tp_dictoffset && __pyx_type_6tables_16indexesextension_LastRowArray.tp_getattro == PyObject_GenericGetAttr)) {
28708     __pyx_type_6tables_16indexesextension_LastRowArray.tp_getattro = __Pyx_PyObject_GenericGetAttr;
28709   }
28710   if (__Pyx_SetVtable(__pyx_type_6tables_16indexesextension_LastRowArray.tp_dict, __pyx_vtabptr_6tables_16indexesextension_LastRowArray) < 0) __PYX_ERR(0, 1495, __pyx_L1_error)
28711   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LastRowArray, (PyObject *)&__pyx_type_6tables_16indexesextension_LastRowArray) < 0) __PYX_ERR(0, 1495, __pyx_L1_error)
28712   if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6tables_16indexesextension_LastRowArray) < 0) __PYX_ERR(0, 1495, __pyx_L1_error)
28713   __pyx_ptype_6tables_16indexesextension_LastRowArray = &__pyx_type_6tables_16indexesextension_LastRowArray;
28714   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28715   __Pyx_RefNannyFinishContext();
28716   return 0;
28717   __pyx_L1_error:;
28718   __Pyx_XDECREF(__pyx_t_1);
28719   __Pyx_RefNannyFinishContext();
28720   return -1;
28721 }
28722 
__Pyx_modinit_type_import_code(void)28723 static int __Pyx_modinit_type_import_code(void) {
28724   __Pyx_RefNannyDeclarations
28725   PyObject *__pyx_t_1 = NULL;
28726   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
28727   /*--- Type import code ---*/
28728   __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
28729   __Pyx_GOTREF(__pyx_t_1);
28730   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
28731   #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
28732   sizeof(PyTypeObject),
28733   #else
28734   sizeof(PyHeapTypeObject),
28735   #endif
28736   __Pyx_ImportType_CheckSize_Warn);
28737    if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
28738   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28739   __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error)
28740   __Pyx_GOTREF(__pyx_t_1);
28741   __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
28742    if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error)
28743   __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
28744    if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error)
28745   __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
28746    if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error)
28747   __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
28748    if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error)
28749   __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
28750    if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error)
28751   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28752   __pyx_t_1 = PyImport_ImportModule("tables.hdf5extension"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 18, __pyx_L1_error)
28753   __Pyx_GOTREF(__pyx_t_1);
28754   __pyx_ptype_6tables_13hdf5extension_Node = __Pyx_ImportType(__pyx_t_1, "tables.hdf5extension", "Node", sizeof(struct __pyx_obj_6tables_13hdf5extension_Node), __Pyx_ImportType_CheckSize_Warn);
28755    if (!__pyx_ptype_6tables_13hdf5extension_Node) __PYX_ERR(4, 18, __pyx_L1_error)
28756   __pyx_ptype_6tables_13hdf5extension_Leaf = __Pyx_ImportType(__pyx_t_1, "tables.hdf5extension", "Leaf", sizeof(struct __pyx_obj_6tables_13hdf5extension_Leaf), __Pyx_ImportType_CheckSize_Warn);
28757    if (!__pyx_ptype_6tables_13hdf5extension_Leaf) __PYX_ERR(4, 22, __pyx_L1_error)
28758   __pyx_vtabptr_6tables_13hdf5extension_Leaf = (struct __pyx_vtabstruct_6tables_13hdf5extension_Leaf*)__Pyx_GetVtable(__pyx_ptype_6tables_13hdf5extension_Leaf->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_13hdf5extension_Leaf)) __PYX_ERR(4, 22, __pyx_L1_error)
28759   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28760   __pyx_t_1 = PyImport_ImportModule("tables.lrucacheextension"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 17, __pyx_L1_error)
28761   __Pyx_GOTREF(__pyx_t_1);
28762   __pyx_ptype_6tables_17lrucacheextension_NodeCache = __Pyx_ImportType(__pyx_t_1, "tables.lrucacheextension", "NodeCache", sizeof(struct __pyx_obj_6tables_17lrucacheextension_NodeCache), __Pyx_ImportType_CheckSize_Warn);
28763    if (!__pyx_ptype_6tables_17lrucacheextension_NodeCache) __PYX_ERR(5, 17, __pyx_L1_error)
28764   __pyx_vtabptr_6tables_17lrucacheextension_NodeCache = (struct __pyx_vtabstruct_6tables_17lrucacheextension_NodeCache*)__Pyx_GetVtable(__pyx_ptype_6tables_17lrucacheextension_NodeCache->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_17lrucacheextension_NodeCache)) __PYX_ERR(5, 17, __pyx_L1_error)
28765   __pyx_ptype_6tables_17lrucacheextension_BaseCache = __Pyx_ImportType(__pyx_t_1, "tables.lrucacheextension", "BaseCache", sizeof(struct __pyx_obj_6tables_17lrucacheextension_BaseCache), __Pyx_ImportType_CheckSize_Warn);
28766    if (!__pyx_ptype_6tables_17lrucacheextension_BaseCache) __PYX_ERR(5, 27, __pyx_L1_error)
28767   __pyx_vtabptr_6tables_17lrucacheextension_BaseCache = (struct __pyx_vtabstruct_6tables_17lrucacheextension_BaseCache*)__Pyx_GetVtable(__pyx_ptype_6tables_17lrucacheextension_BaseCache->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_17lrucacheextension_BaseCache)) __PYX_ERR(5, 27, __pyx_L1_error)
28768   __pyx_ptype_6tables_17lrucacheextension_ObjectNode = __Pyx_ImportType(__pyx_t_1, "tables.lrucacheextension", "ObjectNode", sizeof(struct __pyx_obj_6tables_17lrucacheextension_ObjectNode), __Pyx_ImportType_CheckSize_Warn);
28769    if (!__pyx_ptype_6tables_17lrucacheextension_ObjectNode) __PYX_ERR(5, 44, __pyx_L1_error)
28770   __pyx_ptype_6tables_17lrucacheextension_ObjectCache = __Pyx_ImportType(__pyx_t_1, "tables.lrucacheextension", "ObjectCache", sizeof(struct __pyx_obj_6tables_17lrucacheextension_ObjectCache), __Pyx_ImportType_CheckSize_Warn);
28771    if (!__pyx_ptype_6tables_17lrucacheextension_ObjectCache) __PYX_ERR(5, 50, __pyx_L1_error)
28772   __pyx_vtabptr_6tables_17lrucacheextension_ObjectCache = (struct __pyx_vtabstruct_6tables_17lrucacheextension_ObjectCache*)__Pyx_GetVtable(__pyx_ptype_6tables_17lrucacheextension_ObjectCache->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_17lrucacheextension_ObjectCache)) __PYX_ERR(5, 50, __pyx_L1_error)
28773   __pyx_ptype_6tables_17lrucacheextension_NumCache = __Pyx_ImportType(__pyx_t_1, "tables.lrucacheextension", "NumCache", sizeof(struct __pyx_obj_6tables_17lrucacheextension_NumCache), __Pyx_ImportType_CheckSize_Warn);
28774    if (!__pyx_ptype_6tables_17lrucacheextension_NumCache) __PYX_ERR(5, 65, __pyx_L1_error)
28775   __pyx_vtabptr_6tables_17lrucacheextension_NumCache = (struct __pyx_vtabstruct_6tables_17lrucacheextension_NumCache*)__Pyx_GetVtable(__pyx_ptype_6tables_17lrucacheextension_NumCache->tp_dict); if (unlikely(!__pyx_vtabptr_6tables_17lrucacheextension_NumCache)) __PYX_ERR(5, 65, __pyx_L1_error)
28776   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28777   __Pyx_RefNannyFinishContext();
28778   return 0;
28779   __pyx_L1_error:;
28780   __Pyx_XDECREF(__pyx_t_1);
28781   __Pyx_RefNannyFinishContext();
28782   return -1;
28783 }
28784 
__Pyx_modinit_variable_import_code(void)28785 static int __Pyx_modinit_variable_import_code(void) {
28786   __Pyx_RefNannyDeclarations
28787   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
28788   /*--- Variable import code ---*/
28789   __Pyx_RefNannyFinishContext();
28790   return 0;
28791 }
28792 
__Pyx_modinit_function_import_code(void)28793 static int __Pyx_modinit_function_import_code(void) {
28794   __Pyx_RefNannyDeclarations
28795   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
28796   /*--- Function import code ---*/
28797   __Pyx_RefNannyFinishContext();
28798   return 0;
28799 }
28800 
28801 
28802 #if PY_MAJOR_VERSION < 3
28803 #ifdef CYTHON_NO_PYINIT_EXPORT
28804 #define __Pyx_PyMODINIT_FUNC void
28805 #else
28806 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
28807 #endif
28808 #else
28809 #ifdef CYTHON_NO_PYINIT_EXPORT
28810 #define __Pyx_PyMODINIT_FUNC PyObject *
28811 #else
28812 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
28813 #endif
28814 #endif
28815 
28816 
28817 #if PY_MAJOR_VERSION < 3
28818 __Pyx_PyMODINIT_FUNC initindexesextension(void) CYTHON_SMALL_CODE; /*proto*/
initindexesextension(void)28819 __Pyx_PyMODINIT_FUNC initindexesextension(void)
28820 #else
28821 __Pyx_PyMODINIT_FUNC PyInit_indexesextension(void) CYTHON_SMALL_CODE; /*proto*/
28822 __Pyx_PyMODINIT_FUNC PyInit_indexesextension(void)
28823 #if CYTHON_PEP489_MULTI_PHASE_INIT
28824 {
28825   return PyModuleDef_Init(&__pyx_moduledef);
28826 }
28827 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
28828     #if PY_VERSION_HEX >= 0x030700A1
28829     static PY_INT64_T main_interpreter_id = -1;
28830     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
28831     if (main_interpreter_id == -1) {
28832         main_interpreter_id = current_id;
28833         return (unlikely(current_id == -1)) ? -1 : 0;
28834     } else if (unlikely(main_interpreter_id != current_id))
28835     #else
28836     static PyInterpreterState *main_interpreter = NULL;
28837     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
28838     if (!main_interpreter) {
28839         main_interpreter = current_interpreter;
28840     } else if (unlikely(main_interpreter != current_interpreter))
28841     #endif
28842     {
28843         PyErr_SetString(
28844             PyExc_ImportError,
28845             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
28846         return -1;
28847     }
28848     return 0;
28849 }
28850 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) {
28851     PyObject *value = PyObject_GetAttrString(spec, from_name);
28852     int result = 0;
28853     if (likely(value)) {
28854         if (allow_none || value != Py_None) {
28855             result = PyDict_SetItemString(moddict, to_name, value);
28856         }
28857         Py_DECREF(value);
28858     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
28859         PyErr_Clear();
28860     } else {
28861         result = -1;
28862     }
28863     return result;
28864 }
28865 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
28866     PyObject *module = NULL, *moddict, *modname;
28867     if (__Pyx_check_single_interpreter())
28868         return NULL;
28869     if (__pyx_m)
28870         return __Pyx_NewRef(__pyx_m);
28871     modname = PyObject_GetAttrString(spec, "name");
28872     if (unlikely(!modname)) goto bad;
28873     module = PyModule_NewObject(modname);
28874     Py_DECREF(modname);
28875     if (unlikely(!module)) goto bad;
28876     moddict = PyModule_GetDict(module);
28877     if (unlikely(!moddict)) goto bad;
28878     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
28879     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
28880     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
28881     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
28882     return module;
28883 bad:
28884     Py_XDECREF(module);
28885     return NULL;
28886 }
28887 
28888 
28889 static CYTHON_SMALL_CODE int __pyx_pymod_exec_indexesextension(PyObject *__pyx_pyinit_module)
28890 #endif
28891 #endif
28892 {
28893   PyObject *__pyx_t_1 = NULL;
28894   PyObject *__pyx_t_2 = NULL;
28895   int __pyx_t_3;
28896   __Pyx_RefNannyDeclarations
28897   #if CYTHON_PEP489_MULTI_PHASE_INIT
28898   if (__pyx_m) {
28899     if (__pyx_m == __pyx_pyinit_module) return 0;
28900     PyErr_SetString(PyExc_RuntimeError, "Module 'indexesextension' has already been imported. Re-initialisation is not supported.");
28901     return -1;
28902   }
28903   #elif PY_MAJOR_VERSION >= 3
28904   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
28905   #endif
28906   #if CYTHON_REFNANNY
28907 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
28908 if (!__Pyx_RefNanny) {
28909   PyErr_Clear();
28910   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
28911   if (!__Pyx_RefNanny)
28912       Py_FatalError("failed to import 'refnanny' module");
28913 }
28914 #endif
28915   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_indexesextension(void)", 0);
28916   if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28917   #ifdef __Pxy_PyFrame_Initialize_Offsets
28918   __Pxy_PyFrame_Initialize_Offsets();
28919   #endif
28920   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
28921   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
28922   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
28923   #ifdef __Pyx_CyFunction_USED
28924   if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28925   #endif
28926   #ifdef __Pyx_FusedFunction_USED
28927   if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28928   #endif
28929   #ifdef __Pyx_Coroutine_USED
28930   if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28931   #endif
28932   #ifdef __Pyx_Generator_USED
28933   if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28934   #endif
28935   #ifdef __Pyx_AsyncGen_USED
28936   if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28937   #endif
28938   #ifdef __Pyx_StopAsyncIteration_USED
28939   if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28940   #endif
28941   /*--- Library function declarations ---*/
28942   /*--- Threads initialization code ---*/
28943   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
28944   #ifdef WITH_THREAD /* Python build with threading support? */
28945   PyEval_InitThreads();
28946   #endif
28947   #endif
28948   /*--- Module creation code ---*/
28949   #if CYTHON_PEP489_MULTI_PHASE_INIT
28950   __pyx_m = __pyx_pyinit_module;
28951   Py_INCREF(__pyx_m);
28952   #else
28953   #if PY_MAJOR_VERSION < 3
28954   __pyx_m = Py_InitModule4("indexesextension", __pyx_methods, __pyx_k_cython_interface_for_keeping_ind, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
28955   #else
28956   __pyx_m = PyModule_Create(&__pyx_moduledef);
28957   #endif
28958   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
28959   #endif
28960   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
28961   Py_INCREF(__pyx_d);
28962   __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
28963   Py_INCREF(__pyx_b);
28964   __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
28965   Py_INCREF(__pyx_cython_runtime);
28966   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
28967   /*--- Initialize various global constants etc. ---*/
28968   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28969   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
28970   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28971   #endif
28972   if (__pyx_module_is_main_tables__indexesextension) {
28973     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28974   }
28975   #if PY_MAJOR_VERSION >= 3
28976   {
28977     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
28978     if (!PyDict_GetItemString(modules, "tables.indexesextension")) {
28979       if (unlikely(PyDict_SetItemString(modules, "tables.indexesextension", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
28980     }
28981   }
28982   #endif
28983   /*--- Builtin init code ---*/
28984   if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
28985   /*--- Constants init code ---*/
28986   if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
28987   /*--- Global type/function init code ---*/
28988   (void)__Pyx_modinit_global_init_code();
28989   (void)__Pyx_modinit_variable_export_code();
28990   (void)__Pyx_modinit_function_export_code();
28991   if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
28992   if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
28993   (void)__Pyx_modinit_variable_import_code();
28994   (void)__Pyx_modinit_function_import_code();
28995   /*--- Execution code ---*/
28996   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
28997   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
28998   #endif
28999 
29000   /* "tables/indexesextension.pyx":30
29001  *
29002  * import cython
29003  * import numpy             # <<<<<<<<<<<<<<
29004  * cimport numpy as cnp
29005  *
29006  */
29007   __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
29008   __Pyx_GOTREF(__pyx_t_1);
29009   if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
29010   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29011 
29012   /* "tables/indexesextension.pyx":33
29013  * cimport numpy as cnp
29014  *
29015  * from .exceptions import HDF5ExtError             # <<<<<<<<<<<<<<
29016  * from hdf5extension cimport Array
29017  *
29018  */
29019   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
29020   __Pyx_GOTREF(__pyx_t_1);
29021   __Pyx_INCREF(__pyx_n_s_HDF5ExtError);
29022   __Pyx_GIVEREF(__pyx_n_s_HDF5ExtError);
29023   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_HDF5ExtError);
29024   __pyx_t_2 = __Pyx_Import(__pyx_n_s_exceptions, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
29025   __Pyx_GOTREF(__pyx_t_2);
29026   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29027   __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_HDF5ExtError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
29028   __Pyx_GOTREF(__pyx_t_1);
29029   if (PyDict_SetItem(__pyx_d, __pyx_n_s_HDF5ExtError, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
29030   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29031   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29032 
29033   /* "tables/indexesextension.pyx":111
29034  * # The numpy API requires this function to be called before
29035  * # using any numpy facilities in an extension module.
29036  * import_array()             # <<<<<<<<<<<<<<
29037  *
29038  * #---------------------------------------------------------------------------
29039  */
29040   __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 111, __pyx_L1_error)
29041 
29042   /* "tables/indexesextension.pyx":147
29043  * DEF SMALL_QUICKSORT = 15
29044  *
29045  * def keysort(ndarray array1, ndarray array2):             # <<<<<<<<<<<<<<
29046  *     """Sort array1 in-place. array2 is also sorted following the array1 order.
29047  *
29048  */
29049   __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_16indexesextension_1keysort, NULL, __pyx_n_s_tables_indexesextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
29050   __Pyx_GOTREF(__pyx_t_2);
29051   if (PyDict_SetItem(__pyx_d, __pyx_n_s_keysort, __pyx_t_2) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
29052   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29053 
29054   /* "tables/indexesextension.pyx":510
29055  * # because I forsee that this should be a very common case.
29056  * # 2004-05-20
29057  * def _bisect_left(a, x, int hi):             # <<<<<<<<<<<<<<
29058  *   """Return the index where to insert item x in list a, assuming a is sorted.
29059  *
29060  */
29061   __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_16indexesextension_3_bisect_left, NULL, __pyx_n_s_tables_indexesextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
29062   __Pyx_GOTREF(__pyx_t_2);
29063   if (PyDict_SetItem(__pyx_d, __pyx_n_s_bisect_left, __pyx_t_2) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
29064   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29065 
29066   /* "tables/indexesextension.pyx":531
29067  *
29068  *
29069  * def _bisect_right(a, x, int hi):             # <<<<<<<<<<<<<<
29070  *   """Return the index where to insert item x in list a, assuming a is sorted.
29071  *
29072  */
29073   __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_16indexesextension_5_bisect_right, NULL, __pyx_n_s_tables_indexesextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
29074   __Pyx_GOTREF(__pyx_t_2);
29075   if (PyDict_SetItem(__pyx_d, __pyx_n_s_bisect_right, __pyx_t_2) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
29076   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29077 
29078   /* "(tree fragment)":1
29079  * def __pyx_unpickle_Index(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
29080  *     cdef object __pyx_PickleError
29081  *     cdef object __pyx_result
29082  */
29083   __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6tables_16indexesextension_7__pyx_unpickle_Index, NULL, __pyx_n_s_tables_indexesextension); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
29084   __Pyx_GOTREF(__pyx_t_2);
29085   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Index, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
29086   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29087 
29088   /* "tables/indexesextension.pyx":1
29089  * # -*- coding: utf-8 -*-             # <<<<<<<<<<<<<<
29090  *
29091  * ########################################################################
29092  */
29093   __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
29094   __Pyx_GOTREF(__pyx_t_2);
29095   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
29096   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29097 
29098   /* "../../env/miniconda/envs/py37/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
29099  *         raise ImportError("numpy.core.umath failed to import")
29100  *
29101  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
29102  *     try:
29103  *         _import_umath()
29104  */
29105 
29106   /*--- Wrapped vars code ---*/
29107 
29108   goto __pyx_L0;
29109   __pyx_L1_error:;
29110   __Pyx_XDECREF(__pyx_t_1);
29111   __Pyx_XDECREF(__pyx_t_2);
29112   if (__pyx_m) {
29113     if (__pyx_d) {
29114       __Pyx_AddTraceback("init tables.indexesextension", __pyx_clineno, __pyx_lineno, __pyx_filename);
29115     }
29116     Py_CLEAR(__pyx_m);
29117   } else if (!PyErr_Occurred()) {
29118     PyErr_SetString(PyExc_ImportError, "init tables.indexesextension");
29119   }
29120   __pyx_L0:;
29121   __Pyx_RefNannyFinishContext();
29122   #if CYTHON_PEP489_MULTI_PHASE_INIT
29123   return (__pyx_m != NULL) ? 0 : -1;
29124   #elif PY_MAJOR_VERSION >= 3
29125   return __pyx_m;
29126   #else
29127   return;
29128   #endif
29129 }
29130 
29131 /* --- Runtime support code --- */
29132 /* Refnanny */
29133 #if CYTHON_REFNANNY
__Pyx_RefNannyImportAPI(const char * modname)29134 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
29135     PyObject *m = NULL, *p = NULL;
29136     void *r = NULL;
29137     m = PyImport_ImportModule(modname);
29138     if (!m) goto end;
29139     p = PyObject_GetAttrString(m, "RefNannyAPI");
29140     if (!p) goto end;
29141     r = PyLong_AsVoidPtr(p);
29142 end:
29143     Py_XDECREF(p);
29144     Py_XDECREF(m);
29145     return (__Pyx_RefNannyAPIStruct *)r;
29146 }
29147 #endif
29148 
29149 /* PyObjectGetAttrStr */
29150 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetAttrStr(PyObject * obj,PyObject * attr_name)29151 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
29152     PyTypeObject* tp = Py_TYPE(obj);
29153     if (likely(tp->tp_getattro))
29154         return tp->tp_getattro(obj, attr_name);
29155 #if PY_MAJOR_VERSION < 3
29156     if (likely(tp->tp_getattr))
29157         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
29158 #endif
29159     return PyObject_GetAttr(obj, attr_name);
29160 }
29161 #endif
29162 
29163 /* GetBuiltinName */
__Pyx_GetBuiltinName(PyObject * name)29164 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
29165     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
29166     if (unlikely(!result)) {
29167         PyErr_Format(PyExc_NameError,
29168 #if PY_MAJOR_VERSION >= 3
29169             "name '%U' is not defined", name);
29170 #else
29171             "name '%.200s' is not defined", PyString_AS_STRING(name));
29172 #endif
29173     }
29174     return result;
29175 }
29176 
29177 /* RaiseArgTupleInvalid */
__Pyx_RaiseArgtupleInvalid(const char * func_name,int exact,Py_ssize_t num_min,Py_ssize_t num_max,Py_ssize_t num_found)29178 static void __Pyx_RaiseArgtupleInvalid(
29179     const char* func_name,
29180     int exact,
29181     Py_ssize_t num_min,
29182     Py_ssize_t num_max,
29183     Py_ssize_t num_found)
29184 {
29185     Py_ssize_t num_expected;
29186     const char *more_or_less;
29187     if (num_found < num_min) {
29188         num_expected = num_min;
29189         more_or_less = "at least";
29190     } else {
29191         num_expected = num_max;
29192         more_or_less = "at most";
29193     }
29194     if (exact) {
29195         more_or_less = "exactly";
29196     }
29197     PyErr_Format(PyExc_TypeError,
29198                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
29199                  func_name, more_or_less, num_expected,
29200                  (num_expected == 1) ? "" : "s", num_found);
29201 }
29202 
29203 /* RaiseDoubleKeywords */
__Pyx_RaiseDoubleKeywordsError(const char * func_name,PyObject * kw_name)29204 static void __Pyx_RaiseDoubleKeywordsError(
29205     const char* func_name,
29206     PyObject* kw_name)
29207 {
29208     PyErr_Format(PyExc_TypeError,
29209         #if PY_MAJOR_VERSION >= 3
29210         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
29211         #else
29212         "%s() got multiple values for keyword argument '%s'", func_name,
29213         PyString_AsString(kw_name));
29214         #endif
29215 }
29216 
29217 /* ParseKeywords */
__Pyx_ParseOptionalKeywords(PyObject * kwds,PyObject ** argnames[],PyObject * kwds2,PyObject * values[],Py_ssize_t num_pos_args,const char * function_name)29218 static int __Pyx_ParseOptionalKeywords(
29219     PyObject *kwds,
29220     PyObject **argnames[],
29221     PyObject *kwds2,
29222     PyObject *values[],
29223     Py_ssize_t num_pos_args,
29224     const char* function_name)
29225 {
29226     PyObject *key = 0, *value = 0;
29227     Py_ssize_t pos = 0;
29228     PyObject*** name;
29229     PyObject*** first_kw_arg = argnames + num_pos_args;
29230     while (PyDict_Next(kwds, &pos, &key, &value)) {
29231         name = first_kw_arg;
29232         while (*name && (**name != key)) name++;
29233         if (*name) {
29234             values[name-argnames] = value;
29235             continue;
29236         }
29237         name = first_kw_arg;
29238         #if PY_MAJOR_VERSION < 3
29239         if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
29240             while (*name) {
29241                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
29242                         && _PyString_Eq(**name, key)) {
29243                     values[name-argnames] = value;
29244                     break;
29245                 }
29246                 name++;
29247             }
29248             if (*name) continue;
29249             else {
29250                 PyObject*** argname = argnames;
29251                 while (argname != first_kw_arg) {
29252                     if ((**argname == key) || (
29253                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
29254                              && _PyString_Eq(**argname, key))) {
29255                         goto arg_passed_twice;
29256                     }
29257                     argname++;
29258                 }
29259             }
29260         } else
29261         #endif
29262         if (likely(PyUnicode_Check(key))) {
29263             while (*name) {
29264                 int cmp = (**name == key) ? 0 :
29265                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
29266                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
29267                 #endif
29268                     PyUnicode_Compare(**name, key);
29269                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
29270                 if (cmp == 0) {
29271                     values[name-argnames] = value;
29272                     break;
29273                 }
29274                 name++;
29275             }
29276             if (*name) continue;
29277             else {
29278                 PyObject*** argname = argnames;
29279                 while (argname != first_kw_arg) {
29280                     int cmp = (**argname == key) ? 0 :
29281                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
29282                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
29283                     #endif
29284                         PyUnicode_Compare(**argname, key);
29285                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
29286                     if (cmp == 0) goto arg_passed_twice;
29287                     argname++;
29288                 }
29289             }
29290         } else
29291             goto invalid_keyword_type;
29292         if (kwds2) {
29293             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
29294         } else {
29295             goto invalid_keyword;
29296         }
29297     }
29298     return 0;
29299 arg_passed_twice:
29300     __Pyx_RaiseDoubleKeywordsError(function_name, key);
29301     goto bad;
29302 invalid_keyword_type:
29303     PyErr_Format(PyExc_TypeError,
29304         "%.200s() keywords must be strings", function_name);
29305     goto bad;
29306 invalid_keyword:
29307     PyErr_Format(PyExc_TypeError,
29308     #if PY_MAJOR_VERSION < 3
29309         "%.200s() got an unexpected keyword argument '%.200s'",
29310         function_name, PyString_AsString(key));
29311     #else
29312         "%s() got an unexpected keyword argument '%U'",
29313         function_name, key);
29314     #endif
29315 bad:
29316     return -1;
29317 }
29318 
29319 /* ArgTypeTest */
__Pyx__ArgTypeTest(PyObject * obj,PyTypeObject * type,const char * name,int exact)29320 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
29321 {
29322     if (unlikely(!type)) {
29323         PyErr_SetString(PyExc_SystemError, "Missing type object");
29324         return 0;
29325     }
29326     else if (exact) {
29327         #if PY_MAJOR_VERSION == 2
29328         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
29329         #endif
29330     }
29331     else {
29332         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
29333     }
29334     PyErr_Format(PyExc_TypeError,
29335         "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
29336         name, type->tp_name, Py_TYPE(obj)->tp_name);
29337     return 0;
29338 }
29339 
29340 /* PyObjectCall */
29341 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_Call(PyObject * func,PyObject * arg,PyObject * kw)29342 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
29343     PyObject *result;
29344     ternaryfunc call = func->ob_type->tp_call;
29345     if (unlikely(!call))
29346         return PyObject_Call(func, arg, kw);
29347     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
29348         return NULL;
29349     result = (*call)(func, arg, kw);
29350     Py_LeaveRecursiveCall();
29351     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
29352         PyErr_SetString(
29353             PyExc_SystemError,
29354             "NULL result without error in PyObject_Call");
29355     }
29356     return result;
29357 }
29358 #endif
29359 
29360 /* PyErrFetchRestore */
29361 #if CYTHON_FAST_THREAD_STATE
__Pyx_ErrRestoreInState(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)29362 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
29363     PyObject *tmp_type, *tmp_value, *tmp_tb;
29364     tmp_type = tstate->curexc_type;
29365     tmp_value = tstate->curexc_value;
29366     tmp_tb = tstate->curexc_traceback;
29367     tstate->curexc_type = type;
29368     tstate->curexc_value = value;
29369     tstate->curexc_traceback = tb;
29370     Py_XDECREF(tmp_type);
29371     Py_XDECREF(tmp_value);
29372     Py_XDECREF(tmp_tb);
29373 }
__Pyx_ErrFetchInState(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)29374 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
29375     *type = tstate->curexc_type;
29376     *value = tstate->curexc_value;
29377     *tb = tstate->curexc_traceback;
29378     tstate->curexc_type = 0;
29379     tstate->curexc_value = 0;
29380     tstate->curexc_traceback = 0;
29381 }
29382 #endif
29383 
29384 /* RaiseException */
29385 #if PY_MAJOR_VERSION < 3
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,CYTHON_UNUSED PyObject * cause)29386 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
29387                         CYTHON_UNUSED PyObject *cause) {
29388     __Pyx_PyThreadState_declare
29389     Py_XINCREF(type);
29390     if (!value || value == Py_None)
29391         value = NULL;
29392     else
29393         Py_INCREF(value);
29394     if (!tb || tb == Py_None)
29395         tb = NULL;
29396     else {
29397         Py_INCREF(tb);
29398         if (!PyTraceBack_Check(tb)) {
29399             PyErr_SetString(PyExc_TypeError,
29400                 "raise: arg 3 must be a traceback or None");
29401             goto raise_error;
29402         }
29403     }
29404     if (PyType_Check(type)) {
29405 #if CYTHON_COMPILING_IN_PYPY
29406         if (!value) {
29407             Py_INCREF(Py_None);
29408             value = Py_None;
29409         }
29410 #endif
29411         PyErr_NormalizeException(&type, &value, &tb);
29412     } else {
29413         if (value) {
29414             PyErr_SetString(PyExc_TypeError,
29415                 "instance exception may not have a separate value");
29416             goto raise_error;
29417         }
29418         value = type;
29419         type = (PyObject*) Py_TYPE(type);
29420         Py_INCREF(type);
29421         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
29422             PyErr_SetString(PyExc_TypeError,
29423                 "raise: exception class must be a subclass of BaseException");
29424             goto raise_error;
29425         }
29426     }
29427     __Pyx_PyThreadState_assign
29428     __Pyx_ErrRestore(type, value, tb);
29429     return;
29430 raise_error:
29431     Py_XDECREF(value);
29432     Py_XDECREF(type);
29433     Py_XDECREF(tb);
29434     return;
29435 }
29436 #else
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,PyObject * cause)29437 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
29438     PyObject* owned_instance = NULL;
29439     if (tb == Py_None) {
29440         tb = 0;
29441     } else if (tb && !PyTraceBack_Check(tb)) {
29442         PyErr_SetString(PyExc_TypeError,
29443             "raise: arg 3 must be a traceback or None");
29444         goto bad;
29445     }
29446     if (value == Py_None)
29447         value = 0;
29448     if (PyExceptionInstance_Check(type)) {
29449         if (value) {
29450             PyErr_SetString(PyExc_TypeError,
29451                 "instance exception may not have a separate value");
29452             goto bad;
29453         }
29454         value = type;
29455         type = (PyObject*) Py_TYPE(value);
29456     } else if (PyExceptionClass_Check(type)) {
29457         PyObject *instance_class = NULL;
29458         if (value && PyExceptionInstance_Check(value)) {
29459             instance_class = (PyObject*) Py_TYPE(value);
29460             if (instance_class != type) {
29461                 int is_subclass = PyObject_IsSubclass(instance_class, type);
29462                 if (!is_subclass) {
29463                     instance_class = NULL;
29464                 } else if (unlikely(is_subclass == -1)) {
29465                     goto bad;
29466                 } else {
29467                     type = instance_class;
29468                 }
29469             }
29470         }
29471         if (!instance_class) {
29472             PyObject *args;
29473             if (!value)
29474                 args = PyTuple_New(0);
29475             else if (PyTuple_Check(value)) {
29476                 Py_INCREF(value);
29477                 args = value;
29478             } else
29479                 args = PyTuple_Pack(1, value);
29480             if (!args)
29481                 goto bad;
29482             owned_instance = PyObject_Call(type, args, NULL);
29483             Py_DECREF(args);
29484             if (!owned_instance)
29485                 goto bad;
29486             value = owned_instance;
29487             if (!PyExceptionInstance_Check(value)) {
29488                 PyErr_Format(PyExc_TypeError,
29489                              "calling %R should have returned an instance of "
29490                              "BaseException, not %R",
29491                              type, Py_TYPE(value));
29492                 goto bad;
29493             }
29494         }
29495     } else {
29496         PyErr_SetString(PyExc_TypeError,
29497             "raise: exception class must be a subclass of BaseException");
29498         goto bad;
29499     }
29500     if (cause) {
29501         PyObject *fixed_cause;
29502         if (cause == Py_None) {
29503             fixed_cause = NULL;
29504         } else if (PyExceptionClass_Check(cause)) {
29505             fixed_cause = PyObject_CallObject(cause, NULL);
29506             if (fixed_cause == NULL)
29507                 goto bad;
29508         } else if (PyExceptionInstance_Check(cause)) {
29509             fixed_cause = cause;
29510             Py_INCREF(fixed_cause);
29511         } else {
29512             PyErr_SetString(PyExc_TypeError,
29513                             "exception causes must derive from "
29514                             "BaseException");
29515             goto bad;
29516         }
29517         PyException_SetCause(value, fixed_cause);
29518     }
29519     PyErr_SetObject(type, value);
29520     if (tb) {
29521 #if CYTHON_COMPILING_IN_PYPY
29522         PyObject *tmp_type, *tmp_value, *tmp_tb;
29523         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
29524         Py_INCREF(tb);
29525         PyErr_Restore(tmp_type, tmp_value, tb);
29526         Py_XDECREF(tmp_tb);
29527 #else
29528         PyThreadState *tstate = __Pyx_PyThreadState_Current;
29529         PyObject* tmp_tb = tstate->curexc_traceback;
29530         if (tb != tmp_tb) {
29531             Py_INCREF(tb);
29532             tstate->curexc_traceback = tb;
29533             Py_XDECREF(tmp_tb);
29534         }
29535 #endif
29536     }
29537 bad:
29538     Py_XDECREF(owned_instance);
29539     return;
29540 }
29541 #endif
29542 
29543 /* GetItemInt */
__Pyx_GetItemInt_Generic(PyObject * o,PyObject * j)29544 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
29545     PyObject *r;
29546     if (!j) return NULL;
29547     r = PyObject_GetItem(o, j);
29548     Py_DECREF(j);
29549     return r;
29550 }
__Pyx_GetItemInt_List_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)29551 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
29552                                                               CYTHON_NCP_UNUSED int wraparound,
29553                                                               CYTHON_NCP_UNUSED int boundscheck) {
29554 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
29555     Py_ssize_t wrapped_i = i;
29556     if (wraparound & unlikely(i < 0)) {
29557         wrapped_i += PyList_GET_SIZE(o);
29558     }
29559     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
29560         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
29561         Py_INCREF(r);
29562         return r;
29563     }
29564     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
29565 #else
29566     return PySequence_GetItem(o, i);
29567 #endif
29568 }
__Pyx_GetItemInt_Tuple_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)29569 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
29570                                                               CYTHON_NCP_UNUSED int wraparound,
29571                                                               CYTHON_NCP_UNUSED int boundscheck) {
29572 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
29573     Py_ssize_t wrapped_i = i;
29574     if (wraparound & unlikely(i < 0)) {
29575         wrapped_i += PyTuple_GET_SIZE(o);
29576     }
29577     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
29578         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
29579         Py_INCREF(r);
29580         return r;
29581     }
29582     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
29583 #else
29584     return PySequence_GetItem(o, i);
29585 #endif
29586 }
__Pyx_GetItemInt_Fast(PyObject * o,Py_ssize_t i,int is_list,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)29587 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
29588                                                      CYTHON_NCP_UNUSED int wraparound,
29589                                                      CYTHON_NCP_UNUSED int boundscheck) {
29590 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
29591     if (is_list || PyList_CheckExact(o)) {
29592         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
29593         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
29594             PyObject *r = PyList_GET_ITEM(o, n);
29595             Py_INCREF(r);
29596             return r;
29597         }
29598     }
29599     else if (PyTuple_CheckExact(o)) {
29600         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
29601         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
29602             PyObject *r = PyTuple_GET_ITEM(o, n);
29603             Py_INCREF(r);
29604             return r;
29605         }
29606     } else {
29607         PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
29608         if (likely(m && m->sq_item)) {
29609             if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
29610                 Py_ssize_t l = m->sq_length(o);
29611                 if (likely(l >= 0)) {
29612                     i += l;
29613                 } else {
29614                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
29615                         return NULL;
29616                     PyErr_Clear();
29617                 }
29618             }
29619             return m->sq_item(o, i);
29620         }
29621     }
29622 #else
29623     if (is_list || PySequence_Check(o)) {
29624         return PySequence_GetItem(o, i);
29625     }
29626 #endif
29627     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
29628 }
29629 
29630 /* None */
__Pyx_div_long(long a,long b)29631 static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
29632     long q = a / b;
29633     long r = a - q*b;
29634     q -= ((r != 0) & ((r ^ b) < 0));
29635     return q;
29636 }
29637 
29638 /* PyErrExceptionMatches */
29639 #if CYTHON_FAST_THREAD_STATE
__Pyx_PyErr_ExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)29640 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
29641     Py_ssize_t i, n;
29642     n = PyTuple_GET_SIZE(tuple);
29643 #if PY_MAJOR_VERSION >= 3
29644     for (i=0; i<n; i++) {
29645         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
29646     }
29647 #endif
29648     for (i=0; i<n; i++) {
29649         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
29650     }
29651     return 0;
29652 }
__Pyx_PyErr_ExceptionMatchesInState(PyThreadState * tstate,PyObject * err)29653 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
29654     PyObject *exc_type = tstate->curexc_type;
29655     if (exc_type == err) return 1;
29656     if (unlikely(!exc_type)) return 0;
29657     if (unlikely(PyTuple_Check(err)))
29658         return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
29659     return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
29660 }
29661 #endif
29662 
29663 /* GetAttr */
__Pyx_GetAttr(PyObject * o,PyObject * n)29664 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
29665 #if CYTHON_USE_TYPE_SLOTS
29666 #if PY_MAJOR_VERSION >= 3
29667     if (likely(PyUnicode_Check(n)))
29668 #else
29669     if (likely(PyString_Check(n)))
29670 #endif
29671         return __Pyx_PyObject_GetAttrStr(o, n);
29672 #endif
29673     return PyObject_GetAttr(o, n);
29674 }
29675 
29676 /* GetAttr3 */
__Pyx_GetAttr3Default(PyObject * d)29677 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
29678     __Pyx_PyThreadState_declare
29679     __Pyx_PyThreadState_assign
29680     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
29681         return NULL;
29682     __Pyx_PyErr_Clear();
29683     Py_INCREF(d);
29684     return d;
29685 }
__Pyx_GetAttr3(PyObject * o,PyObject * n,PyObject * d)29686 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
29687     PyObject *r = __Pyx_GetAttr(o, n);
29688     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
29689 }
29690 
29691 /* PyDictVersioning */
29692 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
__Pyx_get_tp_dict_version(PyObject * obj)29693 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
29694     PyObject *dict = Py_TYPE(obj)->tp_dict;
29695     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
29696 }
__Pyx_get_object_dict_version(PyObject * obj)29697 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
29698     PyObject **dictptr = NULL;
29699     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
29700     if (offset) {
29701 #if CYTHON_COMPILING_IN_CPYTHON
29702         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
29703 #else
29704         dictptr = _PyObject_GetDictPtr(obj);
29705 #endif
29706     }
29707     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
29708 }
__Pyx_object_dict_version_matches(PyObject * obj,PY_UINT64_T tp_dict_version,PY_UINT64_T obj_dict_version)29709 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
29710     PyObject *dict = Py_TYPE(obj)->tp_dict;
29711     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
29712         return 0;
29713     return obj_dict_version == __Pyx_get_object_dict_version(obj);
29714 }
29715 #endif
29716 
29717 /* GetModuleGlobalName */
29718 #if CYTHON_USE_DICT_VERSIONS
__Pyx__GetModuleGlobalName(PyObject * name,PY_UINT64_T * dict_version,PyObject ** dict_cached_value)29719 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
29720 #else
29721 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
29722 #endif
29723 {
29724     PyObject *result;
29725 #if !CYTHON_AVOID_BORROWED_REFS
29726 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
29727     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
29728     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
29729     if (likely(result)) {
29730         return __Pyx_NewRef(result);
29731     } else if (unlikely(PyErr_Occurred())) {
29732         return NULL;
29733     }
29734 #else
29735     result = PyDict_GetItem(__pyx_d, name);
29736     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
29737     if (likely(result)) {
29738         return __Pyx_NewRef(result);
29739     }
29740 #endif
29741 #else
29742     result = PyObject_GetItem(__pyx_d, name);
29743     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
29744     if (likely(result)) {
29745         return __Pyx_NewRef(result);
29746     }
29747     PyErr_Clear();
29748 #endif
29749     return __Pyx_GetBuiltinName(name);
29750 }
29751 
29752 /* PyCFunctionFastCall */
29753 #if CYTHON_FAST_PYCCALL
__Pyx_PyCFunction_FastCall(PyObject * func_obj,PyObject ** args,Py_ssize_t nargs)29754 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
29755     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
29756     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
29757     PyObject *self = PyCFunction_GET_SELF(func);
29758     int flags = PyCFunction_GET_FLAGS(func);
29759     assert(PyCFunction_Check(func));
29760     assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
29761     assert(nargs >= 0);
29762     assert(nargs == 0 || args != NULL);
29763     /* _PyCFunction_FastCallDict() must not be called with an exception set,
29764        because it may clear it (directly or indirectly) and so the
29765        caller loses its exception */
29766     assert(!PyErr_Occurred());
29767     if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
29768         return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
29769     } else {
29770         return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
29771     }
29772 }
29773 #endif
29774 
29775 /* PyFunctionFastCall */
29776 #if CYTHON_FAST_PYCALL
__Pyx_PyFunction_FastCallNoKw(PyCodeObject * co,PyObject ** args,Py_ssize_t na,PyObject * globals)29777 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
29778                                                PyObject *globals) {
29779     PyFrameObject *f;
29780     PyThreadState *tstate = __Pyx_PyThreadState_Current;
29781     PyObject **fastlocals;
29782     Py_ssize_t i;
29783     PyObject *result;
29784     assert(globals != NULL);
29785     /* XXX Perhaps we should create a specialized
29786        PyFrame_New() that doesn't take locals, but does
29787        take builtins without sanity checking them.
29788        */
29789     assert(tstate != NULL);
29790     f = PyFrame_New(tstate, co, globals, NULL);
29791     if (f == NULL) {
29792         return NULL;
29793     }
29794     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
29795     for (i = 0; i < na; i++) {
29796         Py_INCREF(*args);
29797         fastlocals[i] = *args++;
29798     }
29799     result = PyEval_EvalFrameEx(f,0);
29800     ++tstate->recursion_depth;
29801     Py_DECREF(f);
29802     --tstate->recursion_depth;
29803     return result;
29804 }
29805 #if 1 || PY_VERSION_HEX < 0x030600B1
__Pyx_PyFunction_FastCallDict(PyObject * func,PyObject ** args,Py_ssize_t nargs,PyObject * kwargs)29806 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
29807     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
29808     PyObject *globals = PyFunction_GET_GLOBALS(func);
29809     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
29810     PyObject *closure;
29811 #if PY_MAJOR_VERSION >= 3
29812     PyObject *kwdefs;
29813 #endif
29814     PyObject *kwtuple, **k;
29815     PyObject **d;
29816     Py_ssize_t nd;
29817     Py_ssize_t nk;
29818     PyObject *result;
29819     assert(kwargs == NULL || PyDict_Check(kwargs));
29820     nk = kwargs ? PyDict_Size(kwargs) : 0;
29821     if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
29822         return NULL;
29823     }
29824     if (
29825 #if PY_MAJOR_VERSION >= 3
29826             co->co_kwonlyargcount == 0 &&
29827 #endif
29828             likely(kwargs == NULL || nk == 0) &&
29829             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
29830         if (argdefs == NULL && co->co_argcount == nargs) {
29831             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
29832             goto done;
29833         }
29834         else if (nargs == 0 && argdefs != NULL
29835                  && co->co_argcount == Py_SIZE(argdefs)) {
29836             /* function called with no arguments, but all parameters have
29837                a default value: use default values as arguments .*/
29838             args = &PyTuple_GET_ITEM(argdefs, 0);
29839             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
29840             goto done;
29841         }
29842     }
29843     if (kwargs != NULL) {
29844         Py_ssize_t pos, i;
29845         kwtuple = PyTuple_New(2 * nk);
29846         if (kwtuple == NULL) {
29847             result = NULL;
29848             goto done;
29849         }
29850         k = &PyTuple_GET_ITEM(kwtuple, 0);
29851         pos = i = 0;
29852         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
29853             Py_INCREF(k[i]);
29854             Py_INCREF(k[i+1]);
29855             i += 2;
29856         }
29857         nk = i / 2;
29858     }
29859     else {
29860         kwtuple = NULL;
29861         k = NULL;
29862     }
29863     closure = PyFunction_GET_CLOSURE(func);
29864 #if PY_MAJOR_VERSION >= 3
29865     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
29866 #endif
29867     if (argdefs != NULL) {
29868         d = &PyTuple_GET_ITEM(argdefs, 0);
29869         nd = Py_SIZE(argdefs);
29870     }
29871     else {
29872         d = NULL;
29873         nd = 0;
29874     }
29875 #if PY_MAJOR_VERSION >= 3
29876     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
29877                                args, (int)nargs,
29878                                k, (int)nk,
29879                                d, (int)nd, kwdefs, closure);
29880 #else
29881     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
29882                                args, (int)nargs,
29883                                k, (int)nk,
29884                                d, (int)nd, closure);
29885 #endif
29886     Py_XDECREF(kwtuple);
29887 done:
29888     Py_LeaveRecursiveCall();
29889     return result;
29890 }
29891 #endif
29892 #endif
29893 
29894 /* PyObjectCall2Args */
__Pyx_PyObject_Call2Args(PyObject * function,PyObject * arg1,PyObject * arg2)29895 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
29896     PyObject *args, *result = NULL;
29897     #if CYTHON_FAST_PYCALL
29898     if (PyFunction_Check(function)) {
29899         PyObject *args[2] = {arg1, arg2};
29900         return __Pyx_PyFunction_FastCall(function, args, 2);
29901     }
29902     #endif
29903     #if CYTHON_FAST_PYCCALL
29904     if (__Pyx_PyFastCFunction_Check(function)) {
29905         PyObject *args[2] = {arg1, arg2};
29906         return __Pyx_PyCFunction_FastCall(function, args, 2);
29907     }
29908     #endif
29909     args = PyTuple_New(2);
29910     if (unlikely(!args)) goto done;
29911     Py_INCREF(arg1);
29912     PyTuple_SET_ITEM(args, 0, arg1);
29913     Py_INCREF(arg2);
29914     PyTuple_SET_ITEM(args, 1, arg2);
29915     Py_INCREF(function);
29916     result = __Pyx_PyObject_Call(function, args, NULL);
29917     Py_DECREF(args);
29918     Py_DECREF(function);
29919 done:
29920     return result;
29921 }
29922 
29923 /* PyObjectCallMethO */
29924 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallMethO(PyObject * func,PyObject * arg)29925 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
29926     PyObject *self, *result;
29927     PyCFunction cfunc;
29928     cfunc = PyCFunction_GET_FUNCTION(func);
29929     self = PyCFunction_GET_SELF(func);
29930     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
29931         return NULL;
29932     result = cfunc(self, arg);
29933     Py_LeaveRecursiveCall();
29934     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
29935         PyErr_SetString(
29936             PyExc_SystemError,
29937             "NULL result without error in PyObject_Call");
29938     }
29939     return result;
29940 }
29941 #endif
29942 
29943 /* PyObjectCallOneArg */
29944 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx__PyObject_CallOneArg(PyObject * func,PyObject * arg)29945 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
29946     PyObject *result;
29947     PyObject *args = PyTuple_New(1);
29948     if (unlikely(!args)) return NULL;
29949     Py_INCREF(arg);
29950     PyTuple_SET_ITEM(args, 0, arg);
29951     result = __Pyx_PyObject_Call(func, args, NULL);
29952     Py_DECREF(args);
29953     return result;
29954 }
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)29955 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
29956 #if CYTHON_FAST_PYCALL
29957     if (PyFunction_Check(func)) {
29958         return __Pyx_PyFunction_FastCall(func, &arg, 1);
29959     }
29960 #endif
29961     if (likely(PyCFunction_Check(func))) {
29962         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
29963             return __Pyx_PyObject_CallMethO(func, arg);
29964 #if CYTHON_FAST_PYCCALL
29965         } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
29966             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
29967 #endif
29968         }
29969     }
29970     return __Pyx__PyObject_CallOneArg(func, arg);
29971 }
29972 #else
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)29973 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
29974     PyObject *result;
29975     PyObject *args = PyTuple_Pack(1, arg);
29976     if (unlikely(!args)) return NULL;
29977     result = __Pyx_PyObject_Call(func, args, NULL);
29978     Py_DECREF(args);
29979     return result;
29980 }
29981 #endif
29982 
29983 /* PyObjectCallNoArg */
29984 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallNoArg(PyObject * func)29985 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
29986 #if CYTHON_FAST_PYCALL
29987     if (PyFunction_Check(func)) {
29988         return __Pyx_PyFunction_FastCall(func, NULL, 0);
29989     }
29990 #endif
29991 #ifdef __Pyx_CyFunction_USED
29992     if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
29993 #else
29994     if (likely(PyCFunction_Check(func)))
29995 #endif
29996     {
29997         if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
29998             return __Pyx_PyObject_CallMethO(func, NULL);
29999         }
30000     }
30001     return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
30002 }
30003 #endif
30004 
30005 /* ExtTypeTest */
__Pyx_TypeTest(PyObject * obj,PyTypeObject * type)30006 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
30007     if (unlikely(!type)) {
30008         PyErr_SetString(PyExc_SystemError, "Missing type object");
30009         return 0;
30010     }
30011     if (likely(__Pyx_TypeCheck(obj, type)))
30012         return 1;
30013     PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
30014                  Py_TYPE(obj)->tp_name, type->tp_name);
30015     return 0;
30016 }
30017 
30018 /* SliceObject */
__Pyx_PyObject_GetSlice(PyObject * obj,Py_ssize_t cstart,Py_ssize_t cstop,PyObject ** _py_start,PyObject ** _py_stop,PyObject ** _py_slice,int has_cstart,int has_cstop,CYTHON_UNUSED int wraparound)30019 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
30020         Py_ssize_t cstart, Py_ssize_t cstop,
30021         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
30022         int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
30023 #if CYTHON_USE_TYPE_SLOTS
30024     PyMappingMethods* mp;
30025 #if PY_MAJOR_VERSION < 3
30026     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
30027     if (likely(ms && ms->sq_slice)) {
30028         if (!has_cstart) {
30029             if (_py_start && (*_py_start != Py_None)) {
30030                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
30031                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
30032             } else
30033                 cstart = 0;
30034         }
30035         if (!has_cstop) {
30036             if (_py_stop && (*_py_stop != Py_None)) {
30037                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
30038                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
30039             } else
30040                 cstop = PY_SSIZE_T_MAX;
30041         }
30042         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
30043             Py_ssize_t l = ms->sq_length(obj);
30044             if (likely(l >= 0)) {
30045                 if (cstop < 0) {
30046                     cstop += l;
30047                     if (cstop < 0) cstop = 0;
30048                 }
30049                 if (cstart < 0) {
30050                     cstart += l;
30051                     if (cstart < 0) cstart = 0;
30052                 }
30053             } else {
30054                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
30055                     goto bad;
30056                 PyErr_Clear();
30057             }
30058         }
30059         return ms->sq_slice(obj, cstart, cstop);
30060     }
30061 #endif
30062     mp = Py_TYPE(obj)->tp_as_mapping;
30063     if (likely(mp && mp->mp_subscript))
30064 #endif
30065     {
30066         PyObject* result;
30067         PyObject *py_slice, *py_start, *py_stop;
30068         if (_py_slice) {
30069             py_slice = *_py_slice;
30070         } else {
30071             PyObject* owned_start = NULL;
30072             PyObject* owned_stop = NULL;
30073             if (_py_start) {
30074                 py_start = *_py_start;
30075             } else {
30076                 if (has_cstart) {
30077                     owned_start = py_start = PyInt_FromSsize_t(cstart);
30078                     if (unlikely(!py_start)) goto bad;
30079                 } else
30080                     py_start = Py_None;
30081             }
30082             if (_py_stop) {
30083                 py_stop = *_py_stop;
30084             } else {
30085                 if (has_cstop) {
30086                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
30087                     if (unlikely(!py_stop)) {
30088                         Py_XDECREF(owned_start);
30089                         goto bad;
30090                     }
30091                 } else
30092                     py_stop = Py_None;
30093             }
30094             py_slice = PySlice_New(py_start, py_stop, Py_None);
30095             Py_XDECREF(owned_start);
30096             Py_XDECREF(owned_stop);
30097             if (unlikely(!py_slice)) goto bad;
30098         }
30099 #if CYTHON_USE_TYPE_SLOTS
30100         result = mp->mp_subscript(obj, py_slice);
30101 #else
30102         result = PyObject_GetItem(obj, py_slice);
30103 #endif
30104         if (!_py_slice) {
30105             Py_DECREF(py_slice);
30106         }
30107         return result;
30108     }
30109     PyErr_Format(PyExc_TypeError,
30110         "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
30111 bad:
30112     return NULL;
30113 }
30114 
30115 /* PyObjectSetAttrStr */
30116 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_SetAttrStr(PyObject * obj,PyObject * attr_name,PyObject * value)30117 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
30118     PyTypeObject* tp = Py_TYPE(obj);
30119     if (likely(tp->tp_setattro))
30120         return tp->tp_setattro(obj, attr_name, value);
30121 #if PY_MAJOR_VERSION < 3
30122     if (likely(tp->tp_setattr))
30123         return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
30124 #endif
30125     return PyObject_SetAttr(obj, attr_name, value);
30126 }
30127 #endif
30128 
30129 /* DictGetItem */
30130 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
__Pyx_PyDict_GetItem(PyObject * d,PyObject * key)30131 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
30132     PyObject *value;
30133     value = PyDict_GetItemWithError(d, key);
30134     if (unlikely(!value)) {
30135         if (!PyErr_Occurred()) {
30136             if (unlikely(PyTuple_Check(key))) {
30137                 PyObject* args = PyTuple_Pack(1, key);
30138                 if (likely(args)) {
30139                     PyErr_SetObject(PyExc_KeyError, args);
30140                     Py_DECREF(args);
30141                 }
30142             } else {
30143                 PyErr_SetObject(PyExc_KeyError, key);
30144             }
30145         }
30146         return NULL;
30147     }
30148     Py_INCREF(value);
30149     return value;
30150 }
30151 #endif
30152 
30153 /* 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)30154 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
30155                                   CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
30156                                   int full_traceback, CYTHON_UNUSED int nogil) {
30157     PyObject *old_exc, *old_val, *old_tb;
30158     PyObject *ctx;
30159     __Pyx_PyThreadState_declare
30160 #ifdef WITH_THREAD
30161     PyGILState_STATE state;
30162     if (nogil)
30163         state = PyGILState_Ensure();
30164 #ifdef _MSC_VER
30165     else state = (PyGILState_STATE)-1;
30166 #endif
30167 #endif
30168     __Pyx_PyThreadState_assign
30169     __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
30170     if (full_traceback) {
30171         Py_XINCREF(old_exc);
30172         Py_XINCREF(old_val);
30173         Py_XINCREF(old_tb);
30174         __Pyx_ErrRestore(old_exc, old_val, old_tb);
30175         PyErr_PrintEx(1);
30176     }
30177     #if PY_MAJOR_VERSION < 3
30178     ctx = PyString_FromString(name);
30179     #else
30180     ctx = PyUnicode_FromString(name);
30181     #endif
30182     __Pyx_ErrRestore(old_exc, old_val, old_tb);
30183     if (!ctx) {
30184         PyErr_WriteUnraisable(Py_None);
30185     } else {
30186         PyErr_WriteUnraisable(ctx);
30187         Py_DECREF(ctx);
30188     }
30189 #ifdef WITH_THREAD
30190     if (nogil)
30191         PyGILState_Release(state);
30192 #endif
30193 }
30194 
30195 /* None */
__Pyx_div_int(int a,int b)30196 static CYTHON_INLINE int __Pyx_div_int(int a, int b) {
30197     int q = a / b;
30198     int r = a - q*b;
30199     q -= ((r != 0) & ((r ^ b) < 0));
30200     return q;
30201 }
30202 
30203 /* Import */
__Pyx_Import(PyObject * name,PyObject * from_list,int level)30204 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
30205     PyObject *empty_list = 0;
30206     PyObject *module = 0;
30207     PyObject *global_dict = 0;
30208     PyObject *empty_dict = 0;
30209     PyObject *list;
30210     #if PY_MAJOR_VERSION < 3
30211     PyObject *py_import;
30212     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
30213     if (!py_import)
30214         goto bad;
30215     #endif
30216     if (from_list)
30217         list = from_list;
30218     else {
30219         empty_list = PyList_New(0);
30220         if (!empty_list)
30221             goto bad;
30222         list = empty_list;
30223     }
30224     global_dict = PyModule_GetDict(__pyx_m);
30225     if (!global_dict)
30226         goto bad;
30227     empty_dict = PyDict_New();
30228     if (!empty_dict)
30229         goto bad;
30230     {
30231         #if PY_MAJOR_VERSION >= 3
30232         if (level == -1) {
30233             if (strchr(__Pyx_MODULE_NAME, '.')) {
30234                 module = PyImport_ImportModuleLevelObject(
30235                     name, global_dict, empty_dict, list, 1);
30236                 if (!module) {
30237                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
30238                         goto bad;
30239                     PyErr_Clear();
30240                 }
30241             }
30242             level = 0;
30243         }
30244         #endif
30245         if (!module) {
30246             #if PY_MAJOR_VERSION < 3
30247             PyObject *py_level = PyInt_FromLong(level);
30248             if (!py_level)
30249                 goto bad;
30250             module = PyObject_CallFunctionObjArgs(py_import,
30251                 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
30252             Py_DECREF(py_level);
30253             #else
30254             module = PyImport_ImportModuleLevelObject(
30255                 name, global_dict, empty_dict, list, level);
30256             #endif
30257         }
30258     }
30259 bad:
30260     #if PY_MAJOR_VERSION < 3
30261     Py_XDECREF(py_import);
30262     #endif
30263     Py_XDECREF(empty_list);
30264     Py_XDECREF(empty_dict);
30265     return module;
30266 }
30267 
30268 /* ImportFrom */
__Pyx_ImportFrom(PyObject * module,PyObject * name)30269 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
30270     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
30271     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
30272         PyErr_Format(PyExc_ImportError,
30273         #if PY_MAJOR_VERSION < 3
30274             "cannot import name %.230s", PyString_AS_STRING(name));
30275         #else
30276             "cannot import name %S", name);
30277         #endif
30278     }
30279     return value;
30280 }
30281 
30282 /* HasAttr */
__Pyx_HasAttr(PyObject * o,PyObject * n)30283 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
30284     PyObject *r;
30285     if (unlikely(!__Pyx_PyBaseString_Check(n))) {
30286         PyErr_SetString(PyExc_TypeError,
30287                         "hasattr(): attribute name must be string");
30288         return -1;
30289     }
30290     r = __Pyx_GetAttr(o, n);
30291     if (unlikely(!r)) {
30292         PyErr_Clear();
30293         return 0;
30294     } else {
30295         Py_DECREF(r);
30296         return 1;
30297     }
30298 }
30299 
30300 /* RaiseTooManyValuesToUnpack */
__Pyx_RaiseTooManyValuesError(Py_ssize_t expected)30301 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
30302     PyErr_Format(PyExc_ValueError,
30303                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
30304 }
30305 
30306 /* RaiseNeedMoreValuesToUnpack */
__Pyx_RaiseNeedMoreValuesError(Py_ssize_t index)30307 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
30308     PyErr_Format(PyExc_ValueError,
30309                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
30310                  index, (index == 1) ? "" : "s");
30311 }
30312 
30313 /* RaiseNoneIterError */
__Pyx_RaiseNoneNotIterableError(void)30314 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
30315     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
30316 }
30317 
30318 /* GetTopmostException */
30319 #if CYTHON_USE_EXC_INFO_STACK
30320 static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState * tstate)30321 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
30322 {
30323     _PyErr_StackItem *exc_info = tstate->exc_info;
30324     while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
30325            exc_info->previous_item != NULL)
30326     {
30327         exc_info = exc_info->previous_item;
30328     }
30329     return exc_info;
30330 }
30331 #endif
30332 
30333 /* SaveResetException */
30334 #if CYTHON_FAST_THREAD_STATE
__Pyx__ExceptionSave(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)30335 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
30336     #if CYTHON_USE_EXC_INFO_STACK
30337     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
30338     *type = exc_info->exc_type;
30339     *value = exc_info->exc_value;
30340     *tb = exc_info->exc_traceback;
30341     #else
30342     *type = tstate->exc_type;
30343     *value = tstate->exc_value;
30344     *tb = tstate->exc_traceback;
30345     #endif
30346     Py_XINCREF(*type);
30347     Py_XINCREF(*value);
30348     Py_XINCREF(*tb);
30349 }
__Pyx__ExceptionReset(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)30350 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
30351     PyObject *tmp_type, *tmp_value, *tmp_tb;
30352     #if CYTHON_USE_EXC_INFO_STACK
30353     _PyErr_StackItem *exc_info = tstate->exc_info;
30354     tmp_type = exc_info->exc_type;
30355     tmp_value = exc_info->exc_value;
30356     tmp_tb = exc_info->exc_traceback;
30357     exc_info->exc_type = type;
30358     exc_info->exc_value = value;
30359     exc_info->exc_traceback = tb;
30360     #else
30361     tmp_type = tstate->exc_type;
30362     tmp_value = tstate->exc_value;
30363     tmp_tb = tstate->exc_traceback;
30364     tstate->exc_type = type;
30365     tstate->exc_value = value;
30366     tstate->exc_traceback = tb;
30367     #endif
30368     Py_XDECREF(tmp_type);
30369     Py_XDECREF(tmp_value);
30370     Py_XDECREF(tmp_tb);
30371 }
30372 #endif
30373 
30374 /* GetException */
30375 #if CYTHON_FAST_THREAD_STATE
__Pyx__GetException(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)30376 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
30377 #else
30378 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
30379 #endif
30380 {
30381     PyObject *local_type, *local_value, *local_tb;
30382 #if CYTHON_FAST_THREAD_STATE
30383     PyObject *tmp_type, *tmp_value, *tmp_tb;
30384     local_type = tstate->curexc_type;
30385     local_value = tstate->curexc_value;
30386     local_tb = tstate->curexc_traceback;
30387     tstate->curexc_type = 0;
30388     tstate->curexc_value = 0;
30389     tstate->curexc_traceback = 0;
30390 #else
30391     PyErr_Fetch(&local_type, &local_value, &local_tb);
30392 #endif
30393     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
30394 #if CYTHON_FAST_THREAD_STATE
30395     if (unlikely(tstate->curexc_type))
30396 #else
30397     if (unlikely(PyErr_Occurred()))
30398 #endif
30399         goto bad;
30400     #if PY_MAJOR_VERSION >= 3
30401     if (local_tb) {
30402         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
30403             goto bad;
30404     }
30405     #endif
30406     Py_XINCREF(local_tb);
30407     Py_XINCREF(local_type);
30408     Py_XINCREF(local_value);
30409     *type = local_type;
30410     *value = local_value;
30411     *tb = local_tb;
30412 #if CYTHON_FAST_THREAD_STATE
30413     #if CYTHON_USE_EXC_INFO_STACK
30414     {
30415         _PyErr_StackItem *exc_info = tstate->exc_info;
30416         tmp_type = exc_info->exc_type;
30417         tmp_value = exc_info->exc_value;
30418         tmp_tb = exc_info->exc_traceback;
30419         exc_info->exc_type = local_type;
30420         exc_info->exc_value = local_value;
30421         exc_info->exc_traceback = local_tb;
30422     }
30423     #else
30424     tmp_type = tstate->exc_type;
30425     tmp_value = tstate->exc_value;
30426     tmp_tb = tstate->exc_traceback;
30427     tstate->exc_type = local_type;
30428     tstate->exc_value = local_value;
30429     tstate->exc_traceback = local_tb;
30430     #endif
30431     Py_XDECREF(tmp_type);
30432     Py_XDECREF(tmp_value);
30433     Py_XDECREF(tmp_tb);
30434 #else
30435     PyErr_SetExcInfo(local_type, local_value, local_tb);
30436 #endif
30437     return 0;
30438 bad:
30439     *type = 0;
30440     *value = 0;
30441     *tb = 0;
30442     Py_XDECREF(local_type);
30443     Py_XDECREF(local_value);
30444     Py_XDECREF(local_tb);
30445     return -1;
30446 }
30447 
30448 /* CallNextTpDealloc */
__Pyx_call_next_tp_dealloc(PyObject * obj,destructor current_tp_dealloc)30449 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
30450     PyTypeObject* type = Py_TYPE(obj);
30451     while (type && type->tp_dealloc != current_tp_dealloc)
30452         type = type->tp_base;
30453     while (type && type->tp_dealloc == current_tp_dealloc)
30454         type = type->tp_base;
30455     if (type)
30456         type->tp_dealloc(obj);
30457 }
30458 
30459 /* CallNextTpTraverse */
__Pyx_call_next_tp_traverse(PyObject * obj,visitproc v,void * a,traverseproc current_tp_traverse)30460 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
30461     PyTypeObject* type = Py_TYPE(obj);
30462     while (type && type->tp_traverse != current_tp_traverse)
30463         type = type->tp_base;
30464     while (type && type->tp_traverse == current_tp_traverse)
30465         type = type->tp_base;
30466     if (type && type->tp_traverse)
30467         return type->tp_traverse(obj, v, a);
30468     return 0;
30469 }
30470 
30471 /* CallNextTpClear */
__Pyx_call_next_tp_clear(PyObject * obj,inquiry current_tp_clear)30472 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
30473     PyTypeObject* type = Py_TYPE(obj);
30474     while (type && type->tp_clear != current_tp_clear)
30475         type = type->tp_base;
30476     while (type && type->tp_clear == current_tp_clear)
30477         type = type->tp_base;
30478     if (type && type->tp_clear)
30479         type->tp_clear(obj);
30480 }
30481 
30482 /* PyObject_GenericGetAttrNoDict */
30483 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_RaiseGenericGetAttributeError(PyTypeObject * tp,PyObject * attr_name)30484 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
30485     PyErr_Format(PyExc_AttributeError,
30486 #if PY_MAJOR_VERSION >= 3
30487                  "'%.50s' object has no attribute '%U'",
30488                  tp->tp_name, attr_name);
30489 #else
30490                  "'%.50s' object has no attribute '%.400s'",
30491                  tp->tp_name, PyString_AS_STRING(attr_name));
30492 #endif
30493     return NULL;
30494 }
__Pyx_PyObject_GenericGetAttrNoDict(PyObject * obj,PyObject * attr_name)30495 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
30496     PyObject *descr;
30497     PyTypeObject *tp = Py_TYPE(obj);
30498     if (unlikely(!PyString_Check(attr_name))) {
30499         return PyObject_GenericGetAttr(obj, attr_name);
30500     }
30501     assert(!tp->tp_dictoffset);
30502     descr = _PyType_Lookup(tp, attr_name);
30503     if (unlikely(!descr)) {
30504         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
30505     }
30506     Py_INCREF(descr);
30507     #if PY_MAJOR_VERSION < 3
30508     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
30509     #endif
30510     {
30511         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
30512         if (unlikely(f)) {
30513             PyObject *res = f(descr, obj, (PyObject *)tp);
30514             Py_DECREF(descr);
30515             return res;
30516         }
30517     }
30518     return descr;
30519 }
30520 #endif
30521 
30522 /* PyObject_GenericGetAttr */
30523 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_PyObject_GenericGetAttr(PyObject * obj,PyObject * attr_name)30524 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
30525     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
30526         return PyObject_GenericGetAttr(obj, attr_name);
30527     }
30528     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
30529 }
30530 #endif
30531 
30532 /* SetupReduce */
__Pyx_setup_reduce_is_named(PyObject * meth,PyObject * name)30533 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
30534   int ret;
30535   PyObject *name_attr;
30536   name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
30537   if (likely(name_attr)) {
30538       ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
30539   } else {
30540       ret = -1;
30541   }
30542   if (unlikely(ret < 0)) {
30543       PyErr_Clear();
30544       ret = 0;
30545   }
30546   Py_XDECREF(name_attr);
30547   return ret;
30548 }
__Pyx_setup_reduce(PyObject * type_obj)30549 static int __Pyx_setup_reduce(PyObject* type_obj) {
30550     int ret = 0;
30551     PyObject *object_reduce = NULL;
30552     PyObject *object_reduce_ex = NULL;
30553     PyObject *reduce = NULL;
30554     PyObject *reduce_ex = NULL;
30555     PyObject *reduce_cython = NULL;
30556     PyObject *setstate = NULL;
30557     PyObject *setstate_cython = NULL;
30558 #if CYTHON_USE_PYTYPE_LOOKUP
30559     if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
30560 #else
30561     if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
30562 #endif
30563 #if CYTHON_USE_PYTYPE_LOOKUP
30564     object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
30565 #else
30566     object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
30567 #endif
30568     reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
30569     if (reduce_ex == object_reduce_ex) {
30570 #if CYTHON_USE_PYTYPE_LOOKUP
30571         object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
30572 #else
30573         object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
30574 #endif
30575         reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
30576         if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
30577             reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
30578             ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
30579             ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
30580             setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
30581             if (!setstate) PyErr_Clear();
30582             if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
30583                 setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
30584                 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
30585                 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
30586             }
30587             PyType_Modified((PyTypeObject*)type_obj);
30588         }
30589     }
30590     goto GOOD;
30591 BAD:
30592     if (!PyErr_Occurred())
30593         PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
30594     ret = -1;
30595 GOOD:
30596 #if !CYTHON_USE_PYTYPE_LOOKUP
30597     Py_XDECREF(object_reduce);
30598     Py_XDECREF(object_reduce_ex);
30599 #endif
30600     Py_XDECREF(reduce);
30601     Py_XDECREF(reduce_ex);
30602     Py_XDECREF(reduce_cython);
30603     Py_XDECREF(setstate);
30604     Py_XDECREF(setstate_cython);
30605     return ret;
30606 }
30607 
30608 /* TypeImport */
30609 #ifndef __PYX_HAVE_RT_ImportType
30610 #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)30611 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
30612     size_t size, enum __Pyx_ImportType_CheckSize check_size)
30613 {
30614     PyObject *result = 0;
30615     char warning[200];
30616     Py_ssize_t basicsize;
30617 #ifdef Py_LIMITED_API
30618     PyObject *py_basicsize;
30619 #endif
30620     result = PyObject_GetAttrString(module, class_name);
30621     if (!result)
30622         goto bad;
30623     if (!PyType_Check(result)) {
30624         PyErr_Format(PyExc_TypeError,
30625             "%.200s.%.200s is not a type object",
30626             module_name, class_name);
30627         goto bad;
30628     }
30629 #ifndef Py_LIMITED_API
30630     basicsize = ((PyTypeObject *)result)->tp_basicsize;
30631 #else
30632     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
30633     if (!py_basicsize)
30634         goto bad;
30635     basicsize = PyLong_AsSsize_t(py_basicsize);
30636     Py_DECREF(py_basicsize);
30637     py_basicsize = 0;
30638     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
30639         goto bad;
30640 #endif
30641     if ((size_t)basicsize < size) {
30642         PyErr_Format(PyExc_ValueError,
30643             "%.200s.%.200s size changed, may indicate binary incompatibility. "
30644             "Expected %zd from C header, got %zd from PyObject",
30645             module_name, class_name, size, basicsize);
30646         goto bad;
30647     }
30648     if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
30649         PyErr_Format(PyExc_ValueError,
30650             "%.200s.%.200s size changed, may indicate binary incompatibility. "
30651             "Expected %zd from C header, got %zd from PyObject",
30652             module_name, class_name, size, basicsize);
30653         goto bad;
30654     }
30655     else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
30656         PyOS_snprintf(warning, sizeof(warning),
30657             "%s.%s size changed, may indicate binary incompatibility. "
30658             "Expected %zd from C header, got %zd from PyObject",
30659             module_name, class_name, size, basicsize);
30660         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
30661     }
30662     return (PyTypeObject *)result;
30663 bad:
30664     Py_XDECREF(result);
30665     return NULL;
30666 }
30667 #endif
30668 
30669 /* GetVTable */
__Pyx_GetVtable(PyObject * dict)30670 static void* __Pyx_GetVtable(PyObject *dict) {
30671     void* ptr;
30672     PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
30673     if (!ob)
30674         goto bad;
30675 #if PY_VERSION_HEX >= 0x02070000
30676     ptr = PyCapsule_GetPointer(ob, 0);
30677 #else
30678     ptr = PyCObject_AsVoidPtr(ob);
30679 #endif
30680     if (!ptr && !PyErr_Occurred())
30681         PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
30682     Py_DECREF(ob);
30683     return ptr;
30684 bad:
30685     Py_XDECREF(ob);
30686     return NULL;
30687 }
30688 
30689 /* SetVTable */
__Pyx_SetVtable(PyObject * dict,void * vtable)30690 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
30691 #if PY_VERSION_HEX >= 0x02070000
30692     PyObject *ob = PyCapsule_New(vtable, 0, 0);
30693 #else
30694     PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
30695 #endif
30696     if (!ob)
30697         goto bad;
30698     if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
30699         goto bad;
30700     Py_DECREF(ob);
30701     return 0;
30702 bad:
30703     Py_XDECREF(ob);
30704     return -1;
30705 }
30706 
30707 /* CLineInTraceback */
30708 #ifndef CYTHON_CLINE_IN_TRACEBACK
__Pyx_CLineForTraceback(PyThreadState * tstate,int c_line)30709 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
30710     PyObject *use_cline;
30711     PyObject *ptype, *pvalue, *ptraceback;
30712 #if CYTHON_COMPILING_IN_CPYTHON
30713     PyObject **cython_runtime_dict;
30714 #endif
30715     if (unlikely(!__pyx_cython_runtime)) {
30716         return c_line;
30717     }
30718     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
30719 #if CYTHON_COMPILING_IN_CPYTHON
30720     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
30721     if (likely(cython_runtime_dict)) {
30722         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
30723             use_cline, *cython_runtime_dict,
30724             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
30725     } else
30726 #endif
30727     {
30728       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
30729       if (use_cline_obj) {
30730         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
30731         Py_DECREF(use_cline_obj);
30732       } else {
30733         PyErr_Clear();
30734         use_cline = NULL;
30735       }
30736     }
30737     if (!use_cline) {
30738         c_line = 0;
30739         PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
30740     }
30741     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
30742         c_line = 0;
30743     }
30744     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
30745     return c_line;
30746 }
30747 #endif
30748 
30749 /* CodeObjectCache */
__pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry * entries,int count,int code_line)30750 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
30751     int start = 0, mid = 0, end = count - 1;
30752     if (end >= 0 && code_line > entries[end].code_line) {
30753         return count;
30754     }
30755     while (start < end) {
30756         mid = start + (end - start) / 2;
30757         if (code_line < entries[mid].code_line) {
30758             end = mid;
30759         } else if (code_line > entries[mid].code_line) {
30760              start = mid + 1;
30761         } else {
30762             return mid;
30763         }
30764     }
30765     if (code_line <= entries[mid].code_line) {
30766         return mid;
30767     } else {
30768         return mid + 1;
30769     }
30770 }
__pyx_find_code_object(int code_line)30771 static PyCodeObject *__pyx_find_code_object(int code_line) {
30772     PyCodeObject* code_object;
30773     int pos;
30774     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
30775         return NULL;
30776     }
30777     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
30778     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
30779         return NULL;
30780     }
30781     code_object = __pyx_code_cache.entries[pos].code_object;
30782     Py_INCREF(code_object);
30783     return code_object;
30784 }
__pyx_insert_code_object(int code_line,PyCodeObject * code_object)30785 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
30786     int pos, i;
30787     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
30788     if (unlikely(!code_line)) {
30789         return;
30790     }
30791     if (unlikely(!entries)) {
30792         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
30793         if (likely(entries)) {
30794             __pyx_code_cache.entries = entries;
30795             __pyx_code_cache.max_count = 64;
30796             __pyx_code_cache.count = 1;
30797             entries[0].code_line = code_line;
30798             entries[0].code_object = code_object;
30799             Py_INCREF(code_object);
30800         }
30801         return;
30802     }
30803     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
30804     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
30805         PyCodeObject* tmp = entries[pos].code_object;
30806         entries[pos].code_object = code_object;
30807         Py_DECREF(tmp);
30808         return;
30809     }
30810     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
30811         int new_max = __pyx_code_cache.max_count + 64;
30812         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
30813             __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
30814         if (unlikely(!entries)) {
30815             return;
30816         }
30817         __pyx_code_cache.entries = entries;
30818         __pyx_code_cache.max_count = new_max;
30819     }
30820     for (i=__pyx_code_cache.count; i>pos; i--) {
30821         entries[i] = entries[i-1];
30822     }
30823     entries[pos].code_line = code_line;
30824     entries[pos].code_object = code_object;
30825     __pyx_code_cache.count++;
30826     Py_INCREF(code_object);
30827 }
30828 
30829 /* AddTraceback */
30830 #include "compile.h"
30831 #include "frameobject.h"
30832 #include "traceback.h"
__Pyx_CreateCodeObjectForTraceback(const char * funcname,int c_line,int py_line,const char * filename)30833 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
30834             const char *funcname, int c_line,
30835             int py_line, const char *filename) {
30836     PyCodeObject *py_code = 0;
30837     PyObject *py_srcfile = 0;
30838     PyObject *py_funcname = 0;
30839     #if PY_MAJOR_VERSION < 3
30840     py_srcfile = PyString_FromString(filename);
30841     #else
30842     py_srcfile = PyUnicode_FromString(filename);
30843     #endif
30844     if (!py_srcfile) goto bad;
30845     if (c_line) {
30846         #if PY_MAJOR_VERSION < 3
30847         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
30848         #else
30849         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
30850         #endif
30851     }
30852     else {
30853         #if PY_MAJOR_VERSION < 3
30854         py_funcname = PyString_FromString(funcname);
30855         #else
30856         py_funcname = PyUnicode_FromString(funcname);
30857         #endif
30858     }
30859     if (!py_funcname) goto bad;
30860     py_code = __Pyx_PyCode_New(
30861         0,
30862         0,
30863         0,
30864         0,
30865         0,
30866         __pyx_empty_bytes, /*PyObject *code,*/
30867         __pyx_empty_tuple, /*PyObject *consts,*/
30868         __pyx_empty_tuple, /*PyObject *names,*/
30869         __pyx_empty_tuple, /*PyObject *varnames,*/
30870         __pyx_empty_tuple, /*PyObject *freevars,*/
30871         __pyx_empty_tuple, /*PyObject *cellvars,*/
30872         py_srcfile,   /*PyObject *filename,*/
30873         py_funcname,  /*PyObject *name,*/
30874         py_line,
30875         __pyx_empty_bytes  /*PyObject *lnotab*/
30876     );
30877     Py_DECREF(py_srcfile);
30878     Py_DECREF(py_funcname);
30879     return py_code;
30880 bad:
30881     Py_XDECREF(py_srcfile);
30882     Py_XDECREF(py_funcname);
30883     return NULL;
30884 }
__Pyx_AddTraceback(const char * funcname,int c_line,int py_line,const char * filename)30885 static void __Pyx_AddTraceback(const char *funcname, int c_line,
30886                                int py_line, const char *filename) {
30887     PyCodeObject *py_code = 0;
30888     PyFrameObject *py_frame = 0;
30889     PyThreadState *tstate = __Pyx_PyThreadState_Current;
30890     if (c_line) {
30891         c_line = __Pyx_CLineForTraceback(tstate, c_line);
30892     }
30893     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
30894     if (!py_code) {
30895         py_code = __Pyx_CreateCodeObjectForTraceback(
30896             funcname, c_line, py_line, filename);
30897         if (!py_code) goto bad;
30898         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
30899     }
30900     py_frame = PyFrame_New(
30901         tstate,            /*PyThreadState *tstate,*/
30902         py_code,           /*PyCodeObject *code,*/
30903         __pyx_d,    /*PyObject *globals,*/
30904         0                  /*PyObject *locals*/
30905     );
30906     if (!py_frame) goto bad;
30907     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
30908     PyTraceBack_Here(py_frame);
30909 bad:
30910     Py_XDECREF(py_code);
30911     Py_XDECREF(py_frame);
30912 }
30913 
30914 /* CIntFromPyVerify */
30915 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
30916     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
30917 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
30918     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
30919 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
30920     {\
30921         func_type value = func_value;\
30922         if (sizeof(target_type) < sizeof(func_type)) {\
30923             if (unlikely(value != (func_type) (target_type) value)) {\
30924                 func_type zero = 0;\
30925                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
30926                     return (target_type) -1;\
30927                 if (is_unsigned && unlikely(value < zero))\
30928                     goto raise_neg_overflow;\
30929                 else\
30930                     goto raise_overflow;\
30931             }\
30932         }\
30933         return (target_type) value;\
30934     }
30935 
30936 /* CIntToPy */
__Pyx_PyInt_From_int(int value)30937 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
30938     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
30939     const int is_unsigned = neg_one > const_zero;
30940     if (is_unsigned) {
30941         if (sizeof(int) < sizeof(long)) {
30942             return PyInt_FromLong((long) value);
30943         } else if (sizeof(int) <= sizeof(unsigned long)) {
30944             return PyLong_FromUnsignedLong((unsigned long) value);
30945 #ifdef HAVE_LONG_LONG
30946         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
30947             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
30948 #endif
30949         }
30950     } else {
30951         if (sizeof(int) <= sizeof(long)) {
30952             return PyInt_FromLong((long) value);
30953 #ifdef HAVE_LONG_LONG
30954         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
30955             return PyLong_FromLongLong((PY_LONG_LONG) value);
30956 #endif
30957         }
30958     }
30959     {
30960         int one = 1; int little = (int)*(unsigned char *)&one;
30961         unsigned char *bytes = (unsigned char *)&value;
30962         return _PyLong_FromByteArray(bytes, sizeof(int),
30963                                      little, !is_unsigned);
30964     }
30965 }
30966 
30967 /* CIntToPy */
__Pyx_PyInt_From_long(long value)30968 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
30969     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
30970     const int is_unsigned = neg_one > const_zero;
30971     if (is_unsigned) {
30972         if (sizeof(long) < sizeof(long)) {
30973             return PyInt_FromLong((long) value);
30974         } else if (sizeof(long) <= sizeof(unsigned long)) {
30975             return PyLong_FromUnsignedLong((unsigned long) value);
30976 #ifdef HAVE_LONG_LONG
30977         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
30978             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
30979 #endif
30980         }
30981     } else {
30982         if (sizeof(long) <= sizeof(long)) {
30983             return PyInt_FromLong((long) value);
30984 #ifdef HAVE_LONG_LONG
30985         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
30986             return PyLong_FromLongLong((PY_LONG_LONG) value);
30987 #endif
30988         }
30989     }
30990     {
30991         int one = 1; int little = (int)*(unsigned char *)&one;
30992         unsigned char *bytes = (unsigned char *)&value;
30993         return _PyLong_FromByteArray(bytes, sizeof(long),
30994                                      little, !is_unsigned);
30995     }
30996 }
30997 
30998 /* Declarations */
30999 #if CYTHON_CCOMPLEX
31000   #ifdef __cplusplus
__pyx_t_float_complex_from_parts(float x,float y)31001     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
31002       return ::std::complex< float >(x, y);
31003     }
31004   #else
__pyx_t_float_complex_from_parts(float x,float y)31005     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
31006       return x + y*(__pyx_t_float_complex)_Complex_I;
31007     }
31008   #endif
31009 #else
__pyx_t_float_complex_from_parts(float x,float y)31010     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
31011       __pyx_t_float_complex z;
31012       z.real = x;
31013       z.imag = y;
31014       return z;
31015     }
31016 #endif
31017 
31018 /* Arithmetic */
31019 #if CYTHON_CCOMPLEX
31020 #else
__Pyx_c_eq_float(__pyx_t_float_complex a,__pyx_t_float_complex b)31021     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
31022        return (a.real == b.real) && (a.imag == b.imag);
31023     }
__Pyx_c_sum_float(__pyx_t_float_complex a,__pyx_t_float_complex b)31024     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
31025         __pyx_t_float_complex z;
31026         z.real = a.real + b.real;
31027         z.imag = a.imag + b.imag;
31028         return z;
31029     }
__Pyx_c_diff_float(__pyx_t_float_complex a,__pyx_t_float_complex b)31030     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
31031         __pyx_t_float_complex z;
31032         z.real = a.real - b.real;
31033         z.imag = a.imag - b.imag;
31034         return z;
31035     }
__Pyx_c_prod_float(__pyx_t_float_complex a,__pyx_t_float_complex b)31036     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
31037         __pyx_t_float_complex z;
31038         z.real = a.real * b.real - a.imag * b.imag;
31039         z.imag = a.real * b.imag + a.imag * b.real;
31040         return z;
31041     }
31042     #if 1
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)31043     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
31044         if (b.imag == 0) {
31045             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
31046         } else if (fabsf(b.real) >= fabsf(b.imag)) {
31047             if (b.real == 0 && b.imag == 0) {
31048                 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
31049             } else {
31050                 float r = b.imag / b.real;
31051                 float s = (float)(1.0) / (b.real + b.imag * r);
31052                 return __pyx_t_float_complex_from_parts(
31053                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
31054             }
31055         } else {
31056             float r = b.real / b.imag;
31057             float s = (float)(1.0) / (b.imag + b.real * r);
31058             return __pyx_t_float_complex_from_parts(
31059                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
31060         }
31061     }
31062     #else
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)31063     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
31064         if (b.imag == 0) {
31065             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
31066         } else {
31067             float denom = b.real * b.real + b.imag * b.imag;
31068             return __pyx_t_float_complex_from_parts(
31069                 (a.real * b.real + a.imag * b.imag) / denom,
31070                 (a.imag * b.real - a.real * b.imag) / denom);
31071         }
31072     }
31073     #endif
__Pyx_c_neg_float(__pyx_t_float_complex a)31074     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
31075         __pyx_t_float_complex z;
31076         z.real = -a.real;
31077         z.imag = -a.imag;
31078         return z;
31079     }
__Pyx_c_is_zero_float(__pyx_t_float_complex a)31080     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
31081        return (a.real == 0) && (a.imag == 0);
31082     }
__Pyx_c_conj_float(__pyx_t_float_complex a)31083     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
31084         __pyx_t_float_complex z;
31085         z.real =  a.real;
31086         z.imag = -a.imag;
31087         return z;
31088     }
31089     #if 1
__Pyx_c_abs_float(__pyx_t_float_complex z)31090         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
31091           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
31092             return sqrtf(z.real*z.real + z.imag*z.imag);
31093           #else
31094             return hypotf(z.real, z.imag);
31095           #endif
31096         }
__Pyx_c_pow_float(__pyx_t_float_complex a,__pyx_t_float_complex b)31097         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
31098             __pyx_t_float_complex z;
31099             float r, lnr, theta, z_r, z_theta;
31100             if (b.imag == 0 && b.real == (int)b.real) {
31101                 if (b.real < 0) {
31102                     float denom = a.real * a.real + a.imag * a.imag;
31103                     a.real = a.real / denom;
31104                     a.imag = -a.imag / denom;
31105                     b.real = -b.real;
31106                 }
31107                 switch ((int)b.real) {
31108                     case 0:
31109                         z.real = 1;
31110                         z.imag = 0;
31111                         return z;
31112                     case 1:
31113                         return a;
31114                     case 2:
31115                         z = __Pyx_c_prod_float(a, a);
31116                         return __Pyx_c_prod_float(a, a);
31117                     case 3:
31118                         z = __Pyx_c_prod_float(a, a);
31119                         return __Pyx_c_prod_float(z, a);
31120                     case 4:
31121                         z = __Pyx_c_prod_float(a, a);
31122                         return __Pyx_c_prod_float(z, z);
31123                 }
31124             }
31125             if (a.imag == 0) {
31126                 if (a.real == 0) {
31127                     return a;
31128                 } else if (b.imag == 0) {
31129                     z.real = powf(a.real, b.real);
31130                     z.imag = 0;
31131                     return z;
31132                 } else if (a.real > 0) {
31133                     r = a.real;
31134                     theta = 0;
31135                 } else {
31136                     r = -a.real;
31137                     theta = atan2f(0.0, -1.0);
31138                 }
31139             } else {
31140                 r = __Pyx_c_abs_float(a);
31141                 theta = atan2f(a.imag, a.real);
31142             }
31143             lnr = logf(r);
31144             z_r = expf(lnr * b.real - theta * b.imag);
31145             z_theta = theta * b.real + lnr * b.imag;
31146             z.real = z_r * cosf(z_theta);
31147             z.imag = z_r * sinf(z_theta);
31148             return z;
31149         }
31150     #endif
31151 #endif
31152 
31153 /* Declarations */
31154 #if CYTHON_CCOMPLEX
31155   #ifdef __cplusplus
__pyx_t_double_complex_from_parts(double x,double y)31156     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
31157       return ::std::complex< double >(x, y);
31158     }
31159   #else
__pyx_t_double_complex_from_parts(double x,double y)31160     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
31161       return x + y*(__pyx_t_double_complex)_Complex_I;
31162     }
31163   #endif
31164 #else
__pyx_t_double_complex_from_parts(double x,double y)31165     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
31166       __pyx_t_double_complex z;
31167       z.real = x;
31168       z.imag = y;
31169       return z;
31170     }
31171 #endif
31172 
31173 /* Arithmetic */
31174 #if CYTHON_CCOMPLEX
31175 #else
__Pyx_c_eq_double(__pyx_t_double_complex a,__pyx_t_double_complex b)31176     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
31177        return (a.real == b.real) && (a.imag == b.imag);
31178     }
__Pyx_c_sum_double(__pyx_t_double_complex a,__pyx_t_double_complex b)31179     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
31180         __pyx_t_double_complex z;
31181         z.real = a.real + b.real;
31182         z.imag = a.imag + b.imag;
31183         return z;
31184     }
__Pyx_c_diff_double(__pyx_t_double_complex a,__pyx_t_double_complex b)31185     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
31186         __pyx_t_double_complex z;
31187         z.real = a.real - b.real;
31188         z.imag = a.imag - b.imag;
31189         return z;
31190     }
__Pyx_c_prod_double(__pyx_t_double_complex a,__pyx_t_double_complex b)31191     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
31192         __pyx_t_double_complex z;
31193         z.real = a.real * b.real - a.imag * b.imag;
31194         z.imag = a.real * b.imag + a.imag * b.real;
31195         return z;
31196     }
31197     #if 1
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)31198     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
31199         if (b.imag == 0) {
31200             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
31201         } else if (fabs(b.real) >= fabs(b.imag)) {
31202             if (b.real == 0 && b.imag == 0) {
31203                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
31204             } else {
31205                 double r = b.imag / b.real;
31206                 double s = (double)(1.0) / (b.real + b.imag * r);
31207                 return __pyx_t_double_complex_from_parts(
31208                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
31209             }
31210         } else {
31211             double r = b.real / b.imag;
31212             double s = (double)(1.0) / (b.imag + b.real * r);
31213             return __pyx_t_double_complex_from_parts(
31214                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
31215         }
31216     }
31217     #else
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)31218     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
31219         if (b.imag == 0) {
31220             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
31221         } else {
31222             double denom = b.real * b.real + b.imag * b.imag;
31223             return __pyx_t_double_complex_from_parts(
31224                 (a.real * b.real + a.imag * b.imag) / denom,
31225                 (a.imag * b.real - a.real * b.imag) / denom);
31226         }
31227     }
31228     #endif
__Pyx_c_neg_double(__pyx_t_double_complex a)31229     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
31230         __pyx_t_double_complex z;
31231         z.real = -a.real;
31232         z.imag = -a.imag;
31233         return z;
31234     }
__Pyx_c_is_zero_double(__pyx_t_double_complex a)31235     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
31236        return (a.real == 0) && (a.imag == 0);
31237     }
__Pyx_c_conj_double(__pyx_t_double_complex a)31238     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
31239         __pyx_t_double_complex z;
31240         z.real =  a.real;
31241         z.imag = -a.imag;
31242         return z;
31243     }
31244     #if 1
__Pyx_c_abs_double(__pyx_t_double_complex z)31245         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
31246           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
31247             return sqrt(z.real*z.real + z.imag*z.imag);
31248           #else
31249             return hypot(z.real, z.imag);
31250           #endif
31251         }
__Pyx_c_pow_double(__pyx_t_double_complex a,__pyx_t_double_complex b)31252         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
31253             __pyx_t_double_complex z;
31254             double r, lnr, theta, z_r, z_theta;
31255             if (b.imag == 0 && b.real == (int)b.real) {
31256                 if (b.real < 0) {
31257                     double denom = a.real * a.real + a.imag * a.imag;
31258                     a.real = a.real / denom;
31259                     a.imag = -a.imag / denom;
31260                     b.real = -b.real;
31261                 }
31262                 switch ((int)b.real) {
31263                     case 0:
31264                         z.real = 1;
31265                         z.imag = 0;
31266                         return z;
31267                     case 1:
31268                         return a;
31269                     case 2:
31270                         z = __Pyx_c_prod_double(a, a);
31271                         return __Pyx_c_prod_double(a, a);
31272                     case 3:
31273                         z = __Pyx_c_prod_double(a, a);
31274                         return __Pyx_c_prod_double(z, a);
31275                     case 4:
31276                         z = __Pyx_c_prod_double(a, a);
31277                         return __Pyx_c_prod_double(z, z);
31278                 }
31279             }
31280             if (a.imag == 0) {
31281                 if (a.real == 0) {
31282                     return a;
31283                 } else if (b.imag == 0) {
31284                     z.real = pow(a.real, b.real);
31285                     z.imag = 0;
31286                     return z;
31287                 } else if (a.real > 0) {
31288                     r = a.real;
31289                     theta = 0;
31290                 } else {
31291                     r = -a.real;
31292                     theta = atan2(0.0, -1.0);
31293                 }
31294             } else {
31295                 r = __Pyx_c_abs_double(a);
31296                 theta = atan2(a.imag, a.real);
31297             }
31298             lnr = log(r);
31299             z_r = exp(lnr * b.real - theta * b.imag);
31300             z_theta = theta * b.real + lnr * b.imag;
31301             z.real = z_r * cos(z_theta);
31302             z.imag = z_r * sin(z_theta);
31303             return z;
31304         }
31305     #endif
31306 #endif
31307 
31308 /* CIntToPy */
__Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value)31309 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
31310     const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
31311     const int is_unsigned = neg_one > const_zero;
31312     if (is_unsigned) {
31313         if (sizeof(enum NPY_TYPES) < sizeof(long)) {
31314             return PyInt_FromLong((long) value);
31315         } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
31316             return PyLong_FromUnsignedLong((unsigned long) value);
31317 #ifdef HAVE_LONG_LONG
31318         } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
31319             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
31320 #endif
31321         }
31322     } else {
31323         if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
31324             return PyInt_FromLong((long) value);
31325 #ifdef HAVE_LONG_LONG
31326         } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
31327             return PyLong_FromLongLong((PY_LONG_LONG) value);
31328 #endif
31329         }
31330     }
31331     {
31332         int one = 1; int little = (int)*(unsigned char *)&one;
31333         unsigned char *bytes = (unsigned char *)&value;
31334         return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
31335                                      little, !is_unsigned);
31336     }
31337 }
31338 
31339 /* CIntFromPy */
__Pyx_PyInt_As_int(PyObject * x)31340 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
31341     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
31342     const int is_unsigned = neg_one > const_zero;
31343 #if PY_MAJOR_VERSION < 3
31344     if (likely(PyInt_Check(x))) {
31345         if (sizeof(int) < sizeof(long)) {
31346             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
31347         } else {
31348             long val = PyInt_AS_LONG(x);
31349             if (is_unsigned && unlikely(val < 0)) {
31350                 goto raise_neg_overflow;
31351             }
31352             return (int) val;
31353         }
31354     } else
31355 #endif
31356     if (likely(PyLong_Check(x))) {
31357         if (is_unsigned) {
31358 #if CYTHON_USE_PYLONG_INTERNALS
31359             const digit* digits = ((PyLongObject*)x)->ob_digit;
31360             switch (Py_SIZE(x)) {
31361                 case  0: return (int) 0;
31362                 case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
31363                 case 2:
31364                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
31365                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31366                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31367                         } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
31368                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
31369                         }
31370                     }
31371                     break;
31372                 case 3:
31373                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
31374                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31375                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31376                         } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
31377                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
31378                         }
31379                     }
31380                     break;
31381                 case 4:
31382                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
31383                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31384                             __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])))
31385                         } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
31386                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
31387                         }
31388                     }
31389                     break;
31390             }
31391 #endif
31392 #if CYTHON_COMPILING_IN_CPYTHON
31393             if (unlikely(Py_SIZE(x) < 0)) {
31394                 goto raise_neg_overflow;
31395             }
31396 #else
31397             {
31398                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
31399                 if (unlikely(result < 0))
31400                     return (int) -1;
31401                 if (unlikely(result == 1))
31402                     goto raise_neg_overflow;
31403             }
31404 #endif
31405             if (sizeof(int) <= sizeof(unsigned long)) {
31406                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
31407 #ifdef HAVE_LONG_LONG
31408             } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
31409                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
31410 #endif
31411             }
31412         } else {
31413 #if CYTHON_USE_PYLONG_INTERNALS
31414             const digit* digits = ((PyLongObject*)x)->ob_digit;
31415             switch (Py_SIZE(x)) {
31416                 case  0: return (int) 0;
31417                 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
31418                 case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
31419                 case -2:
31420                     if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
31421                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31422                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31423                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
31424                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
31425                         }
31426                     }
31427                     break;
31428                 case 2:
31429                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
31430                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31431                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31432                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
31433                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
31434                         }
31435                     }
31436                     break;
31437                 case -3:
31438                     if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
31439                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31440                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31441                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
31442                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
31443                         }
31444                     }
31445                     break;
31446                 case 3:
31447                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
31448                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31449                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31450                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
31451                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
31452                         }
31453                     }
31454                     break;
31455                 case -4:
31456                     if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
31457                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31458                             __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])))
31459                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
31460                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
31461                         }
31462                     }
31463                     break;
31464                 case 4:
31465                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
31466                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31467                             __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])))
31468                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
31469                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
31470                         }
31471                     }
31472                     break;
31473             }
31474 #endif
31475             if (sizeof(int) <= sizeof(long)) {
31476                 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
31477 #ifdef HAVE_LONG_LONG
31478             } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
31479                 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
31480 #endif
31481             }
31482         }
31483         {
31484 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
31485             PyErr_SetString(PyExc_RuntimeError,
31486                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
31487 #else
31488             int val;
31489             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
31490  #if PY_MAJOR_VERSION < 3
31491             if (likely(v) && !PyLong_Check(v)) {
31492                 PyObject *tmp = v;
31493                 v = PyNumber_Long(tmp);
31494                 Py_DECREF(tmp);
31495             }
31496  #endif
31497             if (likely(v)) {
31498                 int one = 1; int is_little = (int)*(unsigned char *)&one;
31499                 unsigned char *bytes = (unsigned char *)&val;
31500                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
31501                                               bytes, sizeof(val),
31502                                               is_little, !is_unsigned);
31503                 Py_DECREF(v);
31504                 if (likely(!ret))
31505                     return val;
31506             }
31507 #endif
31508             return (int) -1;
31509         }
31510     } else {
31511         int val;
31512         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
31513         if (!tmp) return (int) -1;
31514         val = __Pyx_PyInt_As_int(tmp);
31515         Py_DECREF(tmp);
31516         return val;
31517     }
31518 raise_overflow:
31519     PyErr_SetString(PyExc_OverflowError,
31520         "value too large to convert to int");
31521     return (int) -1;
31522 raise_neg_overflow:
31523     PyErr_SetString(PyExc_OverflowError,
31524         "can't convert negative value to int");
31525     return (int) -1;
31526 }
31527 
31528 /* CIntFromPy */
__Pyx_PyInt_As_hsize_t(PyObject * x)31529 static CYTHON_INLINE hsize_t __Pyx_PyInt_As_hsize_t(PyObject *x) {
31530     const hsize_t neg_one = (hsize_t) ((hsize_t) 0 - (hsize_t) 1), const_zero = (hsize_t) 0;
31531     const int is_unsigned = neg_one > const_zero;
31532 #if PY_MAJOR_VERSION < 3
31533     if (likely(PyInt_Check(x))) {
31534         if (sizeof(hsize_t) < sizeof(long)) {
31535             __PYX_VERIFY_RETURN_INT(hsize_t, long, PyInt_AS_LONG(x))
31536         } else {
31537             long val = PyInt_AS_LONG(x);
31538             if (is_unsigned && unlikely(val < 0)) {
31539                 goto raise_neg_overflow;
31540             }
31541             return (hsize_t) val;
31542         }
31543     } else
31544 #endif
31545     if (likely(PyLong_Check(x))) {
31546         if (is_unsigned) {
31547 #if CYTHON_USE_PYLONG_INTERNALS
31548             const digit* digits = ((PyLongObject*)x)->ob_digit;
31549             switch (Py_SIZE(x)) {
31550                 case  0: return (hsize_t) 0;
31551                 case  1: __PYX_VERIFY_RETURN_INT(hsize_t, digit, digits[0])
31552                 case 2:
31553                     if (8 * sizeof(hsize_t) > 1 * PyLong_SHIFT) {
31554                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31555                             __PYX_VERIFY_RETURN_INT(hsize_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31556                         } else if (8 * sizeof(hsize_t) >= 2 * PyLong_SHIFT) {
31557                             return (hsize_t) (((((hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0]));
31558                         }
31559                     }
31560                     break;
31561                 case 3:
31562                     if (8 * sizeof(hsize_t) > 2 * PyLong_SHIFT) {
31563                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31564                             __PYX_VERIFY_RETURN_INT(hsize_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31565                         } else if (8 * sizeof(hsize_t) >= 3 * PyLong_SHIFT) {
31566                             return (hsize_t) (((((((hsize_t)digits[2]) << PyLong_SHIFT) | (hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0]));
31567                         }
31568                     }
31569                     break;
31570                 case 4:
31571                     if (8 * sizeof(hsize_t) > 3 * PyLong_SHIFT) {
31572                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31573                             __PYX_VERIFY_RETURN_INT(hsize_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])))
31574                         } else if (8 * sizeof(hsize_t) >= 4 * PyLong_SHIFT) {
31575                             return (hsize_t) (((((((((hsize_t)digits[3]) << PyLong_SHIFT) | (hsize_t)digits[2]) << PyLong_SHIFT) | (hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0]));
31576                         }
31577                     }
31578                     break;
31579             }
31580 #endif
31581 #if CYTHON_COMPILING_IN_CPYTHON
31582             if (unlikely(Py_SIZE(x) < 0)) {
31583                 goto raise_neg_overflow;
31584             }
31585 #else
31586             {
31587                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
31588                 if (unlikely(result < 0))
31589                     return (hsize_t) -1;
31590                 if (unlikely(result == 1))
31591                     goto raise_neg_overflow;
31592             }
31593 #endif
31594             if (sizeof(hsize_t) <= sizeof(unsigned long)) {
31595                 __PYX_VERIFY_RETURN_INT_EXC(hsize_t, unsigned long, PyLong_AsUnsignedLong(x))
31596 #ifdef HAVE_LONG_LONG
31597             } else if (sizeof(hsize_t) <= sizeof(unsigned PY_LONG_LONG)) {
31598                 __PYX_VERIFY_RETURN_INT_EXC(hsize_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
31599 #endif
31600             }
31601         } else {
31602 #if CYTHON_USE_PYLONG_INTERNALS
31603             const digit* digits = ((PyLongObject*)x)->ob_digit;
31604             switch (Py_SIZE(x)) {
31605                 case  0: return (hsize_t) 0;
31606                 case -1: __PYX_VERIFY_RETURN_INT(hsize_t, sdigit, (sdigit) (-(sdigit)digits[0]))
31607                 case  1: __PYX_VERIFY_RETURN_INT(hsize_t,  digit, +digits[0])
31608                 case -2:
31609                     if (8 * sizeof(hsize_t) - 1 > 1 * PyLong_SHIFT) {
31610                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31611                             __PYX_VERIFY_RETURN_INT(hsize_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31612                         } else if (8 * sizeof(hsize_t) - 1 > 2 * PyLong_SHIFT) {
31613                             return (hsize_t) (((hsize_t)-1)*(((((hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0])));
31614                         }
31615                     }
31616                     break;
31617                 case 2:
31618                     if (8 * sizeof(hsize_t) > 1 * PyLong_SHIFT) {
31619                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31620                             __PYX_VERIFY_RETURN_INT(hsize_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31621                         } else if (8 * sizeof(hsize_t) - 1 > 2 * PyLong_SHIFT) {
31622                             return (hsize_t) ((((((hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0])));
31623                         }
31624                     }
31625                     break;
31626                 case -3:
31627                     if (8 * sizeof(hsize_t) - 1 > 2 * PyLong_SHIFT) {
31628                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31629                             __PYX_VERIFY_RETURN_INT(hsize_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31630                         } else if (8 * sizeof(hsize_t) - 1 > 3 * PyLong_SHIFT) {
31631                             return (hsize_t) (((hsize_t)-1)*(((((((hsize_t)digits[2]) << PyLong_SHIFT) | (hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0])));
31632                         }
31633                     }
31634                     break;
31635                 case 3:
31636                     if (8 * sizeof(hsize_t) > 2 * PyLong_SHIFT) {
31637                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31638                             __PYX_VERIFY_RETURN_INT(hsize_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31639                         } else if (8 * sizeof(hsize_t) - 1 > 3 * PyLong_SHIFT) {
31640                             return (hsize_t) ((((((((hsize_t)digits[2]) << PyLong_SHIFT) | (hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0])));
31641                         }
31642                     }
31643                     break;
31644                 case -4:
31645                     if (8 * sizeof(hsize_t) - 1 > 3 * PyLong_SHIFT) {
31646                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31647                             __PYX_VERIFY_RETURN_INT(hsize_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])))
31648                         } else if (8 * sizeof(hsize_t) - 1 > 4 * PyLong_SHIFT) {
31649                             return (hsize_t) (((hsize_t)-1)*(((((((((hsize_t)digits[3]) << PyLong_SHIFT) | (hsize_t)digits[2]) << PyLong_SHIFT) | (hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0])));
31650                         }
31651                     }
31652                     break;
31653                 case 4:
31654                     if (8 * sizeof(hsize_t) > 3 * PyLong_SHIFT) {
31655                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31656                             __PYX_VERIFY_RETURN_INT(hsize_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])))
31657                         } else if (8 * sizeof(hsize_t) - 1 > 4 * PyLong_SHIFT) {
31658                             return (hsize_t) ((((((((((hsize_t)digits[3]) << PyLong_SHIFT) | (hsize_t)digits[2]) << PyLong_SHIFT) | (hsize_t)digits[1]) << PyLong_SHIFT) | (hsize_t)digits[0])));
31659                         }
31660                     }
31661                     break;
31662             }
31663 #endif
31664             if (sizeof(hsize_t) <= sizeof(long)) {
31665                 __PYX_VERIFY_RETURN_INT_EXC(hsize_t, long, PyLong_AsLong(x))
31666 #ifdef HAVE_LONG_LONG
31667             } else if (sizeof(hsize_t) <= sizeof(PY_LONG_LONG)) {
31668                 __PYX_VERIFY_RETURN_INT_EXC(hsize_t, PY_LONG_LONG, PyLong_AsLongLong(x))
31669 #endif
31670             }
31671         }
31672         {
31673 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
31674             PyErr_SetString(PyExc_RuntimeError,
31675                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
31676 #else
31677             hsize_t val;
31678             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
31679  #if PY_MAJOR_VERSION < 3
31680             if (likely(v) && !PyLong_Check(v)) {
31681                 PyObject *tmp = v;
31682                 v = PyNumber_Long(tmp);
31683                 Py_DECREF(tmp);
31684             }
31685  #endif
31686             if (likely(v)) {
31687                 int one = 1; int is_little = (int)*(unsigned char *)&one;
31688                 unsigned char *bytes = (unsigned char *)&val;
31689                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
31690                                               bytes, sizeof(val),
31691                                               is_little, !is_unsigned);
31692                 Py_DECREF(v);
31693                 if (likely(!ret))
31694                     return val;
31695             }
31696 #endif
31697             return (hsize_t) -1;
31698         }
31699     } else {
31700         hsize_t val;
31701         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
31702         if (!tmp) return (hsize_t) -1;
31703         val = __Pyx_PyInt_As_hsize_t(tmp);
31704         Py_DECREF(tmp);
31705         return val;
31706     }
31707 raise_overflow:
31708     PyErr_SetString(PyExc_OverflowError,
31709         "value too large to convert to hsize_t");
31710     return (hsize_t) -1;
31711 raise_neg_overflow:
31712     PyErr_SetString(PyExc_OverflowError,
31713         "can't convert negative value to hsize_t");
31714     return (hsize_t) -1;
31715 }
31716 
31717 /* CIntFromPy */
__Pyx_PyInt_As_long(PyObject * x)31718 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
31719     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
31720     const int is_unsigned = neg_one > const_zero;
31721 #if PY_MAJOR_VERSION < 3
31722     if (likely(PyInt_Check(x))) {
31723         if (sizeof(long) < sizeof(long)) {
31724             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
31725         } else {
31726             long val = PyInt_AS_LONG(x);
31727             if (is_unsigned && unlikely(val < 0)) {
31728                 goto raise_neg_overflow;
31729             }
31730             return (long) val;
31731         }
31732     } else
31733 #endif
31734     if (likely(PyLong_Check(x))) {
31735         if (is_unsigned) {
31736 #if CYTHON_USE_PYLONG_INTERNALS
31737             const digit* digits = ((PyLongObject*)x)->ob_digit;
31738             switch (Py_SIZE(x)) {
31739                 case  0: return (long) 0;
31740                 case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
31741                 case 2:
31742                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
31743                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31744                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31745                         } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
31746                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
31747                         }
31748                     }
31749                     break;
31750                 case 3:
31751                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
31752                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31753                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31754                         } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
31755                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
31756                         }
31757                     }
31758                     break;
31759                 case 4:
31760                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
31761                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31762                             __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])))
31763                         } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
31764                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
31765                         }
31766                     }
31767                     break;
31768             }
31769 #endif
31770 #if CYTHON_COMPILING_IN_CPYTHON
31771             if (unlikely(Py_SIZE(x) < 0)) {
31772                 goto raise_neg_overflow;
31773             }
31774 #else
31775             {
31776                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
31777                 if (unlikely(result < 0))
31778                     return (long) -1;
31779                 if (unlikely(result == 1))
31780                     goto raise_neg_overflow;
31781             }
31782 #endif
31783             if (sizeof(long) <= sizeof(unsigned long)) {
31784                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
31785 #ifdef HAVE_LONG_LONG
31786             } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
31787                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
31788 #endif
31789             }
31790         } else {
31791 #if CYTHON_USE_PYLONG_INTERNALS
31792             const digit* digits = ((PyLongObject*)x)->ob_digit;
31793             switch (Py_SIZE(x)) {
31794                 case  0: return (long) 0;
31795                 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
31796                 case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
31797                 case -2:
31798                     if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
31799                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31800                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31801                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31802                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
31803                         }
31804                     }
31805                     break;
31806                 case 2:
31807                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
31808                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31809                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31810                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31811                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
31812                         }
31813                     }
31814                     break;
31815                 case -3:
31816                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31817                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31818                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31819                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31820                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
31821                         }
31822                     }
31823                     break;
31824                 case 3:
31825                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
31826                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31827                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31828                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31829                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
31830                         }
31831                     }
31832                     break;
31833                 case -4:
31834                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31835                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31836                             __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])))
31837                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
31838                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
31839                         }
31840                     }
31841                     break;
31842                 case 4:
31843                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
31844                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31845                             __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])))
31846                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
31847                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
31848                         }
31849                     }
31850                     break;
31851             }
31852 #endif
31853             if (sizeof(long) <= sizeof(long)) {
31854                 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
31855 #ifdef HAVE_LONG_LONG
31856             } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
31857                 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
31858 #endif
31859             }
31860         }
31861         {
31862 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
31863             PyErr_SetString(PyExc_RuntimeError,
31864                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
31865 #else
31866             long val;
31867             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
31868  #if PY_MAJOR_VERSION < 3
31869             if (likely(v) && !PyLong_Check(v)) {
31870                 PyObject *tmp = v;
31871                 v = PyNumber_Long(tmp);
31872                 Py_DECREF(tmp);
31873             }
31874  #endif
31875             if (likely(v)) {
31876                 int one = 1; int is_little = (int)*(unsigned char *)&one;
31877                 unsigned char *bytes = (unsigned char *)&val;
31878                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
31879                                               bytes, sizeof(val),
31880                                               is_little, !is_unsigned);
31881                 Py_DECREF(v);
31882                 if (likely(!ret))
31883                     return val;
31884             }
31885 #endif
31886             return (long) -1;
31887         }
31888     } else {
31889         long val;
31890         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
31891         if (!tmp) return (long) -1;
31892         val = __Pyx_PyInt_As_long(tmp);
31893         Py_DECREF(tmp);
31894         return val;
31895     }
31896 raise_overflow:
31897     PyErr_SetString(PyExc_OverflowError,
31898         "value too large to convert to long");
31899     return (long) -1;
31900 raise_neg_overflow:
31901     PyErr_SetString(PyExc_OverflowError,
31902         "can't convert negative value to long");
31903     return (long) -1;
31904 }
31905 
31906 /* CIntFromPy */
__Pyx_PyInt_As_npy_uint32(PyObject * x)31907 static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *x) {
31908     const npy_uint32 neg_one = (npy_uint32) ((npy_uint32) 0 - (npy_uint32) 1), const_zero = (npy_uint32) 0;
31909     const int is_unsigned = neg_one > const_zero;
31910 #if PY_MAJOR_VERSION < 3
31911     if (likely(PyInt_Check(x))) {
31912         if (sizeof(npy_uint32) < sizeof(long)) {
31913             __PYX_VERIFY_RETURN_INT(npy_uint32, long, PyInt_AS_LONG(x))
31914         } else {
31915             long val = PyInt_AS_LONG(x);
31916             if (is_unsigned && unlikely(val < 0)) {
31917                 goto raise_neg_overflow;
31918             }
31919             return (npy_uint32) val;
31920         }
31921     } else
31922 #endif
31923     if (likely(PyLong_Check(x))) {
31924         if (is_unsigned) {
31925 #if CYTHON_USE_PYLONG_INTERNALS
31926             const digit* digits = ((PyLongObject*)x)->ob_digit;
31927             switch (Py_SIZE(x)) {
31928                 case  0: return (npy_uint32) 0;
31929                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint32, digit, digits[0])
31930                 case 2:
31931                     if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) {
31932                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31933                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31934                         } else if (8 * sizeof(npy_uint32) >= 2 * PyLong_SHIFT) {
31935                             return (npy_uint32) (((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
31936                         }
31937                     }
31938                     break;
31939                 case 3:
31940                     if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) {
31941                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
31942                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31943                         } else if (8 * sizeof(npy_uint32) >= 3 * PyLong_SHIFT) {
31944                             return (npy_uint32) (((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0]));
31945                         }
31946                     }
31947                     break;
31948                 case 4:
31949                     if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) {
31950                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
31951                             __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])))
31952                         } else if (8 * sizeof(npy_uint32) >= 4 * PyLong_SHIFT) {
31953                             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]));
31954                         }
31955                     }
31956                     break;
31957             }
31958 #endif
31959 #if CYTHON_COMPILING_IN_CPYTHON
31960             if (unlikely(Py_SIZE(x) < 0)) {
31961                 goto raise_neg_overflow;
31962             }
31963 #else
31964             {
31965                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
31966                 if (unlikely(result < 0))
31967                     return (npy_uint32) -1;
31968                 if (unlikely(result == 1))
31969                     goto raise_neg_overflow;
31970             }
31971 #endif
31972             if (sizeof(npy_uint32) <= sizeof(unsigned long)) {
31973                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned long, PyLong_AsUnsignedLong(x))
31974 #ifdef HAVE_LONG_LONG
31975             } else if (sizeof(npy_uint32) <= sizeof(unsigned PY_LONG_LONG)) {
31976                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
31977 #endif
31978             }
31979         } else {
31980 #if CYTHON_USE_PYLONG_INTERNALS
31981             const digit* digits = ((PyLongObject*)x)->ob_digit;
31982             switch (Py_SIZE(x)) {
31983                 case  0: return (npy_uint32) 0;
31984                 case -1: __PYX_VERIFY_RETURN_INT(npy_uint32, sdigit, (sdigit) (-(sdigit)digits[0]))
31985                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint32,  digit, +digits[0])
31986                 case -2:
31987                     if (8 * sizeof(npy_uint32) - 1 > 1 * PyLong_SHIFT) {
31988                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31989                             __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31990                         } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
31991                             return (npy_uint32) (((npy_uint32)-1)*(((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
31992                         }
31993                     }
31994                     break;
31995                 case 2:
31996                     if (8 * sizeof(npy_uint32) > 1 * PyLong_SHIFT) {
31997                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
31998                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
31999                         } else if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
32000                             return (npy_uint32) ((((((npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
32001                         }
32002                     }
32003                     break;
32004                 case -3:
32005                     if (8 * sizeof(npy_uint32) - 1 > 2 * PyLong_SHIFT) {
32006                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32007                             __PYX_VERIFY_RETURN_INT(npy_uint32, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32008                         } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
32009                             return (npy_uint32) (((npy_uint32)-1)*(((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
32010                         }
32011                     }
32012                     break;
32013                 case 3:
32014                     if (8 * sizeof(npy_uint32) > 2 * PyLong_SHIFT) {
32015                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32016                             __PYX_VERIFY_RETURN_INT(npy_uint32, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32017                         } else if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
32018                             return (npy_uint32) ((((((((npy_uint32)digits[2]) << PyLong_SHIFT) | (npy_uint32)digits[1]) << PyLong_SHIFT) | (npy_uint32)digits[0])));
32019                         }
32020                     }
32021                     break;
32022                 case -4:
32023                     if (8 * sizeof(npy_uint32) - 1 > 3 * PyLong_SHIFT) {
32024                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32025                             __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])))
32026                         } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) {
32027                             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])));
32028                         }
32029                     }
32030                     break;
32031                 case 4:
32032                     if (8 * sizeof(npy_uint32) > 3 * PyLong_SHIFT) {
32033                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32034                             __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])))
32035                         } else if (8 * sizeof(npy_uint32) - 1 > 4 * PyLong_SHIFT) {
32036                             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])));
32037                         }
32038                     }
32039                     break;
32040             }
32041 #endif
32042             if (sizeof(npy_uint32) <= sizeof(long)) {
32043                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, long, PyLong_AsLong(x))
32044 #ifdef HAVE_LONG_LONG
32045             } else if (sizeof(npy_uint32) <= sizeof(PY_LONG_LONG)) {
32046                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint32, PY_LONG_LONG, PyLong_AsLongLong(x))
32047 #endif
32048             }
32049         }
32050         {
32051 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
32052             PyErr_SetString(PyExc_RuntimeError,
32053                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
32054 #else
32055             npy_uint32 val;
32056             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
32057  #if PY_MAJOR_VERSION < 3
32058             if (likely(v) && !PyLong_Check(v)) {
32059                 PyObject *tmp = v;
32060                 v = PyNumber_Long(tmp);
32061                 Py_DECREF(tmp);
32062             }
32063  #endif
32064             if (likely(v)) {
32065                 int one = 1; int is_little = (int)*(unsigned char *)&one;
32066                 unsigned char *bytes = (unsigned char *)&val;
32067                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
32068                                               bytes, sizeof(val),
32069                                               is_little, !is_unsigned);
32070                 Py_DECREF(v);
32071                 if (likely(!ret))
32072                     return val;
32073             }
32074 #endif
32075             return (npy_uint32) -1;
32076         }
32077     } else {
32078         npy_uint32 val;
32079         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
32080         if (!tmp) return (npy_uint32) -1;
32081         val = __Pyx_PyInt_As_npy_uint32(tmp);
32082         Py_DECREF(tmp);
32083         return val;
32084     }
32085 raise_overflow:
32086     PyErr_SetString(PyExc_OverflowError,
32087         "value too large to convert to npy_uint32");
32088     return (npy_uint32) -1;
32089 raise_neg_overflow:
32090     PyErr_SetString(PyExc_OverflowError,
32091         "can't convert negative value to npy_uint32");
32092     return (npy_uint32) -1;
32093 }
32094 
32095 /* CIntFromPy */
__Pyx_PyInt_As_npy_int64(PyObject * x)32096 static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *x) {
32097     const npy_int64 neg_one = (npy_int64) ((npy_int64) 0 - (npy_int64) 1), const_zero = (npy_int64) 0;
32098     const int is_unsigned = neg_one > const_zero;
32099 #if PY_MAJOR_VERSION < 3
32100     if (likely(PyInt_Check(x))) {
32101         if (sizeof(npy_int64) < sizeof(long)) {
32102             __PYX_VERIFY_RETURN_INT(npy_int64, long, PyInt_AS_LONG(x))
32103         } else {
32104             long val = PyInt_AS_LONG(x);
32105             if (is_unsigned && unlikely(val < 0)) {
32106                 goto raise_neg_overflow;
32107             }
32108             return (npy_int64) val;
32109         }
32110     } else
32111 #endif
32112     if (likely(PyLong_Check(x))) {
32113         if (is_unsigned) {
32114 #if CYTHON_USE_PYLONG_INTERNALS
32115             const digit* digits = ((PyLongObject*)x)->ob_digit;
32116             switch (Py_SIZE(x)) {
32117                 case  0: return (npy_int64) 0;
32118                 case  1: __PYX_VERIFY_RETURN_INT(npy_int64, digit, digits[0])
32119                 case 2:
32120                     if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
32121                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32122                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32123                         } else if (8 * sizeof(npy_int64) >= 2 * PyLong_SHIFT) {
32124                             return (npy_int64) (((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
32125                         }
32126                     }
32127                     break;
32128                 case 3:
32129                     if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
32130                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32131                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32132                         } else if (8 * sizeof(npy_int64) >= 3 * PyLong_SHIFT) {
32133                             return (npy_int64) (((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
32134                         }
32135                     }
32136                     break;
32137                 case 4:
32138                     if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
32139                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32140                             __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])))
32141                         } else if (8 * sizeof(npy_int64) >= 4 * PyLong_SHIFT) {
32142                             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]));
32143                         }
32144                     }
32145                     break;
32146             }
32147 #endif
32148 #if CYTHON_COMPILING_IN_CPYTHON
32149             if (unlikely(Py_SIZE(x) < 0)) {
32150                 goto raise_neg_overflow;
32151             }
32152 #else
32153             {
32154                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
32155                 if (unlikely(result < 0))
32156                     return (npy_int64) -1;
32157                 if (unlikely(result == 1))
32158                     goto raise_neg_overflow;
32159             }
32160 #endif
32161             if (sizeof(npy_int64) <= sizeof(unsigned long)) {
32162                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned long, PyLong_AsUnsignedLong(x))
32163 #ifdef HAVE_LONG_LONG
32164             } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
32165                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
32166 #endif
32167             }
32168         } else {
32169 #if CYTHON_USE_PYLONG_INTERNALS
32170             const digit* digits = ((PyLongObject*)x)->ob_digit;
32171             switch (Py_SIZE(x)) {
32172                 case  0: return (npy_int64) 0;
32173                 case -1: __PYX_VERIFY_RETURN_INT(npy_int64, sdigit, (sdigit) (-(sdigit)digits[0]))
32174                 case  1: __PYX_VERIFY_RETURN_INT(npy_int64,  digit, +digits[0])
32175                 case -2:
32176                     if (8 * sizeof(npy_int64) - 1 > 1 * PyLong_SHIFT) {
32177                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32178                             __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32179                         } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
32180                             return (npy_int64) (((npy_int64)-1)*(((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
32181                         }
32182                     }
32183                     break;
32184                 case 2:
32185                     if (8 * sizeof(npy_int64) > 1 * PyLong_SHIFT) {
32186                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32187                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32188                         } else if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
32189                             return (npy_int64) ((((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
32190                         }
32191                     }
32192                     break;
32193                 case -3:
32194                     if (8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT) {
32195                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32196                             __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32197                         } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
32198                             return (npy_int64) (((npy_int64)-1)*(((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
32199                         }
32200                     }
32201                     break;
32202                 case 3:
32203                     if (8 * sizeof(npy_int64) > 2 * PyLong_SHIFT) {
32204                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32205                             __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32206                         } else if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
32207                             return (npy_int64) ((((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
32208                         }
32209                     }
32210                     break;
32211                 case -4:
32212                     if (8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT) {
32213                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32214                             __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])))
32215                         } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
32216                             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])));
32217                         }
32218                     }
32219                     break;
32220                 case 4:
32221                     if (8 * sizeof(npy_int64) > 3 * PyLong_SHIFT) {
32222                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32223                             __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])))
32224                         } else if (8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT) {
32225                             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])));
32226                         }
32227                     }
32228                     break;
32229             }
32230 #endif
32231             if (sizeof(npy_int64) <= sizeof(long)) {
32232                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, long, PyLong_AsLong(x))
32233 #ifdef HAVE_LONG_LONG
32234             } else if (sizeof(npy_int64) <= sizeof(PY_LONG_LONG)) {
32235                 __PYX_VERIFY_RETURN_INT_EXC(npy_int64, PY_LONG_LONG, PyLong_AsLongLong(x))
32236 #endif
32237             }
32238         }
32239         {
32240 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
32241             PyErr_SetString(PyExc_RuntimeError,
32242                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
32243 #else
32244             npy_int64 val;
32245             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
32246  #if PY_MAJOR_VERSION < 3
32247             if (likely(v) && !PyLong_Check(v)) {
32248                 PyObject *tmp = v;
32249                 v = PyNumber_Long(tmp);
32250                 Py_DECREF(tmp);
32251             }
32252  #endif
32253             if (likely(v)) {
32254                 int one = 1; int is_little = (int)*(unsigned char *)&one;
32255                 unsigned char *bytes = (unsigned char *)&val;
32256                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
32257                                               bytes, sizeof(val),
32258                                               is_little, !is_unsigned);
32259                 Py_DECREF(v);
32260                 if (likely(!ret))
32261                     return val;
32262             }
32263 #endif
32264             return (npy_int64) -1;
32265         }
32266     } else {
32267         npy_int64 val;
32268         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
32269         if (!tmp) return (npy_int64) -1;
32270         val = __Pyx_PyInt_As_npy_int64(tmp);
32271         Py_DECREF(tmp);
32272         return val;
32273     }
32274 raise_overflow:
32275     PyErr_SetString(PyExc_OverflowError,
32276         "value too large to convert to npy_int64");
32277     return (npy_int64) -1;
32278 raise_neg_overflow:
32279     PyErr_SetString(PyExc_OverflowError,
32280         "can't convert negative value to npy_int64");
32281     return (npy_int64) -1;
32282 }
32283 
32284 /* CIntFromPy */
__Pyx_PyInt_As_npy_uint64(PyObject * x)32285 static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *x) {
32286     const npy_uint64 neg_one = (npy_uint64) ((npy_uint64) 0 - (npy_uint64) 1), const_zero = (npy_uint64) 0;
32287     const int is_unsigned = neg_one > const_zero;
32288 #if PY_MAJOR_VERSION < 3
32289     if (likely(PyInt_Check(x))) {
32290         if (sizeof(npy_uint64) < sizeof(long)) {
32291             __PYX_VERIFY_RETURN_INT(npy_uint64, long, PyInt_AS_LONG(x))
32292         } else {
32293             long val = PyInt_AS_LONG(x);
32294             if (is_unsigned && unlikely(val < 0)) {
32295                 goto raise_neg_overflow;
32296             }
32297             return (npy_uint64) val;
32298         }
32299     } else
32300 #endif
32301     if (likely(PyLong_Check(x))) {
32302         if (is_unsigned) {
32303 #if CYTHON_USE_PYLONG_INTERNALS
32304             const digit* digits = ((PyLongObject*)x)->ob_digit;
32305             switch (Py_SIZE(x)) {
32306                 case  0: return (npy_uint64) 0;
32307                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint64, digit, digits[0])
32308                 case 2:
32309                     if (8 * sizeof(npy_uint64) > 1 * PyLong_SHIFT) {
32310                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32311                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32312                         } else if (8 * sizeof(npy_uint64) >= 2 * PyLong_SHIFT) {
32313                             return (npy_uint64) (((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
32314                         }
32315                     }
32316                     break;
32317                 case 3:
32318                     if (8 * sizeof(npy_uint64) > 2 * PyLong_SHIFT) {
32319                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32320                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32321                         } else if (8 * sizeof(npy_uint64) >= 3 * PyLong_SHIFT) {
32322                             return (npy_uint64) (((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0]));
32323                         }
32324                     }
32325                     break;
32326                 case 4:
32327                     if (8 * sizeof(npy_uint64) > 3 * PyLong_SHIFT) {
32328                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32329                             __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])))
32330                         } else if (8 * sizeof(npy_uint64) >= 4 * PyLong_SHIFT) {
32331                             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]));
32332                         }
32333                     }
32334                     break;
32335             }
32336 #endif
32337 #if CYTHON_COMPILING_IN_CPYTHON
32338             if (unlikely(Py_SIZE(x) < 0)) {
32339                 goto raise_neg_overflow;
32340             }
32341 #else
32342             {
32343                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
32344                 if (unlikely(result < 0))
32345                     return (npy_uint64) -1;
32346                 if (unlikely(result == 1))
32347                     goto raise_neg_overflow;
32348             }
32349 #endif
32350             if (sizeof(npy_uint64) <= sizeof(unsigned long)) {
32351                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, unsigned long, PyLong_AsUnsignedLong(x))
32352 #ifdef HAVE_LONG_LONG
32353             } else if (sizeof(npy_uint64) <= sizeof(unsigned PY_LONG_LONG)) {
32354                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
32355 #endif
32356             }
32357         } else {
32358 #if CYTHON_USE_PYLONG_INTERNALS
32359             const digit* digits = ((PyLongObject*)x)->ob_digit;
32360             switch (Py_SIZE(x)) {
32361                 case  0: return (npy_uint64) 0;
32362                 case -1: __PYX_VERIFY_RETURN_INT(npy_uint64, sdigit, (sdigit) (-(sdigit)digits[0]))
32363                 case  1: __PYX_VERIFY_RETURN_INT(npy_uint64,  digit, +digits[0])
32364                 case -2:
32365                     if (8 * sizeof(npy_uint64) - 1 > 1 * PyLong_SHIFT) {
32366                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32367                             __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32368                         } else if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
32369                             return (npy_uint64) (((npy_uint64)-1)*(((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
32370                         }
32371                     }
32372                     break;
32373                 case 2:
32374                     if (8 * sizeof(npy_uint64) > 1 * PyLong_SHIFT) {
32375                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32376                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32377                         } else if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
32378                             return (npy_uint64) ((((((npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
32379                         }
32380                     }
32381                     break;
32382                 case -3:
32383                     if (8 * sizeof(npy_uint64) - 1 > 2 * PyLong_SHIFT) {
32384                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32385                             __PYX_VERIFY_RETURN_INT(npy_uint64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32386                         } else if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
32387                             return (npy_uint64) (((npy_uint64)-1)*(((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
32388                         }
32389                     }
32390                     break;
32391                 case 3:
32392                     if (8 * sizeof(npy_uint64) > 2 * PyLong_SHIFT) {
32393                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32394                             __PYX_VERIFY_RETURN_INT(npy_uint64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32395                         } else if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
32396                             return (npy_uint64) ((((((((npy_uint64)digits[2]) << PyLong_SHIFT) | (npy_uint64)digits[1]) << PyLong_SHIFT) | (npy_uint64)digits[0])));
32397                         }
32398                     }
32399                     break;
32400                 case -4:
32401                     if (8 * sizeof(npy_uint64) - 1 > 3 * PyLong_SHIFT) {
32402                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32403                             __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])))
32404                         } else if (8 * sizeof(npy_uint64) - 1 > 4 * PyLong_SHIFT) {
32405                             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])));
32406                         }
32407                     }
32408                     break;
32409                 case 4:
32410                     if (8 * sizeof(npy_uint64) > 3 * PyLong_SHIFT) {
32411                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32412                             __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])))
32413                         } else if (8 * sizeof(npy_uint64) - 1 > 4 * PyLong_SHIFT) {
32414                             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])));
32415                         }
32416                     }
32417                     break;
32418             }
32419 #endif
32420             if (sizeof(npy_uint64) <= sizeof(long)) {
32421                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, long, PyLong_AsLong(x))
32422 #ifdef HAVE_LONG_LONG
32423             } else if (sizeof(npy_uint64) <= sizeof(PY_LONG_LONG)) {
32424                 __PYX_VERIFY_RETURN_INT_EXC(npy_uint64, PY_LONG_LONG, PyLong_AsLongLong(x))
32425 #endif
32426             }
32427         }
32428         {
32429 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
32430             PyErr_SetString(PyExc_RuntimeError,
32431                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
32432 #else
32433             npy_uint64 val;
32434             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
32435  #if PY_MAJOR_VERSION < 3
32436             if (likely(v) && !PyLong_Check(v)) {
32437                 PyObject *tmp = v;
32438                 v = PyNumber_Long(tmp);
32439                 Py_DECREF(tmp);
32440             }
32441  #endif
32442             if (likely(v)) {
32443                 int one = 1; int is_little = (int)*(unsigned char *)&one;
32444                 unsigned char *bytes = (unsigned char *)&val;
32445                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
32446                                               bytes, sizeof(val),
32447                                               is_little, !is_unsigned);
32448                 Py_DECREF(v);
32449                 if (likely(!ret))
32450                     return val;
32451             }
32452 #endif
32453             return (npy_uint64) -1;
32454         }
32455     } else {
32456         npy_uint64 val;
32457         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
32458         if (!tmp) return (npy_uint64) -1;
32459         val = __Pyx_PyInt_As_npy_uint64(tmp);
32460         Py_DECREF(tmp);
32461         return val;
32462     }
32463 raise_overflow:
32464     PyErr_SetString(PyExc_OverflowError,
32465         "value too large to convert to npy_uint64");
32466     return (npy_uint64) -1;
32467 raise_neg_overflow:
32468     PyErr_SetString(PyExc_OverflowError,
32469         "can't convert negative value to npy_uint64");
32470     return (npy_uint64) -1;
32471 }
32472 
32473 /* CIntFromPy */
__Pyx_PyInt_As_size_t(PyObject * x)32474 static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
32475     const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0;
32476     const int is_unsigned = neg_one > const_zero;
32477 #if PY_MAJOR_VERSION < 3
32478     if (likely(PyInt_Check(x))) {
32479         if (sizeof(size_t) < sizeof(long)) {
32480             __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
32481         } else {
32482             long val = PyInt_AS_LONG(x);
32483             if (is_unsigned && unlikely(val < 0)) {
32484                 goto raise_neg_overflow;
32485             }
32486             return (size_t) val;
32487         }
32488     } else
32489 #endif
32490     if (likely(PyLong_Check(x))) {
32491         if (is_unsigned) {
32492 #if CYTHON_USE_PYLONG_INTERNALS
32493             const digit* digits = ((PyLongObject*)x)->ob_digit;
32494             switch (Py_SIZE(x)) {
32495                 case  0: return (size_t) 0;
32496                 case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
32497                 case 2:
32498                     if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
32499                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32500                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32501                         } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
32502                             return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
32503                         }
32504                     }
32505                     break;
32506                 case 3:
32507                     if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
32508                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32509                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32510                         } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
32511                             return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
32512                         }
32513                     }
32514                     break;
32515                 case 4:
32516                     if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
32517                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32518                             __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])))
32519                         } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
32520                             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]));
32521                         }
32522                     }
32523                     break;
32524             }
32525 #endif
32526 #if CYTHON_COMPILING_IN_CPYTHON
32527             if (unlikely(Py_SIZE(x) < 0)) {
32528                 goto raise_neg_overflow;
32529             }
32530 #else
32531             {
32532                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
32533                 if (unlikely(result < 0))
32534                     return (size_t) -1;
32535                 if (unlikely(result == 1))
32536                     goto raise_neg_overflow;
32537             }
32538 #endif
32539             if (sizeof(size_t) <= sizeof(unsigned long)) {
32540                 __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
32541 #ifdef HAVE_LONG_LONG
32542             } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
32543                 __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
32544 #endif
32545             }
32546         } else {
32547 #if CYTHON_USE_PYLONG_INTERNALS
32548             const digit* digits = ((PyLongObject*)x)->ob_digit;
32549             switch (Py_SIZE(x)) {
32550                 case  0: return (size_t) 0;
32551                 case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
32552                 case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
32553                 case -2:
32554                     if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
32555                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32556                             __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32557                         } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
32558                             return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
32559                         }
32560                     }
32561                     break;
32562                 case 2:
32563                     if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
32564                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
32565                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32566                         } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
32567                             return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
32568                         }
32569                     }
32570                     break;
32571                 case -3:
32572                     if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
32573                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32574                             __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32575                         } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
32576                             return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
32577                         }
32578                     }
32579                     break;
32580                 case 3:
32581                     if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
32582                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
32583                             __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
32584                         } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
32585                             return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
32586                         }
32587                     }
32588                     break;
32589                 case -4:
32590                     if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
32591                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32592                             __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])))
32593                         } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
32594                             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])));
32595                         }
32596                     }
32597                     break;
32598                 case 4:
32599                     if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
32600                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
32601                             __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])))
32602                         } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
32603                             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])));
32604                         }
32605                     }
32606                     break;
32607             }
32608 #endif
32609             if (sizeof(size_t) <= sizeof(long)) {
32610                 __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
32611 #ifdef HAVE_LONG_LONG
32612             } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
32613                 __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
32614 #endif
32615             }
32616         }
32617         {
32618 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
32619             PyErr_SetString(PyExc_RuntimeError,
32620                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
32621 #else
32622             size_t val;
32623             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
32624  #if PY_MAJOR_VERSION < 3
32625             if (likely(v) && !PyLong_Check(v)) {
32626                 PyObject *tmp = v;
32627                 v = PyNumber_Long(tmp);
32628                 Py_DECREF(tmp);
32629             }
32630  #endif
32631             if (likely(v)) {
32632                 int one = 1; int is_little = (int)*(unsigned char *)&one;
32633                 unsigned char *bytes = (unsigned char *)&val;
32634                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
32635                                               bytes, sizeof(val),
32636                                               is_little, !is_unsigned);
32637                 Py_DECREF(v);
32638                 if (likely(!ret))
32639                     return val;
32640             }
32641 #endif
32642             return (size_t) -1;
32643         }
32644     } else {
32645         size_t val;
32646         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
32647         if (!tmp) return (size_t) -1;
32648         val = __Pyx_PyInt_As_size_t(tmp);
32649         Py_DECREF(tmp);
32650         return val;
32651     }
32652 raise_overflow:
32653     PyErr_SetString(PyExc_OverflowError,
32654         "value too large to convert to size_t");
32655     return (size_t) -1;
32656 raise_neg_overflow:
32657     PyErr_SetString(PyExc_OverflowError,
32658         "can't convert negative value to size_t");
32659     return (size_t) -1;
32660 }
32661 
32662 /* FastTypeChecks */
32663 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_InBases(PyTypeObject * a,PyTypeObject * b)32664 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
32665     while (a) {
32666         a = a->tp_base;
32667         if (a == b)
32668             return 1;
32669     }
32670     return b == &PyBaseObject_Type;
32671 }
__Pyx_IsSubtype(PyTypeObject * a,PyTypeObject * b)32672 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
32673     PyObject *mro;
32674     if (a == b) return 1;
32675     mro = a->tp_mro;
32676     if (likely(mro)) {
32677         Py_ssize_t i, n;
32678         n = PyTuple_GET_SIZE(mro);
32679         for (i = 0; i < n; i++) {
32680             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
32681                 return 1;
32682         }
32683         return 0;
32684     }
32685     return __Pyx_InBases(a, b);
32686 }
32687 #if PY_MAJOR_VERSION == 2
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)32688 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
32689     PyObject *exception, *value, *tb;
32690     int res;
32691     __Pyx_PyThreadState_declare
32692     __Pyx_PyThreadState_assign
32693     __Pyx_ErrFetch(&exception, &value, &tb);
32694     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
32695     if (unlikely(res == -1)) {
32696         PyErr_WriteUnraisable(err);
32697         res = 0;
32698     }
32699     if (!res) {
32700         res = PyObject_IsSubclass(err, exc_type2);
32701         if (unlikely(res == -1)) {
32702             PyErr_WriteUnraisable(err);
32703             res = 0;
32704         }
32705     }
32706     __Pyx_ErrRestore(exception, value, tb);
32707     return res;
32708 }
32709 #else
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)32710 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
32711     int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
32712     if (!res) {
32713         res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
32714     }
32715     return res;
32716 }
32717 #endif
__Pyx_PyErr_GivenExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)32718 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
32719     Py_ssize_t i, n;
32720     assert(PyExceptionClass_Check(exc_type));
32721     n = PyTuple_GET_SIZE(tuple);
32722 #if PY_MAJOR_VERSION >= 3
32723     for (i=0; i<n; i++) {
32724         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
32725     }
32726 #endif
32727     for (i=0; i<n; i++) {
32728         PyObject *t = PyTuple_GET_ITEM(tuple, i);
32729         #if PY_MAJOR_VERSION < 3
32730         if (likely(exc_type == t)) return 1;
32731         #endif
32732         if (likely(PyExceptionClass_Check(t))) {
32733             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
32734         } else {
32735         }
32736     }
32737     return 0;
32738 }
__Pyx_PyErr_GivenExceptionMatches(PyObject * err,PyObject * exc_type)32739 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
32740     if (likely(err == exc_type)) return 1;
32741     if (likely(PyExceptionClass_Check(err))) {
32742         if (likely(PyExceptionClass_Check(exc_type))) {
32743             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
32744         } else if (likely(PyTuple_Check(exc_type))) {
32745             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
32746         } else {
32747         }
32748     }
32749     return PyErr_GivenExceptionMatches(err, exc_type);
32750 }
__Pyx_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)32751 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
32752     assert(PyExceptionClass_Check(exc_type1));
32753     assert(PyExceptionClass_Check(exc_type2));
32754     if (likely(err == exc_type1 || err == exc_type2)) return 1;
32755     if (likely(PyExceptionClass_Check(err))) {
32756         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
32757     }
32758     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
32759 }
32760 #endif
32761 
32762 /* CheckBinaryVersion */
__Pyx_check_binary_version(void)32763 static int __Pyx_check_binary_version(void) {
32764     char ctversion[4], rtversion[4];
32765     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
32766     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
32767     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
32768         char message[200];
32769         PyOS_snprintf(message, sizeof(message),
32770                       "compiletime version %s of module '%.100s' "
32771                       "does not match runtime version %s",
32772                       ctversion, __Pyx_MODULE_NAME, rtversion);
32773         return PyErr_WarnEx(NULL, message, 1);
32774     }
32775     return 0;
32776 }
32777 
32778 /* InitStrings */
__Pyx_InitStrings(__Pyx_StringTabEntry * t)32779 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
32780     while (t->p) {
32781         #if PY_MAJOR_VERSION < 3
32782         if (t->is_unicode) {
32783             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
32784         } else if (t->intern) {
32785             *t->p = PyString_InternFromString(t->s);
32786         } else {
32787             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
32788         }
32789         #else
32790         if (t->is_unicode | t->is_str) {
32791             if (t->intern) {
32792                 *t->p = PyUnicode_InternFromString(t->s);
32793             } else if (t->encoding) {
32794                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
32795             } else {
32796                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
32797             }
32798         } else {
32799             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
32800         }
32801         #endif
32802         if (!*t->p)
32803             return -1;
32804         if (PyObject_Hash(*t->p) == -1)
32805             return -1;
32806         ++t;
32807     }
32808     return 0;
32809 }
32810 
__Pyx_PyUnicode_FromString(const char * c_str)32811 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
32812     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
32813 }
__Pyx_PyObject_AsString(PyObject * o)32814 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
32815     Py_ssize_t ignore;
32816     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
32817 }
32818 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
32819 #if !CYTHON_PEP393_ENABLED
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)32820 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
32821     char* defenc_c;
32822     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
32823     if (!defenc) return NULL;
32824     defenc_c = PyBytes_AS_STRING(defenc);
32825 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
32826     {
32827         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
32828         char* c;
32829         for (c = defenc_c; c < end; c++) {
32830             if ((unsigned char) (*c) >= 128) {
32831                 PyUnicode_AsASCIIString(o);
32832                 return NULL;
32833             }
32834         }
32835     }
32836 #endif
32837     *length = PyBytes_GET_SIZE(defenc);
32838     return defenc_c;
32839 }
32840 #else
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)32841 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
32842     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
32843 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
32844     if (likely(PyUnicode_IS_ASCII(o))) {
32845         *length = PyUnicode_GET_LENGTH(o);
32846         return PyUnicode_AsUTF8(o);
32847     } else {
32848         PyUnicode_AsASCIIString(o);
32849         return NULL;
32850     }
32851 #else
32852     return PyUnicode_AsUTF8AndSize(o, length);
32853 #endif
32854 }
32855 #endif
32856 #endif
__Pyx_PyObject_AsStringAndSize(PyObject * o,Py_ssize_t * length)32857 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
32858 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
32859     if (
32860 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
32861             __Pyx_sys_getdefaultencoding_not_ascii &&
32862 #endif
32863             PyUnicode_Check(o)) {
32864         return __Pyx_PyUnicode_AsStringAndSize(o, length);
32865     } else
32866 #endif
32867 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
32868     if (PyByteArray_Check(o)) {
32869         *length = PyByteArray_GET_SIZE(o);
32870         return PyByteArray_AS_STRING(o);
32871     } else
32872 #endif
32873     {
32874         char* result;
32875         int r = PyBytes_AsStringAndSize(o, &result, length);
32876         if (unlikely(r < 0)) {
32877             return NULL;
32878         } else {
32879             return result;
32880         }
32881     }
32882 }
__Pyx_PyObject_IsTrue(PyObject * x)32883 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
32884    int is_true = x == Py_True;
32885    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
32886    else return PyObject_IsTrue(x);
32887 }
__Pyx_PyObject_IsTrueAndDecref(PyObject * x)32888 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
32889     int retval;
32890     if (unlikely(!x)) return -1;
32891     retval = __Pyx_PyObject_IsTrue(x);
32892     Py_DECREF(x);
32893     return retval;
32894 }
__Pyx_PyNumber_IntOrLongWrongResultType(PyObject * result,const char * type_name)32895 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
32896 #if PY_MAJOR_VERSION >= 3
32897     if (PyLong_Check(result)) {
32898         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
32899                 "__int__ returned non-int (type %.200s).  "
32900                 "The ability to return an instance of a strict subclass of int "
32901                 "is deprecated, and may be removed in a future version of Python.",
32902                 Py_TYPE(result)->tp_name)) {
32903             Py_DECREF(result);
32904             return NULL;
32905         }
32906         return result;
32907     }
32908 #endif
32909     PyErr_Format(PyExc_TypeError,
32910                  "__%.4s__ returned non-%.4s (type %.200s)",
32911                  type_name, type_name, Py_TYPE(result)->tp_name);
32912     Py_DECREF(result);
32913     return NULL;
32914 }
__Pyx_PyNumber_IntOrLong(PyObject * x)32915 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
32916 #if CYTHON_USE_TYPE_SLOTS
32917   PyNumberMethods *m;
32918 #endif
32919   const char *name = NULL;
32920   PyObject *res = NULL;
32921 #if PY_MAJOR_VERSION < 3
32922   if (likely(PyInt_Check(x) || PyLong_Check(x)))
32923 #else
32924   if (likely(PyLong_Check(x)))
32925 #endif
32926     return __Pyx_NewRef(x);
32927 #if CYTHON_USE_TYPE_SLOTS
32928   m = Py_TYPE(x)->tp_as_number;
32929   #if PY_MAJOR_VERSION < 3
32930   if (m && m->nb_int) {
32931     name = "int";
32932     res = m->nb_int(x);
32933   }
32934   else if (m && m->nb_long) {
32935     name = "long";
32936     res = m->nb_long(x);
32937   }
32938   #else
32939   if (likely(m && m->nb_int)) {
32940     name = "int";
32941     res = m->nb_int(x);
32942   }
32943   #endif
32944 #else
32945   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
32946     res = PyNumber_Int(x);
32947   }
32948 #endif
32949   if (likely(res)) {
32950 #if PY_MAJOR_VERSION < 3
32951     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
32952 #else
32953     if (unlikely(!PyLong_CheckExact(res))) {
32954 #endif
32955         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
32956     }
32957   }
32958   else if (!PyErr_Occurred()) {
32959     PyErr_SetString(PyExc_TypeError,
32960                     "an integer is required");
32961   }
32962   return res;
32963 }
32964 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
32965   Py_ssize_t ival;
32966   PyObject *x;
32967 #if PY_MAJOR_VERSION < 3
32968   if (likely(PyInt_CheckExact(b))) {
32969     if (sizeof(Py_ssize_t) >= sizeof(long))
32970         return PyInt_AS_LONG(b);
32971     else
32972         return PyInt_AsSsize_t(b);
32973   }
32974 #endif
32975   if (likely(PyLong_CheckExact(b))) {
32976     #if CYTHON_USE_PYLONG_INTERNALS
32977     const digit* digits = ((PyLongObject*)b)->ob_digit;
32978     const Py_ssize_t size = Py_SIZE(b);
32979     if (likely(__Pyx_sst_abs(size) <= 1)) {
32980         ival = likely(size) ? digits[0] : 0;
32981         if (size == -1) ival = -ival;
32982         return ival;
32983     } else {
32984       switch (size) {
32985          case 2:
32986            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
32987              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
32988            }
32989            break;
32990          case -2:
32991            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
32992              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
32993            }
32994            break;
32995          case 3:
32996            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
32997              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
32998            }
32999            break;
33000          case -3:
33001            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
33002              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
33003            }
33004            break;
33005          case 4:
33006            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
33007              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]));
33008            }
33009            break;
33010          case -4:
33011            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
33012              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]));
33013            }
33014            break;
33015       }
33016     }
33017     #endif
33018     return PyLong_AsSsize_t(b);
33019   }
33020   x = PyNumber_Index(b);
33021   if (!x) return -1;
33022   ival = PyInt_AsSsize_t(x);
33023   Py_DECREF(x);
33024   return ival;
33025 }
33026 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
33027   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
33028 }
33029 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
33030     return PyInt_FromSize_t(ival);
33031 }
33032 
33033 
33034 #endif /* Py_PYTHON_H */
33035