54934eaddfad6cedabed63be74c10f59cd88abd9
[ealt-edge.git] / example-apps / PDD / pcb-defect-detection / libs / box_utils / cython_utils / nms.c
1 /* Generated by Cython 0.25.2 */
2
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6     #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
8     #error Cython requires Python 2.6+ or Python 3.2+.
9 #else
10 #define CYTHON_ABI "0_25_2"
11 #include <stddef.h>
12 #ifndef offsetof
13   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
14 #endif
15 #if !defined(WIN32) && !defined(MS_WINDOWS)
16   #ifndef __stdcall
17     #define __stdcall
18   #endif
19   #ifndef __cdecl
20     #define __cdecl
21   #endif
22   #ifndef __fastcall
23     #define __fastcall
24   #endif
25 #endif
26 #ifndef DL_IMPORT
27   #define DL_IMPORT(t) t
28 #endif
29 #ifndef DL_EXPORT
30   #define DL_EXPORT(t) t
31 #endif
32 #ifndef HAVE_LONG_LONG
33   #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
34     #define HAVE_LONG_LONG
35   #endif
36 #endif
37 #ifndef PY_LONG_LONG
38   #define PY_LONG_LONG LONG_LONG
39 #endif
40 #ifndef Py_HUGE_VAL
41   #define Py_HUGE_VAL HUGE_VAL
42 #endif
43 #ifdef PYPY_VERSION
44   #define CYTHON_COMPILING_IN_PYPY 1
45   #define CYTHON_COMPILING_IN_PYSTON 0
46   #define CYTHON_COMPILING_IN_CPYTHON 0
47   #undef CYTHON_USE_TYPE_SLOTS
48   #define CYTHON_USE_TYPE_SLOTS 0
49   #undef CYTHON_USE_ASYNC_SLOTS
50   #define CYTHON_USE_ASYNC_SLOTS 0
51   #undef CYTHON_USE_PYLIST_INTERNALS
52   #define CYTHON_USE_PYLIST_INTERNALS 0
53   #undef CYTHON_USE_UNICODE_INTERNALS
54   #define CYTHON_USE_UNICODE_INTERNALS 0
55   #undef CYTHON_USE_UNICODE_WRITER
56   #define CYTHON_USE_UNICODE_WRITER 0
57   #undef CYTHON_USE_PYLONG_INTERNALS
58   #define CYTHON_USE_PYLONG_INTERNALS 0
59   #undef CYTHON_AVOID_BORROWED_REFS
60   #define CYTHON_AVOID_BORROWED_REFS 1
61   #undef CYTHON_ASSUME_SAFE_MACROS
62   #define CYTHON_ASSUME_SAFE_MACROS 0
63   #undef CYTHON_UNPACK_METHODS
64   #define CYTHON_UNPACK_METHODS 0
65   #undef CYTHON_FAST_THREAD_STATE
66   #define CYTHON_FAST_THREAD_STATE 0
67   #undef CYTHON_FAST_PYCALL
68   #define CYTHON_FAST_PYCALL 0
69 #elif defined(PYSTON_VERSION)
70   #define CYTHON_COMPILING_IN_PYPY 0
71   #define CYTHON_COMPILING_IN_PYSTON 1
72   #define CYTHON_COMPILING_IN_CPYTHON 0
73   #ifndef CYTHON_USE_TYPE_SLOTS
74     #define CYTHON_USE_TYPE_SLOTS 1
75   #endif
76   #undef CYTHON_USE_ASYNC_SLOTS
77   #define CYTHON_USE_ASYNC_SLOTS 0
78   #undef CYTHON_USE_PYLIST_INTERNALS
79   #define CYTHON_USE_PYLIST_INTERNALS 0
80   #ifndef CYTHON_USE_UNICODE_INTERNALS
81     #define CYTHON_USE_UNICODE_INTERNALS 1
82   #endif
83   #undef CYTHON_USE_UNICODE_WRITER
84   #define CYTHON_USE_UNICODE_WRITER 0
85   #undef CYTHON_USE_PYLONG_INTERNALS
86   #define CYTHON_USE_PYLONG_INTERNALS 0
87   #ifndef CYTHON_AVOID_BORROWED_REFS
88     #define CYTHON_AVOID_BORROWED_REFS 0
89   #endif
90   #ifndef CYTHON_ASSUME_SAFE_MACROS
91     #define CYTHON_ASSUME_SAFE_MACROS 1
92   #endif
93   #ifndef CYTHON_UNPACK_METHODS
94     #define CYTHON_UNPACK_METHODS 1
95   #endif
96   #undef CYTHON_FAST_THREAD_STATE
97   #define CYTHON_FAST_THREAD_STATE 0
98   #undef CYTHON_FAST_PYCALL
99   #define CYTHON_FAST_PYCALL 0
100 #else
101   #define CYTHON_COMPILING_IN_PYPY 0
102   #define CYTHON_COMPILING_IN_PYSTON 0
103   #define CYTHON_COMPILING_IN_CPYTHON 1
104   #ifndef CYTHON_USE_TYPE_SLOTS
105     #define CYTHON_USE_TYPE_SLOTS 1
106   #endif
107   #if PY_MAJOR_VERSION < 3
108     #undef CYTHON_USE_ASYNC_SLOTS
109     #define CYTHON_USE_ASYNC_SLOTS 0
110   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
111     #define CYTHON_USE_ASYNC_SLOTS 1
112   #endif
113   #if PY_VERSION_HEX < 0x02070000
114     #undef CYTHON_USE_PYLONG_INTERNALS
115     #define CYTHON_USE_PYLONG_INTERNALS 0
116   #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
117     #define CYTHON_USE_PYLONG_INTERNALS 1
118   #endif
119   #ifndef CYTHON_USE_PYLIST_INTERNALS
120     #define CYTHON_USE_PYLIST_INTERNALS 1
121   #endif
122   #ifndef CYTHON_USE_UNICODE_INTERNALS
123     #define CYTHON_USE_UNICODE_INTERNALS 1
124   #endif
125   #if PY_VERSION_HEX < 0x030300F0
126     #undef CYTHON_USE_UNICODE_WRITER
127     #define CYTHON_USE_UNICODE_WRITER 0
128   #elif !defined(CYTHON_USE_UNICODE_WRITER)
129     #define CYTHON_USE_UNICODE_WRITER 1
130   #endif
131   #ifndef CYTHON_AVOID_BORROWED_REFS
132     #define CYTHON_AVOID_BORROWED_REFS 0
133   #endif
134   #ifndef CYTHON_ASSUME_SAFE_MACROS
135     #define CYTHON_ASSUME_SAFE_MACROS 1
136   #endif
137   #ifndef CYTHON_UNPACK_METHODS
138     #define CYTHON_UNPACK_METHODS 1
139   #endif
140   #ifndef CYTHON_FAST_THREAD_STATE
141     #define CYTHON_FAST_THREAD_STATE 1
142   #endif
143   #ifndef CYTHON_FAST_PYCALL
144     #define CYTHON_FAST_PYCALL 1
145   #endif
146 #endif
147 #if !defined(CYTHON_FAST_PYCCALL)
148 #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
149 #endif
150 #if CYTHON_USE_PYLONG_INTERNALS
151   #include "longintrepr.h"
152   #undef SHIFT
153   #undef BASE
154   #undef MASK
155 #endif
156 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
157   #define Py_OptimizeFlag 0
158 #endif
159 #define __PYX_BUILD_PY_SSIZE_T "n"
160 #define CYTHON_FORMAT_SSIZE_T "z"
161 #if PY_MAJOR_VERSION < 3
162   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
163   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
164           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
165   #define __Pyx_DefaultClassType PyClass_Type
166 #else
167   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
168   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
169           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
170   #define __Pyx_DefaultClassType PyType_Type
171 #endif
172 #ifndef Py_TPFLAGS_CHECKTYPES
173   #define Py_TPFLAGS_CHECKTYPES 0
174 #endif
175 #ifndef Py_TPFLAGS_HAVE_INDEX
176   #define Py_TPFLAGS_HAVE_INDEX 0
177 #endif
178 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
179   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
180 #endif
181 #ifndef Py_TPFLAGS_HAVE_FINALIZE
182   #define Py_TPFLAGS_HAVE_FINALIZE 0
183 #endif
184 #ifndef METH_FASTCALL
185   #define METH_FASTCALL 0x80
186   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
187                                               Py_ssize_t nargs, PyObject *kwnames);
188 #else
189   #define __Pyx_PyCFunctionFast _PyCFunctionFast
190 #endif
191 #if CYTHON_FAST_PYCCALL
192 #define __Pyx_PyFastCFunction_Check(func)\
193     ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
194 #else
195 #define __Pyx_PyFastCFunction_Check(func) 0
196 #endif
197 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
198   #define CYTHON_PEP393_ENABLED 1
199   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
200                                               0 : _PyUnicode_Ready((PyObject *)(op)))
201   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
202   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
203   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
204   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
205   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
206   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
207   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
208   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
209 #else
210   #define CYTHON_PEP393_ENABLED 0
211   #define PyUnicode_1BYTE_KIND  1
212   #define PyUnicode_2BYTE_KIND  2
213   #define PyUnicode_4BYTE_KIND  4
214   #define __Pyx_PyUnicode_READY(op)       (0)
215   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
216   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
217   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
218   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
219   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
220   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
221   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
222   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
223 #endif
224 #if CYTHON_COMPILING_IN_PYPY
225   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
226   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
227 #else
228   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
229   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
230       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
231 #endif
232 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
233   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
234 #endif
235 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
236   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
237 #endif
238 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
239   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
240 #endif
241 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
242   #define PyObject_Malloc(s)   PyMem_Malloc(s)
243   #define PyObject_Free(p)     PyMem_Free(p)
244   #define PyObject_Realloc(p)  PyMem_Realloc(p)
245 #endif
246 #if CYTHON_COMPILING_IN_PYSTON
247   #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
248   #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
249 #else
250   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
251   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
252 #endif
253 #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
254 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
255 #if PY_MAJOR_VERSION >= 3
256   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
257 #else
258   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
259 #endif
260 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
261   #define PyObject_ASCII(o)            PyObject_Repr(o)
262 #endif
263 #if PY_MAJOR_VERSION >= 3
264   #define PyBaseString_Type            PyUnicode_Type
265   #define PyStringObject               PyUnicodeObject
266   #define PyString_Type                PyUnicode_Type
267   #define PyString_Check               PyUnicode_Check
268   #define PyString_CheckExact          PyUnicode_CheckExact
269 #endif
270 #if PY_MAJOR_VERSION >= 3
271   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
272   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
273 #else
274   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
275   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
276 #endif
277 #ifndef PySet_CheckExact
278   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
279 #endif
280 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
281 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
282 #if PY_MAJOR_VERSION >= 3
283   #define PyIntObject                  PyLongObject
284   #define PyInt_Type                   PyLong_Type
285   #define PyInt_Check(op)              PyLong_Check(op)
286   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
287   #define PyInt_FromString             PyLong_FromString
288   #define PyInt_FromUnicode            PyLong_FromUnicode
289   #define PyInt_FromLong               PyLong_FromLong
290   #define PyInt_FromSize_t             PyLong_FromSize_t
291   #define PyInt_FromSsize_t            PyLong_FromSsize_t
292   #define PyInt_AsLong                 PyLong_AsLong
293   #define PyInt_AS_LONG                PyLong_AS_LONG
294   #define PyInt_AsSsize_t              PyLong_AsSsize_t
295   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
296   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
297   #define PyNumber_Int                 PyNumber_Long
298 #endif
299 #if PY_MAJOR_VERSION >= 3
300   #define PyBoolObject                 PyLongObject
301 #endif
302 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
303   #ifndef PyUnicode_InternFromString
304     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
305   #endif
306 #endif
307 #if PY_VERSION_HEX < 0x030200A4
308   typedef long Py_hash_t;
309   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
310   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
311 #else
312   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
313   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
314 #endif
315 #if PY_MAJOR_VERSION >= 3
316   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
317 #else
318   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
319 #endif
320 #if CYTHON_USE_ASYNC_SLOTS
321   #if PY_VERSION_HEX >= 0x030500B1
322     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
323     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
324   #else
325     typedef struct {
326         unaryfunc am_await;
327         unaryfunc am_aiter;
328         unaryfunc am_anext;
329     } __Pyx_PyAsyncMethodsStruct;
330     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
331   #endif
332 #else
333   #define __Pyx_PyType_AsAsync(obj) NULL
334 #endif
335 #ifndef CYTHON_RESTRICT
336   #if defined(__GNUC__)
337     #define CYTHON_RESTRICT __restrict__
338   #elif defined(_MSC_VER) && _MSC_VER >= 1400
339     #define CYTHON_RESTRICT __restrict
340   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
341     #define CYTHON_RESTRICT restrict
342   #else
343     #define CYTHON_RESTRICT
344   #endif
345 #endif
346 #ifndef CYTHON_UNUSED
347 # if defined(__GNUC__)
348 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
349 #     define CYTHON_UNUSED __attribute__ ((__unused__))
350 #   else
351 #     define CYTHON_UNUSED
352 #   endif
353 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
354 #   define CYTHON_UNUSED __attribute__ ((__unused__))
355 # else
356 #   define CYTHON_UNUSED
357 # endif
358 #endif
359 #ifndef CYTHON_MAYBE_UNUSED_VAR
360 #  if defined(__cplusplus)
361      template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
362 #  else
363 #    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
364 #  endif
365 #endif
366 #ifndef CYTHON_NCP_UNUSED
367 # if CYTHON_COMPILING_IN_CPYTHON
368 #  define CYTHON_NCP_UNUSED
369 # else
370 #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
371 # endif
372 #endif
373 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
374
375 #ifndef CYTHON_INLINE
376   #if defined(__clang__)
377     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
378   #elif defined(__GNUC__)
379     #define CYTHON_INLINE __inline__
380   #elif defined(_MSC_VER)
381     #define CYTHON_INLINE __inline
382   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
383     #define CYTHON_INLINE inline
384   #else
385     #define CYTHON_INLINE
386   #endif
387 #endif
388
389 #if defined(WIN32) || defined(MS_WINDOWS)
390   #define _USE_MATH_DEFINES
391 #endif
392 #include <math.h>
393 #ifdef NAN
394 #define __PYX_NAN() ((float) NAN)
395 #else
396 static CYTHON_INLINE float __PYX_NAN() {
397   float value;
398   memset(&value, 0xFF, sizeof(value));
399   return value;
400 }
401 #endif
402 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
403 #define __Pyx_truncl trunc
404 #else
405 #define __Pyx_truncl truncl
406 #endif
407
408
409 #define __PYX_ERR(f_index, lineno, Ln_error) \
410 { \
411   __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
412 }
413
414 #if PY_MAJOR_VERSION >= 3
415   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
416   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
417 #else
418   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
419   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
420 #endif
421
422 #ifndef __PYX_EXTERN_C
423   #ifdef __cplusplus
424     #define __PYX_EXTERN_C extern "C"
425   #else
426     #define __PYX_EXTERN_C extern
427   #endif
428 #endif
429
430 #define __PYX_HAVE__cython_nms
431 #define __PYX_HAVE_API__cython_nms
432 #include <string.h>
433 #include <stdio.h>
434 #include <stdlib.h>
435 #include "numpy/arrayobject.h"
436 #include "numpy/ufuncobject.h"
437 #ifdef _OPENMP
438 #include <omp.h>
439 #endif /* _OPENMP */
440
441 #ifdef PYREX_WITHOUT_ASSERTIONS
442 #define CYTHON_WITHOUT_ASSERTIONS
443 #endif
444
445 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
446                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
447
448 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
449 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
450 #define __PYX_DEFAULT_STRING_ENCODING ""
451 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
452 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
453 #define __Pyx_uchar_cast(c) ((unsigned char)c)
454 #define __Pyx_long_cast(x) ((long)x)
455 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
456     (sizeof(type) < sizeof(Py_ssize_t))  ||\
457     (sizeof(type) > sizeof(Py_ssize_t) &&\
458           likely(v < (type)PY_SSIZE_T_MAX ||\
459                  v == (type)PY_SSIZE_T_MAX)  &&\
460           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
461                                 v == (type)PY_SSIZE_T_MIN)))  ||\
462     (sizeof(type) == sizeof(Py_ssize_t) &&\
463           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
464                                v == (type)PY_SSIZE_T_MAX)))  )
465 #if defined (__cplusplus) && __cplusplus >= 201103L
466     #include <cstdlib>
467     #define __Pyx_sst_abs(value) std::abs(value)
468 #elif SIZEOF_INT >= SIZEOF_SIZE_T
469     #define __Pyx_sst_abs(value) abs(value)
470 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
471     #define __Pyx_sst_abs(value) labs(value)
472 #elif defined (_MSC_VER) && defined (_M_X64)
473     #define __Pyx_sst_abs(value) _abs64(value)
474 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
475     #define __Pyx_sst_abs(value) llabs(value)
476 #elif defined (__GNUC__)
477     #define __Pyx_sst_abs(value) __builtin_llabs(value)
478 #else
479     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
480 #endif
481 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
482 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
483 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
484 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
485 #define __Pyx_PyBytes_FromString        PyBytes_FromString
486 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
487 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
488 #if PY_MAJOR_VERSION < 3
489     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
490     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
491 #else
492     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
493     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
494 #endif
495 #define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
496 #define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
497 #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
498 #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
499 #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
500 #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
501 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
502 #if PY_MAJOR_VERSION < 3
503 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
504 {
505     const Py_UNICODE *u_end = u;
506     while (*u_end++) ;
507     return (size_t)(u_end - u - 1);
508 }
509 #else
510 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
511 #endif
512 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
513 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
514 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
515 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
516 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
517 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
518 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
519 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
520 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
521 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
522 #if CYTHON_ASSUME_SAFE_MACROS
523 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
524 #else
525 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
526 #endif
527 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
528 #if PY_MAJOR_VERSION >= 3
529 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
530 #else
531 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
532 #endif
533 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
534 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
535 static int __Pyx_sys_getdefaultencoding_not_ascii;
536 static int __Pyx_init_sys_getdefaultencoding_params(void) {
537     PyObject* sys;
538     PyObject* default_encoding = NULL;
539     PyObject* ascii_chars_u = NULL;
540     PyObject* ascii_chars_b = NULL;
541     const char* default_encoding_c;
542     sys = PyImport_ImportModule("sys");
543     if (!sys) goto bad;
544     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
545     Py_DECREF(sys);
546     if (!default_encoding) goto bad;
547     default_encoding_c = PyBytes_AsString(default_encoding);
548     if (!default_encoding_c) goto bad;
549     if (strcmp(default_encoding_c, "ascii") == 0) {
550         __Pyx_sys_getdefaultencoding_not_ascii = 0;
551     } else {
552         char ascii_chars[128];
553         int c;
554         for (c = 0; c < 128; c++) {
555             ascii_chars[c] = c;
556         }
557         __Pyx_sys_getdefaultencoding_not_ascii = 1;
558         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
559         if (!ascii_chars_u) goto bad;
560         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
561         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
562             PyErr_Format(
563                 PyExc_ValueError,
564                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
565                 default_encoding_c);
566             goto bad;
567         }
568         Py_DECREF(ascii_chars_u);
569         Py_DECREF(ascii_chars_b);
570     }
571     Py_DECREF(default_encoding);
572     return 0;
573 bad:
574     Py_XDECREF(default_encoding);
575     Py_XDECREF(ascii_chars_u);
576     Py_XDECREF(ascii_chars_b);
577     return -1;
578 }
579 #endif
580 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
581 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
582 #else
583 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
584 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
585 static char* __PYX_DEFAULT_STRING_ENCODING;
586 static int __Pyx_init_sys_getdefaultencoding_params(void) {
587     PyObject* sys;
588     PyObject* default_encoding = NULL;
589     char* default_encoding_c;
590     sys = PyImport_ImportModule("sys");
591     if (!sys) goto bad;
592     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
593     Py_DECREF(sys);
594     if (!default_encoding) goto bad;
595     default_encoding_c = PyBytes_AsString(default_encoding);
596     if (!default_encoding_c) goto bad;
597     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
598     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
599     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
600     Py_DECREF(default_encoding);
601     return 0;
602 bad:
603     Py_XDECREF(default_encoding);
604     return -1;
605 }
606 #endif
607 #endif
608
609
610 /* Test for GCC > 2.95 */
611 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
612   #define likely(x)   __builtin_expect(!!(x), 1)
613   #define unlikely(x) __builtin_expect(!!(x), 0)
614 #else /* !__GNUC__ or GCC < 2.95 */
615   #define likely(x)   (x)
616   #define unlikely(x) (x)
617 #endif /* __GNUC__ */
618
619 static PyObject *__pyx_m;
620 static PyObject *__pyx_d;
621 static PyObject *__pyx_b;
622 static PyObject *__pyx_empty_tuple;
623 static PyObject *__pyx_empty_bytes;
624 static PyObject *__pyx_empty_unicode;
625 static int __pyx_lineno;
626 static int __pyx_clineno = 0;
627 static const char * __pyx_cfilenm= __FILE__;
628 static const char *__pyx_filename;
629
630 /* Header.proto */
631 #if !defined(CYTHON_CCOMPLEX)
632   #if defined(__cplusplus)
633     #define CYTHON_CCOMPLEX 1
634   #elif defined(_Complex_I)
635     #define CYTHON_CCOMPLEX 1
636   #else
637     #define CYTHON_CCOMPLEX 0
638   #endif
639 #endif
640 #if CYTHON_CCOMPLEX
641   #ifdef __cplusplus
642     #include <complex>
643   #else
644     #include <complex.h>
645   #endif
646 #endif
647 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
648   #undef _Complex_I
649   #define _Complex_I 1.0fj
650 #endif
651
652
653 static const char *__pyx_f[] = {
654   "_utils/nms.pyx",
655   "__init__.pxd",
656   "type.pxd",
657 };
658 /* BufferFormatStructs.proto */
659 #define IS_UNSIGNED(type) (((type) -1) > 0)
660 struct __Pyx_StructField_;
661 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
662 typedef struct {
663   const char* name;
664   struct __Pyx_StructField_* fields;
665   size_t size;
666   size_t arraysize[8];
667   int ndim;
668   char typegroup;
669   char is_unsigned;
670   int flags;
671 } __Pyx_TypeInfo;
672 typedef struct __Pyx_StructField_ {
673   __Pyx_TypeInfo* type;
674   const char* name;
675   size_t offset;
676 } __Pyx_StructField;
677 typedef struct {
678   __Pyx_StructField* field;
679   size_t parent_offset;
680 } __Pyx_BufFmt_StackElem;
681 typedef struct {
682   __Pyx_StructField root;
683   __Pyx_BufFmt_StackElem* head;
684   size_t fmt_offset;
685   size_t new_count, enc_count;
686   size_t struct_alignment;
687   int is_complex;
688   char enc_type;
689   char new_packmode;
690   char enc_packmode;
691   char is_valid_array;
692 } __Pyx_BufFmt_Context;
693
694
695 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725
696  * # in Cython to enable them only on the right systems.
697  * 
698  * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
699  * ctypedef npy_int16      int16_t
700  * ctypedef npy_int32      int32_t
701  */
702 typedef npy_int8 __pyx_t_5numpy_int8_t;
703
704 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726
705  * 
706  * ctypedef npy_int8       int8_t
707  * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
708  * ctypedef npy_int32      int32_t
709  * ctypedef npy_int64      int64_t
710  */
711 typedef npy_int16 __pyx_t_5numpy_int16_t;
712
713 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":727
714  * ctypedef npy_int8       int8_t
715  * ctypedef npy_int16      int16_t
716  * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
717  * ctypedef npy_int64      int64_t
718  * #ctypedef npy_int96      int96_t
719  */
720 typedef npy_int32 __pyx_t_5numpy_int32_t;
721
722 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":728
723  * ctypedef npy_int16      int16_t
724  * ctypedef npy_int32      int32_t
725  * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
726  * #ctypedef npy_int96      int96_t
727  * #ctypedef npy_int128     int128_t
728  */
729 typedef npy_int64 __pyx_t_5numpy_int64_t;
730
731 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732
732  * #ctypedef npy_int128     int128_t
733  * 
734  * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
735  * ctypedef npy_uint16     uint16_t
736  * ctypedef npy_uint32     uint32_t
737  */
738 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
739
740 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733
741  * 
742  * ctypedef npy_uint8      uint8_t
743  * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
744  * ctypedef npy_uint32     uint32_t
745  * ctypedef npy_uint64     uint64_t
746  */
747 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
748
749 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":734
750  * ctypedef npy_uint8      uint8_t
751  * ctypedef npy_uint16     uint16_t
752  * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
753  * ctypedef npy_uint64     uint64_t
754  * #ctypedef npy_uint96     uint96_t
755  */
756 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
757
758 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":735
759  * ctypedef npy_uint16     uint16_t
760  * ctypedef npy_uint32     uint32_t
761  * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
762  * #ctypedef npy_uint96     uint96_t
763  * #ctypedef npy_uint128    uint128_t
764  */
765 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
766
767 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":739
768  * #ctypedef npy_uint128    uint128_t
769  * 
770  * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
771  * ctypedef npy_float64    float64_t
772  * #ctypedef npy_float80    float80_t
773  */
774 typedef npy_float32 __pyx_t_5numpy_float32_t;
775
776 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740
777  * 
778  * ctypedef npy_float32    float32_t
779  * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
780  * #ctypedef npy_float80    float80_t
781  * #ctypedef npy_float128   float128_t
782  */
783 typedef npy_float64 __pyx_t_5numpy_float64_t;
784
785 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749
786  * # The int types are mapped a bit surprising --
787  * # numpy.int corresponds to 'l' and numpy.long to 'q'
788  * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
789  * ctypedef npy_longlong   long_t
790  * ctypedef npy_longlong   longlong_t
791  */
792 typedef npy_long __pyx_t_5numpy_int_t;
793
794 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":750
795  * # numpy.int corresponds to 'l' and numpy.long to 'q'
796  * ctypedef npy_long       int_t
797  * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
798  * ctypedef npy_longlong   longlong_t
799  * 
800  */
801 typedef npy_longlong __pyx_t_5numpy_long_t;
802
803 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751
804  * ctypedef npy_long       int_t
805  * ctypedef npy_longlong   long_t
806  * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
807  * 
808  * ctypedef npy_ulong      uint_t
809  */
810 typedef npy_longlong __pyx_t_5numpy_longlong_t;
811
812 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753
813  * ctypedef npy_longlong   longlong_t
814  * 
815  * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
816  * ctypedef npy_ulonglong  ulong_t
817  * ctypedef npy_ulonglong  ulonglong_t
818  */
819 typedef npy_ulong __pyx_t_5numpy_uint_t;
820
821 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754
822  * 
823  * ctypedef npy_ulong      uint_t
824  * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
825  * ctypedef npy_ulonglong  ulonglong_t
826  * 
827  */
828 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
829
830 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755
831  * ctypedef npy_ulong      uint_t
832  * ctypedef npy_ulonglong  ulong_t
833  * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
834  * 
835  * ctypedef npy_intp       intp_t
836  */
837 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
838
839 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":757
840  * ctypedef npy_ulonglong  ulonglong_t
841  * 
842  * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
843  * ctypedef npy_uintp      uintp_t
844  * 
845  */
846 typedef npy_intp __pyx_t_5numpy_intp_t;
847
848 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758
849  * 
850  * ctypedef npy_intp       intp_t
851  * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
852  * 
853  * ctypedef npy_double     float_t
854  */
855 typedef npy_uintp __pyx_t_5numpy_uintp_t;
856
857 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760
858  * ctypedef npy_uintp      uintp_t
859  * 
860  * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
861  * ctypedef npy_double     double_t
862  * ctypedef npy_longdouble longdouble_t
863  */
864 typedef npy_double __pyx_t_5numpy_float_t;
865
866 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":761
867  * 
868  * ctypedef npy_double     float_t
869  * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
870  * ctypedef npy_longdouble longdouble_t
871  * 
872  */
873 typedef npy_double __pyx_t_5numpy_double_t;
874
875 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762
876  * ctypedef npy_double     float_t
877  * ctypedef npy_double     double_t
878  * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
879  * 
880  * ctypedef npy_cfloat      cfloat_t
881  */
882 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
883 /* Declarations.proto */
884 #if CYTHON_CCOMPLEX
885   #ifdef __cplusplus
886     typedef ::std::complex< float > __pyx_t_float_complex;
887   #else
888     typedef float _Complex __pyx_t_float_complex;
889   #endif
890 #else
891     typedef struct { float real, imag; } __pyx_t_float_complex;
892 #endif
893 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
894
895 /* Declarations.proto */
896 #if CYTHON_CCOMPLEX
897   #ifdef __cplusplus
898     typedef ::std::complex< double > __pyx_t_double_complex;
899   #else
900     typedef double _Complex __pyx_t_double_complex;
901   #endif
902 #else
903     typedef struct { double real, imag; } __pyx_t_double_complex;
904 #endif
905 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
906
907
908 /*--- Type declarations ---*/
909
910 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764
911  * ctypedef npy_longdouble longdouble_t
912  * 
913  * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
914  * ctypedef npy_cdouble     cdouble_t
915  * ctypedef npy_clongdouble clongdouble_t
916  */
917 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
918
919 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765
920  * 
921  * ctypedef npy_cfloat      cfloat_t
922  * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
923  * ctypedef npy_clongdouble clongdouble_t
924  * 
925  */
926 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
927
928 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766
929  * ctypedef npy_cfloat      cfloat_t
930  * ctypedef npy_cdouble     cdouble_t
931  * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
932  * 
933  * ctypedef npy_cdouble     complex_t
934  */
935 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
936
937 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768
938  * ctypedef npy_clongdouble clongdouble_t
939  * 
940  * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
941  * 
942  * cdef inline object PyArray_MultiIterNew1(a):
943  */
944 typedef npy_cdouble __pyx_t_5numpy_complex_t;
945
946 /* --- Runtime support code (head) --- */
947 /* Refnanny.proto */
948 #ifndef CYTHON_REFNANNY
949   #define CYTHON_REFNANNY 0
950 #endif
951 #if CYTHON_REFNANNY
952   typedef struct {
953     void (*INCREF)(void*, PyObject*, int);
954     void (*DECREF)(void*, PyObject*, int);
955     void (*GOTREF)(void*, PyObject*, int);
956     void (*GIVEREF)(void*, PyObject*, int);
957     void* (*SetupContext)(const char*, int, const char*);
958     void (*FinishContext)(void**);
959   } __Pyx_RefNannyAPIStruct;
960   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
961   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
962   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
963 #ifdef WITH_THREAD
964   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
965           if (acquire_gil) {\
966               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
967               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
968               PyGILState_Release(__pyx_gilstate_save);\
969           } else {\
970               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
971           }
972 #else
973   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
974           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
975 #endif
976   #define __Pyx_RefNannyFinishContext()\
977           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
978   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
979   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
980   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
981   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
982   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
983   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
984   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
985   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
986 #else
987   #define __Pyx_RefNannyDeclarations
988   #define __Pyx_RefNannySetupContext(name, acquire_gil)
989   #define __Pyx_RefNannyFinishContext()
990   #define __Pyx_INCREF(r) Py_INCREF(r)
991   #define __Pyx_DECREF(r) Py_DECREF(r)
992   #define __Pyx_GOTREF(r)
993   #define __Pyx_GIVEREF(r)
994   #define __Pyx_XINCREF(r) Py_XINCREF(r)
995   #define __Pyx_XDECREF(r) Py_XDECREF(r)
996   #define __Pyx_XGOTREF(r)
997   #define __Pyx_XGIVEREF(r)
998 #endif
999 #define __Pyx_XDECREF_SET(r, v) do {\
1000         PyObject *tmp = (PyObject *) r;\
1001         r = v; __Pyx_XDECREF(tmp);\
1002     } while (0)
1003 #define __Pyx_DECREF_SET(r, v) do {\
1004         PyObject *tmp = (PyObject *) r;\
1005         r = v; __Pyx_DECREF(tmp);\
1006     } while (0)
1007 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1008 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1009
1010 /* PyObjectGetAttrStr.proto */
1011 #if CYTHON_USE_TYPE_SLOTS
1012 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
1013     PyTypeObject* tp = Py_TYPE(obj);
1014     if (likely(tp->tp_getattro))
1015         return tp->tp_getattro(obj, attr_name);
1016 #if PY_MAJOR_VERSION < 3
1017     if (likely(tp->tp_getattr))
1018         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
1019 #endif
1020     return PyObject_GetAttr(obj, attr_name);
1021 }
1022 #else
1023 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1024 #endif
1025
1026 /* GetBuiltinName.proto */
1027 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1028
1029 /* RaiseArgTupleInvalid.proto */
1030 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1031     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1032
1033 /* RaiseDoubleKeywords.proto */
1034 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1035
1036 /* ParseKeywords.proto */
1037 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1038     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1039     const char* function_name);
1040
1041 /* ArgTypeTest.proto */
1042 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
1043     const char *name, int exact);
1044
1045 /* BufferFormatCheck.proto */
1046 static CYTHON_INLINE int  __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
1047     __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
1048 static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
1049 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
1050 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
1051                               __Pyx_BufFmt_StackElem* stack,
1052                               __Pyx_TypeInfo* type); // PROTO
1053
1054 /* ExtTypeTest.proto */
1055 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1056
1057 /* PyIntBinop.proto */
1058 #if !CYTHON_COMPILING_IN_PYPY
1059 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1060 #else
1061 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1062     (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1063 #endif
1064
1065 /* PyCFunctionFastCall.proto */
1066 #if CYTHON_FAST_PYCCALL
1067 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1068 #else
1069 #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
1070 #endif
1071
1072 /* PyFunctionFastCall.proto */
1073 #if CYTHON_FAST_PYCALL
1074 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1075     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1076 #if 1 || PY_VERSION_HEX < 0x030600B1
1077 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1078 #else
1079 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1080 #endif
1081 #endif
1082
1083 /* PyObjectCall.proto */
1084 #if CYTHON_COMPILING_IN_CPYTHON
1085 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1086 #else
1087 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1088 #endif
1089
1090 /* PyObjectCallMethO.proto */
1091 #if CYTHON_COMPILING_IN_CPYTHON
1092 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1093 #endif
1094
1095 /* PyObjectCallOneArg.proto */
1096 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1097
1098 /* PyObjectCallNoArg.proto */
1099 #if CYTHON_COMPILING_IN_CPYTHON
1100 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1101 #else
1102 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1103 #endif
1104
1105 /* GetModuleGlobalName.proto */
1106 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1107
1108 /* BufferIndexError.proto */
1109 static void __Pyx_RaiseBufferIndexError(int axis);
1110
1111 #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
1112 /* ListAppend.proto */
1113 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1114 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1115     PyListObject* L = (PyListObject*) list;
1116     Py_ssize_t len = Py_SIZE(list);
1117     if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1118         Py_INCREF(x);
1119         PyList_SET_ITEM(list, len, x);
1120         Py_SIZE(list) = len+1;
1121         return 0;
1122     }
1123     return PyList_Append(list, x);
1124 }
1125 #else
1126 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1127 #endif
1128
1129 /* PyThreadStateGet.proto */
1130 #if CYTHON_FAST_THREAD_STATE
1131 #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
1132 #define __Pyx_PyThreadState_assign  __pyx_tstate = PyThreadState_GET();
1133 #else
1134 #define __Pyx_PyThreadState_declare
1135 #define __Pyx_PyThreadState_assign
1136 #endif
1137
1138 /* PyErrFetchRestore.proto */
1139 #if CYTHON_FAST_THREAD_STATE
1140 #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1141 #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1142 #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1143 #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1144 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1145 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1146 #else
1147 #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
1148 #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
1149 #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
1150 #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
1151 #endif
1152
1153 /* RaiseException.proto */
1154 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1155
1156 /* DictGetItem.proto */
1157 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1158 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
1159     PyObject *value;
1160     value = PyDict_GetItemWithError(d, key);
1161     if (unlikely(!value)) {
1162         if (!PyErr_Occurred()) {
1163             PyObject* args = PyTuple_Pack(1, key);
1164             if (likely(args))
1165                 PyErr_SetObject(PyExc_KeyError, args);
1166             Py_XDECREF(args);
1167         }
1168         return NULL;
1169     }
1170     Py_INCREF(value);
1171     return value;
1172 }
1173 #else
1174     #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1175 #endif
1176
1177 /* RaiseTooManyValuesToUnpack.proto */
1178 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1179
1180 /* RaiseNeedMoreValuesToUnpack.proto */
1181 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1182
1183 /* RaiseNoneIterError.proto */
1184 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1185
1186 /* SaveResetException.proto */
1187 #if CYTHON_FAST_THREAD_STATE
1188 #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1189 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1190 #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1191 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1192 #else
1193 #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
1194 #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
1195 #endif
1196
1197 /* PyErrExceptionMatches.proto */
1198 #if CYTHON_FAST_THREAD_STATE
1199 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1200 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1201 #else
1202 #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
1203 #endif
1204
1205 /* GetException.proto */
1206 #if CYTHON_FAST_THREAD_STATE
1207 #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
1208 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1209 #else
1210 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1211 #endif
1212
1213 /* Import.proto */
1214 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1215
1216 /* CodeObjectCache.proto */
1217 typedef struct {
1218     PyCodeObject* code_object;
1219     int code_line;
1220 } __Pyx_CodeObjectCacheEntry;
1221 struct __Pyx_CodeObjectCache {
1222     int count;
1223     int max_count;
1224     __Pyx_CodeObjectCacheEntry* entries;
1225 };
1226 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1227 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1228 static PyCodeObject *__pyx_find_code_object(int code_line);
1229 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1230
1231 /* AddTraceback.proto */
1232 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1233                                int py_line, const char *filename);
1234
1235 /* BufferStructDeclare.proto */
1236 typedef struct {
1237   Py_ssize_t shape, strides, suboffsets;
1238 } __Pyx_Buf_DimInfo;
1239 typedef struct {
1240   size_t refcount;
1241   Py_buffer pybuffer;
1242 } __Pyx_Buffer;
1243 typedef struct {
1244   __Pyx_Buffer *rcbuffer;
1245   char *data;
1246   __Pyx_Buf_DimInfo diminfo[8];
1247 } __Pyx_LocalBuf_ND;
1248
1249 #if PY_MAJOR_VERSION < 3
1250     static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
1251     static void __Pyx_ReleaseBuffer(Py_buffer *view);
1252 #else
1253     #define __Pyx_GetBuffer PyObject_GetBuffer
1254     #define __Pyx_ReleaseBuffer PyBuffer_Release
1255 #endif
1256
1257
1258 /* None.proto */
1259 static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
1260 static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};
1261
1262 /* CIntToPy.proto */
1263 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1264
1265 /* CIntToPy.proto */
1266 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1267
1268 /* RealImag.proto */
1269 #if CYTHON_CCOMPLEX
1270   #ifdef __cplusplus
1271     #define __Pyx_CREAL(z) ((z).real())
1272     #define __Pyx_CIMAG(z) ((z).imag())
1273   #else
1274     #define __Pyx_CREAL(z) (__real__(z))
1275     #define __Pyx_CIMAG(z) (__imag__(z))
1276   #endif
1277 #else
1278     #define __Pyx_CREAL(z) ((z).real)
1279     #define __Pyx_CIMAG(z) ((z).imag)
1280 #endif
1281 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1282         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1283     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1284     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1285 #else
1286     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1287     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1288 #endif
1289
1290 /* Arithmetic.proto */
1291 #if CYTHON_CCOMPLEX
1292     #define __Pyx_c_eq_float(a, b)   ((a)==(b))
1293     #define __Pyx_c_sum_float(a, b)  ((a)+(b))
1294     #define __Pyx_c_diff_float(a, b) ((a)-(b))
1295     #define __Pyx_c_prod_float(a, b) ((a)*(b))
1296     #define __Pyx_c_quot_float(a, b) ((a)/(b))
1297     #define __Pyx_c_neg_float(a)     (-(a))
1298   #ifdef __cplusplus
1299     #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1300     #define __Pyx_c_conj_float(z)    (::std::conj(z))
1301     #if 1
1302         #define __Pyx_c_abs_float(z)     (::std::abs(z))
1303         #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
1304     #endif
1305   #else
1306     #define __Pyx_c_is_zero_float(z) ((z)==0)
1307     #define __Pyx_c_conj_float(z)    (conjf(z))
1308     #if 1
1309         #define __Pyx_c_abs_float(z)     (cabsf(z))
1310         #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
1311     #endif
1312  #endif
1313 #else
1314     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1315     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1316     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1317     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1318     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1319     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1320     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1321     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1322     #if 1
1323         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
1324         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1325     #endif
1326 #endif
1327
1328 /* Arithmetic.proto */
1329 #if CYTHON_CCOMPLEX
1330     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
1331     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
1332     #define __Pyx_c_diff_double(a, b) ((a)-(b))
1333     #define __Pyx_c_prod_double(a, b) ((a)*(b))
1334     #define __Pyx_c_quot_double(a, b) ((a)/(b))
1335     #define __Pyx_c_neg_double(a)     (-(a))
1336   #ifdef __cplusplus
1337     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1338     #define __Pyx_c_conj_double(z)    (::std::conj(z))
1339     #if 1
1340         #define __Pyx_c_abs_double(z)     (::std::abs(z))
1341         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
1342     #endif
1343   #else
1344     #define __Pyx_c_is_zero_double(z) ((z)==0)
1345     #define __Pyx_c_conj_double(z)    (conj(z))
1346     #if 1
1347         #define __Pyx_c_abs_double(z)     (cabs(z))
1348         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
1349     #endif
1350  #endif
1351 #else
1352     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1353     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1354     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1355     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1356     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1357     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1358     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1359     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1360     #if 1
1361         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
1362         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1363     #endif
1364 #endif
1365
1366 /* CIntToPy.proto */
1367 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
1368
1369 /* CIntFromPy.proto */
1370 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1371
1372 /* CIntFromPy.proto */
1373 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1374
1375 /* CheckBinaryVersion.proto */
1376 static int __Pyx_check_binary_version(void);
1377
1378 /* PyIdentifierFromString.proto */
1379 #if !defined(__Pyx_PyIdentifier_FromString)
1380 #if PY_MAJOR_VERSION < 3
1381   #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
1382 #else
1383   #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
1384 #endif
1385 #endif
1386
1387 /* ModuleImport.proto */
1388 static PyObject *__Pyx_ImportModule(const char *name);
1389
1390 /* TypeImport.proto */
1391 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
1392
1393 /* InitStrings.proto */
1394 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1395
1396
1397 /* Module declarations from 'cpython.buffer' */
1398
1399 /* Module declarations from 'libc.string' */
1400
1401 /* Module declarations from 'libc.stdio' */
1402
1403 /* Module declarations from '__builtin__' */
1404
1405 /* Module declarations from 'cpython.type' */
1406 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1407
1408 /* Module declarations from 'cpython' */
1409
1410 /* Module declarations from 'cpython.object' */
1411
1412 /* Module declarations from 'cpython.ref' */
1413
1414 /* Module declarations from 'libc.stdlib' */
1415
1416 /* Module declarations from 'numpy' */
1417
1418 /* Module declarations from 'numpy' */
1419 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1420 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1421 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1422 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1423 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1424 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
1425
1426 /* Module declarations from 'cython_nms' */
1427 static CYTHON_INLINE __pyx_t_5numpy_float32_t __pyx_f_10cython_nms_max(__pyx_t_5numpy_float32_t, __pyx_t_5numpy_float32_t); /*proto*/
1428 static CYTHON_INLINE __pyx_t_5numpy_float32_t __pyx_f_10cython_nms_min(__pyx_t_5numpy_float32_t, __pyx_t_5numpy_float32_t); /*proto*/
1429 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 };
1430 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int_t = { "int_t", NULL, sizeof(__pyx_t_5numpy_int_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int_t), 0 };
1431 #define __Pyx_MODULE_NAME "cython_nms"
1432 int __pyx_module_is_main_cython_nms = 0;
1433
1434 /* Implementation of 'cython_nms' */
1435 static PyObject *__pyx_builtin_range;
1436 static PyObject *__pyx_builtin_ValueError;
1437 static PyObject *__pyx_builtin_RuntimeError;
1438 static PyObject *__pyx_builtin_ImportError;
1439 static const char __pyx_k_h[] = "h";
1440 static const char __pyx_k_i[] = "_i";
1441 static const char __pyx_k_j[] = "_j";
1442 static const char __pyx_k_w[] = "w";
1443 static const char __pyx_k_np[] = "np";
1444 static const char __pyx_k_x1[] = "x1";
1445 static const char __pyx_k_x2[] = "x2";
1446 static const char __pyx_k_y1[] = "y1";
1447 static const char __pyx_k_y2[] = "y2";
1448 static const char __pyx_k_i_2[] = "i";
1449 static const char __pyx_k_int[] = "int";
1450 static const char __pyx_k_ix1[] = "ix1";
1451 static const char __pyx_k_ix2[] = "ix2";
1452 static const char __pyx_k_iy1[] = "iy1";
1453 static const char __pyx_k_iy2[] = "iy2";
1454 static const char __pyx_k_j_2[] = "j";
1455 static const char __pyx_k_nms[] = "nms";
1456 static const char __pyx_k_ovr[] = "ovr";
1457 static const char __pyx_k_xx1[] = "xx1";
1458 static const char __pyx_k_xx2[] = "xx2";
1459 static const char __pyx_k_yy1[] = "yy1";
1460 static const char __pyx_k_yy2[] = "yy2";
1461 static const char __pyx_k_dets[] = "dets";
1462 static const char __pyx_k_keep[] = "keep";
1463 static const char __pyx_k_main[] = "__main__";
1464 static const char __pyx_k_ovr1[] = "ovr1";
1465 static const char __pyx_k_ovr2[] = "ovr2";
1466 static const char __pyx_k_test[] = "__test__";
1467 static const char __pyx_k_areas[] = "areas";
1468 static const char __pyx_k_dtype[] = "dtype";
1469 static const char __pyx_k_iarea[] = "iarea";
1470 static const char __pyx_k_inter[] = "inter";
1471 static const char __pyx_k_ndets[] = "ndets";
1472 static const char __pyx_k_numpy[] = "numpy";
1473 static const char __pyx_k_order[] = "order";
1474 static const char __pyx_k_range[] = "range";
1475 static const char __pyx_k_zeros[] = "zeros";
1476 static const char __pyx_k_import[] = "__import__";
1477 static const char __pyx_k_scores[] = "scores";
1478 static const char __pyx_k_thresh[] = "thresh";
1479 static const char __pyx_k_argsort[] = "argsort";
1480 static const char __pyx_k_nms_new[] = "nms_new";
1481 static const char __pyx_k_ValueError[] = "ValueError";
1482 static const char __pyx_k_cython_nms[] = "cython_nms";
1483 static const char __pyx_k_suppressed[] = "suppressed";
1484 static const char __pyx_k_ImportError[] = "ImportError";
1485 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1486 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
1487 static const char __pyx_k_home_yjr_PycharmProjects_Faster[] = "/home/yjr/PycharmProjects/Faster-RCNN_Tensorflow/libs/box_utils/cython_utils/nms.pyx";
1488 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
1489 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
1490 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
1491 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
1492 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
1493 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
1494 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
1495 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
1496 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
1497 static PyObject *__pyx_n_s_ImportError;
1498 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
1499 static PyObject *__pyx_n_s_RuntimeError;
1500 static PyObject *__pyx_n_s_ValueError;
1501 static PyObject *__pyx_n_s_areas;
1502 static PyObject *__pyx_n_s_argsort;
1503 static PyObject *__pyx_n_s_cython_nms;
1504 static PyObject *__pyx_n_s_dets;
1505 static PyObject *__pyx_n_s_dtype;
1506 static PyObject *__pyx_n_s_h;
1507 static PyObject *__pyx_kp_s_home_yjr_PycharmProjects_Faster;
1508 static PyObject *__pyx_n_s_i;
1509 static PyObject *__pyx_n_s_i_2;
1510 static PyObject *__pyx_n_s_iarea;
1511 static PyObject *__pyx_n_s_import;
1512 static PyObject *__pyx_n_s_int;
1513 static PyObject *__pyx_n_s_inter;
1514 static PyObject *__pyx_n_s_ix1;
1515 static PyObject *__pyx_n_s_ix2;
1516 static PyObject *__pyx_n_s_iy1;
1517 static PyObject *__pyx_n_s_iy2;
1518 static PyObject *__pyx_n_s_j;
1519 static PyObject *__pyx_n_s_j_2;
1520 static PyObject *__pyx_n_s_keep;
1521 static PyObject *__pyx_n_s_main;
1522 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
1523 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
1524 static PyObject *__pyx_n_s_ndets;
1525 static PyObject *__pyx_n_s_nms;
1526 static PyObject *__pyx_n_s_nms_new;
1527 static PyObject *__pyx_n_s_np;
1528 static PyObject *__pyx_n_s_numpy;
1529 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
1530 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
1531 static PyObject *__pyx_n_s_order;
1532 static PyObject *__pyx_n_s_ovr;
1533 static PyObject *__pyx_n_s_ovr1;
1534 static PyObject *__pyx_n_s_ovr2;
1535 static PyObject *__pyx_n_s_range;
1536 static PyObject *__pyx_n_s_scores;
1537 static PyObject *__pyx_n_s_suppressed;
1538 static PyObject *__pyx_n_s_test;
1539 static PyObject *__pyx_n_s_thresh;
1540 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
1541 static PyObject *__pyx_n_s_w;
1542 static PyObject *__pyx_n_s_x1;
1543 static PyObject *__pyx_n_s_x2;
1544 static PyObject *__pyx_n_s_xx1;
1545 static PyObject *__pyx_n_s_xx2;
1546 static PyObject *__pyx_n_s_y1;
1547 static PyObject *__pyx_n_s_y2;
1548 static PyObject *__pyx_n_s_yy1;
1549 static PyObject *__pyx_n_s_yy2;
1550 static PyObject *__pyx_n_s_zeros;
1551 static PyObject *__pyx_pf_10cython_nms_nms(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dets, PyObject *__pyx_v_thresh); /* proto */
1552 static PyObject *__pyx_pf_10cython_nms_2nms_new(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dets, PyObject *__pyx_v_thresh); /* proto */
1553 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
1554 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
1555 static PyObject *__pyx_float_0_95;
1556 static PyObject *__pyx_int_0;
1557 static PyObject *__pyx_int_1;
1558 static PyObject *__pyx_int_2;
1559 static PyObject *__pyx_int_3;
1560 static PyObject *__pyx_int_4;
1561 static PyObject *__pyx_int_neg_1;
1562 static PyObject *__pyx_slice_;
1563 static PyObject *__pyx_slice__3;
1564 static PyObject *__pyx_slice__5;
1565 static PyObject *__pyx_slice__7;
1566 static PyObject *__pyx_slice__9;
1567 static PyObject *__pyx_tuple__2;
1568 static PyObject *__pyx_tuple__4;
1569 static PyObject *__pyx_tuple__6;
1570 static PyObject *__pyx_tuple__8;
1571 static PyObject *__pyx_slice__11;
1572 static PyObject *__pyx_slice__12;
1573 static PyObject *__pyx_slice__14;
1574 static PyObject *__pyx_slice__16;
1575 static PyObject *__pyx_slice__18;
1576 static PyObject *__pyx_slice__20;
1577 static PyObject *__pyx_slice__22;
1578 static PyObject *__pyx_tuple__10;
1579 static PyObject *__pyx_tuple__13;
1580 static PyObject *__pyx_tuple__15;
1581 static PyObject *__pyx_tuple__17;
1582 static PyObject *__pyx_tuple__19;
1583 static PyObject *__pyx_tuple__21;
1584 static PyObject *__pyx_tuple__23;
1585 static PyObject *__pyx_tuple__24;
1586 static PyObject *__pyx_tuple__25;
1587 static PyObject *__pyx_tuple__26;
1588 static PyObject *__pyx_tuple__27;
1589 static PyObject *__pyx_tuple__28;
1590 static PyObject *__pyx_tuple__29;
1591 static PyObject *__pyx_tuple__30;
1592 static PyObject *__pyx_tuple__31;
1593 static PyObject *__pyx_tuple__32;
1594 static PyObject *__pyx_tuple__34;
1595 static PyObject *__pyx_codeobj__33;
1596 static PyObject *__pyx_codeobj__35;
1597
1598 /* "nms.pyx":11
1599  * cimport numpy as np
1600  * 
1601  * cdef inline np.float32_t max(np.float32_t a, np.float32_t b):             # <<<<<<<<<<<<<<
1602  *     return a if a >= b else b
1603  * 
1604  */
1605
1606 static CYTHON_INLINE __pyx_t_5numpy_float32_t __pyx_f_10cython_nms_max(__pyx_t_5numpy_float32_t __pyx_v_a, __pyx_t_5numpy_float32_t __pyx_v_b) {
1607   __pyx_t_5numpy_float32_t __pyx_r;
1608   __Pyx_RefNannyDeclarations
1609   __pyx_t_5numpy_float32_t __pyx_t_1;
1610   __Pyx_RefNannySetupContext("max", 0);
1611
1612   /* "nms.pyx":12
1613  * 
1614  * cdef inline np.float32_t max(np.float32_t a, np.float32_t b):
1615  *     return a if a >= b else b             # <<<<<<<<<<<<<<
1616  * 
1617  * cdef inline np.float32_t min(np.float32_t a, np.float32_t b):
1618  */
1619   if (((__pyx_v_a >= __pyx_v_b) != 0)) {
1620     __pyx_t_1 = __pyx_v_a;
1621   } else {
1622     __pyx_t_1 = __pyx_v_b;
1623   }
1624   __pyx_r = __pyx_t_1;
1625   goto __pyx_L0;
1626
1627   /* "nms.pyx":11
1628  * cimport numpy as np
1629  * 
1630  * cdef inline np.float32_t max(np.float32_t a, np.float32_t b):             # <<<<<<<<<<<<<<
1631  *     return a if a >= b else b
1632  * 
1633  */
1634
1635   /* function exit code */
1636   __pyx_L0:;
1637   __Pyx_RefNannyFinishContext();
1638   return __pyx_r;
1639 }
1640
1641 /* "nms.pyx":14
1642  *     return a if a >= b else b
1643  * 
1644  * cdef inline np.float32_t min(np.float32_t a, np.float32_t b):             # <<<<<<<<<<<<<<
1645  *     return a if a <= b else b
1646  * 
1647  */
1648
1649 static CYTHON_INLINE __pyx_t_5numpy_float32_t __pyx_f_10cython_nms_min(__pyx_t_5numpy_float32_t __pyx_v_a, __pyx_t_5numpy_float32_t __pyx_v_b) {
1650   __pyx_t_5numpy_float32_t __pyx_r;
1651   __Pyx_RefNannyDeclarations
1652   __pyx_t_5numpy_float32_t __pyx_t_1;
1653   __Pyx_RefNannySetupContext("min", 0);
1654
1655   /* "nms.pyx":15
1656  * 
1657  * cdef inline np.float32_t min(np.float32_t a, np.float32_t b):
1658  *     return a if a <= b else b             # <<<<<<<<<<<<<<
1659  * 
1660  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
1661  */
1662   if (((__pyx_v_a <= __pyx_v_b) != 0)) {
1663     __pyx_t_1 = __pyx_v_a;
1664   } else {
1665     __pyx_t_1 = __pyx_v_b;
1666   }
1667   __pyx_r = __pyx_t_1;
1668   goto __pyx_L0;
1669
1670   /* "nms.pyx":14
1671  *     return a if a >= b else b
1672  * 
1673  * cdef inline np.float32_t min(np.float32_t a, np.float32_t b):             # <<<<<<<<<<<<<<
1674  *     return a if a <= b else b
1675  * 
1676  */
1677
1678   /* function exit code */
1679   __pyx_L0:;
1680   __Pyx_RefNannyFinishContext();
1681   return __pyx_r;
1682 }
1683
1684 /* "nms.pyx":17
1685  *     return a if a <= b else b
1686  * 
1687  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):             # <<<<<<<<<<<<<<
1688  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
1689  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
1690  */
1691
1692 /* Python wrapper */
1693 static PyObject *__pyx_pw_10cython_nms_1nms(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1694 static PyMethodDef __pyx_mdef_10cython_nms_1nms = {"nms", (PyCFunction)__pyx_pw_10cython_nms_1nms, METH_VARARGS|METH_KEYWORDS, 0};
1695 static PyObject *__pyx_pw_10cython_nms_1nms(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1696   PyArrayObject *__pyx_v_dets = 0;
1697   PyObject *__pyx_v_thresh = 0;
1698   PyObject *__pyx_r = 0;
1699   __Pyx_RefNannyDeclarations
1700   __Pyx_RefNannySetupContext("nms (wrapper)", 0);
1701   {
1702     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dets,&__pyx_n_s_thresh,0};
1703     PyObject* values[2] = {0,0};
1704     if (unlikely(__pyx_kwds)) {
1705       Py_ssize_t kw_args;
1706       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1707       switch (pos_args) {
1708         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1709         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1710         case  0: break;
1711         default: goto __pyx_L5_argtuple_error;
1712       }
1713       kw_args = PyDict_Size(__pyx_kwds);
1714       switch (pos_args) {
1715         case  0:
1716         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dets)) != 0)) kw_args--;
1717         else goto __pyx_L5_argtuple_error;
1718         case  1:
1719         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_thresh)) != 0)) kw_args--;
1720         else {
1721           __Pyx_RaiseArgtupleInvalid("nms", 1, 2, 2, 1); __PYX_ERR(0, 17, __pyx_L3_error)
1722         }
1723       }
1724       if (unlikely(kw_args > 0)) {
1725         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nms") < 0)) __PYX_ERR(0, 17, __pyx_L3_error)
1726       }
1727     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
1728       goto __pyx_L5_argtuple_error;
1729     } else {
1730       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1731       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1732     }
1733     __pyx_v_dets = ((PyArrayObject *)values[0]);
1734     __pyx_v_thresh = ((PyObject*)values[1]);
1735   }
1736   goto __pyx_L4_argument_unpacking_done;
1737   __pyx_L5_argtuple_error:;
1738   __Pyx_RaiseArgtupleInvalid("nms", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17, __pyx_L3_error)
1739   __pyx_L3_error:;
1740   __Pyx_AddTraceback("cython_nms.nms", __pyx_clineno, __pyx_lineno, __pyx_filename);
1741   __Pyx_RefNannyFinishContext();
1742   return NULL;
1743   __pyx_L4_argument_unpacking_done:;
1744   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dets), __pyx_ptype_5numpy_ndarray, 1, "dets", 0))) __PYX_ERR(0, 17, __pyx_L1_error)
1745   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_thresh), (&PyFloat_Type), 1, "thresh", 1))) __PYX_ERR(0, 17, __pyx_L1_error)
1746   __pyx_r = __pyx_pf_10cython_nms_nms(__pyx_self, __pyx_v_dets, __pyx_v_thresh);
1747
1748   /* function exit code */
1749   goto __pyx_L0;
1750   __pyx_L1_error:;
1751   __pyx_r = NULL;
1752   __pyx_L0:;
1753   __Pyx_RefNannyFinishContext();
1754   return __pyx_r;
1755 }
1756
1757 static PyObject *__pyx_pf_10cython_nms_nms(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dets, PyObject *__pyx_v_thresh) {
1758   PyArrayObject *__pyx_v_x1 = 0;
1759   PyArrayObject *__pyx_v_y1 = 0;
1760   PyArrayObject *__pyx_v_x2 = 0;
1761   PyArrayObject *__pyx_v_y2 = 0;
1762   PyArrayObject *__pyx_v_scores = 0;
1763   PyArrayObject *__pyx_v_areas = 0;
1764   PyArrayObject *__pyx_v_order = 0;
1765   int __pyx_v_ndets;
1766   PyArrayObject *__pyx_v_suppressed = 0;
1767   int __pyx_v__i;
1768   int __pyx_v__j;
1769   int __pyx_v_i;
1770   int __pyx_v_j;
1771   __pyx_t_5numpy_float32_t __pyx_v_ix1;
1772   __pyx_t_5numpy_float32_t __pyx_v_iy1;
1773   __pyx_t_5numpy_float32_t __pyx_v_ix2;
1774   __pyx_t_5numpy_float32_t __pyx_v_iy2;
1775   __pyx_t_5numpy_float32_t __pyx_v_iarea;
1776   __pyx_t_5numpy_float32_t __pyx_v_xx1;
1777   __pyx_t_5numpy_float32_t __pyx_v_yy1;
1778   __pyx_t_5numpy_float32_t __pyx_v_xx2;
1779   __pyx_t_5numpy_float32_t __pyx_v_yy2;
1780   __pyx_t_5numpy_float32_t __pyx_v_w;
1781   __pyx_t_5numpy_float32_t __pyx_v_h;
1782   __pyx_t_5numpy_float32_t __pyx_v_inter;
1783   __pyx_t_5numpy_float32_t __pyx_v_ovr;
1784   PyObject *__pyx_v_keep = NULL;
1785   __Pyx_LocalBuf_ND __pyx_pybuffernd_areas;
1786   __Pyx_Buffer __pyx_pybuffer_areas;
1787   __Pyx_LocalBuf_ND __pyx_pybuffernd_dets;
1788   __Pyx_Buffer __pyx_pybuffer_dets;
1789   __Pyx_LocalBuf_ND __pyx_pybuffernd_order;
1790   __Pyx_Buffer __pyx_pybuffer_order;
1791   __Pyx_LocalBuf_ND __pyx_pybuffernd_scores;
1792   __Pyx_Buffer __pyx_pybuffer_scores;
1793   __Pyx_LocalBuf_ND __pyx_pybuffernd_suppressed;
1794   __Pyx_Buffer __pyx_pybuffer_suppressed;
1795   __Pyx_LocalBuf_ND __pyx_pybuffernd_x1;
1796   __Pyx_Buffer __pyx_pybuffer_x1;
1797   __Pyx_LocalBuf_ND __pyx_pybuffernd_x2;
1798   __Pyx_Buffer __pyx_pybuffer_x2;
1799   __Pyx_LocalBuf_ND __pyx_pybuffernd_y1;
1800   __Pyx_Buffer __pyx_pybuffer_y1;
1801   __Pyx_LocalBuf_ND __pyx_pybuffernd_y2;
1802   __Pyx_Buffer __pyx_pybuffer_y2;
1803   PyObject *__pyx_r = NULL;
1804   __Pyx_RefNannyDeclarations
1805   PyObject *__pyx_t_1 = NULL;
1806   PyArrayObject *__pyx_t_2 = NULL;
1807   PyArrayObject *__pyx_t_3 = NULL;
1808   PyArrayObject *__pyx_t_4 = NULL;
1809   PyArrayObject *__pyx_t_5 = NULL;
1810   PyArrayObject *__pyx_t_6 = NULL;
1811   PyObject *__pyx_t_7 = NULL;
1812   PyObject *__pyx_t_8 = NULL;
1813   PyArrayObject *__pyx_t_9 = NULL;
1814   PyArrayObject *__pyx_t_10 = NULL;
1815   PyObject *__pyx_t_11 = NULL;
1816   PyObject *__pyx_t_12 = NULL;
1817   PyArrayObject *__pyx_t_13 = NULL;
1818   int __pyx_t_14;
1819   int __pyx_t_15;
1820   Py_ssize_t __pyx_t_16;
1821   int __pyx_t_17;
1822   Py_ssize_t __pyx_t_18;
1823   int __pyx_t_19;
1824   int __pyx_t_20;
1825   Py_ssize_t __pyx_t_21;
1826   Py_ssize_t __pyx_t_22;
1827   Py_ssize_t __pyx_t_23;
1828   Py_ssize_t __pyx_t_24;
1829   Py_ssize_t __pyx_t_25;
1830   int __pyx_t_26;
1831   Py_ssize_t __pyx_t_27;
1832   int __pyx_t_28;
1833   Py_ssize_t __pyx_t_29;
1834   Py_ssize_t __pyx_t_30;
1835   Py_ssize_t __pyx_t_31;
1836   Py_ssize_t __pyx_t_32;
1837   Py_ssize_t __pyx_t_33;
1838   Py_ssize_t __pyx_t_34;
1839   __pyx_t_5numpy_float32_t __pyx_t_35;
1840   Py_ssize_t __pyx_t_36;
1841   __Pyx_RefNannySetupContext("nms", 0);
1842   __pyx_pybuffer_x1.pybuffer.buf = NULL;
1843   __pyx_pybuffer_x1.refcount = 0;
1844   __pyx_pybuffernd_x1.data = NULL;
1845   __pyx_pybuffernd_x1.rcbuffer = &__pyx_pybuffer_x1;
1846   __pyx_pybuffer_y1.pybuffer.buf = NULL;
1847   __pyx_pybuffer_y1.refcount = 0;
1848   __pyx_pybuffernd_y1.data = NULL;
1849   __pyx_pybuffernd_y1.rcbuffer = &__pyx_pybuffer_y1;
1850   __pyx_pybuffer_x2.pybuffer.buf = NULL;
1851   __pyx_pybuffer_x2.refcount = 0;
1852   __pyx_pybuffernd_x2.data = NULL;
1853   __pyx_pybuffernd_x2.rcbuffer = &__pyx_pybuffer_x2;
1854   __pyx_pybuffer_y2.pybuffer.buf = NULL;
1855   __pyx_pybuffer_y2.refcount = 0;
1856   __pyx_pybuffernd_y2.data = NULL;
1857   __pyx_pybuffernd_y2.rcbuffer = &__pyx_pybuffer_y2;
1858   __pyx_pybuffer_scores.pybuffer.buf = NULL;
1859   __pyx_pybuffer_scores.refcount = 0;
1860   __pyx_pybuffernd_scores.data = NULL;
1861   __pyx_pybuffernd_scores.rcbuffer = &__pyx_pybuffer_scores;
1862   __pyx_pybuffer_areas.pybuffer.buf = NULL;
1863   __pyx_pybuffer_areas.refcount = 0;
1864   __pyx_pybuffernd_areas.data = NULL;
1865   __pyx_pybuffernd_areas.rcbuffer = &__pyx_pybuffer_areas;
1866   __pyx_pybuffer_order.pybuffer.buf = NULL;
1867   __pyx_pybuffer_order.refcount = 0;
1868   __pyx_pybuffernd_order.data = NULL;
1869   __pyx_pybuffernd_order.rcbuffer = &__pyx_pybuffer_order;
1870   __pyx_pybuffer_suppressed.pybuffer.buf = NULL;
1871   __pyx_pybuffer_suppressed.refcount = 0;
1872   __pyx_pybuffernd_suppressed.data = NULL;
1873   __pyx_pybuffernd_suppressed.rcbuffer = &__pyx_pybuffer_suppressed;
1874   __pyx_pybuffer_dets.pybuffer.buf = NULL;
1875   __pyx_pybuffer_dets.refcount = 0;
1876   __pyx_pybuffernd_dets.data = NULL;
1877   __pyx_pybuffernd_dets.rcbuffer = &__pyx_pybuffer_dets;
1878   {
1879     __Pyx_BufFmt_StackElem __pyx_stack[1];
1880     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dets.rcbuffer->pybuffer, (PyObject*)__pyx_v_dets, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 17, __pyx_L1_error)
1881   }
1882   __pyx_pybuffernd_dets.diminfo[0].strides = __pyx_pybuffernd_dets.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dets.diminfo[0].shape = __pyx_pybuffernd_dets.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_dets.diminfo[1].strides = __pyx_pybuffernd_dets.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_dets.diminfo[1].shape = __pyx_pybuffernd_dets.rcbuffer->pybuffer.shape[1];
1883
1884   /* "nms.pyx":18
1885  * 
1886  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
1887  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]             # <<<<<<<<<<<<<<
1888  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
1889  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
1890  */
1891   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
1892   __Pyx_GOTREF(__pyx_t_1);
1893   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 18, __pyx_L1_error)
1894   __pyx_t_2 = ((PyArrayObject *)__pyx_t_1);
1895   {
1896     __Pyx_BufFmt_StackElem __pyx_stack[1];
1897     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x1.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
1898       __pyx_v_x1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_x1.rcbuffer->pybuffer.buf = NULL;
1899       __PYX_ERR(0, 18, __pyx_L1_error)
1900     } else {__pyx_pybuffernd_x1.diminfo[0].strides = __pyx_pybuffernd_x1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x1.diminfo[0].shape = __pyx_pybuffernd_x1.rcbuffer->pybuffer.shape[0];
1901     }
1902   }
1903   __pyx_t_2 = 0;
1904   __pyx_v_x1 = ((PyArrayObject *)__pyx_t_1);
1905   __pyx_t_1 = 0;
1906
1907   /* "nms.pyx":19
1908  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
1909  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
1910  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]             # <<<<<<<<<<<<<<
1911  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
1912  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
1913  */
1914   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
1915   __Pyx_GOTREF(__pyx_t_1);
1916   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 19, __pyx_L1_error)
1917   __pyx_t_3 = ((PyArrayObject *)__pyx_t_1);
1918   {
1919     __Pyx_BufFmt_StackElem __pyx_stack[1];
1920     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
1921       __pyx_v_y1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_y1.rcbuffer->pybuffer.buf = NULL;
1922       __PYX_ERR(0, 19, __pyx_L1_error)
1923     } else {__pyx_pybuffernd_y1.diminfo[0].strides = __pyx_pybuffernd_y1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y1.diminfo[0].shape = __pyx_pybuffernd_y1.rcbuffer->pybuffer.shape[0];
1924     }
1925   }
1926   __pyx_t_3 = 0;
1927   __pyx_v_y1 = ((PyArrayObject *)__pyx_t_1);
1928   __pyx_t_1 = 0;
1929
1930   /* "nms.pyx":20
1931  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
1932  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
1933  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]             # <<<<<<<<<<<<<<
1934  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
1935  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
1936  */
1937   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
1938   __Pyx_GOTREF(__pyx_t_1);
1939   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 20, __pyx_L1_error)
1940   __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
1941   {
1942     __Pyx_BufFmt_StackElem __pyx_stack[1];
1943     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x2.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
1944       __pyx_v_x2 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_x2.rcbuffer->pybuffer.buf = NULL;
1945       __PYX_ERR(0, 20, __pyx_L1_error)
1946     } else {__pyx_pybuffernd_x2.diminfo[0].strides = __pyx_pybuffernd_x2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x2.diminfo[0].shape = __pyx_pybuffernd_x2.rcbuffer->pybuffer.shape[0];
1947     }
1948   }
1949   __pyx_t_4 = 0;
1950   __pyx_v_x2 = ((PyArrayObject *)__pyx_t_1);
1951   __pyx_t_1 = 0;
1952
1953   /* "nms.pyx":21
1954  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
1955  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
1956  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]             # <<<<<<<<<<<<<<
1957  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
1958  * 
1959  */
1960   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
1961   __Pyx_GOTREF(__pyx_t_1);
1962   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 21, __pyx_L1_error)
1963   __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
1964   {
1965     __Pyx_BufFmt_StackElem __pyx_stack[1];
1966     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y2.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
1967       __pyx_v_y2 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_y2.rcbuffer->pybuffer.buf = NULL;
1968       __PYX_ERR(0, 21, __pyx_L1_error)
1969     } else {__pyx_pybuffernd_y2.diminfo[0].strides = __pyx_pybuffernd_y2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y2.diminfo[0].shape = __pyx_pybuffernd_y2.rcbuffer->pybuffer.shape[0];
1970     }
1971   }
1972   __pyx_t_5 = 0;
1973   __pyx_v_y2 = ((PyArrayObject *)__pyx_t_1);
1974   __pyx_t_1 = 0;
1975
1976   /* "nms.pyx":22
1977  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
1978  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
1979  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]             # <<<<<<<<<<<<<<
1980  * 
1981  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)
1982  */
1983   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
1984   __Pyx_GOTREF(__pyx_t_1);
1985   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 22, __pyx_L1_error)
1986   __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
1987   {
1988     __Pyx_BufFmt_StackElem __pyx_stack[1];
1989     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_scores.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
1990       __pyx_v_scores = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_scores.rcbuffer->pybuffer.buf = NULL;
1991       __PYX_ERR(0, 22, __pyx_L1_error)
1992     } else {__pyx_pybuffernd_scores.diminfo[0].strides = __pyx_pybuffernd_scores.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_scores.diminfo[0].shape = __pyx_pybuffernd_scores.rcbuffer->pybuffer.shape[0];
1993     }
1994   }
1995   __pyx_t_6 = 0;
1996   __pyx_v_scores = ((PyArrayObject *)__pyx_t_1);
1997   __pyx_t_1 = 0;
1998
1999   /* "nms.pyx":24
2000  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
2001  * 
2002  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)             # <<<<<<<<<<<<<<
2003  *     cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]
2004  * 
2005  */
2006   __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_x2), ((PyObject *)__pyx_v_x1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
2007   __Pyx_GOTREF(__pyx_t_1);
2008   __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24, __pyx_L1_error)
2009   __Pyx_GOTREF(__pyx_t_7);
2010   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2011   __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_y2), ((PyObject *)__pyx_v_y1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
2012   __Pyx_GOTREF(__pyx_t_1);
2013   __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 24, __pyx_L1_error)
2014   __Pyx_GOTREF(__pyx_t_8);
2015   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2016   __pyx_t_1 = PyNumber_Multiply(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
2017   __Pyx_GOTREF(__pyx_t_1);
2018   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2019   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2020   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 24, __pyx_L1_error)
2021   __pyx_t_9 = ((PyArrayObject *)__pyx_t_1);
2022   {
2023     __Pyx_BufFmt_StackElem __pyx_stack[1];
2024     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_areas.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
2025       __pyx_v_areas = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_areas.rcbuffer->pybuffer.buf = NULL;
2026       __PYX_ERR(0, 24, __pyx_L1_error)
2027     } else {__pyx_pybuffernd_areas.diminfo[0].strides = __pyx_pybuffernd_areas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_areas.diminfo[0].shape = __pyx_pybuffernd_areas.rcbuffer->pybuffer.shape[0];
2028     }
2029   }
2030   __pyx_t_9 = 0;
2031   __pyx_v_areas = ((PyArrayObject *)__pyx_t_1);
2032   __pyx_t_1 = 0;
2033
2034   /* "nms.pyx":25
2035  * 
2036  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)
2037  *     cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]             # <<<<<<<<<<<<<<
2038  * 
2039  *     cdef int ndets = dets.shape[0]
2040  */
2041   __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_scores), __pyx_n_s_argsort); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 25, __pyx_L1_error)
2042   __Pyx_GOTREF(__pyx_t_8);
2043   __pyx_t_7 = NULL;
2044   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
2045     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
2046     if (likely(__pyx_t_7)) {
2047       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
2048       __Pyx_INCREF(__pyx_t_7);
2049       __Pyx_INCREF(function);
2050       __Pyx_DECREF_SET(__pyx_t_8, function);
2051     }
2052   }
2053   if (__pyx_t_7) {
2054     __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
2055     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2056   } else {
2057     __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
2058   }
2059   __Pyx_GOTREF(__pyx_t_1);
2060   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2061   __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_slice__11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 25, __pyx_L1_error)
2062   __Pyx_GOTREF(__pyx_t_8);
2063   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2064   if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 25, __pyx_L1_error)
2065   __pyx_t_10 = ((PyArrayObject *)__pyx_t_8);
2066   {
2067     __Pyx_BufFmt_StackElem __pyx_stack[1];
2068     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_order.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
2069       __pyx_v_order = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_order.rcbuffer->pybuffer.buf = NULL;
2070       __PYX_ERR(0, 25, __pyx_L1_error)
2071     } else {__pyx_pybuffernd_order.diminfo[0].strides = __pyx_pybuffernd_order.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_order.diminfo[0].shape = __pyx_pybuffernd_order.rcbuffer->pybuffer.shape[0];
2072     }
2073   }
2074   __pyx_t_10 = 0;
2075   __pyx_v_order = ((PyArrayObject *)__pyx_t_8);
2076   __pyx_t_8 = 0;
2077
2078   /* "nms.pyx":27
2079  *     cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]
2080  * 
2081  *     cdef int ndets = dets.shape[0]             # <<<<<<<<<<<<<<
2082  *     cdef np.ndarray[np.int_t, ndim=1] suppressed = \
2083  *             np.zeros((ndets), dtype=np.int)
2084  */
2085   __pyx_v_ndets = (__pyx_v_dets->dimensions[0]);
2086
2087   /* "nms.pyx":29
2088  *     cdef int ndets = dets.shape[0]
2089  *     cdef np.ndarray[np.int_t, ndim=1] suppressed = \
2090  *             np.zeros((ndets), dtype=np.int)             # <<<<<<<<<<<<<<
2091  * 
2092  *     # nominal indices
2093  */
2094   __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L1_error)
2095   __Pyx_GOTREF(__pyx_t_8);
2096   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
2097   __Pyx_GOTREF(__pyx_t_1);
2098   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2099   __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ndets); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L1_error)
2100   __Pyx_GOTREF(__pyx_t_8);
2101   __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29, __pyx_L1_error)
2102   __Pyx_GOTREF(__pyx_t_7);
2103   __Pyx_GIVEREF(__pyx_t_8);
2104   PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
2105   __pyx_t_8 = 0;
2106   __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29, __pyx_L1_error)
2107   __Pyx_GOTREF(__pyx_t_8);
2108   __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 29, __pyx_L1_error)
2109   __Pyx_GOTREF(__pyx_t_11);
2110   __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 29, __pyx_L1_error)
2111   __Pyx_GOTREF(__pyx_t_12);
2112   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
2113   if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_12) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
2114   __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
2115   __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 29, __pyx_L1_error)
2116   __Pyx_GOTREF(__pyx_t_12);
2117   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2118   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2119   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2120   if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 29, __pyx_L1_error)
2121   __pyx_t_13 = ((PyArrayObject *)__pyx_t_12);
2122   {
2123     __Pyx_BufFmt_StackElem __pyx_stack[1];
2124     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_suppressed.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
2125       __pyx_v_suppressed = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.buf = NULL;
2126       __PYX_ERR(0, 28, __pyx_L1_error)
2127     } else {__pyx_pybuffernd_suppressed.diminfo[0].strides = __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_suppressed.diminfo[0].shape = __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.shape[0];
2128     }
2129   }
2130   __pyx_t_13 = 0;
2131   __pyx_v_suppressed = ((PyArrayObject *)__pyx_t_12);
2132   __pyx_t_12 = 0;
2133
2134   /* "nms.pyx":42
2135  *     cdef np.float32_t inter, ovr
2136  * 
2137  *     keep = []             # <<<<<<<<<<<<<<
2138  *     for _i in range(ndets):
2139  *         i = order[_i]
2140  */
2141   __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 42, __pyx_L1_error)
2142   __Pyx_GOTREF(__pyx_t_12);
2143   __pyx_v_keep = ((PyObject*)__pyx_t_12);
2144   __pyx_t_12 = 0;
2145
2146   /* "nms.pyx":43
2147  * 
2148  *     keep = []
2149  *     for _i in range(ndets):             # <<<<<<<<<<<<<<
2150  *         i = order[_i]
2151  *         if suppressed[i] == 1:
2152  */
2153   __pyx_t_14 = __pyx_v_ndets;
2154   for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
2155     __pyx_v__i = __pyx_t_15;
2156
2157     /* "nms.pyx":44
2158  *     keep = []
2159  *     for _i in range(ndets):
2160  *         i = order[_i]             # <<<<<<<<<<<<<<
2161  *         if suppressed[i] == 1:
2162  *             continue
2163  */
2164     __pyx_t_16 = __pyx_v__i;
2165     __pyx_t_17 = -1;
2166     if (__pyx_t_16 < 0) {
2167       __pyx_t_16 += __pyx_pybuffernd_order.diminfo[0].shape;
2168       if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 0;
2169     } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_order.diminfo[0].shape)) __pyx_t_17 = 0;
2170     if (unlikely(__pyx_t_17 != -1)) {
2171       __Pyx_RaiseBufferIndexError(__pyx_t_17);
2172       __PYX_ERR(0, 44, __pyx_L1_error)
2173     }
2174     __pyx_v_i = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_order.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_order.diminfo[0].strides));
2175
2176     /* "nms.pyx":45
2177  *     for _i in range(ndets):
2178  *         i = order[_i]
2179  *         if suppressed[i] == 1:             # <<<<<<<<<<<<<<
2180  *             continue
2181  *         keep.append(i)
2182  */
2183     __pyx_t_18 = __pyx_v_i;
2184     __pyx_t_17 = -1;
2185     if (__pyx_t_18 < 0) {
2186       __pyx_t_18 += __pyx_pybuffernd_suppressed.diminfo[0].shape;
2187       if (unlikely(__pyx_t_18 < 0)) __pyx_t_17 = 0;
2188     } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_suppressed.diminfo[0].shape)) __pyx_t_17 = 0;
2189     if (unlikely(__pyx_t_17 != -1)) {
2190       __Pyx_RaiseBufferIndexError(__pyx_t_17);
2191       __PYX_ERR(0, 45, __pyx_L1_error)
2192     }
2193     __pyx_t_19 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_suppressed.diminfo[0].strides)) == 1) != 0);
2194     if (__pyx_t_19) {
2195
2196       /* "nms.pyx":46
2197  *         i = order[_i]
2198  *         if suppressed[i] == 1:
2199  *             continue             # <<<<<<<<<<<<<<
2200  *         keep.append(i)
2201  *         ix1 = x1[i]
2202  */
2203       goto __pyx_L3_continue;
2204
2205       /* "nms.pyx":45
2206  *     for _i in range(ndets):
2207  *         i = order[_i]
2208  *         if suppressed[i] == 1:             # <<<<<<<<<<<<<<
2209  *             continue
2210  *         keep.append(i)
2211  */
2212     }
2213
2214     /* "nms.pyx":47
2215  *         if suppressed[i] == 1:
2216  *             continue
2217  *         keep.append(i)             # <<<<<<<<<<<<<<
2218  *         ix1 = x1[i]
2219  *         iy1 = y1[i]
2220  */
2221     __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 47, __pyx_L1_error)
2222     __Pyx_GOTREF(__pyx_t_12);
2223     __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_keep, __pyx_t_12); if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 47, __pyx_L1_error)
2224     __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
2225
2226     /* "nms.pyx":48
2227  *             continue
2228  *         keep.append(i)
2229  *         ix1 = x1[i]             # <<<<<<<<<<<<<<
2230  *         iy1 = y1[i]
2231  *         ix2 = x2[i]
2232  */
2233     __pyx_t_21 = __pyx_v_i;
2234     __pyx_t_17 = -1;
2235     if (__pyx_t_21 < 0) {
2236       __pyx_t_21 += __pyx_pybuffernd_x1.diminfo[0].shape;
2237       if (unlikely(__pyx_t_21 < 0)) __pyx_t_17 = 0;
2238     } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_x1.diminfo[0].shape)) __pyx_t_17 = 0;
2239     if (unlikely(__pyx_t_17 != -1)) {
2240       __Pyx_RaiseBufferIndexError(__pyx_t_17);
2241       __PYX_ERR(0, 48, __pyx_L1_error)
2242     }
2243     __pyx_v_ix1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_x1.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_x1.diminfo[0].strides));
2244
2245     /* "nms.pyx":49
2246  *         keep.append(i)
2247  *         ix1 = x1[i]
2248  *         iy1 = y1[i]             # <<<<<<<<<<<<<<
2249  *         ix2 = x2[i]
2250  *         iy2 = y2[i]
2251  */
2252     __pyx_t_22 = __pyx_v_i;
2253     __pyx_t_17 = -1;
2254     if (__pyx_t_22 < 0) {
2255       __pyx_t_22 += __pyx_pybuffernd_y1.diminfo[0].shape;
2256       if (unlikely(__pyx_t_22 < 0)) __pyx_t_17 = 0;
2257     } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_y1.diminfo[0].shape)) __pyx_t_17 = 0;
2258     if (unlikely(__pyx_t_17 != -1)) {
2259       __Pyx_RaiseBufferIndexError(__pyx_t_17);
2260       __PYX_ERR(0, 49, __pyx_L1_error)
2261     }
2262     __pyx_v_iy1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_y1.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y1.diminfo[0].strides));
2263
2264     /* "nms.pyx":50
2265  *         ix1 = x1[i]
2266  *         iy1 = y1[i]
2267  *         ix2 = x2[i]             # <<<<<<<<<<<<<<
2268  *         iy2 = y2[i]
2269  *         iarea = areas[i]
2270  */
2271     __pyx_t_23 = __pyx_v_i;
2272     __pyx_t_17 = -1;
2273     if (__pyx_t_23 < 0) {
2274       __pyx_t_23 += __pyx_pybuffernd_x2.diminfo[0].shape;
2275       if (unlikely(__pyx_t_23 < 0)) __pyx_t_17 = 0;
2276     } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_x2.diminfo[0].shape)) __pyx_t_17 = 0;
2277     if (unlikely(__pyx_t_17 != -1)) {
2278       __Pyx_RaiseBufferIndexError(__pyx_t_17);
2279       __PYX_ERR(0, 50, __pyx_L1_error)
2280     }
2281     __pyx_v_ix2 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_x2.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_x2.diminfo[0].strides));
2282
2283     /* "nms.pyx":51
2284  *         iy1 = y1[i]
2285  *         ix2 = x2[i]
2286  *         iy2 = y2[i]             # <<<<<<<<<<<<<<
2287  *         iarea = areas[i]
2288  *         for _j in range(_i + 1, ndets):
2289  */
2290     __pyx_t_24 = __pyx_v_i;
2291     __pyx_t_17 = -1;
2292     if (__pyx_t_24 < 0) {
2293       __pyx_t_24 += __pyx_pybuffernd_y2.diminfo[0].shape;
2294       if (unlikely(__pyx_t_24 < 0)) __pyx_t_17 = 0;
2295     } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_y2.diminfo[0].shape)) __pyx_t_17 = 0;
2296     if (unlikely(__pyx_t_17 != -1)) {
2297       __Pyx_RaiseBufferIndexError(__pyx_t_17);
2298       __PYX_ERR(0, 51, __pyx_L1_error)
2299     }
2300     __pyx_v_iy2 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_y2.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y2.diminfo[0].strides));
2301
2302     /* "nms.pyx":52
2303  *         ix2 = x2[i]
2304  *         iy2 = y2[i]
2305  *         iarea = areas[i]             # <<<<<<<<<<<<<<
2306  *         for _j in range(_i + 1, ndets):
2307  *             j = order[_j]
2308  */
2309     __pyx_t_25 = __pyx_v_i;
2310     __pyx_t_17 = -1;
2311     if (__pyx_t_25 < 0) {
2312       __pyx_t_25 += __pyx_pybuffernd_areas.diminfo[0].shape;
2313       if (unlikely(__pyx_t_25 < 0)) __pyx_t_17 = 0;
2314     } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_areas.diminfo[0].shape)) __pyx_t_17 = 0;
2315     if (unlikely(__pyx_t_17 != -1)) {
2316       __Pyx_RaiseBufferIndexError(__pyx_t_17);
2317       __PYX_ERR(0, 52, __pyx_L1_error)
2318     }
2319     __pyx_v_iarea = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_areas.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_areas.diminfo[0].strides));
2320
2321     /* "nms.pyx":53
2322  *         iy2 = y2[i]
2323  *         iarea = areas[i]
2324  *         for _j in range(_i + 1, ndets):             # <<<<<<<<<<<<<<
2325  *             j = order[_j]
2326  *             if suppressed[j] == 1:
2327  */
2328     __pyx_t_17 = __pyx_v_ndets;
2329     for (__pyx_t_26 = (__pyx_v__i + 1); __pyx_t_26 < __pyx_t_17; __pyx_t_26+=1) {
2330       __pyx_v__j = __pyx_t_26;
2331
2332       /* "nms.pyx":54
2333  *         iarea = areas[i]
2334  *         for _j in range(_i + 1, ndets):
2335  *             j = order[_j]             # <<<<<<<<<<<<<<
2336  *             if suppressed[j] == 1:
2337  *                 continue
2338  */
2339       __pyx_t_27 = __pyx_v__j;
2340       __pyx_t_28 = -1;
2341       if (__pyx_t_27 < 0) {
2342         __pyx_t_27 += __pyx_pybuffernd_order.diminfo[0].shape;
2343         if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0;
2344       } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_order.diminfo[0].shape)) __pyx_t_28 = 0;
2345       if (unlikely(__pyx_t_28 != -1)) {
2346         __Pyx_RaiseBufferIndexError(__pyx_t_28);
2347         __PYX_ERR(0, 54, __pyx_L1_error)
2348       }
2349       __pyx_v_j = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_order.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_order.diminfo[0].strides));
2350
2351       /* "nms.pyx":55
2352  *         for _j in range(_i + 1, ndets):
2353  *             j = order[_j]
2354  *             if suppressed[j] == 1:             # <<<<<<<<<<<<<<
2355  *                 continue
2356  *             xx1 = max(ix1, x1[j])
2357  */
2358       __pyx_t_29 = __pyx_v_j;
2359       __pyx_t_28 = -1;
2360       if (__pyx_t_29 < 0) {
2361         __pyx_t_29 += __pyx_pybuffernd_suppressed.diminfo[0].shape;
2362         if (unlikely(__pyx_t_29 < 0)) __pyx_t_28 = 0;
2363       } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_suppressed.diminfo[0].shape)) __pyx_t_28 = 0;
2364       if (unlikely(__pyx_t_28 != -1)) {
2365         __Pyx_RaiseBufferIndexError(__pyx_t_28);
2366         __PYX_ERR(0, 55, __pyx_L1_error)
2367       }
2368       __pyx_t_19 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_suppressed.diminfo[0].strides)) == 1) != 0);
2369       if (__pyx_t_19) {
2370
2371         /* "nms.pyx":56
2372  *             j = order[_j]
2373  *             if suppressed[j] == 1:
2374  *                 continue             # <<<<<<<<<<<<<<
2375  *             xx1 = max(ix1, x1[j])
2376  *             yy1 = max(iy1, y1[j])
2377  */
2378         goto __pyx_L6_continue;
2379
2380         /* "nms.pyx":55
2381  *         for _j in range(_i + 1, ndets):
2382  *             j = order[_j]
2383  *             if suppressed[j] == 1:             # <<<<<<<<<<<<<<
2384  *                 continue
2385  *             xx1 = max(ix1, x1[j])
2386  */
2387       }
2388
2389       /* "nms.pyx":57
2390  *             if suppressed[j] == 1:
2391  *                 continue
2392  *             xx1 = max(ix1, x1[j])             # <<<<<<<<<<<<<<
2393  *             yy1 = max(iy1, y1[j])
2394  *             xx2 = min(ix2, x2[j])
2395  */
2396       __pyx_t_30 = __pyx_v_j;
2397       __pyx_t_28 = -1;
2398       if (__pyx_t_30 < 0) {
2399         __pyx_t_30 += __pyx_pybuffernd_x1.diminfo[0].shape;
2400         if (unlikely(__pyx_t_30 < 0)) __pyx_t_28 = 0;
2401       } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_x1.diminfo[0].shape)) __pyx_t_28 = 0;
2402       if (unlikely(__pyx_t_28 != -1)) {
2403         __Pyx_RaiseBufferIndexError(__pyx_t_28);
2404         __PYX_ERR(0, 57, __pyx_L1_error)
2405       }
2406       __pyx_v_xx1 = __pyx_f_10cython_nms_max(__pyx_v_ix1, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_x1.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_x1.diminfo[0].strides)));
2407
2408       /* "nms.pyx":58
2409  *                 continue
2410  *             xx1 = max(ix1, x1[j])
2411  *             yy1 = max(iy1, y1[j])             # <<<<<<<<<<<<<<
2412  *             xx2 = min(ix2, x2[j])
2413  *             yy2 = min(iy2, y2[j])
2414  */
2415       __pyx_t_31 = __pyx_v_j;
2416       __pyx_t_28 = -1;
2417       if (__pyx_t_31 < 0) {
2418         __pyx_t_31 += __pyx_pybuffernd_y1.diminfo[0].shape;
2419         if (unlikely(__pyx_t_31 < 0)) __pyx_t_28 = 0;
2420       } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_y1.diminfo[0].shape)) __pyx_t_28 = 0;
2421       if (unlikely(__pyx_t_28 != -1)) {
2422         __Pyx_RaiseBufferIndexError(__pyx_t_28);
2423         __PYX_ERR(0, 58, __pyx_L1_error)
2424       }
2425       __pyx_v_yy1 = __pyx_f_10cython_nms_max(__pyx_v_iy1, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_y1.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_y1.diminfo[0].strides)));
2426
2427       /* "nms.pyx":59
2428  *             xx1 = max(ix1, x1[j])
2429  *             yy1 = max(iy1, y1[j])
2430  *             xx2 = min(ix2, x2[j])             # <<<<<<<<<<<<<<
2431  *             yy2 = min(iy2, y2[j])
2432  *             w = max(0.0, xx2 - xx1 + 1)
2433  */
2434       __pyx_t_32 = __pyx_v_j;
2435       __pyx_t_28 = -1;
2436       if (__pyx_t_32 < 0) {
2437         __pyx_t_32 += __pyx_pybuffernd_x2.diminfo[0].shape;
2438         if (unlikely(__pyx_t_32 < 0)) __pyx_t_28 = 0;
2439       } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_x2.diminfo[0].shape)) __pyx_t_28 = 0;
2440       if (unlikely(__pyx_t_28 != -1)) {
2441         __Pyx_RaiseBufferIndexError(__pyx_t_28);
2442         __PYX_ERR(0, 59, __pyx_L1_error)
2443       }
2444       __pyx_v_xx2 = __pyx_f_10cython_nms_min(__pyx_v_ix2, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_x2.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_x2.diminfo[0].strides)));
2445
2446       /* "nms.pyx":60
2447  *             yy1 = max(iy1, y1[j])
2448  *             xx2 = min(ix2, x2[j])
2449  *             yy2 = min(iy2, y2[j])             # <<<<<<<<<<<<<<
2450  *             w = max(0.0, xx2 - xx1 + 1)
2451  *             h = max(0.0, yy2 - yy1 + 1)
2452  */
2453       __pyx_t_33 = __pyx_v_j;
2454       __pyx_t_28 = -1;
2455       if (__pyx_t_33 < 0) {
2456         __pyx_t_33 += __pyx_pybuffernd_y2.diminfo[0].shape;
2457         if (unlikely(__pyx_t_33 < 0)) __pyx_t_28 = 0;
2458       } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_y2.diminfo[0].shape)) __pyx_t_28 = 0;
2459       if (unlikely(__pyx_t_28 != -1)) {
2460         __Pyx_RaiseBufferIndexError(__pyx_t_28);
2461         __PYX_ERR(0, 60, __pyx_L1_error)
2462       }
2463       __pyx_v_yy2 = __pyx_f_10cython_nms_min(__pyx_v_iy2, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_y2.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_y2.diminfo[0].strides)));
2464
2465       /* "nms.pyx":61
2466  *             xx2 = min(ix2, x2[j])
2467  *             yy2 = min(iy2, y2[j])
2468  *             w = max(0.0, xx2 - xx1 + 1)             # <<<<<<<<<<<<<<
2469  *             h = max(0.0, yy2 - yy1 + 1)
2470  *             inter = w * h
2471  */
2472       __pyx_v_w = __pyx_f_10cython_nms_max(0.0, ((__pyx_v_xx2 - __pyx_v_xx1) + 1.0));
2473
2474       /* "nms.pyx":62
2475  *             yy2 = min(iy2, y2[j])
2476  *             w = max(0.0, xx2 - xx1 + 1)
2477  *             h = max(0.0, yy2 - yy1 + 1)             # <<<<<<<<<<<<<<
2478  *             inter = w * h
2479  *             ovr = inter / (iarea + areas[j] - inter)
2480  */
2481       __pyx_v_h = __pyx_f_10cython_nms_max(0.0, ((__pyx_v_yy2 - __pyx_v_yy1) + 1.0));
2482
2483       /* "nms.pyx":63
2484  *             w = max(0.0, xx2 - xx1 + 1)
2485  *             h = max(0.0, yy2 - yy1 + 1)
2486  *             inter = w * h             # <<<<<<<<<<<<<<
2487  *             ovr = inter / (iarea + areas[j] - inter)
2488  *             if ovr >= thresh:
2489  */
2490       __pyx_v_inter = (__pyx_v_w * __pyx_v_h);
2491
2492       /* "nms.pyx":64
2493  *             h = max(0.0, yy2 - yy1 + 1)
2494  *             inter = w * h
2495  *             ovr = inter / (iarea + areas[j] - inter)             # <<<<<<<<<<<<<<
2496  *             if ovr >= thresh:
2497  *                 suppressed[j] = 1
2498  */
2499       __pyx_t_34 = __pyx_v_j;
2500       __pyx_t_28 = -1;
2501       if (__pyx_t_34 < 0) {
2502         __pyx_t_34 += __pyx_pybuffernd_areas.diminfo[0].shape;
2503         if (unlikely(__pyx_t_34 < 0)) __pyx_t_28 = 0;
2504       } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_areas.diminfo[0].shape)) __pyx_t_28 = 0;
2505       if (unlikely(__pyx_t_28 != -1)) {
2506         __Pyx_RaiseBufferIndexError(__pyx_t_28);
2507         __PYX_ERR(0, 64, __pyx_L1_error)
2508       }
2509       __pyx_t_35 = ((__pyx_v_iarea + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_areas.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_areas.diminfo[0].strides))) - __pyx_v_inter);
2510       if (unlikely(__pyx_t_35 == 0)) {
2511         PyErr_SetString(PyExc_ZeroDivisionError, "float division");
2512         __PYX_ERR(0, 64, __pyx_L1_error)
2513       }
2514       __pyx_v_ovr = (__pyx_v_inter / __pyx_t_35);
2515
2516       /* "nms.pyx":65
2517  *             inter = w * h
2518  *             ovr = inter / (iarea + areas[j] - inter)
2519  *             if ovr >= thresh:             # <<<<<<<<<<<<<<
2520  *                 suppressed[j] = 1
2521  * 
2522  */
2523       __pyx_t_12 = PyFloat_FromDouble(__pyx_v_ovr); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 65, __pyx_L1_error)
2524       __Pyx_GOTREF(__pyx_t_12);
2525       __pyx_t_8 = PyObject_RichCompare(__pyx_t_12, __pyx_v_thresh, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 65, __pyx_L1_error)
2526       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
2527       __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 65, __pyx_L1_error)
2528       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2529       if (__pyx_t_19) {
2530
2531         /* "nms.pyx":66
2532  *             ovr = inter / (iarea + areas[j] - inter)
2533  *             if ovr >= thresh:
2534  *                 suppressed[j] = 1             # <<<<<<<<<<<<<<
2535  * 
2536  *     return keep
2537  */
2538         __pyx_t_36 = __pyx_v_j;
2539         __pyx_t_28 = -1;
2540         if (__pyx_t_36 < 0) {
2541           __pyx_t_36 += __pyx_pybuffernd_suppressed.diminfo[0].shape;
2542           if (unlikely(__pyx_t_36 < 0)) __pyx_t_28 = 0;
2543         } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_suppressed.diminfo[0].shape)) __pyx_t_28 = 0;
2544         if (unlikely(__pyx_t_28 != -1)) {
2545           __Pyx_RaiseBufferIndexError(__pyx_t_28);
2546           __PYX_ERR(0, 66, __pyx_L1_error)
2547         }
2548         *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_suppressed.diminfo[0].strides) = 1;
2549
2550         /* "nms.pyx":65
2551  *             inter = w * h
2552  *             ovr = inter / (iarea + areas[j] - inter)
2553  *             if ovr >= thresh:             # <<<<<<<<<<<<<<
2554  *                 suppressed[j] = 1
2555  * 
2556  */
2557       }
2558       __pyx_L6_continue:;
2559     }
2560     __pyx_L3_continue:;
2561   }
2562
2563   /* "nms.pyx":68
2564  *                 suppressed[j] = 1
2565  * 
2566  *     return keep             # <<<<<<<<<<<<<<
2567  * 
2568  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
2569  */
2570   __Pyx_XDECREF(__pyx_r);
2571   __Pyx_INCREF(__pyx_v_keep);
2572   __pyx_r = __pyx_v_keep;
2573   goto __pyx_L0;
2574
2575   /* "nms.pyx":17
2576  *     return a if a <= b else b
2577  * 
2578  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):             # <<<<<<<<<<<<<<
2579  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
2580  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
2581  */
2582
2583   /* function exit code */
2584   __pyx_L1_error:;
2585   __Pyx_XDECREF(__pyx_t_1);
2586   __Pyx_XDECREF(__pyx_t_7);
2587   __Pyx_XDECREF(__pyx_t_8);
2588   __Pyx_XDECREF(__pyx_t_11);
2589   __Pyx_XDECREF(__pyx_t_12);
2590   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
2591     __Pyx_PyThreadState_declare
2592     __Pyx_PyThreadState_assign
2593     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
2594     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_areas.rcbuffer->pybuffer);
2595     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dets.rcbuffer->pybuffer);
2596     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_order.rcbuffer->pybuffer);
2597     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_scores.rcbuffer->pybuffer);
2598     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_suppressed.rcbuffer->pybuffer);
2599     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x1.rcbuffer->pybuffer);
2600     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x2.rcbuffer->pybuffer);
2601     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y1.rcbuffer->pybuffer);
2602     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y2.rcbuffer->pybuffer);
2603   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
2604   __Pyx_AddTraceback("cython_nms.nms", __pyx_clineno, __pyx_lineno, __pyx_filename);
2605   __pyx_r = NULL;
2606   goto __pyx_L2;
2607   __pyx_L0:;
2608   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_areas.rcbuffer->pybuffer);
2609   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dets.rcbuffer->pybuffer);
2610   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_order.rcbuffer->pybuffer);
2611   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_scores.rcbuffer->pybuffer);
2612   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_suppressed.rcbuffer->pybuffer);
2613   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x1.rcbuffer->pybuffer);
2614   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x2.rcbuffer->pybuffer);
2615   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y1.rcbuffer->pybuffer);
2616   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y2.rcbuffer->pybuffer);
2617   __pyx_L2:;
2618   __Pyx_XDECREF((PyObject *)__pyx_v_x1);
2619   __Pyx_XDECREF((PyObject *)__pyx_v_y1);
2620   __Pyx_XDECREF((PyObject *)__pyx_v_x2);
2621   __Pyx_XDECREF((PyObject *)__pyx_v_y2);
2622   __Pyx_XDECREF((PyObject *)__pyx_v_scores);
2623   __Pyx_XDECREF((PyObject *)__pyx_v_areas);
2624   __Pyx_XDECREF((PyObject *)__pyx_v_order);
2625   __Pyx_XDECREF((PyObject *)__pyx_v_suppressed);
2626   __Pyx_XDECREF(__pyx_v_keep);
2627   __Pyx_XGIVEREF(__pyx_r);
2628   __Pyx_RefNannyFinishContext();
2629   return __pyx_r;
2630 }
2631
2632 /* "nms.pyx":70
2633  *     return keep
2634  * 
2635  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):             # <<<<<<<<<<<<<<
2636  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
2637  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
2638  */
2639
2640 /* Python wrapper */
2641 static PyObject *__pyx_pw_10cython_nms_3nms_new(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2642 static PyMethodDef __pyx_mdef_10cython_nms_3nms_new = {"nms_new", (PyCFunction)__pyx_pw_10cython_nms_3nms_new, METH_VARARGS|METH_KEYWORDS, 0};
2643 static PyObject *__pyx_pw_10cython_nms_3nms_new(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2644   PyArrayObject *__pyx_v_dets = 0;
2645   PyObject *__pyx_v_thresh = 0;
2646   PyObject *__pyx_r = 0;
2647   __Pyx_RefNannyDeclarations
2648   __Pyx_RefNannySetupContext("nms_new (wrapper)", 0);
2649   {
2650     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dets,&__pyx_n_s_thresh,0};
2651     PyObject* values[2] = {0,0};
2652     if (unlikely(__pyx_kwds)) {
2653       Py_ssize_t kw_args;
2654       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2655       switch (pos_args) {
2656         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2657         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2658         case  0: break;
2659         default: goto __pyx_L5_argtuple_error;
2660       }
2661       kw_args = PyDict_Size(__pyx_kwds);
2662       switch (pos_args) {
2663         case  0:
2664         if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dets)) != 0)) kw_args--;
2665         else goto __pyx_L5_argtuple_error;
2666         case  1:
2667         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_thresh)) != 0)) kw_args--;
2668         else {
2669           __Pyx_RaiseArgtupleInvalid("nms_new", 1, 2, 2, 1); __PYX_ERR(0, 70, __pyx_L3_error)
2670         }
2671       }
2672       if (unlikely(kw_args > 0)) {
2673         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nms_new") < 0)) __PYX_ERR(0, 70, __pyx_L3_error)
2674       }
2675     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
2676       goto __pyx_L5_argtuple_error;
2677     } else {
2678       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2679       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2680     }
2681     __pyx_v_dets = ((PyArrayObject *)values[0]);
2682     __pyx_v_thresh = ((PyObject*)values[1]);
2683   }
2684   goto __pyx_L4_argument_unpacking_done;
2685   __pyx_L5_argtuple_error:;
2686   __Pyx_RaiseArgtupleInvalid("nms_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 70, __pyx_L3_error)
2687   __pyx_L3_error:;
2688   __Pyx_AddTraceback("cython_nms.nms_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
2689   __Pyx_RefNannyFinishContext();
2690   return NULL;
2691   __pyx_L4_argument_unpacking_done:;
2692   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dets), __pyx_ptype_5numpy_ndarray, 1, "dets", 0))) __PYX_ERR(0, 70, __pyx_L1_error)
2693   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_thresh), (&PyFloat_Type), 1, "thresh", 1))) __PYX_ERR(0, 70, __pyx_L1_error)
2694   __pyx_r = __pyx_pf_10cython_nms_2nms_new(__pyx_self, __pyx_v_dets, __pyx_v_thresh);
2695
2696   /* function exit code */
2697   goto __pyx_L0;
2698   __pyx_L1_error:;
2699   __pyx_r = NULL;
2700   __pyx_L0:;
2701   __Pyx_RefNannyFinishContext();
2702   return __pyx_r;
2703 }
2704
2705 static PyObject *__pyx_pf_10cython_nms_2nms_new(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dets, PyObject *__pyx_v_thresh) {
2706   PyArrayObject *__pyx_v_x1 = 0;
2707   PyArrayObject *__pyx_v_y1 = 0;
2708   PyArrayObject *__pyx_v_x2 = 0;
2709   PyArrayObject *__pyx_v_y2 = 0;
2710   PyArrayObject *__pyx_v_scores = 0;
2711   PyArrayObject *__pyx_v_areas = 0;
2712   PyArrayObject *__pyx_v_order = 0;
2713   int __pyx_v_ndets;
2714   PyArrayObject *__pyx_v_suppressed = 0;
2715   int __pyx_v__i;
2716   int __pyx_v__j;
2717   int __pyx_v_i;
2718   int __pyx_v_j;
2719   __pyx_t_5numpy_float32_t __pyx_v_ix1;
2720   __pyx_t_5numpy_float32_t __pyx_v_iy1;
2721   __pyx_t_5numpy_float32_t __pyx_v_ix2;
2722   __pyx_t_5numpy_float32_t __pyx_v_iy2;
2723   __pyx_t_5numpy_float32_t __pyx_v_iarea;
2724   __pyx_t_5numpy_float32_t __pyx_v_xx1;
2725   __pyx_t_5numpy_float32_t __pyx_v_yy1;
2726   __pyx_t_5numpy_float32_t __pyx_v_xx2;
2727   __pyx_t_5numpy_float32_t __pyx_v_yy2;
2728   __pyx_t_5numpy_float32_t __pyx_v_w;
2729   __pyx_t_5numpy_float32_t __pyx_v_h;
2730   __pyx_t_5numpy_float32_t __pyx_v_inter;
2731   __pyx_t_5numpy_float32_t __pyx_v_ovr;
2732   PyObject *__pyx_v_keep = NULL;
2733   PyObject *__pyx_v_ovr1 = NULL;
2734   PyObject *__pyx_v_ovr2 = NULL;
2735   __Pyx_LocalBuf_ND __pyx_pybuffernd_areas;
2736   __Pyx_Buffer __pyx_pybuffer_areas;
2737   __Pyx_LocalBuf_ND __pyx_pybuffernd_dets;
2738   __Pyx_Buffer __pyx_pybuffer_dets;
2739   __Pyx_LocalBuf_ND __pyx_pybuffernd_order;
2740   __Pyx_Buffer __pyx_pybuffer_order;
2741   __Pyx_LocalBuf_ND __pyx_pybuffernd_scores;
2742   __Pyx_Buffer __pyx_pybuffer_scores;
2743   __Pyx_LocalBuf_ND __pyx_pybuffernd_suppressed;
2744   __Pyx_Buffer __pyx_pybuffer_suppressed;
2745   __Pyx_LocalBuf_ND __pyx_pybuffernd_x1;
2746   __Pyx_Buffer __pyx_pybuffer_x1;
2747   __Pyx_LocalBuf_ND __pyx_pybuffernd_x2;
2748   __Pyx_Buffer __pyx_pybuffer_x2;
2749   __Pyx_LocalBuf_ND __pyx_pybuffernd_y1;
2750   __Pyx_Buffer __pyx_pybuffer_y1;
2751   __Pyx_LocalBuf_ND __pyx_pybuffernd_y2;
2752   __Pyx_Buffer __pyx_pybuffer_y2;
2753   PyObject *__pyx_r = NULL;
2754   __Pyx_RefNannyDeclarations
2755   PyObject *__pyx_t_1 = NULL;
2756   PyArrayObject *__pyx_t_2 = NULL;
2757   PyArrayObject *__pyx_t_3 = NULL;
2758   PyArrayObject *__pyx_t_4 = NULL;
2759   PyArrayObject *__pyx_t_5 = NULL;
2760   PyArrayObject *__pyx_t_6 = NULL;
2761   PyObject *__pyx_t_7 = NULL;
2762   PyObject *__pyx_t_8 = NULL;
2763   PyArrayObject *__pyx_t_9 = NULL;
2764   PyArrayObject *__pyx_t_10 = NULL;
2765   PyObject *__pyx_t_11 = NULL;
2766   PyObject *__pyx_t_12 = NULL;
2767   PyArrayObject *__pyx_t_13 = NULL;
2768   int __pyx_t_14;
2769   int __pyx_t_15;
2770   Py_ssize_t __pyx_t_16;
2771   int __pyx_t_17;
2772   Py_ssize_t __pyx_t_18;
2773   int __pyx_t_19;
2774   int __pyx_t_20;
2775   Py_ssize_t __pyx_t_21;
2776   Py_ssize_t __pyx_t_22;
2777   Py_ssize_t __pyx_t_23;
2778   Py_ssize_t __pyx_t_24;
2779   Py_ssize_t __pyx_t_25;
2780   int __pyx_t_26;
2781   Py_ssize_t __pyx_t_27;
2782   int __pyx_t_28;
2783   Py_ssize_t __pyx_t_29;
2784   Py_ssize_t __pyx_t_30;
2785   Py_ssize_t __pyx_t_31;
2786   Py_ssize_t __pyx_t_32;
2787   Py_ssize_t __pyx_t_33;
2788   Py_ssize_t __pyx_t_34;
2789   __pyx_t_5numpy_float32_t __pyx_t_35;
2790   Py_ssize_t __pyx_t_36;
2791   int __pyx_t_37;
2792   Py_ssize_t __pyx_t_38;
2793   __Pyx_RefNannySetupContext("nms_new", 0);
2794   __pyx_pybuffer_x1.pybuffer.buf = NULL;
2795   __pyx_pybuffer_x1.refcount = 0;
2796   __pyx_pybuffernd_x1.data = NULL;
2797   __pyx_pybuffernd_x1.rcbuffer = &__pyx_pybuffer_x1;
2798   __pyx_pybuffer_y1.pybuffer.buf = NULL;
2799   __pyx_pybuffer_y1.refcount = 0;
2800   __pyx_pybuffernd_y1.data = NULL;
2801   __pyx_pybuffernd_y1.rcbuffer = &__pyx_pybuffer_y1;
2802   __pyx_pybuffer_x2.pybuffer.buf = NULL;
2803   __pyx_pybuffer_x2.refcount = 0;
2804   __pyx_pybuffernd_x2.data = NULL;
2805   __pyx_pybuffernd_x2.rcbuffer = &__pyx_pybuffer_x2;
2806   __pyx_pybuffer_y2.pybuffer.buf = NULL;
2807   __pyx_pybuffer_y2.refcount = 0;
2808   __pyx_pybuffernd_y2.data = NULL;
2809   __pyx_pybuffernd_y2.rcbuffer = &__pyx_pybuffer_y2;
2810   __pyx_pybuffer_scores.pybuffer.buf = NULL;
2811   __pyx_pybuffer_scores.refcount = 0;
2812   __pyx_pybuffernd_scores.data = NULL;
2813   __pyx_pybuffernd_scores.rcbuffer = &__pyx_pybuffer_scores;
2814   __pyx_pybuffer_areas.pybuffer.buf = NULL;
2815   __pyx_pybuffer_areas.refcount = 0;
2816   __pyx_pybuffernd_areas.data = NULL;
2817   __pyx_pybuffernd_areas.rcbuffer = &__pyx_pybuffer_areas;
2818   __pyx_pybuffer_order.pybuffer.buf = NULL;
2819   __pyx_pybuffer_order.refcount = 0;
2820   __pyx_pybuffernd_order.data = NULL;
2821   __pyx_pybuffernd_order.rcbuffer = &__pyx_pybuffer_order;
2822   __pyx_pybuffer_suppressed.pybuffer.buf = NULL;
2823   __pyx_pybuffer_suppressed.refcount = 0;
2824   __pyx_pybuffernd_suppressed.data = NULL;
2825   __pyx_pybuffernd_suppressed.rcbuffer = &__pyx_pybuffer_suppressed;
2826   __pyx_pybuffer_dets.pybuffer.buf = NULL;
2827   __pyx_pybuffer_dets.refcount = 0;
2828   __pyx_pybuffernd_dets.data = NULL;
2829   __pyx_pybuffernd_dets.rcbuffer = &__pyx_pybuffer_dets;
2830   {
2831     __Pyx_BufFmt_StackElem __pyx_stack[1];
2832     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dets.rcbuffer->pybuffer, (PyObject*)__pyx_v_dets, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 70, __pyx_L1_error)
2833   }
2834   __pyx_pybuffernd_dets.diminfo[0].strides = __pyx_pybuffernd_dets.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dets.diminfo[0].shape = __pyx_pybuffernd_dets.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_dets.diminfo[1].strides = __pyx_pybuffernd_dets.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_dets.diminfo[1].shape = __pyx_pybuffernd_dets.rcbuffer->pybuffer.shape[1];
2835
2836   /* "nms.pyx":71
2837  * 
2838  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
2839  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]             # <<<<<<<<<<<<<<
2840  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
2841  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
2842  */
2843   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
2844   __Pyx_GOTREF(__pyx_t_1);
2845   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 71, __pyx_L1_error)
2846   __pyx_t_2 = ((PyArrayObject *)__pyx_t_1);
2847   {
2848     __Pyx_BufFmt_StackElem __pyx_stack[1];
2849     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x1.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
2850       __pyx_v_x1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_x1.rcbuffer->pybuffer.buf = NULL;
2851       __PYX_ERR(0, 71, __pyx_L1_error)
2852     } else {__pyx_pybuffernd_x1.diminfo[0].strides = __pyx_pybuffernd_x1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x1.diminfo[0].shape = __pyx_pybuffernd_x1.rcbuffer->pybuffer.shape[0];
2853     }
2854   }
2855   __pyx_t_2 = 0;
2856   __pyx_v_x1 = ((PyArrayObject *)__pyx_t_1);
2857   __pyx_t_1 = 0;
2858
2859   /* "nms.pyx":72
2860  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
2861  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
2862  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]             # <<<<<<<<<<<<<<
2863  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
2864  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
2865  */
2866   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
2867   __Pyx_GOTREF(__pyx_t_1);
2868   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 72, __pyx_L1_error)
2869   __pyx_t_3 = ((PyArrayObject *)__pyx_t_1);
2870   {
2871     __Pyx_BufFmt_StackElem __pyx_stack[1];
2872     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y1.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
2873       __pyx_v_y1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_y1.rcbuffer->pybuffer.buf = NULL;
2874       __PYX_ERR(0, 72, __pyx_L1_error)
2875     } else {__pyx_pybuffernd_y1.diminfo[0].strides = __pyx_pybuffernd_y1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y1.diminfo[0].shape = __pyx_pybuffernd_y1.rcbuffer->pybuffer.shape[0];
2876     }
2877   }
2878   __pyx_t_3 = 0;
2879   __pyx_v_y1 = ((PyArrayObject *)__pyx_t_1);
2880   __pyx_t_1 = 0;
2881
2882   /* "nms.pyx":73
2883  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
2884  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
2885  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]             # <<<<<<<<<<<<<<
2886  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
2887  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
2888  */
2889   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
2890   __Pyx_GOTREF(__pyx_t_1);
2891   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 73, __pyx_L1_error)
2892   __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
2893   {
2894     __Pyx_BufFmt_StackElem __pyx_stack[1];
2895     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x2.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
2896       __pyx_v_x2 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_x2.rcbuffer->pybuffer.buf = NULL;
2897       __PYX_ERR(0, 73, __pyx_L1_error)
2898     } else {__pyx_pybuffernd_x2.diminfo[0].strides = __pyx_pybuffernd_x2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x2.diminfo[0].shape = __pyx_pybuffernd_x2.rcbuffer->pybuffer.shape[0];
2899     }
2900   }
2901   __pyx_t_4 = 0;
2902   __pyx_v_x2 = ((PyArrayObject *)__pyx_t_1);
2903   __pyx_t_1 = 0;
2904
2905   /* "nms.pyx":74
2906  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
2907  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
2908  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]             # <<<<<<<<<<<<<<
2909  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
2910  * 
2911  */
2912   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
2913   __Pyx_GOTREF(__pyx_t_1);
2914   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 74, __pyx_L1_error)
2915   __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
2916   {
2917     __Pyx_BufFmt_StackElem __pyx_stack[1];
2918     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y2.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
2919       __pyx_v_y2 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_y2.rcbuffer->pybuffer.buf = NULL;
2920       __PYX_ERR(0, 74, __pyx_L1_error)
2921     } else {__pyx_pybuffernd_y2.diminfo[0].strides = __pyx_pybuffernd_y2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y2.diminfo[0].shape = __pyx_pybuffernd_y2.rcbuffer->pybuffer.shape[0];
2922     }
2923   }
2924   __pyx_t_5 = 0;
2925   __pyx_v_y2 = ((PyArrayObject *)__pyx_t_1);
2926   __pyx_t_1 = 0;
2927
2928   /* "nms.pyx":75
2929  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
2930  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
2931  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]             # <<<<<<<<<<<<<<
2932  * 
2933  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)
2934  */
2935   __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_dets), __pyx_tuple__21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
2936   __Pyx_GOTREF(__pyx_t_1);
2937   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 75, __pyx_L1_error)
2938   __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
2939   {
2940     __Pyx_BufFmt_StackElem __pyx_stack[1];
2941     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_scores.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
2942       __pyx_v_scores = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_scores.rcbuffer->pybuffer.buf = NULL;
2943       __PYX_ERR(0, 75, __pyx_L1_error)
2944     } else {__pyx_pybuffernd_scores.diminfo[0].strides = __pyx_pybuffernd_scores.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_scores.diminfo[0].shape = __pyx_pybuffernd_scores.rcbuffer->pybuffer.shape[0];
2945     }
2946   }
2947   __pyx_t_6 = 0;
2948   __pyx_v_scores = ((PyArrayObject *)__pyx_t_1);
2949   __pyx_t_1 = 0;
2950
2951   /* "nms.pyx":77
2952  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
2953  * 
2954  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)             # <<<<<<<<<<<<<<
2955  *     cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]
2956  * 
2957  */
2958   __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_x2), ((PyObject *)__pyx_v_x1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
2959   __Pyx_GOTREF(__pyx_t_1);
2960   __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 77, __pyx_L1_error)
2961   __Pyx_GOTREF(__pyx_t_7);
2962   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2963   __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_y2), ((PyObject *)__pyx_v_y1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
2964   __Pyx_GOTREF(__pyx_t_1);
2965   __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 77, __pyx_L1_error)
2966   __Pyx_GOTREF(__pyx_t_8);
2967   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2968   __pyx_t_1 = PyNumber_Multiply(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
2969   __Pyx_GOTREF(__pyx_t_1);
2970   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2971   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
2972   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 77, __pyx_L1_error)
2973   __pyx_t_9 = ((PyArrayObject *)__pyx_t_1);
2974   {
2975     __Pyx_BufFmt_StackElem __pyx_stack[1];
2976     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_areas.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
2977       __pyx_v_areas = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_areas.rcbuffer->pybuffer.buf = NULL;
2978       __PYX_ERR(0, 77, __pyx_L1_error)
2979     } else {__pyx_pybuffernd_areas.diminfo[0].strides = __pyx_pybuffernd_areas.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_areas.diminfo[0].shape = __pyx_pybuffernd_areas.rcbuffer->pybuffer.shape[0];
2980     }
2981   }
2982   __pyx_t_9 = 0;
2983   __pyx_v_areas = ((PyArrayObject *)__pyx_t_1);
2984   __pyx_t_1 = 0;
2985
2986   /* "nms.pyx":78
2987  * 
2988  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)
2989  *     cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]             # <<<<<<<<<<<<<<
2990  * 
2991  *     cdef int ndets = dets.shape[0]
2992  */
2993   __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_scores), __pyx_n_s_argsort); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 78, __pyx_L1_error)
2994   __Pyx_GOTREF(__pyx_t_8);
2995   __pyx_t_7 = NULL;
2996   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
2997     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
2998     if (likely(__pyx_t_7)) {
2999       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
3000       __Pyx_INCREF(__pyx_t_7);
3001       __Pyx_INCREF(function);
3002       __Pyx_DECREF_SET(__pyx_t_8, function);
3003     }
3004   }
3005   if (__pyx_t_7) {
3006     __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
3007     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3008   } else {
3009     __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
3010   }
3011   __Pyx_GOTREF(__pyx_t_1);
3012   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3013   __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_slice__22); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 78, __pyx_L1_error)
3014   __Pyx_GOTREF(__pyx_t_8);
3015   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3016   if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 78, __pyx_L1_error)
3017   __pyx_t_10 = ((PyArrayObject *)__pyx_t_8);
3018   {
3019     __Pyx_BufFmt_StackElem __pyx_stack[1];
3020     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_order.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
3021       __pyx_v_order = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_order.rcbuffer->pybuffer.buf = NULL;
3022       __PYX_ERR(0, 78, __pyx_L1_error)
3023     } else {__pyx_pybuffernd_order.diminfo[0].strides = __pyx_pybuffernd_order.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_order.diminfo[0].shape = __pyx_pybuffernd_order.rcbuffer->pybuffer.shape[0];
3024     }
3025   }
3026   __pyx_t_10 = 0;
3027   __pyx_v_order = ((PyArrayObject *)__pyx_t_8);
3028   __pyx_t_8 = 0;
3029
3030   /* "nms.pyx":80
3031  *     cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]
3032  * 
3033  *     cdef int ndets = dets.shape[0]             # <<<<<<<<<<<<<<
3034  *     cdef np.ndarray[np.int_t, ndim=1] suppressed = \
3035  *             np.zeros((ndets), dtype=np.int)
3036  */
3037   __pyx_v_ndets = (__pyx_v_dets->dimensions[0]);
3038
3039   /* "nms.pyx":82
3040  *     cdef int ndets = dets.shape[0]
3041  *     cdef np.ndarray[np.int_t, ndim=1] suppressed = \
3042  *             np.zeros((ndets), dtype=np.int)             # <<<<<<<<<<<<<<
3043  * 
3044  *     # nominal indices
3045  */
3046   __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 82, __pyx_L1_error)
3047   __Pyx_GOTREF(__pyx_t_8);
3048   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
3049   __Pyx_GOTREF(__pyx_t_1);
3050   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3051   __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ndets); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 82, __pyx_L1_error)
3052   __Pyx_GOTREF(__pyx_t_8);
3053   __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 82, __pyx_L1_error)
3054   __Pyx_GOTREF(__pyx_t_7);
3055   __Pyx_GIVEREF(__pyx_t_8);
3056   PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
3057   __pyx_t_8 = 0;
3058   __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 82, __pyx_L1_error)
3059   __Pyx_GOTREF(__pyx_t_8);
3060   __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 82, __pyx_L1_error)
3061   __Pyx_GOTREF(__pyx_t_11);
3062   __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 82, __pyx_L1_error)
3063   __Pyx_GOTREF(__pyx_t_12);
3064   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
3065   if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_12) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
3066   __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
3067   __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 82, __pyx_L1_error)
3068   __Pyx_GOTREF(__pyx_t_12);
3069   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3070   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3071   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3072   if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 82, __pyx_L1_error)
3073   __pyx_t_13 = ((PyArrayObject *)__pyx_t_12);
3074   {
3075     __Pyx_BufFmt_StackElem __pyx_stack[1];
3076     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_suppressed.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
3077       __pyx_v_suppressed = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.buf = NULL;
3078       __PYX_ERR(0, 81, __pyx_L1_error)
3079     } else {__pyx_pybuffernd_suppressed.diminfo[0].strides = __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_suppressed.diminfo[0].shape = __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.shape[0];
3080     }
3081   }
3082   __pyx_t_13 = 0;
3083   __pyx_v_suppressed = ((PyArrayObject *)__pyx_t_12);
3084   __pyx_t_12 = 0;
3085
3086   /* "nms.pyx":95
3087  *     cdef np.float32_t inter, ovr
3088  * 
3089  *     keep = []             # <<<<<<<<<<<<<<
3090  *     for _i in range(ndets):
3091  *         i = order[_i]
3092  */
3093   __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 95, __pyx_L1_error)
3094   __Pyx_GOTREF(__pyx_t_12);
3095   __pyx_v_keep = ((PyObject*)__pyx_t_12);
3096   __pyx_t_12 = 0;
3097
3098   /* "nms.pyx":96
3099  * 
3100  *     keep = []
3101  *     for _i in range(ndets):             # <<<<<<<<<<<<<<
3102  *         i = order[_i]
3103  *         if suppressed[i] == 1:
3104  */
3105   __pyx_t_14 = __pyx_v_ndets;
3106   for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
3107     __pyx_v__i = __pyx_t_15;
3108
3109     /* "nms.pyx":97
3110  *     keep = []
3111  *     for _i in range(ndets):
3112  *         i = order[_i]             # <<<<<<<<<<<<<<
3113  *         if suppressed[i] == 1:
3114  *             continue
3115  */
3116     __pyx_t_16 = __pyx_v__i;
3117     __pyx_t_17 = -1;
3118     if (__pyx_t_16 < 0) {
3119       __pyx_t_16 += __pyx_pybuffernd_order.diminfo[0].shape;
3120       if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 0;
3121     } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_order.diminfo[0].shape)) __pyx_t_17 = 0;
3122     if (unlikely(__pyx_t_17 != -1)) {
3123       __Pyx_RaiseBufferIndexError(__pyx_t_17);
3124       __PYX_ERR(0, 97, __pyx_L1_error)
3125     }
3126     __pyx_v_i = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_order.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_order.diminfo[0].strides));
3127
3128     /* "nms.pyx":98
3129  *     for _i in range(ndets):
3130  *         i = order[_i]
3131  *         if suppressed[i] == 1:             # <<<<<<<<<<<<<<
3132  *             continue
3133  *         keep.append(i)
3134  */
3135     __pyx_t_18 = __pyx_v_i;
3136     __pyx_t_17 = -1;
3137     if (__pyx_t_18 < 0) {
3138       __pyx_t_18 += __pyx_pybuffernd_suppressed.diminfo[0].shape;
3139       if (unlikely(__pyx_t_18 < 0)) __pyx_t_17 = 0;
3140     } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_suppressed.diminfo[0].shape)) __pyx_t_17 = 0;
3141     if (unlikely(__pyx_t_17 != -1)) {
3142       __Pyx_RaiseBufferIndexError(__pyx_t_17);
3143       __PYX_ERR(0, 98, __pyx_L1_error)
3144     }
3145     __pyx_t_19 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_suppressed.diminfo[0].strides)) == 1) != 0);
3146     if (__pyx_t_19) {
3147
3148       /* "nms.pyx":99
3149  *         i = order[_i]
3150  *         if suppressed[i] == 1:
3151  *             continue             # <<<<<<<<<<<<<<
3152  *         keep.append(i)
3153  *         ix1 = x1[i]
3154  */
3155       goto __pyx_L3_continue;
3156
3157       /* "nms.pyx":98
3158  *     for _i in range(ndets):
3159  *         i = order[_i]
3160  *         if suppressed[i] == 1:             # <<<<<<<<<<<<<<
3161  *             continue
3162  *         keep.append(i)
3163  */
3164     }
3165
3166     /* "nms.pyx":100
3167  *         if suppressed[i] == 1:
3168  *             continue
3169  *         keep.append(i)             # <<<<<<<<<<<<<<
3170  *         ix1 = x1[i]
3171  *         iy1 = y1[i]
3172  */
3173     __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L1_error)
3174     __Pyx_GOTREF(__pyx_t_12);
3175     __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_keep, __pyx_t_12); if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 100, __pyx_L1_error)
3176     __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
3177
3178     /* "nms.pyx":101
3179  *             continue
3180  *         keep.append(i)
3181  *         ix1 = x1[i]             # <<<<<<<<<<<<<<
3182  *         iy1 = y1[i]
3183  *         ix2 = x2[i]
3184  */
3185     __pyx_t_21 = __pyx_v_i;
3186     __pyx_t_17 = -1;
3187     if (__pyx_t_21 < 0) {
3188       __pyx_t_21 += __pyx_pybuffernd_x1.diminfo[0].shape;
3189       if (unlikely(__pyx_t_21 < 0)) __pyx_t_17 = 0;
3190     } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_x1.diminfo[0].shape)) __pyx_t_17 = 0;
3191     if (unlikely(__pyx_t_17 != -1)) {
3192       __Pyx_RaiseBufferIndexError(__pyx_t_17);
3193       __PYX_ERR(0, 101, __pyx_L1_error)
3194     }
3195     __pyx_v_ix1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_x1.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_x1.diminfo[0].strides));
3196
3197     /* "nms.pyx":102
3198  *         keep.append(i)
3199  *         ix1 = x1[i]
3200  *         iy1 = y1[i]             # <<<<<<<<<<<<<<
3201  *         ix2 = x2[i]
3202  *         iy2 = y2[i]
3203  */
3204     __pyx_t_22 = __pyx_v_i;
3205     __pyx_t_17 = -1;
3206     if (__pyx_t_22 < 0) {
3207       __pyx_t_22 += __pyx_pybuffernd_y1.diminfo[0].shape;
3208       if (unlikely(__pyx_t_22 < 0)) __pyx_t_17 = 0;
3209     } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_y1.diminfo[0].shape)) __pyx_t_17 = 0;
3210     if (unlikely(__pyx_t_17 != -1)) {
3211       __Pyx_RaiseBufferIndexError(__pyx_t_17);
3212       __PYX_ERR(0, 102, __pyx_L1_error)
3213     }
3214     __pyx_v_iy1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_y1.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_y1.diminfo[0].strides));
3215
3216     /* "nms.pyx":103
3217  *         ix1 = x1[i]
3218  *         iy1 = y1[i]
3219  *         ix2 = x2[i]             # <<<<<<<<<<<<<<
3220  *         iy2 = y2[i]
3221  *         iarea = areas[i]
3222  */
3223     __pyx_t_23 = __pyx_v_i;
3224     __pyx_t_17 = -1;
3225     if (__pyx_t_23 < 0) {
3226       __pyx_t_23 += __pyx_pybuffernd_x2.diminfo[0].shape;
3227       if (unlikely(__pyx_t_23 < 0)) __pyx_t_17 = 0;
3228     } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_x2.diminfo[0].shape)) __pyx_t_17 = 0;
3229     if (unlikely(__pyx_t_17 != -1)) {
3230       __Pyx_RaiseBufferIndexError(__pyx_t_17);
3231       __PYX_ERR(0, 103, __pyx_L1_error)
3232     }
3233     __pyx_v_ix2 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_x2.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_x2.diminfo[0].strides));
3234
3235     /* "nms.pyx":104
3236  *         iy1 = y1[i]
3237  *         ix2 = x2[i]
3238  *         iy2 = y2[i]             # <<<<<<<<<<<<<<
3239  *         iarea = areas[i]
3240  *         for _j in range(_i + 1, ndets):
3241  */
3242     __pyx_t_24 = __pyx_v_i;
3243     __pyx_t_17 = -1;
3244     if (__pyx_t_24 < 0) {
3245       __pyx_t_24 += __pyx_pybuffernd_y2.diminfo[0].shape;
3246       if (unlikely(__pyx_t_24 < 0)) __pyx_t_17 = 0;
3247     } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_y2.diminfo[0].shape)) __pyx_t_17 = 0;
3248     if (unlikely(__pyx_t_17 != -1)) {
3249       __Pyx_RaiseBufferIndexError(__pyx_t_17);
3250       __PYX_ERR(0, 104, __pyx_L1_error)
3251     }
3252     __pyx_v_iy2 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_y2.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_y2.diminfo[0].strides));
3253
3254     /* "nms.pyx":105
3255  *         ix2 = x2[i]
3256  *         iy2 = y2[i]
3257  *         iarea = areas[i]             # <<<<<<<<<<<<<<
3258  *         for _j in range(_i + 1, ndets):
3259  *             j = order[_j]
3260  */
3261     __pyx_t_25 = __pyx_v_i;
3262     __pyx_t_17 = -1;
3263     if (__pyx_t_25 < 0) {
3264       __pyx_t_25 += __pyx_pybuffernd_areas.diminfo[0].shape;
3265       if (unlikely(__pyx_t_25 < 0)) __pyx_t_17 = 0;
3266     } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_areas.diminfo[0].shape)) __pyx_t_17 = 0;
3267     if (unlikely(__pyx_t_17 != -1)) {
3268       __Pyx_RaiseBufferIndexError(__pyx_t_17);
3269       __PYX_ERR(0, 105, __pyx_L1_error)
3270     }
3271     __pyx_v_iarea = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_areas.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_areas.diminfo[0].strides));
3272
3273     /* "nms.pyx":106
3274  *         iy2 = y2[i]
3275  *         iarea = areas[i]
3276  *         for _j in range(_i + 1, ndets):             # <<<<<<<<<<<<<<
3277  *             j = order[_j]
3278  *             if suppressed[j] == 1:
3279  */
3280     __pyx_t_17 = __pyx_v_ndets;
3281     for (__pyx_t_26 = (__pyx_v__i + 1); __pyx_t_26 < __pyx_t_17; __pyx_t_26+=1) {
3282       __pyx_v__j = __pyx_t_26;
3283
3284       /* "nms.pyx":107
3285  *         iarea = areas[i]
3286  *         for _j in range(_i + 1, ndets):
3287  *             j = order[_j]             # <<<<<<<<<<<<<<
3288  *             if suppressed[j] == 1:
3289  *                 continue
3290  */
3291       __pyx_t_27 = __pyx_v__j;
3292       __pyx_t_28 = -1;
3293       if (__pyx_t_27 < 0) {
3294         __pyx_t_27 += __pyx_pybuffernd_order.diminfo[0].shape;
3295         if (unlikely(__pyx_t_27 < 0)) __pyx_t_28 = 0;
3296       } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_order.diminfo[0].shape)) __pyx_t_28 = 0;
3297       if (unlikely(__pyx_t_28 != -1)) {
3298         __Pyx_RaiseBufferIndexError(__pyx_t_28);
3299         __PYX_ERR(0, 107, __pyx_L1_error)
3300       }
3301       __pyx_v_j = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_order.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_order.diminfo[0].strides));
3302
3303       /* "nms.pyx":108
3304  *         for _j in range(_i + 1, ndets):
3305  *             j = order[_j]
3306  *             if suppressed[j] == 1:             # <<<<<<<<<<<<<<
3307  *                 continue
3308  *             xx1 = max(ix1, x1[j])
3309  */
3310       __pyx_t_29 = __pyx_v_j;
3311       __pyx_t_28 = -1;
3312       if (__pyx_t_29 < 0) {
3313         __pyx_t_29 += __pyx_pybuffernd_suppressed.diminfo[0].shape;
3314         if (unlikely(__pyx_t_29 < 0)) __pyx_t_28 = 0;
3315       } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_suppressed.diminfo[0].shape)) __pyx_t_28 = 0;
3316       if (unlikely(__pyx_t_28 != -1)) {
3317         __Pyx_RaiseBufferIndexError(__pyx_t_28);
3318         __PYX_ERR(0, 108, __pyx_L1_error)
3319       }
3320       __pyx_t_19 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_suppressed.diminfo[0].strides)) == 1) != 0);
3321       if (__pyx_t_19) {
3322
3323         /* "nms.pyx":109
3324  *             j = order[_j]
3325  *             if suppressed[j] == 1:
3326  *                 continue             # <<<<<<<<<<<<<<
3327  *             xx1 = max(ix1, x1[j])
3328  *             yy1 = max(iy1, y1[j])
3329  */
3330         goto __pyx_L6_continue;
3331
3332         /* "nms.pyx":108
3333  *         for _j in range(_i + 1, ndets):
3334  *             j = order[_j]
3335  *             if suppressed[j] == 1:             # <<<<<<<<<<<<<<
3336  *                 continue
3337  *             xx1 = max(ix1, x1[j])
3338  */
3339       }
3340
3341       /* "nms.pyx":110
3342  *             if suppressed[j] == 1:
3343  *                 continue
3344  *             xx1 = max(ix1, x1[j])             # <<<<<<<<<<<<<<
3345  *             yy1 = max(iy1, y1[j])
3346  *             xx2 = min(ix2, x2[j])
3347  */
3348       __pyx_t_30 = __pyx_v_j;
3349       __pyx_t_28 = -1;
3350       if (__pyx_t_30 < 0) {
3351         __pyx_t_30 += __pyx_pybuffernd_x1.diminfo[0].shape;
3352         if (unlikely(__pyx_t_30 < 0)) __pyx_t_28 = 0;
3353       } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_x1.diminfo[0].shape)) __pyx_t_28 = 0;
3354       if (unlikely(__pyx_t_28 != -1)) {
3355         __Pyx_RaiseBufferIndexError(__pyx_t_28);
3356         __PYX_ERR(0, 110, __pyx_L1_error)
3357       }
3358       __pyx_v_xx1 = __pyx_f_10cython_nms_max(__pyx_v_ix1, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_x1.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_x1.diminfo[0].strides)));
3359
3360       /* "nms.pyx":111
3361  *                 continue
3362  *             xx1 = max(ix1, x1[j])
3363  *             yy1 = max(iy1, y1[j])             # <<<<<<<<<<<<<<
3364  *             xx2 = min(ix2, x2[j])
3365  *             yy2 = min(iy2, y2[j])
3366  */
3367       __pyx_t_31 = __pyx_v_j;
3368       __pyx_t_28 = -1;
3369       if (__pyx_t_31 < 0) {
3370         __pyx_t_31 += __pyx_pybuffernd_y1.diminfo[0].shape;
3371         if (unlikely(__pyx_t_31 < 0)) __pyx_t_28 = 0;
3372       } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_y1.diminfo[0].shape)) __pyx_t_28 = 0;
3373       if (unlikely(__pyx_t_28 != -1)) {
3374         __Pyx_RaiseBufferIndexError(__pyx_t_28);
3375         __PYX_ERR(0, 111, __pyx_L1_error)
3376       }
3377       __pyx_v_yy1 = __pyx_f_10cython_nms_max(__pyx_v_iy1, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_y1.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_y1.diminfo[0].strides)));
3378
3379       /* "nms.pyx":112
3380  *             xx1 = max(ix1, x1[j])
3381  *             yy1 = max(iy1, y1[j])
3382  *             xx2 = min(ix2, x2[j])             # <<<<<<<<<<<<<<
3383  *             yy2 = min(iy2, y2[j])
3384  *             w = max(0.0, xx2 - xx1 + 1)
3385  */
3386       __pyx_t_32 = __pyx_v_j;
3387       __pyx_t_28 = -1;
3388       if (__pyx_t_32 < 0) {
3389         __pyx_t_32 += __pyx_pybuffernd_x2.diminfo[0].shape;
3390         if (unlikely(__pyx_t_32 < 0)) __pyx_t_28 = 0;
3391       } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_x2.diminfo[0].shape)) __pyx_t_28 = 0;
3392       if (unlikely(__pyx_t_28 != -1)) {
3393         __Pyx_RaiseBufferIndexError(__pyx_t_28);
3394         __PYX_ERR(0, 112, __pyx_L1_error)
3395       }
3396       __pyx_v_xx2 = __pyx_f_10cython_nms_min(__pyx_v_ix2, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_x2.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_x2.diminfo[0].strides)));
3397
3398       /* "nms.pyx":113
3399  *             yy1 = max(iy1, y1[j])
3400  *             xx2 = min(ix2, x2[j])
3401  *             yy2 = min(iy2, y2[j])             # <<<<<<<<<<<<<<
3402  *             w = max(0.0, xx2 - xx1 + 1)
3403  *             h = max(0.0, yy2 - yy1 + 1)
3404  */
3405       __pyx_t_33 = __pyx_v_j;
3406       __pyx_t_28 = -1;
3407       if (__pyx_t_33 < 0) {
3408         __pyx_t_33 += __pyx_pybuffernd_y2.diminfo[0].shape;
3409         if (unlikely(__pyx_t_33 < 0)) __pyx_t_28 = 0;
3410       } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_y2.diminfo[0].shape)) __pyx_t_28 = 0;
3411       if (unlikely(__pyx_t_28 != -1)) {
3412         __Pyx_RaiseBufferIndexError(__pyx_t_28);
3413         __PYX_ERR(0, 113, __pyx_L1_error)
3414       }
3415       __pyx_v_yy2 = __pyx_f_10cython_nms_min(__pyx_v_iy2, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_y2.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_y2.diminfo[0].strides)));
3416
3417       /* "nms.pyx":114
3418  *             xx2 = min(ix2, x2[j])
3419  *             yy2 = min(iy2, y2[j])
3420  *             w = max(0.0, xx2 - xx1 + 1)             # <<<<<<<<<<<<<<
3421  *             h = max(0.0, yy2 - yy1 + 1)
3422  *             inter = w * h
3423  */
3424       __pyx_v_w = __pyx_f_10cython_nms_max(0.0, ((__pyx_v_xx2 - __pyx_v_xx1) + 1.0));
3425
3426       /* "nms.pyx":115
3427  *             yy2 = min(iy2, y2[j])
3428  *             w = max(0.0, xx2 - xx1 + 1)
3429  *             h = max(0.0, yy2 - yy1 + 1)             # <<<<<<<<<<<<<<
3430  *             inter = w * h
3431  *             ovr = inter / (iarea + areas[j] - inter)
3432  */
3433       __pyx_v_h = __pyx_f_10cython_nms_max(0.0, ((__pyx_v_yy2 - __pyx_v_yy1) + 1.0));
3434
3435       /* "nms.pyx":116
3436  *             w = max(0.0, xx2 - xx1 + 1)
3437  *             h = max(0.0, yy2 - yy1 + 1)
3438  *             inter = w * h             # <<<<<<<<<<<<<<
3439  *             ovr = inter / (iarea + areas[j] - inter)
3440  *             ovr1 = inter / iarea
3441  */
3442       __pyx_v_inter = (__pyx_v_w * __pyx_v_h);
3443
3444       /* "nms.pyx":117
3445  *             h = max(0.0, yy2 - yy1 + 1)
3446  *             inter = w * h
3447  *             ovr = inter / (iarea + areas[j] - inter)             # <<<<<<<<<<<<<<
3448  *             ovr1 = inter / iarea
3449  *             ovr2 = inter / areas[j]
3450  */
3451       __pyx_t_34 = __pyx_v_j;
3452       __pyx_t_28 = -1;
3453       if (__pyx_t_34 < 0) {
3454         __pyx_t_34 += __pyx_pybuffernd_areas.diminfo[0].shape;
3455         if (unlikely(__pyx_t_34 < 0)) __pyx_t_28 = 0;
3456       } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_areas.diminfo[0].shape)) __pyx_t_28 = 0;
3457       if (unlikely(__pyx_t_28 != -1)) {
3458         __Pyx_RaiseBufferIndexError(__pyx_t_28);
3459         __PYX_ERR(0, 117, __pyx_L1_error)
3460       }
3461       __pyx_t_35 = ((__pyx_v_iarea + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_areas.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_areas.diminfo[0].strides))) - __pyx_v_inter);
3462       if (unlikely(__pyx_t_35 == 0)) {
3463         PyErr_SetString(PyExc_ZeroDivisionError, "float division");
3464         __PYX_ERR(0, 117, __pyx_L1_error)
3465       }
3466       __pyx_v_ovr = (__pyx_v_inter / __pyx_t_35);
3467
3468       /* "nms.pyx":118
3469  *             inter = w * h
3470  *             ovr = inter / (iarea + areas[j] - inter)
3471  *             ovr1 = inter / iarea             # <<<<<<<<<<<<<<
3472  *             ovr2 = inter / areas[j]
3473  *             if ovr >= thresh or ovr1 > 0.95 or ovr2 > 0.95:
3474  */
3475       if (unlikely(__pyx_v_iarea == 0)) {
3476         PyErr_SetString(PyExc_ZeroDivisionError, "float division");
3477         __PYX_ERR(0, 118, __pyx_L1_error)
3478       }
3479       __pyx_t_12 = PyFloat_FromDouble((__pyx_v_inter / __pyx_v_iarea)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 118, __pyx_L1_error)
3480       __Pyx_GOTREF(__pyx_t_12);
3481       __Pyx_XDECREF_SET(__pyx_v_ovr1, __pyx_t_12);
3482       __pyx_t_12 = 0;
3483
3484       /* "nms.pyx":119
3485  *             ovr = inter / (iarea + areas[j] - inter)
3486  *             ovr1 = inter / iarea
3487  *             ovr2 = inter / areas[j]             # <<<<<<<<<<<<<<
3488  *             if ovr >= thresh or ovr1 > 0.95 or ovr2 > 0.95:
3489  *                 suppressed[j] = 1
3490  */
3491       __pyx_t_36 = __pyx_v_j;
3492       __pyx_t_28 = -1;
3493       if (__pyx_t_36 < 0) {
3494         __pyx_t_36 += __pyx_pybuffernd_areas.diminfo[0].shape;
3495         if (unlikely(__pyx_t_36 < 0)) __pyx_t_28 = 0;
3496       } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_areas.diminfo[0].shape)) __pyx_t_28 = 0;
3497       if (unlikely(__pyx_t_28 != -1)) {
3498         __Pyx_RaiseBufferIndexError(__pyx_t_28);
3499         __PYX_ERR(0, 119, __pyx_L1_error)
3500       }
3501       __pyx_t_35 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_areas.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_areas.diminfo[0].strides));
3502       if (unlikely(__pyx_t_35 == 0)) {
3503         PyErr_SetString(PyExc_ZeroDivisionError, "float division");
3504         __PYX_ERR(0, 119, __pyx_L1_error)
3505       }
3506       __pyx_t_12 = PyFloat_FromDouble((__pyx_v_inter / __pyx_t_35)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 119, __pyx_L1_error)
3507       __Pyx_GOTREF(__pyx_t_12);
3508       __Pyx_XDECREF_SET(__pyx_v_ovr2, __pyx_t_12);
3509       __pyx_t_12 = 0;
3510
3511       /* "nms.pyx":120
3512  *             ovr1 = inter / iarea
3513  *             ovr2 = inter / areas[j]
3514  *             if ovr >= thresh or ovr1 > 0.95 or ovr2 > 0.95:             # <<<<<<<<<<<<<<
3515  *                 suppressed[j] = 1
3516  * 
3517  */
3518       __pyx_t_12 = PyFloat_FromDouble(__pyx_v_ovr); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 120, __pyx_L1_error)
3519       __Pyx_GOTREF(__pyx_t_12);
3520       __pyx_t_8 = PyObject_RichCompare(__pyx_t_12, __pyx_v_thresh, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L1_error)
3521       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
3522       __pyx_t_37 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_37 < 0)) __PYX_ERR(0, 120, __pyx_L1_error)
3523       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3524       if (!__pyx_t_37) {
3525       } else {
3526         __pyx_t_19 = __pyx_t_37;
3527         goto __pyx_L10_bool_binop_done;
3528       }
3529       __pyx_t_8 = PyObject_RichCompare(__pyx_v_ovr1, __pyx_float_0_95, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L1_error)
3530       __pyx_t_37 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_37 < 0)) __PYX_ERR(0, 120, __pyx_L1_error)
3531       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3532       if (!__pyx_t_37) {
3533       } else {
3534         __pyx_t_19 = __pyx_t_37;
3535         goto __pyx_L10_bool_binop_done;
3536       }
3537       __pyx_t_8 = PyObject_RichCompare(__pyx_v_ovr2, __pyx_float_0_95, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L1_error)
3538       __pyx_t_37 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_37 < 0)) __PYX_ERR(0, 120, __pyx_L1_error)
3539       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3540       __pyx_t_19 = __pyx_t_37;
3541       __pyx_L10_bool_binop_done:;
3542       if (__pyx_t_19) {
3543
3544         /* "nms.pyx":121
3545  *             ovr2 = inter / areas[j]
3546  *             if ovr >= thresh or ovr1 > 0.95 or ovr2 > 0.95:
3547  *                 suppressed[j] = 1             # <<<<<<<<<<<<<<
3548  * 
3549  *     return keep
3550  */
3551         __pyx_t_38 = __pyx_v_j;
3552         __pyx_t_28 = -1;
3553         if (__pyx_t_38 < 0) {
3554           __pyx_t_38 += __pyx_pybuffernd_suppressed.diminfo[0].shape;
3555           if (unlikely(__pyx_t_38 < 0)) __pyx_t_28 = 0;
3556         } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_suppressed.diminfo[0].shape)) __pyx_t_28 = 0;
3557         if (unlikely(__pyx_t_28 != -1)) {
3558           __Pyx_RaiseBufferIndexError(__pyx_t_28);
3559           __PYX_ERR(0, 121, __pyx_L1_error)
3560         }
3561         *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_suppressed.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_suppressed.diminfo[0].strides) = 1;
3562
3563         /* "nms.pyx":120
3564  *             ovr1 = inter / iarea
3565  *             ovr2 = inter / areas[j]
3566  *             if ovr >= thresh or ovr1 > 0.95 or ovr2 > 0.95:             # <<<<<<<<<<<<<<
3567  *                 suppressed[j] = 1
3568  * 
3569  */
3570       }
3571       __pyx_L6_continue:;
3572     }
3573     __pyx_L3_continue:;
3574   }
3575
3576   /* "nms.pyx":123
3577  *                 suppressed[j] = 1
3578  * 
3579  *     return keep             # <<<<<<<<<<<<<<
3580  */
3581   __Pyx_XDECREF(__pyx_r);
3582   __Pyx_INCREF(__pyx_v_keep);
3583   __pyx_r = __pyx_v_keep;
3584   goto __pyx_L0;
3585
3586   /* "nms.pyx":70
3587  *     return keep
3588  * 
3589  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):             # <<<<<<<<<<<<<<
3590  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
3591  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
3592  */
3593
3594   /* function exit code */
3595   __pyx_L1_error:;
3596   __Pyx_XDECREF(__pyx_t_1);
3597   __Pyx_XDECREF(__pyx_t_7);
3598   __Pyx_XDECREF(__pyx_t_8);
3599   __Pyx_XDECREF(__pyx_t_11);
3600   __Pyx_XDECREF(__pyx_t_12);
3601   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
3602     __Pyx_PyThreadState_declare
3603     __Pyx_PyThreadState_assign
3604     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
3605     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_areas.rcbuffer->pybuffer);
3606     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dets.rcbuffer->pybuffer);
3607     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_order.rcbuffer->pybuffer);
3608     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_scores.rcbuffer->pybuffer);
3609     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_suppressed.rcbuffer->pybuffer);
3610     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x1.rcbuffer->pybuffer);
3611     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x2.rcbuffer->pybuffer);
3612     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y1.rcbuffer->pybuffer);
3613     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y2.rcbuffer->pybuffer);
3614   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
3615   __Pyx_AddTraceback("cython_nms.nms_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
3616   __pyx_r = NULL;
3617   goto __pyx_L2;
3618   __pyx_L0:;
3619   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_areas.rcbuffer->pybuffer);
3620   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dets.rcbuffer->pybuffer);
3621   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_order.rcbuffer->pybuffer);
3622   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_scores.rcbuffer->pybuffer);
3623   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_suppressed.rcbuffer->pybuffer);
3624   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x1.rcbuffer->pybuffer);
3625   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x2.rcbuffer->pybuffer);
3626   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y1.rcbuffer->pybuffer);
3627   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y2.rcbuffer->pybuffer);
3628   __pyx_L2:;
3629   __Pyx_XDECREF((PyObject *)__pyx_v_x1);
3630   __Pyx_XDECREF((PyObject *)__pyx_v_y1);
3631   __Pyx_XDECREF((PyObject *)__pyx_v_x2);
3632   __Pyx_XDECREF((PyObject *)__pyx_v_y2);
3633   __Pyx_XDECREF((PyObject *)__pyx_v_scores);
3634   __Pyx_XDECREF((PyObject *)__pyx_v_areas);
3635   __Pyx_XDECREF((PyObject *)__pyx_v_order);
3636   __Pyx_XDECREF((PyObject *)__pyx_v_suppressed);
3637   __Pyx_XDECREF(__pyx_v_keep);
3638   __Pyx_XDECREF(__pyx_v_ovr1);
3639   __Pyx_XDECREF(__pyx_v_ovr2);
3640   __Pyx_XGIVEREF(__pyx_r);
3641   __Pyx_RefNannyFinishContext();
3642   return __pyx_r;
3643 }
3644
3645 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
3646  *         # experimental exception made for __getbuffer__ and __releasebuffer__
3647  *         # -- the details of this may change.
3648  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
3649  *             # This implementation of getbuffer is geared towards Cython
3650  *             # requirements, and does not yet fullfill the PEP.
3651  */
3652
3653 /* Python wrapper */
3654 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
3655 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
3656   int __pyx_r;
3657   __Pyx_RefNannyDeclarations
3658   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
3659   __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
3660
3661   /* function exit code */
3662   __Pyx_RefNannyFinishContext();
3663   return __pyx_r;
3664 }
3665
3666 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
3667   int __pyx_v_copy_shape;
3668   int __pyx_v_i;
3669   int __pyx_v_ndim;
3670   int __pyx_v_endian_detector;
3671   int __pyx_v_little_endian;
3672   int __pyx_v_t;
3673   char *__pyx_v_f;
3674   PyArray_Descr *__pyx_v_descr = 0;
3675   int __pyx_v_offset;
3676   int __pyx_v_hasfields;
3677   int __pyx_r;
3678   __Pyx_RefNannyDeclarations
3679   int __pyx_t_1;
3680   int __pyx_t_2;
3681   PyObject *__pyx_t_3 = NULL;
3682   int __pyx_t_4;
3683   int __pyx_t_5;
3684   PyObject *__pyx_t_6 = NULL;
3685   char *__pyx_t_7;
3686   __Pyx_RefNannySetupContext("__getbuffer__", 0);
3687   if (__pyx_v_info != NULL) {
3688     __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
3689     __Pyx_GIVEREF(__pyx_v_info->obj);
3690   }
3691
3692   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203
3693  *             # of flags
3694  * 
3695  *             if info == NULL: return             # <<<<<<<<<<<<<<
3696  * 
3697  *             cdef int copy_shape, i, ndim
3698  */
3699   __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
3700   if (__pyx_t_1) {
3701     __pyx_r = 0;
3702     goto __pyx_L0;
3703   }
3704
3705   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206
3706  * 
3707  *             cdef int copy_shape, i, ndim
3708  *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
3709  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
3710  * 
3711  */
3712   __pyx_v_endian_detector = 1;
3713
3714   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":207
3715  *             cdef int copy_shape, i, ndim
3716  *             cdef int endian_detector = 1
3717  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
3718  * 
3719  *             ndim = PyArray_NDIM(self)
3720  */
3721   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
3722
3723   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209
3724  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
3725  * 
3726  *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
3727  * 
3728  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
3729  */
3730   __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
3731
3732   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
3733  *             ndim = PyArray_NDIM(self)
3734  * 
3735  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
3736  *                 copy_shape = 1
3737  *             else:
3738  */
3739   __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
3740   if (__pyx_t_1) {
3741
3742     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":212
3743  * 
3744  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
3745  *                 copy_shape = 1             # <<<<<<<<<<<<<<
3746  *             else:
3747  *                 copy_shape = 0
3748  */
3749     __pyx_v_copy_shape = 1;
3750
3751     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
3752  *             ndim = PyArray_NDIM(self)
3753  * 
3754  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
3755  *                 copy_shape = 1
3756  *             else:
3757  */
3758     goto __pyx_L4;
3759   }
3760
3761   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214
3762  *                 copy_shape = 1
3763  *             else:
3764  *                 copy_shape = 0             # <<<<<<<<<<<<<<
3765  * 
3766  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
3767  */
3768   /*else*/ {
3769     __pyx_v_copy_shape = 0;
3770   }
3771   __pyx_L4:;
3772
3773   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
3774  *                 copy_shape = 0
3775  * 
3776  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
3777  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
3778  *                 raise ValueError(u"ndarray is not C contiguous")
3779  */
3780   __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
3781   if (__pyx_t_2) {
3782   } else {
3783     __pyx_t_1 = __pyx_t_2;
3784     goto __pyx_L6_bool_binop_done;
3785   }
3786
3787   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217
3788  * 
3789  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
3790  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
3791  *                 raise ValueError(u"ndarray is not C contiguous")
3792  * 
3793  */
3794   __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
3795   __pyx_t_1 = __pyx_t_2;
3796   __pyx_L6_bool_binop_done:;
3797
3798   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
3799  *                 copy_shape = 0
3800  * 
3801  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
3802  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
3803  *                 raise ValueError(u"ndarray is not C contiguous")
3804  */
3805   if (__pyx_t_1) {
3806
3807     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
3808  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
3809  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
3810  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
3811  * 
3812  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
3813  */
3814     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __pyx_L1_error)
3815     __Pyx_GOTREF(__pyx_t_3);
3816     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
3817     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3818     __PYX_ERR(1, 218, __pyx_L1_error)
3819
3820     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
3821  *                 copy_shape = 0
3822  * 
3823  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
3824  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
3825  *                 raise ValueError(u"ndarray is not C contiguous")
3826  */
3827   }
3828
3829   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
3830  *                 raise ValueError(u"ndarray is not C contiguous")
3831  * 
3832  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
3833  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
3834  *                 raise ValueError(u"ndarray is not Fortran contiguous")
3835  */
3836   __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
3837   if (__pyx_t_2) {
3838   } else {
3839     __pyx_t_1 = __pyx_t_2;
3840     goto __pyx_L9_bool_binop_done;
3841   }
3842
3843   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221
3844  * 
3845  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
3846  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
3847  *                 raise ValueError(u"ndarray is not Fortran contiguous")
3848  * 
3849  */
3850   __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
3851   __pyx_t_1 = __pyx_t_2;
3852   __pyx_L9_bool_binop_done:;
3853
3854   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
3855  *                 raise ValueError(u"ndarray is not C contiguous")
3856  * 
3857  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
3858  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
3859  *                 raise ValueError(u"ndarray is not Fortran contiguous")
3860  */
3861   if (__pyx_t_1) {
3862
3863     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
3864  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
3865  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
3866  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
3867  * 
3868  *             info.buf = PyArray_DATA(self)
3869  */
3870     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
3871     __Pyx_GOTREF(__pyx_t_3);
3872     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
3873     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3874     __PYX_ERR(1, 222, __pyx_L1_error)
3875
3876     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
3877  *                 raise ValueError(u"ndarray is not C contiguous")
3878  * 
3879  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
3880  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
3881  *                 raise ValueError(u"ndarray is not Fortran contiguous")
3882  */
3883   }
3884
3885   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":224
3886  *                 raise ValueError(u"ndarray is not Fortran contiguous")
3887  * 
3888  *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
3889  *             info.ndim = ndim
3890  *             if copy_shape:
3891  */
3892   __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
3893
3894   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":225
3895  * 
3896  *             info.buf = PyArray_DATA(self)
3897  *             info.ndim = ndim             # <<<<<<<<<<<<<<
3898  *             if copy_shape:
3899  *                 # Allocate new buffer for strides and shape info.
3900  */
3901   __pyx_v_info->ndim = __pyx_v_ndim;
3902
3903   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
3904  *             info.buf = PyArray_DATA(self)
3905  *             info.ndim = ndim
3906  *             if copy_shape:             # <<<<<<<<<<<<<<
3907  *                 # Allocate new buffer for strides and shape info.
3908  *                 # This is allocated as one block, strides first.
3909  */
3910   __pyx_t_1 = (__pyx_v_copy_shape != 0);
3911   if (__pyx_t_1) {
3912
3913     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229
3914  *                 # Allocate new buffer for strides and shape info.
3915  *                 # This is allocated as one block, strides first.
3916  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)             # <<<<<<<<<<<<<<
3917  *                 info.shape = info.strides + ndim
3918  *                 for i in range(ndim):
3919  */
3920     __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
3921
3922     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230
3923  *                 # This is allocated as one block, strides first.
3924  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
3925  *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
3926  *                 for i in range(ndim):
3927  *                     info.strides[i] = PyArray_STRIDES(self)[i]
3928  */
3929     __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
3930
3931     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231
3932  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
3933  *                 info.shape = info.strides + ndim
3934  *                 for i in range(ndim):             # <<<<<<<<<<<<<<
3935  *                     info.strides[i] = PyArray_STRIDES(self)[i]
3936  *                     info.shape[i] = PyArray_DIMS(self)[i]
3937  */
3938     __pyx_t_4 = __pyx_v_ndim;
3939     for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
3940       __pyx_v_i = __pyx_t_5;
3941
3942       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232
3943  *                 info.shape = info.strides + ndim
3944  *                 for i in range(ndim):
3945  *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
3946  *                     info.shape[i] = PyArray_DIMS(self)[i]
3947  *             else:
3948  */
3949       (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
3950
3951       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233
3952  *                 for i in range(ndim):
3953  *                     info.strides[i] = PyArray_STRIDES(self)[i]
3954  *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
3955  *             else:
3956  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
3957  */
3958       (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
3959     }
3960
3961     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
3962  *             info.buf = PyArray_DATA(self)
3963  *             info.ndim = ndim
3964  *             if copy_shape:             # <<<<<<<<<<<<<<
3965  *                 # Allocate new buffer for strides and shape info.
3966  *                 # This is allocated as one block, strides first.
3967  */
3968     goto __pyx_L11;
3969   }
3970
3971   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235
3972  *                     info.shape[i] = PyArray_DIMS(self)[i]
3973  *             else:
3974  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
3975  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
3976  *             info.suboffsets = NULL
3977  */
3978   /*else*/ {
3979     __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
3980
3981     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236
3982  *             else:
3983  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
3984  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
3985  *             info.suboffsets = NULL
3986  *             info.itemsize = PyArray_ITEMSIZE(self)
3987  */
3988     __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
3989   }
3990   __pyx_L11:;
3991
3992   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237
3993  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
3994  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
3995  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
3996  *             info.itemsize = PyArray_ITEMSIZE(self)
3997  *             info.readonly = not PyArray_ISWRITEABLE(self)
3998  */
3999   __pyx_v_info->suboffsets = NULL;
4000
4001   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":238
4002  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
4003  *             info.suboffsets = NULL
4004  *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
4005  *             info.readonly = not PyArray_ISWRITEABLE(self)
4006  * 
4007  */
4008   __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
4009
4010   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239
4011  *             info.suboffsets = NULL
4012  *             info.itemsize = PyArray_ITEMSIZE(self)
4013  *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
4014  * 
4015  *             cdef int t
4016  */
4017   __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
4018
4019   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242
4020  * 
4021  *             cdef int t
4022  *             cdef char* f = NULL             # <<<<<<<<<<<<<<
4023  *             cdef dtype descr = self.descr
4024  *             cdef int offset
4025  */
4026   __pyx_v_f = NULL;
4027
4028   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243
4029  *             cdef int t
4030  *             cdef char* f = NULL
4031  *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
4032  *             cdef int offset
4033  * 
4034  */
4035   __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
4036   __Pyx_INCREF(__pyx_t_3);
4037   __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
4038   __pyx_t_3 = 0;
4039
4040   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246
4041  *             cdef int offset
4042  * 
4043  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
4044  * 
4045  *             if not hasfields and not copy_shape:
4046  */
4047   __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
4048
4049   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
4050  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
4051  * 
4052  *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
4053  *                 # do not call releasebuffer
4054  *                 info.obj = None
4055  */
4056   __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
4057   if (__pyx_t_2) {
4058   } else {
4059     __pyx_t_1 = __pyx_t_2;
4060     goto __pyx_L15_bool_binop_done;
4061   }
4062   __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0);
4063   __pyx_t_1 = __pyx_t_2;
4064   __pyx_L15_bool_binop_done:;
4065   if (__pyx_t_1) {
4066
4067     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":250
4068  *             if not hasfields and not copy_shape:
4069  *                 # do not call releasebuffer
4070  *                 info.obj = None             # <<<<<<<<<<<<<<
4071  *             else:
4072  *                 # need to call releasebuffer
4073  */
4074     __Pyx_INCREF(Py_None);
4075     __Pyx_GIVEREF(Py_None);
4076     __Pyx_GOTREF(__pyx_v_info->obj);
4077     __Pyx_DECREF(__pyx_v_info->obj);
4078     __pyx_v_info->obj = Py_None;
4079
4080     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
4081  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
4082  * 
4083  *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
4084  *                 # do not call releasebuffer
4085  *                 info.obj = None
4086  */
4087     goto __pyx_L14;
4088   }
4089
4090   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253
4091  *             else:
4092  *                 # need to call releasebuffer
4093  *                 info.obj = self             # <<<<<<<<<<<<<<
4094  * 
4095  *             if not hasfields:
4096  */
4097   /*else*/ {
4098     __Pyx_INCREF(((PyObject *)__pyx_v_self));
4099     __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4100     __Pyx_GOTREF(__pyx_v_info->obj);
4101     __Pyx_DECREF(__pyx_v_info->obj);
4102     __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
4103   }
4104   __pyx_L14:;
4105
4106   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
4107  *                 info.obj = self
4108  * 
4109  *             if not hasfields:             # <<<<<<<<<<<<<<
4110  *                 t = descr.type_num
4111  *                 if ((descr.byteorder == c'>' and little_endian) or
4112  */
4113   __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
4114   if (__pyx_t_1) {
4115
4116     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256
4117  * 
4118  *             if not hasfields:
4119  *                 t = descr.type_num             # <<<<<<<<<<<<<<
4120  *                 if ((descr.byteorder == c'>' and little_endian) or
4121  *                     (descr.byteorder == c'<' and not little_endian)):
4122  */
4123     __pyx_t_4 = __pyx_v_descr->type_num;
4124     __pyx_v_t = __pyx_t_4;
4125
4126     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
4127  *             if not hasfields:
4128  *                 t = descr.type_num
4129  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
4130  *                     (descr.byteorder == c'<' and not little_endian)):
4131  *                     raise ValueError(u"Non-native byte order not supported")
4132  */
4133     __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
4134     if (!__pyx_t_2) {
4135       goto __pyx_L20_next_or;
4136     } else {
4137     }
4138     __pyx_t_2 = (__pyx_v_little_endian != 0);
4139     if (!__pyx_t_2) {
4140     } else {
4141       __pyx_t_1 = __pyx_t_2;
4142       goto __pyx_L19_bool_binop_done;
4143     }
4144     __pyx_L20_next_or:;
4145
4146     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
4147  *                 t = descr.type_num
4148  *                 if ((descr.byteorder == c'>' and little_endian) or
4149  *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
4150  *                     raise ValueError(u"Non-native byte order not supported")
4151  *                 if   t == NPY_BYTE:        f = "b"
4152  */
4153     __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
4154     if (__pyx_t_2) {
4155     } else {
4156       __pyx_t_1 = __pyx_t_2;
4157       goto __pyx_L19_bool_binop_done;
4158     }
4159     __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
4160     __pyx_t_1 = __pyx_t_2;
4161     __pyx_L19_bool_binop_done:;
4162
4163     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
4164  *             if not hasfields:
4165  *                 t = descr.type_num
4166  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
4167  *                     (descr.byteorder == c'<' and not little_endian)):
4168  *                     raise ValueError(u"Non-native byte order not supported")
4169  */
4170     if (__pyx_t_1) {
4171
4172       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
4173  *                 if ((descr.byteorder == c'>' and little_endian) or
4174  *                     (descr.byteorder == c'<' and not little_endian)):
4175  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
4176  *                 if   t == NPY_BYTE:        f = "b"
4177  *                 elif t == NPY_UBYTE:       f = "B"
4178  */
4179       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __pyx_L1_error)
4180       __Pyx_GOTREF(__pyx_t_3);
4181       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4182       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4183       __PYX_ERR(1, 259, __pyx_L1_error)
4184
4185       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
4186  *             if not hasfields:
4187  *                 t = descr.type_num
4188  *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
4189  *                     (descr.byteorder == c'<' and not little_endian)):
4190  *                     raise ValueError(u"Non-native byte order not supported")
4191  */
4192     }
4193
4194     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260
4195  *                     (descr.byteorder == c'<' and not little_endian)):
4196  *                     raise ValueError(u"Non-native byte order not supported")
4197  *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
4198  *                 elif t == NPY_UBYTE:       f = "B"
4199  *                 elif t == NPY_SHORT:       f = "h"
4200  */
4201     switch (__pyx_v_t) {
4202       case NPY_BYTE:
4203       __pyx_v_f = ((char *)"b");
4204       break;
4205
4206       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
4207  *                     raise ValueError(u"Non-native byte order not supported")
4208  *                 if   t == NPY_BYTE:        f = "b"
4209  *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
4210  *                 elif t == NPY_SHORT:       f = "h"
4211  *                 elif t == NPY_USHORT:      f = "H"
4212  */
4213       case NPY_UBYTE:
4214       __pyx_v_f = ((char *)"B");
4215       break;
4216
4217       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262
4218  *                 if   t == NPY_BYTE:        f = "b"
4219  *                 elif t == NPY_UBYTE:       f = "B"
4220  *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
4221  *                 elif t == NPY_USHORT:      f = "H"
4222  *                 elif t == NPY_INT:         f = "i"
4223  */
4224       case NPY_SHORT:
4225       __pyx_v_f = ((char *)"h");
4226       break;
4227
4228       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263
4229  *                 elif t == NPY_UBYTE:       f = "B"
4230  *                 elif t == NPY_SHORT:       f = "h"
4231  *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
4232  *                 elif t == NPY_INT:         f = "i"
4233  *                 elif t == NPY_UINT:        f = "I"
4234  */
4235       case NPY_USHORT:
4236       __pyx_v_f = ((char *)"H");
4237       break;
4238
4239       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264
4240  *                 elif t == NPY_SHORT:       f = "h"
4241  *                 elif t == NPY_USHORT:      f = "H"
4242  *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
4243  *                 elif t == NPY_UINT:        f = "I"
4244  *                 elif t == NPY_LONG:        f = "l"
4245  */
4246       case NPY_INT:
4247       __pyx_v_f = ((char *)"i");
4248       break;
4249
4250       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
4251  *                 elif t == NPY_USHORT:      f = "H"
4252  *                 elif t == NPY_INT:         f = "i"
4253  *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
4254  *                 elif t == NPY_LONG:        f = "l"
4255  *                 elif t == NPY_ULONG:       f = "L"
4256  */
4257       case NPY_UINT:
4258       __pyx_v_f = ((char *)"I");
4259       break;
4260
4261       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
4262  *                 elif t == NPY_INT:         f = "i"
4263  *                 elif t == NPY_UINT:        f = "I"
4264  *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
4265  *                 elif t == NPY_ULONG:       f = "L"
4266  *                 elif t == NPY_LONGLONG:    f = "q"
4267  */
4268       case NPY_LONG:
4269       __pyx_v_f = ((char *)"l");
4270       break;
4271
4272       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267
4273  *                 elif t == NPY_UINT:        f = "I"
4274  *                 elif t == NPY_LONG:        f = "l"
4275  *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
4276  *                 elif t == NPY_LONGLONG:    f = "q"
4277  *                 elif t == NPY_ULONGLONG:   f = "Q"
4278  */
4279       case NPY_ULONG:
4280       __pyx_v_f = ((char *)"L");
4281       break;
4282
4283       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
4284  *                 elif t == NPY_LONG:        f = "l"
4285  *                 elif t == NPY_ULONG:       f = "L"
4286  *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
4287  *                 elif t == NPY_ULONGLONG:   f = "Q"
4288  *                 elif t == NPY_FLOAT:       f = "f"
4289  */
4290       case NPY_LONGLONG:
4291       __pyx_v_f = ((char *)"q");
4292       break;
4293
4294       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269
4295  *                 elif t == NPY_ULONG:       f = "L"
4296  *                 elif t == NPY_LONGLONG:    f = "q"
4297  *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
4298  *                 elif t == NPY_FLOAT:       f = "f"
4299  *                 elif t == NPY_DOUBLE:      f = "d"
4300  */
4301       case NPY_ULONGLONG:
4302       __pyx_v_f = ((char *)"Q");
4303       break;
4304
4305       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
4306  *                 elif t == NPY_LONGLONG:    f = "q"
4307  *                 elif t == NPY_ULONGLONG:   f = "Q"
4308  *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
4309  *                 elif t == NPY_DOUBLE:      f = "d"
4310  *                 elif t == NPY_LONGDOUBLE:  f = "g"
4311  */
4312       case NPY_FLOAT:
4313       __pyx_v_f = ((char *)"f");
4314       break;
4315
4316       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
4317  *                 elif t == NPY_ULONGLONG:   f = "Q"
4318  *                 elif t == NPY_FLOAT:       f = "f"
4319  *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
4320  *                 elif t == NPY_LONGDOUBLE:  f = "g"
4321  *                 elif t == NPY_CFLOAT:      f = "Zf"
4322  */
4323       case NPY_DOUBLE:
4324       __pyx_v_f = ((char *)"d");
4325       break;
4326
4327       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
4328  *                 elif t == NPY_FLOAT:       f = "f"
4329  *                 elif t == NPY_DOUBLE:      f = "d"
4330  *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
4331  *                 elif t == NPY_CFLOAT:      f = "Zf"
4332  *                 elif t == NPY_CDOUBLE:     f = "Zd"
4333  */
4334       case NPY_LONGDOUBLE:
4335       __pyx_v_f = ((char *)"g");
4336       break;
4337
4338       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273
4339  *                 elif t == NPY_DOUBLE:      f = "d"
4340  *                 elif t == NPY_LONGDOUBLE:  f = "g"
4341  *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
4342  *                 elif t == NPY_CDOUBLE:     f = "Zd"
4343  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
4344  */
4345       case NPY_CFLOAT:
4346       __pyx_v_f = ((char *)"Zf");
4347       break;
4348
4349       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
4350  *                 elif t == NPY_LONGDOUBLE:  f = "g"
4351  *                 elif t == NPY_CFLOAT:      f = "Zf"
4352  *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
4353  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
4354  *                 elif t == NPY_OBJECT:      f = "O"
4355  */
4356       case NPY_CDOUBLE:
4357       __pyx_v_f = ((char *)"Zd");
4358       break;
4359
4360       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
4361  *                 elif t == NPY_CFLOAT:      f = "Zf"
4362  *                 elif t == NPY_CDOUBLE:     f = "Zd"
4363  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
4364  *                 elif t == NPY_OBJECT:      f = "O"
4365  *                 else:
4366  */
4367       case NPY_CLONGDOUBLE:
4368       __pyx_v_f = ((char *)"Zg");
4369       break;
4370
4371       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
4372  *                 elif t == NPY_CDOUBLE:     f = "Zd"
4373  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
4374  *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
4375  *                 else:
4376  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
4377  */
4378       case NPY_OBJECT:
4379       __pyx_v_f = ((char *)"O");
4380       break;
4381       default:
4382
4383       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
4384  *                 elif t == NPY_OBJECT:      f = "O"
4385  *                 else:
4386  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
4387  *                 info.format = f
4388  *                 return
4389  */
4390       __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
4391       __Pyx_GOTREF(__pyx_t_3);
4392       __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
4393       __Pyx_GOTREF(__pyx_t_6);
4394       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4395       __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
4396       __Pyx_GOTREF(__pyx_t_3);
4397       __Pyx_GIVEREF(__pyx_t_6);
4398       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
4399       __pyx_t_6 = 0;
4400       __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
4401       __Pyx_GOTREF(__pyx_t_6);
4402       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4403       __Pyx_Raise(__pyx_t_6, 0, 0, 0);
4404       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4405       __PYX_ERR(1, 278, __pyx_L1_error)
4406       break;
4407     }
4408
4409     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
4410  *                 else:
4411  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
4412  *                 info.format = f             # <<<<<<<<<<<<<<
4413  *                 return
4414  *             else:
4415  */
4416     __pyx_v_info->format = __pyx_v_f;
4417
4418     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
4419  *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
4420  *                 info.format = f
4421  *                 return             # <<<<<<<<<<<<<<
4422  *             else:
4423  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
4424  */
4425     __pyx_r = 0;
4426     goto __pyx_L0;
4427
4428     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
4429  *                 info.obj = self
4430  * 
4431  *             if not hasfields:             # <<<<<<<<<<<<<<
4432  *                 t = descr.type_num
4433  *                 if ((descr.byteorder == c'>' and little_endian) or
4434  */
4435   }
4436
4437   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282
4438  *                 return
4439  *             else:
4440  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
4441  *                 info.format[0] = c'^' # Native data types, manual alignment
4442  *                 offset = 0
4443  */
4444   /*else*/ {
4445     __pyx_v_info->format = ((char *)malloc(0xFF));
4446
4447     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
4448  *             else:
4449  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
4450  *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
4451  *                 offset = 0
4452  *                 f = _util_dtypestring(descr, info.format + 1,
4453  */
4454     (__pyx_v_info->format[0]) = '^';
4455
4456     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
4457  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
4458  *                 info.format[0] = c'^' # Native data types, manual alignment
4459  *                 offset = 0             # <<<<<<<<<<<<<<
4460  *                 f = _util_dtypestring(descr, info.format + 1,
4461  *                                       info.format + _buffer_format_string_len,
4462  */
4463     __pyx_v_offset = 0;
4464
4465     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
4466  *                 info.format[0] = c'^' # Native data types, manual alignment
4467  *                 offset = 0
4468  *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
4469  *                                       info.format + _buffer_format_string_len,
4470  *                                       &offset)
4471  */
4472     __pyx_t_7 = __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_7 == NULL)) __PYX_ERR(1, 285, __pyx_L1_error)
4473     __pyx_v_f = __pyx_t_7;
4474
4475     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288
4476  *                                       info.format + _buffer_format_string_len,
4477  *                                       &offset)
4478  *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
4479  * 
4480  *         def __releasebuffer__(ndarray self, Py_buffer* info):
4481  */
4482     (__pyx_v_f[0]) = '\x00';
4483   }
4484
4485   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
4486  *         # experimental exception made for __getbuffer__ and __releasebuffer__
4487  *         # -- the details of this may change.
4488  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
4489  *             # This implementation of getbuffer is geared towards Cython
4490  *             # requirements, and does not yet fullfill the PEP.
4491  */
4492
4493   /* function exit code */
4494   __pyx_r = 0;
4495   goto __pyx_L0;
4496   __pyx_L1_error:;
4497   __Pyx_XDECREF(__pyx_t_3);
4498   __Pyx_XDECREF(__pyx_t_6);
4499   __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4500   __pyx_r = -1;
4501   if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
4502     __Pyx_GOTREF(__pyx_v_info->obj);
4503     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
4504   }
4505   goto __pyx_L2;
4506   __pyx_L0:;
4507   if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
4508     __Pyx_GOTREF(Py_None);
4509     __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
4510   }
4511   __pyx_L2:;
4512   __Pyx_XDECREF((PyObject *)__pyx_v_descr);
4513   __Pyx_RefNannyFinishContext();
4514   return __pyx_r;
4515 }
4516
4517 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
4518  *                 f[0] = c'\0' # Terminate format string
4519  * 
4520  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
4521  *             if PyArray_HASFIELDS(self):
4522  *                 stdlib.free(info.format)
4523  */
4524
4525 /* Python wrapper */
4526 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
4527 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
4528   __Pyx_RefNannyDeclarations
4529   __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
4530   __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
4531
4532   /* function exit code */
4533   __Pyx_RefNannyFinishContext();
4534 }
4535
4536 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
4537   __Pyx_RefNannyDeclarations
4538   int __pyx_t_1;
4539   __Pyx_RefNannySetupContext("__releasebuffer__", 0);
4540
4541   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
4542  * 
4543  *         def __releasebuffer__(ndarray self, Py_buffer* info):
4544  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
4545  *                 stdlib.free(info.format)
4546  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
4547  */
4548   __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
4549   if (__pyx_t_1) {
4550
4551     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
4552  *         def __releasebuffer__(ndarray self, Py_buffer* info):
4553  *             if PyArray_HASFIELDS(self):
4554  *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
4555  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
4556  *                 stdlib.free(info.strides)
4557  */
4558     free(__pyx_v_info->format);
4559
4560     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
4561  * 
4562  *         def __releasebuffer__(ndarray self, Py_buffer* info):
4563  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
4564  *                 stdlib.free(info.format)
4565  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
4566  */
4567   }
4568
4569   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
4570  *             if PyArray_HASFIELDS(self):
4571  *                 stdlib.free(info.format)
4572  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
4573  *                 stdlib.free(info.strides)
4574  *                 # info.shape was stored after info.strides in the same block
4575  */
4576   __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
4577   if (__pyx_t_1) {
4578
4579     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294
4580  *                 stdlib.free(info.format)
4581  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
4582  *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
4583  *                 # info.shape was stored after info.strides in the same block
4584  * 
4585  */
4586     free(__pyx_v_info->strides);
4587
4588     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
4589  *             if PyArray_HASFIELDS(self):
4590  *                 stdlib.free(info.format)
4591  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
4592  *                 stdlib.free(info.strides)
4593  *                 # info.shape was stored after info.strides in the same block
4594  */
4595   }
4596
4597   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
4598  *                 f[0] = c'\0' # Terminate format string
4599  * 
4600  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
4601  *             if PyArray_HASFIELDS(self):
4602  *                 stdlib.free(info.format)
4603  */
4604
4605   /* function exit code */
4606   __Pyx_RefNannyFinishContext();
4607 }
4608
4609 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
4610  * ctypedef npy_cdouble     complex_t
4611  * 
4612  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
4613  *     return PyArray_MultiIterNew(1, <void*>a)
4614  * 
4615  */
4616
4617 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
4618   PyObject *__pyx_r = NULL;
4619   __Pyx_RefNannyDeclarations
4620   PyObject *__pyx_t_1 = NULL;
4621   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
4622
4623   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771
4624  * 
4625  * cdef inline object PyArray_MultiIterNew1(a):
4626  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
4627  * 
4628  * cdef inline object PyArray_MultiIterNew2(a, b):
4629  */
4630   __Pyx_XDECREF(__pyx_r);
4631   __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
4632   __Pyx_GOTREF(__pyx_t_1);
4633   __pyx_r = __pyx_t_1;
4634   __pyx_t_1 = 0;
4635   goto __pyx_L0;
4636
4637   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
4638  * ctypedef npy_cdouble     complex_t
4639  * 
4640  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
4641  *     return PyArray_MultiIterNew(1, <void*>a)
4642  * 
4643  */
4644
4645   /* function exit code */
4646   __pyx_L1_error:;
4647   __Pyx_XDECREF(__pyx_t_1);
4648   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
4649   __pyx_r = 0;
4650   __pyx_L0:;
4651   __Pyx_XGIVEREF(__pyx_r);
4652   __Pyx_RefNannyFinishContext();
4653   return __pyx_r;
4654 }
4655
4656 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
4657  *     return PyArray_MultiIterNew(1, <void*>a)
4658  * 
4659  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
4660  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4661  * 
4662  */
4663
4664 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
4665   PyObject *__pyx_r = NULL;
4666   __Pyx_RefNannyDeclarations
4667   PyObject *__pyx_t_1 = NULL;
4668   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
4669
4670   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774
4671  * 
4672  * cdef inline object PyArray_MultiIterNew2(a, b):
4673  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
4674  * 
4675  * cdef inline object PyArray_MultiIterNew3(a, b, c):
4676  */
4677   __Pyx_XDECREF(__pyx_r);
4678   __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 774, __pyx_L1_error)
4679   __Pyx_GOTREF(__pyx_t_1);
4680   __pyx_r = __pyx_t_1;
4681   __pyx_t_1 = 0;
4682   goto __pyx_L0;
4683
4684   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
4685  *     return PyArray_MultiIterNew(1, <void*>a)
4686  * 
4687  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
4688  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4689  * 
4690  */
4691
4692   /* function exit code */
4693   __pyx_L1_error:;
4694   __Pyx_XDECREF(__pyx_t_1);
4695   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
4696   __pyx_r = 0;
4697   __pyx_L0:;
4698   __Pyx_XGIVEREF(__pyx_r);
4699   __Pyx_RefNannyFinishContext();
4700   return __pyx_r;
4701 }
4702
4703 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
4704  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4705  * 
4706  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
4707  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4708  * 
4709  */
4710
4711 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
4712   PyObject *__pyx_r = NULL;
4713   __Pyx_RefNannyDeclarations
4714   PyObject *__pyx_t_1 = NULL;
4715   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
4716
4717   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
4718  * 
4719  * cdef inline object PyArray_MultiIterNew3(a, b, c):
4720  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
4721  * 
4722  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4723  */
4724   __Pyx_XDECREF(__pyx_r);
4725   __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(1, 777, __pyx_L1_error)
4726   __Pyx_GOTREF(__pyx_t_1);
4727   __pyx_r = __pyx_t_1;
4728   __pyx_t_1 = 0;
4729   goto __pyx_L0;
4730
4731   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
4732  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4733  * 
4734  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
4735  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4736  * 
4737  */
4738
4739   /* function exit code */
4740   __pyx_L1_error:;
4741   __Pyx_XDECREF(__pyx_t_1);
4742   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4743   __pyx_r = 0;
4744   __pyx_L0:;
4745   __Pyx_XGIVEREF(__pyx_r);
4746   __Pyx_RefNannyFinishContext();
4747   return __pyx_r;
4748 }
4749
4750 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
4751  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4752  * 
4753  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
4754  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4755  * 
4756  */
4757
4758 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) {
4759   PyObject *__pyx_r = NULL;
4760   __Pyx_RefNannyDeclarations
4761   PyObject *__pyx_t_1 = NULL;
4762   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
4763
4764   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780
4765  * 
4766  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4767  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
4768  * 
4769  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4770  */
4771   __Pyx_XDECREF(__pyx_r);
4772   __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(1, 780, __pyx_L1_error)
4773   __Pyx_GOTREF(__pyx_t_1);
4774   __pyx_r = __pyx_t_1;
4775   __pyx_t_1 = 0;
4776   goto __pyx_L0;
4777
4778   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
4779  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4780  * 
4781  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
4782  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4783  * 
4784  */
4785
4786   /* function exit code */
4787   __pyx_L1_error:;
4788   __Pyx_XDECREF(__pyx_t_1);
4789   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4790   __pyx_r = 0;
4791   __pyx_L0:;
4792   __Pyx_XGIVEREF(__pyx_r);
4793   __Pyx_RefNannyFinishContext();
4794   return __pyx_r;
4795 }
4796
4797 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
4798  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4799  * 
4800  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
4801  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4802  * 
4803  */
4804
4805 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) {
4806   PyObject *__pyx_r = NULL;
4807   __Pyx_RefNannyDeclarations
4808   PyObject *__pyx_t_1 = NULL;
4809   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
4810
4811   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
4812  * 
4813  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4814  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
4815  * 
4816  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
4817  */
4818   __Pyx_XDECREF(__pyx_r);
4819   __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(1, 783, __pyx_L1_error)
4820   __Pyx_GOTREF(__pyx_t_1);
4821   __pyx_r = __pyx_t_1;
4822   __pyx_t_1 = 0;
4823   goto __pyx_L0;
4824
4825   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
4826  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4827  * 
4828  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
4829  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4830  * 
4831  */
4832
4833   /* function exit code */
4834   __pyx_L1_error:;
4835   __Pyx_XDECREF(__pyx_t_1);
4836   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4837   __pyx_r = 0;
4838   __pyx_L0:;
4839   __Pyx_XGIVEREF(__pyx_r);
4840   __Pyx_RefNannyFinishContext();
4841   return __pyx_r;
4842 }
4843
4844 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
4845  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4846  * 
4847  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
4848  *     # Recursive utility function used in __getbuffer__ to get format
4849  *     # string. The new location in the format string is returned.
4850  */
4851
4852 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) {
4853   PyArray_Descr *__pyx_v_child = 0;
4854   int __pyx_v_endian_detector;
4855   int __pyx_v_little_endian;
4856   PyObject *__pyx_v_fields = 0;
4857   PyObject *__pyx_v_childname = NULL;
4858   PyObject *__pyx_v_new_offset = NULL;
4859   PyObject *__pyx_v_t = NULL;
4860   char *__pyx_r;
4861   __Pyx_RefNannyDeclarations
4862   PyObject *__pyx_t_1 = NULL;
4863   Py_ssize_t __pyx_t_2;
4864   PyObject *__pyx_t_3 = NULL;
4865   PyObject *__pyx_t_4 = NULL;
4866   int __pyx_t_5;
4867   int __pyx_t_6;
4868   int __pyx_t_7;
4869   long __pyx_t_8;
4870   char *__pyx_t_9;
4871   __Pyx_RefNannySetupContext("_util_dtypestring", 0);
4872
4873   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
4874  * 
4875  *     cdef dtype child
4876  *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
4877  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
4878  *     cdef tuple fields
4879  */
4880   __pyx_v_endian_detector = 1;
4881
4882   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
4883  *     cdef dtype child
4884  *     cdef int endian_detector = 1
4885  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
4886  *     cdef tuple fields
4887  * 
4888  */
4889   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
4890
4891   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
4892  *     cdef tuple fields
4893  * 
4894  *     for childname in descr.names:             # <<<<<<<<<<<<<<
4895  *         fields = descr.fields[childname]
4896  *         child, new_offset = fields
4897  */
4898   if (unlikely(__pyx_v_descr->names == Py_None)) {
4899     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
4900     __PYX_ERR(1, 794, __pyx_L1_error)
4901   }
4902   __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
4903   for (;;) {
4904     if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
4905     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4906     __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(1, 794, __pyx_L1_error)
4907     #else
4908     __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
4909     __Pyx_GOTREF(__pyx_t_3);
4910     #endif
4911     __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
4912     __pyx_t_3 = 0;
4913
4914     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795
4915  * 
4916  *     for childname in descr.names:
4917  *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
4918  *         child, new_offset = fields
4919  * 
4920  */
4921     if (unlikely(__pyx_v_descr->fields == Py_None)) {
4922       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
4923       __PYX_ERR(1, 795, __pyx_L1_error)
4924     }
4925     __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 795, __pyx_L1_error)
4926     __Pyx_GOTREF(__pyx_t_3);
4927     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(1, 795, __pyx_L1_error)
4928     __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
4929     __pyx_t_3 = 0;
4930
4931     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796
4932  *     for childname in descr.names:
4933  *         fields = descr.fields[childname]
4934  *         child, new_offset = fields             # <<<<<<<<<<<<<<
4935  * 
4936  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
4937  */
4938     if (likely(__pyx_v_fields != Py_None)) {
4939       PyObject* sequence = __pyx_v_fields;
4940       #if !CYTHON_COMPILING_IN_PYPY
4941       Py_ssize_t size = Py_SIZE(sequence);
4942       #else
4943       Py_ssize_t size = PySequence_Size(sequence);
4944       #endif
4945       if (unlikely(size != 2)) {
4946         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
4947         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
4948         __PYX_ERR(1, 796, __pyx_L1_error)
4949       }
4950       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4951       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
4952       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
4953       __Pyx_INCREF(__pyx_t_3);
4954       __Pyx_INCREF(__pyx_t_4);
4955       #else
4956       __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
4957       __Pyx_GOTREF(__pyx_t_3);
4958       __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
4959       __Pyx_GOTREF(__pyx_t_4);
4960       #endif
4961     } else {
4962       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
4963     }
4964     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 796, __pyx_L1_error)
4965     __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
4966     __pyx_t_3 = 0;
4967     __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
4968     __pyx_t_4 = 0;
4969
4970     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
4971  *         child, new_offset = fields
4972  * 
4973  *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
4974  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
4975  * 
4976  */
4977     __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 798, __pyx_L1_error)
4978     __Pyx_GOTREF(__pyx_t_4);
4979     __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
4980     __Pyx_GOTREF(__pyx_t_3);
4981     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4982     __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
4983     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4984     __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
4985     if (__pyx_t_6) {
4986
4987       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
4988  * 
4989  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
4990  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
4991  * 
4992  *         if ((child.byteorder == c'>' and little_endian) or
4993  */
4994       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
4995       __Pyx_GOTREF(__pyx_t_3);
4996       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4997       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4998       __PYX_ERR(1, 799, __pyx_L1_error)
4999
5000       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
5001  *         child, new_offset = fields
5002  * 
5003  *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
5004  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
5005  * 
5006  */
5007     }
5008
5009     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
5010  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
5011  * 
5012  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
5013  *             (child.byteorder == c'<' and not little_endian)):
5014  *             raise ValueError(u"Non-native byte order not supported")
5015  */
5016     __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
5017     if (!__pyx_t_7) {
5018       goto __pyx_L8_next_or;
5019     } else {
5020     }
5021     __pyx_t_7 = (__pyx_v_little_endian != 0);
5022     if (!__pyx_t_7) {
5023     } else {
5024       __pyx_t_6 = __pyx_t_7;
5025       goto __pyx_L7_bool_binop_done;
5026     }
5027     __pyx_L8_next_or:;
5028
5029     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
5030  * 
5031  *         if ((child.byteorder == c'>' and little_endian) or
5032  *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
5033  *             raise ValueError(u"Non-native byte order not supported")
5034  *             # One could encode it in the format string and have Cython
5035  */
5036     __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
5037     if (__pyx_t_7) {
5038     } else {
5039       __pyx_t_6 = __pyx_t_7;
5040       goto __pyx_L7_bool_binop_done;
5041     }
5042     __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
5043     __pyx_t_6 = __pyx_t_7;
5044     __pyx_L7_bool_binop_done:;
5045
5046     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
5047  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
5048  * 
5049  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
5050  *             (child.byteorder == c'<' and not little_endian)):
5051  *             raise ValueError(u"Non-native byte order not supported")
5052  */
5053     if (__pyx_t_6) {
5054
5055       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
5056  *         if ((child.byteorder == c'>' and little_endian) or
5057  *             (child.byteorder == c'<' and not little_endian)):
5058  *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
5059  *             # One could encode it in the format string and have Cython
5060  *             # complain instead, BUT: < and > in format strings also imply
5061  */
5062       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __pyx_L1_error)
5063       __Pyx_GOTREF(__pyx_t_3);
5064       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5065       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5066       __PYX_ERR(1, 803, __pyx_L1_error)
5067
5068       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
5069  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
5070  * 
5071  *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
5072  *             (child.byteorder == c'<' and not little_endian)):
5073  *             raise ValueError(u"Non-native byte order not supported")
5074  */
5075     }
5076
5077     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
5078  * 
5079  *         # Output padding bytes
5080  *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
5081  *             f[0] = 120 # "x"; pad byte
5082  *             f += 1
5083  */
5084     while (1) {
5085       __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 813, __pyx_L1_error)
5086       __Pyx_GOTREF(__pyx_t_3);
5087       __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(1, 813, __pyx_L1_error)
5088       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5089       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
5090       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5091       if (!__pyx_t_6) break;
5092
5093       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814
5094  *         # Output padding bytes
5095  *         while offset[0] < new_offset:
5096  *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
5097  *             f += 1
5098  *             offset[0] += 1
5099  */
5100       (__pyx_v_f[0]) = 0x78;
5101
5102       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
5103  *         while offset[0] < new_offset:
5104  *             f[0] = 120 # "x"; pad byte
5105  *             f += 1             # <<<<<<<<<<<<<<
5106  *             offset[0] += 1
5107  * 
5108  */
5109       __pyx_v_f = (__pyx_v_f + 1);
5110
5111       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
5112  *             f[0] = 120 # "x"; pad byte
5113  *             f += 1
5114  *             offset[0] += 1             # <<<<<<<<<<<<<<
5115  * 
5116  *         offset[0] += child.itemsize
5117  */
5118       __pyx_t_8 = 0;
5119       (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
5120     }
5121
5122     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818
5123  *             offset[0] += 1
5124  * 
5125  *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
5126  * 
5127  *         if not PyDataType_HASFIELDS(child):
5128  */
5129     __pyx_t_8 = 0;
5130     (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
5131
5132     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
5133  *         offset[0] += child.itemsize
5134  * 
5135  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
5136  *             t = child.type_num
5137  *             if end - f < 5:
5138  */
5139     __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
5140     if (__pyx_t_6) {
5141
5142       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
5143  * 
5144  *         if not PyDataType_HASFIELDS(child):
5145  *             t = child.type_num             # <<<<<<<<<<<<<<
5146  *             if end - f < 5:
5147  *                 raise RuntimeError(u"Format string allocated too short.")
5148  */
5149       __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
5150       __Pyx_GOTREF(__pyx_t_4);
5151       __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
5152       __pyx_t_4 = 0;
5153
5154       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
5155  *         if not PyDataType_HASFIELDS(child):
5156  *             t = child.type_num
5157  *             if end - f < 5:             # <<<<<<<<<<<<<<
5158  *                 raise RuntimeError(u"Format string allocated too short.")
5159  * 
5160  */
5161       __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
5162       if (__pyx_t_6) {
5163
5164         /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
5165  *             t = child.type_num
5166  *             if end - f < 5:
5167  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
5168  * 
5169  *             # Until ticket #99 is fixed, use integers to avoid warnings
5170  */
5171         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __pyx_L1_error)
5172         __Pyx_GOTREF(__pyx_t_4);
5173         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
5174         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5175         __PYX_ERR(1, 823, __pyx_L1_error)
5176
5177         /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
5178  *         if not PyDataType_HASFIELDS(child):
5179  *             t = child.type_num
5180  *             if end - f < 5:             # <<<<<<<<<<<<<<
5181  *                 raise RuntimeError(u"Format string allocated too short.")
5182  * 
5183  */
5184       }
5185
5186       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826
5187  * 
5188  *             # Until ticket #99 is fixed, use integers to avoid warnings
5189  *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
5190  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
5191  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
5192  */
5193       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
5194       __Pyx_GOTREF(__pyx_t_4);
5195       __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(1, 826, __pyx_L1_error)
5196       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5197       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
5198       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5199       if (__pyx_t_6) {
5200         (__pyx_v_f[0]) = 98;
5201         goto __pyx_L15;
5202       }
5203
5204       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
5205  *             # Until ticket #99 is fixed, use integers to avoid warnings
5206  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
5207  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
5208  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
5209  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
5210  */
5211       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
5212       __Pyx_GOTREF(__pyx_t_3);
5213       __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(1, 827, __pyx_L1_error)
5214       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5215       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
5216       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5217       if (__pyx_t_6) {
5218         (__pyx_v_f[0]) = 66;
5219         goto __pyx_L15;
5220       }
5221
5222       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
5223  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
5224  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
5225  *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
5226  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
5227  *             elif t == NPY_INT:         f[0] = 105 #"i"
5228  */
5229       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
5230       __Pyx_GOTREF(__pyx_t_4);
5231       __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(1, 828, __pyx_L1_error)
5232       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5233       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
5234       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5235       if (__pyx_t_6) {
5236         (__pyx_v_f[0]) = 0x68;
5237         goto __pyx_L15;
5238       }
5239
5240       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829
5241  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
5242  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
5243  *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
5244  *             elif t == NPY_INT:         f[0] = 105 #"i"
5245  *             elif t == NPY_UINT:        f[0] =  73 #"I"
5246  */
5247       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
5248       __Pyx_GOTREF(__pyx_t_3);
5249       __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(1, 829, __pyx_L1_error)
5250       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5251       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
5252       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5253       if (__pyx_t_6) {
5254         (__pyx_v_f[0]) = 72;
5255         goto __pyx_L15;
5256       }
5257
5258       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
5259  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
5260  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
5261  *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
5262  *             elif t == NPY_UINT:        f[0] =  73 #"I"
5263  *             elif t == NPY_LONG:        f[0] = 108 #"l"
5264  */
5265       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
5266       __Pyx_GOTREF(__pyx_t_4);
5267       __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(1, 830, __pyx_L1_error)
5268       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5269       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
5270       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5271       if (__pyx_t_6) {
5272         (__pyx_v_f[0]) = 0x69;
5273         goto __pyx_L15;
5274       }
5275
5276       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
5277  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
5278  *             elif t == NPY_INT:         f[0] = 105 #"i"
5279  *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
5280  *             elif t == NPY_LONG:        f[0] = 108 #"l"
5281  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
5282  */
5283       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
5284       __Pyx_GOTREF(__pyx_t_3);
5285       __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(1, 831, __pyx_L1_error)
5286       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5287       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
5288       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5289       if (__pyx_t_6) {
5290         (__pyx_v_f[0]) = 73;
5291         goto __pyx_L15;
5292       }
5293
5294       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832
5295  *             elif t == NPY_INT:         f[0] = 105 #"i"
5296  *             elif t == NPY_UINT:        f[0] =  73 #"I"
5297  *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
5298  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
5299  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
5300  */
5301       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
5302       __Pyx_GOTREF(__pyx_t_4);
5303       __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(1, 832, __pyx_L1_error)
5304       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5305       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
5306       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5307       if (__pyx_t_6) {
5308         (__pyx_v_f[0]) = 0x6C;
5309         goto __pyx_L15;
5310       }
5311
5312       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
5313  *             elif t == NPY_UINT:        f[0] =  73 #"I"
5314  *             elif t == NPY_LONG:        f[0] = 108 #"l"
5315  *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
5316  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
5317  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
5318  */
5319       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
5320       __Pyx_GOTREF(__pyx_t_3);
5321       __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(1, 833, __pyx_L1_error)
5322       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5323       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
5324       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5325       if (__pyx_t_6) {
5326         (__pyx_v_f[0]) = 76;
5327         goto __pyx_L15;
5328       }
5329
5330       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
5331  *             elif t == NPY_LONG:        f[0] = 108 #"l"
5332  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
5333  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
5334  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
5335  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
5336  */
5337       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
5338       __Pyx_GOTREF(__pyx_t_4);
5339       __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(1, 834, __pyx_L1_error)
5340       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5341       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
5342       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5343       if (__pyx_t_6) {
5344         (__pyx_v_f[0]) = 0x71;
5345         goto __pyx_L15;
5346       }
5347
5348       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835
5349  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
5350  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
5351  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
5352  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
5353  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
5354  */
5355       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
5356       __Pyx_GOTREF(__pyx_t_3);
5357       __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(1, 835, __pyx_L1_error)
5358       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5359       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
5360       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5361       if (__pyx_t_6) {
5362         (__pyx_v_f[0]) = 81;
5363         goto __pyx_L15;
5364       }
5365
5366       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
5367  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
5368  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
5369  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
5370  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
5371  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
5372  */
5373       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
5374       __Pyx_GOTREF(__pyx_t_4);
5375       __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(1, 836, __pyx_L1_error)
5376       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5377       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
5378       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5379       if (__pyx_t_6) {
5380         (__pyx_v_f[0]) = 0x66;
5381         goto __pyx_L15;
5382       }
5383
5384       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
5385  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
5386  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
5387  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
5388  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
5389  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
5390  */
5391       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
5392       __Pyx_GOTREF(__pyx_t_3);
5393       __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(1, 837, __pyx_L1_error)
5394       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5395       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
5396       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5397       if (__pyx_t_6) {
5398         (__pyx_v_f[0]) = 0x64;
5399         goto __pyx_L15;
5400       }
5401
5402       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
5403  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
5404  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
5405  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
5406  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
5407  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
5408  */
5409       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
5410       __Pyx_GOTREF(__pyx_t_4);
5411       __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(1, 838, __pyx_L1_error)
5412       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5413       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
5414       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5415       if (__pyx_t_6) {
5416         (__pyx_v_f[0]) = 0x67;
5417         goto __pyx_L15;
5418       }
5419
5420       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839
5421  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
5422  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
5423  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
5424  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
5425  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
5426  */
5427       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
5428       __Pyx_GOTREF(__pyx_t_3);
5429       __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(1, 839, __pyx_L1_error)
5430       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5431       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
5432       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5433       if (__pyx_t_6) {
5434         (__pyx_v_f[0]) = 90;
5435         (__pyx_v_f[1]) = 0x66;
5436         __pyx_v_f = (__pyx_v_f + 1);
5437         goto __pyx_L15;
5438       }
5439
5440       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
5441  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
5442  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
5443  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
5444  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
5445  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
5446  */
5447       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
5448       __Pyx_GOTREF(__pyx_t_4);
5449       __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(1, 840, __pyx_L1_error)
5450       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5451       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
5452       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5453       if (__pyx_t_6) {
5454         (__pyx_v_f[0]) = 90;
5455         (__pyx_v_f[1]) = 0x64;
5456         __pyx_v_f = (__pyx_v_f + 1);
5457         goto __pyx_L15;
5458       }
5459
5460       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841
5461  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
5462  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
5463  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
5464  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
5465  *             else:
5466  */
5467       __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
5468       __Pyx_GOTREF(__pyx_t_3);
5469       __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(1, 841, __pyx_L1_error)
5470       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5471       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
5472       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5473       if (__pyx_t_6) {
5474         (__pyx_v_f[0]) = 90;
5475         (__pyx_v_f[1]) = 0x67;
5476         __pyx_v_f = (__pyx_v_f + 1);
5477         goto __pyx_L15;
5478       }
5479
5480       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
5481  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
5482  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
5483  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
5484  *             else:
5485  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
5486  */
5487       __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
5488       __Pyx_GOTREF(__pyx_t_4);
5489       __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(1, 842, __pyx_L1_error)
5490       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5491       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
5492       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5493       if (__pyx_t_6) {
5494         (__pyx_v_f[0]) = 79;
5495         goto __pyx_L15;
5496       }
5497
5498       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844
5499  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
5500  *             else:
5501  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
5502  *             f += 1
5503  *         else:
5504  */
5505       /*else*/ {
5506         __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
5507         __Pyx_GOTREF(__pyx_t_3);
5508         __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error)
5509         __Pyx_GOTREF(__pyx_t_4);
5510         __Pyx_GIVEREF(__pyx_t_3);
5511         PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
5512         __pyx_t_3 = 0;
5513         __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
5514         __Pyx_GOTREF(__pyx_t_3);
5515         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5516         __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5517         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5518         __PYX_ERR(1, 844, __pyx_L1_error)
5519       }
5520       __pyx_L15:;
5521
5522       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845
5523  *             else:
5524  *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
5525  *             f += 1             # <<<<<<<<<<<<<<
5526  *         else:
5527  *             # Cython ignores struct boundary information ("T{...}"),
5528  */
5529       __pyx_v_f = (__pyx_v_f + 1);
5530
5531       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
5532  *         offset[0] += child.itemsize
5533  * 
5534  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
5535  *             t = child.type_num
5536  *             if end - f < 5:
5537  */
5538       goto __pyx_L13;
5539     }
5540
5541     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849
5542  *             # Cython ignores struct boundary information ("T{...}"),
5543  *             # so don't output it
5544  *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
5545  *     return f
5546  * 
5547  */
5548     /*else*/ {
5549       __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 == NULL)) __PYX_ERR(1, 849, __pyx_L1_error)
5550       __pyx_v_f = __pyx_t_9;
5551     }
5552     __pyx_L13:;
5553
5554     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
5555  *     cdef tuple fields
5556  * 
5557  *     for childname in descr.names:             # <<<<<<<<<<<<<<
5558  *         fields = descr.fields[childname]
5559  *         child, new_offset = fields
5560  */
5561   }
5562   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5563
5564   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850
5565  *             # so don't output it
5566  *             f = _util_dtypestring(child, f, end, offset)
5567  *     return f             # <<<<<<<<<<<<<<
5568  * 
5569  * 
5570  */
5571   __pyx_r = __pyx_v_f;
5572   goto __pyx_L0;
5573
5574   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
5575  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
5576  * 
5577  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
5578  *     # Recursive utility function used in __getbuffer__ to get format
5579  *     # string. The new location in the format string is returned.
5580  */
5581
5582   /* function exit code */
5583   __pyx_L1_error:;
5584   __Pyx_XDECREF(__pyx_t_1);
5585   __Pyx_XDECREF(__pyx_t_3);
5586   __Pyx_XDECREF(__pyx_t_4);
5587   __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
5588   __pyx_r = NULL;
5589   __pyx_L0:;
5590   __Pyx_XDECREF((PyObject *)__pyx_v_child);
5591   __Pyx_XDECREF(__pyx_v_fields);
5592   __Pyx_XDECREF(__pyx_v_childname);
5593   __Pyx_XDECREF(__pyx_v_new_offset);
5594   __Pyx_XDECREF(__pyx_v_t);
5595   __Pyx_RefNannyFinishContext();
5596   return __pyx_r;
5597 }
5598
5599 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
5600  * 
5601  * 
5602  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
5603  *      cdef PyObject* baseptr
5604  *      if base is None:
5605  */
5606
5607 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
5608   PyObject *__pyx_v_baseptr;
5609   __Pyx_RefNannyDeclarations
5610   int __pyx_t_1;
5611   int __pyx_t_2;
5612   __Pyx_RefNannySetupContext("set_array_base", 0);
5613
5614   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
5615  * cdef inline void set_array_base(ndarray arr, object base):
5616  *      cdef PyObject* baseptr
5617  *      if base is None:             # <<<<<<<<<<<<<<
5618  *          baseptr = NULL
5619  *      else:
5620  */
5621   __pyx_t_1 = (__pyx_v_base == Py_None);
5622   __pyx_t_2 = (__pyx_t_1 != 0);
5623   if (__pyx_t_2) {
5624
5625     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969
5626  *      cdef PyObject* baseptr
5627  *      if base is None:
5628  *          baseptr = NULL             # <<<<<<<<<<<<<<
5629  *      else:
5630  *          Py_INCREF(base) # important to do this before decref below!
5631  */
5632     __pyx_v_baseptr = NULL;
5633
5634     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
5635  * cdef inline void set_array_base(ndarray arr, object base):
5636  *      cdef PyObject* baseptr
5637  *      if base is None:             # <<<<<<<<<<<<<<
5638  *          baseptr = NULL
5639  *      else:
5640  */
5641     goto __pyx_L3;
5642   }
5643
5644   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971
5645  *          baseptr = NULL
5646  *      else:
5647  *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
5648  *          baseptr = <PyObject*>base
5649  *      Py_XDECREF(arr.base)
5650  */
5651   /*else*/ {
5652     Py_INCREF(__pyx_v_base);
5653
5654     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972
5655  *      else:
5656  *          Py_INCREF(base) # important to do this before decref below!
5657  *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
5658  *      Py_XDECREF(arr.base)
5659  *      arr.base = baseptr
5660  */
5661     __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
5662   }
5663   __pyx_L3:;
5664
5665   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973
5666  *          Py_INCREF(base) # important to do this before decref below!
5667  *          baseptr = <PyObject*>base
5668  *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
5669  *      arr.base = baseptr
5670  * 
5671  */
5672   Py_XDECREF(__pyx_v_arr->base);
5673
5674   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974
5675  *          baseptr = <PyObject*>base
5676  *      Py_XDECREF(arr.base)
5677  *      arr.base = baseptr             # <<<<<<<<<<<<<<
5678  * 
5679  * cdef inline object get_array_base(ndarray arr):
5680  */
5681   __pyx_v_arr->base = __pyx_v_baseptr;
5682
5683   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
5684  * 
5685  * 
5686  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
5687  *      cdef PyObject* baseptr
5688  *      if base is None:
5689  */
5690
5691   /* function exit code */
5692   __Pyx_RefNannyFinishContext();
5693 }
5694
5695 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
5696  *      arr.base = baseptr
5697  * 
5698  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
5699  *     if arr.base is NULL:
5700  *         return None
5701  */
5702
5703 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
5704   PyObject *__pyx_r = NULL;
5705   __Pyx_RefNannyDeclarations
5706   int __pyx_t_1;
5707   __Pyx_RefNannySetupContext("get_array_base", 0);
5708
5709   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
5710  * 
5711  * cdef inline object get_array_base(ndarray arr):
5712  *     if arr.base is NULL:             # <<<<<<<<<<<<<<
5713  *         return None
5714  *     else:
5715  */
5716   __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
5717   if (__pyx_t_1) {
5718
5719     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978
5720  * cdef inline object get_array_base(ndarray arr):
5721  *     if arr.base is NULL:
5722  *         return None             # <<<<<<<<<<<<<<
5723  *     else:
5724  *         return <object>arr.base
5725  */
5726     __Pyx_XDECREF(__pyx_r);
5727     __Pyx_INCREF(Py_None);
5728     __pyx_r = Py_None;
5729     goto __pyx_L0;
5730
5731     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
5732  * 
5733  * cdef inline object get_array_base(ndarray arr):
5734  *     if arr.base is NULL:             # <<<<<<<<<<<<<<
5735  *         return None
5736  *     else:
5737  */
5738   }
5739
5740   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980
5741  *         return None
5742  *     else:
5743  *         return <object>arr.base             # <<<<<<<<<<<<<<
5744  * 
5745  * 
5746  */
5747   /*else*/ {
5748     __Pyx_XDECREF(__pyx_r);
5749     __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
5750     __pyx_r = ((PyObject *)__pyx_v_arr->base);
5751     goto __pyx_L0;
5752   }
5753
5754   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
5755  *      arr.base = baseptr
5756  * 
5757  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
5758  *     if arr.base is NULL:
5759  *         return None
5760  */
5761
5762   /* function exit code */
5763   __pyx_L0:;
5764   __Pyx_XGIVEREF(__pyx_r);
5765   __Pyx_RefNannyFinishContext();
5766   return __pyx_r;
5767 }
5768
5769 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
5770  * # Versions of the import_* functions which are more suitable for
5771  * # Cython code.
5772  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
5773  *     try:
5774  *         _import_array()
5775  */
5776
5777 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
5778   int __pyx_r;
5779   __Pyx_RefNannyDeclarations
5780   PyObject *__pyx_t_1 = NULL;
5781   PyObject *__pyx_t_2 = NULL;
5782   PyObject *__pyx_t_3 = NULL;
5783   int __pyx_t_4;
5784   PyObject *__pyx_t_5 = NULL;
5785   PyObject *__pyx_t_6 = NULL;
5786   PyObject *__pyx_t_7 = NULL;
5787   PyObject *__pyx_t_8 = NULL;
5788   __Pyx_RefNannySetupContext("import_array", 0);
5789
5790   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
5791  * # Cython code.
5792  * cdef inline int import_array() except -1:
5793  *     try:             # <<<<<<<<<<<<<<
5794  *         _import_array()
5795  *     except Exception:
5796  */
5797   {
5798     __Pyx_PyThreadState_declare
5799     __Pyx_PyThreadState_assign
5800     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5801     __Pyx_XGOTREF(__pyx_t_1);
5802     __Pyx_XGOTREF(__pyx_t_2);
5803     __Pyx_XGOTREF(__pyx_t_3);
5804     /*try:*/ {
5805
5806       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":987
5807  * cdef inline int import_array() except -1:
5808  *     try:
5809  *         _import_array()             # <<<<<<<<<<<<<<
5810  *     except Exception:
5811  *         raise ImportError("numpy.core.multiarray failed to import")
5812  */
5813       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error)
5814
5815       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
5816  * # Cython code.
5817  * cdef inline int import_array() except -1:
5818  *     try:             # <<<<<<<<<<<<<<
5819  *         _import_array()
5820  *     except Exception:
5821  */
5822     }
5823     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5824     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5825     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5826     goto __pyx_L10_try_end;
5827     __pyx_L3_error:;
5828     __Pyx_PyThreadState_assign
5829
5830     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":988
5831  *     try:
5832  *         _import_array()
5833  *     except Exception:             # <<<<<<<<<<<<<<
5834  *         raise ImportError("numpy.core.multiarray failed to import")
5835  * 
5836  */
5837     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5838     if (__pyx_t_4) {
5839       __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5840       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 988, __pyx_L5_except_error)
5841       __Pyx_GOTREF(__pyx_t_5);
5842       __Pyx_GOTREF(__pyx_t_6);
5843       __Pyx_GOTREF(__pyx_t_7);
5844
5845       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
5846  *         _import_array()
5847  *     except Exception:
5848  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
5849  * 
5850  * cdef inline int import_umath() except -1:
5851  */
5852       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 989, __pyx_L5_except_error)
5853       __Pyx_GOTREF(__pyx_t_8);
5854       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5855       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5856       __PYX_ERR(1, 989, __pyx_L5_except_error)
5857     }
5858     goto __pyx_L5_except_error;
5859     __pyx_L5_except_error:;
5860
5861     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
5862  * # Cython code.
5863  * cdef inline int import_array() except -1:
5864  *     try:             # <<<<<<<<<<<<<<
5865  *         _import_array()
5866  *     except Exception:
5867  */
5868     __Pyx_PyThreadState_assign
5869     __Pyx_XGIVEREF(__pyx_t_1);
5870     __Pyx_XGIVEREF(__pyx_t_2);
5871     __Pyx_XGIVEREF(__pyx_t_3);
5872     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5873     goto __pyx_L1_error;
5874     __pyx_L10_try_end:;
5875   }
5876
5877   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
5878  * # Versions of the import_* functions which are more suitable for
5879  * # Cython code.
5880  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
5881  *     try:
5882  *         _import_array()
5883  */
5884
5885   /* function exit code */
5886   __pyx_r = 0;
5887   goto __pyx_L0;
5888   __pyx_L1_error:;
5889   __Pyx_XDECREF(__pyx_t_5);
5890   __Pyx_XDECREF(__pyx_t_6);
5891   __Pyx_XDECREF(__pyx_t_7);
5892   __Pyx_XDECREF(__pyx_t_8);
5893   __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5894   __pyx_r = -1;
5895   __pyx_L0:;
5896   __Pyx_RefNannyFinishContext();
5897   return __pyx_r;
5898 }
5899
5900 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
5901  *         raise ImportError("numpy.core.multiarray failed to import")
5902  * 
5903  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
5904  *     try:
5905  *         _import_umath()
5906  */
5907
5908 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
5909   int __pyx_r;
5910   __Pyx_RefNannyDeclarations
5911   PyObject *__pyx_t_1 = NULL;
5912   PyObject *__pyx_t_2 = NULL;
5913   PyObject *__pyx_t_3 = NULL;
5914   int __pyx_t_4;
5915   PyObject *__pyx_t_5 = NULL;
5916   PyObject *__pyx_t_6 = NULL;
5917   PyObject *__pyx_t_7 = NULL;
5918   PyObject *__pyx_t_8 = NULL;
5919   __Pyx_RefNannySetupContext("import_umath", 0);
5920
5921   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
5922  * 
5923  * cdef inline int import_umath() except -1:
5924  *     try:             # <<<<<<<<<<<<<<
5925  *         _import_umath()
5926  *     except Exception:
5927  */
5928   {
5929     __Pyx_PyThreadState_declare
5930     __Pyx_PyThreadState_assign
5931     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5932     __Pyx_XGOTREF(__pyx_t_1);
5933     __Pyx_XGOTREF(__pyx_t_2);
5934     __Pyx_XGOTREF(__pyx_t_3);
5935     /*try:*/ {
5936
5937       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":993
5938  * cdef inline int import_umath() except -1:
5939  *     try:
5940  *         _import_umath()             # <<<<<<<<<<<<<<
5941  *     except Exception:
5942  *         raise ImportError("numpy.core.umath failed to import")
5943  */
5944       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error)
5945
5946       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
5947  * 
5948  * cdef inline int import_umath() except -1:
5949  *     try:             # <<<<<<<<<<<<<<
5950  *         _import_umath()
5951  *     except Exception:
5952  */
5953     }
5954     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5955     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5956     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5957     goto __pyx_L10_try_end;
5958     __pyx_L3_error:;
5959     __Pyx_PyThreadState_assign
5960
5961     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":994
5962  *     try:
5963  *         _import_umath()
5964  *     except Exception:             # <<<<<<<<<<<<<<
5965  *         raise ImportError("numpy.core.umath failed to import")
5966  * 
5967  */
5968     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5969     if (__pyx_t_4) {
5970       __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5971       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 994, __pyx_L5_except_error)
5972       __Pyx_GOTREF(__pyx_t_5);
5973       __Pyx_GOTREF(__pyx_t_6);
5974       __Pyx_GOTREF(__pyx_t_7);
5975
5976       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":995
5977  *         _import_umath()
5978  *     except Exception:
5979  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
5980  * 
5981  * cdef inline int import_ufunc() except -1:
5982  */
5983       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 995, __pyx_L5_except_error)
5984       __Pyx_GOTREF(__pyx_t_8);
5985       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5986       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5987       __PYX_ERR(1, 995, __pyx_L5_except_error)
5988     }
5989     goto __pyx_L5_except_error;
5990     __pyx_L5_except_error:;
5991
5992     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
5993  * 
5994  * cdef inline int import_umath() except -1:
5995  *     try:             # <<<<<<<<<<<<<<
5996  *         _import_umath()
5997  *     except Exception:
5998  */
5999     __Pyx_PyThreadState_assign
6000     __Pyx_XGIVEREF(__pyx_t_1);
6001     __Pyx_XGIVEREF(__pyx_t_2);
6002     __Pyx_XGIVEREF(__pyx_t_3);
6003     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
6004     goto __pyx_L1_error;
6005     __pyx_L10_try_end:;
6006   }
6007
6008   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
6009  *         raise ImportError("numpy.core.multiarray failed to import")
6010  * 
6011  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
6012  *     try:
6013  *         _import_umath()
6014  */
6015
6016   /* function exit code */
6017   __pyx_r = 0;
6018   goto __pyx_L0;
6019   __pyx_L1_error:;
6020   __Pyx_XDECREF(__pyx_t_5);
6021   __Pyx_XDECREF(__pyx_t_6);
6022   __Pyx_XDECREF(__pyx_t_7);
6023   __Pyx_XDECREF(__pyx_t_8);
6024   __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
6025   __pyx_r = -1;
6026   __pyx_L0:;
6027   __Pyx_RefNannyFinishContext();
6028   return __pyx_r;
6029 }
6030
6031 /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
6032  *         raise ImportError("numpy.core.umath failed to import")
6033  * 
6034  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
6035  *     try:
6036  *         _import_umath()
6037  */
6038
6039 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
6040   int __pyx_r;
6041   __Pyx_RefNannyDeclarations
6042   PyObject *__pyx_t_1 = NULL;
6043   PyObject *__pyx_t_2 = NULL;
6044   PyObject *__pyx_t_3 = NULL;
6045   int __pyx_t_4;
6046   PyObject *__pyx_t_5 = NULL;
6047   PyObject *__pyx_t_6 = NULL;
6048   PyObject *__pyx_t_7 = NULL;
6049   PyObject *__pyx_t_8 = NULL;
6050   __Pyx_RefNannySetupContext("import_ufunc", 0);
6051
6052   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
6053  * 
6054  * cdef inline int import_ufunc() except -1:
6055  *     try:             # <<<<<<<<<<<<<<
6056  *         _import_umath()
6057  *     except Exception:
6058  */
6059   {
6060     __Pyx_PyThreadState_declare
6061     __Pyx_PyThreadState_assign
6062     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
6063     __Pyx_XGOTREF(__pyx_t_1);
6064     __Pyx_XGOTREF(__pyx_t_2);
6065     __Pyx_XGOTREF(__pyx_t_3);
6066     /*try:*/ {
6067
6068       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":999
6069  * cdef inline int import_ufunc() except -1:
6070  *     try:
6071  *         _import_umath()             # <<<<<<<<<<<<<<
6072  *     except Exception:
6073  *         raise ImportError("numpy.core.umath failed to import")
6074  */
6075       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error)
6076
6077       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
6078  * 
6079  * cdef inline int import_ufunc() except -1:
6080  *     try:             # <<<<<<<<<<<<<<
6081  *         _import_umath()
6082  *     except Exception:
6083  */
6084     }
6085     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6086     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6087     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6088     goto __pyx_L10_try_end;
6089     __pyx_L3_error:;
6090     __Pyx_PyThreadState_assign
6091
6092     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1000
6093  *     try:
6094  *         _import_umath()
6095  *     except Exception:             # <<<<<<<<<<<<<<
6096  *         raise ImportError("numpy.core.umath failed to import")
6097  */
6098     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
6099     if (__pyx_t_4) {
6100       __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
6101       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1000, __pyx_L5_except_error)
6102       __Pyx_GOTREF(__pyx_t_5);
6103       __Pyx_GOTREF(__pyx_t_6);
6104       __Pyx_GOTREF(__pyx_t_7);
6105
6106       /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1001
6107  *         _import_umath()
6108  *     except Exception:
6109  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
6110  */
6111       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1001, __pyx_L5_except_error)
6112       __Pyx_GOTREF(__pyx_t_8);
6113       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6114       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6115       __PYX_ERR(1, 1001, __pyx_L5_except_error)
6116     }
6117     goto __pyx_L5_except_error;
6118     __pyx_L5_except_error:;
6119
6120     /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
6121  * 
6122  * cdef inline int import_ufunc() except -1:
6123  *     try:             # <<<<<<<<<<<<<<
6124  *         _import_umath()
6125  *     except Exception:
6126  */
6127     __Pyx_PyThreadState_assign
6128     __Pyx_XGIVEREF(__pyx_t_1);
6129     __Pyx_XGIVEREF(__pyx_t_2);
6130     __Pyx_XGIVEREF(__pyx_t_3);
6131     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
6132     goto __pyx_L1_error;
6133     __pyx_L10_try_end:;
6134   }
6135
6136   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
6137  *         raise ImportError("numpy.core.umath failed to import")
6138  * 
6139  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
6140  *     try:
6141  *         _import_umath()
6142  */
6143
6144   /* function exit code */
6145   __pyx_r = 0;
6146   goto __pyx_L0;
6147   __pyx_L1_error:;
6148   __Pyx_XDECREF(__pyx_t_5);
6149   __Pyx_XDECREF(__pyx_t_6);
6150   __Pyx_XDECREF(__pyx_t_7);
6151   __Pyx_XDECREF(__pyx_t_8);
6152   __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
6153   __pyx_r = -1;
6154   __pyx_L0:;
6155   __Pyx_RefNannyFinishContext();
6156   return __pyx_r;
6157 }
6158
6159 static PyMethodDef __pyx_methods[] = {
6160   {0, 0, 0, 0}
6161 };
6162
6163 #if PY_MAJOR_VERSION >= 3
6164 static struct PyModuleDef __pyx_moduledef = {
6165   #if PY_VERSION_HEX < 0x03020000
6166     { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
6167   #else
6168     PyModuleDef_HEAD_INIT,
6169   #endif
6170     "cython_nms",
6171     0, /* m_doc */
6172     -1, /* m_size */
6173     __pyx_methods /* m_methods */,
6174     NULL, /* m_reload */
6175     NULL, /* m_traverse */
6176     NULL, /* m_clear */
6177     NULL /* m_free */
6178 };
6179 #endif
6180
6181 static __Pyx_StringTabEntry __pyx_string_tab[] = {
6182   {&__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},
6183   {&__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},
6184   {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
6185   {&__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},
6186   {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
6187   {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
6188   {&__pyx_n_s_areas, __pyx_k_areas, sizeof(__pyx_k_areas), 0, 0, 1, 1},
6189   {&__pyx_n_s_argsort, __pyx_k_argsort, sizeof(__pyx_k_argsort), 0, 0, 1, 1},
6190   {&__pyx_n_s_cython_nms, __pyx_k_cython_nms, sizeof(__pyx_k_cython_nms), 0, 0, 1, 1},
6191   {&__pyx_n_s_dets, __pyx_k_dets, sizeof(__pyx_k_dets), 0, 0, 1, 1},
6192   {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
6193   {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
6194   {&__pyx_kp_s_home_yjr_PycharmProjects_Faster, __pyx_k_home_yjr_PycharmProjects_Faster, sizeof(__pyx_k_home_yjr_PycharmProjects_Faster), 0, 0, 1, 0},
6195   {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
6196   {&__pyx_n_s_i_2, __pyx_k_i_2, sizeof(__pyx_k_i_2), 0, 0, 1, 1},
6197   {&__pyx_n_s_iarea, __pyx_k_iarea, sizeof(__pyx_k_iarea), 0, 0, 1, 1},
6198   {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
6199   {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
6200   {&__pyx_n_s_inter, __pyx_k_inter, sizeof(__pyx_k_inter), 0, 0, 1, 1},
6201   {&__pyx_n_s_ix1, __pyx_k_ix1, sizeof(__pyx_k_ix1), 0, 0, 1, 1},
6202   {&__pyx_n_s_ix2, __pyx_k_ix2, sizeof(__pyx_k_ix2), 0, 0, 1, 1},
6203   {&__pyx_n_s_iy1, __pyx_k_iy1, sizeof(__pyx_k_iy1), 0, 0, 1, 1},
6204   {&__pyx_n_s_iy2, __pyx_k_iy2, sizeof(__pyx_k_iy2), 0, 0, 1, 1},
6205   {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
6206   {&__pyx_n_s_j_2, __pyx_k_j_2, sizeof(__pyx_k_j_2), 0, 0, 1, 1},
6207   {&__pyx_n_s_keep, __pyx_k_keep, sizeof(__pyx_k_keep), 0, 0, 1, 1},
6208   {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
6209   {&__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},
6210   {&__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},
6211   {&__pyx_n_s_ndets, __pyx_k_ndets, sizeof(__pyx_k_ndets), 0, 0, 1, 1},
6212   {&__pyx_n_s_nms, __pyx_k_nms, sizeof(__pyx_k_nms), 0, 0, 1, 1},
6213   {&__pyx_n_s_nms_new, __pyx_k_nms_new, sizeof(__pyx_k_nms_new), 0, 0, 1, 1},
6214   {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
6215   {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
6216   {&__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},
6217   {&__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},
6218   {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},
6219   {&__pyx_n_s_ovr, __pyx_k_ovr, sizeof(__pyx_k_ovr), 0, 0, 1, 1},
6220   {&__pyx_n_s_ovr1, __pyx_k_ovr1, sizeof(__pyx_k_ovr1), 0, 0, 1, 1},
6221   {&__pyx_n_s_ovr2, __pyx_k_ovr2, sizeof(__pyx_k_ovr2), 0, 0, 1, 1},
6222   {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
6223   {&__pyx_n_s_scores, __pyx_k_scores, sizeof(__pyx_k_scores), 0, 0, 1, 1},
6224   {&__pyx_n_s_suppressed, __pyx_k_suppressed, sizeof(__pyx_k_suppressed), 0, 0, 1, 1},
6225   {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
6226   {&__pyx_n_s_thresh, __pyx_k_thresh, sizeof(__pyx_k_thresh), 0, 0, 1, 1},
6227   {&__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},
6228   {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
6229   {&__pyx_n_s_x1, __pyx_k_x1, sizeof(__pyx_k_x1), 0, 0, 1, 1},
6230   {&__pyx_n_s_x2, __pyx_k_x2, sizeof(__pyx_k_x2), 0, 0, 1, 1},
6231   {&__pyx_n_s_xx1, __pyx_k_xx1, sizeof(__pyx_k_xx1), 0, 0, 1, 1},
6232   {&__pyx_n_s_xx2, __pyx_k_xx2, sizeof(__pyx_k_xx2), 0, 0, 1, 1},
6233   {&__pyx_n_s_y1, __pyx_k_y1, sizeof(__pyx_k_y1), 0, 0, 1, 1},
6234   {&__pyx_n_s_y2, __pyx_k_y2, sizeof(__pyx_k_y2), 0, 0, 1, 1},
6235   {&__pyx_n_s_yy1, __pyx_k_yy1, sizeof(__pyx_k_yy1), 0, 0, 1, 1},
6236   {&__pyx_n_s_yy2, __pyx_k_yy2, sizeof(__pyx_k_yy2), 0, 0, 1, 1},
6237   {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
6238   {0, 0, 0, 0, 0, 0, 0}
6239 };
6240 static int __Pyx_InitCachedBuiltins(void) {
6241   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 43, __pyx_L1_error)
6242   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 218, __pyx_L1_error)
6243   __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 799, __pyx_L1_error)
6244   __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 989, __pyx_L1_error)
6245   return 0;
6246   __pyx_L1_error:;
6247   return -1;
6248 }
6249
6250 static int __Pyx_InitCachedConstants(void) {
6251   __Pyx_RefNannyDeclarations
6252   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
6253
6254   /* "nms.pyx":18
6255  * 
6256  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
6257  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]             # <<<<<<<<<<<<<<
6258  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6259  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
6260  */
6261   __pyx_slice_ = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice_)) __PYX_ERR(0, 18, __pyx_L1_error)
6262   __Pyx_GOTREF(__pyx_slice_);
6263   __Pyx_GIVEREF(__pyx_slice_);
6264   __pyx_tuple__2 = PyTuple_Pack(2, __pyx_slice_, __pyx_int_0); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 18, __pyx_L1_error)
6265   __Pyx_GOTREF(__pyx_tuple__2);
6266   __Pyx_GIVEREF(__pyx_tuple__2);
6267
6268   /* "nms.pyx":19
6269  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
6270  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
6271  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]             # <<<<<<<<<<<<<<
6272  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
6273  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
6274  */
6275   __pyx_slice__3 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 19, __pyx_L1_error)
6276   __Pyx_GOTREF(__pyx_slice__3);
6277   __Pyx_GIVEREF(__pyx_slice__3);
6278   __pyx_tuple__4 = PyTuple_Pack(2, __pyx_slice__3, __pyx_int_1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 19, __pyx_L1_error)
6279   __Pyx_GOTREF(__pyx_tuple__4);
6280   __Pyx_GIVEREF(__pyx_tuple__4);
6281
6282   /* "nms.pyx":20
6283  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
6284  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6285  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]             # <<<<<<<<<<<<<<
6286  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
6287  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
6288  */
6289   __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 20, __pyx_L1_error)
6290   __Pyx_GOTREF(__pyx_slice__5);
6291   __Pyx_GIVEREF(__pyx_slice__5);
6292   __pyx_tuple__6 = PyTuple_Pack(2, __pyx_slice__5, __pyx_int_2); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 20, __pyx_L1_error)
6293   __Pyx_GOTREF(__pyx_tuple__6);
6294   __Pyx_GIVEREF(__pyx_tuple__6);
6295
6296   /* "nms.pyx":21
6297  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6298  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
6299  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]             # <<<<<<<<<<<<<<
6300  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
6301  * 
6302  */
6303   __pyx_slice__7 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(0, 21, __pyx_L1_error)
6304   __Pyx_GOTREF(__pyx_slice__7);
6305   __Pyx_GIVEREF(__pyx_slice__7);
6306   __pyx_tuple__8 = PyTuple_Pack(2, __pyx_slice__7, __pyx_int_3); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 21, __pyx_L1_error)
6307   __Pyx_GOTREF(__pyx_tuple__8);
6308   __Pyx_GIVEREF(__pyx_tuple__8);
6309
6310   /* "nms.pyx":22
6311  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
6312  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
6313  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]             # <<<<<<<<<<<<<<
6314  * 
6315  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)
6316  */
6317   __pyx_slice__9 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__9)) __PYX_ERR(0, 22, __pyx_L1_error)
6318   __Pyx_GOTREF(__pyx_slice__9);
6319   __Pyx_GIVEREF(__pyx_slice__9);
6320   __pyx_tuple__10 = PyTuple_Pack(2, __pyx_slice__9, __pyx_int_4); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 22, __pyx_L1_error)
6321   __Pyx_GOTREF(__pyx_tuple__10);
6322   __Pyx_GIVEREF(__pyx_tuple__10);
6323
6324   /* "nms.pyx":25
6325  * 
6326  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)
6327  *     cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]             # <<<<<<<<<<<<<<
6328  * 
6329  *     cdef int ndets = dets.shape[0]
6330  */
6331   __pyx_slice__11 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 25, __pyx_L1_error)
6332   __Pyx_GOTREF(__pyx_slice__11);
6333   __Pyx_GIVEREF(__pyx_slice__11);
6334
6335   /* "nms.pyx":71
6336  * 
6337  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
6338  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]             # <<<<<<<<<<<<<<
6339  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6340  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
6341  */
6342   __pyx_slice__12 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 71, __pyx_L1_error)
6343   __Pyx_GOTREF(__pyx_slice__12);
6344   __Pyx_GIVEREF(__pyx_slice__12);
6345   __pyx_tuple__13 = PyTuple_Pack(2, __pyx_slice__12, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 71, __pyx_L1_error)
6346   __Pyx_GOTREF(__pyx_tuple__13);
6347   __Pyx_GIVEREF(__pyx_tuple__13);
6348
6349   /* "nms.pyx":72
6350  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):
6351  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
6352  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]             # <<<<<<<<<<<<<<
6353  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
6354  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
6355  */
6356   __pyx_slice__14 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 72, __pyx_L1_error)
6357   __Pyx_GOTREF(__pyx_slice__14);
6358   __Pyx_GIVEREF(__pyx_slice__14);
6359   __pyx_tuple__15 = PyTuple_Pack(2, __pyx_slice__14, __pyx_int_1); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 72, __pyx_L1_error)
6360   __Pyx_GOTREF(__pyx_tuple__15);
6361   __Pyx_GIVEREF(__pyx_tuple__15);
6362
6363   /* "nms.pyx":73
6364  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
6365  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6366  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]             # <<<<<<<<<<<<<<
6367  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
6368  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
6369  */
6370   __pyx_slice__16 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 73, __pyx_L1_error)
6371   __Pyx_GOTREF(__pyx_slice__16);
6372   __Pyx_GIVEREF(__pyx_slice__16);
6373   __pyx_tuple__17 = PyTuple_Pack(2, __pyx_slice__16, __pyx_int_2); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 73, __pyx_L1_error)
6374   __Pyx_GOTREF(__pyx_tuple__17);
6375   __Pyx_GIVEREF(__pyx_tuple__17);
6376
6377   /* "nms.pyx":74
6378  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6379  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
6380  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]             # <<<<<<<<<<<<<<
6381  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]
6382  * 
6383  */
6384   __pyx_slice__18 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 74, __pyx_L1_error)
6385   __Pyx_GOTREF(__pyx_slice__18);
6386   __Pyx_GIVEREF(__pyx_slice__18);
6387   __pyx_tuple__19 = PyTuple_Pack(2, __pyx_slice__18, __pyx_int_3); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 74, __pyx_L1_error)
6388   __Pyx_GOTREF(__pyx_tuple__19);
6389   __Pyx_GIVEREF(__pyx_tuple__19);
6390
6391   /* "nms.pyx":75
6392  *     cdef np.ndarray[np.float32_t, ndim=1] x2 = dets[:, 2]
6393  *     cdef np.ndarray[np.float32_t, ndim=1] y2 = dets[:, 3]
6394  *     cdef np.ndarray[np.float32_t, ndim=1] scores = dets[:, 4]             # <<<<<<<<<<<<<<
6395  * 
6396  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)
6397  */
6398   __pyx_slice__20 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 75, __pyx_L1_error)
6399   __Pyx_GOTREF(__pyx_slice__20);
6400   __Pyx_GIVEREF(__pyx_slice__20);
6401   __pyx_tuple__21 = PyTuple_Pack(2, __pyx_slice__20, __pyx_int_4); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 75, __pyx_L1_error)
6402   __Pyx_GOTREF(__pyx_tuple__21);
6403   __Pyx_GIVEREF(__pyx_tuple__21);
6404
6405   /* "nms.pyx":78
6406  * 
6407  *     cdef np.ndarray[np.float32_t, ndim=1] areas = (x2 - x1 + 1) * (y2 - y1 + 1)
6408  *     cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]             # <<<<<<<<<<<<<<
6409  * 
6410  *     cdef int ndets = dets.shape[0]
6411  */
6412   __pyx_slice__22 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__22)) __PYX_ERR(0, 78, __pyx_L1_error)
6413   __Pyx_GOTREF(__pyx_slice__22);
6414   __Pyx_GIVEREF(__pyx_slice__22);
6415
6416   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
6417  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
6418  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
6419  *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
6420  * 
6421  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
6422  */
6423   __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 218, __pyx_L1_error)
6424   __Pyx_GOTREF(__pyx_tuple__23);
6425   __Pyx_GIVEREF(__pyx_tuple__23);
6426
6427   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
6428  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
6429  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
6430  *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
6431  * 
6432  *             info.buf = PyArray_DATA(self)
6433  */
6434   __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 222, __pyx_L1_error)
6435   __Pyx_GOTREF(__pyx_tuple__24);
6436   __Pyx_GIVEREF(__pyx_tuple__24);
6437
6438   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
6439  *                 if ((descr.byteorder == c'>' and little_endian) or
6440  *                     (descr.byteorder == c'<' and not little_endian)):
6441  *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
6442  *                 if   t == NPY_BYTE:        f = "b"
6443  *                 elif t == NPY_UBYTE:       f = "B"
6444  */
6445   __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 259, __pyx_L1_error)
6446   __Pyx_GOTREF(__pyx_tuple__25);
6447   __Pyx_GIVEREF(__pyx_tuple__25);
6448
6449   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
6450  * 
6451  *         if (end - f) - <int>(new_offset - offset[0]) < 15:
6452  *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
6453  * 
6454  *         if ((child.byteorder == c'>' and little_endian) or
6455  */
6456   __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 799, __pyx_L1_error)
6457   __Pyx_GOTREF(__pyx_tuple__26);
6458   __Pyx_GIVEREF(__pyx_tuple__26);
6459
6460   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
6461  *         if ((child.byteorder == c'>' and little_endian) or
6462  *             (child.byteorder == c'<' and not little_endian)):
6463  *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
6464  *             # One could encode it in the format string and have Cython
6465  *             # complain instead, BUT: < and > in format strings also imply
6466  */
6467   __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 803, __pyx_L1_error)
6468   __Pyx_GOTREF(__pyx_tuple__27);
6469   __Pyx_GIVEREF(__pyx_tuple__27);
6470
6471   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
6472  *             t = child.type_num
6473  *             if end - f < 5:
6474  *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
6475  * 
6476  *             # Until ticket #99 is fixed, use integers to avoid warnings
6477  */
6478   __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 823, __pyx_L1_error)
6479   __Pyx_GOTREF(__pyx_tuple__28);
6480   __Pyx_GIVEREF(__pyx_tuple__28);
6481
6482   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
6483  *         _import_array()
6484  *     except Exception:
6485  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
6486  * 
6487  * cdef inline int import_umath() except -1:
6488  */
6489   __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 989, __pyx_L1_error)
6490   __Pyx_GOTREF(__pyx_tuple__29);
6491   __Pyx_GIVEREF(__pyx_tuple__29);
6492
6493   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":995
6494  *         _import_umath()
6495  *     except Exception:
6496  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
6497  * 
6498  * cdef inline int import_ufunc() except -1:
6499  */
6500   __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 995, __pyx_L1_error)
6501   __Pyx_GOTREF(__pyx_tuple__30);
6502   __Pyx_GIVEREF(__pyx_tuple__30);
6503
6504   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1001
6505  *         _import_umath()
6506  *     except Exception:
6507  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
6508  */
6509   __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 1001, __pyx_L1_error)
6510   __Pyx_GOTREF(__pyx_tuple__31);
6511   __Pyx_GIVEREF(__pyx_tuple__31);
6512
6513   /* "nms.pyx":17
6514  *     return a if a <= b else b
6515  * 
6516  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):             # <<<<<<<<<<<<<<
6517  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
6518  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6519  */
6520   __pyx_tuple__32 = PyTuple_Pack(29, __pyx_n_s_dets, __pyx_n_s_thresh, __pyx_n_s_x1, __pyx_n_s_y1, __pyx_n_s_x2, __pyx_n_s_y2, __pyx_n_s_scores, __pyx_n_s_areas, __pyx_n_s_order, __pyx_n_s_ndets, __pyx_n_s_suppressed, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_i_2, __pyx_n_s_j_2, __pyx_n_s_ix1, __pyx_n_s_iy1, __pyx_n_s_ix2, __pyx_n_s_iy2, __pyx_n_s_iarea, __pyx_n_s_xx1, __pyx_n_s_yy1, __pyx_n_s_xx2, __pyx_n_s_yy2, __pyx_n_s_w, __pyx_n_s_h, __pyx_n_s_inter, __pyx_n_s_ovr, __pyx_n_s_keep); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 17, __pyx_L1_error)
6521   __Pyx_GOTREF(__pyx_tuple__32);
6522   __Pyx_GIVEREF(__pyx_tuple__32);
6523   __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 29, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yjr_PycharmProjects_Faster, __pyx_n_s_nms, 17, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 17, __pyx_L1_error)
6524
6525   /* "nms.pyx":70
6526  *     return keep
6527  * 
6528  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):             # <<<<<<<<<<<<<<
6529  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
6530  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6531  */
6532   __pyx_tuple__34 = PyTuple_Pack(31, __pyx_n_s_dets, __pyx_n_s_thresh, __pyx_n_s_x1, __pyx_n_s_y1, __pyx_n_s_x2, __pyx_n_s_y2, __pyx_n_s_scores, __pyx_n_s_areas, __pyx_n_s_order, __pyx_n_s_ndets, __pyx_n_s_suppressed, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_i_2, __pyx_n_s_j_2, __pyx_n_s_ix1, __pyx_n_s_iy1, __pyx_n_s_ix2, __pyx_n_s_iy2, __pyx_n_s_iarea, __pyx_n_s_xx1, __pyx_n_s_yy1, __pyx_n_s_xx2, __pyx_n_s_yy2, __pyx_n_s_w, __pyx_n_s_h, __pyx_n_s_inter, __pyx_n_s_ovr, __pyx_n_s_keep, __pyx_n_s_ovr1, __pyx_n_s_ovr2); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 70, __pyx_L1_error)
6533   __Pyx_GOTREF(__pyx_tuple__34);
6534   __Pyx_GIVEREF(__pyx_tuple__34);
6535   __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 31, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_yjr_PycharmProjects_Faster, __pyx_n_s_nms_new, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 70, __pyx_L1_error)
6536   __Pyx_RefNannyFinishContext();
6537   return 0;
6538   __pyx_L1_error:;
6539   __Pyx_RefNannyFinishContext();
6540   return -1;
6541 }
6542
6543 static int __Pyx_InitGlobals(void) {
6544   if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
6545   __pyx_float_0_95 = PyFloat_FromDouble(0.95); if (unlikely(!__pyx_float_0_95)) __PYX_ERR(0, 1, __pyx_L1_error)
6546   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
6547   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
6548   __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
6549   __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
6550   __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
6551   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
6552   return 0;
6553   __pyx_L1_error:;
6554   return -1;
6555 }
6556
6557 #if PY_MAJOR_VERSION < 3
6558 PyMODINIT_FUNC initcython_nms(void); /*proto*/
6559 PyMODINIT_FUNC initcython_nms(void)
6560 #else
6561 PyMODINIT_FUNC PyInit_cython_nms(void); /*proto*/
6562 PyMODINIT_FUNC PyInit_cython_nms(void)
6563 #endif
6564 {
6565   PyObject *__pyx_t_1 = NULL;
6566   __Pyx_RefNannyDeclarations
6567   #if CYTHON_REFNANNY
6568   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
6569   if (!__Pyx_RefNanny) {
6570       PyErr_Clear();
6571       __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
6572       if (!__Pyx_RefNanny)
6573           Py_FatalError("failed to import 'refnanny' module");
6574   }
6575   #endif
6576   __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_cython_nms(void)", 0);
6577   if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6578   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
6579   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
6580   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
6581   #ifdef __Pyx_CyFunction_USED
6582   if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6583   #endif
6584   #ifdef __Pyx_FusedFunction_USED
6585   if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6586   #endif
6587   #ifdef __Pyx_Coroutine_USED
6588   if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6589   #endif
6590   #ifdef __Pyx_Generator_USED
6591   if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6592   #endif
6593   #ifdef __Pyx_StopAsyncIteration_USED
6594   if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6595   #endif
6596   /*--- Library function declarations ---*/
6597   /*--- Threads initialization code ---*/
6598   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
6599   #ifdef WITH_THREAD /* Python build with threading support? */
6600   PyEval_InitThreads();
6601   #endif
6602   #endif
6603   /*--- Module creation code ---*/
6604   #if PY_MAJOR_VERSION < 3
6605   __pyx_m = Py_InitModule4("cython_nms", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
6606   #else
6607   __pyx_m = PyModule_Create(&__pyx_moduledef);
6608   #endif
6609   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
6610   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
6611   Py_INCREF(__pyx_d);
6612   __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
6613   #if CYTHON_COMPILING_IN_PYPY
6614   Py_INCREF(__pyx_b);
6615   #endif
6616   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
6617   /*--- Initialize various global constants etc. ---*/
6618   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6619   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
6620   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6621   #endif
6622   if (__pyx_module_is_main_cython_nms) {
6623     if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6624   }
6625   #if PY_MAJOR_VERSION >= 3
6626   {
6627     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
6628     if (!PyDict_GetItemString(modules, "cython_nms")) {
6629       if (unlikely(PyDict_SetItemString(modules, "cython_nms", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
6630     }
6631   }
6632   #endif
6633   /*--- Builtin init code ---*/
6634   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6635   /*--- Constants init code ---*/
6636   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6637   /*--- Global init code ---*/
6638   /*--- Variable export code ---*/
6639   /*--- Function export code ---*/
6640   /*--- Type init code ---*/
6641   /*--- Type import code ---*/
6642   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
6643   #if CYTHON_COMPILING_IN_PYPY
6644   sizeof(PyTypeObject),
6645   #else
6646   sizeof(PyHeapTypeObject),
6647   #endif
6648   0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(2, 9, __pyx_L1_error)
6649   __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(1, 155, __pyx_L1_error)
6650   __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(1, 168, __pyx_L1_error)
6651   __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(1, 172, __pyx_L1_error)
6652   __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(1, 181, __pyx_L1_error)
6653   __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(1, 861, __pyx_L1_error)
6654   /*--- Variable import code ---*/
6655   /*--- Function import code ---*/
6656   /*--- Execution code ---*/
6657   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
6658   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6659   #endif
6660
6661   /* "nms.pyx":8
6662  * # --------------------------------------------------------
6663  * 
6664  * import numpy as np             # <<<<<<<<<<<<<<
6665  * cimport numpy as np
6666  * 
6667  */
6668   __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
6669   __Pyx_GOTREF(__pyx_t_1);
6670   if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
6671   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6672
6673   /* "nms.pyx":17
6674  *     return a if a <= b else b
6675  * 
6676  * def nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):             # <<<<<<<<<<<<<<
6677  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
6678  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6679  */
6680   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cython_nms_1nms, NULL, __pyx_n_s_cython_nms); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
6681   __Pyx_GOTREF(__pyx_t_1);
6682   if (PyDict_SetItem(__pyx_d, __pyx_n_s_nms, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
6683   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6684
6685   /* "nms.pyx":70
6686  *     return keep
6687  * 
6688  * def nms_new(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh):             # <<<<<<<<<<<<<<
6689  *     cdef np.ndarray[np.float32_t, ndim=1] x1 = dets[:, 0]
6690  *     cdef np.ndarray[np.float32_t, ndim=1] y1 = dets[:, 1]
6691  */
6692   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cython_nms_3nms_new, NULL, __pyx_n_s_cython_nms); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
6693   __Pyx_GOTREF(__pyx_t_1);
6694   if (PyDict_SetItem(__pyx_d, __pyx_n_s_nms_new, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
6695   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6696
6697   /* "nms.pyx":1
6698  * # --------------------------------------------------------             # <<<<<<<<<<<<<<
6699  * # Fast R-CNN
6700  * # Copyright (c) 2015 Microsoft
6701  */
6702   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
6703   __Pyx_GOTREF(__pyx_t_1);
6704   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6705   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6706
6707   /* "../../../../../softWares/anaconda/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
6708  *         raise ImportError("numpy.core.umath failed to import")
6709  * 
6710  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
6711  *     try:
6712  *         _import_umath()
6713  */
6714
6715   /*--- Wrapped vars code ---*/
6716
6717   goto __pyx_L0;
6718   __pyx_L1_error:;
6719   __Pyx_XDECREF(__pyx_t_1);
6720   if (__pyx_m) {
6721     if (__pyx_d) {
6722       __Pyx_AddTraceback("init cython_nms", __pyx_clineno, __pyx_lineno, __pyx_filename);
6723     }
6724     Py_DECREF(__pyx_m); __pyx_m = 0;
6725   } else if (!PyErr_Occurred()) {
6726     PyErr_SetString(PyExc_ImportError, "init cython_nms");
6727   }
6728   __pyx_L0:;
6729   __Pyx_RefNannyFinishContext();
6730   #if PY_MAJOR_VERSION < 3
6731   return;
6732   #else
6733   return __pyx_m;
6734   #endif
6735 }
6736
6737 /* --- Runtime support code --- */
6738 /* Refnanny */
6739 #if CYTHON_REFNANNY
6740 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
6741     PyObject *m = NULL, *p = NULL;
6742     void *r = NULL;
6743     m = PyImport_ImportModule((char *)modname);
6744     if (!m) goto end;
6745     p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
6746     if (!p) goto end;
6747     r = PyLong_AsVoidPtr(p);
6748 end:
6749     Py_XDECREF(p);
6750     Py_XDECREF(m);
6751     return (__Pyx_RefNannyAPIStruct *)r;
6752 }
6753 #endif
6754
6755 /* GetBuiltinName */
6756 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
6757     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
6758     if (unlikely(!result)) {
6759         PyErr_Format(PyExc_NameError,
6760 #if PY_MAJOR_VERSION >= 3
6761             "name '%U' is not defined", name);
6762 #else
6763             "name '%.200s' is not defined", PyString_AS_STRING(name));
6764 #endif
6765     }
6766     return result;
6767 }
6768
6769 /* RaiseArgTupleInvalid */
6770 static void __Pyx_RaiseArgtupleInvalid(
6771     const char* func_name,
6772     int exact,
6773     Py_ssize_t num_min,
6774     Py_ssize_t num_max,
6775     Py_ssize_t num_found)
6776 {
6777     Py_ssize_t num_expected;
6778     const char *more_or_less;
6779     if (num_found < num_min) {
6780         num_expected = num_min;
6781         more_or_less = "at least";
6782     } else {
6783         num_expected = num_max;
6784         more_or_less = "at most";
6785     }
6786     if (exact) {
6787         more_or_less = "exactly";
6788     }
6789     PyErr_Format(PyExc_TypeError,
6790                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
6791                  func_name, more_or_less, num_expected,
6792                  (num_expected == 1) ? "" : "s", num_found);
6793 }
6794
6795 /* RaiseDoubleKeywords */
6796 static void __Pyx_RaiseDoubleKeywordsError(
6797     const char* func_name,
6798     PyObject* kw_name)
6799 {
6800     PyErr_Format(PyExc_TypeError,
6801         #if PY_MAJOR_VERSION >= 3
6802         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
6803         #else
6804         "%s() got multiple values for keyword argument '%s'", func_name,
6805         PyString_AsString(kw_name));
6806         #endif
6807 }
6808
6809 /* ParseKeywords */
6810 static int __Pyx_ParseOptionalKeywords(
6811     PyObject *kwds,
6812     PyObject **argnames[],
6813     PyObject *kwds2,
6814     PyObject *values[],
6815     Py_ssize_t num_pos_args,
6816     const char* function_name)
6817 {
6818     PyObject *key = 0, *value = 0;
6819     Py_ssize_t pos = 0;
6820     PyObject*** name;
6821     PyObject*** first_kw_arg = argnames + num_pos_args;
6822     while (PyDict_Next(kwds, &pos, &key, &value)) {
6823         name = first_kw_arg;
6824         while (*name && (**name != key)) name++;
6825         if (*name) {
6826             values[name-argnames] = value;
6827             continue;
6828         }
6829         name = first_kw_arg;
6830         #if PY_MAJOR_VERSION < 3
6831         if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
6832             while (*name) {
6833                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
6834                         && _PyString_Eq(**name, key)) {
6835                     values[name-argnames] = value;
6836                     break;
6837                 }
6838                 name++;
6839             }
6840             if (*name) continue;
6841             else {
6842                 PyObject*** argname = argnames;
6843                 while (argname != first_kw_arg) {
6844                     if ((**argname == key) || (
6845                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
6846                              && _PyString_Eq(**argname, key))) {
6847                         goto arg_passed_twice;
6848                     }
6849                     argname++;
6850                 }
6851             }
6852         } else
6853         #endif
6854         if (likely(PyUnicode_Check(key))) {
6855             while (*name) {
6856                 int cmp = (**name == key) ? 0 :
6857                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
6858                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
6859                 #endif
6860                     PyUnicode_Compare(**name, key);
6861                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
6862                 if (cmp == 0) {
6863                     values[name-argnames] = value;
6864                     break;
6865                 }
6866                 name++;
6867             }
6868             if (*name) continue;
6869             else {
6870                 PyObject*** argname = argnames;
6871                 while (argname != first_kw_arg) {
6872                     int cmp = (**argname == key) ? 0 :
6873                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
6874                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
6875                     #endif
6876                         PyUnicode_Compare(**argname, key);
6877                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
6878                     if (cmp == 0) goto arg_passed_twice;
6879                     argname++;
6880                 }
6881             }
6882         } else
6883             goto invalid_keyword_type;
6884         if (kwds2) {
6885             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
6886         } else {
6887             goto invalid_keyword;
6888         }
6889     }
6890     return 0;
6891 arg_passed_twice:
6892     __Pyx_RaiseDoubleKeywordsError(function_name, key);
6893     goto bad;
6894 invalid_keyword_type:
6895     PyErr_Format(PyExc_TypeError,
6896         "%.200s() keywords must be strings", function_name);
6897     goto bad;
6898 invalid_keyword:
6899     PyErr_Format(PyExc_TypeError,
6900     #if PY_MAJOR_VERSION < 3
6901         "%.200s() got an unexpected keyword argument '%.200s'",
6902         function_name, PyString_AsString(key));
6903     #else
6904         "%s() got an unexpected keyword argument '%U'",
6905         function_name, key);
6906     #endif
6907 bad:
6908     return -1;
6909 }
6910
6911 /* ArgTypeTest */
6912 static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
6913     PyErr_Format(PyExc_TypeError,
6914         "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
6915         name, type->tp_name, Py_TYPE(obj)->tp_name);
6916 }
6917 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
6918     const char *name, int exact)
6919 {
6920     if (unlikely(!type)) {
6921         PyErr_SetString(PyExc_SystemError, "Missing type object");
6922         return 0;
6923     }
6924     if (none_allowed && obj == Py_None) return 1;
6925     else if (exact) {
6926         if (likely(Py_TYPE(obj) == type)) return 1;
6927         #if PY_MAJOR_VERSION == 2
6928         else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
6929         #endif
6930     }
6931     else {
6932         if (likely(PyObject_TypeCheck(obj, type))) return 1;
6933     }
6934     __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
6935     return 0;
6936 }
6937
6938 /* BufferFormatCheck */
6939 static CYTHON_INLINE int __Pyx_IsLittleEndian(void) {
6940   unsigned int n = 1;
6941   return *(unsigned char*)(&n) != 0;
6942 }
6943 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
6944                               __Pyx_BufFmt_StackElem* stack,
6945                               __Pyx_TypeInfo* type) {
6946   stack[0].field = &ctx->root;
6947   stack[0].parent_offset = 0;
6948   ctx->root.type = type;
6949   ctx->root.name = "buffer dtype";
6950   ctx->root.offset = 0;
6951   ctx->head = stack;
6952   ctx->head->field = &ctx->root;
6953   ctx->fmt_offset = 0;
6954   ctx->head->parent_offset = 0;
6955   ctx->new_packmode = '@';
6956   ctx->enc_packmode = '@';
6957   ctx->new_count = 1;
6958   ctx->enc_count = 0;
6959   ctx->enc_type = 0;
6960   ctx->is_complex = 0;
6961   ctx->is_valid_array = 0;
6962   ctx->struct_alignment = 0;
6963   while (type->typegroup == 'S') {
6964     ++ctx->head;
6965     ctx->head->field = type->fields;
6966     ctx->head->parent_offset = 0;
6967     type = type->fields->type;
6968   }
6969 }
6970 static int __Pyx_BufFmt_ParseNumber(const char** ts) {
6971     int count;
6972     const char* t = *ts;
6973     if (*t < '0' || *t > '9') {
6974       return -1;
6975     } else {
6976         count = *t++ - '0';
6977         while (*t >= '0' && *t < '9') {
6978             count *= 10;
6979             count += *t++ - '0';
6980         }
6981     }
6982     *ts = t;
6983     return count;
6984 }
6985 static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
6986     int number = __Pyx_BufFmt_ParseNumber(ts);
6987     if (number == -1)
6988         PyErr_Format(PyExc_ValueError,\
6989                      "Does not understand character buffer dtype format string ('%c')", **ts);
6990     return number;
6991 }
6992 static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
6993   PyErr_Format(PyExc_ValueError,
6994                "Unexpected format string character: '%c'", ch);
6995 }
6996 static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
6997   switch (ch) {
6998     case 'c': return "'char'";
6999     case 'b': return "'signed char'";
7000     case 'B': return "'unsigned char'";
7001     case 'h': return "'short'";
7002     case 'H': return "'unsigned short'";
7003     case 'i': return "'int'";
7004     case 'I': return "'unsigned int'";
7005     case 'l': return "'long'";
7006     case 'L': return "'unsigned long'";
7007     case 'q': return "'long long'";
7008     case 'Q': return "'unsigned long long'";
7009     case 'f': return (is_complex ? "'complex float'" : "'float'");
7010     case 'd': return (is_complex ? "'complex double'" : "'double'");
7011     case 'g': return (is_complex ? "'complex long double'" : "'long double'");
7012     case 'T': return "a struct";
7013     case 'O': return "Python object";
7014     case 'P': return "a pointer";
7015     case 's': case 'p': return "a string";
7016     case 0: return "end";
7017     default: return "unparseable format string";
7018   }
7019 }
7020 static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
7021   switch (ch) {
7022     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
7023     case 'h': case 'H': return 2;
7024     case 'i': case 'I': case 'l': case 'L': return 4;
7025     case 'q': case 'Q': return 8;
7026     case 'f': return (is_complex ? 8 : 4);
7027     case 'd': return (is_complex ? 16 : 8);
7028     case 'g': {
7029       PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
7030       return 0;
7031     }
7032     case 'O': case 'P': return sizeof(void*);
7033     default:
7034       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
7035       return 0;
7036     }
7037 }
7038 static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
7039   switch (ch) {
7040     case 'c': case 'b': case 'B': case 's': case 'p': return 1;
7041     case 'h': case 'H': return sizeof(short);
7042     case 'i': case 'I': return sizeof(int);
7043     case 'l': case 'L': return sizeof(long);
7044     #ifdef HAVE_LONG_LONG
7045     case 'q': case 'Q': return sizeof(PY_LONG_LONG);
7046     #endif
7047     case 'f': return sizeof(float) * (is_complex ? 2 : 1);
7048     case 'd': return sizeof(double) * (is_complex ? 2 : 1);
7049     case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
7050     case 'O': case 'P': return sizeof(void*);
7051     default: {
7052       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
7053       return 0;
7054     }
7055   }
7056 }
7057 typedef struct { char c; short x; } __Pyx_st_short;
7058 typedef struct { char c; int x; } __Pyx_st_int;
7059 typedef struct { char c; long x; } __Pyx_st_long;
7060 typedef struct { char c; float x; } __Pyx_st_float;
7061 typedef struct { char c; double x; } __Pyx_st_double;
7062 typedef struct { char c; long double x; } __Pyx_st_longdouble;
7063 typedef struct { char c; void *x; } __Pyx_st_void_p;
7064 #ifdef HAVE_LONG_LONG
7065 typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
7066 #endif
7067 static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
7068   switch (ch) {
7069     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
7070     case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
7071     case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
7072     case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
7073 #ifdef HAVE_LONG_LONG
7074     case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
7075 #endif
7076     case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
7077     case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
7078     case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
7079     case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
7080     default:
7081       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
7082       return 0;
7083     }
7084 }
7085 /* These are for computing the padding at the end of the struct to align
7086    on the first member of the struct. This will probably the same as above,
7087    but we don't have any guarantees.
7088  */
7089 typedef struct { short x; char c; } __Pyx_pad_short;
7090 typedef struct { int x; char c; } __Pyx_pad_int;
7091 typedef struct { long x; char c; } __Pyx_pad_long;
7092 typedef struct { float x; char c; } __Pyx_pad_float;
7093 typedef struct { double x; char c; } __Pyx_pad_double;
7094 typedef struct { long double x; char c; } __Pyx_pad_longdouble;
7095 typedef struct { void *x; char c; } __Pyx_pad_void_p;
7096 #ifdef HAVE_LONG_LONG
7097 typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
7098 #endif
7099 static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
7100   switch (ch) {
7101     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
7102     case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
7103     case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
7104     case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
7105 #ifdef HAVE_LONG_LONG
7106     case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
7107 #endif
7108     case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
7109     case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
7110     case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
7111     case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
7112     default:
7113       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
7114       return 0;
7115     }
7116 }
7117 static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
7118   switch (ch) {
7119     case 'c':
7120         return 'H';
7121     case 'b': case 'h': case 'i':
7122     case 'l': case 'q': case 's': case 'p':
7123         return 'I';
7124     case 'B': case 'H': case 'I': case 'L': case 'Q':
7125         return 'U';
7126     case 'f': case 'd': case 'g':
7127         return (is_complex ? 'C' : 'R');
7128     case 'O':
7129         return 'O';
7130     case 'P':
7131         return 'P';
7132     default: {
7133       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
7134       return 0;
7135     }
7136   }
7137 }
7138 static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
7139   if (ctx->head == NULL || ctx->head->field == &ctx->root) {
7140     const char* expected;
7141     const char* quote;
7142     if (ctx->head == NULL) {
7143       expected = "end";
7144       quote = "";
7145     } else {
7146       expected = ctx->head->field->type->name;
7147       quote = "'";
7148     }
7149     PyErr_Format(PyExc_ValueError,
7150                  "Buffer dtype mismatch, expected %s%s%s but got %s",
7151                  quote, expected, quote,
7152                  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
7153   } else {
7154     __Pyx_StructField* field = ctx->head->field;
7155     __Pyx_StructField* parent = (ctx->head - 1)->field;
7156     PyErr_Format(PyExc_ValueError,
7157                  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
7158                  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
7159                  parent->type->name, field->name);
7160   }
7161 }
7162 static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
7163   char group;
7164   size_t size, offset, arraysize = 1;
7165   if (ctx->enc_type == 0) return 0;
7166   if (ctx->head->field->type->arraysize[0]) {
7167     int i, ndim = 0;
7168     if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
7169         ctx->is_valid_array = ctx->head->field->type->ndim == 1;
7170         ndim = 1;
7171         if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
7172             PyErr_Format(PyExc_ValueError,
7173                          "Expected a dimension of size %zu, got %zu",
7174                          ctx->head->field->type->arraysize[0], ctx->enc_count);
7175             return -1;
7176         }
7177     }
7178     if (!ctx->is_valid_array) {
7179       PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
7180                    ctx->head->field->type->ndim, ndim);
7181       return -1;
7182     }
7183     for (i = 0; i < ctx->head->field->type->ndim; i++) {
7184       arraysize *= ctx->head->field->type->arraysize[i];
7185     }
7186     ctx->is_valid_array = 0;
7187     ctx->enc_count = 1;
7188   }
7189   group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
7190   do {
7191     __Pyx_StructField* field = ctx->head->field;
7192     __Pyx_TypeInfo* type = field->type;
7193     if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
7194       size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
7195     } else {
7196       size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
7197     }
7198     if (ctx->enc_packmode == '@') {
7199       size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
7200       size_t align_mod_offset;
7201       if (align_at == 0) return -1;
7202       align_mod_offset = ctx->fmt_offset % align_at;
7203       if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
7204       if (ctx->struct_alignment == 0)
7205           ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
7206                                                                  ctx->is_complex);
7207     }
7208     if (type->size != size || type->typegroup != group) {
7209       if (type->typegroup == 'C' && type->fields != NULL) {
7210         size_t parent_offset = ctx->head->parent_offset + field->offset;
7211         ++ctx->head;
7212         ctx->head->field = type->fields;
7213         ctx->head->parent_offset = parent_offset;
7214         continue;
7215       }
7216       if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
7217       } else {
7218           __Pyx_BufFmt_RaiseExpected(ctx);
7219           return -1;
7220       }
7221     }
7222     offset = ctx->head->parent_offset + field->offset;
7223     if (ctx->fmt_offset != offset) {
7224       PyErr_Format(PyExc_ValueError,
7225                    "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
7226                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
7227       return -1;
7228     }
7229     ctx->fmt_offset += size;
7230     if (arraysize)
7231       ctx->fmt_offset += (arraysize - 1) * size;
7232     --ctx->enc_count;
7233     while (1) {
7234       if (field == &ctx->root) {
7235         ctx->head = NULL;
7236         if (ctx->enc_count != 0) {
7237           __Pyx_BufFmt_RaiseExpected(ctx);
7238           return -1;
7239         }
7240         break;
7241       }
7242       ctx->head->field = ++field;
7243       if (field->type == NULL) {
7244         --ctx->head;
7245         field = ctx->head->field;
7246         continue;
7247       } else if (field->type->typegroup == 'S') {
7248         size_t parent_offset = ctx->head->parent_offset + field->offset;
7249         if (field->type->fields->type == NULL) continue;
7250         field = field->type->fields;
7251         ++ctx->head;
7252         ctx->head->field = field;
7253         ctx->head->parent_offset = parent_offset;
7254         break;
7255       } else {
7256         break;
7257       }
7258     }
7259   } while (ctx->enc_count);
7260   ctx->enc_type = 0;
7261   ctx->is_complex = 0;
7262   return 0;
7263 }
7264 static CYTHON_INLINE PyObject *
7265 __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
7266 {
7267     const char *ts = *tsp;
7268     int i = 0, number;
7269     int ndim = ctx->head->field->type->ndim;
7270 ;
7271     ++ts;
7272     if (ctx->new_count != 1) {
7273         PyErr_SetString(PyExc_ValueError,
7274                         "Cannot handle repeated arrays in format string");
7275         return NULL;
7276     }
7277     if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
7278     while (*ts && *ts != ')') {
7279         switch (*ts) {
7280             case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
7281             default:  break;
7282         }
7283         number = __Pyx_BufFmt_ExpectNumber(&ts);
7284         if (number == -1) return NULL;
7285         if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
7286             return PyErr_Format(PyExc_ValueError,
7287                         "Expected a dimension of size %zu, got %d",
7288                         ctx->head->field->type->arraysize[i], number);
7289         if (*ts != ',' && *ts != ')')
7290             return PyErr_Format(PyExc_ValueError,
7291                                 "Expected a comma in format string, got '%c'", *ts);
7292         if (*ts == ',') ts++;
7293         i++;
7294     }
7295     if (i != ndim)
7296         return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
7297                             ctx->head->field->type->ndim, i);
7298     if (!*ts) {
7299         PyErr_SetString(PyExc_ValueError,
7300                         "Unexpected end of format string, expected ')'");
7301         return NULL;
7302     }
7303     ctx->is_valid_array = 1;
7304     ctx->new_count = 1;
7305     *tsp = ++ts;
7306     return Py_None;
7307 }
7308 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
7309   int got_Z = 0;
7310   while (1) {
7311     switch(*ts) {
7312       case 0:
7313         if (ctx->enc_type != 0 && ctx->head == NULL) {
7314           __Pyx_BufFmt_RaiseExpected(ctx);
7315           return NULL;
7316         }
7317         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
7318         if (ctx->head != NULL) {
7319           __Pyx_BufFmt_RaiseExpected(ctx);
7320           return NULL;
7321         }
7322         return ts;
7323       case ' ':
7324       case '\r':
7325       case '\n':
7326         ++ts;
7327         break;
7328       case '<':
7329         if (!__Pyx_IsLittleEndian()) {
7330           PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
7331           return NULL;
7332         }
7333         ctx->new_packmode = '=';
7334         ++ts;
7335         break;
7336       case '>':
7337       case '!':
7338         if (__Pyx_IsLittleEndian()) {
7339           PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
7340           return NULL;
7341         }
7342         ctx->new_packmode = '=';
7343         ++ts;
7344         break;
7345       case '=':
7346       case '@':
7347       case '^':
7348         ctx->new_packmode = *ts++;
7349         break;
7350       case 'T':
7351         {
7352           const char* ts_after_sub;
7353           size_t i, struct_count = ctx->new_count;
7354           size_t struct_alignment = ctx->struct_alignment;
7355           ctx->new_count = 1;
7356           ++ts;
7357           if (*ts != '{') {
7358             PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
7359             return NULL;
7360           }
7361           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
7362           ctx->enc_type = 0;
7363           ctx->enc_count = 0;
7364           ctx->struct_alignment = 0;
7365           ++ts;
7366           ts_after_sub = ts;
7367           for (i = 0; i != struct_count; ++i) {
7368             ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
7369             if (!ts_after_sub) return NULL;
7370           }
7371           ts = ts_after_sub;
7372           if (struct_alignment) ctx->struct_alignment = struct_alignment;
7373         }
7374         break;
7375       case '}':
7376         {
7377           size_t alignment = ctx->struct_alignment;
7378           ++ts;
7379           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
7380           ctx->enc_type = 0;
7381           if (alignment && ctx->fmt_offset % alignment) {
7382             ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
7383           }
7384         }
7385         return ts;
7386       case 'x':
7387         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
7388         ctx->fmt_offset += ctx->new_count;
7389         ctx->new_count = 1;
7390         ctx->enc_count = 0;
7391         ctx->enc_type = 0;
7392         ctx->enc_packmode = ctx->new_packmode;
7393         ++ts;
7394         break;
7395       case 'Z':
7396         got_Z = 1;
7397         ++ts;
7398         if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
7399           __Pyx_BufFmt_RaiseUnexpectedChar('Z');
7400           return NULL;
7401         }
7402       case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
7403       case 'l': case 'L': case 'q': case 'Q':
7404       case 'f': case 'd': case 'g':
7405       case 'O': case 'p':
7406         if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
7407             ctx->enc_packmode == ctx->new_packmode) {
7408           ctx->enc_count += ctx->new_count;
7409           ctx->new_count = 1;
7410           got_Z = 0;
7411           ++ts;
7412           break;
7413         }
7414       case 's':
7415         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
7416         ctx->enc_count = ctx->new_count;
7417         ctx->enc_packmode = ctx->new_packmode;
7418         ctx->enc_type = *ts;
7419         ctx->is_complex = got_Z;
7420         ++ts;
7421         ctx->new_count = 1;
7422         got_Z = 0;
7423         break;
7424       case ':':
7425         ++ts;
7426         while(*ts != ':') ++ts;
7427         ++ts;
7428         break;
7429       case '(':
7430         if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
7431         break;
7432       default:
7433         {
7434           int number = __Pyx_BufFmt_ExpectNumber(&ts);
7435           if (number == -1) return NULL;
7436           ctx->new_count = (size_t)number;
7437         }
7438     }
7439   }
7440 }
7441 static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
7442   buf->buf = NULL;
7443   buf->obj = NULL;
7444   buf->strides = __Pyx_zeros;
7445   buf->shape = __Pyx_zeros;
7446   buf->suboffsets = __Pyx_minusones;
7447 }
7448 static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
7449         Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
7450         int nd, int cast, __Pyx_BufFmt_StackElem* stack)
7451 {
7452   if (obj == Py_None || obj == NULL) {
7453     __Pyx_ZeroBuffer(buf);
7454     return 0;
7455   }
7456   buf->buf = NULL;
7457   if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail;
7458   if (buf->ndim != nd) {
7459     PyErr_Format(PyExc_ValueError,
7460                  "Buffer has wrong number of dimensions (expected %d, got %d)",
7461                  nd, buf->ndim);
7462     goto fail;
7463   }
7464   if (!cast) {
7465     __Pyx_BufFmt_Context ctx;
7466     __Pyx_BufFmt_Init(&ctx, stack, dtype);
7467     if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
7468   }
7469   if ((unsigned)buf->itemsize != dtype->size) {
7470     PyErr_Format(PyExc_ValueError,
7471       "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
7472       buf->itemsize, (buf->itemsize > 1) ? "s" : "",
7473       dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
7474     goto fail;
7475   }
7476   if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
7477   return 0;
7478 fail:;
7479   __Pyx_ZeroBuffer(buf);
7480   return -1;
7481 }
7482 static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
7483   if (info->buf == NULL) return;
7484   if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
7485   __Pyx_ReleaseBuffer(info);
7486 }
7487
7488 /* ExtTypeTest */
7489   static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
7490     if (unlikely(!type)) {
7491         PyErr_SetString(PyExc_SystemError, "Missing type object");
7492         return 0;
7493     }
7494     if (likely(PyObject_TypeCheck(obj, type)))
7495         return 1;
7496     PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
7497                  Py_TYPE(obj)->tp_name, type->tp_name);
7498     return 0;
7499 }
7500
7501 /* PyIntBinop */
7502   #if !CYTHON_COMPILING_IN_PYPY
7503 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
7504     #if PY_MAJOR_VERSION < 3
7505     if (likely(PyInt_CheckExact(op1))) {
7506         const long b = intval;
7507         long x;
7508         long a = PyInt_AS_LONG(op1);
7509             x = (long)((unsigned long)a + b);
7510             if (likely((x^a) >= 0 || (x^b) >= 0))
7511                 return PyInt_FromLong(x);
7512             return PyLong_Type.tp_as_number->nb_add(op1, op2);
7513     }
7514     #endif
7515     #if CYTHON_USE_PYLONG_INTERNALS
7516     if (likely(PyLong_CheckExact(op1))) {
7517         const long b = intval;
7518         long a, x;
7519 #ifdef HAVE_LONG_LONG
7520         const PY_LONG_LONG llb = intval;
7521         PY_LONG_LONG lla, llx;
7522 #endif
7523         const digit* digits = ((PyLongObject*)op1)->ob_digit;
7524         const Py_ssize_t size = Py_SIZE(op1);
7525         if (likely(__Pyx_sst_abs(size) <= 1)) {
7526             a = likely(size) ? digits[0] : 0;
7527             if (size == -1) a = -a;
7528         } else {
7529             switch (size) {
7530                 case -2:
7531                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
7532                         a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
7533                         break;
7534 #ifdef HAVE_LONG_LONG
7535                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
7536                         lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
7537                         goto long_long;
7538 #endif
7539                     }
7540                 case 2:
7541                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
7542                         a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
7543                         break;
7544 #ifdef HAVE_LONG_LONG
7545                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
7546                         lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
7547                         goto long_long;
7548 #endif
7549                     }
7550                 case -3:
7551                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
7552                         a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
7553                         break;
7554 #ifdef HAVE_LONG_LONG
7555                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
7556                         lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
7557                         goto long_long;
7558 #endif
7559                     }
7560                 case 3:
7561                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
7562                         a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
7563                         break;
7564 #ifdef HAVE_LONG_LONG
7565                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
7566                         lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
7567                         goto long_long;
7568 #endif
7569                     }
7570                 case -4:
7571                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
7572                         a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
7573                         break;
7574 #ifdef HAVE_LONG_LONG
7575                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
7576                         lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
7577                         goto long_long;
7578 #endif
7579                     }
7580                 case 4:
7581                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
7582                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
7583                         break;
7584 #ifdef HAVE_LONG_LONG
7585                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
7586                         lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
7587                         goto long_long;
7588 #endif
7589                     }
7590                 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
7591             }
7592         }
7593                 x = a + b;
7594             return PyLong_FromLong(x);
7595 #ifdef HAVE_LONG_LONG
7596         long_long:
7597                 llx = lla + llb;
7598             return PyLong_FromLongLong(llx);
7599 #endif
7600         
7601         
7602     }
7603     #endif
7604     if (PyFloat_CheckExact(op1)) {
7605         const long b = intval;
7606         double a = PyFloat_AS_DOUBLE(op1);
7607             double result;
7608             PyFPE_START_PROTECT("add", return NULL)
7609             result = ((double)a) + (double)b;
7610             PyFPE_END_PROTECT(result)
7611             return PyFloat_FromDouble(result);
7612     }
7613     return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
7614 }
7615 #endif
7616
7617 /* PyCFunctionFastCall */
7618   #if CYTHON_FAST_PYCCALL
7619 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
7620     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
7621     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
7622     PyObject *self = PyCFunction_GET_SELF(func);
7623     assert(PyCFunction_Check(func));
7624     assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
7625     assert(nargs >= 0);
7626     assert(nargs == 0 || args != NULL);
7627     /* _PyCFunction_FastCallDict() must not be called with an exception set,
7628        because it may clear it (directly or indirectly) and so the
7629        caller loses its exception */
7630     assert(!PyErr_Occurred());
7631     return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
7632 }
7633 #endif  // CYTHON_FAST_PYCCALL
7634
7635 /* PyFunctionFastCall */
7636   #if CYTHON_FAST_PYCALL
7637 #include "frameobject.h"
7638 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
7639                                                PyObject *globals) {
7640     PyFrameObject *f;
7641     PyThreadState *tstate = PyThreadState_GET();
7642     PyObject **fastlocals;
7643     Py_ssize_t i;
7644     PyObject *result;
7645     assert(globals != NULL);
7646     /* XXX Perhaps we should create a specialized
7647        PyFrame_New() that doesn't take locals, but does
7648        take builtins without sanity checking them.
7649        */
7650     assert(tstate != NULL);
7651     f = PyFrame_New(tstate, co, globals, NULL);
7652     if (f == NULL) {
7653         return NULL;
7654     }
7655     fastlocals = f->f_localsplus;
7656     for (i = 0; i < na; i++) {
7657         Py_INCREF(*args);
7658         fastlocals[i] = *args++;
7659     }
7660     result = PyEval_EvalFrameEx(f,0);
7661     ++tstate->recursion_depth;
7662     Py_DECREF(f);
7663     --tstate->recursion_depth;
7664     return result;
7665 }
7666 #if 1 || PY_VERSION_HEX < 0x030600B1
7667 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
7668     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
7669     PyObject *globals = PyFunction_GET_GLOBALS(func);
7670     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
7671     PyObject *closure;
7672 #if PY_MAJOR_VERSION >= 3
7673     PyObject *kwdefs;
7674 #endif
7675     PyObject *kwtuple, **k;
7676     PyObject **d;
7677     Py_ssize_t nd;
7678     Py_ssize_t nk;
7679     PyObject *result;
7680     assert(kwargs == NULL || PyDict_Check(kwargs));
7681     nk = kwargs ? PyDict_Size(kwargs) : 0;
7682     if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
7683         return NULL;
7684     }
7685     if (
7686 #if PY_MAJOR_VERSION >= 3
7687             co->co_kwonlyargcount == 0 &&
7688 #endif
7689             likely(kwargs == NULL || nk == 0) &&
7690             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
7691         if (argdefs == NULL && co->co_argcount == nargs) {
7692             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
7693             goto done;
7694         }
7695         else if (nargs == 0 && argdefs != NULL
7696                  && co->co_argcount == Py_SIZE(argdefs)) {
7697             /* function called with no arguments, but all parameters have
7698                a default value: use default values as arguments .*/
7699             args = &PyTuple_GET_ITEM(argdefs, 0);
7700             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
7701             goto done;
7702         }
7703     }
7704     if (kwargs != NULL) {
7705         Py_ssize_t pos, i;
7706         kwtuple = PyTuple_New(2 * nk);
7707         if (kwtuple == NULL) {
7708             result = NULL;
7709             goto done;
7710         }
7711         k = &PyTuple_GET_ITEM(kwtuple, 0);
7712         pos = i = 0;
7713         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
7714             Py_INCREF(k[i]);
7715             Py_INCREF(k[i+1]);
7716             i += 2;
7717         }
7718         nk = i / 2;
7719     }
7720     else {
7721         kwtuple = NULL;
7722         k = NULL;
7723     }
7724     closure = PyFunction_GET_CLOSURE(func);
7725 #if PY_MAJOR_VERSION >= 3
7726     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
7727 #endif
7728     if (argdefs != NULL) {
7729         d = &PyTuple_GET_ITEM(argdefs, 0);
7730         nd = Py_SIZE(argdefs);
7731     }
7732     else {
7733         d = NULL;
7734         nd = 0;
7735     }
7736 #if PY_MAJOR_VERSION >= 3
7737     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
7738                                args, nargs,
7739                                k, (int)nk,
7740                                d, (int)nd, kwdefs, closure);
7741 #else
7742     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
7743                                args, nargs,
7744                                k, (int)nk,
7745                                d, (int)nd, closure);
7746 #endif
7747     Py_XDECREF(kwtuple);
7748 done:
7749     Py_LeaveRecursiveCall();
7750     return result;
7751 }
7752 #endif  // CPython < 3.6
7753 #endif  // CYTHON_FAST_PYCALL
7754
7755 /* PyObjectCall */
7756   #if CYTHON_COMPILING_IN_CPYTHON
7757 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
7758     PyObject *result;
7759     ternaryfunc call = func->ob_type->tp_call;
7760     if (unlikely(!call))
7761         return PyObject_Call(func, arg, kw);
7762     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
7763         return NULL;
7764     result = (*call)(func, arg, kw);
7765     Py_LeaveRecursiveCall();
7766     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
7767         PyErr_SetString(
7768             PyExc_SystemError,
7769             "NULL result without error in PyObject_Call");
7770     }
7771     return result;
7772 }
7773 #endif
7774
7775 /* PyObjectCallMethO */
7776   #if CYTHON_COMPILING_IN_CPYTHON
7777 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
7778     PyObject *self, *result;
7779     PyCFunction cfunc;
7780     cfunc = PyCFunction_GET_FUNCTION(func);
7781     self = PyCFunction_GET_SELF(func);
7782     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
7783         return NULL;
7784     result = cfunc(self, arg);
7785     Py_LeaveRecursiveCall();
7786     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
7787         PyErr_SetString(
7788             PyExc_SystemError,
7789             "NULL result without error in PyObject_Call");
7790     }
7791     return result;
7792 }
7793 #endif
7794
7795 /* PyObjectCallOneArg */
7796   #if CYTHON_COMPILING_IN_CPYTHON
7797 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
7798     PyObject *result;
7799     PyObject *args = PyTuple_New(1);
7800     if (unlikely(!args)) return NULL;
7801     Py_INCREF(arg);
7802     PyTuple_SET_ITEM(args, 0, arg);
7803     result = __Pyx_PyObject_Call(func, args, NULL);
7804     Py_DECREF(args);
7805     return result;
7806 }
7807 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
7808 #if CYTHON_FAST_PYCALL
7809     if (PyFunction_Check(func)) {
7810         return __Pyx_PyFunction_FastCall(func, &arg, 1);
7811     }
7812 #endif
7813 #ifdef __Pyx_CyFunction_USED
7814     if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
7815 #else
7816     if (likely(PyCFunction_Check(func))) {
7817 #endif
7818         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
7819             return __Pyx_PyObject_CallMethO(func, arg);
7820 #if CYTHON_FAST_PYCCALL
7821         } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
7822             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
7823 #endif
7824         }
7825     }
7826     return __Pyx__PyObject_CallOneArg(func, arg);
7827 }
7828 #else
7829 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
7830     PyObject *result;
7831     PyObject *args = PyTuple_Pack(1, arg);
7832     if (unlikely(!args)) return NULL;
7833     result = __Pyx_PyObject_Call(func, args, NULL);
7834     Py_DECREF(args);
7835     return result;
7836 }
7837 #endif
7838
7839 /* PyObjectCallNoArg */
7840     #if CYTHON_COMPILING_IN_CPYTHON
7841 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
7842 #if CYTHON_FAST_PYCALL
7843     if (PyFunction_Check(func)) {
7844         return __Pyx_PyFunction_FastCall(func, NULL, 0);
7845     }
7846 #endif
7847 #ifdef __Pyx_CyFunction_USED
7848     if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
7849 #else
7850     if (likely(PyCFunction_Check(func))) {
7851 #endif
7852         if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
7853             return __Pyx_PyObject_CallMethO(func, NULL);
7854         }
7855     }
7856     return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
7857 }
7858 #endif
7859
7860 /* GetModuleGlobalName */
7861       static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
7862     PyObject *result;
7863 #if !CYTHON_AVOID_BORROWED_REFS
7864     result = PyDict_GetItem(__pyx_d, name);
7865     if (likely(result)) {
7866         Py_INCREF(result);
7867     } else {
7868 #else
7869     result = PyObject_GetItem(__pyx_d, name);
7870     if (!result) {
7871         PyErr_Clear();
7872 #endif
7873         result = __Pyx_GetBuiltinName(name);
7874     }
7875     return result;
7876 }
7877
7878 /* BufferIndexError */
7879         static void __Pyx_RaiseBufferIndexError(int axis) {
7880   PyErr_Format(PyExc_IndexError,
7881      "Out of bounds on buffer access (axis %d)", axis);
7882 }
7883
7884 /* PyErrFetchRestore */
7885         #if CYTHON_FAST_THREAD_STATE
7886 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
7887     PyObject *tmp_type, *tmp_value, *tmp_tb;
7888     tmp_type = tstate->curexc_type;
7889     tmp_value = tstate->curexc_value;
7890     tmp_tb = tstate->curexc_traceback;
7891     tstate->curexc_type = type;
7892     tstate->curexc_value = value;
7893     tstate->curexc_traceback = tb;
7894     Py_XDECREF(tmp_type);
7895     Py_XDECREF(tmp_value);
7896     Py_XDECREF(tmp_tb);
7897 }
7898 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
7899     *type = tstate->curexc_type;
7900     *value = tstate->curexc_value;
7901     *tb = tstate->curexc_traceback;
7902     tstate->curexc_type = 0;
7903     tstate->curexc_value = 0;
7904     tstate->curexc_traceback = 0;
7905 }
7906 #endif
7907
7908 /* RaiseException */
7909         #if PY_MAJOR_VERSION < 3
7910 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
7911                         CYTHON_UNUSED PyObject *cause) {
7912     __Pyx_PyThreadState_declare
7913     Py_XINCREF(type);
7914     if (!value || value == Py_None)
7915         value = NULL;
7916     else
7917         Py_INCREF(value);
7918     if (!tb || tb == Py_None)
7919         tb = NULL;
7920     else {
7921         Py_INCREF(tb);
7922         if (!PyTraceBack_Check(tb)) {
7923             PyErr_SetString(PyExc_TypeError,
7924                 "raise: arg 3 must be a traceback or None");
7925             goto raise_error;
7926         }
7927     }
7928     if (PyType_Check(type)) {
7929 #if CYTHON_COMPILING_IN_PYPY
7930         if (!value) {
7931             Py_INCREF(Py_None);
7932             value = Py_None;
7933         }
7934 #endif
7935         PyErr_NormalizeException(&type, &value, &tb);
7936     } else {
7937         if (value) {
7938             PyErr_SetString(PyExc_TypeError,
7939                 "instance exception may not have a separate value");
7940             goto raise_error;
7941         }
7942         value = type;
7943         type = (PyObject*) Py_TYPE(type);
7944         Py_INCREF(type);
7945         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
7946             PyErr_SetString(PyExc_TypeError,
7947                 "raise: exception class must be a subclass of BaseException");
7948             goto raise_error;
7949         }
7950     }
7951     __Pyx_PyThreadState_assign
7952     __Pyx_ErrRestore(type, value, tb);
7953     return;
7954 raise_error:
7955     Py_XDECREF(value);
7956     Py_XDECREF(type);
7957     Py_XDECREF(tb);
7958     return;
7959 }
7960 #else
7961 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
7962     PyObject* owned_instance = NULL;
7963     if (tb == Py_None) {
7964         tb = 0;
7965     } else if (tb && !PyTraceBack_Check(tb)) {
7966         PyErr_SetString(PyExc_TypeError,
7967             "raise: arg 3 must be a traceback or None");
7968         goto bad;
7969     }
7970     if (value == Py_None)
7971         value = 0;
7972     if (PyExceptionInstance_Check(type)) {
7973         if (value) {
7974             PyErr_SetString(PyExc_TypeError,
7975                 "instance exception may not have a separate value");
7976             goto bad;
7977         }
7978         value = type;
7979         type = (PyObject*) Py_TYPE(value);
7980     } else if (PyExceptionClass_Check(type)) {
7981         PyObject *instance_class = NULL;
7982         if (value && PyExceptionInstance_Check(value)) {
7983             instance_class = (PyObject*) Py_TYPE(value);
7984             if (instance_class != type) {
7985                 int is_subclass = PyObject_IsSubclass(instance_class, type);
7986                 if (!is_subclass) {
7987                     instance_class = NULL;
7988                 } else if (unlikely(is_subclass == -1)) {
7989                     goto bad;
7990                 } else {
7991                     type = instance_class;
7992                 }
7993             }
7994         }
7995         if (!instance_class) {
7996             PyObject *args;
7997             if (!value)
7998                 args = PyTuple_New(0);
7999             else if (PyTuple_Check(value)) {
8000                 Py_INCREF(value);
8001                 args = value;
8002             } else
8003                 args = PyTuple_Pack(1, value);
8004             if (!args)
8005                 goto bad;
8006             owned_instance = PyObject_Call(type, args, NULL);
8007             Py_DECREF(args);
8008             if (!owned_instance)
8009                 goto bad;
8010             value = owned_instance;
8011             if (!PyExceptionInstance_Check(value)) {
8012                 PyErr_Format(PyExc_TypeError,
8013                              "calling %R should have returned an instance of "
8014                              "BaseException, not %R",
8015                              type, Py_TYPE(value));
8016                 goto bad;
8017             }
8018         }
8019     } else {
8020         PyErr_SetString(PyExc_TypeError,
8021             "raise: exception class must be a subclass of BaseException");
8022         goto bad;
8023     }
8024 #if PY_VERSION_HEX >= 0x03030000
8025     if (cause) {
8026 #else
8027     if (cause && cause != Py_None) {
8028 #endif
8029         PyObject *fixed_cause;
8030         if (cause == Py_None) {
8031             fixed_cause = NULL;
8032         } else if (PyExceptionClass_Check(cause)) {
8033             fixed_cause = PyObject_CallObject(cause, NULL);
8034             if (fixed_cause == NULL)
8035                 goto bad;
8036         } else if (PyExceptionInstance_Check(cause)) {
8037             fixed_cause = cause;
8038             Py_INCREF(fixed_cause);
8039         } else {
8040             PyErr_SetString(PyExc_TypeError,
8041                             "exception causes must derive from "
8042                             "BaseException");
8043             goto bad;
8044         }
8045         PyException_SetCause(value, fixed_cause);
8046     }
8047     PyErr_SetObject(type, value);
8048     if (tb) {
8049 #if CYTHON_COMPILING_IN_PYPY
8050         PyObject *tmp_type, *tmp_value, *tmp_tb;
8051         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
8052         Py_INCREF(tb);
8053         PyErr_Restore(tmp_type, tmp_value, tb);
8054         Py_XDECREF(tmp_tb);
8055 #else
8056         PyThreadState *tstate = PyThreadState_GET();
8057         PyObject* tmp_tb = tstate->curexc_traceback;
8058         if (tb != tmp_tb) {
8059             Py_INCREF(tb);
8060             tstate->curexc_traceback = tb;
8061             Py_XDECREF(tmp_tb);
8062         }
8063 #endif
8064     }
8065 bad:
8066     Py_XDECREF(owned_instance);
8067     return;
8068 }
8069 #endif
8070
8071 /* RaiseTooManyValuesToUnpack */
8072           static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
8073     PyErr_Format(PyExc_ValueError,
8074                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
8075 }
8076
8077 /* RaiseNeedMoreValuesToUnpack */
8078           static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
8079     PyErr_Format(PyExc_ValueError,
8080                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
8081                  index, (index == 1) ? "" : "s");
8082 }
8083
8084 /* RaiseNoneIterError */
8085           static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
8086     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
8087 }
8088
8089 /* SaveResetException */
8090           #if CYTHON_FAST_THREAD_STATE
8091 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
8092     *type = tstate->exc_type;
8093     *value = tstate->exc_value;
8094     *tb = tstate->exc_traceback;
8095     Py_XINCREF(*type);
8096     Py_XINCREF(*value);
8097     Py_XINCREF(*tb);
8098 }
8099 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
8100     PyObject *tmp_type, *tmp_value, *tmp_tb;
8101     tmp_type = tstate->exc_type;
8102     tmp_value = tstate->exc_value;
8103     tmp_tb = tstate->exc_traceback;
8104     tstate->exc_type = type;
8105     tstate->exc_value = value;
8106     tstate->exc_traceback = tb;
8107     Py_XDECREF(tmp_type);
8108     Py_XDECREF(tmp_value);
8109     Py_XDECREF(tmp_tb);
8110 }
8111 #endif
8112
8113 /* PyErrExceptionMatches */
8114           #if CYTHON_FAST_THREAD_STATE
8115 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
8116     PyObject *exc_type = tstate->curexc_type;
8117     if (exc_type == err) return 1;
8118     if (unlikely(!exc_type)) return 0;
8119     return PyErr_GivenExceptionMatches(exc_type, err);
8120 }
8121 #endif
8122
8123 /* GetException */
8124           #if CYTHON_FAST_THREAD_STATE
8125 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
8126 #else
8127 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
8128 #endif
8129     PyObject *local_type, *local_value, *local_tb;
8130 #if CYTHON_FAST_THREAD_STATE
8131     PyObject *tmp_type, *tmp_value, *tmp_tb;
8132     local_type = tstate->curexc_type;
8133     local_value = tstate->curexc_value;
8134     local_tb = tstate->curexc_traceback;
8135     tstate->curexc_type = 0;
8136     tstate->curexc_value = 0;
8137     tstate->curexc_traceback = 0;
8138 #else
8139     PyErr_Fetch(&local_type, &local_value, &local_tb);
8140 #endif
8141     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
8142 #if CYTHON_FAST_THREAD_STATE
8143     if (unlikely(tstate->curexc_type))
8144 #else
8145     if (unlikely(PyErr_Occurred()))
8146 #endif
8147         goto bad;
8148     #if PY_MAJOR_VERSION >= 3
8149     if (local_tb) {
8150         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
8151             goto bad;
8152     }
8153     #endif
8154     Py_XINCREF(local_tb);
8155     Py_XINCREF(local_type);
8156     Py_XINCREF(local_value);
8157     *type = local_type;
8158     *value = local_value;
8159     *tb = local_tb;
8160 #if CYTHON_FAST_THREAD_STATE
8161     tmp_type = tstate->exc_type;
8162     tmp_value = tstate->exc_value;
8163     tmp_tb = tstate->exc_traceback;
8164     tstate->exc_type = local_type;
8165     tstate->exc_value = local_value;
8166     tstate->exc_traceback = local_tb;
8167     Py_XDECREF(tmp_type);
8168     Py_XDECREF(tmp_value);
8169     Py_XDECREF(tmp_tb);
8170 #else
8171     PyErr_SetExcInfo(local_type, local_value, local_tb);
8172 #endif
8173     return 0;
8174 bad:
8175     *type = 0;
8176     *value = 0;
8177     *tb = 0;
8178     Py_XDECREF(local_type);
8179     Py_XDECREF(local_value);
8180     Py_XDECREF(local_tb);
8181     return -1;
8182 }
8183
8184 /* Import */
8185             static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
8186     PyObject *empty_list = 0;
8187     PyObject *module = 0;
8188     PyObject *global_dict = 0;
8189     PyObject *empty_dict = 0;
8190     PyObject *list;
8191     #if PY_VERSION_HEX < 0x03030000
8192     PyObject *py_import;
8193     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
8194     if (!py_import)
8195         goto bad;
8196     #endif
8197     if (from_list)
8198         list = from_list;
8199     else {
8200         empty_list = PyList_New(0);
8201         if (!empty_list)
8202             goto bad;
8203         list = empty_list;
8204     }
8205     global_dict = PyModule_GetDict(__pyx_m);
8206     if (!global_dict)
8207         goto bad;
8208     empty_dict = PyDict_New();
8209     if (!empty_dict)
8210         goto bad;
8211     {
8212         #if PY_MAJOR_VERSION >= 3
8213         if (level == -1) {
8214             if (strchr(__Pyx_MODULE_NAME, '.')) {
8215                 #if PY_VERSION_HEX < 0x03030000
8216                 PyObject *py_level = PyInt_FromLong(1);
8217                 if (!py_level)
8218                     goto bad;
8219                 module = PyObject_CallFunctionObjArgs(py_import,
8220                     name, global_dict, empty_dict, list, py_level, NULL);
8221                 Py_DECREF(py_level);
8222                 #else
8223                 module = PyImport_ImportModuleLevelObject(
8224                     name, global_dict, empty_dict, list, 1);
8225                 #endif
8226                 if (!module) {
8227                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
8228                         goto bad;
8229                     PyErr_Clear();
8230                 }
8231             }
8232             level = 0;
8233         }
8234         #endif
8235         if (!module) {
8236             #if PY_VERSION_HEX < 0x03030000
8237             PyObject *py_level = PyInt_FromLong(level);
8238             if (!py_level)
8239                 goto bad;
8240             module = PyObject_CallFunctionObjArgs(py_import,
8241                 name, global_dict, empty_dict, list, py_level, NULL);
8242             Py_DECREF(py_level);
8243             #else
8244             module = PyImport_ImportModuleLevelObject(
8245                 name, global_dict, empty_dict, list, level);
8246             #endif
8247         }
8248     }
8249 bad:
8250     #if PY_VERSION_HEX < 0x03030000
8251     Py_XDECREF(py_import);
8252     #endif
8253     Py_XDECREF(empty_list);
8254     Py_XDECREF(empty_dict);
8255     return module;
8256 }
8257
8258 /* CodeObjectCache */
8259             static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
8260     int start = 0, mid = 0, end = count - 1;
8261     if (end >= 0 && code_line > entries[end].code_line) {
8262         return count;
8263     }
8264     while (start < end) {
8265         mid = start + (end - start) / 2;
8266         if (code_line < entries[mid].code_line) {
8267             end = mid;
8268         } else if (code_line > entries[mid].code_line) {
8269              start = mid + 1;
8270         } else {
8271             return mid;
8272         }
8273     }
8274     if (code_line <= entries[mid].code_line) {
8275         return mid;
8276     } else {
8277         return mid + 1;
8278     }
8279 }
8280 static PyCodeObject *__pyx_find_code_object(int code_line) {
8281     PyCodeObject* code_object;
8282     int pos;
8283     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
8284         return NULL;
8285     }
8286     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
8287     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
8288         return NULL;
8289     }
8290     code_object = __pyx_code_cache.entries[pos].code_object;
8291     Py_INCREF(code_object);
8292     return code_object;
8293 }
8294 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
8295     int pos, i;
8296     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
8297     if (unlikely(!code_line)) {
8298         return;
8299     }
8300     if (unlikely(!entries)) {
8301         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
8302         if (likely(entries)) {
8303             __pyx_code_cache.entries = entries;
8304             __pyx_code_cache.max_count = 64;
8305             __pyx_code_cache.count = 1;
8306             entries[0].code_line = code_line;
8307             entries[0].code_object = code_object;
8308             Py_INCREF(code_object);
8309         }
8310         return;
8311     }
8312     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
8313     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
8314         PyCodeObject* tmp = entries[pos].code_object;
8315         entries[pos].code_object = code_object;
8316         Py_DECREF(tmp);
8317         return;
8318     }
8319     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
8320         int new_max = __pyx_code_cache.max_count + 64;
8321         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
8322             __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
8323         if (unlikely(!entries)) {
8324             return;
8325         }
8326         __pyx_code_cache.entries = entries;
8327         __pyx_code_cache.max_count = new_max;
8328     }
8329     for (i=__pyx_code_cache.count; i>pos; i--) {
8330         entries[i] = entries[i-1];
8331     }
8332     entries[pos].code_line = code_line;
8333     entries[pos].code_object = code_object;
8334     __pyx_code_cache.count++;
8335     Py_INCREF(code_object);
8336 }
8337
8338 /* AddTraceback */
8339             #include "compile.h"
8340 #include "frameobject.h"
8341 #include "traceback.h"
8342 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
8343             const char *funcname, int c_line,
8344             int py_line, const char *filename) {
8345     PyCodeObject *py_code = 0;
8346     PyObject *py_srcfile = 0;
8347     PyObject *py_funcname = 0;
8348     #if PY_MAJOR_VERSION < 3
8349     py_srcfile = PyString_FromString(filename);
8350     #else
8351     py_srcfile = PyUnicode_FromString(filename);
8352     #endif
8353     if (!py_srcfile) goto bad;
8354     if (c_line) {
8355         #if PY_MAJOR_VERSION < 3
8356         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
8357         #else
8358         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
8359         #endif
8360     }
8361     else {
8362         #if PY_MAJOR_VERSION < 3
8363         py_funcname = PyString_FromString(funcname);
8364         #else
8365         py_funcname = PyUnicode_FromString(funcname);
8366         #endif
8367     }
8368     if (!py_funcname) goto bad;
8369     py_code = __Pyx_PyCode_New(
8370         0,
8371         0,
8372         0,
8373         0,
8374         0,
8375         __pyx_empty_bytes, /*PyObject *code,*/
8376         __pyx_empty_tuple, /*PyObject *consts,*/
8377         __pyx_empty_tuple, /*PyObject *names,*/
8378         __pyx_empty_tuple, /*PyObject *varnames,*/
8379         __pyx_empty_tuple, /*PyObject *freevars,*/
8380         __pyx_empty_tuple, /*PyObject *cellvars,*/
8381         py_srcfile,   /*PyObject *filename,*/
8382         py_funcname,  /*PyObject *name,*/
8383         py_line,
8384         __pyx_empty_bytes  /*PyObject *lnotab*/
8385     );
8386     Py_DECREF(py_srcfile);
8387     Py_DECREF(py_funcname);
8388     return py_code;
8389 bad:
8390     Py_XDECREF(py_srcfile);
8391     Py_XDECREF(py_funcname);
8392     return NULL;
8393 }
8394 static void __Pyx_AddTraceback(const char *funcname, int c_line,
8395                                int py_line, const char *filename) {
8396     PyCodeObject *py_code = 0;
8397     PyFrameObject *py_frame = 0;
8398     py_code = __pyx_find_code_object(c_line ? c_line : py_line);
8399     if (!py_code) {
8400         py_code = __Pyx_CreateCodeObjectForTraceback(
8401             funcname, c_line, py_line, filename);
8402         if (!py_code) goto bad;
8403         __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
8404     }
8405     py_frame = PyFrame_New(
8406         PyThreadState_GET(), /*PyThreadState *tstate,*/
8407         py_code,             /*PyCodeObject *code,*/
8408         __pyx_d,      /*PyObject *globals,*/
8409         0                    /*PyObject *locals*/
8410     );
8411     if (!py_frame) goto bad;
8412     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
8413     PyTraceBack_Here(py_frame);
8414 bad:
8415     Py_XDECREF(py_code);
8416     Py_XDECREF(py_frame);
8417 }
8418
8419 #if PY_MAJOR_VERSION < 3
8420 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
8421     if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
8422         if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
8423     PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
8424     return -1;
8425 }
8426 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
8427     PyObject *obj = view->obj;
8428     if (!obj) return;
8429     if (PyObject_CheckBuffer(obj)) {
8430         PyBuffer_Release(view);
8431         return;
8432     }
8433         if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; }
8434     Py_DECREF(obj);
8435     view->obj = NULL;
8436 }
8437 #endif
8438
8439
8440             /* CIntToPy */
8441             static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
8442     const int neg_one = (int) -1, const_zero = (int) 0;
8443     const int is_unsigned = neg_one > const_zero;
8444     if (is_unsigned) {
8445         if (sizeof(int) < sizeof(long)) {
8446             return PyInt_FromLong((long) value);
8447         } else if (sizeof(int) <= sizeof(unsigned long)) {
8448             return PyLong_FromUnsignedLong((unsigned long) value);
8449 #ifdef HAVE_LONG_LONG
8450         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
8451             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
8452 #endif
8453         }
8454     } else {
8455         if (sizeof(int) <= sizeof(long)) {
8456             return PyInt_FromLong((long) value);
8457 #ifdef HAVE_LONG_LONG
8458         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
8459             return PyLong_FromLongLong((PY_LONG_LONG) value);
8460 #endif
8461         }
8462     }
8463     {
8464         int one = 1; int little = (int)*(unsigned char *)&one;
8465         unsigned char *bytes = (unsigned char *)&value;
8466         return _PyLong_FromByteArray(bytes, sizeof(int),
8467                                      little, !is_unsigned);
8468     }
8469 }
8470
8471 /* CIntFromPyVerify */
8472             #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
8473     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
8474 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
8475     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
8476 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
8477     {\
8478         func_type value = func_value;\
8479         if (sizeof(target_type) < sizeof(func_type)) {\
8480             if (unlikely(value != (func_type) (target_type) value)) {\
8481                 func_type zero = 0;\
8482                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
8483                     return (target_type) -1;\
8484                 if (is_unsigned && unlikely(value < zero))\
8485                     goto raise_neg_overflow;\
8486                 else\
8487                     goto raise_overflow;\
8488             }\
8489         }\
8490         return (target_type) value;\
8491     }
8492
8493 /* CIntToPy */
8494             static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
8495     const long neg_one = (long) -1, const_zero = (long) 0;
8496     const int is_unsigned = neg_one > const_zero;
8497     if (is_unsigned) {
8498         if (sizeof(long) < sizeof(long)) {
8499             return PyInt_FromLong((long) value);
8500         } else if (sizeof(long) <= sizeof(unsigned long)) {
8501             return PyLong_FromUnsignedLong((unsigned long) value);
8502 #ifdef HAVE_LONG_LONG
8503         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
8504             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
8505 #endif
8506         }
8507     } else {
8508         if (sizeof(long) <= sizeof(long)) {
8509             return PyInt_FromLong((long) value);
8510 #ifdef HAVE_LONG_LONG
8511         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
8512             return PyLong_FromLongLong((PY_LONG_LONG) value);
8513 #endif
8514         }
8515     }
8516     {
8517         int one = 1; int little = (int)*(unsigned char *)&one;
8518         unsigned char *bytes = (unsigned char *)&value;
8519         return _PyLong_FromByteArray(bytes, sizeof(long),
8520                                      little, !is_unsigned);
8521     }
8522 }
8523
8524 /* Declarations */
8525             #if CYTHON_CCOMPLEX
8526   #ifdef __cplusplus
8527     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
8528       return ::std::complex< float >(x, y);
8529     }
8530   #else
8531     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
8532       return x + y*(__pyx_t_float_complex)_Complex_I;
8533     }
8534   #endif
8535 #else
8536     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
8537       __pyx_t_float_complex z;
8538       z.real = x;
8539       z.imag = y;
8540       return z;
8541     }
8542 #endif
8543
8544 /* Arithmetic */
8545             #if CYTHON_CCOMPLEX
8546 #else
8547     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
8548        return (a.real == b.real) && (a.imag == b.imag);
8549     }
8550     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
8551         __pyx_t_float_complex z;
8552         z.real = a.real + b.real;
8553         z.imag = a.imag + b.imag;
8554         return z;
8555     }
8556     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
8557         __pyx_t_float_complex z;
8558         z.real = a.real - b.real;
8559         z.imag = a.imag - b.imag;
8560         return z;
8561     }
8562     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
8563         __pyx_t_float_complex z;
8564         z.real = a.real * b.real - a.imag * b.imag;
8565         z.imag = a.real * b.imag + a.imag * b.real;
8566         return z;
8567     }
8568     #if 1
8569     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
8570         if (b.imag == 0) {
8571             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
8572         } else if (fabsf(b.real) >= fabsf(b.imag)) {
8573             if (b.real == 0 && b.imag == 0) {
8574                 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
8575             } else {
8576                 float r = b.imag / b.real;
8577                 float s = 1.0 / (b.real + b.imag * r);
8578                 return __pyx_t_float_complex_from_parts(
8579                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
8580             }
8581         } else {
8582             float r = b.real / b.imag;
8583             float s = 1.0 / (b.imag + b.real * r);
8584             return __pyx_t_float_complex_from_parts(
8585                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
8586         }
8587     }
8588     #else
8589     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
8590         if (b.imag == 0) {
8591             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
8592         } else {
8593             float denom = b.real * b.real + b.imag * b.imag;
8594             return __pyx_t_float_complex_from_parts(
8595                 (a.real * b.real + a.imag * b.imag) / denom,
8596                 (a.imag * b.real - a.real * b.imag) / denom);
8597         }
8598     }
8599     #endif
8600     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
8601         __pyx_t_float_complex z;
8602         z.real = -a.real;
8603         z.imag = -a.imag;
8604         return z;
8605     }
8606     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
8607        return (a.real == 0) && (a.imag == 0);
8608     }
8609     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
8610         __pyx_t_float_complex z;
8611         z.real =  a.real;
8612         z.imag = -a.imag;
8613         return z;
8614     }
8615     #if 1
8616         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
8617           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
8618             return sqrtf(z.real*z.real + z.imag*z.imag);
8619           #else
8620             return hypotf(z.real, z.imag);
8621           #endif
8622         }
8623         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
8624             __pyx_t_float_complex z;
8625             float r, lnr, theta, z_r, z_theta;
8626             if (b.imag == 0 && b.real == (int)b.real) {
8627                 if (b.real < 0) {
8628                     float denom = a.real * a.real + a.imag * a.imag;
8629                     a.real = a.real / denom;
8630                     a.imag = -a.imag / denom;
8631                     b.real = -b.real;
8632                 }
8633                 switch ((int)b.real) {
8634                     case 0:
8635                         z.real = 1;
8636                         z.imag = 0;
8637                         return z;
8638                     case 1:
8639                         return a;
8640                     case 2:
8641                         z = __Pyx_c_prod_float(a, a);
8642                         return __Pyx_c_prod_float(a, a);
8643                     case 3:
8644                         z = __Pyx_c_prod_float(a, a);
8645                         return __Pyx_c_prod_float(z, a);
8646                     case 4:
8647                         z = __Pyx_c_prod_float(a, a);
8648                         return __Pyx_c_prod_float(z, z);
8649                 }
8650             }
8651             if (a.imag == 0) {
8652                 if (a.real == 0) {
8653                     return a;
8654                 } else if (b.imag == 0) {
8655                     z.real = powf(a.real, b.real);
8656                     z.imag = 0;
8657                     return z;
8658                 } else if (a.real > 0) {
8659                     r = a.real;
8660                     theta = 0;
8661                 } else {
8662                     r = -a.real;
8663                     theta = atan2f(0, -1);
8664                 }
8665             } else {
8666                 r = __Pyx_c_abs_float(a);
8667                 theta = atan2f(a.imag, a.real);
8668             }
8669             lnr = logf(r);
8670             z_r = expf(lnr * b.real - theta * b.imag);
8671             z_theta = theta * b.real + lnr * b.imag;
8672             z.real = z_r * cosf(z_theta);
8673             z.imag = z_r * sinf(z_theta);
8674             return z;
8675         }
8676     #endif
8677 #endif
8678
8679 /* Declarations */
8680             #if CYTHON_CCOMPLEX
8681   #ifdef __cplusplus
8682     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
8683       return ::std::complex< double >(x, y);
8684     }
8685   #else
8686     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
8687       return x + y*(__pyx_t_double_complex)_Complex_I;
8688     }
8689   #endif
8690 #else
8691     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
8692       __pyx_t_double_complex z;
8693       z.real = x;
8694       z.imag = y;
8695       return z;
8696     }
8697 #endif
8698
8699 /* Arithmetic */
8700             #if CYTHON_CCOMPLEX
8701 #else
8702     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
8703        return (a.real == b.real) && (a.imag == b.imag);
8704     }
8705     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
8706         __pyx_t_double_complex z;
8707         z.real = a.real + b.real;
8708         z.imag = a.imag + b.imag;
8709         return z;
8710     }
8711     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
8712         __pyx_t_double_complex z;
8713         z.real = a.real - b.real;
8714         z.imag = a.imag - b.imag;
8715         return z;
8716     }
8717     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
8718         __pyx_t_double_complex z;
8719         z.real = a.real * b.real - a.imag * b.imag;
8720         z.imag = a.real * b.imag + a.imag * b.real;
8721         return z;
8722     }
8723     #if 1
8724     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
8725         if (b.imag == 0) {
8726             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
8727         } else if (fabs(b.real) >= fabs(b.imag)) {
8728             if (b.real == 0 && b.imag == 0) {
8729                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
8730             } else {
8731                 double r = b.imag / b.real;
8732                 double s = 1.0 / (b.real + b.imag * r);
8733                 return __pyx_t_double_complex_from_parts(
8734                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
8735             }
8736         } else {
8737             double r = b.real / b.imag;
8738             double s = 1.0 / (b.imag + b.real * r);
8739             return __pyx_t_double_complex_from_parts(
8740                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
8741         }
8742     }
8743     #else
8744     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
8745         if (b.imag == 0) {
8746             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
8747         } else {
8748             double denom = b.real * b.real + b.imag * b.imag;
8749             return __pyx_t_double_complex_from_parts(
8750                 (a.real * b.real + a.imag * b.imag) / denom,
8751                 (a.imag * b.real - a.real * b.imag) / denom);
8752         }
8753     }
8754     #endif
8755     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
8756         __pyx_t_double_complex z;
8757         z.real = -a.real;
8758         z.imag = -a.imag;
8759         return z;
8760     }
8761     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
8762        return (a.real == 0) && (a.imag == 0);
8763     }
8764     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
8765         __pyx_t_double_complex z;
8766         z.real =  a.real;
8767         z.imag = -a.imag;
8768         return z;
8769     }
8770     #if 1
8771         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
8772           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
8773             return sqrt(z.real*z.real + z.imag*z.imag);
8774           #else
8775             return hypot(z.real, z.imag);
8776           #endif
8777         }
8778         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
8779             __pyx_t_double_complex z;
8780             double r, lnr, theta, z_r, z_theta;
8781             if (b.imag == 0 && b.real == (int)b.real) {
8782                 if (b.real < 0) {
8783                     double denom = a.real * a.real + a.imag * a.imag;
8784                     a.real = a.real / denom;
8785                     a.imag = -a.imag / denom;
8786                     b.real = -b.real;
8787                 }
8788                 switch ((int)b.real) {
8789                     case 0:
8790                         z.real = 1;
8791                         z.imag = 0;
8792                         return z;
8793                     case 1:
8794                         return a;
8795                     case 2:
8796                         z = __Pyx_c_prod_double(a, a);
8797                         return __Pyx_c_prod_double(a, a);
8798                     case 3:
8799                         z = __Pyx_c_prod_double(a, a);
8800                         return __Pyx_c_prod_double(z, a);
8801                     case 4:
8802                         z = __Pyx_c_prod_double(a, a);
8803                         return __Pyx_c_prod_double(z, z);
8804                 }
8805             }
8806             if (a.imag == 0) {
8807                 if (a.real == 0) {
8808                     return a;
8809                 } else if (b.imag == 0) {
8810                     z.real = pow(a.real, b.real);
8811                     z.imag = 0;
8812                     return z;
8813                 } else if (a.real > 0) {
8814                     r = a.real;
8815                     theta = 0;
8816                 } else {
8817                     r = -a.real;
8818                     theta = atan2(0, -1);
8819                 }
8820             } else {
8821                 r = __Pyx_c_abs_double(a);
8822                 theta = atan2(a.imag, a.real);
8823             }
8824             lnr = log(r);
8825             z_r = exp(lnr * b.real - theta * b.imag);
8826             z_theta = theta * b.real + lnr * b.imag;
8827             z.real = z_r * cos(z_theta);
8828             z.imag = z_r * sin(z_theta);
8829             return z;
8830         }
8831     #endif
8832 #endif
8833
8834 /* CIntToPy */
8835             static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
8836     const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
8837     const int is_unsigned = neg_one > const_zero;
8838     if (is_unsigned) {
8839         if (sizeof(enum NPY_TYPES) < sizeof(long)) {
8840             return PyInt_FromLong((long) value);
8841         } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
8842             return PyLong_FromUnsignedLong((unsigned long) value);
8843 #ifdef HAVE_LONG_LONG
8844         } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
8845             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
8846 #endif
8847         }
8848     } else {
8849         if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
8850             return PyInt_FromLong((long) value);
8851 #ifdef HAVE_LONG_LONG
8852         } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
8853             return PyLong_FromLongLong((PY_LONG_LONG) value);
8854 #endif
8855         }
8856     }
8857     {
8858         int one = 1; int little = (int)*(unsigned char *)&one;
8859         unsigned char *bytes = (unsigned char *)&value;
8860         return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
8861                                      little, !is_unsigned);
8862     }
8863 }
8864
8865 /* CIntFromPy */
8866             static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
8867     const int neg_one = (int) -1, const_zero = (int) 0;
8868     const int is_unsigned = neg_one > const_zero;
8869 #if PY_MAJOR_VERSION < 3
8870     if (likely(PyInt_Check(x))) {
8871         if (sizeof(int) < sizeof(long)) {
8872             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
8873         } else {
8874             long val = PyInt_AS_LONG(x);
8875             if (is_unsigned && unlikely(val < 0)) {
8876                 goto raise_neg_overflow;
8877             }
8878             return (int) val;
8879         }
8880     } else
8881 #endif
8882     if (likely(PyLong_Check(x))) {
8883         if (is_unsigned) {
8884 #if CYTHON_USE_PYLONG_INTERNALS
8885             const digit* digits = ((PyLongObject*)x)->ob_digit;
8886             switch (Py_SIZE(x)) {
8887                 case  0: return (int) 0;
8888                 case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
8889                 case 2:
8890                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
8891                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
8892                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
8893                         } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
8894                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
8895                         }
8896                     }
8897                     break;
8898                 case 3:
8899                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
8900                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
8901                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
8902                         } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
8903                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
8904                         }
8905                     }
8906                     break;
8907                 case 4:
8908                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
8909                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
8910                             __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])))
8911                         } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
8912                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
8913                         }
8914                     }
8915                     break;
8916             }
8917 #endif
8918 #if CYTHON_COMPILING_IN_CPYTHON
8919             if (unlikely(Py_SIZE(x) < 0)) {
8920                 goto raise_neg_overflow;
8921             }
8922 #else
8923             {
8924                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
8925                 if (unlikely(result < 0))
8926                     return (int) -1;
8927                 if (unlikely(result == 1))
8928                     goto raise_neg_overflow;
8929             }
8930 #endif
8931             if (sizeof(int) <= sizeof(unsigned long)) {
8932                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
8933 #ifdef HAVE_LONG_LONG
8934             } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
8935                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
8936 #endif
8937             }
8938         } else {
8939 #if CYTHON_USE_PYLONG_INTERNALS
8940             const digit* digits = ((PyLongObject*)x)->ob_digit;
8941             switch (Py_SIZE(x)) {
8942                 case  0: return (int) 0;
8943                 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
8944                 case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
8945                 case -2:
8946                     if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
8947                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
8948                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
8949                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
8950                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
8951                         }
8952                     }
8953                     break;
8954                 case 2:
8955                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
8956                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
8957                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
8958                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
8959                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
8960                         }
8961                     }
8962                     break;
8963                 case -3:
8964                     if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
8965                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
8966                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
8967                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
8968                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
8969                         }
8970                     }
8971                     break;
8972                 case 3:
8973                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
8974                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
8975                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
8976                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
8977                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
8978                         }
8979                     }
8980                     break;
8981                 case -4:
8982                     if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
8983                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
8984                             __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])))
8985                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
8986                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
8987                         }
8988                     }
8989                     break;
8990                 case 4:
8991                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
8992                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
8993                             __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])))
8994                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
8995                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
8996                         }
8997                     }
8998                     break;
8999             }
9000 #endif
9001             if (sizeof(int) <= sizeof(long)) {
9002                 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
9003 #ifdef HAVE_LONG_LONG
9004             } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
9005                 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
9006 #endif
9007             }
9008         }
9009         {
9010 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
9011             PyErr_SetString(PyExc_RuntimeError,
9012                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
9013 #else
9014             int val;
9015             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
9016  #if PY_MAJOR_VERSION < 3
9017             if (likely(v) && !PyLong_Check(v)) {
9018                 PyObject *tmp = v;
9019                 v = PyNumber_Long(tmp);
9020                 Py_DECREF(tmp);
9021             }
9022  #endif
9023             if (likely(v)) {
9024                 int one = 1; int is_little = (int)*(unsigned char *)&one;
9025                 unsigned char *bytes = (unsigned char *)&val;
9026                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
9027                                               bytes, sizeof(val),
9028                                               is_little, !is_unsigned);
9029                 Py_DECREF(v);
9030                 if (likely(!ret))
9031                     return val;
9032             }
9033 #endif
9034             return (int) -1;
9035         }
9036     } else {
9037         int val;
9038         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
9039         if (!tmp) return (int) -1;
9040         val = __Pyx_PyInt_As_int(tmp);
9041         Py_DECREF(tmp);
9042         return val;
9043     }
9044 raise_overflow:
9045     PyErr_SetString(PyExc_OverflowError,
9046         "value too large to convert to int");
9047     return (int) -1;
9048 raise_neg_overflow:
9049     PyErr_SetString(PyExc_OverflowError,
9050         "can't convert negative value to int");
9051     return (int) -1;
9052 }
9053
9054 /* CIntFromPy */
9055             static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
9056     const long neg_one = (long) -1, const_zero = (long) 0;
9057     const int is_unsigned = neg_one > const_zero;
9058 #if PY_MAJOR_VERSION < 3
9059     if (likely(PyInt_Check(x))) {
9060         if (sizeof(long) < sizeof(long)) {
9061             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
9062         } else {
9063             long val = PyInt_AS_LONG(x);
9064             if (is_unsigned && unlikely(val < 0)) {
9065                 goto raise_neg_overflow;
9066             }
9067             return (long) val;
9068         }
9069     } else
9070 #endif
9071     if (likely(PyLong_Check(x))) {
9072         if (is_unsigned) {
9073 #if CYTHON_USE_PYLONG_INTERNALS
9074             const digit* digits = ((PyLongObject*)x)->ob_digit;
9075             switch (Py_SIZE(x)) {
9076                 case  0: return (long) 0;
9077                 case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
9078                 case 2:
9079                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
9080                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
9081                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
9082                         } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
9083                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
9084                         }
9085                     }
9086                     break;
9087                 case 3:
9088                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
9089                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
9090                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
9091                         } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
9092                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
9093                         }
9094                     }
9095                     break;
9096                 case 4:
9097                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
9098                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
9099                             __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])))
9100                         } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
9101                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
9102                         }
9103                     }
9104                     break;
9105             }
9106 #endif
9107 #if CYTHON_COMPILING_IN_CPYTHON
9108             if (unlikely(Py_SIZE(x) < 0)) {
9109                 goto raise_neg_overflow;
9110             }
9111 #else
9112             {
9113                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
9114                 if (unlikely(result < 0))
9115                     return (long) -1;
9116                 if (unlikely(result == 1))
9117                     goto raise_neg_overflow;
9118             }
9119 #endif
9120             if (sizeof(long) <= sizeof(unsigned long)) {
9121                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
9122 #ifdef HAVE_LONG_LONG
9123             } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
9124                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
9125 #endif
9126             }
9127         } else {
9128 #if CYTHON_USE_PYLONG_INTERNALS
9129             const digit* digits = ((PyLongObject*)x)->ob_digit;
9130             switch (Py_SIZE(x)) {
9131                 case  0: return (long) 0;
9132                 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
9133                 case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
9134                 case -2:
9135                     if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
9136                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
9137                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
9138                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
9139                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
9140                         }
9141                     }
9142                     break;
9143                 case 2:
9144                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
9145                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
9146                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
9147                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
9148                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
9149                         }
9150                     }
9151                     break;
9152                 case -3:
9153                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
9154                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
9155                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
9156                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
9157                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
9158                         }
9159                     }
9160                     break;
9161                 case 3:
9162                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
9163                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
9164                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
9165                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
9166                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
9167                         }
9168                     }
9169                     break;
9170                 case -4:
9171                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
9172                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
9173                             __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])))
9174                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
9175                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
9176                         }
9177                     }
9178                     break;
9179                 case 4:
9180                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
9181                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
9182                             __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])))
9183                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
9184                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
9185                         }
9186                     }
9187                     break;
9188             }
9189 #endif
9190             if (sizeof(long) <= sizeof(long)) {
9191                 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
9192 #ifdef HAVE_LONG_LONG
9193             } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
9194                 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
9195 #endif
9196             }
9197         }
9198         {
9199 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
9200             PyErr_SetString(PyExc_RuntimeError,
9201                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
9202 #else
9203             long val;
9204             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
9205  #if PY_MAJOR_VERSION < 3
9206             if (likely(v) && !PyLong_Check(v)) {
9207                 PyObject *tmp = v;
9208                 v = PyNumber_Long(tmp);
9209                 Py_DECREF(tmp);
9210             }
9211  #endif
9212             if (likely(v)) {
9213                 int one = 1; int is_little = (int)*(unsigned char *)&one;
9214                 unsigned char *bytes = (unsigned char *)&val;
9215                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
9216                                               bytes, sizeof(val),
9217                                               is_little, !is_unsigned);
9218                 Py_DECREF(v);
9219                 if (likely(!ret))
9220                     return val;
9221             }
9222 #endif
9223             return (long) -1;
9224         }
9225     } else {
9226         long val;
9227         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
9228         if (!tmp) return (long) -1;
9229         val = __Pyx_PyInt_As_long(tmp);
9230         Py_DECREF(tmp);
9231         return val;
9232     }
9233 raise_overflow:
9234     PyErr_SetString(PyExc_OverflowError,
9235         "value too large to convert to long");
9236     return (long) -1;
9237 raise_neg_overflow:
9238     PyErr_SetString(PyExc_OverflowError,
9239         "can't convert negative value to long");
9240     return (long) -1;
9241 }
9242
9243 /* CheckBinaryVersion */
9244             static int __Pyx_check_binary_version(void) {
9245     char ctversion[4], rtversion[4];
9246     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
9247     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
9248     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
9249         char message[200];
9250         PyOS_snprintf(message, sizeof(message),
9251                       "compiletime version %s of module '%.100s' "
9252                       "does not match runtime version %s",
9253                       ctversion, __Pyx_MODULE_NAME, rtversion);
9254         return PyErr_WarnEx(NULL, message, 1);
9255     }
9256     return 0;
9257 }
9258
9259 /* ModuleImport */
9260             #ifndef __PYX_HAVE_RT_ImportModule
9261 #define __PYX_HAVE_RT_ImportModule
9262 static PyObject *__Pyx_ImportModule(const char *name) {
9263     PyObject *py_name = 0;
9264     PyObject *py_module = 0;
9265     py_name = __Pyx_PyIdentifier_FromString(name);
9266     if (!py_name)
9267         goto bad;
9268     py_module = PyImport_Import(py_name);
9269     Py_DECREF(py_name);
9270     return py_module;
9271 bad:
9272     Py_XDECREF(py_name);
9273     return 0;
9274 }
9275 #endif
9276
9277 /* TypeImport */
9278             #ifndef __PYX_HAVE_RT_ImportType
9279 #define __PYX_HAVE_RT_ImportType
9280 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
9281     size_t size, int strict)
9282 {
9283     PyObject *py_module = 0;
9284     PyObject *result = 0;
9285     PyObject *py_name = 0;
9286     char warning[200];
9287     Py_ssize_t basicsize;
9288 #ifdef Py_LIMITED_API
9289     PyObject *py_basicsize;
9290 #endif
9291     py_module = __Pyx_ImportModule(module_name);
9292     if (!py_module)
9293         goto bad;
9294     py_name = __Pyx_PyIdentifier_FromString(class_name);
9295     if (!py_name)
9296         goto bad;
9297     result = PyObject_GetAttr(py_module, py_name);
9298     Py_DECREF(py_name);
9299     py_name = 0;
9300     Py_DECREF(py_module);
9301     py_module = 0;
9302     if (!result)
9303         goto bad;
9304     if (!PyType_Check(result)) {
9305         PyErr_Format(PyExc_TypeError,
9306             "%.200s.%.200s is not a type object",
9307             module_name, class_name);
9308         goto bad;
9309     }
9310 #ifndef Py_LIMITED_API
9311     basicsize = ((PyTypeObject *)result)->tp_basicsize;
9312 #else
9313     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
9314     if (!py_basicsize)
9315         goto bad;
9316     basicsize = PyLong_AsSsize_t(py_basicsize);
9317     Py_DECREF(py_basicsize);
9318     py_basicsize = 0;
9319     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
9320         goto bad;
9321 #endif
9322     if (!strict && (size_t)basicsize > size) {
9323         PyOS_snprintf(warning, sizeof(warning),
9324             "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
9325             module_name, class_name, basicsize, size);
9326         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
9327     }
9328     else if ((size_t)basicsize != size) {
9329         PyErr_Format(PyExc_ValueError,
9330             "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
9331             module_name, class_name, basicsize, size);
9332         goto bad;
9333     }
9334     return (PyTypeObject *)result;
9335 bad:
9336     Py_XDECREF(py_module);
9337     Py_XDECREF(result);
9338     return NULL;
9339 }
9340 #endif
9341
9342 /* InitStrings */
9343             static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
9344     while (t->p) {
9345         #if PY_MAJOR_VERSION < 3
9346         if (t->is_unicode) {
9347             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
9348         } else if (t->intern) {
9349             *t->p = PyString_InternFromString(t->s);
9350         } else {
9351             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
9352         }
9353         #else
9354         if (t->is_unicode | t->is_str) {
9355             if (t->intern) {
9356                 *t->p = PyUnicode_InternFromString(t->s);
9357             } else if (t->encoding) {
9358                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
9359             } else {
9360                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
9361             }
9362         } else {
9363             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
9364         }
9365         #endif
9366         if (!*t->p)
9367             return -1;
9368         ++t;
9369     }
9370     return 0;
9371 }
9372
9373 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
9374     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
9375 }
9376 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
9377     Py_ssize_t ignore;
9378     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
9379 }
9380 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
9381 #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
9382     if (
9383 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
9384             __Pyx_sys_getdefaultencoding_not_ascii &&
9385 #endif
9386             PyUnicode_Check(o)) {
9387 #if PY_VERSION_HEX < 0x03030000
9388         char* defenc_c;
9389         PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
9390         if (!defenc) return NULL;
9391         defenc_c = PyBytes_AS_STRING(defenc);
9392 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
9393         {
9394             char* end = defenc_c + PyBytes_GET_SIZE(defenc);
9395             char* c;
9396             for (c = defenc_c; c < end; c++) {
9397                 if ((unsigned char) (*c) >= 128) {
9398                     PyUnicode_AsASCIIString(o);
9399                     return NULL;
9400                 }
9401             }
9402         }
9403 #endif
9404         *length = PyBytes_GET_SIZE(defenc);
9405         return defenc_c;
9406 #else
9407         if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
9408 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
9409         if (PyUnicode_IS_ASCII(o)) {
9410             *length = PyUnicode_GET_LENGTH(o);
9411             return PyUnicode_AsUTF8(o);
9412         } else {
9413             PyUnicode_AsASCIIString(o);
9414             return NULL;
9415         }
9416 #else
9417         return PyUnicode_AsUTF8AndSize(o, length);
9418 #endif
9419 #endif
9420     } else
9421 #endif
9422 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
9423     if (PyByteArray_Check(o)) {
9424         *length = PyByteArray_GET_SIZE(o);
9425         return PyByteArray_AS_STRING(o);
9426     } else
9427 #endif
9428     {
9429         char* result;
9430         int r = PyBytes_AsStringAndSize(o, &result, length);
9431         if (unlikely(r < 0)) {
9432             return NULL;
9433         } else {
9434             return result;
9435         }
9436     }
9437 }
9438 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
9439    int is_true = x == Py_True;
9440    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
9441    else return PyObject_IsTrue(x);
9442 }
9443 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
9444 #if CYTHON_USE_TYPE_SLOTS
9445   PyNumberMethods *m;
9446 #endif
9447   const char *name = NULL;
9448   PyObject *res = NULL;
9449 #if PY_MAJOR_VERSION < 3
9450   if (PyInt_Check(x) || PyLong_Check(x))
9451 #else
9452   if (PyLong_Check(x))
9453 #endif
9454     return __Pyx_NewRef(x);
9455 #if CYTHON_USE_TYPE_SLOTS
9456   m = Py_TYPE(x)->tp_as_number;
9457   #if PY_MAJOR_VERSION < 3
9458   if (m && m->nb_int) {
9459     name = "int";
9460     res = PyNumber_Int(x);
9461   }
9462   else if (m && m->nb_long) {
9463     name = "long";
9464     res = PyNumber_Long(x);
9465   }
9466   #else
9467   if (m && m->nb_int) {
9468     name = "int";
9469     res = PyNumber_Long(x);
9470   }
9471   #endif
9472 #else
9473   res = PyNumber_Int(x);
9474 #endif
9475   if (res) {
9476 #if PY_MAJOR_VERSION < 3
9477     if (!PyInt_Check(res) && !PyLong_Check(res)) {
9478 #else
9479     if (!PyLong_Check(res)) {
9480 #endif
9481       PyErr_Format(PyExc_TypeError,
9482                    "__%.4s__ returned non-%.4s (type %.200s)",
9483                    name, name, Py_TYPE(res)->tp_name);
9484       Py_DECREF(res);
9485       return NULL;
9486     }
9487   }
9488   else if (!PyErr_Occurred()) {
9489     PyErr_SetString(PyExc_TypeError,
9490                     "an integer is required");
9491   }
9492   return res;
9493 }
9494 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
9495   Py_ssize_t ival;
9496   PyObject *x;
9497 #if PY_MAJOR_VERSION < 3
9498   if (likely(PyInt_CheckExact(b))) {
9499     if (sizeof(Py_ssize_t) >= sizeof(long))
9500         return PyInt_AS_LONG(b);
9501     else
9502         return PyInt_AsSsize_t(x);
9503   }
9504 #endif
9505   if (likely(PyLong_CheckExact(b))) {
9506     #if CYTHON_USE_PYLONG_INTERNALS
9507     const digit* digits = ((PyLongObject*)b)->ob_digit;
9508     const Py_ssize_t size = Py_SIZE(b);
9509     if (likely(__Pyx_sst_abs(size) <= 1)) {
9510         ival = likely(size) ? digits[0] : 0;
9511         if (size == -1) ival = -ival;
9512         return ival;
9513     } else {
9514       switch (size) {
9515          case 2:
9516            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
9517              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
9518            }
9519            break;
9520          case -2:
9521            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
9522              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
9523            }
9524            break;
9525          case 3:
9526            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
9527              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
9528            }
9529            break;
9530          case -3:
9531            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
9532              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
9533            }
9534            break;
9535          case 4:
9536            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
9537              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]));
9538            }
9539            break;
9540          case -4:
9541            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
9542              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]));
9543            }
9544            break;
9545       }
9546     }
9547     #endif
9548     return PyLong_AsSsize_t(b);
9549   }
9550   x = PyNumber_Index(b);
9551   if (!x) return -1;
9552   ival = PyInt_AsSsize_t(x);
9553   Py_DECREF(x);
9554   return ival;
9555 }
9556 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
9557     return PyInt_FromSize_t(ival);
9558 }
9559
9560
9561 #endif /* Py_PYTHON_H */