proteus  1.8.1
C/C++/Fortran libraries
equivalent_polynomials.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.30 */
2 
3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
5 #endif /* PY_SSIZE_T_CLEAN */
6 #include "Python.h"
7 #ifndef Py_PYTHON_H
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+.
11 #else
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
15 #include <stddef.h>
16 #ifndef offsetof
17  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
18 #endif
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
20  #ifndef __stdcall
21  #define __stdcall
22  #endif
23  #ifndef __cdecl
24  #define __cdecl
25  #endif
26  #ifndef __fastcall
27  #define __fastcall
28  #endif
29 #endif
30 #ifndef DL_IMPORT
31  #define DL_IMPORT(t) t
32 #endif
33 #ifndef DL_EXPORT
34  #define DL_EXPORT(t) t
35 #endif
36 #define __PYX_COMMA ,
37 #ifndef HAVE_LONG_LONG
38  #if PY_VERSION_HEX >= 0x02070000
39  #define HAVE_LONG_LONG
40  #endif
41 #endif
42 #ifndef PY_LONG_LONG
43  #define PY_LONG_LONG LONG_LONG
44 #endif
45 #ifndef Py_HUGE_VAL
46  #define Py_HUGE_VAL HUGE_VAL
47 #endif
48 #ifdef PYPY_VERSION
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
61  #endif
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)
90  #endif
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
97  #endif
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
106  #endif
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
113  #endif
114  #ifndef CYTHON_ASSUME_SAFE_MACROS
115  #define CYTHON_ASSUME_SAFE_MACROS 1
116  #endif
117  #ifndef CYTHON_UNPACK_METHODS
118  #define CYTHON_UNPACK_METHODS 1
119  #endif
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
134  #endif
135 #else
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
141  #endif
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
147  #endif
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
153  #endif
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
159  #endif
160  #ifndef CYTHON_USE_PYLIST_INTERNALS
161  #define CYTHON_USE_PYLIST_INTERNALS 1
162  #endif
163  #ifndef CYTHON_USE_UNICODE_INTERNALS
164  #define CYTHON_USE_UNICODE_INTERNALS 1
165  #endif
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
171  #endif
172  #ifndef CYTHON_AVOID_BORROWED_REFS
173  #define CYTHON_AVOID_BORROWED_REFS 0
174  #endif
175  #ifndef CYTHON_ASSUME_SAFE_MACROS
176  #define CYTHON_ASSUME_SAFE_MACROS 1
177  #endif
178  #ifndef CYTHON_UNPACK_METHODS
179  #define CYTHON_UNPACK_METHODS 1
180  #endif
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
186  #endif
187  #ifndef CYTHON_FAST_PYCALL
188  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
189  #endif
190  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
192  #endif
193  #ifndef CYTHON_USE_TP_FINALIZE
194  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
195  #endif
196  #ifndef CYTHON_USE_DICT_VERSIONS
197  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
198  #endif
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)
204  #endif
205  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
207  #endif
208 #endif
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
211 #endif
212 #if CYTHON_USE_PYLONG_INTERNALS
213  #if PY_MAJOR_VERSION < 3
214  #include "longintrepr.h"
215  #endif
216  #undef SHIFT
217  #undef BASE
218  #undef MASK
219  #ifdef SIZEOF_VOID_P
220  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
221  #endif
222 #endif
223 #ifndef __has_attribute
224  #define __has_attribute(x) 0
225 #endif
226 #ifndef __has_cpp_attribute
227  #define __has_cpp_attribute(x) 0
228 #endif
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
236  #else
237  #define CYTHON_RESTRICT
238  #endif
239 #endif
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__))
244 # else
245 # define CYTHON_UNUSED
246 # endif
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
249 # else
250 # define CYTHON_UNUSED
251 # endif
252 #endif
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
256 # else
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
258 # endif
259 #endif
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
263 # else
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
265 # endif
266 #endif
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
268 #ifdef _MSC_VER
269  #ifndef _MSC_STDINT_H_
270  #if _MSC_VER < 1300
271  typedef unsigned char uint8_t;
272  typedef unsigned int uint32_t;
273  #else
274  typedef unsigned __int8 uint8_t;
275  typedef unsigned __int32 uint32_t;
276  #endif
277  #endif
278 #else
279  #include <stdint.h>
280 #endif
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]]
289  #endif
290  #endif
291  #ifndef CYTHON_FALLTHROUGH
292  #if __has_attribute(fallthrough)
293  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
294  #else
295  #define CYTHON_FALLTHROUGH
296  #endif
297  #endif
298  #if defined(__clang__ ) && defined(__apple_build_version__)
299  #if __apple_build_version__ < 7000000
300  #undef CYTHON_FALLTHROUGH
301  #define CYTHON_FALLTHROUGH
302  #endif
303  #endif
304 #endif
305 
306 #ifndef __cplusplus
307  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
308 #endif
309 #ifndef CYTHON_INLINE
310  #if defined(__clang__)
311  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
312  #else
313  #define CYTHON_INLINE inline
314  #endif
315 #endif
316 template<typename T>
317 void __Pyx_call_destructor(T& x) {
318  x.~T();
319 }
320 template<typename T>
321 class __Pyx_FakeReference {
322  public:
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; }
330  private:
331  T *ptr;
332 };
333 
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335  #define Py_OptimizeFlag 0
336 #endif
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
344 #else
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; // unfortunately __pyx_empty_tuple isn't available here
384  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
385  Py_XDECREF((PyObject*)co);
386  co = (PyCodeObject*)call_result;
387  call_result = NULL;
388  if (0) {
389  cleanup_code_too:
390  Py_XDECREF((PyObject*)co);
391  co = NULL;
392  }
393  end:
394  Py_XDECREF(kwds);
395  Py_XDECREF(argcount);
396  Py_XDECREF(posonlyargcount);
397  Py_XDECREF(kwonlyargcount);
398  Py_XDECREF(nlocals);
399  Py_XDECREF(stacksize);
400  Py_XDECREF(replace);
401  Py_XDECREF(call_result);
402  Py_XDECREF(empty);
403  if (type) {
404  PyErr_Restore(type, value, traceback);
405  }
406  return co;
407  }
408 #else
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)
411 #endif
412  #define __Pyx_DefaultClassType PyType_Type
413 #endif
414 #ifndef Py_TPFLAGS_CHECKTYPES
415  #define Py_TPFLAGS_CHECKTYPES 0
416 #endif
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418  #define Py_TPFLAGS_HAVE_INDEX 0
419 #endif
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
422 #endif
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424  #define Py_TPFLAGS_HAVE_FINALIZE 0
425 #endif
426 #ifndef METH_STACKLESS
427  #define METH_STACKLESS 0
428 #endif
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430  #ifndef METH_FASTCALL
431  #define METH_FASTCALL 0x80
432  #endif
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);
436 #else
437  #define __Pyx_PyCFunctionFast _PyCFunctionFast
438  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
439 #endif
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)))))
443 #else
444 #define __Pyx_PyFastCFunction_Check(func) 0
445 #endif
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)
450 #endif
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)
455 #endif
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)
459 #else
460  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
462 #endif
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()
469 #else
470  #define __Pyx_PyThreadState_Current _PyThreadState_Current
471 #endif
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();
478  return 0;
479 }
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;
483  return key;
484 }
485 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
486  PyObject_Free(key);
487 }
488 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
489  return *key != Py_tss_NEEDS_INIT;
490 }
491 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
492  PyThread_delete_key(*key);
493  *key = Py_tss_NEEDS_INIT;
494 }
495 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
496  return PyThread_set_key_value(*key, value);
497 }
498 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
499  return PyThread_get_key_value(*key);
500 }
501 #endif
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
504 #else
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
506 #endif
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)
510 #else
511  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
513 #endif
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)
516 #else
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
518 #endif
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)))
524  #else
525  #define __Pyx_PyUnicode_READY(op) (0)
526  #endif
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))
537  #else
538  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
539  #endif
540  #else
541  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
542  #endif
543 #else
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))
557 #endif
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)
561 #else
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))
565 #endif
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
568 #endif
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
571 #endif
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
574 #endif
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)
579 #else
580  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
581 #endif
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583  #define PyObject_ASCII(o) PyObject_Repr(o)
584 #endif
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
593 #endif
594 #endif
595 #if PY_MAJOR_VERSION >= 3
596  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
598 #else
599  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
601 #endif
602 #ifndef PySet_CheckExact
603  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
604 #endif
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)
608 #else
609  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
611 #endif
612 #if CYTHON_ASSUME_SAFE_MACROS
613  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
614 #else
615  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
616 #endif
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
633 #endif
634 #if PY_MAJOR_VERSION >= 3
635  #define PyBoolObject PyLongObject
636 #endif
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638  #ifndef PyUnicode_InternFromString
639  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
640  #endif
641 #endif
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
646 #else
647  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
649 #endif
650 #if PY_MAJOR_VERSION >= 3
651  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
652 #else
653  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
654 #endif
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)
659  #else
660  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
661  #endif
662 #else
663  #define __Pyx_PyType_AsAsync(obj) NULL
664 #endif
665 #ifndef __Pyx_PyAsyncMethodsStruct
666  typedef struct {
667  unaryfunc am_await;
668  unaryfunc am_aiter;
669  unaryfunc am_anext;
670  } __Pyx_PyAsyncMethodsStruct;
671 #endif
672 
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674  #if !defined(_USE_MATH_DEFINES)
675  #define _USE_MATH_DEFINES
676  #endif
677 #endif
678 #include <math.h>
679 #ifdef NAN
680 #define __PYX_NAN() ((float) NAN)
681 #else
682 static CYTHON_INLINE float __PYX_NAN() {
683  float value;
684  memset(&value, 0xFF, sizeof(value));
685  return value;
686 }
687 #endif
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
690 #else
691 #define __Pyx_truncl truncl
692 #endif
693 
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; }
698 
699 #ifndef __PYX_EXTERN_C
700  #ifdef __cplusplus
701  #define __PYX_EXTERN_C extern "C"
702  #else
703  #define __PYX_EXTERN_C extern
704  #endif
705 #endif
706 
707 #define __PYX_HAVE__equivalent_polynomials
708 #define __PYX_HAVE_API__equivalent_polynomials
709 /* Early includes */
710 #include "equivalent_polynomials.h"
711 #include <string.h>
712 #include <stdio.h>
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"
718 
719  /* NumPy API declarations from "numpy/__init__.pxd" */
720 
721 #include "pythread.h"
722 #include <stdlib.h>
723 #include "pystate.h"
724 #ifdef _OPENMP
725 #include <omp.h>
726 #endif /* _OPENMP */
727 
728 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
729 #define CYTHON_WITHOUT_ASSERTIONS
730 #endif
731 
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;
734 
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;
755 }
756 #if defined (__cplusplus) && __cplusplus >= 201103L
757  #include <cstdlib>
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)
769 #else
770  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
771 #endif
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
782 #else
783  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
784  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
785 #endif
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;
804  while (*u_end++) ;
805  return (size_t)(u_end - u - 1);
806 }
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))
823 #else
824 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
825 #endif
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))
829 #else
830 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
831 #endif
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) {
836  PyObject* sys;
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");
842  if (!sys) goto bad;
843  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
844  Py_DECREF(sys);
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;
850  } else {
851  char ascii_chars[128];
852  int c;
853  for (c = 0; c < 128; c++) {
854  ascii_chars[c] = c;
855  }
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) {
861  PyErr_Format(
862  PyExc_ValueError,
863  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
864  default_encoding_c);
865  goto bad;
866  }
867  Py_DECREF(ascii_chars_u);
868  Py_DECREF(ascii_chars_b);
869  }
870  Py_DECREF(default_encoding);
871  return 0;
872 bad:
873  Py_XDECREF(default_encoding);
874  Py_XDECREF(ascii_chars_u);
875  Py_XDECREF(ascii_chars_b);
876  return -1;
877 }
878 #endif
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)
881 #else
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) {
886  PyObject* sys;
887  PyObject* default_encoding = NULL;
888  char* default_encoding_c;
889  sys = PyImport_ImportModule("sys");
890  if (!sys) goto bad;
891  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
892  Py_DECREF(sys);
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);
900  return 0;
901 bad:
902  Py_XDECREF(default_encoding);
903  return -1;
904 }
905 #endif
906 #endif
907 
908 
909 /* Test for GCC > 2.95 */
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)
913 #else /* !__GNUC__ or GCC < 2.95 */
914  #define likely(x) (x)
915  #define unlikely(x) (x)
916 #endif /* __GNUC__ */
917 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
918 
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;
930 
931 /* Header.proto */
932 #if !defined(CYTHON_CCOMPLEX)
933  #if defined(__cplusplus)
934  #define CYTHON_CCOMPLEX 1
935  #elif defined(_Complex_I)
936  #define CYTHON_CCOMPLEX 1
937  #else
938  #define CYTHON_CCOMPLEX 0
939  #endif
940 #endif
941 #if CYTHON_CCOMPLEX
942  #ifdef __cplusplus
943  #include <complex>
944  #else
945  #include <complex.h>
946  #endif
947 #endif
948 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
949  #undef _Complex_I
950  #define _Complex_I 1.0fj
951 #endif
952 
953 
954 static const char *__pyx_f[] = {
955  "stringsource",
956  "proteus/equivalent_polynomials.pyx",
957  "__init__.pxd",
958  "type.pxd",
959 };
960 /* ForceInitThreads.proto */
961 #ifndef __PYX_FORCE_INIT_THREADS
962  #define __PYX_FORCE_INIT_THREADS 0
963 #endif
964 
965 /* NoFastGil.proto */
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()
971 
972 /* BufferFormatStructs.proto */
973 #define IS_UNSIGNED(type) (((type) -1) > 0)
974 struct __Pyx_StructField_;
975 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
976 typedef struct {
977  const char* name;
978  struct __Pyx_StructField_* fields;
979  size_t size;
980  size_t arraysize[8];
981  int ndim;
982  char typegroup;
983  char is_unsigned;
984  int flags;
985 } __Pyx_TypeInfo;
986 typedef struct __Pyx_StructField_ {
987  __Pyx_TypeInfo* type;
988  const char* name;
989  size_t offset;
990 } __Pyx_StructField;
991 typedef struct {
992  __Pyx_StructField* field;
993  size_t parent_offset;
994 } __Pyx_BufFmt_StackElem;
995 typedef struct {
996  __Pyx_StructField root;
997  __Pyx_BufFmt_StackElem* head;
998  size_t fmt_offset;
999  size_t new_count, enc_count;
1000  size_t struct_alignment;
1001  int is_complex;
1002  char enc_type;
1003  char new_packmode;
1004  char enc_packmode;
1005  char is_valid_array;
1006 } __Pyx_BufFmt_Context;
1007 
1008 /* Atomics.proto */
1009 #include <pythread.h>
1010 #ifndef CYTHON_ATOMICS
1011  #define CYTHON_ATOMICS 1
1012 #endif
1013 #define __pyx_atomic_int_type int
1014 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
1015  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
1016  !defined(__i386__)
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"
1021  #endif
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")
1030  #endif
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"
1036  #endif
1037 #else
1038  #undef CYTHON_ATOMICS
1039  #define CYTHON_ATOMICS 0
1040  #ifdef __PYX_DEBUG_ATOMICS
1041  #warning "Not using atomics"
1042  #endif
1043 #endif
1044 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1045 #if CYTHON_ATOMICS
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)
1050 #else
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)
1055 #endif
1056 
1057 /* MemviewSliceStruct.proto */
1058 struct __pyx_memoryview_obj;
1059 typedef struct {
1060  struct __pyx_memoryview_obj *memview;
1061  char *data;
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])
1067 
1068 
1069 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
1070  * # in Cython to enable them only on the right systems.
1071  *
1072  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1073  * ctypedef npy_int16 int16_t
1074  * ctypedef npy_int32 int32_t
1075  */
1076 typedef npy_int8 __pyx_t_5numpy_int8_t;
1077 
1078 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
1079  *
1080  * ctypedef npy_int8 int8_t
1081  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1082  * ctypedef npy_int32 int32_t
1083  * ctypedef npy_int64 int64_t
1084  */
1085 typedef npy_int16 __pyx_t_5numpy_int16_t;
1086 
1087 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
1088  * ctypedef npy_int8 int8_t
1089  * ctypedef npy_int16 int16_t
1090  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1091  * ctypedef npy_int64 int64_t
1092  * #ctypedef npy_int96 int96_t
1093  */
1094 typedef npy_int32 __pyx_t_5numpy_int32_t;
1095 
1096 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
1097  * ctypedef npy_int16 int16_t
1098  * ctypedef npy_int32 int32_t
1099  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1100  * #ctypedef npy_int96 int96_t
1101  * #ctypedef npy_int128 int128_t
1102  */
1103 typedef npy_int64 __pyx_t_5numpy_int64_t;
1104 
1105 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
1106  * #ctypedef npy_int128 int128_t
1107  *
1108  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1109  * ctypedef npy_uint16 uint16_t
1110  * ctypedef npy_uint32 uint32_t
1111  */
1112 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1113 
1114 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
1115  *
1116  * ctypedef npy_uint8 uint8_t
1117  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1118  * ctypedef npy_uint32 uint32_t
1119  * ctypedef npy_uint64 uint64_t
1120  */
1121 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1122 
1123 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
1124  * ctypedef npy_uint8 uint8_t
1125  * ctypedef npy_uint16 uint16_t
1126  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1127  * ctypedef npy_uint64 uint64_t
1128  * #ctypedef npy_uint96 uint96_t
1129  */
1130 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1131 
1132 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1133  * ctypedef npy_uint16 uint16_t
1134  * ctypedef npy_uint32 uint32_t
1135  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1136  * #ctypedef npy_uint96 uint96_t
1137  * #ctypedef npy_uint128 uint128_t
1138  */
1139 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1140 
1141 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1142  * #ctypedef npy_uint128 uint128_t
1143  *
1144  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1145  * ctypedef npy_float64 float64_t
1146  * #ctypedef npy_float80 float80_t
1147  */
1148 typedef npy_float32 __pyx_t_5numpy_float32_t;
1149 
1150 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1151  *
1152  * ctypedef npy_float32 float32_t
1153  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1154  * #ctypedef npy_float80 float80_t
1155  * #ctypedef npy_float128 float128_t
1156  */
1157 typedef npy_float64 __pyx_t_5numpy_float64_t;
1158 
1159 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1160  * # The int types are mapped a bit surprising --
1161  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1162  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1163  * ctypedef npy_longlong long_t
1164  * ctypedef npy_longlong longlong_t
1165  */
1166 typedef npy_long __pyx_t_5numpy_int_t;
1167 
1168 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1169  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1170  * ctypedef npy_long int_t
1171  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1172  * ctypedef npy_longlong longlong_t
1173  *
1174  */
1175 typedef npy_longlong __pyx_t_5numpy_long_t;
1176 
1177 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1178  * ctypedef npy_long int_t
1179  * ctypedef npy_longlong long_t
1180  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1181  *
1182  * ctypedef npy_ulong uint_t
1183  */
1184 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1185 
1186 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1187  * ctypedef npy_longlong longlong_t
1188  *
1189  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1190  * ctypedef npy_ulonglong ulong_t
1191  * ctypedef npy_ulonglong ulonglong_t
1192  */
1193 typedef npy_ulong __pyx_t_5numpy_uint_t;
1194 
1195 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1196  *
1197  * ctypedef npy_ulong uint_t
1198  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1199  * ctypedef npy_ulonglong ulonglong_t
1200  *
1201  */
1202 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1203 
1204 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1205  * ctypedef npy_ulong uint_t
1206  * ctypedef npy_ulonglong ulong_t
1207  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1208  *
1209  * ctypedef npy_intp intp_t
1210  */
1211 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1212 
1213 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1214  * ctypedef npy_ulonglong ulonglong_t
1215  *
1216  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1217  * ctypedef npy_uintp uintp_t
1218  *
1219  */
1220 typedef npy_intp __pyx_t_5numpy_intp_t;
1221 
1222 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1223  *
1224  * ctypedef npy_intp intp_t
1225  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1226  *
1227  * ctypedef npy_double float_t
1228  */
1229 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1230 
1231 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1232  * ctypedef npy_uintp uintp_t
1233  *
1234  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1235  * ctypedef npy_double double_t
1236  * ctypedef npy_longdouble longdouble_t
1237  */
1238 typedef npy_double __pyx_t_5numpy_float_t;
1239 
1240 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1241  *
1242  * ctypedef npy_double float_t
1243  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1244  * ctypedef npy_longdouble longdouble_t
1245  *
1246  */
1247 typedef npy_double __pyx_t_5numpy_double_t;
1248 
1249 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1250  * ctypedef npy_double float_t
1251  * ctypedef npy_double double_t
1252  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1253  *
1254  * ctypedef npy_cfloat cfloat_t
1255  */
1256 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1257 /* Declarations.proto */
1258 #if CYTHON_CCOMPLEX
1259  #ifdef __cplusplus
1260  typedef ::std::complex< float > __pyx_t_float_complex;
1261  #else
1262  typedef float _Complex __pyx_t_float_complex;
1263  #endif
1264 #else
1265  typedef struct { float real, imag; } __pyx_t_float_complex;
1266 #endif
1267 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1268 
1269 /* Declarations.proto */
1270 #if CYTHON_CCOMPLEX
1271  #ifdef __cplusplus
1272  typedef ::std::complex< double > __pyx_t_double_complex;
1273  #else
1274  typedef double _Complex __pyx_t_double_complex;
1275  #endif
1276 #else
1277  typedef struct { double real, imag; } __pyx_t_double_complex;
1278 #endif
1279 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1280 
1281 
1282 /*--- Type declarations ---*/
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;
1288 
1289 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1290  * ctypedef npy_longdouble longdouble_t
1291  *
1292  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1293  * ctypedef npy_cdouble cdouble_t
1294  * ctypedef npy_clongdouble clongdouble_t
1295  */
1296 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1297 
1298 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1299  *
1300  * ctypedef npy_cfloat cfloat_t
1301  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1302  * ctypedef npy_clongdouble clongdouble_t
1303  *
1304  */
1305 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1306 
1307 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1308  * ctypedef npy_cfloat cfloat_t
1309  * ctypedef npy_cdouble cdouble_t
1310  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1311  *
1312  * ctypedef npy_cdouble complex_t
1313  */
1314 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1315 
1316 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1317  * ctypedef npy_clongdouble clongdouble_t
1318  *
1319  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1320  *
1321  * cdef inline object PyArray_MultiIterNew1(a):
1322  */
1323 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1324 
1325 /* "equivalent_polynomials.pyx":22
1326  *
1327  *
1328  * cdef class Simplex: # <<<<<<<<<<<<<<
1329  * cdef np.ndarray xiBuffer
1330  * cdef int nSpace
1331  */
1332 struct __pyx_obj_22equivalent_polynomials_Simplex {
1333  PyObject_HEAD
1334  PyArrayObject *xiBuffer;
1335  int nSpace;
1336  int nP;
1337  int nQ;
1338  int nEBQ;
1339  int q;
1340  bool inside_out;
1341  PyArrayObject *_H;
1342  PyArrayObject *_ImH;
1343  PyArrayObject *_D;
1353 };
1354 
1355 
1356 /* "View.MemoryView":105
1357  *
1358  * @cname("__pyx_array")
1359  * cdef class array: # <<<<<<<<<<<<<<
1360  *
1361  * cdef:
1362  */
1363 struct __pyx_array_obj {
1364  PyObject_HEAD
1365  struct __pyx_vtabstruct_array *__pyx_vtab;
1366  char *data;
1367  Py_ssize_t len;
1368  char *format;
1369  int ndim;
1370  Py_ssize_t *_shape;
1371  Py_ssize_t *_strides;
1372  Py_ssize_t itemsize;
1373  PyObject *mode;
1374  PyObject *_format;
1375  void (*callback_free_data)(void *);
1376  int free_data;
1377  int dtype_is_object;
1378 };
1379 
1380 
1381 /* "View.MemoryView":279
1382  *
1383  * @cname('__pyx_MemviewEnum')
1384  * cdef class Enum(object): # <<<<<<<<<<<<<<
1385  * cdef object name
1386  * def __init__(self, name):
1387  */
1388 struct __pyx_MemviewEnum_obj {
1389  PyObject_HEAD
1390  PyObject *name;
1391 };
1392 
1393 
1394 /* "View.MemoryView":330
1395  *
1396  * @cname('__pyx_memoryview')
1397  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1398  *
1399  * cdef object obj
1400  */
1401 struct __pyx_memoryview_obj {
1402  PyObject_HEAD
1403  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1404  PyObject *obj;
1405  PyObject *_size;
1406  PyObject *_array_interface;
1407  PyThread_type_lock lock;
1408  __pyx_atomic_int acquisition_count[2];
1409  __pyx_atomic_int *acquisition_count_aligned_p;
1410  Py_buffer view;
1411  int flags;
1412  int dtype_is_object;
1413  __Pyx_TypeInfo *typeinfo;
1414 };
1415 
1416 
1417 /* "View.MemoryView":965
1418  *
1419  * @cname('__pyx_memoryviewslice')
1420  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1421  * "Internal class for passing memoryview slices to Python"
1422  *
1423  */
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 *);
1430 };
1431 
1432 
1433 
1434 /* "View.MemoryView":105
1435  *
1436  * @cname("__pyx_array")
1437  * cdef class array: # <<<<<<<<<<<<<<
1438  *
1439  * cdef:
1440  */
1441 
1442 struct __pyx_vtabstruct_array {
1443  PyObject *(*get_memview)(struct __pyx_array_obj *);
1444 };
1445 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1446 
1447 
1448 /* "View.MemoryView":330
1449  *
1450  * @cname('__pyx_memoryview')
1451  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1452  *
1453  * cdef object obj
1454  */
1455 
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 *);
1464 };
1465 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1466 
1467 
1468 /* "View.MemoryView":965
1469  *
1470  * @cname('__pyx_memoryviewslice')
1471  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1472  * "Internal class for passing memoryview slices to Python"
1473  *
1474  */
1475 
1476 struct __pyx_vtabstruct__memoryviewslice {
1477  struct __pyx_vtabstruct_memoryview __pyx_base;
1478 };
1479 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1480 
1481 /* --- Runtime support code (head) --- */
1482 /* Refnanny.proto */
1483 #ifndef CYTHON_REFNANNY
1484  #define CYTHON_REFNANNY 0
1485 #endif
1486 #if CYTHON_REFNANNY
1487  typedef struct {
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;
1498 #ifdef WITH_THREAD
1499  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1500  if (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);\
1504  } else {\
1505  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1506  }
1507 #else
1508  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1509  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1510 #endif
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)
1521 #else
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)
1533 #endif
1534 #define __Pyx_XDECREF_SET(r, v) do {\
1535  PyObject *tmp = (PyObject *) r;\
1536  r = v; __Pyx_XDECREF(tmp);\
1537  } while (0)
1538 #define __Pyx_DECREF_SET(r, v) do {\
1539  PyObject *tmp = (PyObject *) r;\
1540  r = v; __Pyx_DECREF(tmp);\
1541  } while (0)
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)
1544 
1545 /* PyObjectGetAttrStr.proto */
1546 #if CYTHON_USE_TYPE_SLOTS
1547 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1548 #else
1549 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1550 #endif
1551 
1552 /* GetBuiltinName.proto */
1553 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1554 
1555 /* RaiseArgTupleInvalid.proto */
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);
1558 
1559 /* RaiseDoubleKeywords.proto */
1560 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1561 
1562 /* ParseKeywords.proto */
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);
1566 
1567 /* PyDictVersioning.proto */
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;\
1579  } else {\
1580  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1581  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1582  }\
1583 }
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);
1587 #else
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);
1591 #endif
1592 
1593 /* GetModuleGlobalName.proto */
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);\
1601 }
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);\
1606 }
1607 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1608 #else
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);
1612 #endif
1613 
1614 /* PyObjectCall.proto */
1615 #if CYTHON_COMPILING_IN_CPYTHON
1616 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1617 #else
1618 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1619 #endif
1620 
1621 /* ExtTypeTest.proto */
1622 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1623 
1624 /* ArgTypeTest.proto */
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);
1629 
1630 /* SliceObject.proto */
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);
1637 
1638 /* PyCFunctionFastCall.proto */
1639 #if CYTHON_FAST_PYCCALL
1640 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1641 #else
1642 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1643 #endif
1644 
1645 /* PyFunctionFastCall.proto */
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);
1651 #else
1652 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1653 #endif
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)
1658 #endif
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
1665  #endif
1666  #include "internal/pycore_frame.h"
1667 #endif
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
1674 #endif
1675 
1676 /* PyObjectCall2Args.proto */
1677 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1678 
1679 /* PyObjectCallMethO.proto */
1680 #if CYTHON_COMPILING_IN_CPYTHON
1681 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1682 #endif
1683 
1684 /* PyObjectCallOneArg.proto */
1685 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1686 
1687 /* GetItemInt.proto */
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);
1708 
1709 /* PyThreadStateGet.proto */
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
1714 #else
1715 #define __Pyx_PyThreadState_declare
1716 #define __Pyx_PyThreadState_assign
1717 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1718 #endif
1719 
1720 /* PyErrFetchRestore.proto */
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))
1731 #else
1732 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1733 #endif
1734 #else
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)
1743 #endif
1744 
1745 /* RaiseException.proto */
1746 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1747 
1748 /* GetTopmostException.proto */
1749 #if CYTHON_USE_EXC_INFO_STACK
1750 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1751 #endif
1752 
1753 /* SaveResetException.proto */
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);
1759 #else
1760 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1761 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1762 #endif
1763 
1764 /* PyErrExceptionMatches.proto */
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);
1768 #else
1769 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1770 #endif
1771 
1772 /* GetException.proto */
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);
1776 #else
1777 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1778 #endif
1779 
1780 /* IncludeStringH.proto */
1781 #include <string.h>
1782 
1783 /* BytesEquals.proto */
1784 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1785 
1786 /* UnicodeEquals.proto */
1787 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1788 
1789 /* StrEquals.proto */
1790 #if PY_MAJOR_VERSION >= 3
1791 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1792 #else
1793 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1794 #endif
1795 
1796 /* DivInt[Py_ssize_t].proto */
1797 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
1798 
1799 /* UnaryNegOverflows.proto */
1800 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1801  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1802 
1803 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1804 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
1805 /* GetAttr.proto */
1806 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1807 
1808 /* ObjectGetItem.proto */
1809 #if CYTHON_USE_TYPE_SLOTS
1810 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1811 #else
1812 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1813 #endif
1814 
1815 /* decode_c_string_utf16.proto */
1816 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1817  int byteorder = 0;
1818  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1819 }
1820 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1821  int byteorder = -1;
1822  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1823 }
1824 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1825  int byteorder = 1;
1826  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1827 }
1828 
1829 /* decode_c_string.proto */
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));
1834 
1835 /* GetAttr3.proto */
1836 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1837 
1838 /* RaiseTooManyValuesToUnpack.proto */
1839 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1840 
1841 /* RaiseNeedMoreValuesToUnpack.proto */
1842 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1843 
1844 /* RaiseNoneIterError.proto */
1845 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1846 
1847 /* SwapException.proto */
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);
1851 #else
1852 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1853 #endif
1854 
1855 /* Import.proto */
1856 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1857 
1858 /* FastTypeChecks.proto */
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);
1864 #else
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))
1868 #endif
1869 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1870 
1871 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1872 /* ListCompAppend.proto */
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)) {
1878  Py_INCREF(x);
1879  PyList_SET_ITEM(list, len, x);
1880  __Pyx_SET_SIZE(list, len + 1);
1881  return 0;
1882  }
1883  return PyList_Append(list, x);
1884 }
1885 #else
1886 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1887 #endif
1888 
1889 /* PyIntBinop.proto */
1890 #if !CYTHON_COMPILING_IN_PYPY
1891 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1892 #else
1893 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1894  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1895 #endif
1896 
1897 /* ListExtend.proto */
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))
1902  return -1;
1903  Py_DECREF(none);
1904  return 0;
1905 #else
1906  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
1907 #endif
1908 }
1909 
1910 /* ListAppend.proto */
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))) {
1916  Py_INCREF(x);
1917  PyList_SET_ITEM(list, len, x);
1918  __Pyx_SET_SIZE(list, len + 1);
1919  return 0;
1920  }
1921  return PyList_Append(list, x);
1922 }
1923 #else
1924 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1925 #endif
1926 
1927 /* None.proto */
1928 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
1929 
1930 /* DivInt[long].proto */
1931 static CYTHON_INLINE long __Pyx_div_long(long, long);
1932 
1933 /* PySequenceContains.proto */
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));
1937 }
1938 
1939 /* ImportFrom.proto */
1940 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1941 
1942 /* HasAttr.proto */
1943 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
1944 
1945 /* StringJoin.proto */
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))
1949 #else
1950 #define __Pyx_PyString_Join PyUnicode_Join
1951 #define __Pyx_PyBaseString_Join PyUnicode_Join
1952 #endif
1953 #if CYTHON_COMPILING_IN_CPYTHON
1954  #if PY_MAJOR_VERSION < 3
1955  #define __Pyx_PyBytes_Join _PyString_Join
1956  #else
1957  #define __Pyx_PyBytes_Join _PyBytes_Join
1958  #endif
1959 #else
1960 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
1961 #endif
1962 
1963 /* PyObject_Unicode.proto */
1964 #if PY_MAJOR_VERSION >= 3
1965 #define __Pyx_PyObject_Unicode(obj)\
1966  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1967 #else
1968 #define __Pyx_PyObject_Unicode(obj)\
1969  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1970 #endif
1971 
1972 /* PyObject_GenericGetAttrNoDict.proto */
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);
1975 #else
1976 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1977 #endif
1978 
1979 /* PyObject_GenericGetAttr.proto */
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);
1982 #else
1983 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1984 #endif
1985 
1986 /* PyObjectGetAttrStrNoError.proto */
1987 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1988 
1989 /* SetupReduce.proto */
1990 static int __Pyx_setup_reduce(PyObject* type_obj);
1991 
1992 /* SetVTable.proto */
1993 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1994 
1995 /* TypeImport.proto */
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
2002 };
2003 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2004 #endif
2005 
2006 /* CLineInTraceback.proto */
2007 #ifdef CYTHON_CLINE_IN_TRACEBACK
2008 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2009 #else
2010 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2011 #endif
2012 
2013 /* CodeObjectCache.proto */
2014 typedef struct {
2015  PyCodeObject* code_object;
2016  int code_line;
2017 } __Pyx_CodeObjectCacheEntry;
2018 struct __Pyx_CodeObjectCache {
2019  int count;
2020  int max_count;
2021  __Pyx_CodeObjectCacheEntry* entries;
2022 };
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);
2027 
2028 /* AddTraceback.proto */
2029 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2030  int py_line, const char *filename);
2031 
2032 /* None.proto */
2033 #include <new>
2034 
2035 /* GCCDiagnostics.proto */
2036 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2037 #define __Pyx_HAS_GCC_DIAGNOSTIC
2038 #endif
2039 
2040 /* MemviewDtypeToObject.proto */
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);
2043 
2044 /* RealImag.proto */
2045 #if CYTHON_CCOMPLEX
2046  #ifdef __cplusplus
2047  #define __Pyx_CREAL(z) ((z).real())
2048  #define __Pyx_CIMAG(z) ((z).imag())
2049  #else
2050  #define __Pyx_CREAL(z) (__real__(z))
2051  #define __Pyx_CIMAG(z) (__imag__(z))
2052  #endif
2053 #else
2054  #define __Pyx_CREAL(z) ((z).real)
2055  #define __Pyx_CIMAG(z) ((z).imag)
2056 #endif
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))
2061 #else
2062  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2063  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2064 #endif
2065 
2066 /* Arithmetic.proto */
2067 #if CYTHON_CCOMPLEX
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))
2074  #ifdef __cplusplus
2075  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2076  #define __Pyx_c_conj_float(z) (::std::conj(z))
2077  #if 1
2078  #define __Pyx_c_abs_float(z) (::std::abs(z))
2079  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2080  #endif
2081  #else
2082  #define __Pyx_c_is_zero_float(z) ((z)==0)
2083  #define __Pyx_c_conj_float(z) (conjf(z))
2084  #if 1
2085  #define __Pyx_c_abs_float(z) (cabsf(z))
2086  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2087  #endif
2088  #endif
2089 #else
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);
2098  #if 1
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);
2101  #endif
2102 #endif
2103 
2104 /* Arithmetic.proto */
2105 #if CYTHON_CCOMPLEX
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))
2112  #ifdef __cplusplus
2113  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2114  #define __Pyx_c_conj_double(z) (::std::conj(z))
2115  #if 1
2116  #define __Pyx_c_abs_double(z) (::std::abs(z))
2117  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2118  #endif
2119  #else
2120  #define __Pyx_c_is_zero_double(z) ((z)==0)
2121  #define __Pyx_c_conj_double(z) (conj(z))
2122  #if 1
2123  #define __Pyx_c_abs_double(z) (cabs(z))
2124  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2125  #endif
2126  #endif
2127 #else
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);
2136  #if 1
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);
2139  #endif
2140 #endif
2141 
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);
2145 #else
2146  #define __Pyx_GetBuffer PyObject_GetBuffer
2147  #define __Pyx_ReleaseBuffer PyBuffer_Release
2148 #endif
2149 
2150 
2151 /* BufferStructDeclare.proto */
2152 typedef struct {
2153  Py_ssize_t shape, strides, suboffsets;
2154 } __Pyx_Buf_DimInfo;
2155 typedef struct {
2156  size_t refcount;
2157  Py_buffer pybuffer;
2158 } __Pyx_Buffer;
2159 typedef struct {
2160  __Pyx_Buffer *rcbuffer;
2161  char *data;
2162  __Pyx_Buf_DimInfo diminfo[8];
2163 } __Pyx_LocalBuf_ND;
2164 
2165 /* MemviewSliceIsContig.proto */
2166 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2167 
2168 /* OverlappingSlices.proto */
2169 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2170  __Pyx_memviewslice *slice2,
2171  int ndim, size_t itemsize);
2172 
2173 /* Capsule.proto */
2174 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2175 
2176 /* CIntFromPy.proto */
2177 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2178 
2179 /* CIntToPy.proto */
2180 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2181 
2182 /* TypeInfoToFormat.proto */
2183 struct __pyx_typeinfo_string {
2184  char string[3];
2185 };
2186 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2187 
2188 /* MemviewSliceCopyTemplate.proto */
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);
2194 
2195 /* MemviewSliceInit.proto */
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,
2207  int ndim,
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);
2220 
2221 /* CIntFromPy.proto */
2222 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2223 
2224 /* CIntToPy.proto */
2225 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2226 
2227 /* CIntFromPy.proto */
2228 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2229 
2230 /* CheckBinaryVersion.proto */
2231 static int __Pyx_check_binary_version(void);
2232 
2233 /* InitStrings.proto */
2234 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2235 
2236 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2237 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2238 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2239 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
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); /* proto*/
2241 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2242 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2243 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2244 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2245 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2246 
2247 /* Module declarations from 'libcpp' */
2248 
2249 /* Module declarations from 'cpython.buffer' */
2250 
2251 /* Module declarations from 'libc.string' */
2252 
2253 /* Module declarations from 'libc.stdio' */
2254 
2255 /* Module declarations from '__builtin__' */
2256 
2257 /* Module declarations from 'cpython.type' */
2258 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2259 
2260 /* Module declarations from 'cpython' */
2261 
2262 /* Module declarations from 'cpython.object' */
2263 
2264 /* Module declarations from 'cpython.ref' */
2265 
2266 /* Module declarations from 'cpython.mem' */
2267 
2268 /* Module declarations from 'numpy' */
2269 
2270 /* Module declarations from 'numpy' */
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;
2286 
2287 /* Module declarations from 'equivalent_polynomials' */
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 *); /*proto*/
2301 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2302 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2303 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2304 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2305 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2306 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
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); /*proto*/
2308 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2309 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2310 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2311 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2312 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2313 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2314 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2315 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2316 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2317 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2318 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2319 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2320 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2321 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2322 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2323 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2324 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2325 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2326 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2327 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2328 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2329 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2330 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2331 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2332 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2333 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/
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;
2338 
2339 /* Implementation of 'equivalent_polynomials' */
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); /* proto */
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); /* proto */
2567 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_4set_quad(struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self, int __pyx_v_q); /* proto */
2568 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_1H___get__(struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self); /* proto */
2569 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_3ImH___get__(struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self); /* proto */
2570 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_1D___get__(struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self); /* proto */
2571 static PyObject *__pyx_pf_22equivalent_polynomials_7Simplex_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_22equivalent_polynomials_Simplex *__pyx_v_self); /* proto */
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); /* proto */
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); /* proto */
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); /* proto */
2575 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2576 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2577 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2578 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
2579 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
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); /* proto */
2581 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
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); /* proto */
2583 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
2584 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2585 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2586 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
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); /* proto */
2588 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2589 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
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); /* proto */
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); /* proto */
2592 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2593 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2594 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2595 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2596 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2597 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2598 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2599 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2600 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2601 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2602 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2603 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2604 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2605 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2606 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2607 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2608 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
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); /* proto */
2610 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2611 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2612 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
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); /* proto */
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); /* proto */
2615 static PyObject *__pyx_tp_new_22equivalent_polynomials_Simplex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2616 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2617 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2618 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2619 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
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;
2670 /* Late includes */
2671 
2672 /* "equivalent_polynomials.pyx":43
2673  * cdef eqp.cSimplex[nSpace3T,nP2T,nQT,nEBQT] s32
2674  * cdef eqp.cSimplex[nSpace3T,nP3T,nQT,nEBQT] s33
2675  * def __cinit__(self, nSpace, nP, nQ): # <<<<<<<<<<<<<<
2676  * self.xiBuffer=np.zeros((50,3),'d')
2677  * self.nSpace = nSpace
2678  */
2679 
2680 /* Python wrapper */
2681 static int __pyx_pw_22equivalent_polynomials_7Simplex_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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;
2689  int __pyx_r;
2690  __Pyx_RefNannyDeclarations
2691  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2692  {
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)) {
2696  Py_ssize_t kw_args;
2697  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2698  switch (pos_args) {
2699  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2700  CYTHON_FALLTHROUGH;
2701  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2702  CYTHON_FALLTHROUGH;
2703  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2704  CYTHON_FALLTHROUGH;
2705  case 0: break;
2706  default: goto __pyx_L5_argtuple_error;
2707  }
2708  kw_args = PyDict_Size(__pyx_kwds);
2709  switch (pos_args) {
2710  case 0:
2711  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
2712  else goto __pyx_L5_argtuple_error;
2713  CYTHON_FALLTHROUGH;
2714  case 1:
2715  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nP)) != 0)) kw_args--;
2716  else {
2717  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(1, 43, __pyx_L3_error)
2718  }
2719  CYTHON_FALLTHROUGH;
2720  case 2:
2721  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQ)) != 0)) kw_args--;
2722  else {
2723  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(1, 43, __pyx_L3_error)
2724  }
2725  }
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)
2728  }
2729  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
2730  goto __pyx_L5_argtuple_error;
2731  } else {
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);
2735  }
2736  __pyx_v_nSpace = values[0];
2737  __pyx_v_nP = values[1];
2738  __pyx_v_nQ = values[2];
2739  }
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)
2743  __pyx_L3_error:;
2744  __Pyx_AddTraceback("equivalent_polynomials.Simplex.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2745  __Pyx_RefNannyFinishContext();
2746  return -1;
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);
2749 
2750  /* function exit code */
2751  __Pyx_RefNannyFinishContext();
2752  return __pyx_r;
2753 }
2754 
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) {
2756  int __pyx_r;
2757  __Pyx_RefNannyDeclarations
2758  PyObject *__pyx_t_1 = NULL;
2759  PyObject *__pyx_t_2 = NULL;
2760  int __pyx_t_3;
2761  int __pyx_lineno = 0;
2762  const char *__pyx_filename = NULL;
2763  int __pyx_clineno = 0;
2764  __Pyx_RefNannySetupContext("__cinit__", 0);
2765 
2766  /* "equivalent_polynomials.pyx":44
2767  * cdef eqp.cSimplex[nSpace3T,nP3T,nQT,nEBQT] s33
2768  * def __cinit__(self, nSpace, nP, nQ):
2769  * self.xiBuffer=np.zeros((50,3),'d') # <<<<<<<<<<<<<<
2770  * self.nSpace = nSpace
2771  * self.nP = nP
2772  */
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);
2786  __pyx_t_1 = 0;
2787 
2788  /* "equivalent_polynomials.pyx":45
2789  * def __cinit__(self, nSpace, nP, nQ):
2790  * self.xiBuffer=np.zeros((50,3),'d')
2791  * self.nSpace = nSpace # <<<<<<<<<<<<<<
2792  * self.nP = nP
2793  * self.nQ=nQ
2794  */
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;
2797 
2798  /* "equivalent_polynomials.pyx":46
2799  * self.xiBuffer=np.zeros((50,3),'d')
2800  * self.nSpace = nSpace
2801  * self.nP = nP # <<<<<<<<<<<<<<
2802  * self.nQ=nQ
2803  * self.nEBQ=nQ#cek hack
2804  */
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;
2807 
2808  /* "equivalent_polynomials.pyx":47
2809  * self.nSpace = nSpace
2810  * self.nP = nP
2811  * self.nQ=nQ # <<<<<<<<<<<<<<
2812  * self.nEBQ=nQ#cek hack
2813  * self.q=0
2814  */
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;
2817 
2818  /* "equivalent_polynomials.pyx":48
2819  * self.nP = nP
2820  * self.nQ=nQ
2821  * self.nEBQ=nQ#cek hack # <<<<<<<<<<<<<<
2822  * self.q=0
2823  * def calculate(self, np.ndarray phi_dof, np.ndarray phi_nodes, np.ndarray xi):
2824  */
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;
2827 
2828  /* "equivalent_polynomials.pyx":49
2829  * self.nQ=nQ
2830  * self.nEBQ=nQ#cek hack
2831  * self.q=0 # <<<<<<<<<<<<<<
2832  * def calculate(self, np.ndarray phi_dof, np.ndarray phi_nodes, np.ndarray xi):
2833  * self.xiBuffer[:xi.shape[0]]=xi
2834  */
2835  __pyx_v_self->q = 0;
2836 
2837  /* "equivalent_polynomials.pyx":43
2838  * cdef eqp.cSimplex[nSpace3T,nP2T,nQT,nEBQT] s32
2839  * cdef eqp.cSimplex[nSpace3T,nP3T,nQT,nEBQT] s33
2840  * def __cinit__(self, nSpace, nP, nQ): # <<<<<<<<<<<<<<
2841  * self.xiBuffer=np.zeros((50,3),'d')
2842  * self.nSpace = nSpace
2843  */
2844 
2845  /* function exit code */
2846  __pyx_r = 0;
2847  goto __pyx_L0;
2848  __pyx_L1_error:;
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);
2852  __pyx_r = -1;
2853  __pyx_L0:;
2854  __Pyx_RefNannyFinishContext();
2855  return __pyx_r;
2856 }
2857 
2858 /* "equivalent_polynomials.pyx":50
2859  * self.nEBQ=nQ#cek hack
2860  * self.q=0
2861  * def calculate(self, np.ndarray phi_dof, np.ndarray phi_nodes, np.ndarray xi): # <<<<<<<<<<<<<<
2862  * self.xiBuffer[:xi.shape[0]]=xi
2863  * if (self.nSpace,self.nP) == (1,1):
2864  */
2865 
2866 /* Python wrapper */
2867 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_3calculate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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);
2878  {
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)) {
2882  Py_ssize_t kw_args;
2883  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2884  switch (pos_args) {
2885  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2886  CYTHON_FALLTHROUGH;
2887  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2888  CYTHON_FALLTHROUGH;
2889  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2890  CYTHON_FALLTHROUGH;
2891  case 0: break;
2892  default: goto __pyx_L5_argtuple_error;
2893  }
2894  kw_args = PyDict_Size(__pyx_kwds);
2895  switch (pos_args) {
2896  case 0:
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;
2899  CYTHON_FALLTHROUGH;
2900  case 1:
2901  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phi_nodes)) != 0)) kw_args--;
2902  else {
2903  __Pyx_RaiseArgtupleInvalid("calculate", 1, 3, 3, 1); __PYX_ERR(1, 50, __pyx_L3_error)
2904  }
2905  CYTHON_FALLTHROUGH;
2906  case 2:
2907  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xi)) != 0)) kw_args--;
2908  else {
2909  __Pyx_RaiseArgtupleInvalid("calculate", 1, 3, 3, 2); __PYX_ERR(1, 50, __pyx_L3_error)
2910  }
2911  }
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)
2914  }
2915  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
2916  goto __pyx_L5_argtuple_error;
2917  } else {
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);
2921  }
2922  __pyx_v_phi_dof = ((PyArrayObject *)values[0]);
2923  __pyx_v_phi_nodes = ((PyArrayObject *)values[1]);
2924  __pyx_v_xi = ((PyArrayObject *)values[2]);
2925  }
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)
2929  __pyx_L3_error:;
2930  __Pyx_AddTraceback("equivalent_polynomials.Simplex.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
2931  __Pyx_RefNannyFinishContext();
2932  return NULL;
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);
2938 
2939  /* function exit code */
2940  goto __pyx_L0;
2941  __pyx_L1_error:;
2942  __pyx_r = NULL;
2943  __pyx_L0:;
2944  __Pyx_RefNannyFinishContext();
2945  return __pyx_r;
2946 }
2947 
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;
2955  int __pyx_t_4;
2956  double *__pyx_t_5;
2957  struct __pyx_array_obj *__pyx_t_6 = NULL;
2958  PyObject *__pyx_t_7 = NULL;
2959  bool __pyx_t_8;
2960  int __pyx_lineno = 0;
2961  const char *__pyx_filename = NULL;
2962  int __pyx_clineno = 0;
2963  __Pyx_RefNannySetupContext("calculate", 0);
2964 
2965  /* "equivalent_polynomials.pyx":51
2966  * self.q=0
2967  * def calculate(self, np.ndarray phi_dof, np.ndarray phi_nodes, np.ndarray xi):
2968  * self.xiBuffer[:xi.shape[0]]=xi # <<<<<<<<<<<<<<
2969  * if (self.nSpace,self.nP) == (1,1):
2970  * icase = self.s11.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
2971  */
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)
2973 
2974  /* "equivalent_polynomials.pyx":52
2975  * def calculate(self, np.ndarray phi_dof, np.ndarray phi_nodes, np.ndarray xi):
2976  * self.xiBuffer[:xi.shape[0]]=xi
2977  * if (self.nSpace,self.nP) == (1,1): # <<<<<<<<<<<<<<
2978  * icase = self.s11.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
2979  * self._H = np.asarray(<double[:self.nQ]>self.s11.get_H())
2980  */
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);
2991  __pyx_t_1 = 0;
2992  __pyx_t_2 = 0;
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;
2997  if (__pyx_t_4) {
2998 
2999  /* "equivalent_polynomials.pyx":53
3000  * self.xiBuffer[:xi.shape[0]]=xi
3001  * if (self.nSpace,self.nP) == (1,1):
3002  * icase = self.s11.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
3003  * self._H = np.asarray(<double[:self.nQ]>self.s11.get_H())
3004  * self._ImH = np.asarray(<double[:self.nQ]>self.s11.get_ImH())
3005  */
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);
3007 
3008  /* "equivalent_polynomials.pyx":54
3009  * if (self.nSpace,self.nP) == (1,1):
3010  * icase = self.s11.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3011  * self._H = np.asarray(<double[:self.nQ]>self.s11.get_H()) # <<<<<<<<<<<<<<
3012  * self._ImH = np.asarray(<double[:self.nQ]>self.s11.get_ImH())
3013  * self._D = np.asarray(<double[:self.nQ]>self.s11.get_D())
3014  */
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();
3021  if (!__pyx_t_5) {
3022  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3023  __PYX_ERR(1, 54, __pyx_L1_error)
3024  }
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;
3034  __pyx_t_7 = NULL;
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);
3042  }
3043  }
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);
3055  __pyx_t_2 = 0;
3056 
3057  /* "equivalent_polynomials.pyx":55
3058  * icase = self.s11.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3059  * self._H = np.asarray(<double[:self.nQ]>self.s11.get_H())
3060  * self._ImH = np.asarray(<double[:self.nQ]>self.s11.get_ImH()) # <<<<<<<<<<<<<<
3061  * self._D = np.asarray(<double[:self.nQ]>self.s11.get_D())
3062  * self.inside_out = self.s11.inside_out
3063  */
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();
3070  if (!__pyx_t_5) {
3071  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3072  __PYX_ERR(1, 55, __pyx_L1_error)
3073  }
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;
3083  __pyx_t_3 = NULL;
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);
3091  }
3092  }
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);
3104  __pyx_t_2 = 0;
3105 
3106  /* "equivalent_polynomials.pyx":56
3107  * self._H = np.asarray(<double[:self.nQ]>self.s11.get_H())
3108  * self._ImH = np.asarray(<double[:self.nQ]>self.s11.get_ImH())
3109  * self._D = np.asarray(<double[:self.nQ]>self.s11.get_D()) # <<<<<<<<<<<<<<
3110  * self.inside_out = self.s11.inside_out
3111  * elif (self.nSpace,self.nP) == (1,2):
3112  */
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();
3119  if (!__pyx_t_5) {
3120  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3121  __PYX_ERR(1, 56, __pyx_L1_error)
3122  }
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;
3132  __pyx_t_1 = NULL;
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);
3140  }
3141  }
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);
3153  __pyx_t_2 = 0;
3154 
3155  /* "equivalent_polynomials.pyx":57
3156  * self._ImH = np.asarray(<double[:self.nQ]>self.s11.get_ImH())
3157  * self._D = np.asarray(<double[:self.nQ]>self.s11.get_D())
3158  * self.inside_out = self.s11.inside_out # <<<<<<<<<<<<<<
3159  * elif (self.nSpace,self.nP) == (1,2):
3160  * icase = self.s12.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3161  */
3162  __pyx_t_8 = __pyx_v_self->s11.inside_out;
3163  __pyx_v_self->inside_out = __pyx_t_8;
3164 
3165  /* "equivalent_polynomials.pyx":52
3166  * def calculate(self, np.ndarray phi_dof, np.ndarray phi_nodes, np.ndarray xi):
3167  * self.xiBuffer[:xi.shape[0]]=xi
3168  * if (self.nSpace,self.nP) == (1,1): # <<<<<<<<<<<<<<
3169  * icase = self.s11.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3170  * self._H = np.asarray(<double[:self.nQ]>self.s11.get_H())
3171  */
3172  goto __pyx_L3;
3173  }
3174 
3175  /* "equivalent_polynomials.pyx":58
3176  * self._D = np.asarray(<double[:self.nQ]>self.s11.get_D())
3177  * self.inside_out = self.s11.inside_out
3178  * elif (self.nSpace,self.nP) == (1,2): # <<<<<<<<<<<<<<
3179  * icase = self.s12.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3180  * self._H = np.asarray(<double[:self.nQ]>self.s12.get_H())
3181  */
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);
3192  __pyx_t_2 = 0;
3193  __pyx_t_3 = 0;
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;
3198  if (__pyx_t_4) {
3199 
3200  /* "equivalent_polynomials.pyx":59
3201  * self.inside_out = self.s11.inside_out
3202  * elif (self.nSpace,self.nP) == (1,2):
3203  * icase = self.s12.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
3204  * self._H = np.asarray(<double[:self.nQ]>self.s12.get_H())
3205  * self._ImH = np.asarray(<double[:self.nQ]>self.s12.get_ImH())
3206  */
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);
3208 
3209  /* "equivalent_polynomials.pyx":60
3210  * elif (self.nSpace,self.nP) == (1,2):
3211  * icase = self.s12.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3212  * self._H = np.asarray(<double[:self.nQ]>self.s12.get_H()) # <<<<<<<<<<<<<<
3213  * self._ImH = np.asarray(<double[:self.nQ]>self.s12.get_ImH())
3214  * self._D = np.asarray(<double[:self.nQ]>self.s12.get_D())
3215  */
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();
3222  if (!__pyx_t_5) {
3223  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3224  __PYX_ERR(1, 60, __pyx_L1_error)
3225  }
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;
3235  __pyx_t_7 = NULL;
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);
3243  }
3244  }
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);
3256  __pyx_t_3 = 0;
3257 
3258  /* "equivalent_polynomials.pyx":61
3259  * icase = self.s12.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3260  * self._H = np.asarray(<double[:self.nQ]>self.s12.get_H())
3261  * self._ImH = np.asarray(<double[:self.nQ]>self.s12.get_ImH()) # <<<<<<<<<<<<<<
3262  * self._D = np.asarray(<double[:self.nQ]>self.s12.get_D())
3263  * self.inside_out = self.s12.inside_out
3264  */
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();
3271  if (!__pyx_t_5) {
3272  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3273  __PYX_ERR(1, 61, __pyx_L1_error)
3274  }
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;
3284  __pyx_t_1 = NULL;
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);
3292  }
3293  }
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);
3305  __pyx_t_3 = 0;
3306 
3307  /* "equivalent_polynomials.pyx":62
3308  * self._H = np.asarray(<double[:self.nQ]>self.s12.get_H())
3309  * self._ImH = np.asarray(<double[:self.nQ]>self.s12.get_ImH())
3310  * self._D = np.asarray(<double[:self.nQ]>self.s12.get_D()) # <<<<<<<<<<<<<<
3311  * self.inside_out = self.s12.inside_out
3312  * elif (self.nSpace,self.nP) == (1,3):
3313  */
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();
3320  if (!__pyx_t_5) {
3321  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3322  __PYX_ERR(1, 62, __pyx_L1_error)
3323  }
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;
3333  __pyx_t_2 = NULL;
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);
3341  }
3342  }
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);
3354  __pyx_t_3 = 0;
3355 
3356  /* "equivalent_polynomials.pyx":63
3357  * self._ImH = np.asarray(<double[:self.nQ]>self.s12.get_ImH())
3358  * self._D = np.asarray(<double[:self.nQ]>self.s12.get_D())
3359  * self.inside_out = self.s12.inside_out # <<<<<<<<<<<<<<
3360  * elif (self.nSpace,self.nP) == (1,3):
3361  * icase = self.s13.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3362  */
3363  __pyx_t_8 = __pyx_v_self->s12.inside_out;
3364  __pyx_v_self->inside_out = __pyx_t_8;
3365 
3366  /* "equivalent_polynomials.pyx":58
3367  * self._D = np.asarray(<double[:self.nQ]>self.s11.get_D())
3368  * self.inside_out = self.s11.inside_out
3369  * elif (self.nSpace,self.nP) == (1,2): # <<<<<<<<<<<<<<
3370  * icase = self.s12.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3371  * self._H = np.asarray(<double[:self.nQ]>self.s12.get_H())
3372  */
3373  goto __pyx_L3;
3374  }
3375 
3376  /* "equivalent_polynomials.pyx":64
3377  * self._D = np.asarray(<double[:self.nQ]>self.s12.get_D())
3378  * self.inside_out = self.s12.inside_out
3379  * elif (self.nSpace,self.nP) == (1,3): # <<<<<<<<<<<<<<
3380  * icase = self.s13.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3381  * self._H = np.asarray(<double[:self.nQ]>self.s13.get_H())
3382  */
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);
3393  __pyx_t_3 = 0;
3394  __pyx_t_1 = 0;
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;
3399  if (__pyx_t_4) {
3400 
3401  /* "equivalent_polynomials.pyx":65
3402  * self.inside_out = self.s12.inside_out
3403  * elif (self.nSpace,self.nP) == (1,3):
3404  * icase = self.s13.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
3405  * self._H = np.asarray(<double[:self.nQ]>self.s13.get_H())
3406  * self._ImH = np.asarray(<double[:self.nQ]>self.s13.get_ImH())
3407  */
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);
3409 
3410  /* "equivalent_polynomials.pyx":66
3411  * elif (self.nSpace,self.nP) == (1,3):
3412  * icase = self.s13.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3413  * self._H = np.asarray(<double[:self.nQ]>self.s13.get_H()) # <<<<<<<<<<<<<<
3414  * self._ImH = np.asarray(<double[:self.nQ]>self.s13.get_ImH())
3415  * self._D = np.asarray(<double[:self.nQ]>self.s13.get_D())
3416  */
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();
3423  if (!__pyx_t_5) {
3424  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3425  __PYX_ERR(1, 66, __pyx_L1_error)
3426  }
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;
3436  __pyx_t_7 = NULL;
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);
3444  }
3445  }
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);
3457  __pyx_t_1 = 0;
3458 
3459  /* "equivalent_polynomials.pyx":67
3460  * icase = self.s13.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3461  * self._H = np.asarray(<double[:self.nQ]>self.s13.get_H())
3462  * self._ImH = np.asarray(<double[:self.nQ]>self.s13.get_ImH()) # <<<<<<<<<<<<<<
3463  * self._D = np.asarray(<double[:self.nQ]>self.s13.get_D())
3464  * self.inside_out = self.s13.inside_out
3465  */
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();
3472  if (!__pyx_t_5) {
3473  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3474  __PYX_ERR(1, 67, __pyx_L1_error)
3475  }
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;
3485  __pyx_t_2 = NULL;
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);
3493  }
3494  }
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);
3506  __pyx_t_1 = 0;
3507 
3508  /* "equivalent_polynomials.pyx":68
3509  * self._H = np.asarray(<double[:self.nQ]>self.s13.get_H())
3510  * self._ImH = np.asarray(<double[:self.nQ]>self.s13.get_ImH())
3511  * self._D = np.asarray(<double[:self.nQ]>self.s13.get_D()) # <<<<<<<<<<<<<<
3512  * self.inside_out = self.s13.inside_out
3513  * elif (self.nSpace,self.nP) == (2,1):
3514  */
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();
3521  if (!__pyx_t_5) {
3522  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3523  __PYX_ERR(1, 68, __pyx_L1_error)
3524  }
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;
3534  __pyx_t_3 = NULL;
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);
3542  }
3543  }
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);
3555  __pyx_t_1 = 0;
3556 
3557  /* "equivalent_polynomials.pyx":69
3558  * self._ImH = np.asarray(<double[:self.nQ]>self.s13.get_ImH())
3559  * self._D = np.asarray(<double[:self.nQ]>self.s13.get_D())
3560  * self.inside_out = self.s13.inside_out # <<<<<<<<<<<<<<
3561  * elif (self.nSpace,self.nP) == (2,1):
3562  * icase = self.s21.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3563  */
3564  __pyx_t_8 = __pyx_v_self->s13.inside_out;
3565  __pyx_v_self->inside_out = __pyx_t_8;
3566 
3567  /* "equivalent_polynomials.pyx":64
3568  * self._D = np.asarray(<double[:self.nQ]>self.s12.get_D())
3569  * self.inside_out = self.s12.inside_out
3570  * elif (self.nSpace,self.nP) == (1,3): # <<<<<<<<<<<<<<
3571  * icase = self.s13.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3572  * self._H = np.asarray(<double[:self.nQ]>self.s13.get_H())
3573  */
3574  goto __pyx_L3;
3575  }
3576 
3577  /* "equivalent_polynomials.pyx":70
3578  * self._D = np.asarray(<double[:self.nQ]>self.s13.get_D())
3579  * self.inside_out = self.s13.inside_out
3580  * elif (self.nSpace,self.nP) == (2,1): # <<<<<<<<<<<<<<
3581  * icase = self.s21.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3582  * self._H = np.asarray(<double[:self.nQ]>self.s21.get_H())
3583  */
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);
3594  __pyx_t_1 = 0;
3595  __pyx_t_2 = 0;
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;
3600  if (__pyx_t_4) {
3601 
3602  /* "equivalent_polynomials.pyx":71
3603  * self.inside_out = self.s13.inside_out
3604  * elif (self.nSpace,self.nP) == (2,1):
3605  * icase = self.s21.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
3606  * self._H = np.asarray(<double[:self.nQ]>self.s21.get_H())
3607  * self._ImH = np.asarray(<double[:self.nQ]>self.s21.get_ImH())
3608  */
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);
3610 
3611  /* "equivalent_polynomials.pyx":72
3612  * elif (self.nSpace,self.nP) == (2,1):
3613  * icase = self.s21.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3614  * self._H = np.asarray(<double[:self.nQ]>self.s21.get_H()) # <<<<<<<<<<<<<<
3615  * self._ImH = np.asarray(<double[:self.nQ]>self.s21.get_ImH())
3616  * self._D = np.asarray(<double[:self.nQ]>self.s21.get_D())
3617  */
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();
3624  if (!__pyx_t_5) {
3625  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3626  __PYX_ERR(1, 72, __pyx_L1_error)
3627  }
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;
3637  __pyx_t_7 = NULL;
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);
3645  }
3646  }
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);
3658  __pyx_t_2 = 0;
3659 
3660  /* "equivalent_polynomials.pyx":73
3661  * icase = self.s21.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3662  * self._H = np.asarray(<double[:self.nQ]>self.s21.get_H())
3663  * self._ImH = np.asarray(<double[:self.nQ]>self.s21.get_ImH()) # <<<<<<<<<<<<<<
3664  * self._D = np.asarray(<double[:self.nQ]>self.s21.get_D())
3665  * self.inside_out = self.s21.inside_out
3666  */
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();
3673  if (!__pyx_t_5) {
3674  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3675  __PYX_ERR(1, 73, __pyx_L1_error)
3676  }
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;
3686  __pyx_t_3 = NULL;
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);
3694  }
3695  }
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);
3707  __pyx_t_2 = 0;
3708 
3709  /* "equivalent_polynomials.pyx":74
3710  * self._H = np.asarray(<double[:self.nQ]>self.s21.get_H())
3711  * self._ImH = np.asarray(<double[:self.nQ]>self.s21.get_ImH())
3712  * self._D = np.asarray(<double[:self.nQ]>self.s21.get_D()) # <<<<<<<<<<<<<<
3713  * self.inside_out = self.s21.inside_out
3714  * elif (self.nSpace,self.nP) == (2,2):
3715  */
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();
3722  if (!__pyx_t_5) {
3723  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3724  __PYX_ERR(1, 74, __pyx_L1_error)
3725  }
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;
3735  __pyx_t_1 = NULL;
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);
3743  }
3744  }
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);
3756  __pyx_t_2 = 0;
3757 
3758  /* "equivalent_polynomials.pyx":75
3759  * self._ImH = np.asarray(<double[:self.nQ]>self.s21.get_ImH())
3760  * self._D = np.asarray(<double[:self.nQ]>self.s21.get_D())
3761  * self.inside_out = self.s21.inside_out # <<<<<<<<<<<<<<
3762  * elif (self.nSpace,self.nP) == (2,2):
3763  * icase = self.s22.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3764  */
3765  __pyx_t_8 = __pyx_v_self->s21.inside_out;
3766  __pyx_v_self->inside_out = __pyx_t_8;
3767 
3768  /* "equivalent_polynomials.pyx":70
3769  * self._D = np.asarray(<double[:self.nQ]>self.s13.get_D())
3770  * self.inside_out = self.s13.inside_out
3771  * elif (self.nSpace,self.nP) == (2,1): # <<<<<<<<<<<<<<
3772  * icase = self.s21.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3773  * self._H = np.asarray(<double[:self.nQ]>self.s21.get_H())
3774  */
3775  goto __pyx_L3;
3776  }
3777 
3778  /* "equivalent_polynomials.pyx":76
3779  * self._D = np.asarray(<double[:self.nQ]>self.s21.get_D())
3780  * self.inside_out = self.s21.inside_out
3781  * elif (self.nSpace,self.nP) == (2,2): # <<<<<<<<<<<<<<
3782  * icase = self.s22.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3783  * self._H = np.asarray(<double[:self.nQ]>self.s22.get_H())
3784  */
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);
3795  __pyx_t_2 = 0;
3796  __pyx_t_3 = 0;
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;
3801  if (__pyx_t_4) {
3802 
3803  /* "equivalent_polynomials.pyx":77
3804  * self.inside_out = self.s21.inside_out
3805  * elif (self.nSpace,self.nP) == (2,2):
3806  * icase = self.s22.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
3807  * self._H = np.asarray(<double[:self.nQ]>self.s22.get_H())
3808  * self._ImH = np.asarray(<double[:self.nQ]>self.s22.get_ImH())
3809  */
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);
3811 
3812  /* "equivalent_polynomials.pyx":78
3813  * elif (self.nSpace,self.nP) == (2,2):
3814  * icase = self.s22.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3815  * self._H = np.asarray(<double[:self.nQ]>self.s22.get_H()) # <<<<<<<<<<<<<<
3816  * self._ImH = np.asarray(<double[:self.nQ]>self.s22.get_ImH())
3817  * self._D = np.asarray(<double[:self.nQ]>self.s22.get_D())
3818  */
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();
3825  if (!__pyx_t_5) {
3826  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3827  __PYX_ERR(1, 78, __pyx_L1_error)
3828  }
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;
3838  __pyx_t_7 = NULL;
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);
3846  }
3847  }
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);
3859  __pyx_t_3 = 0;
3860 
3861  /* "equivalent_polynomials.pyx":79
3862  * icase = self.s22.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3863  * self._H = np.asarray(<double[:self.nQ]>self.s22.get_H())
3864  * self._ImH = np.asarray(<double[:self.nQ]>self.s22.get_ImH()) # <<<<<<<<<<<<<<
3865  * self._D = np.asarray(<double[:self.nQ]>self.s22.get_D())
3866  * self.inside_out = self.s22.inside_out
3867  */
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();
3874  if (!__pyx_t_5) {
3875  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3876  __PYX_ERR(1, 79, __pyx_L1_error)
3877  }
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;
3887  __pyx_t_1 = NULL;
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);
3895  }
3896  }
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);
3908  __pyx_t_3 = 0;
3909 
3910  /* "equivalent_polynomials.pyx":80
3911  * self._H = np.asarray(<double[:self.nQ]>self.s22.get_H())
3912  * self._ImH = np.asarray(<double[:self.nQ]>self.s22.get_ImH())
3913  * self._D = np.asarray(<double[:self.nQ]>self.s22.get_D()) # <<<<<<<<<<<<<<
3914  * self.inside_out = self.s22.inside_out
3915  * elif (self.nSpace,self.nP) == (2,3):
3916  */
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();
3923  if (!__pyx_t_5) {
3924  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3925  __PYX_ERR(1, 80, __pyx_L1_error)
3926  }
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;
3936  __pyx_t_2 = NULL;
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);
3944  }
3945  }
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);
3957  __pyx_t_3 = 0;
3958 
3959  /* "equivalent_polynomials.pyx":81
3960  * self._ImH = np.asarray(<double[:self.nQ]>self.s22.get_ImH())
3961  * self._D = np.asarray(<double[:self.nQ]>self.s22.get_D())
3962  * self.inside_out = self.s22.inside_out # <<<<<<<<<<<<<<
3963  * elif (self.nSpace,self.nP) == (2,3):
3964  * icase = self.s23.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3965  */
3966  __pyx_t_8 = __pyx_v_self->s22.inside_out;
3967  __pyx_v_self->inside_out = __pyx_t_8;
3968 
3969  /* "equivalent_polynomials.pyx":76
3970  * self._D = np.asarray(<double[:self.nQ]>self.s21.get_D())
3971  * self.inside_out = self.s21.inside_out
3972  * elif (self.nSpace,self.nP) == (2,2): # <<<<<<<<<<<<<<
3973  * icase = self.s22.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3974  * self._H = np.asarray(<double[:self.nQ]>self.s22.get_H())
3975  */
3976  goto __pyx_L3;
3977  }
3978 
3979  /* "equivalent_polynomials.pyx":82
3980  * self._D = np.asarray(<double[:self.nQ]>self.s22.get_D())
3981  * self.inside_out = self.s22.inside_out
3982  * elif (self.nSpace,self.nP) == (2,3): # <<<<<<<<<<<<<<
3983  * icase = self.s23.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
3984  * self._H = np.asarray(<double[:self.nQ]>self.s23.get_H())
3985  */
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);
3996  __pyx_t_3 = 0;
3997  __pyx_t_1 = 0;
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;
4002  if (__pyx_t_4) {
4003 
4004  /* "equivalent_polynomials.pyx":83
4005  * self.inside_out = self.s22.inside_out
4006  * elif (self.nSpace,self.nP) == (2,3):
4007  * icase = self.s23.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
4008  * self._H = np.asarray(<double[:self.nQ]>self.s23.get_H())
4009  * self._ImH = np.asarray(<double[:self.nQ]>self.s23.get_ImH())
4010  */
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);
4012 
4013  /* "equivalent_polynomials.pyx":84
4014  * elif (self.nSpace,self.nP) == (2,3):
4015  * icase = self.s23.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4016  * self._H = np.asarray(<double[:self.nQ]>self.s23.get_H()) # <<<<<<<<<<<<<<
4017  * self._ImH = np.asarray(<double[:self.nQ]>self.s23.get_ImH())
4018  * self._D = np.asarray(<double[:self.nQ]>self.s23.get_D())
4019  */
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();
4026  if (!__pyx_t_5) {
4027  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4028  __PYX_ERR(1, 84, __pyx_L1_error)
4029  }
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;
4039  __pyx_t_7 = NULL;
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);
4047  }
4048  }
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);
4060  __pyx_t_1 = 0;
4061 
4062  /* "equivalent_polynomials.pyx":85
4063  * icase = self.s23.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4064  * self._H = np.asarray(<double[:self.nQ]>self.s23.get_H())
4065  * self._ImH = np.asarray(<double[:self.nQ]>self.s23.get_ImH()) # <<<<<<<<<<<<<<
4066  * self._D = np.asarray(<double[:self.nQ]>self.s23.get_D())
4067  * self.inside_out = self.s23.inside_out
4068  */
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();
4075  if (!__pyx_t_5) {
4076  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4077  __PYX_ERR(1, 85, __pyx_L1_error)
4078  }
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;
4088  __pyx_t_2 = NULL;
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);
4096  }
4097  }
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);
4109  __pyx_t_1 = 0;
4110 
4111  /* "equivalent_polynomials.pyx":86
4112  * self._H = np.asarray(<double[:self.nQ]>self.s23.get_H())
4113  * self._ImH = np.asarray(<double[:self.nQ]>self.s23.get_ImH())
4114  * self._D = np.asarray(<double[:self.nQ]>self.s23.get_D()) # <<<<<<<<<<<<<<
4115  * self.inside_out = self.s23.inside_out
4116  * if (self.nSpace,self.nP) == (3,1):
4117  */
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();
4124  if (!__pyx_t_5) {
4125  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4126  __PYX_ERR(1, 86, __pyx_L1_error)
4127  }
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;
4137  __pyx_t_3 = NULL;
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);
4145  }
4146  }
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);
4158  __pyx_t_1 = 0;
4159 
4160  /* "equivalent_polynomials.pyx":87
4161  * self._ImH = np.asarray(<double[:self.nQ]>self.s23.get_ImH())
4162  * self._D = np.asarray(<double[:self.nQ]>self.s23.get_D())
4163  * self.inside_out = self.s23.inside_out # <<<<<<<<<<<<<<
4164  * if (self.nSpace,self.nP) == (3,1):
4165  * icase = self.s31.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4166  */
4167  __pyx_t_8 = __pyx_v_self->s23.inside_out;
4168  __pyx_v_self->inside_out = __pyx_t_8;
4169 
4170  /* "equivalent_polynomials.pyx":82
4171  * self._D = np.asarray(<double[:self.nQ]>self.s22.get_D())
4172  * self.inside_out = self.s22.inside_out
4173  * elif (self.nSpace,self.nP) == (2,3): # <<<<<<<<<<<<<<
4174  * icase = self.s23.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4175  * self._H = np.asarray(<double[:self.nQ]>self.s23.get_H())
4176  */
4177  }
4178  __pyx_L3:;
4179 
4180  /* "equivalent_polynomials.pyx":88
4181  * self._D = np.asarray(<double[:self.nQ]>self.s23.get_D())
4182  * self.inside_out = self.s23.inside_out
4183  * if (self.nSpace,self.nP) == (3,1): # <<<<<<<<<<<<<<
4184  * icase = self.s31.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4185  * self._H = np.asarray(<double[:self.nQ]>self.s31.get_H())
4186  */
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);
4197  __pyx_t_1 = 0;
4198  __pyx_t_2 = 0;
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;
4203  if (__pyx_t_4) {
4204 
4205  /* "equivalent_polynomials.pyx":89
4206  * self.inside_out = self.s23.inside_out
4207  * if (self.nSpace,self.nP) == (3,1):
4208  * icase = self.s31.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
4209  * self._H = np.asarray(<double[:self.nQ]>self.s31.get_H())
4210  * self._ImH = np.asarray(<double[:self.nQ]>self.s31.get_ImH())
4211  */
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);
4213 
4214  /* "equivalent_polynomials.pyx":90
4215  * if (self.nSpace,self.nP) == (3,1):
4216  * icase = self.s31.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4217  * self._H = np.asarray(<double[:self.nQ]>self.s31.get_H()) # <<<<<<<<<<<<<<
4218  * self._ImH = np.asarray(<double[:self.nQ]>self.s31.get_ImH())
4219  * self._D = np.asarray(<double[:self.nQ]>self.s31.get_D())
4220  */
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();
4227  if (!__pyx_t_5) {
4228  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4229  __PYX_ERR(1, 90, __pyx_L1_error)
4230  }
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;
4240  __pyx_t_7 = NULL;
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);
4248  }
4249  }
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);
4261  __pyx_t_2 = 0;
4262 
4263  /* "equivalent_polynomials.pyx":91
4264  * icase = self.s31.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4265  * self._H = np.asarray(<double[:self.nQ]>self.s31.get_H())
4266  * self._ImH = np.asarray(<double[:self.nQ]>self.s31.get_ImH()) # <<<<<<<<<<<<<<
4267  * self._D = np.asarray(<double[:self.nQ]>self.s31.get_D())
4268  * self.inside_out = self.s31.inside_out
4269  */
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();
4276  if (!__pyx_t_5) {
4277  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4278  __PYX_ERR(1, 91, __pyx_L1_error)
4279  }
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;
4289  __pyx_t_3 = NULL;
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);
4297  }
4298  }
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);
4310  __pyx_t_2 = 0;
4311 
4312  /* "equivalent_polynomials.pyx":92
4313  * self._H = np.asarray(<double[:self.nQ]>self.s31.get_H())
4314  * self._ImH = np.asarray(<double[:self.nQ]>self.s31.get_ImH())
4315  * self._D = np.asarray(<double[:self.nQ]>self.s31.get_D()) # <<<<<<<<<<<<<<
4316  * self.inside_out = self.s31.inside_out
4317  * elif (self.nSpace,self.nP) == (3,2):
4318  */
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();
4325  if (!__pyx_t_5) {
4326  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4327  __PYX_ERR(1, 92, __pyx_L1_error)
4328  }
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;
4338  __pyx_t_1 = NULL;
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);
4346  }
4347  }
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);
4359  __pyx_t_2 = 0;
4360 
4361  /* "equivalent_polynomials.pyx":93
4362  * self._ImH = np.asarray(<double[:self.nQ]>self.s31.get_ImH())
4363  * self._D = np.asarray(<double[:self.nQ]>self.s31.get_D())
4364  * self.inside_out = self.s31.inside_out # <<<<<<<<<<<<<<
4365  * elif (self.nSpace,self.nP) == (3,2):
4366  * icase = self.s32.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4367  */
4368  __pyx_t_8 = __pyx_v_self->s31.inside_out;
4369  __pyx_v_self->inside_out = __pyx_t_8;
4370 
4371  /* "equivalent_polynomials.pyx":88
4372  * self._D = np.asarray(<double[:self.nQ]>self.s23.get_D())
4373  * self.inside_out = self.s23.inside_out
4374  * if (self.nSpace,self.nP) == (3,1): # <<<<<<<<<<<<<<
4375  * icase = self.s31.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4376  * self._H = np.asarray(<double[:self.nQ]>self.s31.get_H())
4377  */
4378  goto __pyx_L4;
4379  }
4380 
4381  /* "equivalent_polynomials.pyx":94
4382  * self._D = np.asarray(<double[:self.nQ]>self.s31.get_D())
4383  * self.inside_out = self.s31.inside_out
4384  * elif (self.nSpace,self.nP) == (3,2): # <<<<<<<<<<<<<<
4385  * icase = self.s32.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4386  * self._H = np.asarray(<double[:self.nQ]>self.s32.get_H())
4387  */
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);
4398  __pyx_t_2 = 0;
4399  __pyx_t_3 = 0;
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;
4404  if (__pyx_t_4) {
4405 
4406  /* "equivalent_polynomials.pyx":95
4407  * self.inside_out = self.s31.inside_out
4408  * elif (self.nSpace,self.nP) == (3,2):
4409  * icase = self.s32.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
4410  * self._H = np.asarray(<double[:self.nQ]>self.s32.get_H())
4411  * self._ImH = np.asarray(<double[:self.nQ]>self.s32.get_ImH())
4412  */
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);
4414 
4415  /* "equivalent_polynomials.pyx":96
4416  * elif (self.nSpace,self.nP) == (3,2):
4417  * icase = self.s32.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4418  * self._H = np.asarray(<double[:self.nQ]>self.s32.get_H()) # <<<<<<<<<<<<<<
4419  * self._ImH = np.asarray(<double[:self.nQ]>self.s32.get_ImH())
4420  * self._D = np.asarray(<double[:self.nQ]>self.s32.get_D())
4421  */
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();
4428  if (!__pyx_t_5) {
4429  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4430  __PYX_ERR(1, 96, __pyx_L1_error)
4431  }
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;
4441  __pyx_t_7 = NULL;
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);
4449  }
4450  }
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);
4462  __pyx_t_3 = 0;
4463 
4464  /* "equivalent_polynomials.pyx":97
4465  * icase = self.s32.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4466  * self._H = np.asarray(<double[:self.nQ]>self.s32.get_H())
4467  * self._ImH = np.asarray(<double[:self.nQ]>self.s32.get_ImH()) # <<<<<<<<<<<<<<
4468  * self._D = np.asarray(<double[:self.nQ]>self.s32.get_D())
4469  * self.inside_out = self.s32.inside_out
4470  */
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();
4477  if (!__pyx_t_5) {
4478  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4479  __PYX_ERR(1, 97, __pyx_L1_error)
4480  }
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;
4490  __pyx_t_1 = NULL;
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);
4498  }
4499  }
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);
4511  __pyx_t_3 = 0;
4512 
4513  /* "equivalent_polynomials.pyx":98
4514  * self._H = np.asarray(<double[:self.nQ]>self.s32.get_H())
4515  * self._ImH = np.asarray(<double[:self.nQ]>self.s32.get_ImH())
4516  * self._D = np.asarray(<double[:self.nQ]>self.s32.get_D()) # <<<<<<<<<<<<<<
4517  * self.inside_out = self.s32.inside_out
4518  * elif (self.nSpace,self.nP) == (3,3):
4519  */
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();
4526  if (!__pyx_t_5) {
4527  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4528  __PYX_ERR(1, 98, __pyx_L1_error)
4529  }
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;
4539  __pyx_t_2 = NULL;
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);
4547  }
4548  }
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);
4560  __pyx_t_3 = 0;
4561 
4562  /* "equivalent_polynomials.pyx":99
4563  * self._ImH = np.asarray(<double[:self.nQ]>self.s32.get_ImH())
4564  * self._D = np.asarray(<double[:self.nQ]>self.s32.get_D())
4565  * self.inside_out = self.s32.inside_out # <<<<<<<<<<<<<<
4566  * elif (self.nSpace,self.nP) == (3,3):
4567  * icase = self.s33.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4568  */
4569  __pyx_t_8 = __pyx_v_self->s32.inside_out;
4570  __pyx_v_self->inside_out = __pyx_t_8;
4571 
4572  /* "equivalent_polynomials.pyx":94
4573  * self._D = np.asarray(<double[:self.nQ]>self.s31.get_D())
4574  * self.inside_out = self.s31.inside_out
4575  * elif (self.nSpace,self.nP) == (3,2): # <<<<<<<<<<<<<<
4576  * icase = self.s32.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4577  * self._H = np.asarray(<double[:self.nQ]>self.s32.get_H())
4578  */
4579  goto __pyx_L4;
4580  }
4581 
4582  /* "equivalent_polynomials.pyx":100
4583  * self._D = np.asarray(<double[:self.nQ]>self.s32.get_D())
4584  * self.inside_out = self.s32.inside_out
4585  * elif (self.nSpace,self.nP) == (3,3): # <<<<<<<<<<<<<<
4586  * icase = self.s33.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4587  * self._H = np.asarray(<double[:self.nQ]>self.s33.get_H())
4588  */
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);
4599  __pyx_t_3 = 0;
4600  __pyx_t_1 = 0;
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;
4605  if (__pyx_t_4) {
4606 
4607  /* "equivalent_polynomials.pyx":101
4608  * self.inside_out = self.s32.inside_out
4609  * elif (self.nSpace,self.nP) == (3,3):
4610  * icase = self.s33.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False) # <<<<<<<<<<<<<<
4611  * self._H = np.asarray(<double[:self.nQ]>self.s33.get_H())
4612  * self._ImH = np.asarray(<double[:self.nQ]>self.s33.get_ImH())
4613  */
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);
4615 
4616  /* "equivalent_polynomials.pyx":102
4617  * elif (self.nSpace,self.nP) == (3,3):
4618  * icase = self.s33.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4619  * self._H = np.asarray(<double[:self.nQ]>self.s33.get_H()) # <<<<<<<<<<<<<<
4620  * self._ImH = np.asarray(<double[:self.nQ]>self.s33.get_ImH())
4621  * self._D = np.asarray(<double[:self.nQ]>self.s33.get_D())
4622  */
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();
4629  if (!__pyx_t_5) {
4630  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4631  __PYX_ERR(1, 102, __pyx_L1_error)
4632  }
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;
4642  __pyx_t_7 = NULL;
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);
4650  }
4651  }
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);
4663  __pyx_t_1 = 0;
4664 
4665  /* "equivalent_polynomials.pyx":103
4666  * icase = self.s33.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4667  * self._H = np.asarray(<double[:self.nQ]>self.s33.get_H())
4668  * self._ImH = np.asarray(<double[:self.nQ]>self.s33.get_ImH()) # <<<<<<<<<<<<<<
4669  * self._D = np.asarray(<double[:self.nQ]>self.s33.get_D())
4670  * self.inside_out = self.s33.inside_out
4671  */
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();
4678  if (!__pyx_t_5) {
4679  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4680  __PYX_ERR(1, 103, __pyx_L1_error)
4681  }
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;
4691  __pyx_t_2 = NULL;
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);
4699  }
4700  }
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);
4712  __pyx_t_1 = 0;
4713 
4714  /* "equivalent_polynomials.pyx":104
4715  * self._H = np.asarray(<double[:self.nQ]>self.s33.get_H())
4716  * self._ImH = np.asarray(<double[:self.nQ]>self.s33.get_ImH())
4717  * self._D = np.asarray(<double[:self.nQ]>self.s33.get_D()) # <<<<<<<<<<<<<<
4718  * self.inside_out = self.s33.inside_out
4719  * def set_quad(self, int q):
4720  */
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();
4727  if (!__pyx_t_5) {
4728  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4729  __PYX_ERR(1, 104, __pyx_L1_error)
4730  }
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;
4740  __pyx_t_3 = NULL;
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);
4748  }
4749  }
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);
4761  __pyx_t_1 = 0;
4762 
4763  /* "equivalent_polynomials.pyx":105
4764  * self._ImH = np.asarray(<double[:self.nQ]>self.s33.get_ImH())
4765  * self._D = np.asarray(<double[:self.nQ]>self.s33.get_D())
4766  * self.inside_out = self.s33.inside_out # <<<<<<<<<<<<<<
4767  * def set_quad(self, int q):
4768  * self.q=q
4769  */
4770  __pyx_t_8 = __pyx_v_self->s33.inside_out;
4771  __pyx_v_self->inside_out = __pyx_t_8;
4772 
4773  /* "equivalent_polynomials.pyx":100
4774  * self._D = np.asarray(<double[:self.nQ]>self.s32.get_D())
4775  * self.inside_out = self.s32.inside_out
4776  * elif (self.nSpace,self.nP) == (3,3): # <<<<<<<<<<<<<<
4777  * icase = self.s33.calculate(<double*>(phi_dof.data), <double*>(phi_nodes.data), <double*>(self.xiBuffer.data),False)
4778  * self._H = np.asarray(<double[:self.nQ]>self.s33.get_H())
4779  */
4780  }
4781  __pyx_L4:;
4782 
4783  /* "equivalent_polynomials.pyx":50
4784  * self.nEBQ=nQ#cek hack
4785  * self.q=0
4786  * def calculate(self, np.ndarray phi_dof, np.ndarray phi_nodes, np.ndarray xi): # <<<<<<<<<<<<<<
4787  * self.xiBuffer[:xi.shape[0]]=xi
4788  * if (self.nSpace,self.nP) == (1,1):
4789  */
4790 
4791  /* function exit code */
4792  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4793  goto __pyx_L0;
4794  __pyx_L1_error:;
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);
4801  __pyx_r = NULL;
4802  __pyx_L0:;
4803  __Pyx_XGIVEREF(__pyx_r);
4804  __Pyx_RefNannyFinishContext();
4805  return __pyx_r;
4806 }
4807 
4808 /* "equivalent_polynomials.pyx":106
4809  * self._D = np.asarray(<double[:self.nQ]>self.s33.get_D())
4810  * self.inside_out = self.s33.inside_out
4811  * def set_quad(self, int q): # <<<<<<<<<<<<<<
4812  * self.q=q
4813  * @property
4814  */
4815 
4816 /* Python wrapper */
4817 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_5set_quad(PyObject *__pyx_v_self, PyObject *__pyx_arg_q); /*proto*/
4818 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_5set_quad(PyObject *__pyx_v_self, PyObject *__pyx_arg_q) {
4819  int __pyx_v_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)
4828  }
4829  goto __pyx_L4_argument_unpacking_done;
4830  __pyx_L3_error:;
4831  __Pyx_AddTraceback("equivalent_polynomials.Simplex.set_quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
4832  __Pyx_RefNannyFinishContext();
4833  return NULL;
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));
4836 
4837  /* function exit code */
4838  __Pyx_RefNannyFinishContext();
4839  return __pyx_r;
4840 }
4841 
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);
4846 
4847  /* "equivalent_polynomials.pyx":107
4848  * self.inside_out = self.s33.inside_out
4849  * def set_quad(self, int q):
4850  * self.q=q # <<<<<<<<<<<<<<
4851  * @property
4852  * def H(self):
4853  */
4854  __pyx_v_self->q = __pyx_v_q;
4855 
4856  /* "equivalent_polynomials.pyx":106
4857  * self._D = np.asarray(<double[:self.nQ]>self.s33.get_D())
4858  * self.inside_out = self.s33.inside_out
4859  * def set_quad(self, int q): # <<<<<<<<<<<<<<
4860  * self.q=q
4861  * @property
4862  */
4863 
4864  /* function exit code */
4865  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4866  __Pyx_XGIVEREF(__pyx_r);
4867  __Pyx_RefNannyFinishContext();
4868  return __pyx_r;
4869 }
4870 
4871 /* "equivalent_polynomials.pyx":109
4872  * self.q=q
4873  * @property
4874  * def H(self): # <<<<<<<<<<<<<<
4875  * if self.inside_out:
4876  * return self._ImH[self.q]
4877  */
4878 
4879 /* Python wrapper */
4880 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_1H_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
4886 
4887  /* function exit code */
4888  __Pyx_RefNannyFinishContext();
4889  return __pyx_r;
4890 }
4891 
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
4895  int __pyx_t_1;
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);
4901 
4902  /* "equivalent_polynomials.pyx":110
4903  * @property
4904  * def H(self):
4905  * if self.inside_out: # <<<<<<<<<<<<<<
4906  * return self._ImH[self.q]
4907  * else:
4908  */
4909  __pyx_t_1 = (__pyx_v_self->inside_out != 0);
4910  if (__pyx_t_1) {
4911 
4912  /* "equivalent_polynomials.pyx":111
4913  * def H(self):
4914  * if self.inside_out:
4915  * return self._ImH[self.q] # <<<<<<<<<<<<<<
4916  * else:
4917  * return self._H[self.q]
4918  */
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;
4923  __pyx_t_2 = 0;
4924  goto __pyx_L0;
4925 
4926  /* "equivalent_polynomials.pyx":110
4927  * @property
4928  * def H(self):
4929  * if self.inside_out: # <<<<<<<<<<<<<<
4930  * return self._ImH[self.q]
4931  * else:
4932  */
4933  }
4934 
4935  /* "equivalent_polynomials.pyx":113
4936  * return self._ImH[self.q]
4937  * else:
4938  * return self._H[self.q] # <<<<<<<<<<<<<<
4939  * @property
4940  * def ImH(self):
4941  */
4942  /*else*/ {
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;
4947  __pyx_t_2 = 0;
4948  goto __pyx_L0;
4949  }
4950 
4951  /* "equivalent_polynomials.pyx":109
4952  * self.q=q
4953  * @property
4954  * def H(self): # <<<<<<<<<<<<<<
4955  * if self.inside_out:
4956  * return self._ImH[self.q]
4957  */
4958 
4959  /* function exit code */
4960  __pyx_L1_error:;
4961  __Pyx_XDECREF(__pyx_t_2);
4962  __Pyx_AddTraceback("equivalent_polynomials.Simplex.H.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4963  __pyx_r = NULL;
4964  __pyx_L0:;
4965  __Pyx_XGIVEREF(__pyx_r);
4966  __Pyx_RefNannyFinishContext();
4967  return __pyx_r;
4968 }
4969 
4970 /* "equivalent_polynomials.pyx":115
4971  * return self._H[self.q]
4972  * @property
4973  * def ImH(self): # <<<<<<<<<<<<<<
4974  * if self.inside_out:
4975  * return self._H[self.q]
4976  */
4977 
4978 /* Python wrapper */
4979 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_3ImH_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
4985 
4986  /* function exit code */
4987  __Pyx_RefNannyFinishContext();
4988  return __pyx_r;
4989 }
4990 
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
4994  int __pyx_t_1;
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);
5000 
5001  /* "equivalent_polynomials.pyx":116
5002  * @property
5003  * def ImH(self):
5004  * if self.inside_out: # <<<<<<<<<<<<<<
5005  * return self._H[self.q]
5006  * else:
5007  */
5008  __pyx_t_1 = (__pyx_v_self->inside_out != 0);
5009  if (__pyx_t_1) {
5010 
5011  /* "equivalent_polynomials.pyx":117
5012  * def ImH(self):
5013  * if self.inside_out:
5014  * return self._H[self.q] # <<<<<<<<<<<<<<
5015  * else:
5016  * return self._ImH[self.q]
5017  */
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;
5022  __pyx_t_2 = 0;
5023  goto __pyx_L0;
5024 
5025  /* "equivalent_polynomials.pyx":116
5026  * @property
5027  * def ImH(self):
5028  * if self.inside_out: # <<<<<<<<<<<<<<
5029  * return self._H[self.q]
5030  * else:
5031  */
5032  }
5033 
5034  /* "equivalent_polynomials.pyx":119
5035  * return self._H[self.q]
5036  * else:
5037  * return self._ImH[self.q] # <<<<<<<<<<<<<<
5038  * @property
5039  * def D(self):
5040  */
5041  /*else*/ {
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;
5046  __pyx_t_2 = 0;
5047  goto __pyx_L0;
5048  }
5049 
5050  /* "equivalent_polynomials.pyx":115
5051  * return self._H[self.q]
5052  * @property
5053  * def ImH(self): # <<<<<<<<<<<<<<
5054  * if self.inside_out:
5055  * return self._H[self.q]
5056  */
5057 
5058  /* function exit code */
5059  __pyx_L1_error:;
5060  __Pyx_XDECREF(__pyx_t_2);
5061  __Pyx_AddTraceback("equivalent_polynomials.Simplex.ImH.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5062  __pyx_r = NULL;
5063  __pyx_L0:;
5064  __Pyx_XGIVEREF(__pyx_r);
5065  __Pyx_RefNannyFinishContext();
5066  return __pyx_r;
5067 }
5068 
5069 /* "equivalent_polynomials.pyx":121
5070  * return self._ImH[self.q]
5071  * @property
5072  * def D(self): # <<<<<<<<<<<<<<
5073  * return self._D[self.q]
5074  */
5075 
5076 /* Python wrapper */
5077 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_1D_1__get__(PyObject *__pyx_v_self); /*proto*/
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));
5083 
5084  /* function exit code */
5085  __Pyx_RefNannyFinishContext();
5086  return __pyx_r;
5087 }
5088 
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);
5097 
5098  /* "equivalent_polynomials.pyx":122
5099  * @property
5100  * def D(self):
5101  * return self._D[self.q] # <<<<<<<<<<<<<<
5102  */
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;
5107  __pyx_t_1 = 0;
5108  goto __pyx_L0;
5109 
5110  /* "equivalent_polynomials.pyx":121
5111  * return self._ImH[self.q]
5112  * @property
5113  * def D(self): # <<<<<<<<<<<<<<
5114  * return self._D[self.q]
5115  */
5116 
5117  /* function exit code */
5118  __pyx_L1_error:;
5119  __Pyx_XDECREF(__pyx_t_1);
5120  __Pyx_AddTraceback("equivalent_polynomials.Simplex.D.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5121  __pyx_r = NULL;
5122  __pyx_L0:;
5123  __Pyx_XGIVEREF(__pyx_r);
5124  __Pyx_RefNannyFinishContext();
5125  return __pyx_r;
5126 }
5127 
5128 /* "(tree fragment)":1
5129  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5130  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5131  * def __setstate_cython__(self, __pyx_state):
5132  */
5133 
5134 /* Python wrapper */
5135 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
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));
5141 
5142  /* function exit code */
5143  __Pyx_RefNannyFinishContext();
5144  return __pyx_r;
5145 }
5146 
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);
5155 
5156  /* "(tree fragment)":2
5157  * def __reduce_cython__(self):
5158  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5159  * def __setstate_cython__(self, __pyx_state):
5160  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5161  */
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)
5167 
5168  /* "(tree fragment)":1
5169  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5170  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5171  * def __setstate_cython__(self, __pyx_state):
5172  */
5173 
5174  /* function exit code */
5175  __pyx_L1_error:;
5176  __Pyx_XDECREF(__pyx_t_1);
5177  __Pyx_AddTraceback("equivalent_polynomials.Simplex.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5178  __pyx_r = NULL;
5179  __Pyx_XGIVEREF(__pyx_r);
5180  __Pyx_RefNannyFinishContext();
5181  return __pyx_r;
5182 }
5183 
5184 /* "(tree fragment)":3
5185  * def __reduce_cython__(self):
5186  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5187  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5188  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5189  */
5190 
5191 /* Python wrapper */
5192 static PyObject *__pyx_pw_22equivalent_polynomials_7Simplex_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
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));
5198 
5199  /* function exit code */
5200  __Pyx_RefNannyFinishContext();
5201  return __pyx_r;
5202 }
5203 
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);
5212 
5213  /* "(tree fragment)":4
5214  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5215  * def __setstate_cython__(self, __pyx_state):
5216  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5217  */
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)
5223 
5224  /* "(tree fragment)":3
5225  * def __reduce_cython__(self):
5226  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5227  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5228  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5229  */
5230 
5231  /* function exit code */
5232  __pyx_L1_error:;
5233  __Pyx_XDECREF(__pyx_t_1);
5234  __Pyx_AddTraceback("equivalent_polynomials.Simplex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5235  __pyx_r = NULL;
5236  __Pyx_XGIVEREF(__pyx_r);
5237  __Pyx_RefNannyFinishContext();
5238  return __pyx_r;
5239 }
5240 
5241 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
5242  * ctypedef npy_cdouble complex_t
5243  *
5244  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
5245  * return PyArray_MultiIterNew(1, <void*>a)
5246  *
5247  */
5248 
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);
5257 
5258  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":736
5259  *
5260  * cdef inline object PyArray_MultiIterNew1(a):
5261  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
5262  *
5263  * cdef inline object PyArray_MultiIterNew2(a, b):
5264  */
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;
5269  __pyx_t_1 = 0;
5270  goto __pyx_L0;
5271 
5272  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
5273  * ctypedef npy_cdouble complex_t
5274  *
5275  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
5276  * return PyArray_MultiIterNew(1, <void*>a)
5277  *
5278  */
5279 
5280  /* function exit code */
5281  __pyx_L1_error:;
5282  __Pyx_XDECREF(__pyx_t_1);
5283  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
5284  __pyx_r = 0;
5285  __pyx_L0:;
5286  __Pyx_XGIVEREF(__pyx_r);
5287  __Pyx_RefNannyFinishContext();
5288  return __pyx_r;
5289 }
5290 
5291 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
5292  * return PyArray_MultiIterNew(1, <void*>a)
5293  *
5294  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
5295  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
5296  *
5297  */
5298 
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);
5307 
5308  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":739
5309  *
5310  * cdef inline object PyArray_MultiIterNew2(a, b):
5311  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
5312  *
5313  * cdef inline object PyArray_MultiIterNew3(a, b, c):
5314  */
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;
5319  __pyx_t_1 = 0;
5320  goto __pyx_L0;
5321 
5322  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
5323  * return PyArray_MultiIterNew(1, <void*>a)
5324  *
5325  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
5326  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
5327  *
5328  */
5329 
5330  /* function exit code */
5331  __pyx_L1_error:;
5332  __Pyx_XDECREF(__pyx_t_1);
5333  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
5334  __pyx_r = 0;
5335  __pyx_L0:;
5336  __Pyx_XGIVEREF(__pyx_r);
5337  __Pyx_RefNannyFinishContext();
5338  return __pyx_r;
5339 }
5340 
5341 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
5342  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
5343  *
5344  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
5345  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
5346  *
5347  */
5348 
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);
5357 
5358  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":742
5359  *
5360  * cdef inline object PyArray_MultiIterNew3(a, b, c):
5361  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
5362  *
5363  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
5364  */
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;
5369  __pyx_t_1 = 0;
5370  goto __pyx_L0;
5371 
5372  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
5373  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
5374  *
5375  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
5376  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
5377  *
5378  */
5379 
5380  /* function exit code */
5381  __pyx_L1_error:;
5382  __Pyx_XDECREF(__pyx_t_1);
5383  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
5384  __pyx_r = 0;
5385  __pyx_L0:;
5386  __Pyx_XGIVEREF(__pyx_r);
5387  __Pyx_RefNannyFinishContext();
5388  return __pyx_r;
5389 }
5390 
5391 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
5392  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
5393  *
5394  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
5395  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
5396  *
5397  */
5398 
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);
5407 
5408  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":745
5409  *
5410  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
5411  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
5412  *
5413  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
5414  */
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;
5419  __pyx_t_1 = 0;
5420  goto __pyx_L0;
5421 
5422  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
5423  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
5424  *
5425  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
5426  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
5427  *
5428  */
5429 
5430  /* function exit code */
5431  __pyx_L1_error:;
5432  __Pyx_XDECREF(__pyx_t_1);
5433  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
5434  __pyx_r = 0;
5435  __pyx_L0:;
5436  __Pyx_XGIVEREF(__pyx_r);
5437  __Pyx_RefNannyFinishContext();
5438  return __pyx_r;
5439 }
5440 
5441 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
5442  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
5443  *
5444  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
5445  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
5446  *
5447  */
5448 
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);
5457 
5458  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":748
5459  *
5460  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
5461  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
5462  *
5463  * cdef inline tuple PyDataType_SHAPE(dtype d):
5464  */
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;
5469  __pyx_t_1 = 0;
5470  goto __pyx_L0;
5471 
5472  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
5473  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
5474  *
5475  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
5476  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
5477  *
5478  */
5479 
5480  /* function exit code */
5481  __pyx_L1_error:;
5482  __Pyx_XDECREF(__pyx_t_1);
5483  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
5484  __pyx_r = 0;
5485  __pyx_L0:;
5486  __Pyx_XGIVEREF(__pyx_r);
5487  __Pyx_RefNannyFinishContext();
5488  return __pyx_r;
5489 }
5490 
5491 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
5492  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
5493  *
5494  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
5495  * if PyDataType_HASSUBARRAY(d):
5496  * return <tuple>d.subarray.shape
5497  */
5498 
5499 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
5500  PyObject *__pyx_r = NULL;
5501  __Pyx_RefNannyDeclarations
5502  int __pyx_t_1;
5503  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
5504 
5505  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
5506  *
5507  * cdef inline tuple PyDataType_SHAPE(dtype d):
5508  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
5509  * return <tuple>d.subarray.shape
5510  * else:
5511  */
5512  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
5513  if (__pyx_t_1) {
5514 
5515  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":752
5516  * cdef inline tuple PyDataType_SHAPE(dtype d):
5517  * if PyDataType_HASSUBARRAY(d):
5518  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
5519  * else:
5520  * return ()
5521  */
5522  __Pyx_XDECREF(__pyx_r);
5523  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
5524  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
5525  goto __pyx_L0;
5526 
5527  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
5528  *
5529  * cdef inline tuple PyDataType_SHAPE(dtype d):
5530  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
5531  * return <tuple>d.subarray.shape
5532  * else:
5533  */
5534  }
5535 
5536  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":754
5537  * return <tuple>d.subarray.shape
5538  * else:
5539  * return () # <<<<<<<<<<<<<<
5540  *
5541  *
5542  */
5543  /*else*/ {
5544  __Pyx_XDECREF(__pyx_r);
5545  __Pyx_INCREF(__pyx_empty_tuple);
5546  __pyx_r = __pyx_empty_tuple;
5547  goto __pyx_L0;
5548  }
5549 
5550  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
5551  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
5552  *
5553  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
5554  * if PyDataType_HASSUBARRAY(d):
5555  * return <tuple>d.subarray.shape
5556  */
5557 
5558  /* function exit code */
5559  __pyx_L0:;
5560  __Pyx_XGIVEREF(__pyx_r);
5561  __Pyx_RefNannyFinishContext();
5562  return __pyx_r;
5563 }
5564 
5565 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
5566  * int _import_umath() except -1
5567  *
5568  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
5569  * Py_INCREF(base) # important to do this before stealing the reference below!
5570  * PyArray_SetBaseObject(arr, base)
5571  */
5572 
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);
5576 
5577  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":930
5578  *
5579  * cdef inline void set_array_base(ndarray arr, object base):
5580  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
5581  * PyArray_SetBaseObject(arr, base)
5582  *
5583  */
5584  Py_INCREF(__pyx_v_base);
5585 
5586  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":931
5587  * cdef inline void set_array_base(ndarray arr, object base):
5588  * Py_INCREF(base) # important to do this before stealing the reference below!
5589  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
5590  *
5591  * cdef inline object get_array_base(ndarray arr):
5592  */
5593  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
5594 
5595  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
5596  * int _import_umath() except -1
5597  *
5598  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
5599  * Py_INCREF(base) # important to do this before stealing the reference below!
5600  * PyArray_SetBaseObject(arr, base)
5601  */
5602 
5603  /* function exit code */
5604  __Pyx_RefNannyFinishContext();
5605 }
5606 
5607 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
5608  * PyArray_SetBaseObject(arr, base)
5609  *
5610  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
5611  * base = PyArray_BASE(arr)
5612  * if base is NULL:
5613  */
5614 
5615 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
5619  int __pyx_t_1;
5620  __Pyx_RefNannySetupContext("get_array_base", 0);
5621 
5622  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":934
5623  *
5624  * cdef inline object get_array_base(ndarray arr):
5625  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
5626  * if base is NULL:
5627  * return None
5628  */
5629  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
5630 
5631  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
5632  * cdef inline object get_array_base(ndarray arr):
5633  * base = PyArray_BASE(arr)
5634  * if base is NULL: # <<<<<<<<<<<<<<
5635  * return None
5636  * return <object>base
5637  */
5638  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
5639  if (__pyx_t_1) {
5640 
5641  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":936
5642  * base = PyArray_BASE(arr)
5643  * if base is NULL:
5644  * return None # <<<<<<<<<<<<<<
5645  * return <object>base
5646  *
5647  */
5648  __Pyx_XDECREF(__pyx_r);
5649  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5650  goto __pyx_L0;
5651 
5652  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
5653  * cdef inline object get_array_base(ndarray arr):
5654  * base = PyArray_BASE(arr)
5655  * if base is NULL: # <<<<<<<<<<<<<<
5656  * return None
5657  * return <object>base
5658  */
5659  }
5660 
5661  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":937
5662  * if base is NULL:
5663  * return None
5664  * return <object>base # <<<<<<<<<<<<<<
5665  *
5666  * # Versions of the import_* functions which are more suitable for
5667  */
5668  __Pyx_XDECREF(__pyx_r);
5669  __Pyx_INCREF(((PyObject *)__pyx_v_base));
5670  __pyx_r = ((PyObject *)__pyx_v_base);
5671  goto __pyx_L0;
5672 
5673  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
5674  * PyArray_SetBaseObject(arr, base)
5675  *
5676  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
5677  * base = PyArray_BASE(arr)
5678  * if base is NULL:
5679  */
5680 
5681  /* function exit code */
5682  __pyx_L0:;
5683  __Pyx_XGIVEREF(__pyx_r);
5684  __Pyx_RefNannyFinishContext();
5685  return __pyx_r;
5686 }
5687 
5688 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
5689  * # Versions of the import_* functions which are more suitable for
5690  * # Cython code.
5691  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5692  * try:
5693  * __pyx_import_array()
5694  */
5695 
5696 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
5697  int __pyx_r;
5698  __Pyx_RefNannyDeclarations
5699  PyObject *__pyx_t_1 = NULL;
5700  PyObject *__pyx_t_2 = NULL;
5701  PyObject *__pyx_t_3 = NULL;
5702  int __pyx_t_4;
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);
5711 
5712  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
5713  * # Cython code.
5714  * cdef inline int import_array() except -1:
5715  * try: # <<<<<<<<<<<<<<
5716  * __pyx_import_array()
5717  * except Exception:
5718  */
5719  {
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);
5726  /*try:*/ {
5727 
5728  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":943
5729  * cdef inline int import_array() except -1:
5730  * try:
5731  * __pyx_import_array() # <<<<<<<<<<<<<<
5732  * except Exception:
5733  * raise ImportError("numpy.core.multiarray failed to import")
5734  */
5735  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error)
5736 
5737  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
5738  * # Cython code.
5739  * cdef inline int import_array() except -1:
5740  * try: # <<<<<<<<<<<<<<
5741  * __pyx_import_array()
5742  * except Exception:
5743  */
5744  }
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;
5749  __pyx_L3_error:;
5750 
5751  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":944
5752  * try:
5753  * __pyx_import_array()
5754  * except Exception: # <<<<<<<<<<<<<<
5755  * raise ImportError("numpy.core.multiarray failed to import")
5756  *
5757  */
5758  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5759  if (__pyx_t_4) {
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);
5765 
5766  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
5767  * __pyx_import_array()
5768  * except Exception:
5769  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
5770  *
5771  * cdef inline int import_umath() except -1:
5772  */
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)
5778  }
5779  goto __pyx_L5_except_error;
5780  __pyx_L5_except_error:;
5781 
5782  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
5783  * # Cython code.
5784  * cdef inline int import_array() except -1:
5785  * try: # <<<<<<<<<<<<<<
5786  * __pyx_import_array()
5787  * except Exception:
5788  */
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;
5794  __pyx_L8_try_end:;
5795  }
5796 
5797  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
5798  * # Versions of the import_* functions which are more suitable for
5799  * # Cython code.
5800  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5801  * try:
5802  * __pyx_import_array()
5803  */
5804 
5805  /* function exit code */
5806  __pyx_r = 0;
5807  goto __pyx_L0;
5808  __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);
5814  __pyx_r = -1;
5815  __pyx_L0:;
5816  __Pyx_RefNannyFinishContext();
5817  return __pyx_r;
5818 }
5819 
5820 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
5821  * raise ImportError("numpy.core.multiarray failed to import")
5822  *
5823  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5824  * try:
5825  * _import_umath()
5826  */
5827 
5828 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
5829  int __pyx_r;
5830  __Pyx_RefNannyDeclarations
5831  PyObject *__pyx_t_1 = NULL;
5832  PyObject *__pyx_t_2 = NULL;
5833  PyObject *__pyx_t_3 = NULL;
5834  int __pyx_t_4;
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);
5843 
5844  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
5845  *
5846  * cdef inline int import_umath() except -1:
5847  * try: # <<<<<<<<<<<<<<
5848  * _import_umath()
5849  * except Exception:
5850  */
5851  {
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);
5858  /*try:*/ {
5859 
5860  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":949
5861  * cdef inline int import_umath() except -1:
5862  * try:
5863  * _import_umath() # <<<<<<<<<<<<<<
5864  * except Exception:
5865  * raise ImportError("numpy.core.umath failed to import")
5866  */
5867  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error)
5868 
5869  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
5870  *
5871  * cdef inline int import_umath() except -1:
5872  * try: # <<<<<<<<<<<<<<
5873  * _import_umath()
5874  * except Exception:
5875  */
5876  }
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;
5881  __pyx_L3_error:;
5882 
5883  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":950
5884  * try:
5885  * _import_umath()
5886  * except Exception: # <<<<<<<<<<<<<<
5887  * raise ImportError("numpy.core.umath failed to import")
5888  *
5889  */
5890  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
5891  if (__pyx_t_4) {
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);
5897 
5898  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
5899  * _import_umath()
5900  * except Exception:
5901  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
5902  *
5903  * cdef inline int import_ufunc() except -1:
5904  */
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)
5910  }
5911  goto __pyx_L5_except_error;
5912  __pyx_L5_except_error:;
5913 
5914  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
5915  *
5916  * cdef inline int import_umath() except -1:
5917  * try: # <<<<<<<<<<<<<<
5918  * _import_umath()
5919  * except Exception:
5920  */
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;
5926  __pyx_L8_try_end:;
5927  }
5928 
5929  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
5930  * raise ImportError("numpy.core.multiarray failed to import")
5931  *
5932  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5933  * try:
5934  * _import_umath()
5935  */
5936 
5937  /* function exit code */
5938  __pyx_r = 0;
5939  goto __pyx_L0;
5940  __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);
5946  __pyx_r = -1;
5947  __pyx_L0:;
5948  __Pyx_RefNannyFinishContext();
5949  return __pyx_r;
5950 }
5951 
5952 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
5953  * raise ImportError("numpy.core.umath failed to import")
5954  *
5955  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5956  * try:
5957  * _import_umath()
5958  */
5959 
5960 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
5961  int __pyx_r;
5962  __Pyx_RefNannyDeclarations
5963  PyObject *__pyx_t_1 = NULL;
5964  PyObject *__pyx_t_2 = NULL;
5965  PyObject *__pyx_t_3 = NULL;
5966  int __pyx_t_4;
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);
5975 
5976  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
5977  *
5978  * cdef inline int import_ufunc() except -1:
5979  * try: # <<<<<<<<<<<<<<
5980  * _import_umath()
5981  * except Exception:
5982  */
5983  {
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);
5990  /*try:*/ {
5991 
5992  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":955
5993  * cdef inline int import_ufunc() except -1:
5994  * try:
5995  * _import_umath() # <<<<<<<<<<<<<<
5996  * except Exception:
5997  * raise ImportError("numpy.core.umath failed to import")
5998  */
5999  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error)
6000 
6001  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
6002  *
6003  * cdef inline int import_ufunc() except -1:
6004  * try: # <<<<<<<<<<<<<<
6005  * _import_umath()
6006  * except Exception:
6007  */
6008  }
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;
6013  __pyx_L3_error:;
6014 
6015  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":956
6016  * try:
6017  * _import_umath()
6018  * except Exception: # <<<<<<<<<<<<<<
6019  * raise ImportError("numpy.core.umath failed to import")
6020  *
6021  */
6022  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
6023  if (__pyx_t_4) {
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);
6029 
6030  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":957
6031  * _import_umath()
6032  * except Exception:
6033  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
6034  *
6035  * cdef extern from *:
6036  */
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)
6042  }
6043  goto __pyx_L5_except_error;
6044  __pyx_L5_except_error:;
6045 
6046  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
6047  *
6048  * cdef inline int import_ufunc() except -1:
6049  * try: # <<<<<<<<<<<<<<
6050  * _import_umath()
6051  * except Exception:
6052  */
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;
6058  __pyx_L8_try_end:;
6059  }
6060 
6061  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
6062  * raise ImportError("numpy.core.umath failed to import")
6063  *
6064  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
6065  * try:
6066  * _import_umath()
6067  */
6068 
6069  /* function exit code */
6070  __pyx_r = 0;
6071  goto __pyx_L0;
6072  __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);
6078  __pyx_r = -1;
6079  __pyx_L0:;
6080  __Pyx_RefNannyFinishContext();
6081  return __pyx_r;
6082 }
6083 
6084 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
6085  *
6086  *
6087  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
6088  * """
6089  * Cython equivalent of `isinstance(obj, np.timedelta64)`
6090  */
6091 
6092 static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
6093  int __pyx_r;
6094  __Pyx_RefNannyDeclarations
6095  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);
6096 
6097  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":979
6098  * bool
6099  * """
6100  * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
6101  *
6102  *
6103  */
6104  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
6105  goto __pyx_L0;
6106 
6107  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
6108  *
6109  *
6110  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
6111  * """
6112  * Cython equivalent of `isinstance(obj, np.timedelta64)`
6113  */
6114 
6115  /* function exit code */
6116  __pyx_L0:;
6117  __Pyx_RefNannyFinishContext();
6118  return __pyx_r;
6119 }
6120 
6121 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
6122  *
6123  *
6124  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
6125  * """
6126  * Cython equivalent of `isinstance(obj, np.datetime64)`
6127  */
6128 
6129 static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
6130  int __pyx_r;
6131  __Pyx_RefNannyDeclarations
6132  __Pyx_RefNannySetupContext("is_datetime64_object", 0);
6133 
6134  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":994
6135  * bool
6136  * """
6137  * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
6138  *
6139  *
6140  */
6141  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
6142  goto __pyx_L0;
6143 
6144  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
6145  *
6146  *
6147  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
6148  * """
6149  * Cython equivalent of `isinstance(obj, np.datetime64)`
6150  */
6151 
6152  /* function exit code */
6153  __pyx_L0:;
6154  __Pyx_RefNannyFinishContext();
6155  return __pyx_r;
6156 }
6157 
6158 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
6159  *
6160  *
6161  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
6162  * """
6163  * returns the int64 value underlying scalar numpy datetime64 object
6164  */
6165 
6166 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
6167  npy_datetime __pyx_r;
6168 
6169  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1004
6170  * also needed. That can be found using `get_datetime64_unit`.
6171  * """
6172  * return (<PyDatetimeScalarObject*>obj).obval # <<<<<<<<<<<<<<
6173  *
6174  *
6175  */
6176  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
6177  goto __pyx_L0;
6178 
6179  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
6180  *
6181  *
6182  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
6183  * """
6184  * returns the int64 value underlying scalar numpy datetime64 object
6185  */
6186 
6187  /* function exit code */
6188  __pyx_L0:;
6189  return __pyx_r;
6190 }
6191 
6192 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
6193  *
6194  *
6195  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
6196  * """
6197  * returns the int64 value underlying scalar numpy timedelta64 object
6198  */
6199 
6200 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
6201  npy_timedelta __pyx_r;
6202 
6203  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1011
6204  * returns the int64 value underlying scalar numpy timedelta64 object
6205  * """
6206  * return (<PyTimedeltaScalarObject*>obj).obval # <<<<<<<<<<<<<<
6207  *
6208  *
6209  */
6210  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
6211  goto __pyx_L0;
6212 
6213  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
6214  *
6215  *
6216  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
6217  * """
6218  * returns the int64 value underlying scalar numpy timedelta64 object
6219  */
6220 
6221  /* function exit code */
6222  __pyx_L0:;
6223  return __pyx_r;
6224 }
6225 
6226 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
6227  *
6228  *
6229  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
6230  * """
6231  * returns the unit part of the dtype for a numpy datetime64 object.
6232  */
6233 
6234 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
6235  NPY_DATETIMEUNIT __pyx_r;
6236 
6237  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1018
6238  * returns the unit part of the dtype for a numpy datetime64 object.
6239  * """
6240  * return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base # <<<<<<<<<<<<<<
6241  */
6242  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
6243  goto __pyx_L0;
6244 
6245  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
6246  *
6247  *
6248  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
6249  * """
6250  * returns the unit part of the dtype for a numpy datetime64 object.
6251  */
6252 
6253  /* function exit code */
6254  __pyx_L0:;
6255  return __pyx_r;
6256 }
6257 
6258 /* "View.MemoryView":122
6259  * cdef bint dtype_is_object
6260  *
6261  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
6262  * mode="c", bint allocate_buffer=True):
6263  *
6264  */
6265 
6266 /* Python wrapper */
6267 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
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;
6277  int __pyx_r;
6278  __Pyx_RefNannyDeclarations
6279  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6280  {
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)) {
6285  Py_ssize_t kw_args;
6286  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6287  switch (pos_args) {
6288  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6289  CYTHON_FALLTHROUGH;
6290  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6291  CYTHON_FALLTHROUGH;
6292  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6293  CYTHON_FALLTHROUGH;
6294  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6295  CYTHON_FALLTHROUGH;
6296  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6297  CYTHON_FALLTHROUGH;
6298  case 0: break;
6299  default: goto __pyx_L5_argtuple_error;
6300  }
6301  kw_args = PyDict_Size(__pyx_kwds);
6302  switch (pos_args) {
6303  case 0:
6304  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
6305  else goto __pyx_L5_argtuple_error;
6306  CYTHON_FALLTHROUGH;
6307  case 1:
6308  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
6309  else {
6310  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
6311  }
6312  CYTHON_FALLTHROUGH;
6313  case 2:
6314  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
6315  else {
6316  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
6317  }
6318  CYTHON_FALLTHROUGH;
6319  case 3:
6320  if (kw_args > 0) {
6321  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
6322  if (value) { values[3] = value; kw_args--; }
6323  }
6324  CYTHON_FALLTHROUGH;
6325  case 4:
6326  if (kw_args > 0) {
6327  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
6328  if (value) { values[4] = value; kw_args--; }
6329  }
6330  }
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)
6333  }
6334  } else {
6335  switch (PyTuple_GET_SIZE(__pyx_args)) {
6336  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6337  CYTHON_FALLTHROUGH;
6338  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6339  CYTHON_FALLTHROUGH;
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);
6343  break;
6344  default: goto __pyx_L5_argtuple_error;
6345  }
6346  }
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];
6351  if (values[4]) {
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)
6353  } else {
6354 
6355  /* "View.MemoryView":123
6356  *
6357  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
6358  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
6359  *
6360  * cdef int idx
6361  */
6362  __pyx_v_allocate_buffer = ((int)1);
6363  }
6364  }
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)
6368  __pyx_L3_error:;
6369  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6370  __Pyx_RefNannyFinishContext();
6371  return -1;
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)
6376  }
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);
6378 
6379  /* "View.MemoryView":122
6380  * cdef bint dtype_is_object
6381  *
6382  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
6383  * mode="c", bint allocate_buffer=True):
6384  *
6385  */
6386 
6387  /* function exit code */
6388  goto __pyx_L0;
6389  __pyx_L1_error:;
6390  __pyx_r = -1;
6391  __pyx_L0:;
6392  __Pyx_RefNannyFinishContext();
6393  return __pyx_r;
6394 }
6395 
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) {
6397  int __pyx_v_idx;
6398  Py_ssize_t __pyx_v_i;
6399  Py_ssize_t __pyx_v_dim;
6400  PyObject **__pyx_v_p;
6401  char __pyx_v_order;
6402  int __pyx_r;
6403  __Pyx_RefNannyDeclarations
6404  Py_ssize_t __pyx_t_1;
6405  int __pyx_t_2;
6406  PyObject *__pyx_t_3 = NULL;
6407  int __pyx_t_4;
6408  PyObject *__pyx_t_5 = NULL;
6409  PyObject *__pyx_t_6 = NULL;
6410  char *__pyx_t_7;
6411  int __pyx_t_8;
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);
6420 
6421  /* "View.MemoryView":129
6422  * cdef PyObject **p
6423  *
6424  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
6425  * self.itemsize = itemsize
6426  *
6427  */
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)
6431  }
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);
6434 
6435  /* "View.MemoryView":130
6436  *
6437  * self.ndim = <int> len(shape)
6438  * self.itemsize = itemsize # <<<<<<<<<<<<<<
6439  *
6440  * if not self.ndim:
6441  */
6442  __pyx_v_self->itemsize = __pyx_v_itemsize;
6443 
6444  /* "View.MemoryView":132
6445  * self.itemsize = itemsize
6446  *
6447  * if not self.ndim: # <<<<<<<<<<<<<<
6448  * raise ValueError("Empty shape tuple for cython.array")
6449  *
6450  */
6451  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
6452  if (unlikely(__pyx_t_2)) {
6453 
6454  /* "View.MemoryView":133
6455  *
6456  * if not self.ndim:
6457  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
6458  *
6459  * if itemsize <= 0:
6460  */
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)
6466 
6467  /* "View.MemoryView":132
6468  * self.itemsize = itemsize
6469  *
6470  * if not self.ndim: # <<<<<<<<<<<<<<
6471  * raise ValueError("Empty shape tuple for cython.array")
6472  *
6473  */
6474  }
6475 
6476  /* "View.MemoryView":135
6477  * raise ValueError("Empty shape tuple for cython.array")
6478  *
6479  * if itemsize <= 0: # <<<<<<<<<<<<<<
6480  * raise ValueError("itemsize <= 0 for cython.array")
6481  *
6482  */
6483  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
6484  if (unlikely(__pyx_t_2)) {
6485 
6486  /* "View.MemoryView":136
6487  *
6488  * if itemsize <= 0:
6489  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
6490  *
6491  * if not isinstance(format, bytes):
6492  */
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)
6498 
6499  /* "View.MemoryView":135
6500  * raise ValueError("Empty shape tuple for cython.array")
6501  *
6502  * if itemsize <= 0: # <<<<<<<<<<<<<<
6503  * raise ValueError("itemsize <= 0 for cython.array")
6504  *
6505  */
6506  }
6507 
6508  /* "View.MemoryView":138
6509  * raise ValueError("itemsize <= 0 for cython.array")
6510  *
6511  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
6512  * format = format.encode('ASCII')
6513  * self._format = format # keep a reference to the byte string
6514  */
6515  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
6516  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
6517  if (__pyx_t_4) {
6518 
6519  /* "View.MemoryView":139
6520  *
6521  * if not isinstance(format, bytes):
6522  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
6523  * self._format = format # keep a reference to the byte string
6524  * self.format = self._format