3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
8 #error Python headers needed to compile C extensions, please install development version of Python.
9 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
10 #error Cython requires Python 2.6+ or Python 3.3+.
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
17 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
31 #define DL_IMPORT(t) t
34 #define DL_EXPORT(t) t
37 #ifndef HAVE_LONG_LONG
38 #if PY_VERSION_HEX >= 0x02070000
39 #define HAVE_LONG_LONG
43 #define PY_LONG_LONG LONG_LONG
46 #define Py_HUGE_VAL HUGE_VAL
49 #define CYTHON_COMPILING_IN_PYPY 1
50 #define CYTHON_COMPILING_IN_PYSTON 0
51 #define CYTHON_COMPILING_IN_CPYTHON 0
52 #undef CYTHON_USE_TYPE_SLOTS
53 #define CYTHON_USE_TYPE_SLOTS 0
54 #undef CYTHON_USE_PYTYPE_LOOKUP
55 #define CYTHON_USE_PYTYPE_LOOKUP 0
56 #if PY_VERSION_HEX < 0x03050000
57 #undef CYTHON_USE_ASYNC_SLOTS
58 #define CYTHON_USE_ASYNC_SLOTS 0
59 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
60 #define CYTHON_USE_ASYNC_SLOTS 1
62 #undef CYTHON_USE_PYLIST_INTERNALS
63 #define CYTHON_USE_PYLIST_INTERNALS 0
64 #undef CYTHON_USE_UNICODE_INTERNALS
65 #define CYTHON_USE_UNICODE_INTERNALS 0
66 #undef CYTHON_USE_UNICODE_WRITER
67 #define CYTHON_USE_UNICODE_WRITER 0
68 #undef CYTHON_USE_PYLONG_INTERNALS
69 #define CYTHON_USE_PYLONG_INTERNALS 0
70 #undef CYTHON_AVOID_BORROWED_REFS
71 #define CYTHON_AVOID_BORROWED_REFS 1
72 #undef CYTHON_ASSUME_SAFE_MACROS
73 #define CYTHON_ASSUME_SAFE_MACROS 0
74 #undef CYTHON_UNPACK_METHODS
75 #define CYTHON_UNPACK_METHODS 0
76 #undef CYTHON_FAST_THREAD_STATE
77 #define CYTHON_FAST_THREAD_STATE 0
78 #undef CYTHON_FAST_PYCALL
79 #define CYTHON_FAST_PYCALL 0
80 #undef CYTHON_PEP489_MULTI_PHASE_INIT
81 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
82 #undef CYTHON_USE_TP_FINALIZE
83 #define CYTHON_USE_TP_FINALIZE 0
84 #undef CYTHON_USE_DICT_VERSIONS
85 #define CYTHON_USE_DICT_VERSIONS 0
86 #undef CYTHON_USE_EXC_INFO_STACK
87 #define CYTHON_USE_EXC_INFO_STACK 0
88 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
89 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
91 #elif defined(PYSTON_VERSION)
92 #define CYTHON_COMPILING_IN_PYPY 0
93 #define CYTHON_COMPILING_IN_PYSTON 1
94 #define CYTHON_COMPILING_IN_CPYTHON 0
95 #ifndef CYTHON_USE_TYPE_SLOTS
96 #define CYTHON_USE_TYPE_SLOTS 1
98 #undef CYTHON_USE_PYTYPE_LOOKUP
99 #define CYTHON_USE_PYTYPE_LOOKUP 0
100 #undef CYTHON_USE_ASYNC_SLOTS
101 #define CYTHON_USE_ASYNC_SLOTS 0
102 #undef CYTHON_USE_PYLIST_INTERNALS
103 #define CYTHON_USE_PYLIST_INTERNALS 0
104 #ifndef CYTHON_USE_UNICODE_INTERNALS
105 #define CYTHON_USE_UNICODE_INTERNALS 1
107 #undef CYTHON_USE_UNICODE_WRITER
108 #define CYTHON_USE_UNICODE_WRITER 0
109 #undef CYTHON_USE_PYLONG_INTERNALS
110 #define CYTHON_USE_PYLONG_INTERNALS 0
111 #ifndef CYTHON_AVOID_BORROWED_REFS
112 #define CYTHON_AVOID_BORROWED_REFS 0
114 #ifndef CYTHON_ASSUME_SAFE_MACROS
115 #define CYTHON_ASSUME_SAFE_MACROS 1
117 #ifndef CYTHON_UNPACK_METHODS
118 #define CYTHON_UNPACK_METHODS 1
120 #undef CYTHON_FAST_THREAD_STATE
121 #define CYTHON_FAST_THREAD_STATE 0
122 #undef CYTHON_FAST_PYCALL
123 #define CYTHON_FAST_PYCALL 0
124 #undef CYTHON_PEP489_MULTI_PHASE_INIT
125 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
126 #undef CYTHON_USE_TP_FINALIZE
127 #define CYTHON_USE_TP_FINALIZE 0
128 #undef CYTHON_USE_DICT_VERSIONS
129 #define CYTHON_USE_DICT_VERSIONS 0
130 #undef CYTHON_USE_EXC_INFO_STACK
131 #define CYTHON_USE_EXC_INFO_STACK 0
132 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
133 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
136 #define CYTHON_COMPILING_IN_PYPY 0
137 #define CYTHON_COMPILING_IN_PYSTON 0
138 #define CYTHON_COMPILING_IN_CPYTHON 1
139 #ifndef CYTHON_USE_TYPE_SLOTS
140 #define CYTHON_USE_TYPE_SLOTS 1
142 #if PY_VERSION_HEX < 0x02070000
143 #undef CYTHON_USE_PYTYPE_LOOKUP
144 #define CYTHON_USE_PYTYPE_LOOKUP 0
145 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
146 #define CYTHON_USE_PYTYPE_LOOKUP 1
148 #if PY_MAJOR_VERSION < 3
149 #undef CYTHON_USE_ASYNC_SLOTS
150 #define CYTHON_USE_ASYNC_SLOTS 0
151 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
152 #define CYTHON_USE_ASYNC_SLOTS 1
154 #if PY_VERSION_HEX < 0x02070000
155 #undef CYTHON_USE_PYLONG_INTERNALS
156 #define CYTHON_USE_PYLONG_INTERNALS 0
157 #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
158 #define CYTHON_USE_PYLONG_INTERNALS 1
160 #ifndef CYTHON_USE_PYLIST_INTERNALS
161 #define CYTHON_USE_PYLIST_INTERNALS 1
163 #ifndef CYTHON_USE_UNICODE_INTERNALS
164 #define CYTHON_USE_UNICODE_INTERNALS 1
166 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
167 #undef CYTHON_USE_UNICODE_WRITER
168 #define CYTHON_USE_UNICODE_WRITER 0
169 #elif !defined(CYTHON_USE_UNICODE_WRITER)
170 #define CYTHON_USE_UNICODE_WRITER 1
172 #ifndef CYTHON_AVOID_BORROWED_REFS
173 #define CYTHON_AVOID_BORROWED_REFS 0
175 #ifndef CYTHON_ASSUME_SAFE_MACROS
176 #define CYTHON_ASSUME_SAFE_MACROS 1
178 #ifndef CYTHON_UNPACK_METHODS
179 #define CYTHON_UNPACK_METHODS 1
181 #if PY_VERSION_HEX >= 0x030B00A4
182 #undef CYTHON_FAST_THREAD_STATE
183 #define CYTHON_FAST_THREAD_STATE 0
184 #elif !defined(CYTHON_FAST_THREAD_STATE)
185 #define CYTHON_FAST_THREAD_STATE 1
187 #ifndef CYTHON_FAST_PYCALL
188 #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
190 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191 #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
193 #ifndef CYTHON_USE_TP_FINALIZE
194 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
196 #ifndef CYTHON_USE_DICT_VERSIONS
197 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
199 #if PY_VERSION_HEX >= 0x030B00A4
200 #undef CYTHON_USE_EXC_INFO_STACK
201 #define CYTHON_USE_EXC_INFO_STACK 0
202 #elif !defined(CYTHON_USE_EXC_INFO_STACK)
203 #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
205 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
212 #if CYTHON_USE_PYLONG_INTERNALS
213 #if PY_MAJOR_VERSION < 3
214 #include "longintrepr.h"
220 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
223 #ifndef __has_attribute
224 #define __has_attribute(x) 0
226 #ifndef __has_cpp_attribute
227 #define __has_cpp_attribute(x) 0
229 #ifndef CYTHON_RESTRICT
230 #if defined(__GNUC__)
231 #define CYTHON_RESTRICT __restrict__
232 #elif defined(_MSC_VER) && _MSC_VER >= 1400
233 #define CYTHON_RESTRICT __restrict
234 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
235 #define CYTHON_RESTRICT restrict
237 #define CYTHON_RESTRICT
240 #ifndef CYTHON_UNUSED
241 # if defined(__GNUC__)
242 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
243 # define CYTHON_UNUSED __attribute__ ((__unused__))
245 # define CYTHON_UNUSED
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
250 # define CYTHON_UNUSED
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255 template<
class T>
void CYTHON_MAYBE_UNUSED_VAR(
const T& ) { }
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
269 #ifndef _MSC_STDINT_H_
271 typedef unsigned char uint8_t;
272 typedef unsigned int uint32_t;
274 typedef unsigned __int8 uint8_t;
275 typedef unsigned __int32 uint32_t;
281 #ifndef CYTHON_FALLTHROUGH
282 #if defined(__cplusplus) && __cplusplus >= 201103L
283 #if __has_cpp_attribute(fallthrough)
284 #define CYTHON_FALLTHROUGH [[fallthrough]]
285 #elif __has_cpp_attribute(clang::fallthrough)
286 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
287 #elif __has_cpp_attribute(gnu::fallthrough)
288 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
291 #ifndef CYTHON_FALLTHROUGH
292 #if __has_attribute(fallthrough)
293 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
295 #define CYTHON_FALLTHROUGH
298 #if defined(__clang__ ) && defined(__apple_build_version__)
299 #if __apple_build_version__ < 7000000
300 #undef CYTHON_FALLTHROUGH
301 #define CYTHON_FALLTHROUGH
307 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
309 #ifndef CYTHON_INLINE
310 #if defined(__clang__)
311 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
313 #define CYTHON_INLINE inline
317 void __Pyx_call_destructor(
T& x) {
321 class __Pyx_FakeReference {
323 __Pyx_FakeReference() : ptr(NULL) { }
324 __Pyx_FakeReference(
const T& ref) : ptr(const_cast<
T*>(&ref)) { }
325 T *operator->() {
return ptr; }
326 T *operator&() {
return ptr; }
327 operator T&() {
return *ptr; }
328 template<
typename U>
bool operator ==(
U other) {
return *ptr == other; }
329 template<
typename U>
bool operator !=(
U other) {
return *ptr != other; }
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335 #define Py_OptimizeFlag 0
337 #define __PYX_BUILD_PY_SSIZE_T "n"
338 #define CYTHON_FORMAT_SSIZE_T "z"
339 #if PY_MAJOR_VERSION < 3
340 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
341 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
342 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
343 #define __Pyx_DefaultClassType PyClass_Type
345 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
346 #define __Pyx_DefaultClassType PyType_Type
347 #if PY_VERSION_HEX >= 0x030B00A1
348 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(
int a,
int k,
int l,
int s,
int f,
349 PyObject *code, PyObject *
c, PyObject*
n, PyObject *
v,
350 PyObject *fv, PyObject *cell, PyObject* fn,
351 PyObject *name,
int fline, PyObject *lnos) {
352 PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
353 PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
354 const char *fn_cstr=NULL;
355 const char *name_cstr=NULL;
356 PyCodeObject* co=NULL;
357 PyObject *type, *value, *traceback;
358 PyErr_Fetch(&type, &value, &traceback);
359 if (!(kwds=PyDict_New()))
goto end;
360 if (!(argcount=PyLong_FromLong(a)))
goto end;
361 if (PyDict_SetItemString(kwds,
"co_argcount", argcount) != 0)
goto end;
362 if (!(posonlyargcount=PyLong_FromLong(0)))
goto end;
363 if (PyDict_SetItemString(kwds,
"co_posonlyargcount", posonlyargcount) != 0)
goto end;
364 if (!(kwonlyargcount=PyLong_FromLong(k)))
goto end;
365 if (PyDict_SetItemString(kwds,
"co_kwonlyargcount", kwonlyargcount) != 0)
goto end;
366 if (!(nlocals=PyLong_FromLong(l)))
goto end;
367 if (PyDict_SetItemString(kwds,
"co_nlocals", nlocals) != 0)
goto end;
368 if (!(stacksize=PyLong_FromLong(
s)))
goto end;
369 if (PyDict_SetItemString(kwds,
"co_stacksize", stacksize) != 0)
goto end;
370 if (!(flags=PyLong_FromLong(
f)))
goto end;
371 if (PyDict_SetItemString(kwds,
"co_flags", flags) != 0)
goto end;
372 if (PyDict_SetItemString(kwds,
"co_code", code) != 0)
goto end;
373 if (PyDict_SetItemString(kwds,
"co_consts",
c) != 0)
goto end;
374 if (PyDict_SetItemString(kwds,
"co_names",
n) != 0)
goto end;
375 if (PyDict_SetItemString(kwds,
"co_varnames",
v) != 0)
goto end;
376 if (PyDict_SetItemString(kwds,
"co_freevars", fv) != 0)
goto end;
377 if (PyDict_SetItemString(kwds,
"co_cellvars", cell) != 0)
goto end;
378 if (PyDict_SetItemString(kwds,
"co_linetable", lnos) != 0)
goto end;
379 if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL)))
goto end;
380 if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL)))
goto end;
381 if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline)))
goto end;
382 if (!(replace = PyObject_GetAttrString((PyObject*)co,
"replace")))
goto cleanup_code_too;
383 if (!(empty = PyTuple_New(0)))
goto cleanup_code_too;
384 if (!(call_result = PyObject_Call(replace, empty, kwds)))
goto cleanup_code_too;
385 Py_XDECREF((PyObject*)co);
386 co = (PyCodeObject*)call_result;
390 Py_XDECREF((PyObject*)co);
395 Py_XDECREF(argcount);
396 Py_XDECREF(posonlyargcount);
397 Py_XDECREF(kwonlyargcount);
399 Py_XDECREF(stacksize);
401 Py_XDECREF(call_result);
404 PyErr_Restore(type, value, traceback);
409 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
410 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
412 #define __Pyx_DefaultClassType PyType_Type
414 #ifndef Py_TPFLAGS_CHECKTYPES
415 #define Py_TPFLAGS_CHECKTYPES 0
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418 #define Py_TPFLAGS_HAVE_INDEX 0
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424 #define Py_TPFLAGS_HAVE_FINALIZE 0
426 #ifndef METH_STACKLESS
427 #define METH_STACKLESS 0
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430 #ifndef METH_FASTCALL
431 #define METH_FASTCALL 0x80
433 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *
self, PyObject *
const *args, Py_ssize_t nargs);
434 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *
self, PyObject *
const *args,
435 Py_ssize_t nargs, PyObject *kwnames);
437 #define __Pyx_PyCFunctionFast _PyCFunctionFast
438 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
440 #if CYTHON_FAST_PYCCALL
441 #define __Pyx_PyFastCFunction_Check(func)\
442 ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
444 #define __Pyx_PyFastCFunction_Check(func) 0
446 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
447 #define PyObject_Malloc(s) PyMem_Malloc(s)
448 #define PyObject_Free(p) PyMem_Free(p)
449 #define PyObject_Realloc(p) PyMem_Realloc(p)
451 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
452 #define PyMem_RawMalloc(n) PyMem_Malloc(n)
453 #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
454 #define PyMem_RawFree(p) PyMem_Free(p)
456 #if CYTHON_COMPILING_IN_PYSTON
457 #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
458 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
460 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
463 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
464 #define __Pyx_PyThreadState_Current PyThreadState_GET()
465 #elif PY_VERSION_HEX >= 0x03060000
466 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
467 #elif PY_VERSION_HEX >= 0x03000000
468 #define __Pyx_PyThreadState_Current PyThreadState_GET()
470 #define __Pyx_PyThreadState_Current _PyThreadState_Current
472 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
473 #include "pythread.h"
474 #define Py_tss_NEEDS_INIT 0
475 typedef int Py_tss_t;
476 static CYTHON_INLINE
int PyThread_tss_create(Py_tss_t *key) {
477 *key = PyThread_create_key();
480 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(
void) {
481 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(
sizeof(Py_tss_t));
482 *key = Py_tss_NEEDS_INIT;
485 static CYTHON_INLINE
void PyThread_tss_free(Py_tss_t *key) {
488 static CYTHON_INLINE
int PyThread_tss_is_created(Py_tss_t *key) {
489 return *key != Py_tss_NEEDS_INIT;
491 static CYTHON_INLINE
void PyThread_tss_delete(Py_tss_t *key) {
492 PyThread_delete_key(*key);
493 *key = Py_tss_NEEDS_INIT;
495 static CYTHON_INLINE
int PyThread_tss_set(Py_tss_t *key,
void *value) {
496 return PyThread_set_key_value(*key, value);
498 static CYTHON_INLINE
void * PyThread_tss_get(Py_tss_t *key) {
499 return PyThread_get_key_value(*key);
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
507 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
508 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
509 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
511 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
514 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
515 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
519 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
520 #define CYTHON_PEP393_ENABLED 1
521 #if defined(PyUnicode_IS_READY)
522 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
523 0 : _PyUnicode_Ready((PyObject *)(op)))
525 #define __Pyx_PyUnicode_READY(op) (0)
527 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
528 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
529 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
530 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
531 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
532 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
533 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
534 #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
535 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
536 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
538 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
541 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
544 #define CYTHON_PEP393_ENABLED 0
545 #define PyUnicode_1BYTE_KIND 1
546 #define PyUnicode_2BYTE_KIND 2
547 #define PyUnicode_4BYTE_KIND 4
548 #define __Pyx_PyUnicode_READY(op) (0)
549 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
550 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
551 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
552 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
553 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
554 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
555 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
556 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
558 #if CYTHON_COMPILING_IN_PYPY
559 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
560 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
562 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
563 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
564 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
575 #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))
576 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
577 #if PY_MAJOR_VERSION >= 3
578 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
580 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583 #define PyObject_ASCII(o) PyObject_Repr(o)
585 #if PY_MAJOR_VERSION >= 3
586 #define PyBaseString_Type PyUnicode_Type
587 #define PyStringObject PyUnicodeObject
588 #define PyString_Type PyUnicode_Type
589 #define PyString_Check PyUnicode_Check
590 #define PyString_CheckExact PyUnicode_CheckExact
591 #ifndef PyObject_Unicode
592 #define PyObject_Unicode PyObject_Str
595 #if PY_MAJOR_VERSION >= 3
596 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
599 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
602 #ifndef PySet_CheckExact
603 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
605 #if PY_VERSION_HEX >= 0x030900A4
606 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
607 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
609 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
612 #if CYTHON_ASSUME_SAFE_MACROS
613 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
615 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
617 #if PY_MAJOR_VERSION >= 3
618 #define PyIntObject PyLongObject
619 #define PyInt_Type PyLong_Type
620 #define PyInt_Check(op) PyLong_Check(op)
621 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
622 #define PyInt_FromString PyLong_FromString
623 #define PyInt_FromUnicode PyLong_FromUnicode
624 #define PyInt_FromLong PyLong_FromLong
625 #define PyInt_FromSize_t PyLong_FromSize_t
626 #define PyInt_FromSsize_t PyLong_FromSsize_t
627 #define PyInt_AsLong PyLong_AsLong
628 #define PyInt_AS_LONG PyLong_AS_LONG
629 #define PyInt_AsSsize_t PyLong_AsSsize_t
630 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
631 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
632 #define PyNumber_Int PyNumber_Long
634 #if PY_MAJOR_VERSION >= 3
635 #define PyBoolObject PyLongObject
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638 #ifndef PyUnicode_InternFromString
639 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
642 #if PY_VERSION_HEX < 0x030200A4
643 typedef long Py_hash_t;
644 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
645 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
647 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
650 #if PY_MAJOR_VERSION >= 3
651 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
653 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
655 #if CYTHON_USE_ASYNC_SLOTS
656 #if PY_VERSION_HEX >= 0x030500B1
657 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
658 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
660 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
663 #define __Pyx_PyType_AsAsync(obj) NULL
665 #ifndef __Pyx_PyAsyncMethodsStruct
670 } __Pyx_PyAsyncMethodsStruct;
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674 #if !defined(_USE_MATH_DEFINES)
675 #define _USE_MATH_DEFINES
680 #define __PYX_NAN() ((float) NAN)
682 static CYTHON_INLINE
float __PYX_NAN() {
684 memset(&value, 0xFF,
sizeof(value));
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
691 #define __Pyx_truncl truncl
694 #define __PYX_MARK_ERR_POS(f_index, lineno) \
695 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
696 #define __PYX_ERR(f_index, lineno, Ln_error) \
697 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
699 #ifndef __PYX_EXTERN_C
701 #define __PYX_EXTERN_C extern "C"
703 #define __PYX_EXTERN_C extern
707 #define __PYX_HAVE__equivalent_polynomials
708 #define __PYX_HAVE_API__equivalent_polynomials
713 #include "numpy/arrayobject.h"
714 #include "numpy/ndarrayobject.h"
715 #include "numpy/ndarraytypes.h"
716 #include "numpy/arrayscalars.h"
717 #include "numpy/ufuncobject.h"
721 #include "pythread.h"
728 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
729 #define CYTHON_WITHOUT_ASSERTIONS
732 typedef struct {PyObject **p;
const char *
s;
const Py_ssize_t
n;
const char* encoding;
733 const char is_unicode;
const char is_str;
const char intern; } __Pyx_StringTabEntry;
735 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
736 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
737 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
738 #define __PYX_DEFAULT_STRING_ENCODING ""
739 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
740 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
741 #define __Pyx_uchar_cast(c) ((unsigned char)c)
742 #define __Pyx_long_cast(x) ((long)x)
743 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
744 (sizeof(type) < sizeof(Py_ssize_t)) ||\
745 (sizeof(type) > sizeof(Py_ssize_t) &&\
746 likely(v < (type)PY_SSIZE_T_MAX ||\
747 v == (type)PY_SSIZE_T_MAX) &&\
748 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
749 v == (type)PY_SSIZE_T_MIN))) ||\
750 (sizeof(type) == sizeof(Py_ssize_t) &&\
751 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
752 v == (type)PY_SSIZE_T_MAX))) )
753 static CYTHON_INLINE
int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
754 return (
size_t) i < (size_t) limit;
756 #if defined (__cplusplus) && __cplusplus >= 201103L
758 #define __Pyx_sst_abs(value) std::abs(value)
759 #elif SIZEOF_INT >= SIZEOF_SIZE_T
760 #define __Pyx_sst_abs(value) abs(value)
761 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
762 #define __Pyx_sst_abs(value) labs(value)
763 #elif defined (_MSC_VER)
764 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
765 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
766 #define __Pyx_sst_abs(value) llabs(value)
767 #elif defined (__GNUC__)
768 #define __Pyx_sst_abs(value) __builtin_llabs(value)
770 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
772 static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject*);
773 static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
774 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
775 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
776 #define __Pyx_PyBytes_FromString PyBytes_FromString
777 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
778 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
779 #if PY_MAJOR_VERSION < 3
780 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
781 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
783 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
784 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
786 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
787 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
788 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
789 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
790 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
791 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
792 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
793 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
794 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
795 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
796 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
797 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
798 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
799 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
800 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
801 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
802 static CYTHON_INLINE
size_t __Pyx_Py_UNICODE_strlen(
const Py_UNICODE *
u) {
803 const Py_UNICODE *u_end =
u;
805 return (
size_t)(u_end -
u - 1);
807 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
808 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
809 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
810 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
811 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
812 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b);
813 static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
814 static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
815 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
816 #define __Pyx_PySequence_Tuple(obj)\
817 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
818 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
819 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(
size_t);
820 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
821 #if CYTHON_ASSUME_SAFE_MACROS
822 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
824 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
826 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
827 #if PY_MAJOR_VERSION >= 3
828 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
830 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
832 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
833 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
834 static int __Pyx_sys_getdefaultencoding_not_ascii;
835 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
837 PyObject* default_encoding = NULL;
838 PyObject* ascii_chars_u = NULL;
839 PyObject* ascii_chars_b = NULL;
840 const char* default_encoding_c;
841 sys = PyImport_ImportModule(
"sys");
843 default_encoding = PyObject_CallMethod(sys, (
char*)
"getdefaultencoding", NULL);
845 if (!default_encoding)
goto bad;
846 default_encoding_c = PyBytes_AsString(default_encoding);
847 if (!default_encoding_c)
goto bad;
848 if (strcmp(default_encoding_c,
"ascii") == 0) {
849 __Pyx_sys_getdefaultencoding_not_ascii = 0;
851 char ascii_chars[128];
853 for (
c = 0;
c < 128;
c++) {
856 __Pyx_sys_getdefaultencoding_not_ascii = 1;
857 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
858 if (!ascii_chars_u)
goto bad;
859 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
860 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
863 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
867 Py_DECREF(ascii_chars_u);
868 Py_DECREF(ascii_chars_b);
870 Py_DECREF(default_encoding);
873 Py_XDECREF(default_encoding);
874 Py_XDECREF(ascii_chars_u);
875 Py_XDECREF(ascii_chars_b);
879 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
880 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
882 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
883 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
884 static char* __PYX_DEFAULT_STRING_ENCODING;
885 static int __Pyx_init_sys_getdefaultencoding_params(
void) {
887 PyObject* default_encoding = NULL;
888 char* default_encoding_c;
889 sys = PyImport_ImportModule(
"sys");
891 default_encoding = PyObject_CallMethod(sys, (
char*) (
const char*)
"getdefaultencoding", NULL);
893 if (!default_encoding)
goto bad;
894 default_encoding_c = PyBytes_AsString(default_encoding);
895 if (!default_encoding_c)
goto bad;
896 __PYX_DEFAULT_STRING_ENCODING = (
char*) malloc(strlen(default_encoding_c) + 1);
897 if (!__PYX_DEFAULT_STRING_ENCODING)
goto bad;
898 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
899 Py_DECREF(default_encoding);
902 Py_XDECREF(default_encoding);
910 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
911 #define likely(x) __builtin_expect(!!(x), 1)
912 #define unlikely(x) __builtin_expect(!!(x), 0)
914 #define likely(x) (x)
915 #define unlikely(x) (x)
917 static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
919 static PyObject *__pyx_m = NULL;
920 static PyObject *__pyx_d;
921 static PyObject *__pyx_b;
922 static PyObject *__pyx_cython_runtime = NULL;
923 static PyObject *__pyx_empty_tuple;
924 static PyObject *__pyx_empty_bytes;
925 static PyObject *__pyx_empty_unicode;
926 static int __pyx_lineno;
927 static int __pyx_clineno = 0;
928 static const char * __pyx_cfilenm= __FILE__;
929 static const char *__pyx_filename;
932 #if !defined(CYTHON_CCOMPLEX)
933 #if defined(__cplusplus)
934 #define CYTHON_CCOMPLEX 1
935 #elif defined(_Complex_I)
936 #define CYTHON_CCOMPLEX 1
938 #define CYTHON_CCOMPLEX 0
948 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
950 #define _Complex_I 1.0fj
954 static const char *__pyx_f[] = {
956 "proteus/equivalent_polynomials.pyx",
961 #ifndef __PYX_FORCE_INIT_THREADS
962 #define __PYX_FORCE_INIT_THREADS 0
966 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
967 #define __Pyx_PyGILState_Release PyGILState_Release
968 #define __Pyx_FastGIL_Remember()
969 #define __Pyx_FastGIL_Forget()
970 #define __Pyx_FastGilFuncInit()
973 #define IS_UNSIGNED(type) (((type) -1) > 0)
974 struct __Pyx_StructField_;
975 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
978 struct __Pyx_StructField_* fields;
986 typedef struct __Pyx_StructField_ {
987 __Pyx_TypeInfo* type;
992 __Pyx_StructField* field;
993 size_t parent_offset;
994 } __Pyx_BufFmt_StackElem;
996 __Pyx_StructField root;
997 __Pyx_BufFmt_StackElem* head;
999 size_t new_count, enc_count;
1000 size_t struct_alignment;
1005 char is_valid_array;
1006 } __Pyx_BufFmt_Context;
1009 #include <pythread.h>
1010 #ifndef CYTHON_ATOMICS
1011 #define CYTHON_ATOMICS 1
1013 #define __pyx_atomic_int_type int
1014 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
1015 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
1017 #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
1018 #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
1019 #ifdef __PYX_DEBUG_ATOMICS
1020 #warning "Using GNU atomics"
1022 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
1023 #include <Windows.h>
1024 #undef __pyx_atomic_int_type
1025 #define __pyx_atomic_int_type LONG
1026 #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
1027 #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
1028 #ifdef __PYX_DEBUG_ATOMICS
1029 #pragma message ("Using MSVC atomics")
1031 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
1032 #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
1033 #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
1034 #ifdef __PYX_DEBUG_ATOMICS
1035 #warning "Using Intel atomics"
1038 #undef CYTHON_ATOMICS
1039 #define CYTHON_ATOMICS 0
1040 #ifdef __PYX_DEBUG_ATOMICS
1041 #warning "Not using atomics"
1044 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1046 #define __pyx_add_acquisition_count(memview)\
1047 __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1048 #define __pyx_sub_acquisition_count(memview)\
1049 __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1051 #define __pyx_add_acquisition_count(memview)\
1052 __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1053 #define __pyx_sub_acquisition_count(memview)\
1054 __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1058 struct __pyx_memoryview_obj;
1060 struct __pyx_memoryview_obj *memview;
1062 Py_ssize_t shape[8];
1063 Py_ssize_t strides[8];
1064 Py_ssize_t suboffsets[8];
1065 } __Pyx_memviewslice;
1066 #define __Pyx_MemoryView_Len(m) (m.shape[0])
1076 typedef npy_int8 __pyx_t_5numpy_int8_t;
1085 typedef npy_int16 __pyx_t_5numpy_int16_t;
1094 typedef npy_int32 __pyx_t_5numpy_int32_t;
1103 typedef npy_int64 __pyx_t_5numpy_int64_t;
1112 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1121 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1130 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1139 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1148 typedef npy_float32 __pyx_t_5numpy_float32_t;
1157 typedef npy_float64 __pyx_t_5numpy_float64_t;
1166 typedef npy_long __pyx_t_5numpy_int_t;
1175 typedef npy_longlong __pyx_t_5numpy_long_t;
1184 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1193 typedef npy_ulong __pyx_t_5numpy_uint_t;
1202 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1211 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1220 typedef npy_intp __pyx_t_5numpy_intp_t;
1229 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1238 typedef npy_double __pyx_t_5numpy_float_t;
1247 typedef npy_double __pyx_t_5numpy_double_t;
1256 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1260 typedef ::std::complex< float > __pyx_t_float_complex;
1262 typedef float _Complex __pyx_t_float_complex;
1265 typedef struct {
float real, imag; } __pyx_t_float_complex;
1267 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1272 typedef ::std::complex< double > __pyx_t_double_complex;
1274 typedef double _Complex __pyx_t_double_complex;
1277 typedef struct {
double real, imag; } __pyx_t_double_complex;
1279 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
1283 struct __pyx_obj_22equivalent_polynomials_Simplex;
1284 struct __pyx_array_obj;
1285 struct __pyx_MemviewEnum_obj;
1286 struct __pyx_memoryview_obj;
1287 struct __pyx_memoryviewslice_obj;
1296 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1305 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1314 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1323 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1332 struct __pyx_obj_22equivalent_polynomials_Simplex {
1334 PyArrayObject *xiBuffer;
1342 PyArrayObject *_ImH;
1363 struct __pyx_array_obj {
1365 struct __pyx_vtabstruct_array *__pyx_vtab;
1371 Py_ssize_t *_strides;
1372 Py_ssize_t itemsize;
1375 void (*callback_free_data)(
void *);
1377 int dtype_is_object;
1388 struct __pyx_MemviewEnum_obj {
1401 struct __pyx_memoryview_obj {
1403 struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1406 PyObject *_array_interface;
1407 PyThread_type_lock lock;
1408 __pyx_atomic_int acquisition_count[2];
1409 __pyx_atomic_int *acquisition_count_aligned_p;
1412 int dtype_is_object;
1413 __Pyx_TypeInfo *typeinfo;
1424 struct __pyx_memoryviewslice_obj {
1425 struct __pyx_memoryview_obj __pyx_base;
1426 __Pyx_memviewslice from_slice;
1427 PyObject *from_object;
1428 PyObject *(*to_object_func)(
char *);
1429 int (*to_dtype_func)(
char *, PyObject *);
1442 struct __pyx_vtabstruct_array {
1443 PyObject *(*get_memview)(
struct __pyx_array_obj *);
1445 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1456 struct __pyx_vtabstruct_memoryview {
1457 char *(*get_item_pointer)(
struct __pyx_memoryview_obj *, PyObject *);
1458 PyObject *(*is_slice)(
struct __pyx_memoryview_obj *, PyObject *);
1459 PyObject *(*setitem_slice_assignment)(
struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1460 PyObject *(*setitem_slice_assign_scalar)(
struct __pyx_memoryview_obj *,
struct __pyx_memoryview_obj *, PyObject *);
1461 PyObject *(*setitem_indexed)(
struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1462 PyObject *(*convert_item_to_object)(
struct __pyx_memoryview_obj *,
char *);
1463 PyObject *(*assign_item_from_object)(
struct __pyx_memoryview_obj *,
char *, PyObject *);
1465 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1476 struct __pyx_vtabstruct__memoryviewslice {
1477 struct __pyx_vtabstruct_memoryview __pyx_base;
1479 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1483 #ifndef CYTHON_REFNANNY
1484 #define CYTHON_REFNANNY 0
1488 void (*INCREF)(
void*, PyObject*, int);
1489 void (*DECREF)(
void*, PyObject*, int);
1490 void (*GOTREF)(
void*, PyObject*, int);
1491 void (*GIVEREF)(
void*, PyObject*, int);
1492 void* (*SetupContext)(
const char*, int,
const char*);
1493 void (*FinishContext)(
void**);
1494 } __Pyx_RefNannyAPIStruct;
1495 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1496 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
1497 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1499 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1501 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1502 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1503 PyGILState_Release(__pyx_gilstate_save);\
1505 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1508 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1509 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1511 #define __Pyx_RefNannyFinishContext()\
1512 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1513 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1514 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1515 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1516 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1517 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1518 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1519 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1520 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1522 #define __Pyx_RefNannyDeclarations
1523 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1524 #define __Pyx_RefNannyFinishContext()
1525 #define __Pyx_INCREF(r) Py_INCREF(r)
1526 #define __Pyx_DECREF(r) Py_DECREF(r)
1527 #define __Pyx_GOTREF(r)
1528 #define __Pyx_GIVEREF(r)
1529 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1530 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1531 #define __Pyx_XGOTREF(r)
1532 #define __Pyx_XGIVEREF(r)
1534 #define __Pyx_XDECREF_SET(r, v) do {\
1535 PyObject *tmp = (PyObject *) r;\
1536 r = v; __Pyx_XDECREF(tmp);\
1538 #define __Pyx_DECREF_SET(r, v) do {\
1539 PyObject *tmp = (PyObject *) r;\
1540 r = v; __Pyx_DECREF(tmp);\
1542 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1543 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1546 #if CYTHON_USE_TYPE_SLOTS
1547 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1549 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1553 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1556 static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
1557 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1560 static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
1563 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1564 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1565 const char* function_name);
1568 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1569 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1570 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1571 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1572 (version_var) = __PYX_GET_DICT_VERSION(dict);\
1573 (cache_var) = (value);
1574 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1575 static PY_UINT64_T __pyx_dict_version = 0;\
1576 static PyObject *__pyx_dict_cached_value = NULL;\
1577 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1578 (VAR) = __pyx_dict_cached_value;\
1580 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1581 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1584 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1585 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1586 static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1588 #define __PYX_GET_DICT_VERSION(dict) (0)
1589 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1590 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1594 #if CYTHON_USE_DICT_VERSIONS
1595 #define __Pyx_GetModuleGlobalName(var, name) {\
1596 static PY_UINT64_T __pyx_dict_version = 0;\
1597 static PyObject *__pyx_dict_cached_value = NULL;\
1598 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1599 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1600 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1602 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1603 PY_UINT64_T __pyx_dict_version;\
1604 PyObject *__pyx_dict_cached_value;\
1605 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1607 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1609 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1610 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1611 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1615 #if CYTHON_COMPILING_IN_CPYTHON
1616 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1618 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1622 static CYTHON_INLINE
int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1625 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1626 ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1627 __Pyx__ArgTypeTest(obj, type, name, exact))
1628 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type,
const char *name,
int exact);
1631 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
1632 __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
1633 static CYTHON_INLINE
int __Pyx_PyObject_SetSlice(
1634 PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
1635 PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1636 int has_cstart,
int has_cstop,
int wraparound);
1639 #if CYTHON_FAST_PYCCALL
1640 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1642 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1646 #if CYTHON_FAST_PYCALL
1647 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1648 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1649 #if 1 || PY_VERSION_HEX < 0x030600B1
1650 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1652 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1654 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1655 (sizeof(char [1 - 2*!(cond)]) - 1)
1656 #ifndef Py_MEMBER_SIZE
1657 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1659 #if CYTHON_FAST_PYCALL
1660 static size_t __pyx_pyframe_localsplus_offset = 0;
1661 #include "frameobject.h"
1662 #if PY_VERSION_HEX >= 0x030b00a6
1663 #ifndef Py_BUILD_CORE
1664 #define Py_BUILD_CORE 1
1666 #include "internal/pycore_frame.h"
1668 #define __Pxy_PyFrame_Initialize_Offsets()\
1669 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1670 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1671 #define __Pyx_PyFrame_GetLocalsplus(frame)\
1672 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1673 #endif // CYTHON_FAST_PYCALL
1677 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject*
function, PyObject* arg1, PyObject* arg2);
1680 #if CYTHON_COMPILING_IN_CPYTHON
1681 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1685 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1688 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1689 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1690 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1691 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1692 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1693 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1694 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1695 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1696 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1697 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1698 int wraparound,
int boundscheck);
1699 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1700 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1701 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1702 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1703 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1704 int wraparound,
int boundscheck);
1705 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1706 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1707 int is_list,
int wraparound,
int boundscheck);
1710 #if CYTHON_FAST_THREAD_STATE
1711 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1712 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1713 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1715 #define __Pyx_PyThreadState_declare
1716 #define __Pyx_PyThreadState_assign
1717 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1721 #if CYTHON_FAST_THREAD_STATE
1722 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1723 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1724 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1725 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1726 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1727 static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1728 static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1729 #if CYTHON_COMPILING_IN_CPYTHON
1730 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1732 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1735 #define __Pyx_PyErr_Clear() PyErr_Clear()
1736 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1737 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1738 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1739 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1740 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1741 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1742 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1746 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1749 #if CYTHON_USE_EXC_INFO_STACK
1750 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1754 #if CYTHON_FAST_THREAD_STATE
1755 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1756 static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1757 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1758 static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1760 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1761 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1765 #if CYTHON_FAST_THREAD_STATE
1766 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1767 static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1769 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1773 #if CYTHON_FAST_THREAD_STATE
1774 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1775 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1777 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1784 static CYTHON_INLINE
int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2,
int equals);
1787 static CYTHON_INLINE
int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2,
int equals);
1790 #if PY_MAJOR_VERSION >= 3
1791 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1793 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1797 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
1800 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1801 (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1803 static CYTHON_UNUSED
int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
1804 static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *);
1806 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1809 #if CYTHON_USE_TYPE_SLOTS
1810 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1812 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1816 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(
const char *
s, Py_ssize_t size,
const char *errors) {
1818 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
1820 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(
const char *
s, Py_ssize_t size,
const char *errors) {
1822 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
1824 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(
const char *
s, Py_ssize_t size,
const char *errors) {
1826 return PyUnicode_DecodeUTF16(
s, size, errors, &byteorder);
1830 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
1831 const char* cstring, Py_ssize_t start, Py_ssize_t stop,
1832 const char* encoding,
const char* errors,
1833 PyObject* (*decode_func)(
const char *
s, Py_ssize_t size,
const char *errors));
1836 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1839 static CYTHON_INLINE
void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1842 static CYTHON_INLINE
void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1845 static CYTHON_INLINE
void __Pyx_RaiseNoneNotIterableError(
void);
1848 #if CYTHON_FAST_THREAD_STATE
1849 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1850 static CYTHON_INLINE
void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1852 static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1856 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list,
int level);
1859 #if CYTHON_COMPILING_IN_CPYTHON
1860 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1861 static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1862 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1863 static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1865 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1866 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1867 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1869 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1871 static CYTHON_UNUSED
int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
1873 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1874 static CYTHON_INLINE
int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1875 PyListObject*
L = (PyListObject*) list;
1876 Py_ssize_t len = Py_SIZE(list);
1877 if (likely(
L->allocated > len)) {
1879 PyList_SET_ITEM(list, len, x);
1880 __Pyx_SET_SIZE(list, len + 1);
1883 return PyList_Append(list, x);
1886 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1890 #if !CYTHON_COMPILING_IN_PYPY
1891 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check);
1893 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1894 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1898 static CYTHON_INLINE
int __Pyx_PyList_Extend(PyObject*
L, PyObject*
v) {
1899 #if CYTHON_COMPILING_IN_CPYTHON
1900 PyObject* none = _PyList_Extend((PyListObject*)
L,
v);
1901 if (unlikely(!none))
1906 return PyList_SetSlice(
L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX,
v);
1911 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1912 static CYTHON_INLINE
int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1913 PyListObject*
L = (PyListObject*) list;
1914 Py_ssize_t len = Py_SIZE(list);
1915 if (likely(
L->allocated > len) & likely(len > (
L->allocated >> 1))) {
1917 PyList_SET_ITEM(list, len, x);
1918 __Pyx_SET_SIZE(list, len + 1);
1921 return PyList_Append(list, x);
1924 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1928 static CYTHON_INLINE
void __Pyx_RaiseUnboundLocalError(
const char *varname);
1931 static CYTHON_INLINE
long __Pyx_div_long(
long,
long);
1934 static CYTHON_INLINE
int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq,
int eq) {
1935 int result = PySequence_Contains(seq, item);
1936 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1940 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1943 static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *, PyObject *);
1946 #if PY_MAJOR_VERSION < 3
1947 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
1948 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
1950 #define __Pyx_PyString_Join PyUnicode_Join
1951 #define __Pyx_PyBaseString_Join PyUnicode_Join
1953 #if CYTHON_COMPILING_IN_CPYTHON
1954 #if PY_MAJOR_VERSION < 3
1955 #define __Pyx_PyBytes_Join _PyString_Join
1957 #define __Pyx_PyBytes_Join _PyBytes_Join
1960 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
1964 #if PY_MAJOR_VERSION >= 3
1965 #define __Pyx_PyObject_Unicode(obj)\
1966 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1968 #define __Pyx_PyObject_Unicode(obj)\
1969 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1973 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1974 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1976 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1980 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1981 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1983 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1987 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1990 static int __Pyx_setup_reduce(PyObject* type_obj);
1993 static int __Pyx_SetVtable(PyObject *dict,
void *vtable);
1996 #ifndef __PYX_HAVE_RT_ImportType_proto
1997 #define __PYX_HAVE_RT_ImportType_proto
1998 enum __Pyx_ImportType_CheckSize {
1999 __Pyx_ImportType_CheckSize_Error = 0,
2000 __Pyx_ImportType_CheckSize_Warn = 1,
2001 __Pyx_ImportType_CheckSize_Ignore = 2
2003 static PyTypeObject *__Pyx_ImportType(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
enum __Pyx_ImportType_CheckSize check_size);
2007 #ifdef CYTHON_CLINE_IN_TRACEBACK
2008 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2010 static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
2015 PyCodeObject* code_object;
2017 } __Pyx_CodeObjectCacheEntry;
2018 struct __Pyx_CodeObjectCache {
2021 __Pyx_CodeObjectCacheEntry* entries;
2023 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2024 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
2025 static PyCodeObject *__pyx_find_code_object(
int code_line);
2026 static void __pyx_insert_code_object(
int code_line, PyCodeObject* code_object);
2029 static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
2030 int py_line,
const char *filename);
2036 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2037 #define __Pyx_HAS_GCC_DIAGNOSTIC
2041 static CYTHON_INLINE PyObject *__pyx_memview_get_double(
const char *itemp);
2042 static CYTHON_INLINE
int __pyx_memview_set_double(
const char *itemp, PyObject *obj);
2047 #define __Pyx_CREAL(z) ((z).real())
2048 #define __Pyx_CIMAG(z) ((z).imag())
2050 #define __Pyx_CREAL(z) (__real__(z))
2051 #define __Pyx_CIMAG(z) (__imag__(z))
2054 #define __Pyx_CREAL(z) ((z).real)
2055 #define __Pyx_CIMAG(z) ((z).imag)
2057 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2058 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2059 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2060 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2062 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2063 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2068 #define __Pyx_c_eq_float(a, b) ((a)==(b))
2069 #define __Pyx_c_sum_float(a, b) ((a)+(b))
2070 #define __Pyx_c_diff_float(a, b) ((a)-(b))
2071 #define __Pyx_c_prod_float(a, b) ((a)*(b))
2072 #define __Pyx_c_quot_float(a, b) ((a)/(b))
2073 #define __Pyx_c_neg_float(a) (-(a))
2075 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2076 #define __Pyx_c_conj_float(z) (::std::conj(z))
2078 #define __Pyx_c_abs_float(z) (::std::abs(z))
2079 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2082 #define __Pyx_c_is_zero_float(z) ((z)==0)
2083 #define __Pyx_c_conj_float(z) (conjf(z))
2085 #define __Pyx_c_abs_float(z) (cabsf(z))
2086 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2090 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2091 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2092 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2093 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2094 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2095 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2096 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2097 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2099 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex);
2100 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2106 #define __Pyx_c_eq_double(a, b) ((a)==(b))
2107 #define __Pyx_c_sum_double(a, b) ((a)+(b))
2108 #define __Pyx_c_diff_double(a, b) ((a)-(b))
2109 #define __Pyx_c_prod_double(a, b) ((a)*(b))
2110 #define __Pyx_c_quot_double(a, b) ((a)/(b))
2111 #define __Pyx_c_neg_double(a) (-(a))
2113 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2114 #define __Pyx_c_conj_double(z) (::std::conj(z))
2116 #define __Pyx_c_abs_double(z) (::std::abs(z))
2117 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2120 #define __Pyx_c_is_zero_double(z) ((z)==0)
2121 #define __Pyx_c_conj_double(z) (conj(z))
2123 #define __Pyx_c_abs_double(z) (cabs(z))
2124 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2128 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2129 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2130 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2131 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2132 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2133 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2134 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2135 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2137 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex);
2138 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2142 #if PY_MAJOR_VERSION < 3
2143 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view,
int flags);
2144 static void __Pyx_ReleaseBuffer(Py_buffer *view);
2146 #define __Pyx_GetBuffer PyObject_GetBuffer
2147 #define __Pyx_ReleaseBuffer PyBuffer_Release
2153 Py_ssize_t shape, strides, suboffsets;
2154 } __Pyx_Buf_DimInfo;
2160 __Pyx_Buffer *rcbuffer;
2162 __Pyx_Buf_DimInfo diminfo[8];
2163 } __Pyx_LocalBuf_ND;
2166 static int __pyx_memviewslice_is_contig(
const __Pyx_memviewslice mvs,
char order,
int ndim);
2169 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2170 __Pyx_memviewslice *slice2,
2171 int ndim,
size_t itemsize);
2174 static CYTHON_INLINE PyObject *__pyx_capsule_create(
void *p,
const char *sig);
2177 static CYTHON_INLINE
int __Pyx_PyInt_As_int(PyObject *);
2180 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(
int value);
2183 struct __pyx_typeinfo_string {
2186 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2189 static __Pyx_memviewslice
2190 __pyx_memoryview_copy_new_contig(
const __Pyx_memviewslice *from_mvs,
2191 const char *mode,
int ndim,
2192 size_t sizeof_dtype,
int contig_flag,
2193 int dtype_is_object);
2196 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2197 #define __Pyx_MEMVIEW_DIRECT 1
2198 #define __Pyx_MEMVIEW_PTR 2
2199 #define __Pyx_MEMVIEW_FULL 4
2200 #define __Pyx_MEMVIEW_CONTIG 8
2201 #define __Pyx_MEMVIEW_STRIDED 16
2202 #define __Pyx_MEMVIEW_FOLLOW 32
2203 #define __Pyx_IS_C_CONTIG 1
2204 #define __Pyx_IS_F_CONTIG 2
2205 static int __Pyx_init_memviewslice(
2206 struct __pyx_memoryview_obj *memview,
2208 __Pyx_memviewslice *memviewslice,
2209 int memview_is_new_reference);
2210 static CYTHON_INLINE
int __pyx_add_acquisition_count_locked(
2211 __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2212 static CYTHON_INLINE
int __pyx_sub_acquisition_count_locked(
2213 __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2214 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2215 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2216 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2217 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2218 static CYTHON_INLINE
void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *,
int,
int);
2219 static CYTHON_INLINE
void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *,
int,
int);
2222 static CYTHON_INLINE
long __Pyx_PyInt_As_long(PyObject *);
2225 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(
long value);
2228 static CYTHON_INLINE
char __Pyx_PyInt_As_char(PyObject *);
2231 static int __Pyx_check_binary_version(
void);
2234 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2236 static PyObject *__pyx_array_get_memview(
struct __pyx_array_obj *__pyx_v_self);
2237 static char *__pyx_memoryview_get_item_pointer(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index);
2238 static PyObject *__pyx_memoryview_is_slice(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj);
2239 static PyObject *__pyx_memoryview_setitem_slice_assignment(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src);
2240 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(
struct __pyx_memoryview_obj *__pyx_v_self,
struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value);
2241 static PyObject *__pyx_memoryview_setitem_indexed(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value);
2242 static PyObject *__pyx_memoryview_convert_item_to_object(
struct __pyx_memoryview_obj *__pyx_v_self,
char *__pyx_v_itemp);
2243 static PyObject *__pyx_memoryview_assign_item_from_object(
struct __pyx_memoryview_obj *__pyx_v_self,
char *__pyx_v_itemp, PyObject *__pyx_v_value);
2244 static PyObject *__pyx_memoryviewslice_convert_item_to_object(
struct __pyx_memoryviewslice_obj *__pyx_v_self,
char *__pyx_v_itemp);
2245 static PyObject *__pyx_memoryviewslice_assign_item_from_object(
struct __pyx_memoryviewslice_obj *__pyx_v_self,
char *__pyx_v_itemp, PyObject *__pyx_v_value);
2258 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2271 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2272 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2273 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2274 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2275 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
2276 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
2277 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
2278 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
2279 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
2280 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
2281 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
2282 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
2283 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
2284 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
2285 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2288 static PyTypeObject *__pyx_ptype_22equivalent_polynomials_Simplex = 0;
2289 static PyTypeObject *__pyx_array_type = 0;
2290 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2291 static PyTypeObject *__pyx_memoryview_type = 0;
2292 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2293 static PyObject *
generic = 0;
2294 static PyObject *strided = 0;
2295 static PyObject *indirect = 0;
2296 static PyObject *contiguous = 0;
2297 static PyObject *indirect_contiguous = 0;
2298 static int __pyx_memoryview_thread_locks_used;
2299 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2300 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t,
char *,
char *,
char *);
2301 static void *__pyx_align_pointer(
void *,
size_t);
2302 static PyObject *__pyx_memoryview_new(PyObject *,
int,
int, __Pyx_TypeInfo *);
2303 static CYTHON_INLINE
int __pyx_memoryview_check(PyObject *);
2304 static PyObject *_unellipsify(PyObject *,
int);
2305 static PyObject *assert_direct_dimensions(Py_ssize_t *,
int);
2306 static struct __pyx_memoryview_obj *__pyx_memview_slice(
struct __pyx_memoryview_obj *, PyObject *);
2307 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t,
int,
int,
int *, Py_ssize_t, Py_ssize_t, Py_ssize_t,
int,
int,
int,
int);
2308 static char *__pyx_pybuffer_index(Py_buffer *,
char *, Py_ssize_t, Py_ssize_t);
2309 static int __pyx_memslice_transpose(__Pyx_memviewslice *);
2310 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice,
int, PyObject *(*)(
char *),
int (*)(
char *, PyObject *),
int);
2311 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2312 static void __pyx_memoryview_slice_copy(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2313 static PyObject *__pyx_memoryview_copy_object(
struct __pyx_memoryview_obj *);
2314 static PyObject *__pyx_memoryview_copy_object_from_slice(
struct __pyx_memoryview_obj *, __Pyx_memviewslice *);
2315 static Py_ssize_t abs_py_ssize_t(Py_ssize_t);
2316 static char __pyx_get_best_slice_order(__Pyx_memviewslice *,
int);
2317 static void _copy_strided_to_strided(
char *, Py_ssize_t *,
char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *,
int,
size_t);
2318 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *,
int,
size_t);
2319 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *,
int);
2320 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t,
int,
char);
2321 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *,
char,
int);
2322 static int __pyx_memoryview_err_extents(
int, Py_ssize_t, Py_ssize_t);
2323 static int __pyx_memoryview_err_dim(PyObject *,
char *,
int);
2324 static int __pyx_memoryview_err(PyObject *,
char *);
2325 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice,
int,
int,
int);
2326 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *,
int,
int);
2327 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *,
int,
int,
int);
2328 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(
char *, Py_ssize_t *, Py_ssize_t *,
int,
int);
2329 static void __pyx_memoryview_refcount_objects_in_slice(
char *, Py_ssize_t *, Py_ssize_t *,
int,
int);
2330 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *,
int,
size_t,
void *,
int);
2331 static void __pyx_memoryview__slice_assign_scalar(
char *, Py_ssize_t *, Py_ssize_t *,
int,
size_t,
void *);
2332 static PyObject *__pyx_unpickle_Enum__set_state(
struct __pyx_MemviewEnum_obj *, PyObject *);
2333 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *);
2334 static __Pyx_TypeInfo __Pyx_TypeInfo_double = {
"double", NULL,
sizeof(double), { 0 }, 0,
'R', 0, 0 };
2335 #define __Pyx_MODULE_NAME "equivalent_polynomials"
2336 extern int __pyx_module_is_main_equivalent_polynomials;
2337 int __pyx_module_is_main_equivalent_polynomials = 0;
2340 static PyObject *__pyx_builtin_TypeError;
2341 static PyObject *__pyx_builtin_ImportError;
2342 static PyObject *__pyx_builtin_ValueError;
2343 static PyObject *__pyx_builtin_MemoryError;
2344 static PyObject *__pyx_builtin_enumerate;
2345 static PyObject *__pyx_builtin_range;
2346 static PyObject *__pyx_builtin_Ellipsis;
2347 static PyObject *__pyx_builtin_id;
2348 static PyObject *__pyx_builtin_IndexError;
2349 static const char __pyx_k_O[] =
"O";
2350 static const char __pyx_k_T[] =
"T{";
2351 static const char __pyx_k_c[] =
"c";
2352 static const char __pyx_k_d[] =
"d";
2353 static const char __pyx_k_s[] =
"(%s)";
2354 static const char __pyx_k_id[] =
"id";
2355 static const char __pyx_k_nP[] =
"nP";
2356 static const char __pyx_k_nQ[] =
"nQ";
2357 static const char __pyx_k_np[] =
"np";
2358 static const char __pyx_k_xi[] =
"xi";
2359 static const char __pyx_k__35[] =
"^";
2360 static const char __pyx_k__36[] =
"";
2361 static const char __pyx_k__37[] =
":";
2362 static const char __pyx_k__38[] =
"}";
2363 static const char __pyx_k__39[] =
",";
2364 static const char __pyx_k_new[] =
"__new__";
2365 static const char __pyx_k_obj[] =
"obj";
2366 static const char __pyx_k_base[] =
"base";
2367 static const char __pyx_k_dict[] =
"__dict__";
2368 static const char __pyx_k_join[] =
"join";
2369 static const char __pyx_k_main[] =
"__main__";
2370 static const char __pyx_k_mode[] =
"mode";
2371 static const char __pyx_k_name[] =
"name";
2372 static const char __pyx_k_ndim[] =
"ndim";
2373 static const char __pyx_k_pack[] =
"pack";
2374 static const char __pyx_k_size[] =
"size";
2375 static const char __pyx_k_step[] =
"step";
2376 static const char __pyx_k_stop[] =
"stop";
2377 static const char __pyx_k_test[] =
"__test__";
2378 static const char __pyx_k_ASCII[] =
"ASCII";
2379 static const char __pyx_k_class[] =
"__class__";
2380 static const char __pyx_k_error[] =
"error";
2381 static const char __pyx_k_flags[] =
"flags";
2382 static const char __pyx_k_numpy[] =
"numpy";
2383 static const char __pyx_k_range[] =
"range";
2384 static const char __pyx_k_shape[] =
"shape";
2385 static const char __pyx_k_start[] =
"start";
2386 static const char __pyx_k_zeros[] =
"zeros";
2387 static const char __pyx_k_encode[] =
"encode";
2388 static const char __pyx_k_format[] =
"format";
2389 static const char __pyx_k_import[] =
"__import__";
2390 static const char __pyx_k_nSpace[] =
"nSpace";
2391 static const char __pyx_k_name_2[] =
"__name__";
2392 static const char __pyx_k_pickle[] =
"pickle";
2393 static const char __pyx_k_reduce[] =
"__reduce__";
2394 static const char __pyx_k_struct[] =
"struct";
2395 static const char __pyx_k_unpack[] =
"unpack";
2396 static const char __pyx_k_update[] =
"update";
2397 static const char __pyx_k_Simplex[] =
"Simplex";
2398 static const char __pyx_k_asarray[] =
"asarray";
2399 static const char __pyx_k_fortran[] =
"fortran";
2400 static const char __pyx_k_memview[] =
"memview";
2401 static const char __pyx_k_phi_dof[] =
"phi_dof";
2402 static const char __pyx_k_Ellipsis[] =
"Ellipsis";
2403 static const char __pyx_k_getstate[] =
"__getstate__";
2404 static const char __pyx_k_itemsize[] =
"itemsize";
2405 static const char __pyx_k_pyx_type[] =
"__pyx_type";
2406 static const char __pyx_k_setstate[] =
"__setstate__";
2407 static const char __pyx_k_TypeError[] =
"TypeError";
2408 static const char __pyx_k_enumerate[] =
"enumerate";
2409 static const char __pyx_k_phi_nodes[] =
"phi_nodes";
2410 static const char __pyx_k_pyx_state[] =
"__pyx_state";
2411 static const char __pyx_k_reduce_ex[] =
"__reduce_ex__";
2412 static const char __pyx_k_IndexError[] =
"IndexError";
2413 static const char __pyx_k_ValueError[] =
"ValueError";
2414 static const char __pyx_k_pyx_result[] =
"__pyx_result";
2415 static const char __pyx_k_pyx_vtable[] =
"__pyx_vtable__";
2416 static const char __pyx_k_ImportError[] =
"ImportError";
2417 static const char __pyx_k_MemoryError[] =
"MemoryError";
2418 static const char __pyx_k_PickleError[] =
"PickleError";
2419 static const char __pyx_k_pyx_checksum[] =
"__pyx_checksum";
2420 static const char __pyx_k_stringsource[] =
"stringsource";
2421 static const char __pyx_k_pyx_getbuffer[] =
"__pyx_getbuffer";
2422 static const char __pyx_k_reduce_cython[] =
"__reduce_cython__";
2423 static const char __pyx_k_View_MemoryView[] =
"View.MemoryView";
2424 static const char __pyx_k_allocate_buffer[] =
"allocate_buffer";
2425 static const char __pyx_k_dtype_is_object[] =
"dtype_is_object";
2426 static const char __pyx_k_pyx_PickleError[] =
"__pyx_PickleError";
2427 static const char __pyx_k_setstate_cython[] =
"__setstate_cython__";
2428 static const char __pyx_k_pyx_unpickle_Enum[] =
"__pyx_unpickle_Enum";
2429 static const char __pyx_k_cline_in_traceback[] =
"cline_in_traceback";
2430 static const char __pyx_k_strided_and_direct[] =
"<strided and direct>";
2431 static const char __pyx_k_strided_and_indirect[] =
"<strided and indirect>";
2432 static const char __pyx_k_contiguous_and_direct[] =
"<contiguous and direct>";
2433 static const char __pyx_k_MemoryView_of_r_object[] =
"<MemoryView of %r object>";
2434 static const char __pyx_k_MemoryView_of_r_at_0x_x[] =
"<MemoryView of %r at 0x%x>";
2435 static const char __pyx_k_contiguous_and_indirect[] =
"<contiguous and indirect>";
2436 static const char __pyx_k_Cannot_index_with_type_s[] =
"Cannot index with type '%s'";
2437 static const char __pyx_k_Invalid_shape_in_axis_d_d[] =
"Invalid shape in axis %d: %d.";
2438 static const char __pyx_k_itemsize_0_for_cython_array[] =
"itemsize <= 0 for cython.array";
2439 static const char __pyx_k_unable_to_allocate_array_data[] =
"unable to allocate array data.";
2440 static const char __pyx_k_strided_and_direct_or_indirect[] =
"<strided and direct or indirect>";
2441 static const char __pyx_k_numpy_core_multiarray_failed_to[] =
"numpy.core.multiarray failed to import";
2442 static const char __pyx_k_Buffer_view_does_not_expose_stri[] =
"Buffer view does not expose strides";
2443 static const char __pyx_k_Can_only_create_a_buffer_that_is[] =
"Can only create a buffer that is contiguous in memory.";
2444 static const char __pyx_k_Cannot_assign_to_read_only_memor[] =
"Cannot assign to read-only memoryview";
2445 static const char __pyx_k_Cannot_create_writable_memory_vi[] =
"Cannot create writable memory view from read-only memoryview";
2446 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] =
"Empty shape tuple for cython.array";
2447 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] =
"Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
2448 static const char __pyx_k_Indirect_dimensions_not_supporte[] =
"Indirect dimensions not supported";
2449 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] =
"Invalid mode, expected 'c' or 'fortran', got %s";
2450 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] =
"Out of bounds on buffer access (axis %d)";
2451 static const char __pyx_k_Unable_to_convert_item_to_object[] =
"Unable to convert item to object";
2452 static const char __pyx_k_got_differing_extents_in_dimensi[] =
"got differing extents in dimension %d (got %d and %d)";
2453 static const char __pyx_k_no_default___reduce___due_to_non[] =
"no default __reduce__ due to non-trivial __cinit__";
2454 static const char __pyx_k_numpy_core_umath_failed_to_impor[] =
"numpy.core.umath failed to import";
2455 static const char __pyx_k_unable_to_allocate_shape_and_str[] =
"unable to allocate shape and strides.";
2456 static PyObject *__pyx_n_s_ASCII;
2457 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2458 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2459 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2460 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2461 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2462 static PyObject *__pyx_n_s_Ellipsis;
2463 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2464 static PyObject *__pyx_n_s_ImportError;
2465 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
2466 static PyObject *__pyx_n_s_IndexError;
2467 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2468 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2469 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2470 static PyObject *__pyx_n_s_MemoryError;
2471 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2472 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2473 static PyObject *__pyx_n_b_O;
2474 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2475 static PyObject *__pyx_n_s_PickleError;
2476 static PyObject *__pyx_n_s_Simplex;
2477 static PyObject *__pyx_kp_b_T;
2478 static PyObject *__pyx_n_s_TypeError;
2479 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2480 static PyObject *__pyx_n_s_ValueError;
2481 static PyObject *__pyx_n_s_View_MemoryView;
2482 static PyObject *__pyx_kp_b__35;
2483 static PyObject *__pyx_kp_b__36;
2484 static PyObject *__pyx_kp_b__37;
2485 static PyObject *__pyx_kp_b__38;
2486 static PyObject *__pyx_kp_u__39;
2487 static PyObject *__pyx_n_s_allocate_buffer;
2488 static PyObject *__pyx_n_s_asarray;
2489 static PyObject *__pyx_n_s_base;
2490 static PyObject *__pyx_n_s_c;
2491 static PyObject *__pyx_n_u_c;
2492 static PyObject *__pyx_n_s_class;
2493 static PyObject *__pyx_n_s_cline_in_traceback;
2494 static PyObject *__pyx_kp_s_contiguous_and_direct;
2495 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2496 static PyObject *__pyx_n_s_d;
2497 static PyObject *__pyx_n_s_dict;
2498 static PyObject *__pyx_n_s_dtype_is_object;
2499 static PyObject *__pyx_n_s_encode;
2500 static PyObject *__pyx_n_s_enumerate;
2501 static PyObject *__pyx_n_s_error;
2502 static PyObject *__pyx_n_s_flags;
2503 static PyObject *__pyx_n_s_format;
2504 static PyObject *__pyx_n_s_fortran;
2505 static PyObject *__pyx_n_u_fortran;
2506 static PyObject *__pyx_n_s_getstate;
2507 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2508 static PyObject *__pyx_n_s_id;
2509 static PyObject *__pyx_n_s_import;
2510 static PyObject *__pyx_n_s_itemsize;
2511 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2512 static PyObject *__pyx_n_s_join;
2513 static PyObject *__pyx_n_s_main;
2514 static PyObject *__pyx_n_s_memview;
2515 static PyObject *__pyx_n_s_mode;
2516 static PyObject *__pyx_n_s_nP;
2517 static PyObject *__pyx_n_s_nQ;
2518 static PyObject *__pyx_n_s_nSpace;
2519 static PyObject *__pyx_n_s_name;
2520 static PyObject *__pyx_n_s_name_2;
2521 static PyObject *__pyx_n_s_ndim;
2522 static PyObject *__pyx_n_s_new;
2523 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2524 static PyObject *__pyx_n_s_np;
2525 static PyObject *__pyx_n_s_numpy;
2526 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2527 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2528 static PyObject *__pyx_n_s_obj;
2529 static PyObject *__pyx_n_s_pack;
2530 static PyObject *__pyx_n_s_phi_dof;
2531 static PyObject *__pyx_n_s_phi_nodes;
2532 static PyObject *__pyx_n_s_pickle;
2533 static PyObject *__pyx_n_s_pyx_PickleError;
2534 static PyObject *__pyx_n_s_pyx_checksum;
2535 static PyObject *__pyx_n_s_pyx_getbuffer;
2536 static PyObject *__pyx_n_s_pyx_result;
2537 static PyObject *__pyx_n_s_pyx_state;
2538 static PyObject *__pyx_n_s_pyx_type;
2539 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2540 static PyObject *__pyx_n_s_pyx_vtable;
2541 static PyObject *__pyx_n_s_range;
2542 static PyObject *__pyx_n_s_reduce;
2543 static PyObject *__pyx_n_s_reduce_cython;
2544 static PyObject *__pyx_n_s_reduce_ex;
2545 static PyObject *__pyx_kp_u_s;
2546 static PyObject *__pyx_n_s_setstate;
2547 static PyObject *__pyx_n_s_setstate_cython;
2548 static PyObject *__pyx_n_s_shape;
2549 static PyObject *__pyx_n_s_size;
2550 static PyObject *__pyx_n_s_start;
2551 static PyObject *__pyx_n_s_step;
2552 static PyObject *__pyx_n_s_stop;
2553 static PyObject *__pyx_kp_s_strided_and_direct;
2554 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
2555 static PyObject *__pyx_kp_s_strided_and_indirect;
2556 static PyObject *__pyx_kp_s_stringsource;
2557 static PyObject *__pyx_n_s_struct;
2558 static PyObject *__pyx_n_s_test;
2559 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
2560 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
2561 static PyObject *__pyx_n_s_unpack;
2562 static PyObject *__pyx_n_s_update;
2563 static PyObject *__pyx_n_s_xi;
2564 static PyObject *__pyx_n_s_zeros;
2565 static int __pyx_pf_22equivalent_polynomials_7Simplex___cinit__(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self, PyObject *__pyx_v_nSpace, PyObject *__pyx_v_nP, PyObject *__pyx_v_nQ);
2566 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_2calculate(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self, PyArrayObject *__pyx_v_phi_dof, PyArrayObject *__pyx_v_phi_nodes, PyArrayObject *__pyx_v_xi);
2567 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_4set_quad(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self,
int __pyx_v_q);
2568 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_1H___get__(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self);
2569 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_3ImH___get__(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self);
2570 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_1D___get__(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self);
2571 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_6__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self);
2572 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_8__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
2573 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode,
int __pyx_v_allocate_buffer);
2574 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(
struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
2575 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(
struct __pyx_array_obj *__pyx_v_self);
2576 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(
struct __pyx_array_obj *__pyx_v_self);
2577 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(
struct __pyx_array_obj *__pyx_v_self);
2578 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr);
2579 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item);
2580 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value);
2581 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED
struct __pyx_array_obj *__pyx_v_self);
2582 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
2583 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name);
2584 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(
struct __pyx_MemviewEnum_obj *__pyx_v_self);
2585 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(
struct __pyx_MemviewEnum_obj *__pyx_v_self);
2586 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(
struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state);
2587 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj,
int __pyx_v_flags,
int __pyx_v_dtype_is_object);
2588 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(
struct __pyx_memoryview_obj *__pyx_v_self);
2589 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index);
2590 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(
struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value);
2591 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(
struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info,
int __pyx_v_flags);
2592 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2593 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2594 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2595 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2596 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2597 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2598 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2599 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2600 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(
struct __pyx_memoryview_obj *__pyx_v_self);
2601 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(
struct __pyx_memoryview_obj *__pyx_v_self);
2602 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(
struct __pyx_memoryview_obj *__pyx_v_self);
2603 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(
struct __pyx_memoryview_obj *__pyx_v_self);
2604 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(
struct __pyx_memoryview_obj *__pyx_v_self);
2605 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(
struct __pyx_memoryview_obj *__pyx_v_self);
2606 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(
struct __pyx_memoryview_obj *__pyx_v_self);
2607 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(
struct __pyx_memoryview_obj *__pyx_v_self);
2608 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED
struct __pyx_memoryview_obj *__pyx_v_self);
2609 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
2610 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(
struct __pyx_memoryviewslice_obj *__pyx_v_self);
2611 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(
struct __pyx_memoryviewslice_obj *__pyx_v_self);
2612 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED
struct __pyx_memoryviewslice_obj *__pyx_v_self);
2613 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED
struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state);
2614 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type,
long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state);
2615 static PyObject *__pyx_tp_new_22equivalent_polynomials_Simplex(PyTypeObject *t, PyObject *a, PyObject *k);
2616 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k);
2617 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k);
2618 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k);
2619 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k);
2620 static PyObject *__pyx_int_0;
2621 static PyObject *__pyx_int_1;
2622 static PyObject *__pyx_int_2;
2623 static PyObject *__pyx_int_3;
2624 static PyObject *__pyx_int_50;
2625 static PyObject *__pyx_int_112105877;
2626 static PyObject *__pyx_int_136983863;
2627 static PyObject *__pyx_int_184977713;
2628 static PyObject *__pyx_int_neg_1;
2629 static PyObject *__pyx_tuple_;
2630 static PyObject *__pyx_tuple__2;
2631 static PyObject *__pyx_tuple__3;
2632 static PyObject *__pyx_tuple__4;
2633 static PyObject *__pyx_tuple__5;
2634 static PyObject *__pyx_tuple__6;
2635 static PyObject *__pyx_tuple__7;
2636 static PyObject *__pyx_tuple__8;
2637 static PyObject *__pyx_tuple__9;
2638 static PyObject *__pyx_slice__30;
2639 static PyObject *__pyx_tuple__10;
2640 static PyObject *__pyx_tuple__11;
2641 static PyObject *__pyx_tuple__12;
2642 static PyObject *__pyx_tuple__13;
2643 static PyObject *__pyx_tuple__14;
2644 static PyObject *__pyx_tuple__15;
2645 static PyObject *__pyx_tuple__16;
2646 static PyObject *__pyx_tuple__17;
2647 static PyObject *__pyx_tuple__18;
2648 static PyObject *__pyx_tuple__19;
2649 static PyObject *__pyx_tuple__20;
2650 static PyObject *__pyx_tuple__21;
2651 static PyObject *__pyx_tuple__22;
2652 static PyObject *__pyx_tuple__23;
2653 static PyObject *__pyx_tuple__24;
2654 static PyObject *__pyx_tuple__25;
2655 static PyObject *__pyx_tuple__26;
2656 static PyObject *__pyx_tuple__27;
2657 static PyObject *__pyx_tuple__28;
2658 static PyObject *__pyx_tuple__29;
2659 static PyObject *__pyx_tuple__31;
2660 static PyObject *__pyx_tuple__32;
2661 static PyObject *__pyx_tuple__33;
2662 static PyObject *__pyx_tuple__34;
2663 static PyObject *__pyx_tuple__40;
2664 static PyObject *__pyx_tuple__41;
2665 static PyObject *__pyx_tuple__42;
2666 static PyObject *__pyx_tuple__43;
2667 static PyObject *__pyx_tuple__44;
2668 static PyObject *__pyx_tuple__45;
2669 static PyObject *__pyx_codeobj__46;
2681 static int __pyx_pw_22equivalent_polynomials_7Simplex_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2682 static int __pyx_pw_22equivalent_polynomials_7Simplex_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2683 PyObject *__pyx_v_nSpace = 0;
2684 PyObject *__pyx_v_nP = 0;
2685 PyObject *__pyx_v_nQ = 0;
2686 int __pyx_lineno = 0;
2687 const char *__pyx_filename = NULL;
2688 int __pyx_clineno = 0;
2690 __Pyx_RefNannyDeclarations
2691 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
2693 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpace,&__pyx_n_s_nP,&__pyx_n_s_nQ,0};
2694 PyObject* values[3] = {0,0,0};
2695 if (unlikely(__pyx_kwds)) {
2697 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2699 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2701 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2703 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2706 default:
goto __pyx_L5_argtuple_error;
2708 kw_args = PyDict_Size(__pyx_kwds);
2711 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
2712 else goto __pyx_L5_argtuple_error;
2715 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nP)) != 0)) kw_args--;
2717 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 1, 3, 3, 1); __PYX_ERR(1, 43, __pyx_L3_error)
2721 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQ)) != 0)) kw_args--;
2723 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 1, 3, 3, 2); __PYX_ERR(1, 43, __pyx_L3_error)
2726 if (unlikely(kw_args > 0)) {
2727 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"__cinit__") < 0)) __PYX_ERR(1, 43, __pyx_L3_error)
2729 }
else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
2730 goto __pyx_L5_argtuple_error;
2732 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2733 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2734 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2736 __pyx_v_nSpace = values[0];
2737 __pyx_v_nP = values[1];
2738 __pyx_v_nQ = values[2];
2740 goto __pyx_L4_argument_unpacking_done;
2741 __pyx_L5_argtuple_error:;
2742 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 43, __pyx_L3_error)
2744 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2745 __Pyx_RefNannyFinishContext();
2747 __pyx_L4_argument_unpacking_done:;
2748 __pyx_r = __pyx_pf_22equivalent_polynomials_7Simplex___cinit__(((
struct __pyx_obj_22equivalent_polynomials_Simplex *)__pyx_v_self), __pyx_v_nSpace, __pyx_v_nP, __pyx_v_nQ);
2751 __Pyx_RefNannyFinishContext();
2755 static int __pyx_pf_22equivalent_polynomials_7Simplex___cinit__(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self, PyObject *__pyx_v_nSpace, PyObject *__pyx_v_nP, PyObject *__pyx_v_nQ) {
2757 __Pyx_RefNannyDeclarations
2758 PyObject *__pyx_t_1 = NULL;
2759 PyObject *__pyx_t_2 = NULL;
2761 int __pyx_lineno = 0;
2762 const char *__pyx_filename = NULL;
2763 int __pyx_clineno = 0;
2764 __Pyx_RefNannySetupContext(
"__cinit__", 0);
2773 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error)
2774 __Pyx_GOTREF(__pyx_t_1);
2775 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 44, __pyx_L1_error)
2776 __Pyx_GOTREF(__pyx_t_2);
2777 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2778 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error)
2779 __Pyx_GOTREF(__pyx_t_1);
2780 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2781 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 44, __pyx_L1_error)
2782 __Pyx_GIVEREF(__pyx_t_1);
2783 __Pyx_GOTREF(__pyx_v_self->xiBuffer);
2784 __Pyx_DECREF(((PyObject *)__pyx_v_self->xiBuffer));
2785 __pyx_v_self->xiBuffer = ((PyArrayObject *)__pyx_t_1);
2795 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nSpace);
if (unlikely((__pyx_t_3 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 45, __pyx_L1_error)
2796 __pyx_v_self->nSpace = __pyx_t_3;
2805 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nP);
if (unlikely((__pyx_t_3 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 46, __pyx_L1_error)
2806 __pyx_v_self->nP = __pyx_t_3;
2815 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nQ);
if (unlikely((__pyx_t_3 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 47, __pyx_L1_error)
2816 __pyx_v_self->nQ = __pyx_t_3;
2825 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nQ);
if (unlikely((__pyx_t_3 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error)
2826 __pyx_v_self->nEBQ = __pyx_t_3;
2835 __pyx_v_self->q = 0;
2849 __Pyx_XDECREF(__pyx_t_1);
2850 __Pyx_XDECREF(__pyx_t_2);
2851 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2854 __Pyx_RefNannyFinishContext();
2867 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_3calculate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
2868 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_3calculate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2869 PyArrayObject *__pyx_v_phi_dof = 0;
2870 PyArrayObject *__pyx_v_phi_nodes = 0;
2871 PyArrayObject *__pyx_v_xi = 0;
2872 int __pyx_lineno = 0;
2873 const char *__pyx_filename = NULL;
2874 int __pyx_clineno = 0;
2875 PyObject *__pyx_r = 0;
2876 __Pyx_RefNannyDeclarations
2877 __Pyx_RefNannySetupContext(
"calculate (wrapper)", 0);
2879 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_phi_dof,&__pyx_n_s_phi_nodes,&__pyx_n_s_xi,0};
2880 PyObject* values[3] = {0,0,0};
2881 if (unlikely(__pyx_kwds)) {
2883 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2885 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2887 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2889 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2892 default:
goto __pyx_L5_argtuple_error;
2894 kw_args = PyDict_Size(__pyx_kwds);
2897 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_dof)) != 0)) kw_args--;
2898 else goto __pyx_L5_argtuple_error;
2901 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_nodes)) != 0)) kw_args--;
2903 __Pyx_RaiseArgtupleInvalid(
"calculate", 1, 3, 3, 1); __PYX_ERR(1, 50, __pyx_L3_error)
2907 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xi)) != 0)) kw_args--;
2909 __Pyx_RaiseArgtupleInvalid(
"calculate", 1, 3, 3, 2); __PYX_ERR(1, 50, __pyx_L3_error)
2912 if (unlikely(kw_args > 0)) {
2913 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"calculate") < 0)) __PYX_ERR(1, 50, __pyx_L3_error)
2915 }
else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
2916 goto __pyx_L5_argtuple_error;
2918 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2919 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2920 values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2922 __pyx_v_phi_dof = ((PyArrayObject *)values[0]);
2923 __pyx_v_phi_nodes = ((PyArrayObject *)values[1]);
2924 __pyx_v_xi = ((PyArrayObject *)values[2]);
2926 goto __pyx_L4_argument_unpacking_done;
2927 __pyx_L5_argtuple_error:;
2928 __Pyx_RaiseArgtupleInvalid(
"calculate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 50, __pyx_L3_error)
2930 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
2931 __Pyx_RefNannyFinishContext();
2933 __pyx_L4_argument_unpacking_done:;
2934 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_dof), __pyx_ptype_5numpy_ndarray, 1,
"phi_dof", 0))) __PYX_ERR(1, 50, __pyx_L1_error)
2935 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phi_nodes), __pyx_ptype_5numpy_ndarray, 1,
"phi_nodes", 0))) __PYX_ERR(1, 50, __pyx_L1_error)
2936 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_xi), __pyx_ptype_5numpy_ndarray, 1,
"xi", 0))) __PYX_ERR(1, 50, __pyx_L1_error)
2937 __pyx_r = __pyx_pf_22equivalent_polynomials_7Simplex_2calculate(((
struct __pyx_obj_22equivalent_polynomials_Simplex *)__pyx_v_self), __pyx_v_phi_dof, __pyx_v_phi_nodes, __pyx_v_xi);
2944 __Pyx_RefNannyFinishContext();
2948 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_2calculate(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self, PyArrayObject *__pyx_v_phi_dof, PyArrayObject *__pyx_v_phi_nodes, PyArrayObject *__pyx_v_xi) {
2949 CYTHON_UNUSED
int __pyx_v_icase;
2950 PyObject *__pyx_r = NULL;
2951 __Pyx_RefNannyDeclarations
2952 PyObject *__pyx_t_1 = NULL;
2953 PyObject *__pyx_t_2 = NULL;
2954 PyObject *__pyx_t_3 = NULL;
2957 struct __pyx_array_obj *__pyx_t_6 = NULL;
2958 PyObject *__pyx_t_7 = NULL;
2960 int __pyx_lineno = 0;
2961 const char *__pyx_filename = NULL;
2962 int __pyx_clineno = 0;
2963 __Pyx_RefNannySetupContext(
"calculate", 0);
2972 if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->xiBuffer), ((PyObject *)__pyx_v_xi), 0, (__pyx_v_xi->dimensions[0]), NULL, NULL, NULL, 0, 1, 1) < 0) __PYX_ERR(1, 51, __pyx_L1_error)
2981 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 52, __pyx_L1_error)
2982 __Pyx_GOTREF(__pyx_t_1);
2983 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 52, __pyx_L1_error)
2984 __Pyx_GOTREF(__pyx_t_2);
2985 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
2986 __Pyx_GOTREF(__pyx_t_3);
2987 __Pyx_GIVEREF(__pyx_t_1);
2988 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
2989 __Pyx_GIVEREF(__pyx_t_2);
2990 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
2993 __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_tuple__3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 52, __pyx_L1_error)
2994 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2995 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 52, __pyx_L1_error)
2996 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3006 __pyx_v_icase = __pyx_v_self->s11.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
3015 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 54, __pyx_L1_error)
3016 __Pyx_GOTREF(__pyx_t_3);
3017 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error)
3018 __Pyx_GOTREF(__pyx_t_1);
3019 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3020 __pyx_t_5 = __pyx_v_self->s11.get_H();
3022 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3023 __PYX_ERR(1, 54, __pyx_L1_error)
3025 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 54, __pyx_L1_error)
3026 __Pyx_GOTREF(__pyx_t_7);
3027 __pyx_t_3 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 54, __pyx_L1_error)
3028 __Pyx_GOTREF(__pyx_t_3);
3029 __pyx_t_6 = __pyx_array_new(__pyx_t_3,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
3030 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 54, __pyx_L1_error)
3031 __Pyx_GOTREF(__pyx_t_6);
3032 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3033 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3035 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
3036 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
3037 if (likely(__pyx_t_7)) {
3038 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
3039 __Pyx_INCREF(__pyx_t_7);
3040 __Pyx_INCREF(
function);
3041 __Pyx_DECREF_SET(__pyx_t_1,
function);
3044 __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_6));
3045 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3046 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3047 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error)
3048 __Pyx_GOTREF(__pyx_t_2);
3049 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3050 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 54, __pyx_L1_error)
3051 __Pyx_GIVEREF(__pyx_t_2);
3052 __Pyx_GOTREF(__pyx_v_self->_H);
3053 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
3054 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_2);
3064 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error)
3065 __Pyx_GOTREF(__pyx_t_1);
3066 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 55, __pyx_L1_error)
3067 __Pyx_GOTREF(__pyx_t_7);
3068 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3069 __pyx_t_5 = __pyx_v_self->s11.get_ImH();
3071 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3072 __PYX_ERR(1, 55, __pyx_L1_error)
3074 __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 55, __pyx_L1_error)
3075 __Pyx_GOTREF(__pyx_t_3);
3076 __pyx_t_1 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error)
3077 __Pyx_GOTREF(__pyx_t_1);
3078 __pyx_t_6 = __pyx_array_new(__pyx_t_1,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_3), (
char *)
"c", (
char *) __pyx_t_5);
3079 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 55, __pyx_L1_error)
3080 __Pyx_GOTREF(__pyx_t_6);
3081 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3082 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3084 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3085 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
3086 if (likely(__pyx_t_3)) {
3087 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
3088 __Pyx_INCREF(__pyx_t_3);
3089 __Pyx_INCREF(
function);
3090 __Pyx_DECREF_SET(__pyx_t_7,
function);
3093 __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3094 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3095 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3096 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error)
3097 __Pyx_GOTREF(__pyx_t_2);
3098 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3099 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 55, __pyx_L1_error)
3100 __Pyx_GIVEREF(__pyx_t_2);
3101 __Pyx_GOTREF(__pyx_v_self->_ImH);
3102 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
3103 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_2);
3113 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 56, __pyx_L1_error)
3114 __Pyx_GOTREF(__pyx_t_7);
3115 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 56, __pyx_L1_error)
3116 __Pyx_GOTREF(__pyx_t_3);
3117 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3118 __pyx_t_5 = __pyx_v_self->s11.get_D();
3120 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3121 __PYX_ERR(1, 56, __pyx_L1_error)
3123 __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
3124 __Pyx_GOTREF(__pyx_t_1);
3125 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 56, __pyx_L1_error)
3126 __Pyx_GOTREF(__pyx_t_7);
3127 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_1), (
char *)
"c", (
char *) __pyx_t_5);
3128 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 56, __pyx_L1_error)
3129 __Pyx_GOTREF(__pyx_t_6);
3130 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3131 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3133 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3134 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
3135 if (likely(__pyx_t_1)) {
3136 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
3137 __Pyx_INCREF(__pyx_t_1);
3138 __Pyx_INCREF(
function);
3139 __Pyx_DECREF_SET(__pyx_t_3,
function);
3142 __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3143 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3144 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3145 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 56, __pyx_L1_error)
3146 __Pyx_GOTREF(__pyx_t_2);
3147 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3148 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 56, __pyx_L1_error)
3149 __Pyx_GIVEREF(__pyx_t_2);
3150 __Pyx_GOTREF(__pyx_v_self->_D);
3151 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
3152 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_2);
3162 __pyx_t_8 = __pyx_v_self->s11.inside_out;
3163 __pyx_v_self->inside_out = __pyx_t_8;
3182 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 58, __pyx_L1_error)
3183 __Pyx_GOTREF(__pyx_t_2);
3184 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 58, __pyx_L1_error)
3185 __Pyx_GOTREF(__pyx_t_3);
3186 __pyx_t_1 = PyTuple_New(2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error)
3187 __Pyx_GOTREF(__pyx_t_1);
3188 __Pyx_GIVEREF(__pyx_t_2);
3189 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
3190 __Pyx_GIVEREF(__pyx_t_3);
3191 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
3194 __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_tuple__4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 58, __pyx_L1_error)
3195 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3196 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 58, __pyx_L1_error)
3197 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3207 __pyx_v_icase = __pyx_v_self->s12.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
3216 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error)
3217 __Pyx_GOTREF(__pyx_t_1);
3218 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 60, __pyx_L1_error)
3219 __Pyx_GOTREF(__pyx_t_2);
3220 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3221 __pyx_t_5 = __pyx_v_self->s12.get_H();
3223 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3224 __PYX_ERR(1, 60, __pyx_L1_error)
3226 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 60, __pyx_L1_error)
3227 __Pyx_GOTREF(__pyx_t_7);
3228 __pyx_t_1 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error)
3229 __Pyx_GOTREF(__pyx_t_1);
3230 __pyx_t_6 = __pyx_array_new(__pyx_t_1,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
3231 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 60, __pyx_L1_error)
3232 __Pyx_GOTREF(__pyx_t_6);
3233 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3234 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3236 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3237 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
3238 if (likely(__pyx_t_7)) {
3239 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3240 __Pyx_INCREF(__pyx_t_7);
3241 __Pyx_INCREF(
function);
3242 __Pyx_DECREF_SET(__pyx_t_2,
function);
3245 __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3246 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3247 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3248 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 60, __pyx_L1_error)
3249 __Pyx_GOTREF(__pyx_t_3);
3250 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3251 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 60, __pyx_L1_error)
3252 __Pyx_GIVEREF(__pyx_t_3);
3253 __Pyx_GOTREF(__pyx_v_self->_H);
3254 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
3255 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_3);
3265 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 61, __pyx_L1_error)
3266 __Pyx_GOTREF(__pyx_t_2);
3267 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 61, __pyx_L1_error)
3268 __Pyx_GOTREF(__pyx_t_7);
3269 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3270 __pyx_t_5 = __pyx_v_self->s12.get_ImH();
3272 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3273 __PYX_ERR(1, 61, __pyx_L1_error)
3275 __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error)
3276 __Pyx_GOTREF(__pyx_t_1);
3277 __pyx_t_2 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 61, __pyx_L1_error)
3278 __Pyx_GOTREF(__pyx_t_2);
3279 __pyx_t_6 = __pyx_array_new(__pyx_t_2,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_1), (
char *)
"c", (
char *) __pyx_t_5);
3280 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 61, __pyx_L1_error)
3281 __Pyx_GOTREF(__pyx_t_6);
3282 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3283 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3285 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3286 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
3287 if (likely(__pyx_t_1)) {
3288 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
3289 __Pyx_INCREF(__pyx_t_1);
3290 __Pyx_INCREF(
function);
3291 __Pyx_DECREF_SET(__pyx_t_7,
function);
3294 __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3295 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3296 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3297 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 61, __pyx_L1_error)
3298 __Pyx_GOTREF(__pyx_t_3);
3299 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3300 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 61, __pyx_L1_error)
3301 __Pyx_GIVEREF(__pyx_t_3);
3302 __Pyx_GOTREF(__pyx_v_self->_ImH);
3303 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
3304 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_3);
3314 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 62, __pyx_L1_error)
3315 __Pyx_GOTREF(__pyx_t_7);
3316 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error)
3317 __Pyx_GOTREF(__pyx_t_1);
3318 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3319 __pyx_t_5 = __pyx_v_self->s12.get_D();
3321 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3322 __PYX_ERR(1, 62, __pyx_L1_error)
3324 __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error)
3325 __Pyx_GOTREF(__pyx_t_2);
3326 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 62, __pyx_L1_error)
3327 __Pyx_GOTREF(__pyx_t_7);
3328 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_2), (
char *)
"c", (
char *) __pyx_t_5);
3329 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 62, __pyx_L1_error)
3330 __Pyx_GOTREF(__pyx_t_6);
3331 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3332 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3334 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
3335 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
3336 if (likely(__pyx_t_2)) {
3337 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
3338 __Pyx_INCREF(__pyx_t_2);
3339 __Pyx_INCREF(
function);
3340 __Pyx_DECREF_SET(__pyx_t_1,
function);
3343 __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_6));
3344 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3345 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3346 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 62, __pyx_L1_error)
3347 __Pyx_GOTREF(__pyx_t_3);
3348 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3349 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 62, __pyx_L1_error)
3350 __Pyx_GIVEREF(__pyx_t_3);
3351 __Pyx_GOTREF(__pyx_v_self->_D);
3352 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
3353 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_3);
3363 __pyx_t_8 = __pyx_v_self->s12.inside_out;
3364 __pyx_v_self->inside_out = __pyx_t_8;
3383 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 64, __pyx_L1_error)
3384 __Pyx_GOTREF(__pyx_t_3);
3385 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error)
3386 __Pyx_GOTREF(__pyx_t_1);
3387 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error)
3388 __Pyx_GOTREF(__pyx_t_2);
3389 __Pyx_GIVEREF(__pyx_t_3);
3390 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
3391 __Pyx_GIVEREF(__pyx_t_1);
3392 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
3395 __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error)
3396 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3397 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 64, __pyx_L1_error)
3398 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3408 __pyx_v_icase = __pyx_v_self->s13.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
3417 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error)
3418 __Pyx_GOTREF(__pyx_t_2);
3419 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 66, __pyx_L1_error)
3420 __Pyx_GOTREF(__pyx_t_3);
3421 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3422 __pyx_t_5 = __pyx_v_self->s13.get_H();
3424 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3425 __PYX_ERR(1, 66, __pyx_L1_error)
3427 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 66, __pyx_L1_error)
3428 __Pyx_GOTREF(__pyx_t_7);
3429 __pyx_t_2 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error)
3430 __Pyx_GOTREF(__pyx_t_2);
3431 __pyx_t_6 = __pyx_array_new(__pyx_t_2,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
3432 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 66, __pyx_L1_error)
3433 __Pyx_GOTREF(__pyx_t_6);
3434 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3435 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3437 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3438 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
3439 if (likely(__pyx_t_7)) {
3440 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
3441 __Pyx_INCREF(__pyx_t_7);
3442 __Pyx_INCREF(
function);
3443 __Pyx_DECREF_SET(__pyx_t_3,
function);
3446 __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3447 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3448 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3449 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 66, __pyx_L1_error)
3450 __Pyx_GOTREF(__pyx_t_1);
3451 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3452 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 66, __pyx_L1_error)
3453 __Pyx_GIVEREF(__pyx_t_1);
3454 __Pyx_GOTREF(__pyx_v_self->_H);
3455 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
3456 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_1);
3466 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 67, __pyx_L1_error)
3467 __Pyx_GOTREF(__pyx_t_3);
3468 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 67, __pyx_L1_error)
3469 __Pyx_GOTREF(__pyx_t_7);
3470 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3471 __pyx_t_5 = __pyx_v_self->s13.get_ImH();
3473 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3474 __PYX_ERR(1, 67, __pyx_L1_error)
3476 __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 67, __pyx_L1_error)
3477 __Pyx_GOTREF(__pyx_t_2);
3478 __pyx_t_3 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 67, __pyx_L1_error)
3479 __Pyx_GOTREF(__pyx_t_3);
3480 __pyx_t_6 = __pyx_array_new(__pyx_t_3,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_2), (
char *)
"c", (
char *) __pyx_t_5);
3481 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 67, __pyx_L1_error)
3482 __Pyx_GOTREF(__pyx_t_6);
3483 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3484 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3486 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3487 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3488 if (likely(__pyx_t_2)) {
3489 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
3490 __Pyx_INCREF(__pyx_t_2);
3491 __Pyx_INCREF(
function);
3492 __Pyx_DECREF_SET(__pyx_t_7,
function);
3495 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3496 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3497 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3498 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)
3499 __Pyx_GOTREF(__pyx_t_1);
3500 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3501 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 67, __pyx_L1_error)
3502 __Pyx_GIVEREF(__pyx_t_1);
3503 __Pyx_GOTREF(__pyx_v_self->_ImH);
3504 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
3505 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_1);
3515 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 68, __pyx_L1_error)
3516 __Pyx_GOTREF(__pyx_t_7);
3517 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 68, __pyx_L1_error)
3518 __Pyx_GOTREF(__pyx_t_2);
3519 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3520 __pyx_t_5 = __pyx_v_self->s13.get_D();
3522 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3523 __PYX_ERR(1, 68, __pyx_L1_error)
3525 __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 68, __pyx_L1_error)
3526 __Pyx_GOTREF(__pyx_t_3);
3527 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 68, __pyx_L1_error)
3528 __Pyx_GOTREF(__pyx_t_7);
3529 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_3), (
char *)
"c", (
char *) __pyx_t_5);
3530 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 68, __pyx_L1_error)
3531 __Pyx_GOTREF(__pyx_t_6);
3532 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3533 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3535 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3536 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3537 if (likely(__pyx_t_3)) {
3538 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3539 __Pyx_INCREF(__pyx_t_3);
3540 __Pyx_INCREF(
function);
3541 __Pyx_DECREF_SET(__pyx_t_2,
function);
3544 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3545 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3546 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3547 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 68, __pyx_L1_error)
3548 __Pyx_GOTREF(__pyx_t_1);
3549 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3550 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 68, __pyx_L1_error)
3551 __Pyx_GIVEREF(__pyx_t_1);
3552 __Pyx_GOTREF(__pyx_v_self->_D);
3553 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
3554 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_1);
3564 __pyx_t_8 = __pyx_v_self->s13.inside_out;
3565 __pyx_v_self->inside_out = __pyx_t_8;
3584 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 70, __pyx_L1_error)
3585 __Pyx_GOTREF(__pyx_t_1);
3586 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 70, __pyx_L1_error)
3587 __Pyx_GOTREF(__pyx_t_2);
3588 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 70, __pyx_L1_error)
3589 __Pyx_GOTREF(__pyx_t_3);
3590 __Pyx_GIVEREF(__pyx_t_1);
3591 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
3592 __Pyx_GIVEREF(__pyx_t_2);
3593 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
3596 __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_tuple__6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 70, __pyx_L1_error)
3597 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3598 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 70, __pyx_L1_error)
3599 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3609 __pyx_v_icase = __pyx_v_self->s21.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
3618 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 72, __pyx_L1_error)
3619 __Pyx_GOTREF(__pyx_t_3);
3620 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 72, __pyx_L1_error)
3621 __Pyx_GOTREF(__pyx_t_1);
3622 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3623 __pyx_t_5 = __pyx_v_self->s21.get_H();
3625 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3626 __PYX_ERR(1, 72, __pyx_L1_error)
3628 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 72, __pyx_L1_error)
3629 __Pyx_GOTREF(__pyx_t_7);
3630 __pyx_t_3 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 72, __pyx_L1_error)
3631 __Pyx_GOTREF(__pyx_t_3);
3632 __pyx_t_6 = __pyx_array_new(__pyx_t_3,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
3633 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 72, __pyx_L1_error)
3634 __Pyx_GOTREF(__pyx_t_6);
3635 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3636 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3638 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
3639 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
3640 if (likely(__pyx_t_7)) {
3641 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
3642 __Pyx_INCREF(__pyx_t_7);
3643 __Pyx_INCREF(
function);
3644 __Pyx_DECREF_SET(__pyx_t_1,
function);
3647 __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_6));
3648 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3649 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3650 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 72, __pyx_L1_error)
3651 __Pyx_GOTREF(__pyx_t_2);
3652 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3653 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 72, __pyx_L1_error)
3654 __Pyx_GIVEREF(__pyx_t_2);
3655 __Pyx_GOTREF(__pyx_v_self->_H);
3656 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
3657 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_2);
3667 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 73, __pyx_L1_error)
3668 __Pyx_GOTREF(__pyx_t_1);
3669 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 73, __pyx_L1_error)
3670 __Pyx_GOTREF(__pyx_t_7);
3671 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3672 __pyx_t_5 = __pyx_v_self->s21.get_ImH();
3674 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3675 __PYX_ERR(1, 73, __pyx_L1_error)
3677 __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 73, __pyx_L1_error)
3678 __Pyx_GOTREF(__pyx_t_3);
3679 __pyx_t_1 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 73, __pyx_L1_error)
3680 __Pyx_GOTREF(__pyx_t_1);
3681 __pyx_t_6 = __pyx_array_new(__pyx_t_1,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_3), (
char *)
"c", (
char *) __pyx_t_5);
3682 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 73, __pyx_L1_error)
3683 __Pyx_GOTREF(__pyx_t_6);
3684 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3685 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3687 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3688 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
3689 if (likely(__pyx_t_3)) {
3690 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
3691 __Pyx_INCREF(__pyx_t_3);
3692 __Pyx_INCREF(
function);
3693 __Pyx_DECREF_SET(__pyx_t_7,
function);
3696 __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3697 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3698 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3699 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 73, __pyx_L1_error)
3700 __Pyx_GOTREF(__pyx_t_2);
3701 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3702 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 73, __pyx_L1_error)
3703 __Pyx_GIVEREF(__pyx_t_2);
3704 __Pyx_GOTREF(__pyx_v_self->_ImH);
3705 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
3706 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_2);
3716 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 74, __pyx_L1_error)
3717 __Pyx_GOTREF(__pyx_t_7);
3718 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 74, __pyx_L1_error)
3719 __Pyx_GOTREF(__pyx_t_3);
3720 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3721 __pyx_t_5 = __pyx_v_self->s21.get_D();
3723 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3724 __PYX_ERR(1, 74, __pyx_L1_error)
3726 __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 74, __pyx_L1_error)
3727 __Pyx_GOTREF(__pyx_t_1);
3728 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 74, __pyx_L1_error)
3729 __Pyx_GOTREF(__pyx_t_7);
3730 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_1), (
char *)
"c", (
char *) __pyx_t_5);
3731 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 74, __pyx_L1_error)
3732 __Pyx_GOTREF(__pyx_t_6);
3733 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3734 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3736 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3737 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
3738 if (likely(__pyx_t_1)) {
3739 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
3740 __Pyx_INCREF(__pyx_t_1);
3741 __Pyx_INCREF(
function);
3742 __Pyx_DECREF_SET(__pyx_t_3,
function);
3745 __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3746 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3747 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3748 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 74, __pyx_L1_error)
3749 __Pyx_GOTREF(__pyx_t_2);
3750 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3751 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 74, __pyx_L1_error)
3752 __Pyx_GIVEREF(__pyx_t_2);
3753 __Pyx_GOTREF(__pyx_v_self->_D);
3754 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
3755 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_2);
3765 __pyx_t_8 = __pyx_v_self->s21.inside_out;
3766 __pyx_v_self->inside_out = __pyx_t_8;
3785 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 76, __pyx_L1_error)
3786 __Pyx_GOTREF(__pyx_t_2);
3787 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 76, __pyx_L1_error)
3788 __Pyx_GOTREF(__pyx_t_3);
3789 __pyx_t_1 = PyTuple_New(2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 76, __pyx_L1_error)
3790 __Pyx_GOTREF(__pyx_t_1);
3791 __Pyx_GIVEREF(__pyx_t_2);
3792 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
3793 __Pyx_GIVEREF(__pyx_t_3);
3794 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
3797 __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_tuple__7, Py_EQ); __Pyx_XGOTREF(__pyx_t_3);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 76, __pyx_L1_error)
3798 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3799 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 76, __pyx_L1_error)
3800 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3810 __pyx_v_icase = __pyx_v_self->s22.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
3819 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 78, __pyx_L1_error)
3820 __Pyx_GOTREF(__pyx_t_1);
3821 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 78, __pyx_L1_error)
3822 __Pyx_GOTREF(__pyx_t_2);
3823 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3824 __pyx_t_5 = __pyx_v_self->s22.get_H();
3826 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3827 __PYX_ERR(1, 78, __pyx_L1_error)
3829 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 78, __pyx_L1_error)
3830 __Pyx_GOTREF(__pyx_t_7);
3831 __pyx_t_1 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 78, __pyx_L1_error)
3832 __Pyx_GOTREF(__pyx_t_1);
3833 __pyx_t_6 = __pyx_array_new(__pyx_t_1,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
3834 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 78, __pyx_L1_error)
3835 __Pyx_GOTREF(__pyx_t_6);
3836 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3837 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3839 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3840 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
3841 if (likely(__pyx_t_7)) {
3842 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
3843 __Pyx_INCREF(__pyx_t_7);
3844 __Pyx_INCREF(
function);
3845 __Pyx_DECREF_SET(__pyx_t_2,
function);
3848 __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3849 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3850 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3851 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 78, __pyx_L1_error)
3852 __Pyx_GOTREF(__pyx_t_3);
3853 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3854 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 78, __pyx_L1_error)
3855 __Pyx_GIVEREF(__pyx_t_3);
3856 __Pyx_GOTREF(__pyx_v_self->_H);
3857 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
3858 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_3);
3868 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 79, __pyx_L1_error)
3869 __Pyx_GOTREF(__pyx_t_2);
3870 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 79, __pyx_L1_error)
3871 __Pyx_GOTREF(__pyx_t_7);
3872 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3873 __pyx_t_5 = __pyx_v_self->s22.get_ImH();
3875 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3876 __PYX_ERR(1, 79, __pyx_L1_error)
3878 __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 79, __pyx_L1_error)
3879 __Pyx_GOTREF(__pyx_t_1);
3880 __pyx_t_2 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 79, __pyx_L1_error)
3881 __Pyx_GOTREF(__pyx_t_2);
3882 __pyx_t_6 = __pyx_array_new(__pyx_t_2,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_1), (
char *)
"c", (
char *) __pyx_t_5);
3883 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 79, __pyx_L1_error)
3884 __Pyx_GOTREF(__pyx_t_6);
3885 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3886 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3888 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3889 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
3890 if (likely(__pyx_t_1)) {
3891 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
3892 __Pyx_INCREF(__pyx_t_1);
3893 __Pyx_INCREF(
function);
3894 __Pyx_DECREF_SET(__pyx_t_7,
function);
3897 __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3898 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
3899 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3900 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 79, __pyx_L1_error)
3901 __Pyx_GOTREF(__pyx_t_3);
3902 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3903 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 79, __pyx_L1_error)
3904 __Pyx_GIVEREF(__pyx_t_3);
3905 __Pyx_GOTREF(__pyx_v_self->_ImH);
3906 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
3907 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_3);
3917 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 80, __pyx_L1_error)
3918 __Pyx_GOTREF(__pyx_t_7);
3919 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 80, __pyx_L1_error)
3920 __Pyx_GOTREF(__pyx_t_1);
3921 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3922 __pyx_t_5 = __pyx_v_self->s22.get_D();
3924 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
3925 __PYX_ERR(1, 80, __pyx_L1_error)
3927 __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 80, __pyx_L1_error)
3928 __Pyx_GOTREF(__pyx_t_2);
3929 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 80, __pyx_L1_error)
3930 __Pyx_GOTREF(__pyx_t_7);
3931 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_2), (
char *)
"c", (
char *) __pyx_t_5);
3932 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 80, __pyx_L1_error)
3933 __Pyx_GOTREF(__pyx_t_6);
3934 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3935 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3937 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
3938 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
3939 if (likely(__pyx_t_2)) {
3940 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
3941 __Pyx_INCREF(__pyx_t_2);
3942 __Pyx_INCREF(
function);
3943 __Pyx_DECREF_SET(__pyx_t_1,
function);
3946 __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_6));
3947 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3948 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3949 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 80, __pyx_L1_error)
3950 __Pyx_GOTREF(__pyx_t_3);
3951 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3952 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 80, __pyx_L1_error)
3953 __Pyx_GIVEREF(__pyx_t_3);
3954 __Pyx_GOTREF(__pyx_v_self->_D);
3955 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
3956 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_3);
3966 __pyx_t_8 = __pyx_v_self->s22.inside_out;
3967 __pyx_v_self->inside_out = __pyx_t_8;
3986 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 82, __pyx_L1_error)
3987 __Pyx_GOTREF(__pyx_t_3);
3988 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 82, __pyx_L1_error)
3989 __Pyx_GOTREF(__pyx_t_1);
3990 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 82, __pyx_L1_error)
3991 __Pyx_GOTREF(__pyx_t_2);
3992 __Pyx_GIVEREF(__pyx_t_3);
3993 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
3994 __Pyx_GIVEREF(__pyx_t_1);
3995 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
3998 __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__8, Py_EQ); __Pyx_XGOTREF(__pyx_t_1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 82, __pyx_L1_error)
3999 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4000 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 82, __pyx_L1_error)
4001 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4011 __pyx_v_icase = __pyx_v_self->s23.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
4020 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 84, __pyx_L1_error)
4021 __Pyx_GOTREF(__pyx_t_2);
4022 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 84, __pyx_L1_error)
4023 __Pyx_GOTREF(__pyx_t_3);
4024 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4025 __pyx_t_5 = __pyx_v_self->s23.get_H();
4027 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4028 __PYX_ERR(1, 84, __pyx_L1_error)
4030 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)
4031 __Pyx_GOTREF(__pyx_t_7);
4032 __pyx_t_2 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 84, __pyx_L1_error)
4033 __Pyx_GOTREF(__pyx_t_2);
4034 __pyx_t_6 = __pyx_array_new(__pyx_t_2,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
4035 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 84, __pyx_L1_error)
4036 __Pyx_GOTREF(__pyx_t_6);
4037 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4038 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4040 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4041 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
4042 if (likely(__pyx_t_7)) {
4043 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
4044 __Pyx_INCREF(__pyx_t_7);
4045 __Pyx_INCREF(
function);
4046 __Pyx_DECREF_SET(__pyx_t_3,
function);
4049 __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4050 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4051 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4052 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 84, __pyx_L1_error)
4053 __Pyx_GOTREF(__pyx_t_1);
4054 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4055 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 84, __pyx_L1_error)
4056 __Pyx_GIVEREF(__pyx_t_1);
4057 __Pyx_GOTREF(__pyx_v_self->_H);
4058 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
4059 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_1);
4069 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 85, __pyx_L1_error)
4070 __Pyx_GOTREF(__pyx_t_3);
4071 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 85, __pyx_L1_error)
4072 __Pyx_GOTREF(__pyx_t_7);
4073 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4074 __pyx_t_5 = __pyx_v_self->s23.get_ImH();
4076 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4077 __PYX_ERR(1, 85, __pyx_L1_error)
4079 __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 85, __pyx_L1_error)
4080 __Pyx_GOTREF(__pyx_t_2);
4081 __pyx_t_3 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 85, __pyx_L1_error)
4082 __Pyx_GOTREF(__pyx_t_3);
4083 __pyx_t_6 = __pyx_array_new(__pyx_t_3,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_2), (
char *)
"c", (
char *) __pyx_t_5);
4084 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 85, __pyx_L1_error)
4085 __Pyx_GOTREF(__pyx_t_6);
4086 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4087 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4089 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4090 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
4091 if (likely(__pyx_t_2)) {
4092 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
4093 __Pyx_INCREF(__pyx_t_2);
4094 __Pyx_INCREF(
function);
4095 __Pyx_DECREF_SET(__pyx_t_7,
function);
4098 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4099 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4100 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4101 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 85, __pyx_L1_error)
4102 __Pyx_GOTREF(__pyx_t_1);
4103 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4104 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 85, __pyx_L1_error)
4105 __Pyx_GIVEREF(__pyx_t_1);
4106 __Pyx_GOTREF(__pyx_v_self->_ImH);
4107 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
4108 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_1);
4118 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 86, __pyx_L1_error)
4119 __Pyx_GOTREF(__pyx_t_7);
4120 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 86, __pyx_L1_error)
4121 __Pyx_GOTREF(__pyx_t_2);
4122 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4123 __pyx_t_5 = __pyx_v_self->s23.get_D();
4125 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4126 __PYX_ERR(1, 86, __pyx_L1_error)
4128 __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 86, __pyx_L1_error)
4129 __Pyx_GOTREF(__pyx_t_3);
4130 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 86, __pyx_L1_error)
4131 __Pyx_GOTREF(__pyx_t_7);
4132 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_3), (
char *)
"c", (
char *) __pyx_t_5);
4133 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 86, __pyx_L1_error)
4134 __Pyx_GOTREF(__pyx_t_6);
4135 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4136 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4138 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4139 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4140 if (likely(__pyx_t_3)) {
4141 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
4142 __Pyx_INCREF(__pyx_t_3);
4143 __Pyx_INCREF(
function);
4144 __Pyx_DECREF_SET(__pyx_t_2,
function);
4147 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
4148 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4149 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4150 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 86, __pyx_L1_error)
4151 __Pyx_GOTREF(__pyx_t_1);
4152 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4153 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 86, __pyx_L1_error)
4154 __Pyx_GIVEREF(__pyx_t_1);
4155 __Pyx_GOTREF(__pyx_v_self->_D);
4156 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
4157 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_1);
4167 __pyx_t_8 = __pyx_v_self->s23.inside_out;
4168 __pyx_v_self->inside_out = __pyx_t_8;
4187 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 88, __pyx_L1_error)
4188 __Pyx_GOTREF(__pyx_t_1);
4189 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 88, __pyx_L1_error)
4190 __Pyx_GOTREF(__pyx_t_2);
4191 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 88, __pyx_L1_error)
4192 __Pyx_GOTREF(__pyx_t_3);
4193 __Pyx_GIVEREF(__pyx_t_1);
4194 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
4195 __Pyx_GIVEREF(__pyx_t_2);
4196 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
4199 __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_tuple__9, Py_EQ); __Pyx_XGOTREF(__pyx_t_2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 88, __pyx_L1_error)
4200 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4201 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 88, __pyx_L1_error)
4202 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4212 __pyx_v_icase = __pyx_v_self->s31.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
4221 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 90, __pyx_L1_error)
4222 __Pyx_GOTREF(__pyx_t_3);
4223 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 90, __pyx_L1_error)
4224 __Pyx_GOTREF(__pyx_t_1);
4225 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4226 __pyx_t_5 = __pyx_v_self->s31.get_H();
4228 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4229 __PYX_ERR(1, 90, __pyx_L1_error)
4231 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 90, __pyx_L1_error)
4232 __Pyx_GOTREF(__pyx_t_7);
4233 __pyx_t_3 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 90, __pyx_L1_error)
4234 __Pyx_GOTREF(__pyx_t_3);
4235 __pyx_t_6 = __pyx_array_new(__pyx_t_3,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
4236 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 90, __pyx_L1_error)
4237 __Pyx_GOTREF(__pyx_t_6);
4238 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4239 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4241 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
4242 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
4243 if (likely(__pyx_t_7)) {
4244 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
4245 __Pyx_INCREF(__pyx_t_7);
4246 __Pyx_INCREF(
function);
4247 __Pyx_DECREF_SET(__pyx_t_1,
function);
4250 __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_6));
4251 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4252 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4253 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 90, __pyx_L1_error)
4254 __Pyx_GOTREF(__pyx_t_2);
4255 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4256 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 90, __pyx_L1_error)
4257 __Pyx_GIVEREF(__pyx_t_2);
4258 __Pyx_GOTREF(__pyx_v_self->_H);
4259 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
4260 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_2);
4270 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 91, __pyx_L1_error)
4271 __Pyx_GOTREF(__pyx_t_1);
4272 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 91, __pyx_L1_error)
4273 __Pyx_GOTREF(__pyx_t_7);
4274 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4275 __pyx_t_5 = __pyx_v_self->s31.get_ImH();
4277 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4278 __PYX_ERR(1, 91, __pyx_L1_error)
4280 __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 91, __pyx_L1_error)
4281 __Pyx_GOTREF(__pyx_t_3);
4282 __pyx_t_1 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 91, __pyx_L1_error)
4283 __Pyx_GOTREF(__pyx_t_1);
4284 __pyx_t_6 = __pyx_array_new(__pyx_t_1,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_3), (
char *)
"c", (
char *) __pyx_t_5);
4285 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 91, __pyx_L1_error)
4286 __Pyx_GOTREF(__pyx_t_6);
4287 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4288 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4290 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4291 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
4292 if (likely(__pyx_t_3)) {
4293 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
4294 __Pyx_INCREF(__pyx_t_3);
4295 __Pyx_INCREF(
function);
4296 __Pyx_DECREF_SET(__pyx_t_7,
function);
4299 __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4300 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4301 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4302 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 91, __pyx_L1_error)
4303 __Pyx_GOTREF(__pyx_t_2);
4304 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4305 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 91, __pyx_L1_error)
4306 __Pyx_GIVEREF(__pyx_t_2);
4307 __Pyx_GOTREF(__pyx_v_self->_ImH);
4308 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
4309 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_2);
4319 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 92, __pyx_L1_error)
4320 __Pyx_GOTREF(__pyx_t_7);
4321 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 92, __pyx_L1_error)
4322 __Pyx_GOTREF(__pyx_t_3);
4323 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4324 __pyx_t_5 = __pyx_v_self->s31.get_D();
4326 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4327 __PYX_ERR(1, 92, __pyx_L1_error)
4329 __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 92, __pyx_L1_error)
4330 __Pyx_GOTREF(__pyx_t_1);
4331 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 92, __pyx_L1_error)
4332 __Pyx_GOTREF(__pyx_t_7);
4333 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_1), (
char *)
"c", (
char *) __pyx_t_5);
4334 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 92, __pyx_L1_error)
4335 __Pyx_GOTREF(__pyx_t_6);
4336 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4337 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4339 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4340 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
4341 if (likely(__pyx_t_1)) {
4342 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
4343 __Pyx_INCREF(__pyx_t_1);
4344 __Pyx_INCREF(
function);
4345 __Pyx_DECREF_SET(__pyx_t_3,
function);
4348 __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4349 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4350 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4351 if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 92, __pyx_L1_error)
4352 __Pyx_GOTREF(__pyx_t_2);
4353 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4354 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 92, __pyx_L1_error)
4355 __Pyx_GIVEREF(__pyx_t_2);
4356 __Pyx_GOTREF(__pyx_v_self->_D);
4357 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
4358 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_2);
4368 __pyx_t_8 = __pyx_v_self->s31.inside_out;
4369 __pyx_v_self->inside_out = __pyx_t_8;
4388 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 94, __pyx_L1_error)
4389 __Pyx_GOTREF(__pyx_t_2);
4390 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 94, __pyx_L1_error)
4391 __Pyx_GOTREF(__pyx_t_3);
4392 __pyx_t_1 = PyTuple_New(2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 94, __pyx_L1_error)
4393 __Pyx_GOTREF(__pyx_t_1);
4394 __Pyx_GIVEREF(__pyx_t_2);
4395 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
4396 __Pyx_GIVEREF(__pyx_t_3);
4397 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
4400 __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_tuple__10, Py_EQ); __Pyx_XGOTREF(__pyx_t_3);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 94, __pyx_L1_error)
4401 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4402 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 94, __pyx_L1_error)
4403 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4413 __pyx_v_icase = __pyx_v_self->s32.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
4422 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 96, __pyx_L1_error)
4423 __Pyx_GOTREF(__pyx_t_1);
4424 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 96, __pyx_L1_error)
4425 __Pyx_GOTREF(__pyx_t_2);
4426 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4427 __pyx_t_5 = __pyx_v_self->s32.get_H();
4429 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4430 __PYX_ERR(1, 96, __pyx_L1_error)
4432 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 96, __pyx_L1_error)
4433 __Pyx_GOTREF(__pyx_t_7);
4434 __pyx_t_1 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 96, __pyx_L1_error)
4435 __Pyx_GOTREF(__pyx_t_1);
4436 __pyx_t_6 = __pyx_array_new(__pyx_t_1,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
4437 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 96, __pyx_L1_error)
4438 __Pyx_GOTREF(__pyx_t_6);
4439 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4440 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4442 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4443 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
4444 if (likely(__pyx_t_7)) {
4445 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
4446 __Pyx_INCREF(__pyx_t_7);
4447 __Pyx_INCREF(
function);
4448 __Pyx_DECREF_SET(__pyx_t_2,
function);
4451 __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
4452 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4453 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4454 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 96, __pyx_L1_error)
4455 __Pyx_GOTREF(__pyx_t_3);
4456 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4457 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 96, __pyx_L1_error)
4458 __Pyx_GIVEREF(__pyx_t_3);
4459 __Pyx_GOTREF(__pyx_v_self->_H);
4460 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
4461 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_3);
4471 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 97, __pyx_L1_error)
4472 __Pyx_GOTREF(__pyx_t_2);
4473 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 97, __pyx_L1_error)
4474 __Pyx_GOTREF(__pyx_t_7);
4475 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4476 __pyx_t_5 = __pyx_v_self->s32.get_ImH();
4478 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4479 __PYX_ERR(1, 97, __pyx_L1_error)
4481 __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 97, __pyx_L1_error)
4482 __Pyx_GOTREF(__pyx_t_1);
4483 __pyx_t_2 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 97, __pyx_L1_error)
4484 __Pyx_GOTREF(__pyx_t_2);
4485 __pyx_t_6 = __pyx_array_new(__pyx_t_2,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_1), (
char *)
"c", (
char *) __pyx_t_5);
4486 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 97, __pyx_L1_error)
4487 __Pyx_GOTREF(__pyx_t_6);
4488 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4489 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4491 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4492 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
4493 if (likely(__pyx_t_1)) {
4494 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
4495 __Pyx_INCREF(__pyx_t_1);
4496 __Pyx_INCREF(
function);
4497 __Pyx_DECREF_SET(__pyx_t_7,
function);
4500 __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4501 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4502 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4503 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 97, __pyx_L1_error)
4504 __Pyx_GOTREF(__pyx_t_3);
4505 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4506 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 97, __pyx_L1_error)
4507 __Pyx_GIVEREF(__pyx_t_3);
4508 __Pyx_GOTREF(__pyx_v_self->_ImH);
4509 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
4510 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_3);
4520 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 98, __pyx_L1_error)
4521 __Pyx_GOTREF(__pyx_t_7);
4522 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
4523 __Pyx_GOTREF(__pyx_t_1);
4524 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4525 __pyx_t_5 = __pyx_v_self->s32.get_D();
4527 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4528 __PYX_ERR(1, 98, __pyx_L1_error)
4530 __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 98, __pyx_L1_error)
4531 __Pyx_GOTREF(__pyx_t_2);
4532 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 98, __pyx_L1_error)
4533 __Pyx_GOTREF(__pyx_t_7);
4534 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_2), (
char *)
"c", (
char *) __pyx_t_5);
4535 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 98, __pyx_L1_error)
4536 __Pyx_GOTREF(__pyx_t_6);
4537 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4538 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4540 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
4541 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
4542 if (likely(__pyx_t_2)) {
4543 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_1);
4544 __Pyx_INCREF(__pyx_t_2);
4545 __Pyx_INCREF(
function);
4546 __Pyx_DECREF_SET(__pyx_t_1,
function);
4549 __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_6));
4550 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4551 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4552 if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 98, __pyx_L1_error)
4553 __Pyx_GOTREF(__pyx_t_3);
4554 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4555 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 98, __pyx_L1_error)
4556 __Pyx_GIVEREF(__pyx_t_3);
4557 __Pyx_GOTREF(__pyx_v_self->_D);
4558 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
4559 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_3);
4569 __pyx_t_8 = __pyx_v_self->s32.inside_out;
4570 __pyx_v_self->inside_out = __pyx_t_8;
4589 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nSpace);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 100, __pyx_L1_error)
4590 __Pyx_GOTREF(__pyx_t_3);
4591 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nP);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 100, __pyx_L1_error)
4592 __Pyx_GOTREF(__pyx_t_1);
4593 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 100, __pyx_L1_error)
4594 __Pyx_GOTREF(__pyx_t_2);
4595 __Pyx_GIVEREF(__pyx_t_3);
4596 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
4597 __Pyx_GIVEREF(__pyx_t_1);
4598 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
4601 __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__11, Py_EQ); __Pyx_XGOTREF(__pyx_t_1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 100, __pyx_L1_error)
4602 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4603 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1);
if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 100, __pyx_L1_error)
4604 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4614 __pyx_v_icase = __pyx_v_self->s33.calculate(((
double *)__pyx_v_phi_dof->data), ((
double *)__pyx_v_phi_nodes->data), ((
double *)__pyx_v_self->xiBuffer->data), 0);
4623 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 102, __pyx_L1_error)
4624 __Pyx_GOTREF(__pyx_t_2);
4625 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 102, __pyx_L1_error)
4626 __Pyx_GOTREF(__pyx_t_3);
4627 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4628 __pyx_t_5 = __pyx_v_self->s33.get_H();
4630 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4631 __PYX_ERR(1, 102, __pyx_L1_error)
4633 __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 102, __pyx_L1_error)
4634 __Pyx_GOTREF(__pyx_t_7);
4635 __pyx_t_2 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 102, __pyx_L1_error)
4636 __Pyx_GOTREF(__pyx_t_2);
4637 __pyx_t_6 = __pyx_array_new(__pyx_t_2,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_7), (
char *)
"c", (
char *) __pyx_t_5);
4638 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 102, __pyx_L1_error)
4639 __Pyx_GOTREF(__pyx_t_6);
4640 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4641 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4643 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4644 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
4645 if (likely(__pyx_t_7)) {
4646 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_3);
4647 __Pyx_INCREF(__pyx_t_7);
4648 __Pyx_INCREF(
function);
4649 __Pyx_DECREF_SET(__pyx_t_3,
function);
4652 __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4653 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4654 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4655 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 102, __pyx_L1_error)
4656 __Pyx_GOTREF(__pyx_t_1);
4657 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4658 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 102, __pyx_L1_error)
4659 __Pyx_GIVEREF(__pyx_t_1);
4660 __Pyx_GOTREF(__pyx_v_self->_H);
4661 __Pyx_DECREF(((PyObject *)__pyx_v_self->_H));
4662 __pyx_v_self->_H = ((PyArrayObject *)__pyx_t_1);
4672 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 103, __pyx_L1_error)
4673 __Pyx_GOTREF(__pyx_t_3);
4674 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 103, __pyx_L1_error)
4675 __Pyx_GOTREF(__pyx_t_7);
4676 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4677 __pyx_t_5 = __pyx_v_self->s33.get_ImH();
4679 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4680 __PYX_ERR(1, 103, __pyx_L1_error)
4682 __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 103, __pyx_L1_error)
4683 __Pyx_GOTREF(__pyx_t_2);
4684 __pyx_t_3 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 103, __pyx_L1_error)
4685 __Pyx_GOTREF(__pyx_t_3);
4686 __pyx_t_6 = __pyx_array_new(__pyx_t_3,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_2), (
char *)
"c", (
char *) __pyx_t_5);
4687 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 103, __pyx_L1_error)
4688 __Pyx_GOTREF(__pyx_t_6);
4689 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4690 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4692 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4693 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
4694 if (likely(__pyx_t_2)) {
4695 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_7);
4696 __Pyx_INCREF(__pyx_t_2);
4697 __Pyx_INCREF(
function);
4698 __Pyx_DECREF_SET(__pyx_t_7,
function);
4701 __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4702 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4703 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4704 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 103, __pyx_L1_error)
4705 __Pyx_GOTREF(__pyx_t_1);
4706 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4707 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 103, __pyx_L1_error)
4708 __Pyx_GIVEREF(__pyx_t_1);
4709 __Pyx_GOTREF(__pyx_v_self->_ImH);
4710 __Pyx_DECREF(((PyObject *)__pyx_v_self->_ImH));
4711 __pyx_v_self->_ImH = ((PyArrayObject *)__pyx_t_1);
4721 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np);
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 104, __pyx_L1_error)
4722 __Pyx_GOTREF(__pyx_t_7);
4723 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 104, __pyx_L1_error)
4724 __Pyx_GOTREF(__pyx_t_2);
4725 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4726 __pyx_t_5 = __pyx_v_self->s33.get_D();
4728 PyErr_SetString(PyExc_ValueError,
"Cannot create cython.array from NULL pointer");
4729 __PYX_ERR(1, 104, __pyx_L1_error)
4731 __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 104, __pyx_L1_error)
4732 __Pyx_GOTREF(__pyx_t_3);
4733 __pyx_t_7 = Py_BuildValue((
char*)
"(" __PYX_BUILD_PY_SSIZE_T
")", ((Py_ssize_t)__pyx_v_self->nQ));
if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 104, __pyx_L1_error)
4734 __Pyx_GOTREF(__pyx_t_7);
4735 __pyx_t_6 = __pyx_array_new(__pyx_t_7,
sizeof(
double), PyBytes_AS_STRING(__pyx_t_3), (
char *)
"c", (
char *) __pyx_t_5);
4736 if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 104, __pyx_L1_error)
4737 __Pyx_GOTREF(__pyx_t_6);
4738 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4739 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4741 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4742 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4743 if (likely(__pyx_t_3)) {
4744 PyObject*
function = PyMethod_GET_FUNCTION(__pyx_t_2);
4745 __Pyx_INCREF(__pyx_t_3);
4746 __Pyx_INCREF(
function);
4747 __Pyx_DECREF_SET(__pyx_t_2,
function);
4750 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
4751 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4752 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4753 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 104, __pyx_L1_error)
4754 __Pyx_GOTREF(__pyx_t_1);
4755 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4756 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 104, __pyx_L1_error)
4757 __Pyx_GIVEREF(__pyx_t_1);
4758 __Pyx_GOTREF(__pyx_v_self->_D);
4759 __Pyx_DECREF(((PyObject *)__pyx_v_self->_D));
4760 __pyx_v_self->_D = ((PyArrayObject *)__pyx_t_1);
4770 __pyx_t_8 = __pyx_v_self->s33.inside_out;
4771 __pyx_v_self->inside_out = __pyx_t_8;
4792 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4795 __Pyx_XDECREF(__pyx_t_1);
4796 __Pyx_XDECREF(__pyx_t_2);
4797 __Pyx_XDECREF(__pyx_t_3);
4798 __Pyx_XDECREF(((PyObject *)__pyx_t_6));
4799 __Pyx_XDECREF(__pyx_t_7);
4800 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
4803 __Pyx_XGIVEREF(__pyx_r);
4804 __Pyx_RefNannyFinishContext();
4817 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_5set_quad(PyObject *__pyx_v_self, PyObject *__pyx_arg_q);
4818 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_5set_quad(PyObject *__pyx_v_self, PyObject *__pyx_arg_q) {
4820 int __pyx_lineno = 0;
4821 const char *__pyx_filename = NULL;
4822 int __pyx_clineno = 0;
4823 PyObject *__pyx_r = 0;
4824 __Pyx_RefNannyDeclarations
4825 __Pyx_RefNannySetupContext(
"set_quad (wrapper)", 0);
4826 assert(__pyx_arg_q); {
4827 __pyx_v_q = __Pyx_PyInt_As_int(__pyx_arg_q);
if (unlikely((__pyx_v_q == (
int)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L3_error)
4829 goto __pyx_L4_argument_unpacking_done;
4831 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.set_quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
4832 __Pyx_RefNannyFinishContext();
4834 __pyx_L4_argument_unpacking_done:;
4835 __pyx_r = __pyx_pf_22equivalent_polynomials_7Simplex_4set_quad(((
struct __pyx_obj_22equivalent_polynomials_Simplex *)__pyx_v_self), ((
int)__pyx_v_q));
4838 __Pyx_RefNannyFinishContext();
4842 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_4set_quad(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self,
int __pyx_v_q) {
4843 PyObject *__pyx_r = NULL;
4844 __Pyx_RefNannyDeclarations
4845 __Pyx_RefNannySetupContext(
"set_quad", 0);
4854 __pyx_v_self->q = __pyx_v_q;
4865 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4866 __Pyx_XGIVEREF(__pyx_r);
4867 __Pyx_RefNannyFinishContext();
4880 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_1H_1__get__(PyObject *__pyx_v_self);
4881 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_1H_1__get__(PyObject *__pyx_v_self) {
4882 PyObject *__pyx_r = 0;
4883 __Pyx_RefNannyDeclarations
4884 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
4885 __pyx_r = __pyx_pf_22equivalent_polynomials_7Simplex_1H___get__(((
struct __pyx_obj_22equivalent_polynomials_Simplex *)__pyx_v_self));
4888 __Pyx_RefNannyFinishContext();
4892 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_1H___get__(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self) {
4893 PyObject *__pyx_r = NULL;
4894 __Pyx_RefNannyDeclarations
4896 PyObject *__pyx_t_2 = NULL;
4897 int __pyx_lineno = 0;
4898 const char *__pyx_filename = NULL;
4899 int __pyx_clineno = 0;
4900 __Pyx_RefNannySetupContext(
"__get__", 0);
4909 __pyx_t_1 = (__pyx_v_self->inside_out != 0);
4919 __Pyx_XDECREF(__pyx_r);
4920 __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_ImH), __pyx_v_self->q,
int, 1, __Pyx_PyInt_From_int, 0, 1, 1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 111, __pyx_L1_error)
4921 __Pyx_GOTREF(__pyx_t_2);
4922 __pyx_r = __pyx_t_2;
4943 __Pyx_XDECREF(__pyx_r);
4944 __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_H), __pyx_v_self->q,
int, 1, __Pyx_PyInt_From_int, 0, 1, 1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 113, __pyx_L1_error)
4945 __Pyx_GOTREF(__pyx_t_2);
4946 __pyx_r = __pyx_t_2;
4961 __Pyx_XDECREF(__pyx_t_2);
4962 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.H.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4965 __Pyx_XGIVEREF(__pyx_r);
4966 __Pyx_RefNannyFinishContext();
4979 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_3ImH_1__get__(PyObject *__pyx_v_self);
4980 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_3ImH_1__get__(PyObject *__pyx_v_self) {
4981 PyObject *__pyx_r = 0;
4982 __Pyx_RefNannyDeclarations
4983 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
4984 __pyx_r = __pyx_pf_22equivalent_polynomials_7Simplex_3ImH___get__(((
struct __pyx_obj_22equivalent_polynomials_Simplex *)__pyx_v_self));
4987 __Pyx_RefNannyFinishContext();
4991 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_3ImH___get__(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self) {
4992 PyObject *__pyx_r = NULL;
4993 __Pyx_RefNannyDeclarations
4995 PyObject *__pyx_t_2 = NULL;
4996 int __pyx_lineno = 0;
4997 const char *__pyx_filename = NULL;
4998 int __pyx_clineno = 0;
4999 __Pyx_RefNannySetupContext(
"__get__", 0);
5008 __pyx_t_1 = (__pyx_v_self->inside_out != 0);
5018 __Pyx_XDECREF(__pyx_r);
5019 __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_H), __pyx_v_self->q,
int, 1, __Pyx_PyInt_From_int, 0, 1, 1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 117, __pyx_L1_error)
5020 __Pyx_GOTREF(__pyx_t_2);
5021 __pyx_r = __pyx_t_2;
5042 __Pyx_XDECREF(__pyx_r);
5043 __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_ImH), __pyx_v_self->q,
int, 1, __Pyx_PyInt_From_int, 0, 1, 1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 119, __pyx_L1_error)
5044 __Pyx_GOTREF(__pyx_t_2);
5045 __pyx_r = __pyx_t_2;
5060 __Pyx_XDECREF(__pyx_t_2);
5061 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.ImH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5064 __Pyx_XGIVEREF(__pyx_r);
5065 __Pyx_RefNannyFinishContext();
5077 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_1D_1__get__(PyObject *__pyx_v_self);
5078 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_1D_1__get__(PyObject *__pyx_v_self) {
5079 PyObject *__pyx_r = 0;
5080 __Pyx_RefNannyDeclarations
5081 __Pyx_RefNannySetupContext(
"__get__ (wrapper)", 0);
5082 __pyx_r = __pyx_pf_22equivalent_polynomials_7Simplex_1D___get__(((
struct __pyx_obj_22equivalent_polynomials_Simplex *)__pyx_v_self));
5085 __Pyx_RefNannyFinishContext();
5089 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_1D___get__(
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self) {
5090 PyObject *__pyx_r = NULL;
5091 __Pyx_RefNannyDeclarations
5092 PyObject *__pyx_t_1 = NULL;
5093 int __pyx_lineno = 0;
5094 const char *__pyx_filename = NULL;
5095 int __pyx_clineno = 0;
5096 __Pyx_RefNannySetupContext(
"__get__", 0);
5103 __Pyx_XDECREF(__pyx_r);
5104 __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->_D), __pyx_v_self->q,
int, 1, __Pyx_PyInt_From_int, 0, 1, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 122, __pyx_L1_error)
5105 __Pyx_GOTREF(__pyx_t_1);
5106 __pyx_r = __pyx_t_1;
5119 __Pyx_XDECREF(__pyx_t_1);
5120 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.D.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5123 __Pyx_XGIVEREF(__pyx_r);
5124 __Pyx_RefNannyFinishContext();
5135 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused);
5136 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5137 PyObject *__pyx_r = 0;
5138 __Pyx_RefNannyDeclarations
5139 __Pyx_RefNannySetupContext(
"__reduce_cython__ (wrapper)", 0);
5140 __pyx_r = __pyx_pf_22equivalent_polynomials_7Simplex_6__reduce_cython__(((
struct __pyx_obj_22equivalent_polynomials_Simplex *)__pyx_v_self));
5143 __Pyx_RefNannyFinishContext();
5147 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_6__reduce_cython__(CYTHON_UNUSED
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self) {
5148 PyObject *__pyx_r = NULL;
5149 __Pyx_RefNannyDeclarations
5150 PyObject *__pyx_t_1 = NULL;
5151 int __pyx_lineno = 0;
5152 const char *__pyx_filename = NULL;
5153 int __pyx_clineno = 0;
5154 __Pyx_RefNannySetupContext(
"__reduce_cython__", 0);
5162 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
5163 __Pyx_GOTREF(__pyx_t_1);
5164 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5165 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5166 __PYX_ERR(0, 2, __pyx_L1_error)
5176 __Pyx_XDECREF(__pyx_t_1);
5177 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5179 __Pyx_XGIVEREF(__pyx_r);
5180 __Pyx_RefNannyFinishContext();
5192 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state);
5193 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5194 PyObject *__pyx_r = 0;
5195 __Pyx_RefNannyDeclarations
5196 __Pyx_RefNannySetupContext(
"__setstate_cython__ (wrapper)", 0);
5197 __pyx_r = __pyx_pf_22equivalent_polynomials_7Simplex_8__setstate_cython__(((
struct __pyx_obj_22equivalent_polynomials_Simplex *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5200 __Pyx_RefNannyFinishContext();
5204 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_8__setstate_cython__(CYTHON_UNUSED
struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
5205 PyObject *__pyx_r = NULL;
5206 __Pyx_RefNannyDeclarations
5207 PyObject *__pyx_t_1 = NULL;
5208 int __pyx_lineno = 0;
5209 const char *__pyx_filename = NULL;
5210 int __pyx_clineno = 0;
5211 __Pyx_RefNannySetupContext(
"__setstate_cython__", 0);
5218 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
5219 __Pyx_GOTREF(__pyx_t_1);
5220 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5221 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5222 __PYX_ERR(0, 4, __pyx_L1_error)
5233 __Pyx_XDECREF(__pyx_t_1);
5234 __Pyx_AddTraceback(
"equivalent_polynomials.Simplex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5236 __Pyx_XGIVEREF(__pyx_r);
5237 __Pyx_RefNannyFinishContext();
5249 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
5250 PyObject *__pyx_r = NULL;
5251 __Pyx_RefNannyDeclarations
5252 PyObject *__pyx_t_1 = NULL;
5253 int __pyx_lineno = 0;
5254 const char *__pyx_filename = NULL;
5255 int __pyx_clineno = 0;
5256 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew1", 0);
5265 __Pyx_XDECREF(__pyx_r);
5266 __pyx_t_1 = PyArray_MultiIterNew(1, ((
void *)__pyx_v_a));
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error)
5267 __Pyx_GOTREF(__pyx_t_1);
5268 __pyx_r = __pyx_t_1;
5282 __Pyx_XDECREF(__pyx_t_1);
5283 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
5286 __Pyx_XGIVEREF(__pyx_r);
5287 __Pyx_RefNannyFinishContext();
5299 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
5300 PyObject *__pyx_r = NULL;
5301 __Pyx_RefNannyDeclarations
5302 PyObject *__pyx_t_1 = NULL;
5303 int __pyx_lineno = 0;
5304 const char *__pyx_filename = NULL;
5305 int __pyx_clineno = 0;
5306 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew2", 0);
5315 __Pyx_XDECREF(__pyx_r);
5316 __pyx_t_1 = PyArray_MultiIterNew(2, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b));
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error)
5317 __Pyx_GOTREF(__pyx_t_1);
5318 __pyx_r = __pyx_t_1;
5332 __Pyx_XDECREF(__pyx_t_1);
5333 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
5336 __Pyx_XGIVEREF(__pyx_r);
5337 __Pyx_RefNannyFinishContext();
5349 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
5350 PyObject *__pyx_r = NULL;
5351 __Pyx_RefNannyDeclarations
5352 PyObject *__pyx_t_1 = NULL;
5353 int __pyx_lineno = 0;
5354 const char *__pyx_filename = NULL;
5355 int __pyx_clineno = 0;
5356 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew3", 0);
5365 __Pyx_XDECREF(__pyx_r);
5366 __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, 742, __pyx_L1_error)
5367 __Pyx_GOTREF(__pyx_t_1);
5368 __pyx_r = __pyx_t_1;
5382 __Pyx_XDECREF(__pyx_t_1);
5383 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
5386 __Pyx_XGIVEREF(__pyx_r);
5387 __Pyx_RefNannyFinishContext();
5399 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) {
5400 PyObject *__pyx_r = NULL;
5401 __Pyx_RefNannyDeclarations
5402 PyObject *__pyx_t_1 = NULL;
5403 int __pyx_lineno = 0;
5404 const char *__pyx_filename = NULL;
5405 int __pyx_clineno = 0;
5406 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew4", 0);
5415 __Pyx_XDECREF(__pyx_r);
5416 __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, 745, __pyx_L1_error)
5417 __Pyx_GOTREF(__pyx_t_1);
5418 __pyx_r = __pyx_t_1;
5432 __Pyx_XDECREF(__pyx_t_1);
5433 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
5436 __Pyx_XGIVEREF(__pyx_r);
5437 __Pyx_RefNannyFinishContext();
5449 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) {
5450 PyObject *__pyx_r = NULL;
5451 __Pyx_RefNannyDeclarations
5452 PyObject *__pyx_t_1 = NULL;
5453 int __pyx_lineno = 0;
5454 const char *__pyx_filename = NULL;
5455 int __pyx_clineno = 0;
5456 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew5", 0);
5465 __Pyx_XDECREF(__pyx_r);
5466 __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, 748, __pyx_L1_error)
5467 __Pyx_GOTREF(__pyx_t_1);
5468 __pyx_r = __pyx_t_1;
5482 __Pyx_XDECREF(__pyx_t_1);
5483 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
5486 __Pyx_XGIVEREF(__pyx_r);
5487 __Pyx_RefNannyFinishContext();
5499 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
5500 PyObject *__pyx_r = NULL;
5501 __Pyx_RefNannyDeclarations
5503 __Pyx_RefNannySetupContext(
"PyDataType_SHAPE", 0);
5512 __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
5522 __Pyx_XDECREF(__pyx_r);
5523 __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
5524 __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
5544 __Pyx_XDECREF(__pyx_r);
5545 __Pyx_INCREF(__pyx_empty_tuple);
5546 __pyx_r = __pyx_empty_tuple;
5560 __Pyx_XGIVEREF(__pyx_r);
5561 __Pyx_RefNannyFinishContext();
5573 static CYTHON_INLINE
void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
5574 __Pyx_RefNannyDeclarations
5575 __Pyx_RefNannySetupContext(
"set_array_base", 0);
5584 Py_INCREF(__pyx_v_base);
5593 (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
5604 __Pyx_RefNannyFinishContext();
5615 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
5616 PyObject *__pyx_v_base;
5617 PyObject *__pyx_r = NULL;
5618 __Pyx_RefNannyDeclarations
5620 __Pyx_RefNannySetupContext(
"get_array_base", 0);
5629 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
5638 __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
5648 __Pyx_XDECREF(__pyx_r);
5649 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5668 __Pyx_XDECREF(__pyx_r);
5669 __Pyx_INCREF(((PyObject *)__pyx_v_base));
5670 __pyx_r = ((PyObject *)__pyx_v_base);
5683 __Pyx_XGIVEREF(__pyx_r);
5684 __Pyx_RefNannyFinishContext();
5696 static CYTHON_INLINE
int __pyx_f_5numpy_import_array(
void) {
5698 __Pyx_RefNannyDeclarations
5699 PyObject *__pyx_t_1 = NULL;
5700 PyObject *__pyx_t_2 = NULL;
5701 PyObject *__pyx_t_3 = NULL;
5703 PyObject *__pyx_t_5 = NULL;
5704 PyObject *__pyx_t_6 = NULL;
5705 PyObject *__pyx_t_7 = NULL;
5706 PyObject *__pyx_t_8 = NULL;
5707 int __pyx_lineno = 0;
5708 const char *__pyx_filename = NULL;
5709 int __pyx_clineno = 0;
5710 __Pyx_RefNannySetupContext(
"import_array", 0);
5720 __Pyx_PyThreadState_declare
5721 __Pyx_PyThreadState_assign
5722 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5723 __Pyx_XGOTREF(__pyx_t_1);
5724 __Pyx_XGOTREF(__pyx_t_2);
5725 __Pyx_XGOTREF(__pyx_t_3);
5735 __pyx_t_4 = _import_array();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 943, __pyx_L3_error)
5745 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5746 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5747 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5748 goto __pyx_L8_try_end;
5758 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5760 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5761 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error)
5762 __Pyx_GOTREF(__pyx_t_5);
5763 __Pyx_GOTREF(__pyx_t_6);
5764 __Pyx_GOTREF(__pyx_t_7);
5773 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__14, NULL);
if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error)
5774 __Pyx_GOTREF(__pyx_t_8);
5775 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5776 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5777 __PYX_ERR(2, 945, __pyx_L5_except_error)
5779 goto __pyx_L5_except_error;
5780 __pyx_L5_except_error:;
5789 __Pyx_XGIVEREF(__pyx_t_1);
5790 __Pyx_XGIVEREF(__pyx_t_2);
5791 __Pyx_XGIVEREF(__pyx_t_3);
5792 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5793 goto __pyx_L1_error;
5809 __Pyx_XDECREF(__pyx_t_5);
5810 __Pyx_XDECREF(__pyx_t_6);
5811 __Pyx_XDECREF(__pyx_t_7);
5812 __Pyx_XDECREF(__pyx_t_8);
5813 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5816 __Pyx_RefNannyFinishContext();
5828 static CYTHON_INLINE
int __pyx_f_5numpy_import_umath(
void) {
5830 __Pyx_RefNannyDeclarations
5831 PyObject *__pyx_t_1 = NULL;
5832 PyObject *__pyx_t_2 = NULL;
5833 PyObject *__pyx_t_3 = NULL;
5835 PyObject *__pyx_t_5 = NULL;
5836 PyObject *__pyx_t_6 = NULL;
5837 PyObject *__pyx_t_7 = NULL;
5838 PyObject *__pyx_t_8 = NULL;
5839 int __pyx_lineno = 0;
5840 const char *__pyx_filename = NULL;
5841 int __pyx_clineno = 0;
5842 __Pyx_RefNannySetupContext(
"import_umath", 0);
5852 __Pyx_PyThreadState_declare
5853 __Pyx_PyThreadState_assign
5854 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5855 __Pyx_XGOTREF(__pyx_t_1);
5856 __Pyx_XGOTREF(__pyx_t_2);
5857 __Pyx_XGOTREF(__pyx_t_3);
5867 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 949, __pyx_L3_error)
5877 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5878 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5879 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5880 goto __pyx_L8_try_end;
5890 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5892 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5893 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error)
5894 __Pyx_GOTREF(__pyx_t_5);
5895 __Pyx_GOTREF(__pyx_t_6);
5896 __Pyx_GOTREF(__pyx_t_7);
5905 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__15, NULL);
if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error)
5906 __Pyx_GOTREF(__pyx_t_8);
5907 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5908 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5909 __PYX_ERR(2, 951, __pyx_L5_except_error)
5911 goto __pyx_L5_except_error;
5912 __pyx_L5_except_error:;
5921 __Pyx_XGIVEREF(__pyx_t_1);
5922 __Pyx_XGIVEREF(__pyx_t_2);
5923 __Pyx_XGIVEREF(__pyx_t_3);
5924 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5925 goto __pyx_L1_error;
5941 __Pyx_XDECREF(__pyx_t_5);
5942 __Pyx_XDECREF(__pyx_t_6);
5943 __Pyx_XDECREF(__pyx_t_7);
5944 __Pyx_XDECREF(__pyx_t_8);
5945 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5948 __Pyx_RefNannyFinishContext();
5960 static CYTHON_INLINE
int __pyx_f_5numpy_import_ufunc(
void) {
5962 __Pyx_RefNannyDeclarations
5963 PyObject *__pyx_t_1 = NULL;
5964 PyObject *__pyx_t_2 = NULL;
5965 PyObject *__pyx_t_3 = NULL;
5967 PyObject *__pyx_t_5 = NULL;
5968 PyObject *__pyx_t_6 = NULL;
5969 PyObject *__pyx_t_7 = NULL;
5970 PyObject *__pyx_t_8 = NULL;
5971 int __pyx_lineno = 0;
5972 const char *__pyx_filename = NULL;
5973 int __pyx_clineno = 0;
5974 __Pyx_RefNannySetupContext(
"import_ufunc", 0);
5984 __Pyx_PyThreadState_declare
5985 __Pyx_PyThreadState_assign
5986 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5987 __Pyx_XGOTREF(__pyx_t_1);
5988 __Pyx_XGOTREF(__pyx_t_2);
5989 __Pyx_XGOTREF(__pyx_t_3);
5999 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(2, 955, __pyx_L3_error)
6009 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6010 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6011 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6012 goto __pyx_L8_try_end;
6022 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
6024 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
6025 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error)
6026 __Pyx_GOTREF(__pyx_t_5);
6027 __Pyx_GOTREF(__pyx_t_6);
6028 __Pyx_GOTREF(__pyx_t_7);
6037 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__15, NULL);
if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error)
6038 __Pyx_GOTREF(__pyx_t_8);
6039 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6040 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6041 __PYX_ERR(2, 957, __pyx_L5_except_error)
6043 goto __pyx_L5_except_error;
6044 __pyx_L5_except_error:;
6053 __Pyx_XGIVEREF(__pyx_t_1);
6054 __Pyx_XGIVEREF(__pyx_t_2);
6055 __Pyx_XGIVEREF(__pyx_t_3);
6056 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
6057 goto __pyx_L1_error;
6073 __Pyx_XDECREF(__pyx_t_5);
6074 __Pyx_XDECREF(__pyx_t_6);
6075 __Pyx_XDECREF(__pyx_t_7);
6076 __Pyx_XDECREF(__pyx_t_8);
6077 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
6080 __Pyx_RefNannyFinishContext();
6092 static CYTHON_INLINE
int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
6094 __Pyx_RefNannyDeclarations
6095 __Pyx_RefNannySetupContext(
"is_timedelta64_object", 0);
6104 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
6117 __Pyx_RefNannyFinishContext();
6129 static CYTHON_INLINE
int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
6131 __Pyx_RefNannyDeclarations
6132 __Pyx_RefNannySetupContext(
"is_datetime64_object", 0);
6141 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
6154 __Pyx_RefNannyFinishContext();
6166 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
6167 npy_datetime __pyx_r;
6176 __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
6200 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
6201 npy_timedelta __pyx_r;
6210 __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
6234 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
6235 NPY_DATETIMEUNIT __pyx_r;
6242 __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
6267 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
6268 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6269 PyObject *__pyx_v_shape = 0;
6270 Py_ssize_t __pyx_v_itemsize;
6271 PyObject *__pyx_v_format = 0;
6272 PyObject *__pyx_v_mode = 0;
6273 int __pyx_v_allocate_buffer;
6274 int __pyx_lineno = 0;
6275 const char *__pyx_filename = NULL;
6276 int __pyx_clineno = 0;
6278 __Pyx_RefNannyDeclarations
6279 __Pyx_RefNannySetupContext(
"__cinit__ (wrapper)", 0);
6281 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
6282 PyObject* values[5] = {0,0,0,0,0};
6283 values[3] = ((PyObject *)__pyx_n_s_c);
6284 if (unlikely(__pyx_kwds)) {
6286 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6288 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6290 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6292 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6294 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6296 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6299 default:
goto __pyx_L5_argtuple_error;
6301 kw_args = PyDict_Size(__pyx_kwds);
6304 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
6305 else goto __pyx_L5_argtuple_error;
6308 if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
6310 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
6314 if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
6316 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
6321 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
6322 if (value) { values[3] = value; kw_args--; }
6327 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
6328 if (value) { values[4] = value; kw_args--; }
6331 if (unlikely(kw_args > 0)) {
6332 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args,
"__cinit__") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
6335 switch (PyTuple_GET_SIZE(__pyx_args)) {
6336 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6338 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6340 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6341 values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6342 values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6344 default:
goto __pyx_L5_argtuple_error;
6347 __pyx_v_shape = ((PyObject*)values[0]);
6348 __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]);
if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)
6349 __pyx_v_format = values[2];
6350 __pyx_v_mode = values[3];
6352 __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]);
if (unlikely((__pyx_v_allocate_buffer == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L3_error)
6362 __pyx_v_allocate_buffer = ((int)1);
6365 goto __pyx_L4_argument_unpacking_done;
6366 __pyx_L5_argtuple_error:;
6367 __Pyx_RaiseArgtupleInvalid(
"__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 122, __pyx_L3_error)
6369 __Pyx_AddTraceback(
"View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6370 __Pyx_RefNannyFinishContext();
6372 __pyx_L4_argument_unpacking_done:;
6373 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1,
"shape", 1))) __PYX_ERR(0, 122, __pyx_L1_error)
6374 if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
6375 PyErr_Format(PyExc_TypeError,
"Argument '%.200s' must not be None",
"format"); __PYX_ERR(0, 122, __pyx_L1_error)
6377 __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((
struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
6392 __Pyx_RefNannyFinishContext();
6396 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(
struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode,
int __pyx_v_allocate_buffer) {
6398 Py_ssize_t __pyx_v_i;
6399 Py_ssize_t __pyx_v_dim;
6400 PyObject **__pyx_v_p;
6403 __Pyx_RefNannyDeclarations
6404 Py_ssize_t __pyx_t_1;
6406 PyObject *__pyx_t_3 = NULL;
6408 PyObject *__pyx_t_5 = NULL;
6409 PyObject *__pyx_t_6 = NULL;
6412 Py_ssize_t __pyx_t_9;
6413 PyObject *__pyx_t_10 = NULL;
6414 Py_ssize_t __pyx_t_11;
6415 int __pyx_lineno = 0;
6416 const char *__pyx_filename = NULL;
6417 int __pyx_clineno = 0;
6418 __Pyx_RefNannySetupContext(
"__cinit__", 0);
6419 __Pyx_INCREF(__pyx_v_format);
6428 if (unlikely(__pyx_v_shape == Py_None)) {
6429 PyErr_SetString(PyExc_TypeError,
"object of type 'NoneType' has no len()");
6430 __PYX_ERR(0, 129, __pyx_L1_error)
6432 __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape);
if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 129, __pyx_L1_error)
6433 __pyx_v_self->ndim = ((int)__pyx_t_1);
6442 __pyx_v_self->itemsize = __pyx_v_itemsize;
6451 __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
6452 if (unlikely(__pyx_t_2)) {
6461 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
6462 __Pyx_GOTREF(__pyx_t_3);
6463 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6464 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6465 __PYX_ERR(0, 133, __pyx_L1_error)
6483 __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
6484 if (unlikely(__pyx_t_2)) {
6493 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
6494 __Pyx_GOTREF(__pyx_t_3);
6495 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6496 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6497 __PYX_ERR(0, 136, __pyx_L1_error)
6515 __pyx_t_2 = PyBytes_Check(__pyx_v_format);
6516 __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);