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