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