37#ifndef PY_SSIZE_T_CLEAN
38#define PY_SSIZE_T_CLEAN
41#if defined(Py_LIMITED_API)
42 #if !defined(CYTHON_LIMITED_API)
43 #define CYTHON_LIMITED_API 1
45#elif defined(CYTHON_LIMITED_API)
47 #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
49 #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
55 #error Python headers needed to compile C extensions, please install development version of Python.
56#elif PY_VERSION_HEX < 0x03090000
57 #error Cython requires Python 3.9+.
58#elif defined(Py_LIMITED_API) && (Py_LIMITED_API & 0xFFFF0000) > (PY_VERSION_HEX & 0xFFFF0000)
59 #error 'Py_LIMITED_API' can only select past Python X.Y versions, not future ones.
61#define __PYX_ABI_VERSION "3_3_0"
62#define CYTHON_HEX_VERSION 0x030300F0
63#define CYTHON_FUTURE_DIVISION 1
67 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
69#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
81 #define __Pyx_has_cbuiltin(name) __has_builtin(name)
83 #define __Pyx_has_cbuiltin(name) (0)
86 #define DL_IMPORT(t) t
89 #define DL_EXPORT(t) t
93 #define PY_LONG_LONG LONG_LONG
96 #define Py_HUGE_VAL HUGE_VAL
98#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
99#if defined(CYTHON_LIMITED_API)
100 #ifdef Py_LIMITED_API
101 #undef __PYX_LIMITED_VERSION_HEX
102 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
103 #if Py_LIMITED_API < 0x03090000
104 #error "Cython 3.3 requires the Python Limited API version to be 3.9 or greater."
107 #if defined(GRAALVM_PYTHON) || defined(PYPY_VERSION)
109 #pragma message ("Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
110 code for PyPy and GraalPy and is unlikely to work.")
112 #warning "Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
113 code for PyPy and GraalPy and is unlikely to work."
116 #define CYTHON_COMPILING_IN_PYPY 0
117 #define CYTHON_COMPILING_IN_CPYTHON 0
118 #define CYTHON_COMPILING_IN_LIMITED_API 1
119 #define CYTHON_COMPILING_IN_GRAAL 0
120 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
121 #undef CYTHON_USE_TYPE_SLOTS
122 #define CYTHON_USE_TYPE_SLOTS 0
123 #undef CYTHON_USE_TYPE_SPECS
124 #define CYTHON_USE_TYPE_SPECS 1
125 #undef CYTHON_USE_PYTYPE_LOOKUP
126 #define CYTHON_USE_PYTYPE_LOOKUP 0
127 #undef CYTHON_USE_PYLIST_INTERNALS
128 #define CYTHON_USE_PYLIST_INTERNALS 0
129 #undef CYTHON_USE_UNICODE_INTERNALS
130 #define CYTHON_USE_UNICODE_INTERNALS 0
131 #ifndef CYTHON_USE_UNICODE_WRITER
132 #define CYTHON_USE_UNICODE_WRITER 0
134 #undef CYTHON_USE_PYLONG_INTERNALS
135 #define CYTHON_USE_PYLONG_INTERNALS 0
136 #ifndef CYTHON_AVOID_BORROWED_REFS
137 #define CYTHON_AVOID_BORROWED_REFS 0
139 #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
140 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
142 #undef CYTHON_ASSUME_SAFE_MACROS
143 #define CYTHON_ASSUME_SAFE_MACROS 0
144 #undef CYTHON_ASSUME_SAFE_SIZE
145 #define CYTHON_ASSUME_SAFE_SIZE 0
146 #undef CYTHON_UNPACK_METHODS
147 #define CYTHON_UNPACK_METHODS 0
148 #undef CYTHON_FAST_THREAD_STATE
149 #define CYTHON_FAST_THREAD_STATE 0
150 #undef CYTHON_FAST_GIL
151 #define CYTHON_FAST_GIL 0
152 #undef CYTHON_VECTORCALL
153 #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
154 #ifndef CYTHON_VECTORCALL_TPNEW
155 #define CYTHON_VECTORCALL_TPNEW (CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
157 #ifndef CYTHON_PEP487_INIT_SUBCLASS
158 #define CYTHON_PEP487_INIT_SUBCLASS 1
160 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
161 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
163 #ifndef CYTHON_USE_MODULE_STATE
164 #define CYTHON_USE_MODULE_STATE 0
166 #undef CYTHON_USE_SYS_MONITORING
167 #define CYTHON_USE_SYS_MONITORING 0
168 #ifndef CYTHON_USE_TP_FINALIZE
169 #define CYTHON_USE_TP_FINALIZE (__PYX_LIMITED_VERSION_HEX >= 0x030F0000 && PY_VERSION_HEX > 0x030F00A8)
171 #ifndef CYTHON_USE_AM_SEND
172 #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
174 #undef CYTHON_USE_DICT_VERSIONS
175 #define CYTHON_USE_DICT_VERSIONS 0
176 #undef CYTHON_USE_EXC_INFO_STACK
177 #define CYTHON_USE_EXC_INFO_STACK 0
178 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
179 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
181 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
182 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
184 #ifndef CYTHON_USE_FREELISTS
185 #define CYTHON_USE_FREELISTS 1
187 #undef CYTHON_IMMORTAL_CONSTANTS
188 #define CYTHON_IMMORTAL_CONSTANTS 0
189 #if __PYX_LIMITED_VERSION_HEX < 0x030E0000
190 #undef CYTHON_OPAQUE_OBJECTS
191 #define CYTHON_OPAQUE_OBJECTS 0
192 #elif !defined(CYTHON_OPAQUE_OBJECTS)
193 #define CYTHON_OPAQUE_OBJECTS (__PYX_LIMITED_VERSION_HEX >= 0x030F0000)
195#elif defined(GRAALVM_PYTHON)
198 #define CYTHON_COMPILING_IN_PYPY 0
199 #define CYTHON_COMPILING_IN_CPYTHON 0
200 #define CYTHON_COMPILING_IN_LIMITED_API 0
201 #define CYTHON_COMPILING_IN_GRAAL 1
202 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
203 #ifndef CYTHON_USE_TYPE_SLOTS
204 #define CYTHON_USE_TYPE_SLOTS 0
206 #undef CYTHON_USE_TYPE_SPECS
207 #define CYTHON_USE_TYPE_SPECS 0
208 #undef CYTHON_USE_PYTYPE_LOOKUP
209 #define CYTHON_USE_PYTYPE_LOOKUP 0
210 #undef CYTHON_USE_PYLIST_INTERNALS
211 #define CYTHON_USE_PYLIST_INTERNALS 0
212 #undef CYTHON_USE_UNICODE_INTERNALS
213 #define CYTHON_USE_UNICODE_INTERNALS 0
214 #undef CYTHON_USE_UNICODE_WRITER
215 #define CYTHON_USE_UNICODE_WRITER 0
216 #undef CYTHON_USE_PYLONG_INTERNALS
217 #define CYTHON_USE_PYLONG_INTERNALS 0
218 #undef CYTHON_AVOID_BORROWED_REFS
219 #define CYTHON_AVOID_BORROWED_REFS 1
220 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
221 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
222 #undef CYTHON_ASSUME_SAFE_MACROS
223 #define CYTHON_ASSUME_SAFE_MACROS 0
224 #undef CYTHON_ASSUME_SAFE_SIZE
225 #define CYTHON_ASSUME_SAFE_SIZE 0
226 #undef CYTHON_UNPACK_METHODS
227 #define CYTHON_UNPACK_METHODS 0
228 #undef CYTHON_FAST_THREAD_STATE
229 #define CYTHON_FAST_THREAD_STATE 0
230 #undef CYTHON_FAST_GIL
231 #define CYTHON_FAST_GIL 0
232 #ifndef CYTHON_VECTORCALL
233 #define CYTHON_VECTORCALL 1
235 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
236 #undef CYTHON_VECTORCALL_TPNEW
237 #define CYTHON_VECTORCALL_TPNEW 0
238 #elif !defined(CYTHON_VECTORCALL_TPNEW)
239 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
241 #ifndef CYTHON_PEP487_INIT_SUBCLASS
242 #define CYTHON_PEP487_INIT_SUBCLASS 1
244 #undef CYTHON_PEP489_MULTI_PHASE_INIT
245 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
246 #undef CYTHON_USE_MODULE_STATE
247 #define CYTHON_USE_MODULE_STATE 0
248 #undef CYTHON_USE_SYS_MONITORING
249 #define CYTHON_USE_SYS_MONITORING 0
250 #undef CYTHON_USE_TP_FINALIZE
251 #define CYTHON_USE_TP_FINALIZE 0
252 #undef CYTHON_USE_AM_SEND
253 #define CYTHON_USE_AM_SEND 0
254 #undef CYTHON_USE_DICT_VERSIONS
255 #define CYTHON_USE_DICT_VERSIONS 0
256 #undef CYTHON_USE_EXC_INFO_STACK
257 #define CYTHON_USE_EXC_INFO_STACK 1
258 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
259 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
261 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
262 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
264 #undef CYTHON_USE_FREELISTS
265 #define CYTHON_USE_FREELISTS 0
266 #undef CYTHON_IMMORTAL_CONSTANTS
267 #define CYTHON_IMMORTAL_CONSTANTS 0
268 #undef CYTHON_OPAQUE_OBJECTS
269 #define CYTHON_OPAQUE_OBJECTS 0
270#elif defined(PYPY_VERSION)
271 #define CYTHON_COMPILING_IN_PYPY 1
272 #define CYTHON_COMPILING_IN_CPYTHON 0
273 #define CYTHON_COMPILING_IN_LIMITED_API 0
274 #define CYTHON_COMPILING_IN_GRAAL 0
275 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
276 #undef CYTHON_USE_TYPE_SLOTS
277 #define CYTHON_USE_TYPE_SLOTS 1
278 #ifndef CYTHON_USE_TYPE_SPECS
279 #define CYTHON_USE_TYPE_SPECS 0
281 #undef CYTHON_USE_PYTYPE_LOOKUP
282 #define CYTHON_USE_PYTYPE_LOOKUP 0
283 #undef CYTHON_USE_PYLIST_INTERNALS
284 #define CYTHON_USE_PYLIST_INTERNALS 0
285 #undef CYTHON_USE_UNICODE_INTERNALS
286 #define CYTHON_USE_UNICODE_INTERNALS 0
287 #undef CYTHON_USE_UNICODE_WRITER
288 #define CYTHON_USE_UNICODE_WRITER 0
289 #undef CYTHON_USE_PYLONG_INTERNALS
290 #define CYTHON_USE_PYLONG_INTERNALS 0
291 #undef CYTHON_AVOID_BORROWED_REFS
292 #define CYTHON_AVOID_BORROWED_REFS 1
293 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
294 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
295 #undef CYTHON_ASSUME_SAFE_MACROS
296 #define CYTHON_ASSUME_SAFE_MACROS 0
297 #ifndef CYTHON_ASSUME_SAFE_SIZE
298 #define CYTHON_ASSUME_SAFE_SIZE 1
300 #undef CYTHON_UNPACK_METHODS
301 #define CYTHON_UNPACK_METHODS 0
302 #undef CYTHON_FAST_THREAD_STATE
303 #define CYTHON_FAST_THREAD_STATE 0
304 #undef CYTHON_FAST_GIL
305 #define CYTHON_FAST_GIL 0
306 #ifndef CYTHON_VECTORCALL
307 #define CYTHON_VECTORCALL 1
309 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
310 #undef CYTHON_VECTORCALL_TPNEW
311 #define CYTHON_VECTORCALL_TPNEW 0
312 #elif !defined(CYTHON_VECTORCALL_TPNEW)
313 #define CYTHON_VECTORCALL_TPNEW (PYPY_VERSION_NUM >= 0x07030800 && CYTHON_VECTORCALL)
315 #ifndef CYTHON_PEP487_INIT_SUBCLASS
316 #define CYTHON_PEP487_INIT_SUBCLASS 1
318 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
319 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
321 #undef CYTHON_USE_MODULE_STATE
322 #define CYTHON_USE_MODULE_STATE 0
323 #undef CYTHON_USE_SYS_MONITORING
324 #define CYTHON_USE_SYS_MONITORING 0
325 #ifndef CYTHON_USE_TP_FINALIZE
326 #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
328 #undef CYTHON_USE_AM_SEND
329 #define CYTHON_USE_AM_SEND 0
330 #undef CYTHON_USE_DICT_VERSIONS
331 #define CYTHON_USE_DICT_VERSIONS 0
332 #undef CYTHON_USE_EXC_INFO_STACK
333 #define CYTHON_USE_EXC_INFO_STACK 0
334 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
335 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
337 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
338 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
340 #undef CYTHON_USE_FREELISTS
341 #define CYTHON_USE_FREELISTS 0
342 #undef CYTHON_IMMORTAL_CONSTANTS
343 #define CYTHON_IMMORTAL_CONSTANTS 0
344 #undef CYTHON_OPAQUE_OBJECTS
345 #define CYTHON_OPAQUE_OBJECTS 0
347 #define CYTHON_COMPILING_IN_PYPY 0
348 #define CYTHON_COMPILING_IN_CPYTHON 1
349 #define CYTHON_COMPILING_IN_LIMITED_API 0
350 #define CYTHON_COMPILING_IN_GRAAL 0
351 #ifdef Py_GIL_DISABLED
352 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
354 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
356 #if PY_VERSION_HEX < 0x030A0000
357 #undef CYTHON_USE_TYPE_SLOTS
358 #define CYTHON_USE_TYPE_SLOTS 1
359 #elif !defined(CYTHON_USE_TYPE_SLOTS)
360 #define CYTHON_USE_TYPE_SLOTS 1
362 #ifndef CYTHON_USE_TYPE_SPECS
363 #define CYTHON_USE_TYPE_SPECS 0
365 #ifndef CYTHON_USE_PYTYPE_LOOKUP
366 #define CYTHON_USE_PYTYPE_LOOKUP 1
368 #ifndef CYTHON_USE_PYLONG_INTERNALS
369 #define CYTHON_USE_PYLONG_INTERNALS 1
371 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
372 #undef CYTHON_USE_PYLIST_INTERNALS
373 #define CYTHON_USE_PYLIST_INTERNALS 0
374 #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
375 #define CYTHON_USE_PYLIST_INTERNALS 1
377 #ifndef CYTHON_USE_UNICODE_INTERNALS
378 #define CYTHON_USE_UNICODE_INTERNALS 1
380 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
381 #undef CYTHON_USE_UNICODE_WRITER
382 #define CYTHON_USE_UNICODE_WRITER 0
383 #elif !defined(CYTHON_USE_UNICODE_WRITER)
384 #define CYTHON_USE_UNICODE_WRITER 1
386 #ifndef CYTHON_AVOID_BORROWED_REFS
387 #define CYTHON_AVOID_BORROWED_REFS 0
389 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
390 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
391 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
392 #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
393 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
395 #ifndef CYTHON_ASSUME_SAFE_MACROS
396 #define CYTHON_ASSUME_SAFE_MACROS 1
398 #ifndef CYTHON_ASSUME_SAFE_SIZE
399 #define CYTHON_ASSUME_SAFE_SIZE 1
401 #ifndef CYTHON_UNPACK_METHODS
402 #define CYTHON_UNPACK_METHODS 1
404 #ifndef CYTHON_FAST_THREAD_STATE
405 #define CYTHON_FAST_THREAD_STATE 1
407 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
408 #undef CYTHON_FAST_GIL
409 #define CYTHON_FAST_GIL 0
410 #elif !defined(CYTHON_FAST_GIL)
411 #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
413 #ifndef CYTHON_VECTORCALL
414 #define CYTHON_VECTORCALL 1
416 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
417 #undef CYTHON_VECTORCALL_TPNEW
418 #define CYTHON_VECTORCALL_TPNEW 0
419 #elif !defined(CYTHON_VECTORCALL_TPNEW)
420 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
422 #ifndef CYTHON_PEP487_INIT_SUBCLASS
423 #define CYTHON_PEP487_INIT_SUBCLASS 1
425 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
426 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
428 #ifndef CYTHON_USE_MODULE_STATE
429 #define CYTHON_USE_MODULE_STATE 0
431 #ifndef CYTHON_USE_SYS_MONITORING
432 #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
434 #ifndef CYTHON_USE_TP_FINALIZE
435 #define CYTHON_USE_TP_FINALIZE 1
437 #ifndef CYTHON_USE_AM_SEND
438 #define CYTHON_USE_AM_SEND 1
440 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
441 #undef CYTHON_USE_DICT_VERSIONS
442 #define CYTHON_USE_DICT_VERSIONS 0
443 #elif !defined(CYTHON_USE_DICT_VERSIONS)
444 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
446 #ifndef CYTHON_USE_EXC_INFO_STACK
447 #define CYTHON_USE_EXC_INFO_STACK 1
449 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
450 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
452 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
453 #define CYTHON_USE_OWN_PREP_RERAISE_STAR (PY_VERSION_HEX < 0x030C00B2)
455 #ifndef CYTHON_USE_FREELISTS
456 #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
458 #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
459 #undef CYTHON_IMMORTAL_CONSTANTS
460 #define CYTHON_IMMORTAL_CONSTANTS 0
461 #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
462 #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
464 #ifndef CYTHON_OPAQUE_OBJECTS
465 #define CYTHON_OPAQUE_OBJECTS 0
468#if CYTHON_USE_PYLONG_INTERNALS
473 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P ==
sizeof(
void*)) };
476#ifndef __has_attribute
477 #define __has_attribute(x) 0
479#ifndef __has_cpp_attribute
480 #define __has_cpp_attribute(x) 0
482#ifndef CYTHON_RESTRICT
483 #if defined(__GNUC__)
484 #define CYTHON_RESTRICT __restrict__
485 #elif defined(_MSC_VER) && _MSC_VER >= 1400
486 #define CYTHON_RESTRICT __restrict
487 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
488 #define CYTHON_RESTRICT restrict
490 #define CYTHON_RESTRICT
494 #if defined(__cplusplus)
497 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
498 #if __has_cpp_attribute(maybe_unused)
499 #define CYTHON_UNUSED [[maybe_unused]]
502 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
503 #define CYTHON_UNUSED [[maybe_unused]]
507# if defined(__GNUC__)
508# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
509# define CYTHON_UNUSED __attribute__ ((__unused__))
511# define CYTHON_UNUSED
513# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
514# define CYTHON_UNUSED __attribute__ ((__unused__))
516# define CYTHON_UNUSED
519#ifndef CYTHON_UNUSED_VAR
520# if defined(__cplusplus)
521 template<
class T>
void CYTHON_UNUSED_VAR(
const T& ) { }
523# define CYTHON_UNUSED_VAR(x) (void)(x)
526#ifndef CYTHON_MAYBE_UNUSED_VAR
527 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
529#ifndef CYTHON_NCP_UNUSED
530# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
531# define CYTHON_NCP_UNUSED
533# define CYTHON_NCP_UNUSED CYTHON_UNUSED
536#ifndef CYTHON_USE_CPP_STD_MOVE
537 #if defined(__cplusplus) && (\
538 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
539 #define CYTHON_USE_CPP_STD_MOVE 1
541 #define CYTHON_USE_CPP_STD_MOVE 0
544#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
546typedef uintptr_t __pyx_uintptr_t;
547#ifndef CYTHON_FALLTHROUGH
548 #if defined(__cplusplus)
551 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
552 #if __has_cpp_attribute(fallthrough)
553 #define CYTHON_FALLTHROUGH [[fallthrough]]
556 #ifndef CYTHON_FALLTHROUGH
557 #if __has_cpp_attribute(clang::fallthrough)
558 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
559 #elif __has_cpp_attribute(gnu::fallthrough)
560 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
564 #ifndef CYTHON_FALLTHROUGH
565 #if __has_attribute(fallthrough)
566 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
568 #define CYTHON_FALLTHROUGH
571 #if defined(__clang__) && defined(__apple_build_version__)
572 #if __apple_build_version__ < 7000000
573 #undef CYTHON_FALLTHROUGH
574 #define CYTHON_FALLTHROUGH
579 #define __Pyx_UNREACHABLE() Py_UNREACHABLE()
580#elif __Pyx_has_cbuiltin(__builtin_unreachable)
581 #define __Pyx_UNREACHABLE() __builtin_unreachable()
582#elif defined(__clang__) || defined(__INTEL_COMPILER) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
583 #define __Pyx_UNREACHABLE() __builtin_unreachable()
584#elif defined(_MSC_VER)
585 #define __Pyx_UNREACHABLE() __assume(0)
587 #define __Pyx_UNREACHABLE() Py_FatalError("Unreachable C code path reached")
589#ifndef Py_UNREACHABLE
590 #define Py_UNREACHABLE() __Pyx_UNREACHABLE()
593 template <
typename T>
594 struct __PYX_IS_UNSIGNED_IMPL {
static const bool value =
T(0) <
T(-1);};
595 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
597 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
599#if CYTHON_COMPILING_IN_PYPY == 1
600 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
602 #define __PYX_NEED_TP_PRINT_SLOT 0
604#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
605#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
606#define __Pyx_PyErr_FetchException(petype, peval, petb) PyErr_Fetch(petype, peval, petb)
607#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_Restore(etype, eval, etb)
609#define __Pyx_PyErr_FetchException(petype, peval, petb) *(petype)=NULL; *(peval)=PyErr_GetRaisedException(); *(petb)=NULL
610#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_SetRaisedException(eval)
615 #if defined(__clang__)
616 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
617 #elif defined(__GNUC__)
618 #define CYTHON_INLINE __inline__
619 #elif defined(_MSC_VER)
620 #define CYTHON_INLINE __inline
621 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
622 #define CYTHON_INLINE inline
624 #define CYTHON_INLINE
629#define __PYX_BUILD_PY_SSIZE_T "n"
630#define CYTHON_FORMAT_SSIZE_T "z"
631#define __Pyx_BUILTIN_MODULE_NAME "builtins"
632#define __Pyx_DefaultClassType PyType_Type
633#if CYTHON_COMPILING_IN_LIMITED_API
635 static int CO_OPTIMIZED;
638 static int CO_NEWLOCALS;
641 static int CO_VARARGS;
643 #ifndef CO_VARKEYWORDS
644 static int CO_VARKEYWORDS;
646 #ifndef CO_ASYNC_GENERATOR
647 static int CO_ASYNC_GENERATOR;
650 static int CO_GENERATOR;
653 static int CO_COROUTINE;
657 #define CO_COROUTINE 0x80
659 #ifndef CO_ASYNC_GENERATOR
660 #define CO_ASYNC_GENERATOR 0x200
663static int __Pyx_init_co_variables(
void);
664#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
665 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
667 #define __Pyx_Py_Is(x, y) ((x) == (y))
669#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
670 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
672 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
674#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
675 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
677 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
679#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
680 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
682 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
684#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
685#if CYTHON_COMPILING_IN_PYPY
686 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
688 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
690#if CYTHON_COMPILING_IN_LIMITED_API
691static unsigned long __Pyx_Runtime_TPFLAGS_SEQUENCE;
692static unsigned long __Pyx_Runtime_TPFLAGS_MAPPING;
694#define __Pyx_Runtime_TPFLAGS_SEQUENCE Py_TPFLAGS_SEQUENCE
695#define __Pyx_Runtime_TPFLAGS_MAPPING Py_TPFLAGS_MAPPING
697static int __Pyx_init_tpflags_variables(
void);
698#ifndef Py_TPFLAGS_HAVE_FINALIZE
699 #define Py_TPFLAGS_HAVE_FINALIZE 0
701#ifndef Py_TPFLAGS_SEQUENCE
702 #define Py_TPFLAGS_SEQUENCE (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 5)
704#ifndef Py_TPFLAGS_MAPPING
705 #define Py_TPFLAGS_MAPPING (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 6)
707#ifndef Py_TPFLAGS_IMMUTABLETYPE
708 #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
710#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
711 #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
713#ifndef METH_STACKLESS
714 #define METH_STACKLESS 0
716#if !defined(METH_FASTCALL) || CYTHON_COMPILING_IN_PYPY
717 #ifndef METH_FASTCALL
718 #define METH_FASTCALL 0x80
720 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *
const *args, Py_ssize_t nargs);
721 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *
const *args,
722 Py_ssize_t nargs, PyObject *kwnames);
724 #if PY_VERSION_HEX >= 0x030d00A4
725 # define __Pyx_PyCFunctionFast PyCFunctionFast
726 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
728 # define __Pyx_PyCFunctionFast _PyCFunctionFast
729 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
733 #define __Pyx_METH_FASTCALL METH_FASTCALL
734 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
735 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
737 #define __Pyx_METH_FASTCALL METH_VARARGS
738 #define __Pyx_PyCFunction_FastCall PyCFunction
739 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
742 #define __pyx_vectorcallfunc vectorcallfunc
743 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
744 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
746 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
747 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
749#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
750#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
751#if CYTHON_COMPILING_IN_CPYTHON
752#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
753#elif !CYTHON_COMPILING_IN_LIMITED_API
754#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
756#if CYTHON_COMPILING_IN_CPYTHON
757#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
758static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
759 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
762static CYTHON_INLINE
int __Pyx__IsSameCFunction(PyObject *func,
void (*cfunc)(
void)) {
763#if CYTHON_COMPILING_IN_LIMITED_API
764 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
766 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
769#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
770#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
771 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
773 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
775#if CYTHON_COMPILING_IN_PYPY
776 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *
const *, size_t, PyObject *);
778 #define __Pyx_PyCMethod PyCMethod
781 #define METH_METHOD 0x200
783#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
784 #define PyObject_Malloc(s) PyMem_Malloc(s)
785 #define PyObject_Free(p) PyMem_Free(p)
786 #define PyObject_Realloc(p) PyMem_Realloc(p)
788#if CYTHON_COMPILING_IN_LIMITED_API
789 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
790#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
791 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
792 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
793#elif CYTHON_COMPILING_IN_GRAAL
794 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
795 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
797 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
798 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
800#if CYTHON_COMPILING_IN_LIMITED_API
801 #define __Pyx_PyThreadState_Current PyThreadState_Get()
802#elif !CYTHON_FAST_THREAD_STATE
803 #define __Pyx_PyThreadState_Current PyThreadState_GET()
804#elif PY_VERSION_HEX >= 0x030d00A1
805 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
807 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
809#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
810 #define __PYX_SHARED_SIZEOF(T) -((int)sizeof(T))
811 #define __PYX_SHARED_RELATIVE_OFFSET Py_RELATIVE_OFFSET
812 #define CYTHON_OPAQUE_SHARED_TYPES 1
814 #define __PYX_SHARED_SIZEOF(T) sizeof(T)
815 #define __PYX_SHARED_RELATIVE_OFFSET 0
816 #define CYTHON_OPAQUE_SHARED_TYPES 0
818#if CYTHON_USE_MODULE_STATE
819static CYTHON_INLINE
void *__Pyx__PyModule_GetState(PyObject *op)
822 result = PyModule_GetState(op);
824 Py_FatalError(
"Couldn't find the module state");
827#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
829#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
831#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
832#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
833#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
834#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
835#if CYTHON_USE_TYPE_SLOTS
836 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
837 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
838 #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
839 #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
841 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
842 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
843 ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
844 (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
845 __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
846 #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
847 #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
849#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
850#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
852#define __Pyx_PyDict_NewPresized(n) PyDict_New()
854#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
855#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
856#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
857#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
858static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
859 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
860 if (res == NULL && PyErr_Occurred()) {
861 PyErr_WriteUnraisable(NULL);
865#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
866#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
867#define __Pyx_PyDict_GetItemStr PyDict_GetItem
869static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
870#if CYTHON_COMPILING_IN_PYPY
871 return PyDict_GetItem(dict, name);
874 PyDictObject *mp = (PyDictObject*) dict;
875 long hash = ((PyStringObject *) name)->ob_shash;
877 ep = (mp->ma_lookup)(mp, name, hash);
884#define __Pyx_PyDict_GetItemStr PyDict_GetItem
886#if CYTHON_USE_TYPE_SLOTS
887 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
888 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
890 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
891 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
893#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
894#if CYTHON_USE_TYPE_SPECS
895#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
896 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
897 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
898 PyObject_GC_Del(obj);\
902#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
904#if CYTHON_COMPILING_IN_LIMITED_API
905 #define __Pyx_PyUnicode_READY(op) (0)
906 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
907 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
908 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
909 #define __Pyx_PyUnicode_KIND_04(u) __Pyx_PyUnicode_KIND(u)
910 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
911 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
912 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
914 #if PY_VERSION_HEX >= 0x030C0000
915 #define __Pyx_PyUnicode_READY(op) (0)
917 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
918 0 : _PyUnicode_Ready((PyObject *)(op)))
920 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
921 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
922 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
923 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
924 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
925 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
926 #if PY_VERSION_HEX >= 0x030C0000
927 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
929 #if CYTHON_COMPILING_IN_CPYTHON
930 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
932 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
935 static CYTHON_INLINE
int __Pyx_PyUnicode_KIND_04(PyObject *o) {
936 return __Pyx_PyUnicode_KIND(o) - (int) !!PyUnicode_IS_ASCII(o);
939#if CYTHON_COMPILING_IN_PYPY
940 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
941 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
943 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
944 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
945 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
947#if CYTHON_COMPILING_IN_PYPY
948 #if !defined(PyUnicode_DecodeUnicodeEscape)
949 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
951 #if !defined(PyUnicode_Contains)
952 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
954 #if !defined(PyByteArray_Check)
955 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
957 #if !defined(PyObject_Format)
958 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
961#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
962#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
963 #define __Pyx_PySequence_ListKeepNew(obj)\
964 (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
965#elif CYTHON_COMPILING_IN_CPYTHON
966 #define __Pyx_PySequence_ListKeepNew(obj)\
967 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
969 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
971#ifndef PySet_CheckExact
972 #define PySet_CheckExact(obj) Py_IS_TYPE(obj, &PySet_Type)
974enum __Pyx_ReferenceSharing {
975 __Pyx_ReferenceSharing_DefinitelyUnique,
976 __Pyx_ReferenceSharing_OwnStrongReference,
977 __Pyx_ReferenceSharing_FunctionArgument,
978 __Pyx_ReferenceSharing_SharedReference,
980#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
981#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
982 (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
983 (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
984 (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
985#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
986#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
988#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
990#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
991 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
992#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
993 #if CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
994 #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
996 #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
998#elif CYTHON_COMPILING_IN_LIMITED_API || !(CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE)
999 #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
1001 #define __Pyx_PyList_GetItemRef(o, i) (likely(__Pyx_is_valid_index(i, PyList_GET_SIZE(o))) ?\
1002 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1004#if CYTHON_AVOID_BORROWED_REFS || CYTHON_COMPILING_IN_LIMITED_API
1005 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1006 __Pyx_PyList_GetItemRef(o, i))
1007#elif CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1008 #if CYTHON_ASSUME_SAFE_MACROS
1009 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1010 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1011 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1013 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1014 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1015 __Pyx_XNewRef(PyList_GetItem(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1017#elif CYTHON_ASSUME_SAFE_MACROS
1018 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1019 __Pyx_NewRef(PyList_GET_ITEM(o, i)))
1021 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1022 __Pyx_XNewRef(PyList_GetItem(o, i)))
1024#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1025#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
1026#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1027static CYTHON_INLINE
int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1028 *result = PyObject_GetItem(dict, key);
1029 if (*result == NULL) {
1030 if (PyErr_ExceptionMatches(PyExc_KeyError)) {
1039static CYTHON_INLINE
int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1040 *result = PyDict_GetItemWithError(dict, key);
1041 if (*result == NULL) {
1042 return PyErr_Occurred() ? -1 : 0;
1048#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
1049 #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
1051 #define __Pyx_VISIT_CONST(obj)
1053#if CYTHON_ASSUME_SAFE_MACROS
1054 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1055 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1056 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1057 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
1058 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1059 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
1061 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1062 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1063 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1064 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
1065 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1066 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
1068#if CYTHON_ASSUME_SAFE_SIZE
1069 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1070 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1071 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1072 #define __Pyx_PyDict_GET_SIZE(o) PyDict_GET_SIZE(o)
1073 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1074 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1075 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
1077 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1078 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1079 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1080 #define __Pyx_PyDict_GET_SIZE(o) PyDict_Size(o)
1081 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1082 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1083 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
1085#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
1086 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1088#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
1089#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t
1090#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1091 #define __Pyx_PySendResult PySendResult
1097 } __Pyx_PySendResult;
1099#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
1100 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
1102 #define __Pyx_pyiter_sendfunc sendfunc
1104#if !CYTHON_USE_AM_SEND
1105#define __PYX_HAS_PY_AM_SEND 0
1106#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1107#define __PYX_HAS_PY_AM_SEND 1
1109#define __PYX_HAS_PY_AM_SEND 2
1111#if __PYX_HAS_PY_AM_SEND < 2
1112 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1118 __Pyx_pyiter_sendfunc am_send;
1119 } __Pyx_PyAsyncMethodsStruct;
1120 #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
1122#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
1123 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
1125 #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
1127#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
1131PyAPI_FUNC(
void *) PyMem_Calloc(
size_t nelem,
size_t elsize);
1133#if CYTHON_COMPILING_IN_LIMITED_API
1134static int __Pyx_init_co_variable(PyObject *inspect,
const char* name,
int *write_to) {
1136 PyObject *py_value = PyObject_GetAttrString(inspect, name);
1137 if (!py_value)
return 0;
1138 value = (int) PyLong_AsLong(py_value);
1139 Py_DECREF(py_value);
1141 return value != -1 || !PyErr_Occurred();
1143static int __Pyx_init_co_variables(
void) {
1146 inspect = PyImport_ImportModule(
"inspect");
1148#if !defined(CO_OPTIMIZED)
1149 __Pyx_init_co_variable(inspect,
"CO_OPTIMIZED", &CO_OPTIMIZED) &&
1151#if !defined(CO_NEWLOCALS)
1152 __Pyx_init_co_variable(inspect,
"CO_NEWLOCALS", &CO_NEWLOCALS) &&
1154#if !defined(CO_VARARGS)
1155 __Pyx_init_co_variable(inspect,
"CO_VARARGS", &CO_VARARGS) &&
1157#if !defined(CO_VARKEYWORDS)
1158 __Pyx_init_co_variable(inspect,
"CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
1160#if !defined(CO_ASYNC_GENERATOR)
1161 __Pyx_init_co_variable(inspect,
"CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
1163#if !defined(CO_GENERATOR)
1164 __Pyx_init_co_variable(inspect,
"CO_GENERATOR", &CO_GENERATOR) &&
1166#if !defined(CO_COROUTINE)
1167 __Pyx_init_co_variable(inspect,
"CO_COROUTINE", &CO_COROUTINE) &&
1171 return result ? 0 : -1;
1173static int __Pyx_init_tpflags_bitcount(
unsigned long flag) {
1176 count += (int) (flag & 1);
1181static int __Pyx_init_tpflags_variables(
void) {
1182 if (__Pyx_Runtime_TPFLAGS_SEQUENCE != 0 && __Pyx_Runtime_TPFLAGS_MAPPING != 0) {
1185 PyObject *collections_abc = PyImport_ImportModule(
"collections.abc");
1186 if (!collections_abc)
return -1;
1188 PyObject *sequence = NULL, *mapping = NULL;
1189#if __PYX_LIMITED_VERSION_HEX >= 0x030D0000
1190 if (PyObject_GetOptionalAttrString(collections_abc,
"Sequence", &sequence) != 1)
goto fail;
1191 if (PyObject_GetOptionalAttrString(collections_abc,
"Mapping", &mapping) != 1)
goto fail;
1193 sequence = PyObject_GetAttrString(collections_abc,
"Sequence");
1194 if (!sequence)
goto fail_attr_lookup;
1195 mapping = PyObject_GetAttrString(collections_abc,
"Mapping");
1196 if (!mapping)
goto fail_attr_lookup;
1198 if (!PyType_Check(sequence) || !PyType_Check(mapping))
goto fail;
1200 unsigned long sequence_flags = PyType_GetFlags((PyTypeObject*)sequence);
1201 unsigned long mapping_flags = PyType_GetFlags((PyTypeObject*)mapping);
1202 unsigned long mutual_flags = sequence_flags & mapping_flags;
1203 sequence_flags = sequence_flags ^ mutual_flags;
1204 mapping_flags = mapping_flags ^ mutual_flags;
1205 if (__Pyx_Runtime_TPFLAGS_SEQUENCE == 0 && __Pyx_init_tpflags_bitcount(sequence_flags) == 1) {
1206 __Pyx_Runtime_TPFLAGS_SEQUENCE = sequence_flags;
1208 if (__Pyx_Runtime_TPFLAGS_MAPPING == 0 && __Pyx_init_tpflags_bitcount(mapping_flags) == 1) {
1209 __Pyx_Runtime_TPFLAGS_MAPPING = mapping_flags;
1213 Py_XDECREF(mapping);
1214 Py_XDECREF(sequence);
1215 Py_DECREF(collections_abc);
1217#if __PYX_LIMITED_VERSION_HEX < 0x030D0000
1219 if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
1224 result = PyErr_Occurred() ? -1 : 0;
1228static int __Pyx_init_co_variables(
void) {
1231static int __Pyx_init_tpflags_variables(
void) {
1237#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1238 #ifndef _USE_MATH_DEFINES
1239 #define _USE_MATH_DEFINES
1243#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1244#define __Pyx_truncl trunc
1246#define __Pyx_truncl truncl
1249#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1250#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 1
1252#ifndef CYTHON_CLINE_IN_TRACEBACK
1253#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1255#if CYTHON_CLINE_IN_TRACEBACK
1256#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
1258#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
1260#define __PYX_ERR(f_index, lineno, Ln_error) \
1261 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1263#ifdef CYTHON_EXTERN_C
1264 #undef __PYX_EXTERN_C
1265 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1266#elif defined(__PYX_EXTERN_C)
1268 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1270 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1274 #define __PYX_EXTERN_C extern "C"
1276 #define __PYX_EXTERN_C extern
1280#define __PYX_HAVE__Isosurface
1281#define __PYX_HAVE_API__Isosurface
1288#include "numpy/arrayobject.h"
1289#include "numpy/ndarrayobject.h"
1290#include "numpy/ndarraytypes.h"
1291#include "numpy/arrayscalars.h"
1292#include "numpy/ufuncobject.h"
1298#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1299#define CYTHON_WITHOUT_ASSERTIONS
1302#ifdef CYTHON_FREETHREADING_COMPATIBLE
1303#if CYTHON_FREETHREADING_COMPATIBLE
1304#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
1306#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1309#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1311#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1312#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1313#define __PYX_DEFAULT_STRING_ENCODING ""
1314#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1315#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1316#define __Pyx_uchar_cast(c) ((unsigned char)c)
1317#define __Pyx_long_cast(x) ((long)x)
1318#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1319 (sizeof(type) < sizeof(Py_ssize_t)) ||\
1320 (sizeof(type) > sizeof(Py_ssize_t) &&\
1321 likely(v < (type)PY_SSIZE_T_MAX ||\
1322 v == (type)PY_SSIZE_T_MAX) &&\
1323 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1324 v == (type)PY_SSIZE_T_MIN))) ||\
1325 (sizeof(type) == sizeof(Py_ssize_t) &&\
1326 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1327 v == (type)PY_SSIZE_T_MAX))) )
1328static CYTHON_INLINE
int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1329 return (
size_t) i < (size_t) limit;
1331#if defined (__cplusplus) && __cplusplus >= 201103L
1333 #define __Pyx_sst_abs(value) std::abs(value)
1334#elif SIZEOF_INT >= SIZEOF_SIZE_T
1335 #define __Pyx_sst_abs(value) abs(value)
1336#elif SIZEOF_LONG >= SIZEOF_SIZE_T
1337 #define __Pyx_sst_abs(value) labs(value)
1338#elif defined (_MSC_VER)
1339 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1340#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1341 #define __Pyx_sst_abs(value) llabs(value)
1342#elif defined (__GNUC__)
1343 #define __Pyx_sst_abs(value) __builtin_llabs(value)
1345 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1347static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(
const char *
s);
1348static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject*);
1349static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1350static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(
const char*);
1351#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1352#define __Pyx_PyBytes_FromString PyBytes_FromString
1353#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1354static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char*);
1355#if CYTHON_ASSUME_SAFE_MACROS
1356 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1357 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1358 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1359 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1360 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1361 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1362 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
1364 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
1365 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
1366 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
1367 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
1368 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
1369 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
1370 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
1372#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1373#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1374#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1375#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1376#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1377#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1378#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1379#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1380#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1381#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1382#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1383static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
1384#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
1385 return Py_NewRef(obj);
1391static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
1392#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
1393 return Py_XNewRef(obj);
1399static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(
int b);
1400static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b);
1401static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject*);
1402static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1403static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
1404#define __Pyx_PyObject_RichCompareBool(a,b,cmp) __Pyx_PyObject_IsTrueAndDecref(PyObject_RichCompare((a),(b),(cmp)))
1405#define __Pyx_PySequence_Tuple(obj)\
1406 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1407static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1408static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(
size_t);
1409static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1410#if CYTHON_ASSUME_SAFE_MACROS
1411#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1412#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
1413#define __Pyx_PyFloat_IsNonZero(x) (PyFloat_AS_DOUBLE(x) != 0.0)
1415#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1416#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
1417#define __Pyx_PyFloat_IsNonZero(x) PyObject_IsTrue(x)
1419#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
1420#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1421#if CYTHON_USE_PYLONG_INTERNALS
1422 #if PY_VERSION_HEX >= 0x030C00A7
1423 #ifndef _PyLong_SIGN_MASK
1424 #define _PyLong_SIGN_MASK 3
1426 #ifndef _PyLong_NON_SIZE_BITS
1427 #define _PyLong_NON_SIZE_BITS 3
1429 #define __Pyx_PyLong_SignBits(x) ((int) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK))
1430 #define __Pyx_PyLong_Sign(x) (1 - __Pyx_PyLong_SignBits(x))
1431 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_SignBits(x) & 2) != 0)
1432 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1433 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_SignBits(x) & 1)
1434 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_SignBits(x) == 0)
1435 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1436 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1437 #define __Pyx_PyLong_SignedDigitCount(x)\
1438 (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1439 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1440 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1441 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1443 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1444 #define __Pyx_PyLong_CompactValue(x) (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1446 static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_CompareSignAndSize(PyObject *a, PyObject *b) {
1447 uintptr_t tag_a = ((PyLongObject*)a)->long_value.lv_tag;
1448 uintptr_t tag_b = ((PyLongObject*)b)->long_value.lv_tag;
1449 if (tag_a == tag_b)
return 0;
1450 int sign_a = (int) (tag_a & _PyLong_SIGN_MASK);
1451 int sign_b = (int) (tag_b & _PyLong_SIGN_MASK);
1452 if (sign_a > sign_b)
return -1;
1453 if (sign_a < sign_b)
return 1;
1454 Py_ssize_t size_a = (Py_ssize_t) (tag_a >> _PyLong_NON_SIZE_BITS);
1455 Py_ssize_t size_b = (Py_ssize_t) (tag_b >> _PyLong_NON_SIZE_BITS);
1456 return (1 - sign_a) * (size_a - size_b);
1458 typedef Py_ssize_t __Pyx_compact_pylong;
1459 typedef size_t __Pyx_compact_upylong;
1461 #define __Pyx_PyLong_Sign(x) ((int) ((Py_SIZE(x) == 0) ? 0 : (Py_SIZE(x) < 0) ? -1 : 1))
1462 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1463 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1464 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1465 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1466 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1467 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1468 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1469 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1470 #define __Pyx_PyLong_CompactValue(x)\
1471 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1472 #define __Pyx_PyLong_CompareSignAndSize(a, b) (Py_SIZE(a) - Py_SIZE(b))
1473 typedef sdigit __Pyx_compact_pylong;
1474 typedef digit __Pyx_compact_upylong;
1476 #if PY_VERSION_HEX >= 0x030C00A5
1477 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1479 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1481 #define __Pyx_PyLong_IsNonZero(x) (!__Pyx_PyLong_IsZero(x))
1483 #define __Pyx_PyLong_IsNonZero(x) PyObject_IsTrue(x)
1485#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
1486 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1487#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1488 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
1490 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1495#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1496 #define likely(x) __builtin_expect(!!(x), 1)
1497 #define unlikely(x) __builtin_expect(!!(x), 0)
1499 #define likely(x) (x)
1500 #define unlikely(x) (x)
1504#if __cplusplus > 201103L
1505#include <type_traits>
1507template <
typename T>
1508static void __Pyx_pretend_to_initialize(
T* ptr) {
1509#if __cplusplus > 201103L
1510 if ((std::is_trivially_default_constructible<T>::value))
1516static CYTHON_INLINE
void __Pyx_pretend_to_initialize(
void* ptr) { (void)ptr; }
1520#if !CYTHON_USE_MODULE_STATE
1521static PyObject *__pyx_m = NULL;
1523static const char *
const __pyx_cfilenm = __FILE__;
1526#if !defined(CYTHON_CCOMPLEX)
1527 #if defined(__cplusplus)
1528 #define CYTHON_CCOMPLEX 1
1529 #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
1530 #define CYTHON_CCOMPLEX 1
1532 #define CYTHON_CCOMPLEX 0
1539 #include <complex.h>
1542#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
1544 #define _Complex_I 1.0fj
1549static const char*
const __pyx_f[] = {
1550 "proteus/Isosurface.pyx",
1551 "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd",
1556struct __Pyx_StructField_;
1557#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1560 const struct __Pyx_StructField_* fields;
1562 size_t arraysize[8];
1568typedef struct __Pyx_StructField_ {
1569 const __Pyx_TypeInfo* type;
1574 const __Pyx_StructField* field;
1575 size_t parent_offset;
1576} __Pyx_BufFmt_StackElem;
1578 __Pyx_StructField root;
1579 __Pyx_BufFmt_StackElem* head;
1581 size_t new_count, enc_count;
1582 size_t struct_alignment;
1587 char is_valid_array;
1588} __Pyx_BufFmt_Context;
1591#include <pythread.h>
1592#ifndef CYTHON_ATOMICS
1593 #define CYTHON_ATOMICS 1
1595#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1596#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1597#define __pyx_atomic_int_type int
1598#define __pyx_nonatomic_int_type int
1599#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1600 (__STDC_VERSION__ >= 201112L) &&\
1601 !defined(__STDC_NO_ATOMICS__))
1602 #include <stdatomic.h>
1603#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1604 (__cplusplus >= 201103L) ||\
1605 (defined(_MSC_VER) && _MSC_VER >= 1700)))
1608#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1609 (__STDC_VERSION__ >= 201112L) &&\
1610 !defined(__STDC_NO_ATOMICS__) &&\
1611 ATOMIC_INT_LOCK_FREE == 2)
1612 #undef __pyx_atomic_int_type
1613 #define __pyx_atomic_int_type atomic_int
1614 #define __pyx_atomic_ptr_type atomic_uintptr_t
1615 #define __pyx_nonatomic_ptr_type uintptr_t
1616 #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
1617 #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
1618 #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
1619 #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
1620 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1621 #define __pyx_atomic_load(value) atomic_load(value)
1622 #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
1623 #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
1624 #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
1625 #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1626 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1627 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1628 #pragma message ("Using standard C atomics")
1629 #elif defined(__PYX_DEBUG_ATOMICS)
1630 #warning "Using standard C atomics"
1632#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1633 (__cplusplus >= 201103L) ||\
1635 (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
1636 ATOMIC_INT_LOCK_FREE == 2)
1637 #undef __pyx_atomic_int_type
1638 #define __pyx_atomic_int_type std::atomic_int
1639 #define __pyx_atomic_ptr_type std::atomic_uintptr_t
1640 #define __pyx_nonatomic_ptr_type uintptr_t
1641 #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
1642 #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
1643 #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
1644 #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
1645 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1646 #define __pyx_atomic_load(value) std::atomic_load(value)
1647 #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
1648 #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
1649 #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
1650 #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1651 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1652 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1653 #pragma message ("Using standard C++ atomics")
1654 #elif defined(__PYX_DEBUG_ATOMICS)
1655 #warning "Using standard C++ atomics"
1657#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1658 (__GNUC_MINOR__ > 1 ||\
1659 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1660 #define __pyx_atomic_ptr_type void*
1661 #define __pyx_nonatomic_ptr_type void*
1662 #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
1663 #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
1664 #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
1665 #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
1666 static CYTHON_INLINE
int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1667 __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
1668 int result = old == *expected;
1672 #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
1673 #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
1674 #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
1675 #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
1676 #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
1677 static CYTHON_INLINE
int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1678 __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
1679 int result = old == *expected;
1683 #ifdef __PYX_DEBUG_ATOMICS
1684 #warning "Using GNU atomics"
1686#elif CYTHON_ATOMICS && defined(_MSC_VER)
1688 #undef __pyx_atomic_int_type
1689 #define __pyx_atomic_int_type long
1690 #define __pyx_atomic_ptr_type void*
1691 #undef __pyx_nonatomic_int_type
1692 #define __pyx_nonatomic_int_type long
1693 #define __pyx_nonatomic_ptr_type void*
1694 #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
1695 #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
1696 #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
1697 #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
1698 #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
1699 static CYTHON_INLINE
int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1700 __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
1701 int result = old == *expected;
1705 #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
1706 #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
1707 #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
1708 #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
1709 #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
1710 static CYTHON_INLINE
int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1711 __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
1712 int result = old == *expected;
1716 #ifdef __PYX_DEBUG_ATOMICS
1717 #pragma message ("Using MSVC atomics")
1720 #undef CYTHON_ATOMICS
1721 #define CYTHON_ATOMICS 0
1722 #ifdef __PYX_DEBUG_ATOMICS
1723 #warning "Not using atomics"
1728#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1729#define __Pyx_PyCriticalSection void*
1730#define __Pyx_PyCriticalSection2 void*
1731#define __Pyx_PyCriticalSection_End(cs)
1732#define __Pyx_PyCriticalSection2_End(cs)
1734#define __Pyx_PyCriticalSection PyCriticalSection
1735#define __Pyx_PyCriticalSection2 PyCriticalSection2
1736#define __Pyx_PyCriticalSection_End PyCriticalSection_End
1737#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
1741#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1742#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
1743#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
1745#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
1746#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
1748#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
1749#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
1750#define __Pyx_END_CRITICAL_SECTION() }
1752#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
1753#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
1757#include <structmember.h>
1768typedef npy_int8 __pyx_t_5numpy_int8_t;
1777typedef npy_int16 __pyx_t_5numpy_int16_t;
1786typedef npy_int32 __pyx_t_5numpy_int32_t;
1795typedef npy_int64 __pyx_t_5numpy_int64_t;
1804typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1813typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1822typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1831typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1840typedef npy_float32 __pyx_t_5numpy_float32_t;
1849typedef npy_float64 __pyx_t_5numpy_float64_t;
1858typedef npy_longlong __pyx_t_5numpy_longlong_t;
1867typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1876typedef npy_intp __pyx_t_5numpy_intp_t;
1885typedef npy_uintp __pyx_t_5numpy_uintp_t;
1894typedef npy_double __pyx_t_5numpy_float_t;
1903typedef npy_double __pyx_t_5numpy_double_t;
1912typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1915#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1917 typedef ::std::complex< float > __pyx_t_float_complex;
1919 typedef float _Complex __pyx_t_float_complex;
1922 typedef struct {
float real, imag; } __pyx_t_float_complex;
1924static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float,
float);
1927#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1929 typedef ::std::complex< double > __pyx_t_double_complex;
1931 typedef double _Complex __pyx_t_double_complex;
1934 typedef struct {
double real, imag; } __pyx_t_double_complex;
1936static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double,
double);
1939#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1941 typedef ::std::complex< long double > __pyx_t_long_double_complex;
1943 typedef long double _Complex __pyx_t_long_double_complex;
1946 typedef struct {
long double real, imag; } __pyx_t_long_double_complex;
1948static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double,
long double);
1953struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr;
1954struct __pyx_opt_args_10Isosurface_EVec;
1963struct __pyx_opt_args_10Isosurface_EVec {
1977struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr {
1979 PyObject *__pyx_genexpr_arg_0;
1980 PyObject *__pyx_v_bn;
1981 PyObject *__pyx_v_gn;
1988#ifndef CYTHON_REFNANNY
1989 #define CYTHON_REFNANNY 0
1993 void (*INCREF)(
void*, PyObject*, Py_ssize_t);
1994 void (*DECREF)(
void*, PyObject*, Py_ssize_t);
1995 void (*GOTREF)(
void*, PyObject*, Py_ssize_t);
1996 void (*GIVEREF)(
void*, PyObject*, Py_ssize_t);
1997 void* (*SetupContext)(
const char*, Py_ssize_t,
const char*);
1998 void (*FinishContext)(
void**);
1999 } __Pyx_RefNannyAPIStruct;
2000 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
2001 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname);
2002 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
2003 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2005 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2006 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2007 PyGILState_Release(__pyx_gilstate_save);\
2009 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2011 #define __Pyx_RefNannyFinishContextNogil() {\
2012 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2013 __Pyx_RefNannyFinishContext();\
2014 PyGILState_Release(__pyx_gilstate_save);\
2016 #define __Pyx_RefNannyFinishContextNogil() {\
2017 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2018 __Pyx_RefNannyFinishContext();\
2019 PyGILState_Release(__pyx_gilstate_save);\
2021 #define __Pyx_RefNannyFinishContext()\
2022 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
2023 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2024 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2025 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2026 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2027 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
2028 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
2029 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
2030 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
2032 #define __Pyx_RefNannyDeclarations
2033 #define __Pyx_RefNannySetupContext(name, acquire_gil)
2034 #define __Pyx_RefNannyFinishContextNogil()
2035 #define __Pyx_RefNannyFinishContext()
2036 #define __Pyx_INCREF(r) Py_INCREF(r)
2037 #define __Pyx_DECREF(r) Py_DECREF(r)
2038 #define __Pyx_GOTREF(r)
2039 #define __Pyx_GIVEREF(r)
2040 #define __Pyx_XINCREF(r) Py_XINCREF(r)
2041 #define __Pyx_XDECREF(r) Py_XDECREF(r)
2042 #define __Pyx_XGOTREF(r)
2043 #define __Pyx_XGIVEREF(r)
2045#define __Pyx_Py_XDECREF_SET(r, v) do {\
2046 PyObject *tmp = (PyObject *) r;\
2047 r = v; Py_XDECREF(tmp);\
2049#define __Pyx_XDECREF_SET(r, v) do {\
2050 PyObject *tmp = (PyObject *) r;\
2051 r = v; __Pyx_XDECREF(tmp);\
2053#define __Pyx_DECREF_SET(r, v) do {\
2054 PyObject *tmp = (PyObject *) r;\
2055 r = v; __Pyx_DECREF(tmp);\
2057#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
2058#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
2061#if CYTHON_COMPILING_IN_CPYTHON
2062#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2063#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
2064static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2065static CYTHON_INLINE
int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2066#define __Pyx_PyAnySet_Check(obj) __Pyx_TypeCheck2(obj, &PySet_Type, &PyFrozenSet_Type)
2068#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2069#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
2070#define __Pyx_PyAnySet_Check(obj) PyAnySet_Check(obj)
2074#if CYTHON_FAST_THREAD_STATE
2075#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
2076#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
2077#if PY_VERSION_HEX >= 0x030C00A6
2078#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
2079#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
2081#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2082#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
2085#define __Pyx_PyThreadState_declare
2086#define __Pyx_PyThreadState_assign
2087#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
2088#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
2092#if CYTHON_FAST_THREAD_STATE
2093#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2094#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2095#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2096#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2097#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2098static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2099static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2100#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
2101#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2103#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2106#define __Pyx_PyErr_Clear() PyErr_Clear()
2107#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2108#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2109#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2110#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2111#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2112#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2113#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2117#if CYTHON_COMPILING_IN_CPYTHON
2118static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2119static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2121#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2122static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
2123 return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
2126#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
2129#if CYTHON_FAST_THREAD_STATE
2130#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2131static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2133#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2137#if CYTHON_USE_TYPE_SLOTS
2138static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2140#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2144static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2147static PyObject *__Pyx_GetBuiltinName(PyObject *name);
2150#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
2151static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2155#if CYTHON_FAST_THREAD_STATE
2156#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2157static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2158#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2159static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2161#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2162#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2166#define __Pyx_PyExc_Exception_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2169#if CYTHON_FAST_THREAD_STATE
2170#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2171static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2173static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2177#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError)
2180#if CYTHON_COMPILING_IN_CPYTHON
2181static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2183#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2187#if CYTHON_COMPILING_IN_CPYTHON
2188static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2192#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
2193static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *
const*args,
size_t nargsf, PyObject *kwargs);
2196static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2199static CYTHON_INLINE
int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception);
2200#define __Pyx_IgnoreException(ignorable_exception) __Pyx_IgnoreGivenException(NULL, ignorable_exception)
2203#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2204#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2205#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2206#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2207 (version_var) = __PYX_GET_DICT_VERSION(dict);\
2208 (cache_var) = (value);
2209#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2210 static PY_UINT64_T __pyx_dict_version = 0;\
2211 static PyObject *__pyx_dict_cached_value = NULL;\
2212 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2213 (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
2215 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2216 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2219static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2220static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2221static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2223#define __PYX_GET_DICT_VERSION(dict) (0)
2224#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2225#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2229#if CYTHON_USE_DICT_VERSIONS
2230#define __Pyx_GetModuleGlobalName(var, name) do {\
2231 static PY_UINT64_T __pyx_dict_version = 0;\
2232 static PyObject *__pyx_dict_cached_value = NULL;\
2233 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
2234 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
2235 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2237#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
2238 PY_UINT64_T __pyx_dict_version;\
2239 PyObject *__pyx_dict_cached_value;\
2240 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2242static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2244#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2245#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2246static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2250#if CYTHON_COMPILING_IN_CPYTHON
2251static CYTHON_INLINE
void __Pyx_copy_object_array(PyObject *
const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length);
2255#if PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API
2256#define __Pyx_PyTuple_FromArray(src, n) PyTuple_FromArray(src, ((n)<0) ? 0 : (n))
2258CYTHON_UNUSED
static PyObject *
2259__Pyx_PyTuple_FromArray(PyObject *
const *src, Py_ssize_t
n);
2266#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2267typedef PyObject *__Pyx_TypeName;
2268#define __Pyx_FMT_TYPENAME "%N"
2269#define __Pyx_PyType_GetFullyQualifiedName(tp) Py_NewRef((PyObject*)tp)
2270#define __Pyx_DECREF_TypeName(obj) Py_DECREF(obj)
2271#elif CYTHON_COMPILING_IN_LIMITED_API
2272typedef PyObject *__Pyx_TypeName;
2273#define __Pyx_FMT_TYPENAME "%U"
2274#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
2275static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
2277typedef const char *__Pyx_TypeName;
2278#define __Pyx_FMT_TYPENAME "%.200s"
2279#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
2280#define __Pyx_DECREF_TypeName(obj)
2284#define __Pyx_RaiseErrorWithObjectTypes1(exc_type, message, arg, obj1, obj2) __Pyx_RaiseErrorWithTypes1(exc_type, message, arg, Py_TYPE(obj1), Py_TYPE(obj2))
2285#define __Pyx_RaiseTypeErrorWithObjectTypes(message, obj1, obj2) __Pyx_RaiseTypeErrorWithTypes(message, Py_TYPE(obj1), Py_TYPE(obj2))
2286#define __Pyx_RaiseTypeErrorWithTypes(message, type_obj1, type_obj2) __Pyx_RaiseErrorWithTypes1(PyExc_TypeError, "%.1s" message, "", type_obj1, type_obj2)
2288static void __Pyx_RaiseErrorWithTypes1(PyObject* exc_type,
const char *message,
const char *arg, PyTypeObject *type_obj1, PyTypeObject *type_obj2);
2291static CYTHON_INLINE
int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2294static CYTHON_INLINE
int __Pyx_Is_Little_Endian(
void);
2297static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx,
const char* ts);
2298static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
2299 __Pyx_BufFmt_StackElem* stack,
2300 const __Pyx_TypeInfo* type);
2303#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
2304 ((obj == Py_None || obj == NULL) ?\
2305 (__Pyx_ZeroBuffer(buf), 0) :\
2306 __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
2307static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
2308 const __Pyx_TypeInfo* dtype,
int flags,
int nd,
int cast, __Pyx_BufFmt_StackElem* stack);
2309static void __Pyx_ZeroBuffer(Py_buffer* buf);
2310static CYTHON_INLINE
void __Pyx_SafeReleaseBuffer(Py_buffer* info);
2311static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
2312static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
2315static void __Pyx_RaiseBufferIndexError(
int axis);
2317#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
2322static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2,
int pyop);
2325#define __Pyx_PyUnicode_Equals(s1, s2) __Pyx_PyObject_CompareBoolEq_str_str(s1, s2, Py_EQ)
2328#if CYTHON_AVOID_BORROWED_REFS
2329 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
2330#elif CYTHON_ASSUME_SAFE_MACROS
2331 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
2333 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
2335#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
2336#define __Pyx_KwValues_VARARGS(args, nargs) NULL
2337#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
2338#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
2339#if CYTHON_VECTORCALL
2340 #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
2341 #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
2342 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
2343 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues, PyObject *
s);
2344 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
2345 CYTHON_UNUSED
static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues);
2347 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
2350 #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
2351 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
2352 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
2353 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
2354 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
2356#if CYTHON_VECTORCALL_TPNEW
2357 #if !CYTHON_VECTORCALL
2358 #error Enabling CYTHON_VECTORCALL_TPNEW without CYTHON_VECTORCALL is not supported
2360 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_FASTCALL
2361 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_FASTCALL
2362 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_FASTCALL
2363 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_FASTCALL
2364 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_FASTCALL
2366 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_VARARGS
2367 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_VARARGS
2368 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_VARARGS
2369 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_VARARGS
2370 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_VARARGS
2372#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
2373#if CYTHON_VECTORCALL
2374#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
2376#define __Pyx_ArgsSlice_FASTCALL __Pyx_ArgsSlice_VARARGS
2380#define __Pyx_PyDict_items_TypePtr (&PyDictKeys_Type)
2381#define __Pyx_PyDict_items_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictItems_TypePtr)
2382#define __Pyx_PyDict_items_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictItems_TypePtr)
2383static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
2386#define __Pyx_CallCFunction(cfunc, self, args)\
2387 ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
2388#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
2389 ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
2390#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
2391 ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
2392#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
2393 ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
2396static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2401 PyObject **method_name;
2405#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
2406 __pyx_atomic_int_type initialized;
2408} __Pyx_CachedCFunction;
2411static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target);
2414#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2415static CYTHON_INLINE
int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
2419 __pyx_nonatomic_int_type expected = 0;
2420 if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
2426static CYTHON_INLINE
void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
2428 __pyx_atomic_store(&cfunc->initialized, 2);
2432#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
2433#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
2438static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2439#if CYTHON_COMPILING_IN_CPYTHON
2440static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2442#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
2446#define __Pyx_PyDict_values_TypePtr (&PyDictKeys_Type)
2447#define __Pyx_PyDict_values_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictValues_TypePtr)
2448#define __Pyx_PyDict_values_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictValues_TypePtr)
2449static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
2452#if CYTHON_AVOID_BORROWED_REFS
2453static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
2456static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
2460static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name);
2463static int __Pyx_ParseKeywordsTuple(
2465 PyObject *
const *kwvalues,
2466 PyObject **
const argnames[],
2469 Py_ssize_t num_pos_args,
2470 Py_ssize_t num_kwargs,
2471 const char* function_name,
2472 int ignore_unknown_kwargs
2474static int __Pyx_ParseKeywordDictToDict(
2476 PyObject **
const argnames[],
2479 Py_ssize_t num_pos_args,
2480 const char* function_name
2482static int __Pyx_ParseKeywordDict(
2484 PyObject **
const argnames[],
2486 Py_ssize_t num_pos_args,
2487 Py_ssize_t num_kwargs,
2488 const char* function_name,
2489 int ignore_unknown_kwargs
2494static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
2495#if CYTHON_COMPILING_IN_CPYTHON
2496static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
2498#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
2502static CYTHON_INLINE
int __Pyx_ParseKeywords(
2503 PyObject *kwds, PyObject *
const *kwvalues, PyObject **
const argnames[],
2504 PyObject *kwds2, PyObject *values[],
2505 Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
2506 const char* function_name,
2507 int ignore_unknown_kwargs
2511static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
2512 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2515#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
2516#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL)
2518#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n)
2522#if CYTHON_USE_TYPE_SLOTS
2523#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
2524static CYTHON_INLINE
int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
2526#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n)
2527#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
2531static CYTHON_INLINE
void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2534static CYTHON_INLINE
void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2537static CYTHON_INLINE
int __Pyx_IterFinish(
void);
2540static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
2543#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000
2544 static int __pyx_assertions_enabled_flag;
2545 #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
2546 #if __clang__ || __GNUC__
2547 __attribute__((no_sanitize(
"thread")))
2549 static int __Pyx_init_assertions_enabled(
void) {
2550 PyObject *builtins, *debug, *debug_str;
2552 builtins = PyEval_GetBuiltins();
2553 if (!builtins)
goto bad;
2554 debug_str = PyUnicode_FromStringAndSize(
"__debug__", 9);
2555 if (!debug_str)
goto bad;
2556 debug = PyObject_GetItem(builtins, debug_str);
2557 Py_DECREF(debug_str);
2558 if (!debug)
goto bad;
2559 flag = PyObject_IsTrue(debug);
2561 if (flag == -1)
goto bad;
2562 __pyx_assertions_enabled_flag = flag;
2565 __pyx_assertions_enabled_flag = 1;
2569 #define __Pyx_init_assertions_enabled() (0)
2570 #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
2574#if !CYTHON_COMPILING_IN_PYPY
2575static int __Pyx_PyFloat_BoolEqObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check);
2577#define __Pyx_PyFloat_BoolEqObjC(op1, op2, floatval, inplace, zerodivision_check)\
2578 PyObject_RichCompareBool(op1, op2, Py_EQ)
2582#define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError)
2585static void __Pyx_RaiseUnboundLocalError(
const char *varname);
2588#if !CYTHON_COMPILING_IN_PYPY
2589static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check);
2591#define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2592 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2596static void __Pyx_Generator_Replace_StopIteration(
int in_async_gen);
2599#if CYTHON_COMPILING_IN_LIMITED_API
2600#define __Pyx_PyFrozenDict_TypePtr ((PyTypeObject*) __pyx_mstate_global->__Pyx_PyFrozenDictType)
2601#define __Pyx_PyFrozenDict_New(it) __Pyx__PyFrozenDict_New(__pyx_mstate_global->__Pyx_PyFrozenDictType, it)
2602static CYTHON_INLINE PyObject* __Pyx__PyFrozenDict_New(PyObject* frozendict_type, PyObject* it);
2603#define __Pyx_PyFrozenDict_NewEmpty() __Pyx_PyFrozenDict_New(NULL)
2604#define __Pyx_PyFrozenDict_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyFrozenDict_TypePtr)
2605#define __Pyx_PyFrozenDict_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyFrozenDict_TypePtr)
2606#define __Pyx_PyAnyDict_Check(obj) __Pyx__PyAnyDict_Check(obj, __Pyx_PyFrozenDict_TypePtr)
2607static CYTHON_INLINE
int __Pyx__PyAnyDict_Check(PyObject *obj, PyTypeObject* frozendict_type) {
2608 return PyObject_TypeCheck(obj, &PyDict_Type) || PyObject_TypeCheck(obj, frozendict_type);
2610#define __Pyx_PyAnyDict_CheckExact(obj) __Pyx__PyAnyDict_CheckExact(obj, __Pyx_PyFrozenDict_TypePtr)
2611static CYTHON_INLINE
int __Pyx__PyAnyDict_CheckExact(PyObject *obj, PyTypeObject* frozendict_type) {
2612 return Py_IS_TYPE(obj, &PyDict_Type) || Py_IS_TYPE(obj, frozendict_type);
2614#elif PY_VERSION_HEX >= 0x030f00a6 ||\
2615 (defined(PyFrozenDict_Check) && defined(PyAnyDict_Check) && defined(PyFrozenDict_New))
2616#define __Pyx_PyFrozenDict_TypePtr (&PyFrozenDict_Type)
2617#define __Pyx_PyFrozenDict_New(it) PyFrozenDict_New(it)
2618#define __Pyx_PyFrozenDict_NewEmpty() PyFrozenDict_New(NULL)
2619#define __Pyx_PyFrozenDict_Check(obj) PyFrozenDict_Check(obj)
2620#define __Pyx_PyFrozenDict_CheckExact(obj) PyFrozenDict_CheckExact(obj)
2621#define __Pyx_PyAnyDict_Check(obj) PyAnyDict_Check(obj)
2622#define __Pyx_PyAnyDict_CheckExact(obj) PyAnyDict_CheckExact(obj)
2624#define __Pyx_PyFrozenDict_TypePtr (&PyDict_Type)
2625static CYTHON_INLINE PyObject* __Pyx_PyFrozenDict_New(PyObject* it) {
2627 return PyDict_New();
2628 }
else if (PyDict_Check(it)) {
2629 return PyDict_Copy(it);
2631 PyObject *dict = PyDict_New();
2632 if (!dict)
return NULL;
2633 PyObject *result = PyNumber_InPlaceOr(dict, it);
2638#define __Pyx_PyFrozenDict_NewEmpty() PyDict_New()
2639#define __Pyx_PyFrozenDict_Check(obj) PyDict_Check(obj)
2640#define __Pyx_PyFrozenDict_CheckExact(obj) PyDict_CheckExact(obj)
2641#define __Pyx_PyAnyDict_Check(obj) PyDict_Check(obj)
2642#define __Pyx_PyAnyDict_CheckExact(obj) PyDict_CheckExact(obj)
2646#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2647 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2648 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2649 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
2650#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2651 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2652 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2653 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2654static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2655 int wraparound,
int boundscheck,
int unsafe_shared);
2656#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2657 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2658 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
2659 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2660static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2661 int wraparound,
int boundscheck,
int unsafe_shared);
2662static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2663static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2664 int wraparound,
int boundscheck,
int unsafe_shared);
2667#define __Pyx_RaiseTypeErrorWithObjectType(message, obj) __Pyx_RaiseErrorWithObjectType(PyExc_TypeError, message, obj)
2668#define __Pyx_RaiseErrorWithObjectType(exc_type, message, obj) __Pyx_RaiseErrorWithType(exc_type, message, Py_TYPE(obj))
2670static void __Pyx_RaiseErrorWithType(PyObject* exc_type,
const char* message, PyTypeObject *type_obj);
2673#if CYTHON_USE_TYPE_SLOTS
2674static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
2676#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2680#if CYTHON_VECTORCALL
2681#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
2683static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *
const *args,
size_t nargsf);
2687#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2688#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
2690static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *, PyObject *);
2694CYTHON_UNUSED
static PyObject *
2695__Pyx_PyList_FromArray(PyObject *
const *src, Py_ssize_t
n);
2701static PyObject *__Pyx__Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict,
int level);
2704static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname,
int level);
2707static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2710static CYTHON_INLINE
int __Pyx_ListComp_AppendAndDecref(PyObject* list, PyObject* x);
2713#if !CYTHON_COMPILING_IN_PYPY
2714static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
2715#define __Pyx_PyObject_Dict_GetItem(obj, name)\
2716 (likely(__Pyx_PyAnyDict_CheckExact(obj)) ?\
2717 __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
2719#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
2720#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
2724static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
2725 PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
2726 PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
2727 int has_cstart,
int has_cstop,
int wraparound);
2730#if CYTHON_VECTORCALL
2731#define __Pyx_Object_VectorcallKwds PyObject_Vectorcall
2732CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i);
2734#define __Pyx_Object_VectorcallKwds __Pyx_PyObject_FastCallDict
2735CYTHON_UNUSED
static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t
n);
2736CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i);
2740static CYTHON_INLINE
int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2,
long intval,
long inplace);
2743#if !CYTHON_COMPILING_IN_PYPY
2744static int __Pyx_PyFloat_BoolNeObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check);
2746#define __Pyx_PyFloat_BoolNeObjC(op1, op2, floatval, inplace, zerodivision_check)\
2747 PyObject_RichCompareBool(op1, op2, Py_NE)
2751#define __Pyx_PyExc_NotImplementedError_Check(obj) __Pyx_TypeCheck(obj, PyExc_NotImplementedError)
2754static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolGt_object_float(PyObject *op1, PyObject *op2,
int pyop);
2757#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
2758static CYTHON_INLINE
int __Pyx_PyList_Append(PyObject* list, PyObject* x);
2760#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2764static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolLt_object_float(PyObject *op1, PyObject *op2,
int pyop);
2767#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API
2768#define __Pyx_PyNumber_Subtract_object_object(op1, op2) PyNumber_Subtract(op1, op2)
2769#define __Pyx_PyNumber_InPlaceSubtract_object_object(op1, op2) PyNumber_InPlaceSubtract(op1, op2)
2771#define __Pyx_PyNumber_Subtract_object_object(op1, op2) __Pyx__PyNumber_Subtract_object_object(op1, op2, 0)
2772#define __Pyx_PyNumber_InPlaceSubtract_object_object(op1, op2) __Pyx__PyNumber_Subtract_object_object(op1, op2, 1)
2773static CYTHON_INLINE PyObject* __Pyx__PyNumber_Subtract_object_object(PyObject *op1, PyObject *op2,
int inplace);
2777#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API
2778#define __Pyx_PyNumber_Multiply_float_object(op1, op2) PyNumber_Multiply(op1, op2)
2779#define __Pyx_PyNumber_InPlaceMultiply_float_object(op1, op2) PyNumber_InPlaceMultiply(op1, op2)
2781#define __Pyx_PyNumber_Multiply_float_object(op1, op2) __Pyx__PyNumber_Multiply_float_object(op1, op2, 0)
2782#define __Pyx_PyNumber_InPlaceMultiply_float_object(op1, op2) __Pyx__PyNumber_Multiply_float_object(op1, op2, 1)
2783static CYTHON_INLINE PyObject* __Pyx__PyNumber_Multiply_float_object(PyObject *op1, PyObject *op2,
int inplace);
2787#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API
2788#define __Pyx_PyNumber_Add_object_object(op1, op2) PyNumber_Add(op1, op2)
2789#define __Pyx_PyNumber_InPlaceAdd_object_object(op1, op2) PyNumber_InPlaceAdd(op1, op2)
2791#define __Pyx_PyNumber_Add_object_object(op1, op2) __Pyx__PyNumber_Add_object_object(op1, op2, 0)
2792#define __Pyx_PyNumber_InPlaceAdd_object_object(op1, op2) __Pyx__PyNumber_Add_object_object(op1, op2, 1)
2793static CYTHON_INLINE PyObject* __Pyx__PyNumber_Add_object_object(PyObject *op1, PyObject *op2,
int inplace);
2797static void __Pyx_RaiseBufferFallbackError(
void);
2800#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, wraparound, boundscheck, has_gil, unsafe_shared)\
2801 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2802 __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, wraparound, boundscheck, unsafe_shared) :\
2803 __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
2804static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *
v);
2805static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *
v,
2806 int wraparound,
int boundscheck,
int unsafe_shared);
2809static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolEq_object_str(PyObject *op1, PyObject *op2,
int pyop);
2812#define __Pyx_PyObject_Unicode(obj)\
2813 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
2816#if CYTHON_VECTORCALL
2817#define __Pyx_Object_VectorcallMethodKwds PyObject_VectorcallMethod
2819static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2823#define __Pyx_RaiseTypeErrorWithObjectType1(message, arg, obj) __Pyx_RaiseErrorWithObjectType1(PyExc_TypeError, message, arg, obj)
2824#define __Pyx_RaiseErrorWithObjectType1(exc_type, message, arg, obj) __Pyx_RaiseErrorWithType1(exc_type, message, arg, Py_TYPE(obj))
2826static void __Pyx_RaiseErrorWithType1(PyObject* exc_type,
const char* message,
const char *arg, PyTypeObject *type_obj);
2830static int __Pyx_RaiseUnexpectedTypeError(
const char *expected, PyObject *obj);
2833#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API
2834#define __Pyx_PyNumber_Multiply_object_float(op1, op2) PyNumber_Multiply(op1, op2)
2835#define __Pyx_PyNumber_InPlaceMultiply_object_float(op1, op2) PyNumber_InPlaceMultiply(op1, op2)
2837#define __Pyx_PyNumber_Multiply_object_float(op1, op2) __Pyx__PyNumber_Multiply_object_float(op1, op2, 0)
2838#define __Pyx_PyNumber_InPlaceMultiply_object_float(op1, op2) __Pyx__PyNumber_Multiply_object_float(op1, op2, 1)
2839static CYTHON_INLINE PyObject* __Pyx__PyNumber_Multiply_object_float(PyObject *op1, PyObject *op2,
int inplace);
2843static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolGt_object_int(PyObject *op1, PyObject *op2,
int pyop);
2846static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolGt_object_object(PyObject *op1, PyObject *op2,
int pyop);
2849static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolLt_object_object(PyObject *op1, PyObject *op2,
int pyop);
2852static CYTHON_INLINE
int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2,
long intval,
long inplace);
2855#if !CYTHON_COMPILING_IN_PYPY
2856static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check);
2858#define __Pyx_PyLong_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check)\
2859 (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
2863#if CYTHON_USE_FREELISTS
2864#if CYTHON_USE_TYPE_SPECS
2865#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp)))
2866#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT
2868#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size)))
2869#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)
2871#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\
2872 (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\
2873 (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS)))
2877static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t,
int is_final);
2880#if CYTHON_VECTORCALL_TPNEW
2881typedef PyObject * (*__Pyx_tpnewvectorcallfunc)(PyTypeObject* o, PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames);
2882static PyObject * __Pyx_CallTpnewAsVectorcall(__Pyx_tpnewvectorcallfunc
f, PyTypeObject* o, PyObject *a, PyObject *k);
2886#if CYTHON_VECTORCALL_TPNEW
2887static PyObject *__Pyx_CallNewInitFromVectorcall(PyTypeObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
2891#if !CYTHON_USE_TYPE_SPECS
2892#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
2894static int __Pyx_call_type_traverse(PyObject *o,
int always_call, visitproc visit,
void *arg);
2898static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
2901#if !CYTHON_USE_TYPE_SLOTS
2902CYTHON_UNUSED
static Py_ssize_t __Pyx_GetTypeDictOffset(PyObject *tp,
int require_cython_valid_result);
2906#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
2907static int __Pyx_validate_bases_tuple(
const char *type_name,
int has_dictoffset, PyObject *bases);
2911CYTHON_UNUSED
static int __Pyx_PyType_Ready(PyTypeObject *t);
2914#ifndef __PYX_HAVE_RT_ImportType_proto_3_3_0
2915#define __PYX_HAVE_RT_ImportType_proto_3_3_0
2916#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2917#include <stdalign.h>
2919#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2920#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) alignof(s)
2922#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) sizeof(void*)
2924enum __Pyx_ImportType_CheckSize_3_3_0 {
2925 __Pyx_ImportType_CheckSize_Error_3_3_0 = 0,
2926 __Pyx_ImportType_CheckSize_Warn_3_3_0 = 1,
2927 __Pyx_ImportType_CheckSize_Ignore_3_3_0 = 2
2929static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject* module,
const char *module_name,
const char *class_name,
size_t size,
size_t alignment,
enum __Pyx_ImportType_CheckSize_3_3_0 check_size);
2933static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);
2936static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
2939static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
2942#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3) ||\
2943 __PYX_LIMITED_VERSION_HEX < 0x030d0000)
2944 static PyObject *__Pyx_PyImport_AddModuleRef(
const char *name);
2946 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
2950static PyObject *__Pyx_FetchSharedCythonABIModule(
void);
2953static int __Pyx_VerifyCachedType(PyObject *cached_type,
2955 Py_ssize_t expected_basicsize);
2958static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
2961static int __pyx_CommonTypesMetaclass_init(PyObject *module);
2962#define __Pyx_CommonTypesMetaclass_USED
2965#define __Pyx_CyFunction_USED
2966#if CYTHON_OPAQUE_SHARED_TYPES
2967#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)PyObject_GetTypeData((o), __pyx_mstate_global->__pyx_CyFunctionType))
2969#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)o)
2971#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2972#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2973#define __Pyx_CYFUNCTION_CCLASS 0x04
2974#define __Pyx_CYFUNCTION_COROUTINE 0x08
2975#define __Pyx_CyFunction_GetClosure(f)\
2976 ((__Pyx_as_CyFunctionObject(f))->func_closure)
2977#if CYTHON_COMPILING_IN_LIMITED_API
2978 #define __Pyx__CyFunction_GetClassObj(f)\
2979 ((f)->func_classobj)
2981 #define __Pyx__CyFunction_GetClassObj(f)\
2982 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
2984#define __Pyx_CyFunction_GetClassObj(f)\
2985 __Pyx__CyFunction_GetClassObj(__Pyx_as_CyFunctionObject(f))
2986#define __Pyx_CyFunction_SetClassObj(f, classobj)\
2987 __Pyx__CyFunction_SetClassObj(__Pyx_as_CyFunctionObject(f), (classobj))
2988#define __Pyx_CyFunction_Defaults(type, f)\
2989 ((type *)((__Pyx_as_CyFunctionObject(f))->defaults))
2990#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2991 (__Pyx_as_CyFunctionObject(f))->defaults_getter = (g)
2993#if CYTHON_COMPILING_IN_LIMITED_API
2994#if !CYTHON_OPAQUE_OBJECTS
2997 PyMethodDef *func_methoddef;
2998 PyObject *func_module;
3000 PyCMethodObject func;
3002#if (CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY) && CYTHON_VECTORCALL
3003 __pyx_vectorcallfunc func_vectorcall;
3005#if CYTHON_COMPILING_IN_LIMITED_API
3006 PyObject *func_weakreflist;
3008#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
3009 PyObject *func_dict;
3011 PyObject *func_name;
3012 PyObject *func_qualname;
3014 PyObject *func_globals;
3015 PyObject *func_code;
3016 PyObject *func_closure;
3017#if CYTHON_COMPILING_IN_LIMITED_API
3018 PyObject *func_classobj;
3022 PyObject *defaults_tuple;
3023 PyObject *defaults_kwdict;
3024 PyObject *(*defaults_getter)(PyObject *);
3025 PyObject *func_annotations;
3026#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
3027 PyObject *func_is_coroutine;
3029} __pyx_CyFunctionObject;
3030#undef __Pyx_CyOrPyCFunction_Check
3031#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
3032#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
3033#define __Pyx_CyFunction_CheckExact(obj) Py_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
3034static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void (*cfunc)(
void));
3035#undef __Pyx_IsSameCFunction
3036#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
3037static CYTHON_INLINE
void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject*
f, PyObject* classobj);
3038static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
3039 PyTypeObject *defaults_type);
3040static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
3042static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
3044static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
3046static int __pyx_CyFunction_init(PyObject *module);
3047#if CYTHON_VECTORCALL
3048#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
3049#define __Pyx_CyFunction_func_vectorcall(f) ((f)->func_vectorcall)
3051#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
3056static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
3059#if CYTHON_VECTORCALL
3060static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw);
3064static PyObject *__Pyx_CyFunction_Init(PyObject *op_in, PyMethodDef *ml,
3065 int flags, PyObject* qualname,
3067 PyObject *module, PyObject *globals,
3069#if CYTHON_VECTORCALL
3070static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
3071static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
3072static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
3073static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
3077static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
3078 int flags, PyObject* qualname,
3080 PyObject *module, PyObject *globals,
3082static PyTypeObject *__Pyx_Get_CyFunction_Type(
void);
3085#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
3086#define __Pyx_SetNameInClass(ns, name, value)\
3087 (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
3088#elif CYTHON_COMPILING_IN_CPYTHON
3089#define __Pyx_SetNameInClass(ns, name, value)\
3090 (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
3092#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
3096static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
3099#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
3100#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
3101#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
3102static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name,
int with_error);
3104#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
3105#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
3109static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
3110 PyObject *mkw, PyObject *modname, PyObject *doc);
3111static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
3112 PyObject *mkw,
int calculate_metaclass,
int allow_py2_metaclass);
3115#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
3116static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line);
3118#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
3122#if CYTHON_COMPILING_IN_LIMITED_API
3123typedef PyObject __Pyx_CachedCodeObjectType;
3125typedef PyCodeObject __Pyx_CachedCodeObjectType;
3128 __Pyx_CachedCodeObjectType* code_object;
3130} __Pyx_CodeObjectCacheEntry;
3131struct __Pyx_CodeObjectCache {
3134 __Pyx_CodeObjectCacheEntry* entries;
3135 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
3136 __pyx_atomic_int_type accessor_count;
3139static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line);
3140static __Pyx_CachedCodeObjectType *__pyx_find_code_object(
int code_line);
3141static void __pyx_insert_code_object(
int code_line, __Pyx_CachedCodeObjectType* code_object);
3144static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
3145 int py_line,
const char *filename);
3149 Py_ssize_t shape, strides, suboffsets;
3156 __Pyx_Buffer *rcbuffer;
3158 __Pyx_Buf_DimInfo diminfo[8];
3162#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
3163#define __Pyx_HAS_GCC_DIAGNOSTIC
3169 #define __Pyx_CREAL(z) ((z).real())
3170 #define __Pyx_CIMAG(z) ((z).imag())
3172 #define __Pyx_CREAL(z) (__real__(z))
3173 #define __Pyx_CIMAG(z) (__imag__(z))
3176 #define __Pyx_CREAL(z) ((z).real)
3177 #define __Pyx_CIMAG(z) ((z).imag)
3179#if defined(__cplusplus) && CYTHON_CCOMPLEX\
3180 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
3181 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
3182 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
3184 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
3185 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
3189#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
3190 #define __Pyx_c_eq_float(a, b) ((a)==(b))
3191 #define __Pyx_c_sum_float(a, b) ((a)+(b))
3192 #define __Pyx_c_diff_float(a, b) ((a)-(b))
3193 #define __Pyx_c_prod_float(a, b) ((a)*(b))
3194 #define __Pyx_c_quot_float(a, b) ((a)/(b))
3195 #define __Pyx_c_neg_float(a) (-(a))
3197 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
3198 #define __Pyx_c_conj_float(z) (::std::conj(z))
3200 #define __Pyx_c_abs_float(z) (::std::abs(z))
3201 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
3204 #define __Pyx_c_is_zero_float(z) ((z)==0)
3205 #define __Pyx_c_conj_float(z) (conjf(z))
3207 #define __Pyx_c_abs_float(z) (cabsf(z))
3208 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
3212 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
3213 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
3214 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
3215 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
3216 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
3217 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
3218 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex);
3219 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
3221 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex);
3222 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
3227#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
3228 #define __Pyx_c_eq_double(a, b) ((a)==(b))
3229 #define __Pyx_c_sum_double(a, b) ((a)+(b))
3230 #define __Pyx_c_diff_double(a, b) ((a)-(b))
3231 #define __Pyx_c_prod_double(a, b) ((a)*(b))
3232 #define __Pyx_c_quot_double(a, b) ((a)/(b))
3233 #define __Pyx_c_neg_double(a) (-(a))
3235 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
3236 #define __Pyx_c_conj_double(z) (::std::conj(z))
3238 #define __Pyx_c_abs_double(z) (::std::abs(z))
3239 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
3242 #define __Pyx_c_is_zero_double(z) ((z)==0)
3243 #define __Pyx_c_conj_double(z) (conj(z))
3245 #define __Pyx_c_abs_double(z) (cabs(z))
3246 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
3250 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
3251 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
3252 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
3253 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
3254 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
3255 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
3256 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex);
3257 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
3259 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex);
3260 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
3265#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
3266 #define __Pyx_c_eq_long__double(a, b) ((a)==(b))
3267 #define __Pyx_c_sum_long__double(a, b) ((a)+(b))
3268 #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
3269 #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
3270 #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
3271 #define __Pyx_c_neg_long__double(a) (-(a))
3273 #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
3274 #define __Pyx_c_conj_long__double(z) (::std::conj(z))
3276 #define __Pyx_c_abs_long__double(z) (::std::abs(z))
3277 #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b))
3280 #define __Pyx_c_is_zero_long__double(z) ((z)==0)
3281 #define __Pyx_c_conj_long__double(z) (conjl(z))
3283 #define __Pyx_c_abs_long__double(z) (cabsl(z))
3284 #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b))
3288 static CYTHON_INLINE
int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3289 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3290 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3291 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3292 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3293 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
3294 static CYTHON_INLINE
int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
3295 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
3297 static CYTHON_INLINE
long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
3298 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
3303static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(
long value);
3306static CYTHON_INLINE
int __Pyx_PyLong_As_int(PyObject *);
3309static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(
int value);
3312static CYTHON_INLINE
long __Pyx_PyLong_As_long(PyObject *);
3315#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
3316static unsigned long __Pyx_cached_runtime_version = 0;
3317static void __Pyx_init_runtime_version(
void);
3319#define __Pyx_init_runtime_version()
3321static unsigned long __Pyx_get_runtime_version(
void);
3324#if CYTHON_FAST_THREAD_STATE
3325#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
3326static CYTHON_INLINE
void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
3328static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
3332static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator);
3333#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
3334static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(
void);
3338static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
3341static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
3344static CYTHON_INLINE
void __Pyx_ReturnWithStopIteration(PyObject* value,
int async,
int iternext);
3347struct __pyx_CoroutineObject;
3348typedef PyObject *(*__pyx_coroutine_body_t)(
struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
3349#if CYTHON_USE_EXC_INFO_STACK
3350#define __Pyx_ExcInfoStruct _PyErr_StackItem
3354 PyObject *exc_value;
3355 PyObject *exc_traceback;
3356} __Pyx_ExcInfoStruct;
3358typedef struct __pyx_CoroutineObject {
3360 __pyx_coroutine_body_t body;
3362 __Pyx_ExcInfoStruct gi_exc_state;
3363#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
3364 PyObject *gi_weakreflist;
3367 PyObject *yieldfrom;
3368 __Pyx_pyiter_sendfunc yieldfrom_am_send;
3370 PyObject *gi_qualname;
3371 PyObject *gi_modulename;
3374#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE)
3375 PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count];
3376 uint64_t __pyx_pymonitoring_version;
3380} __pyx_CoroutineObject;
3381static __pyx_CoroutineObject *__Pyx__Coroutine_New(
3382 PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
3383 PyObject *name, PyObject *qualname, PyObject *module_name);
3384static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
3385 __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
3386 PyObject *name, PyObject *qualname, PyObject *module_name);
3387static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
3388static int __Pyx_Coroutine_clear(PyObject *self);
3389static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval);
3390static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
3391static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval);
3392static PyObject *__Pyx_Coroutine_Throw(PyObject *gen,
3393#
if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
3396 PyObject *
const *args, Py_ssize_t nargs
3399#if CYTHON_USE_EXC_INFO_STACK
3400#define __Pyx_Coroutine_SwapException(self)
3401#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
3403#define __Pyx_Coroutine_SwapException(self) {\
3404 __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
3405 __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
3407#define __Pyx_Coroutine_ResetAndClearException(self) {\
3408 __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
3409 (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
3412#if CYTHON_FAST_THREAD_STATE
3413#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
3414 __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
3416#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
3417 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
3419static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
3420static CYTHON_INLINE
void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
3421static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen);
3422static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen);
3423static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen);
3424static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen,
void *closure);
3425#if __PYX_HAS_PY_AM_SEND == 2
3426static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send);
3428static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg);
3431#define __Pyx_Generator_USED
3432#define __Pyx_Generator_CheckExact(obj) Py_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType)
3433#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
3434 __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
3435static PyObject *__Pyx_Generator_Next(PyObject *self);
3436static int __pyx_Generator_init(PyObject *module);
3437static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self);
3440static int __Pyx_check_binary_version(
unsigned long ct_version,
unsigned long rt_version,
int allow_newer);
3443static PyObject *__Pyx_DecompressString(
const char *
s, Py_ssize_t length,
int algo);
3446static PyObject *__Pyx_DecompressString_LZSS(
const char *
s,
size_t compressed_length,
size_t uncompressed_length);
3449#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
3451static PyObject *__Pyx_State_FindModule(
void*);
3452static int __Pyx_State_AddModule(PyObject* module,
void*);
3453static int __Pyx_State_RemoveModule(
void*);
3454#elif CYTHON_USE_MODULE_STATE
3455#define __Pyx_State_FindModule PyState_FindModule
3456#define __Pyx_State_AddModule PyState_AddModule
3457#define __Pyx_State_RemoveModule PyState_RemoveModule
3462#if CYTHON_COMPILING_IN_LIMITED_API
3463 #if CYTHON_VECTORCALL
3464 #define __PYX_VECTORCALL_ABI_SUFFIX "_vectorcall"
3466 #define __PYX_VECTORCALL_ABI_SUFFIX
3468 #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_VECTORCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
3470 #define __PYX_LIMITED_ABI_SUFFIX
3472#if __PYX_HAS_PY_AM_SEND == 1
3473 #define __PYX_AM_SEND_ABI_SUFFIX
3474#elif __PYX_HAS_PY_AM_SEND == 2
3475 #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
3477 #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
3479#ifndef __PYX_MONITORING_ABI_SUFFIX
3480 #define __PYX_MONITORING_ABI_SUFFIX
3482#if CYTHON_USE_TP_FINALIZE
3483 #define __PYX_TP_FINALIZE_ABI_SUFFIX
3485 #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
3487#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
3488 #define __PYX_FREELISTS_ABI_SUFFIX
3490 #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
3492#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
3493 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX "opaque"
3495 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
3497#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
3498#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
3499#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
3501static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self);
3502static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self);
3503static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self);
3504static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self);
3505static CYTHON_INLINE
int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self);
3506static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self);
3507static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self);
3508static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self);
3509static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self);
3510static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self);
3511static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self);
3512static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self);
3513static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self);
3514static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self);
3515static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self);
3516static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self);
3517static CYTHON_INLINE
void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self);
3518static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self);
3519static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self);
3520static CYTHON_INLINE
int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self);
3521static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self);
3522static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self);
3523static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self);
3524static CYTHON_INLINE
char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self);
3525static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self);
3526static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self);
3527static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self);
3528static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self);
3529static CYTHON_INLINE
void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self);
3530static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self);
3531static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self);
3532static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self);
3533static CYTHON_INLINE
void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self);
3534static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self);
3535static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self);
3558static PyArrayObject *__pyx_f_10Isosurface_EVec(
struct __pyx_opt_args_10Isosurface_EVec *__pyx_optional_args);
3559static double __pyx_f_10Isosurface_enorm(PyArrayObject *);
3560static double __pyx_f_10Isosurface_edot(PyArrayObject *, PyArrayObject *);
3561static PyArrayObject *__pyx_f_10Isosurface_ecross(PyArrayObject *, PyArrayObject *);
3562static double __pyx_f_10Isosurface_etriple(PyArrayObject *, PyArrayObject *, PyArrayObject *);
3564static const __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = {
"float64_t", NULL,
sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0,
'R', 0, 0 };
3566#define __Pyx_MODULE_NAME "Isosurface"
3567extern int __pyx_module_is_main_Isosurface;
3568int __pyx_module_is_main_Isosurface = 0;
3572static PyObject *__pyx_builtin_enumerate;
3573static PyObject *__pyx_builtin_print;
3574static PyObject *__pyx_builtin_open;
3575static PyObject *__pyx_builtin_zip;
3577static const char __pyx_k_AuxiliaryVariables_subclasses_f[] =
"\nAuxiliaryVariables subclasses for extracting isosurfaces and contours\n";
3579static PyObject *__pyx_pf_10Isosurface_10Isosurface___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_isosurfaces, PyObject *__pyx_v_domain, PyObject *__pyx_v_activeTime, PyObject *__pyx_v_sampleRate, PyObject *__pyx_v_format, PyObject *__pyx_v_writeBoundary);
3580static PyObject *__pyx_pf_10Isosurface_10Isosurface_11attachModel_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0);
3581static PyObject *__pyx_pf_10Isosurface_10Isosurface_2attachModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_model, CYTHON_UNUSED PyObject *__pyx_v_ar);
3582static PyObject *__pyx_pf_10Isosurface_10Isosurface_4attachHDF5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h5, PyObject *__pyx_v_step, PyObject *__pyx_v_cam);
3583static PyObject *__pyx_pf_10Isosurface_10Isosurface_6triangulateIsosurface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value);
3584static PyObject *__pyx_pf_10Isosurface_10Isosurface_8writeIsosurfaceMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value, PyObject *__pyx_v_frame);
3585static PyObject *__pyx_pf_10Isosurface_10Isosurface_10writeIsosurfaceMesh_h5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_frame);
3586static PyObject *__pyx_pf_10Isosurface_10Isosurface_12writeIsosurfaceMesh_povray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_frame);
3587static PyObject *__pyx_pf_10Isosurface_10Isosurface_14calculate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_checkTime);
3588static PyObject *__pyx_pf_10Isosurface_10Isosurface_16writeSceneHeader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cam);
3589static PyObject *__pyx_tp_new__initialisation_10Isosurface___pyx_scope_struct__genexpr(PyObject *o,
3590#
if CYTHON_VECTORCALL_TPNEW
3591 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
3593 PyObject *a, PyObject *k
3596static PyObject *__pyx_tp_new_vectorcall_10Isosurface___pyx_scope_struct__genexpr(PyTypeObject *t,
3597#
if CYTHON_VECTORCALL_TPNEW
3598 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
3600 PyObject *a, PyObject *k
3603#if CYTHON_VECTORCALL_TPNEW
3604static PyObject *__pyx_tp_new_10Isosurface___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k);
3606#if !CYTHON_VECTORCALL_TPNEW
3607#define __pyx_tp_new_10Isosurface___pyx_scope_struct__genexpr __pyx_tp_new_vectorcall_10Isosurface___pyx_scope_struct__genexpr
3609#if CYTHON_VECTORCALL_TPNEW
3610static PyObject *__pyx_tp_vectorcall_10Isosurface___pyx_scope_struct__genexpr(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames);
3615#ifndef CYTHON_SMALL_CODE
3616#if defined(__clang__)
3617 #define CYTHON_SMALL_CODE
3618#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
3619 #define CYTHON_SMALL_CODE __attribute__((cold))
3621 #define CYTHON_SMALL_CODE
3631 PyObject *__pyx_cython_runtime;
3632 PyObject *__pyx_empty_tuple;
3633 PyObject *__pyx_empty_bytes;
3634 PyObject *__pyx_empty_unicode;
3635 PyTypeObject *__pyx_ptype_7cpython_4type_type;
3636 PyTypeObject *__pyx_ptype_5numpy_dtype;
3637 PyTypeObject *__pyx_ptype_5numpy_flatiter;
3638 PyTypeObject *__pyx_ptype_5numpy_broadcast;
3639 PyTypeObject *__pyx_ptype_5numpy_ndarray;
3640 PyTypeObject *__pyx_ptype_5numpy_generic;
3641 PyTypeObject *__pyx_ptype_5numpy_number;
3642 PyTypeObject *__pyx_ptype_5numpy_integer;
3643 PyTypeObject *__pyx_ptype_5numpy_signedinteger;
3644 PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
3645 PyTypeObject *__pyx_ptype_5numpy_inexact;
3646 PyTypeObject *__pyx_ptype_5numpy_floating;
3647 PyTypeObject *__pyx_ptype_5numpy_complexfloating;
3648 PyTypeObject *__pyx_ptype_5numpy_flexible;
3649 PyTypeObject *__pyx_ptype_5numpy_character;
3650 PyTypeObject *__pyx_ptype_5numpy_ufunc;
3651 PyObject *__pyx_type_10Isosurface___pyx_scope_struct__genexpr;
3652 PyTypeObject *__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr;
3653 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
3654 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
3655 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
3656 PyObject *__pyx_slice[1];
3657 PyObject *__pyx_tuple[12];
3658 PyObject *__pyx_codeobj_tab[10];
3659 PyObject *__pyx_string_tab[262];
3660 PyObject *__pyx_number_tab[13];
3663#if CYTHON_COMPILING_IN_LIMITED_API
3664PyObject *__Pyx_PyFrozenDictType;
3668#if CYTHON_USE_FREELISTS
3669struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *__pyx_freelist_10Isosurface___pyx_scope_struct__genexpr[8];
3670int __pyx_freecount_10Isosurface___pyx_scope_struct__genexpr;
3673PyTypeObject *__pyx_CommonTypesMetaclassType;
3676#if CYTHON_COMPILING_IN_LIMITED_API
3677PyObject *__Pyx_CachedMethodType;
3681PyTypeObject *__pyx_CyFunctionType;
3684struct __Pyx_CodeObjectCache __pyx_code_cache;
3687#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
3688PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
3692PyTypeObject *__pyx_GeneratorType;
3700#if CYTHON_USE_MODULE_STATE
3703extern struct PyModuleDef __pyx_moduledef;
3706static struct PyModuleDef __pyx_moduledef;
3709#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
3711#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
3713static __pyx_mstatetype __pyx_mstate_global_static =
3719static __pyx_mstatetype *
const __pyx_mstate_global = &__pyx_mstate_global_static;
3722#define __pyx_kp_u_object_difference_box_nll_x_nll_2 __pyx_string_tab[0]
3723#define __pyx_kp_u_object_difference_box_nll_x_nll __pyx_string_tab[1]
3724#define __pyx_kp_u_matrix_1_000000_0_000000_0_0000 __pyx_string_tab[2]
3725#define __pyx_kp_u_face_indices_2 __pyx_string_tab[3]
3726#define __pyx_kp_u_normal_indices_2 __pyx_string_tab[4]
3727#define __pyx_kp_u_normal_vectors __pyx_string_tab[5]
3728#define __pyx_kp_u_include_colors_inc_include_text __pyx_string_tab[6]
3729#define __pyx_kp_u_version_3_7_include_proteus_inc __pyx_string_tab[7]
3730#define __pyx_kp_u__2 __pyx_string_tab[8]
3731#define __pyx_kp_u_AuxiliaryVariables_2 __pyx_string_tab[9]
3732#define __pyx_kp_u_Profiling_2 __pyx_string_tab[10]
3733#define __pyx_kp_u_h5_2 __pyx_string_tab[11]
3734#define __pyx_kp_u__3 __pyx_string_tab[12]
3735#define __pyx_kp_u_inside_vector_on_mesh __pyx_string_tab[13]
3736#define __pyx_kp_u_elementsSpatial_Domain __pyx_string_tab[14]
3737#define __pyx_kp_u_nodesSpatial_Domain __pyx_string_tab[15]
3738#define __pyx_kp_u_0_d_1_d_2_d_2 __pyx_string_tab[16]
3739#define __pyx_kp_u_0_d_1_d_2_d __pyx_string_tab[17]
3740#define __pyx_kp_u_0_f_1_f_2_f __pyx_string_tab[18]
3741#define __pyx_kp_u_ __pyx_string_tab[19]
3742#define __pyx_kp_u_ATTACHING_TO_HDF5 __pyx_string_tab[20]
3743#define __pyx_kp_u_Calculate_called_at_time __pyx_string_tab[21]
3744#define __pyx_kp_u_Elements_have_0_d_vertices_but_a __pyx_string_tab[22]
3745#define __pyx_kp_u_Extract_isosurfaces __pyx_string_tab[23]
3746#define __pyx_kp_u_Isosurface_file_format_not_recog __pyx_string_tab[24]
3747#define __pyx_kp_u_Only_zero_isocontour_extraction __pyx_string_tab[25]
3748#define __pyx_kp_u_Writing_pov_frame __pyx_string_tab[26]
3749#define __pyx_kp_u_disable __pyx_string_tab[27]
3750#define __pyx_kp_u_enable __pyx_string_tab[28]
3751#define __pyx_kp_u_face_indices __pyx_string_tab[29]
3752#define __pyx_kp_u_gc __pyx_string_tab[30]
3753#define __pyx_kp_u_isenabled __pyx_string_tab[31]
3754#define __pyx_kp_u_mesh2_vertex_vectors __pyx_string_tab[32]
3755#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[33]
3756#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[34]
3757#define __pyx_kp_u_only_implemented_for_0_isosurfac __pyx_string_tab[35]
3758#define __pyx_kp_u_proteus_inc __pyx_string_tab[36]
3759#define __pyx_kp_u_proteus_Isosurface_pyx __pyx_string_tab[37]
3760#define __pyx_kp_u_0_d __pyx_string_tab[38]
3761#define __pyx_kp_u_field_s___value_f___frame_04d_p __pyx_string_tab[39]
3762#define __pyx_kp_u__4 __pyx_string_tab[40]
3763#define __pyx_kp_u_union_of_meshes_difference_of_p __pyx_string_tab[41]
3764#define __pyx_n_u__5 __pyx_string_tab[42]
3765#define __pyx_n_u_AV_base __pyx_string_tab[43]
3766#define __pyx_n_u_AuxiliaryVariables __pyx_string_tab[44]
3767#define __pyx_n_u_Comm __pyx_string_tab[45]
3768#define __pyx_n_u_FemField __pyx_string_tab[46]
3769#define __pyx_n_u_File __pyx_string_tab[47]
3770#define __pyx_n_u_I __pyx_string_tab[48]
3771#define __pyx_n_u_Isosurface __pyx_string_tab[49]
3772#define __pyx_n_u_Isosurface___init __pyx_string_tab[50]
3773#define __pyx_n_u_Isosurface_attachHDF5 __pyx_string_tab[51]
3774#define __pyx_n_u_Isosurface_attachModel __pyx_string_tab[52]
3775#define __pyx_n_u_Isosurface_attachModel_locals_ge __pyx_string_tab[53]
3776#define __pyx_n_u_Isosurface_calculate __pyx_string_tab[54]
3777#define __pyx_n_u_Isosurface_triangulateIsosurface __pyx_string_tab[55]
3778#define __pyx_n_u_Isosurface_writeIsosurfaceMesh __pyx_string_tab[56]
3779#define __pyx_n_u_Isosurface_writeIsosurfaceMesh_h __pyx_string_tab[57]
3780#define __pyx_n_u_Isosurface_writeIsosurfaceMesh_p __pyx_string_tab[58]
3781#define __pyx_n_u_Isosurface_writeSceneHeader __pyx_string_tab[59]
3782#define __pyx_n_u_J __pyx_string_tab[60]
3783#define __pyx_n_u_L __pyx_string_tab[61]
3784#define __pyx_n_u_MPI __pyx_string_tab[62]
3785#define __pyx_n_u_OrderedDict __pyx_string_tab[63]
3786#define __pyx_n_u_PETSc __pyx_string_tab[64]
3787#define __pyx_n_u_Profiling __pyx_string_tab[65]
3788#define __pyx_n_u_Template __pyx_string_tab[66]
3789#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[67]
3790#define __pyx_n_u_annotate __pyx_string_tab[68]
3791#define __pyx_n_u_class_getitem __pyx_string_tab[69]
3792#define __pyx_n_u_doc __pyx_string_tab[70]
3793#define __pyx_n_u_func __pyx_string_tab[71]
3794#define __pyx_n_u_init __pyx_string_tab[72]
3795#define __pyx_n_u_main __pyx_string_tab[73]
3796#define __pyx_n_u_metaclass __pyx_string_tab[74]
3797#define __pyx_n_u_module __pyx_string_tab[75]
3798#define __pyx_n_u_mro_entries __pyx_string_tab[76]
3799#define __pyx_n_u_name __pyx_string_tab[77]
3800#define __pyx_n_u_prepare __pyx_string_tab[78]
3801#define __pyx_n_u_qualname __pyx_string_tab[79]
3802#define __pyx_n_u_test __pyx_string_tab[80]
3803#define __pyx_n_u_is_coroutine __pyx_string_tab[81]
3804#define __pyx_n_u_a __pyx_string_tab[82]
3805#define __pyx_n_u_activeTime __pyx_string_tab[83]
3806#define __pyx_n_u_ar __pyx_string_tab[84]
3807#define __pyx_n_u_array __pyx_string_tab[85]
3808#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[86]
3809#define __pyx_n_u_attachHDF5 __pyx_string_tab[87]
3810#define __pyx_n_u_attachModel __pyx_string_tab[88]
3811#define __pyx_n_u_barrier __pyx_string_tab[89]
3812#define __pyx_n_u_beginSequential __pyx_string_tab[90]
3813#define __pyx_n_u_bn __pyx_string_tab[91]
3814#define __pyx_n_u_bnt __pyx_string_tab[92]
3815#define __pyx_n_u_boundaryNodes __pyx_string_tab[93]
3816#define __pyx_n_u_calculate __pyx_string_tab[94]
3817#define __pyx_n_u_cam __pyx_string_tab[95]
3818#define __pyx_n_u_cam_x __pyx_string_tab[96]
3819#define __pyx_n_u_cam_y __pyx_string_tab[97]
3820#define __pyx_n_u_cam_z __pyx_string_tab[98]
3821#define __pyx_n_u_checkTime __pyx_string_tab[99]
3822#define __pyx_n_u_cline_in_traceback __pyx_string_tab[100]
3823#define __pyx_n_u_close __pyx_string_tab[101]
3824#define __pyx_n_u_coefficients __pyx_string_tab[102]
3825#define __pyx_n_u_collections __pyx_string_tab[103]
3826#define __pyx_n_u_comm __pyx_string_tab[104]
3827#define __pyx_n_u_count_nonzero __pyx_string_tab[105]
3828#define __pyx_n_u_create_dataset __pyx_string_tab[106]
3829#define __pyx_n_u_d __pyx_string_tab[107]
3830#define __pyx_n_u_data __pyx_string_tab[108]
3831#define __pyx_n_u_defaultdict __pyx_string_tab[109]
3832#define __pyx_n_u_dof __pyx_string_tab[110]
3833#define __pyx_n_u_domain __pyx_string_tab[111]
3834#define __pyx_n_u_domain_fur_x __pyx_string_tab[112]
3835#define __pyx_n_u_domain_fur_y __pyx_string_tab[113]
3836#define __pyx_n_u_domain_fur_z __pyx_string_tab[114]
3837#define __pyx_n_u_domain_nll_x __pyx_string_tab[115]
3838#define __pyx_n_u_domain_nll_y __pyx_string_tab[116]
3839#define __pyx_n_u_domain_nll_z __pyx_string_tab[117]
3840#define __pyx_n_u_dset __pyx_string_tab[118]
3841#define __pyx_n_u_dx __pyx_string_tab[119]
3842#define __pyx_n_u_e __pyx_string_tab[120]
3843#define __pyx_n_u_eN __pyx_string_tab[121]
3844#define __pyx_n_u_ebN __pyx_string_tab[122]
3845#define __pyx_n_u_elementBoundaryMaterialTypes __pyx_string_tab[123]
3846#define __pyx_n_u_elementBoundaryNodesArray __pyx_string_tab[124]
3847#define __pyx_n_u_elementNodesArray __pyx_string_tab[125]
3848#define __pyx_n_u_elements __pyx_string_tab[126]
3849#define __pyx_n_u_elems __pyx_string_tab[127]
3850#define __pyx_n_u_endSequential __pyx_string_tab[128]
3851#define __pyx_n_u_enumerate __pyx_string_tab[129]
3852#define __pyx_n_u_eps __pyx_string_tab[130]
3853#define __pyx_n_u_exteriorElementBoundariesArray __pyx_string_tab[131]
3854#define __pyx_n_u_f __pyx_string_tab[132]
3855#define __pyx_n_u_field __pyx_string_tab[133]
3856#define __pyx_n_u_fieldNames __pyx_string_tab[134]
3857#define __pyx_n_u_field_i __pyx_string_tab[135]
3858#define __pyx_n_u_filename __pyx_string_tab[136]
3859#define __pyx_n_u_fileprefix __pyx_string_tab[137]
3860#define __pyx_n_u_fine_grid __pyx_string_tab[138]
3861#define __pyx_n_u_flatten __pyx_string_tab[139]
3862#define __pyx_n_u_floor_z __pyx_string_tab[140]
3863#define __pyx_n_u_flush __pyx_string_tab[141]
3864#define __pyx_n_u_format __pyx_string_tab[142]
3865#define __pyx_n_u_frame __pyx_string_tab[143]
3866#define __pyx_n_u_fur __pyx_string_tab[144]
3867#define __pyx_n_u_fur_x __pyx_string_tab[145]
3868#define __pyx_n_u_fur_y __pyx_string_tab[146]
3869#define __pyx_n_u_fur_z __pyx_string_tab[147]
3870#define __pyx_n_u_g2b __pyx_string_tab[148]
3871#define __pyx_n_u_genexpr __pyx_string_tab[149]
3872#define __pyx_n_u_get __pyx_string_tab[150]
3873#define __pyx_n_u_gn __pyx_string_tab[151]
3874#define __pyx_n_u_h5 __pyx_string_tab[152]
3875#define __pyx_n_u_h5py __pyx_string_tab[153]
3876#define __pyx_n_u_i __pyx_string_tab[154]
3877#define __pyx_n_u_index __pyx_string_tab[155]
3878#define __pyx_n_u_isMaster __pyx_string_tab[156]
3879#define __pyx_n_u_isosurface __pyx_string_tab[157]
3880#define __pyx_n_u_isosurfaces __pyx_string_tab[158]
3881#define __pyx_n_u_items __pyx_string_tab[159]
3882#define __pyx_n_u_itertools __pyx_string_tab[160]
3883#define __pyx_n_u_j __pyx_string_tab[161]
3884#define __pyx_n_u_join __pyx_string_tab[162]
3885#define __pyx_n_u_levelModelList __pyx_string_tab[163]
3886#define __pyx_n_u_light __pyx_string_tab[164]
3887#define __pyx_n_u_light_dx __pyx_string_tab[165]
3888#define __pyx_n_u_light_dy __pyx_string_tab[166]
3889#define __pyx_n_u_light_x __pyx_string_tab[167]
3890#define __pyx_n_u_light_y __pyx_string_tab[168]
3891#define __pyx_n_u_light_z __pyx_string_tab[169]
3892#define __pyx_n_u_log __pyx_string_tab[170]
3893#define __pyx_n_u_logDir __pyx_string_tab[171]
3894#define __pyx_n_u_logEvent __pyx_string_tab[172]
3895#define __pyx_n_u_look_at __pyx_string_tab[173]
3896#define __pyx_n_u_look_at_x __pyx_string_tab[174]
3897#define __pyx_n_u_look_at_y __pyx_string_tab[175]
3898#define __pyx_n_u_look_at_z __pyx_string_tab[176]
3899#define __pyx_n_u_mesh __pyx_string_tab[177]
3900#define __pyx_n_u_minus __pyx_string_tab[178]
3901#define __pyx_n_u_model __pyx_string_tab[179]
3902#define __pyx_n_u_mpi4py __pyx_string_tab[180]
3903#define __pyx_n_u_n __pyx_string_tab[181]
3904#define __pyx_n_u_nElements_global __pyx_string_tab[182]
3905#define __pyx_n_u_nFrames __pyx_string_tab[183]
3906#define __pyx_n_u_nMinus __pyx_string_tab[184]
3907#define __pyx_n_u_nN_start __pyx_string_tab[185]
3908#define __pyx_n_u_nPlus __pyx_string_tab[186]
3909#define __pyx_n_u_nZeros __pyx_string_tab[187]
3910#define __pyx_n_u_namedtuple __pyx_string_tab[188]
3911#define __pyx_n_u_next __pyx_string_tab[189]
3912#define __pyx_n_u_next_output __pyx_string_tab[190]
3913#define __pyx_n_u_ni __pyx_string_tab[191]
3914#define __pyx_n_u_nll __pyx_string_tab[192]
3915#define __pyx_n_u_nll_x __pyx_string_tab[193]
3916#define __pyx_n_u_nll_y __pyx_string_tab[194]
3917#define __pyx_n_u_nll_z __pyx_string_tab[195]
3918#define __pyx_n_u_nodeArray __pyx_string_tab[196]
3919#define __pyx_n_u_nodes __pyx_string_tab[197]
3920#define __pyx_n_u_norm __pyx_string_tab[198]
3921#define __pyx_n_u_normal __pyx_string_tab[199]
3922#define __pyx_n_u_normal_indices __pyx_string_tab[200]
3923#define __pyx_n_u_normals __pyx_string_tab[201]
3924#define __pyx_n_u_np __pyx_string_tab[202]
3925#define __pyx_n_u_num_owned_elements __pyx_string_tab[203]
3926#define __pyx_n_u_numpy __pyx_string_tab[204]
3927#define __pyx_n_u_numpy_linalg __pyx_string_tab[205]
3928#define __pyx_n_u_open __pyx_string_tab[206]
3929#define __pyx_n_u_os __pyx_string_tab[207]
3930#define __pyx_n_u_path __pyx_string_tab[208]
3931#define __pyx_n_u_petsc4py __pyx_string_tab[209]
3932#define __pyx_n_u_phi __pyx_string_tab[210]
3933#define __pyx_n_u_plus __pyx_string_tab[211]
3934#define __pyx_n_u_pop __pyx_string_tab[212]
3935#define __pyx_n_u_pov __pyx_string_tab[213]
3936#define __pyx_n_u_povScene __pyx_string_tab[214]
3937#define __pyx_n_u_povSceneTemplate __pyx_string_tab[215]
3938#define __pyx_n_u_pov_filename __pyx_string_tab[216]
3939#define __pyx_n_u_print __pyx_string_tab[217]
3940#define __pyx_n_u_product __pyx_string_tab[218]
3941#define __pyx_n_u_proteus __pyx_string_tab[219]
3942#define __pyx_n_u_rank __pyx_string_tab[220]
3943#define __pyx_n_u_s __pyx_string_tab[221]
3944#define __pyx_n_u_sampleRate __pyx_string_tab[222]
3945#define __pyx_n_u_self __pyx_string_tab[223]
3946#define __pyx_n_u_send __pyx_string_tab[224]
3947#define __pyx_n_u_setdefault __pyx_string_tab[225]
3948#define __pyx_n_u_shape __pyx_string_tab[226]
3949#define __pyx_n_u_sky_z __pyx_string_tab[227]
3950#define __pyx_n_u_step __pyx_string_tab[228]
3951#define __pyx_n_u_string __pyx_string_tab[229]
3952#define __pyx_n_u_substitute __pyx_string_tab[230]
3953#define __pyx_n_u_tLast __pyx_string_tab[231]
3954#define __pyx_n_u_throw __pyx_string_tab[232]
3955#define __pyx_n_u_time __pyx_string_tab[233]
3956#define __pyx_n_u_timeIntegration __pyx_string_tab[234]
3957#define __pyx_n_u_triangulateIsosurface __pyx_string_tab[235]
3958#define __pyx_n_u_u __pyx_string_tab[236]
3959#define __pyx_n_u_v __pyx_string_tab[237]
3960#define __pyx_n_u_value __pyx_string_tab[238]
3961#define __pyx_n_u_values __pyx_string_tab[239]
3962#define __pyx_n_u_variableNames __pyx_string_tab[240]
3963#define __pyx_n_u_w __pyx_string_tab[241]
3964#define __pyx_n_u_wall_y __pyx_string_tab[242]
3965#define __pyx_n_u_write __pyx_string_tab[243]
3966#define __pyx_n_u_writeBoundary __pyx_string_tab[244]
3967#define __pyx_n_u_writeIsosurfaceMesh __pyx_string_tab[245]
3968#define __pyx_n_u_writeIsosurfaceMesh_h5 __pyx_string_tab[246]
3969#define __pyx_n_u_writeIsosurfaceMesh_povray __pyx_string_tab[247]
3970#define __pyx_n_u_writeSceneHeader __pyx_string_tab[248]
3971#define __pyx_n_u_x __pyx_string_tab[249]
3972#define __pyx_n_u_zeros __pyx_string_tab[250]
3973#define __pyx_n_u_zip __pyx_string_tab[251]
3974#define __pyx_kp_b_iso88591_A_4xs_q_Rt1A_1G7_A_q_wa_A_q __pyx_string_tab[252]
3975#define __pyx_kp_b_iso88591_A_F_G1_4y_hb_q__BgQ_2U_q_k_Qd_uT __pyx_string_tab[253]
3976#define __pyx_kp_b_iso88591_A_IQ_E_N_q_A_uA_A_uA_A_uA_S_A_Q __pyx_string_tab[254]
3977#define __pyx_kp_b_iso88591_A_1_F_G1_4y_hb_q__BgQ_G1_a_E_4uI __pyx_string_tab[255]
3978#define __pyx_kp_b_iso88591_A_F_G_XQ_IRwj_1_HBgZz_O2WJ_q_6_A __pyx_string_tab[256]
3979#define __pyx_kp_b_iso88591__6 __pyx_string_tab[257]
3980#define __pyx_kp_b_iso88591_1_1_4_q_q_Bd_1_t_we5_Kq_2U_04Kq __pyx_string_tab[258]
3981#define __pyx_kp_b_iso88591_q_1_4uIQ_at3b_3e3at7_d_t3a_as_D __pyx_string_tab[259]
3982#define __pyx_kp_b_iso88591_1_N_Qc_4q_Q_d_1_b_AV1_M_1_32T_Q __pyx_string_tab[260]
3983#define __pyx_kp_b_iso88591_A_QH_O1_Ja_IQ_L_Kq_a_Cz_Q_Q_r_A __pyx_string_tab[261]
3984#define __pyx_float_0_0 __pyx_number_tab[0]
3985#define __pyx_float_0_5 __pyx_number_tab[1]
3986#define __pyx_float_2_0 __pyx_number_tab[2]
3987#define __pyx_float_0_01 __pyx_number_tab[3]
3988#define __pyx_float_0_02 __pyx_number_tab[4]
3989#define __pyx_float_0_85 __pyx_number_tab[5]
3990#define __pyx_int_0 __pyx_number_tab[6]
3991#define __pyx_int_1 __pyx_number_tab[7]
3992#define __pyx_int_2 __pyx_number_tab[8]
3993#define __pyx_int_3 __pyx_number_tab[9]
3994#define __pyx_int_4 __pyx_number_tab[10]
3995#define __pyx_int_5 __pyx_number_tab[11]
3996#define __pyx_int_10 __pyx_number_tab[12]
3998#if CYTHON_USE_MODULE_STATE
3999static CYTHON_SMALL_CODE
int __pyx_m_clear(PyObject *m) {
4000 __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
4001 if (!clear_module_state)
return 0;
4002 Py_CLEAR(clear_module_state->__pyx_d);
4003 Py_CLEAR(clear_module_state->__pyx_b);
4004 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
4005 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
4006 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
4007 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
4008 #if CYTHON_PEP489_MULTI_PHASE_INIT
4009 __Pyx_State_RemoveModule(NULL);
4011 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
4012 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
4013 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
4014 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
4015 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
4016 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
4017 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
4018 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
4019 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
4020 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
4021 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
4022 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
4023 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
4024 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
4025 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
4026 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
4027 Py_CLEAR(clear_module_state->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr);
4028 Py_CLEAR(clear_module_state->__pyx_type_10Isosurface___pyx_scope_struct__genexpr);
4029 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_items.method);
4030 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_pop.method);
4031 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_values.method);
4032 for (
int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); }
4033 for (
int i=0; i<12; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
4034 for (
int i=0; i<10; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
4035 for (
int i=0; i<262; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
4036 for (
int i=0; i<13; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
4039Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
4042Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
4045Py_CLEAR(clear_module_state->__pyx_GeneratorType);
4052#if CYTHON_USE_MODULE_STATE
4053static CYTHON_SMALL_CODE
int __pyx_m_traverse(PyObject *m, visitproc visit,
void *arg) {
4054 __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
4055 if (!traverse_module_state)
return 0;
4056 Py_VISIT(traverse_module_state->__pyx_d);
4057 Py_VISIT(traverse_module_state->__pyx_b);
4058 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
4059 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
4060 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
4061 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
4062 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
4063 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
4064 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
4065 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
4066 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
4067 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
4068 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
4069 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
4070 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
4071 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
4072 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
4073 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
4074 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
4075 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
4076 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
4077 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
4078 Py_VISIT(traverse_module_state->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr);
4079 Py_VISIT(traverse_module_state->__pyx_type_10Isosurface___pyx_scope_struct__genexpr);
4080 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_items.method);
4081 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_pop.method);
4082 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_values.method);
4083 for (
int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); }
4084 for (
int i=0; i<12; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
4085 for (
int i=0; i<10; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
4086 for (
int i=0; i<262; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
4087 for (
int i=0; i<13; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
4090Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
4093Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
4096Py_VISIT(traverse_module_state->__pyx_GeneratorType);
4112static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self) {
4113 PyTypeObject *__pyx_r;
4124 __pyx_r = PyDataType_TYPEOBJ(__pyx_v_self);
4149static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self) {
4161 __pyx_r = PyDataType_KIND(__pyx_v_self);
4186static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self) {
4198 __pyx_r = PyDataType_TYPE(__pyx_v_self);
4223static CYTHON_INLINE
char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self) {
4235 __pyx_r = PyDataType_BYTEORDER(__pyx_v_self);
4260static CYTHON_INLINE
int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self) {
4272 __pyx_r = PyDataType_TYPENUM(__pyx_v_self);
4297static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self) {
4309 __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
4334static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self) {
4346 __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
4371static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self) {
4372 PyObject *__pyx_r = NULL;
4373 __Pyx_RefNannyDeclarations
4374 PyObject *__pyx_t_1;
4375 __Pyx_RefNannySetupContext(
"__get__", 0);
4384 __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
4387 PyObject *__pyx_temp;
4389 __pyx_temp = __pyx_r;
4390 __Pyx_INCREF(((PyObject *)__pyx_t_1));
4391 __pyx_r = ((PyObject *)__pyx_t_1);
4393 __Pyx_XDECREF(__pyx_temp);
4408 __Pyx_XGIVEREF(__pyx_r);
4409 __Pyx_RefNannyFinishContext();
4421static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self) {
4422 PyObject *__pyx_r = NULL;
4423 __Pyx_RefNannyDeclarations
4424 PyObject *__pyx_t_1;
4425 __Pyx_RefNannySetupContext(
"__get__", 0);
4434 __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
4437 PyObject *__pyx_temp;
4439 __pyx_temp = __pyx_r;
4440 __Pyx_INCREF(((PyObject*)__pyx_t_1));
4441 __pyx_r = ((PyObject*)__pyx_t_1);
4443 __Pyx_XDECREF(__pyx_temp);
4458 __Pyx_XGIVEREF(__pyx_r);
4459 __Pyx_RefNannyFinishContext();
4471static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self) {
4472 PyArray_ArrayDescr *__pyx_r;
4483 __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
4508static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self) {
4520 __pyx_r = PyDataType_FLAGS(__pyx_v_self);
4545static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self) {
4557 __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
4582static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self) {
4594 __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
4619static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self) {
4631 __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
4656static CYTHON_INLINE
int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self) {
4668 __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
4693static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self) {
4705 __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
4730static CYTHON_INLINE
void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self) {
4742 __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
4767static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self) {
4779 __pyx_r = PyArray_BASE(__pyx_v_self);
4804static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self) {
4805 PyArray_Descr *__pyx_r = NULL;
4806 __Pyx_RefNannyDeclarations
4807 PyArray_Descr *__pyx_t_1;
4808 __Pyx_RefNannySetupContext(
"__get__", 0);
4817 __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
4820 PyArray_Descr *__pyx_temp;
4822 __pyx_temp = __pyx_r;
4823 __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
4824 __pyx_r = ((PyArray_Descr *)__pyx_t_1);
4826 __Pyx_XDECREF((PyObject *)__pyx_temp);
4841 __Pyx_XGIVEREF((PyObject *)__pyx_r);
4842 __Pyx_RefNannyFinishContext();
4854static CYTHON_INLINE
int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self) {
4866 __pyx_r = PyArray_NDIM(__pyx_v_self);
4891static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self) {
4903 __pyx_r = PyArray_DIMS(__pyx_v_self);
4928static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self) {
4940 __pyx_r = PyArray_STRIDES(__pyx_v_self);
4965static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self) {
4977 __pyx_r = PyArray_SIZE(__pyx_v_self);
5002static CYTHON_INLINE
char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self) {
5014 __pyx_r = PyArray_BYTES(__pyx_v_self);
5039static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
5040 PyObject *__pyx_r = NULL;
5041 __Pyx_RefNannyDeclarations
5042 PyObject *__pyx_t_1 = NULL;
5043 int __pyx_lineno = 0;
5044 const char *__pyx_filename = NULL;
5045 int __pyx_clineno = 0;
5046 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew1", 0);
5055 __pyx_t_1 = PyArray_MultiIterNew(1, ((
void *)__pyx_v_a));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 795, __pyx_L1_error)
5056 __Pyx_GOTREF(__pyx_t_1);
5058 PyObject *__pyx_temp;
5060 __pyx_temp = __pyx_r;
5061 __pyx_r = __pyx_t_1;
5063 __Pyx_XDECREF(__pyx_temp);
5078 __Pyx_XDECREF(__pyx_t_1);
5079 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
5082 __Pyx_XGIVEREF(__pyx_r);
5083 __Pyx_RefNannyFinishContext();
5095static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
5096 PyObject *__pyx_r = NULL;
5097 __Pyx_RefNannyDeclarations
5098 PyObject *__pyx_t_1 = NULL;
5099 int __pyx_lineno = 0;
5100 const char *__pyx_filename = NULL;
5101 int __pyx_clineno = 0;
5102 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew2", 0);
5111 __pyx_t_1 = PyArray_MultiIterNew(2, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L1_error)
5112 __Pyx_GOTREF(__pyx_t_1);
5114 PyObject *__pyx_temp;
5116 __pyx_temp = __pyx_r;
5117 __pyx_r = __pyx_t_1;
5119 __Pyx_XDECREF(__pyx_temp);
5134 __Pyx_XDECREF(__pyx_t_1);
5135 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
5138 __Pyx_XGIVEREF(__pyx_r);
5139 __Pyx_RefNannyFinishContext();
5151static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
5152 PyObject *__pyx_r = NULL;
5153 __Pyx_RefNannyDeclarations
5154 PyObject *__pyx_t_1 = NULL;
5155 int __pyx_lineno = 0;
5156 const char *__pyx_filename = NULL;
5157 int __pyx_clineno = 0;
5158 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew3", 0);
5167 __pyx_t_1 = PyArray_MultiIterNew(3, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b), ((
void *)__pyx_v_c));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 801, __pyx_L1_error)
5168 __Pyx_GOTREF(__pyx_t_1);
5170 PyObject *__pyx_temp;
5172 __pyx_temp = __pyx_r;
5173 __pyx_r = __pyx_t_1;
5175 __Pyx_XDECREF(__pyx_temp);
5190 __Pyx_XDECREF(__pyx_t_1);
5191 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
5194 __Pyx_XGIVEREF(__pyx_r);
5195 __Pyx_RefNannyFinishContext();
5207static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
5208 PyObject *__pyx_r = NULL;
5209 __Pyx_RefNannyDeclarations
5210 PyObject *__pyx_t_1 = NULL;
5211 int __pyx_lineno = 0;
5212 const char *__pyx_filename = NULL;
5213 int __pyx_clineno = 0;
5214 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew4", 0);
5223 __pyx_t_1 = PyArray_MultiIterNew(4, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b), ((
void *)__pyx_v_c), ((
void *)__pyx_v_d));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 804, __pyx_L1_error)
5224 __Pyx_GOTREF(__pyx_t_1);
5226 PyObject *__pyx_temp;
5228 __pyx_temp = __pyx_r;
5229 __pyx_r = __pyx_t_1;
5231 __Pyx_XDECREF(__pyx_temp);
5246 __Pyx_XDECREF(__pyx_t_1);
5247 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
5250 __Pyx_XGIVEREF(__pyx_r);
5251 __Pyx_RefNannyFinishContext();
5263static 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) {
5264 PyObject *__pyx_r = NULL;
5265 __Pyx_RefNannyDeclarations
5266 PyObject *__pyx_t_1 = NULL;
5267 int __pyx_lineno = 0;
5268 const char *__pyx_filename = NULL;
5269 int __pyx_clineno = 0;
5270 __Pyx_RefNannySetupContext(
"PyArray_MultiIterNew5", 0);
5279 __pyx_t_1 = PyArray_MultiIterNew(5, ((
void *)__pyx_v_a), ((
void *)__pyx_v_b), ((
void *)__pyx_v_c), ((
void *)__pyx_v_d), ((
void *)__pyx_v_e));
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 807, __pyx_L1_error)
5280 __Pyx_GOTREF(__pyx_t_1);
5282 PyObject *__pyx_temp;
5284 __pyx_temp = __pyx_r;
5285 __pyx_r = __pyx_t_1;
5287 __Pyx_XDECREF(__pyx_temp);
5302 __Pyx_XDECREF(__pyx_t_1);
5303 __Pyx_AddTraceback(
"numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
5306 __Pyx_XGIVEREF(__pyx_r);
5307 __Pyx_RefNannyFinishContext();
5319static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
5320 PyObject *__pyx_r = NULL;
5321 __Pyx_RefNannyDeclarations
5323 PyObject *__pyx_t_2;
5324 __Pyx_RefNannySetupContext(
"PyDataType_SHAPE", 0);
5333 __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
5345 __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray___get__(__pyx_v_d)->shape;
5348 PyObject *__pyx_temp;
5350 __pyx_temp = __pyx_r;
5351 __Pyx_INCREF(((PyObject*)__pyx_t_2));
5352 __pyx_r = ((PyObject*)__pyx_t_2);
5354 __Pyx_XDECREF(__pyx_temp);
5377 PyObject *__pyx_temp;
5379 __pyx_temp = __pyx_r;
5380 __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
5381 __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
5383 __Pyx_XDECREF(__pyx_temp);
5398 __Pyx_XGIVEREF(__pyx_r);
5399 __Pyx_RefNannyFinishContext();
5411static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self) {
5423 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nin;
5448static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self) {
5460 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nout;
5485static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self) {
5497 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nargs;
5522static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self) {
5523 PyUFuncGenericFunction *__pyx_r;
5534 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->functions;
5559static CYTHON_INLINE
void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self) {
5571 __pyx_r = ((
void **)_PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->data);
5596static CYTHON_INLINE
int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self) {
5608 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ntypes;
5633static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self) {
5634 char const *__pyx_r;
5645 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->name;
5670static CYTHON_INLINE
char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self) {
5671 char const *__pyx_r;
5682 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->doc;
5707static CYTHON_INLINE
void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self) {
5719 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ptr;
5744static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self) {
5756 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->obj;
5781static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self) {
5793 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->userloops;
5818static CYTHON_INLINE
void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
5820 int __pyx_lineno = 0;
5821 const char *__pyx_filename = NULL;
5822 int __pyx_clineno = 0;
5831 Py_INCREF(__pyx_v_base);
5840 __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base);
if (unlikely(__pyx_t_1 == ((
int)-1))) __PYX_ERR(1, 1067, __pyx_L1_error)
5854 __Pyx_AddTraceback(
"numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
5867static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
5868 PyObject *__pyx_v_base;
5869 PyObject *__pyx_r = NULL;
5870 __Pyx_RefNannyDeclarations
5872 __Pyx_RefNannySetupContext(
"get_array_base", 0);
5881 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
5890 __pyx_t_1 = (__pyx_v_base == NULL);
5903 PyObject *__pyx_temp;
5905 __pyx_temp = __pyx_r;
5906 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5908 __Pyx_XDECREF(__pyx_temp);
5929 PyObject *__pyx_temp;
5931 __pyx_temp = __pyx_r;
5932 __Pyx_INCREF(((PyObject *)__pyx_v_base));
5933 __pyx_r = ((PyObject *)__pyx_v_base);
5935 __Pyx_XDECREF(__pyx_temp);
5950 __Pyx_XGIVEREF(__pyx_r);
5951 __Pyx_RefNannyFinishContext();
5963static CYTHON_INLINE
int __pyx_f_5numpy_import_array(
void) {
5965 __Pyx_RefNannyDeclarations
5966 PyObject *__pyx_t_1 = NULL;
5967 PyObject *__pyx_t_2 = NULL;
5968 PyObject *__pyx_t_3 = NULL;
5970 PyObject *__pyx_t_5 = NULL;
5971 PyObject *__pyx_t_6 = NULL;
5972 PyObject *__pyx_t_7 = NULL;
5973 PyObject *__pyx_t_8 = NULL;
5974 PyObject *__pyx_t_9 = NULL;
5976 int __pyx_lineno = 0;
5977 const char *__pyx_filename = NULL;
5978 int __pyx_clineno = 0;
5979 __Pyx_RefNannySetupContext(
"import_array", 0);
5989 __Pyx_PyThreadState_declare
5990 __Pyx_PyThreadState_assign
5991 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5992 __Pyx_XGOTREF(__pyx_t_1);
5993 __Pyx_XGOTREF(__pyx_t_2);
5994 __Pyx_XGOTREF(__pyx_t_3);
6004 __pyx_t_4 = _import_array();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 1079, __pyx_L3_error)
6015 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6016 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6017 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6018 goto __pyx_L8_try_end;
6028 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
6030 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
6031 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1080, __pyx_L5_except_error)
6032 __Pyx_XGOTREF(__pyx_t_5);
6033 __Pyx_XGOTREF(__pyx_t_6);
6034 __Pyx_XGOTREF(__pyx_t_7);
6046 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to};
6047 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
6048 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
6049 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1081, __pyx_L5_except_error)
6050 __Pyx_GOTREF(__pyx_t_8);
6052 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6053 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6054 __PYX_ERR(1, 1081, __pyx_L5_except_error)
6056 goto __pyx_L5_except_error;
6065 __pyx_L5_except_error:;
6066 __Pyx_XGIVEREF(__pyx_t_1);
6067 __Pyx_XGIVEREF(__pyx_t_2);
6068 __Pyx_XGIVEREF(__pyx_t_3);
6069 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
6070 goto __pyx_L1_error;
6086 __Pyx_XDECREF(__pyx_t_5);
6087 __Pyx_XDECREF(__pyx_t_6);
6088 __Pyx_XDECREF(__pyx_t_7);
6089 __Pyx_XDECREF(__pyx_t_8);
6090 __Pyx_XDECREF(__pyx_t_9);
6091 __Pyx_AddTraceback(
"numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
6095 __Pyx_RefNannyFinishContext();
6107static CYTHON_INLINE
int __pyx_f_5numpy_import_umath(
void) {
6109 __Pyx_RefNannyDeclarations
6110 PyObject *__pyx_t_1 = NULL;
6111 PyObject *__pyx_t_2 = NULL;
6112 PyObject *__pyx_t_3 = NULL;
6114 PyObject *__pyx_t_5 = NULL;
6115 PyObject *__pyx_t_6 = NULL;
6116 PyObject *__pyx_t_7 = NULL;
6117 PyObject *__pyx_t_8 = NULL;
6118 PyObject *__pyx_t_9 = NULL;
6120 int __pyx_lineno = 0;
6121 const char *__pyx_filename = NULL;
6122 int __pyx_clineno = 0;
6123 __Pyx_RefNannySetupContext(
"import_umath", 0);
6133 __Pyx_PyThreadState_declare
6134 __Pyx_PyThreadState_assign
6135 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
6136 __Pyx_XGOTREF(__pyx_t_1);
6137 __Pyx_XGOTREF(__pyx_t_2);
6138 __Pyx_XGOTREF(__pyx_t_3);
6148 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 1085, __pyx_L3_error)
6159 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6160 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6161 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6162 goto __pyx_L8_try_end;
6172 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
6174 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
6175 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1086, __pyx_L5_except_error)
6176 __Pyx_XGOTREF(__pyx_t_5);
6177 __Pyx_XGOTREF(__pyx_t_6);
6178 __Pyx_XGOTREF(__pyx_t_7);
6190 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
6191 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
6192 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
6193 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1087, __pyx_L5_except_error)
6194 __Pyx_GOTREF(__pyx_t_8);
6196 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6197 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6198 __PYX_ERR(1, 1087, __pyx_L5_except_error)
6200 goto __pyx_L5_except_error;
6209 __pyx_L5_except_error:;
6210 __Pyx_XGIVEREF(__pyx_t_1);
6211 __Pyx_XGIVEREF(__pyx_t_2);
6212 __Pyx_XGIVEREF(__pyx_t_3);
6213 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
6214 goto __pyx_L1_error;
6230 __Pyx_XDECREF(__pyx_t_5);
6231 __Pyx_XDECREF(__pyx_t_6);
6232 __Pyx_XDECREF(__pyx_t_7);
6233 __Pyx_XDECREF(__pyx_t_8);
6234 __Pyx_XDECREF(__pyx_t_9);
6235 __Pyx_AddTraceback(
"numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
6239 __Pyx_RefNannyFinishContext();
6251static CYTHON_INLINE
int __pyx_f_5numpy_import_ufunc(
void) {
6253 __Pyx_RefNannyDeclarations
6254 PyObject *__pyx_t_1 = NULL;
6255 PyObject *__pyx_t_2 = NULL;
6256 PyObject *__pyx_t_3 = NULL;
6258 PyObject *__pyx_t_5 = NULL;
6259 PyObject *__pyx_t_6 = NULL;
6260 PyObject *__pyx_t_7 = NULL;
6261 PyObject *__pyx_t_8 = NULL;
6262 PyObject *__pyx_t_9 = NULL;
6264 int __pyx_lineno = 0;
6265 const char *__pyx_filename = NULL;
6266 int __pyx_clineno = 0;
6267 __Pyx_RefNannySetupContext(
"import_ufunc", 0);
6277 __Pyx_PyThreadState_declare
6278 __Pyx_PyThreadState_assign
6279 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
6280 __Pyx_XGOTREF(__pyx_t_1);
6281 __Pyx_XGOTREF(__pyx_t_2);
6282 __Pyx_XGOTREF(__pyx_t_3);
6292 __pyx_t_4 = _import_umath();
if (unlikely(__pyx_t_4 == ((
int)-1))) __PYX_ERR(1, 1091, __pyx_L3_error)
6303 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6304 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6305 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6306 goto __pyx_L8_try_end;
6316 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
6318 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
6319 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1092, __pyx_L5_except_error)
6320 __Pyx_XGOTREF(__pyx_t_5);
6321 __Pyx_XGOTREF(__pyx_t_6);
6322 __Pyx_XGOTREF(__pyx_t_7);
6334 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
6335 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
6336 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
6337 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1093, __pyx_L5_except_error)
6338 __Pyx_GOTREF(__pyx_t_8);
6340 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6341 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6342 __PYX_ERR(1, 1093, __pyx_L5_except_error)
6344 goto __pyx_L5_except_error;
6353 __pyx_L5_except_error:;
6354 __Pyx_XGIVEREF(__pyx_t_1);
6355 __Pyx_XGIVEREF(__pyx_t_2);
6356 __Pyx_XGIVEREF(__pyx_t_3);
6357 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
6358 goto __pyx_L1_error;
6374 __Pyx_XDECREF(__pyx_t_5);
6375 __Pyx_XDECREF(__pyx_t_6);
6376 __Pyx_XDECREF(__pyx_t_7);
6377 __Pyx_XDECREF(__pyx_t_8);
6378 __Pyx_XDECREF(__pyx_t_9);
6379 __Pyx_AddTraceback(
"numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
6383 __Pyx_RefNannyFinishContext();
6395static CYTHON_INLINE
int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
6407 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
6433static CYTHON_INLINE
int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
6445 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
6471static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
6472 npy_datetime __pyx_r;
6483 __pyx_r = _PyDatetimeScalarObject_GetValue(__pyx_v_obj);
6508static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
6509 npy_timedelta __pyx_r;
6520 __pyx_r = _PyTimedeltaScalarObject_GetValue(__pyx_v_obj);
6545static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
6546 NPY_DATETIMEUNIT __pyx_r;
6557 __pyx_r = _PyDatetimeScalarObject_GetMetadata(__pyx_v_obj).base;
6582static PyArrayObject *__pyx_f_10Isosurface_EVec(
struct __pyx_opt_args_10Isosurface_EVec *__pyx_optional_args) {
6583 double __pyx_v_x = ((double)0.0);
6584 double __pyx_v_y = ((double)0.0);
6585 double __pyx_v_z = ((double)0.0);
6586 PyArrayObject *__pyx_v_v = 0;
6587 __Pyx_LocalBuf_ND __pyx_pybuffernd_v;
6588 __Pyx_Buffer __pyx_pybuffer_v;
6589 PyArrayObject *__pyx_r = NULL;
6590 __Pyx_RefNannyDeclarations
6591 PyObject *__pyx_t_1 = NULL;
6592 PyObject *__pyx_t_2 = NULL;
6593 Py_ssize_t __pyx_t_3;
6595 int __pyx_lineno = 0;
6596 const char *__pyx_filename = NULL;
6597 int __pyx_clineno = 0;
6598 __Pyx_RefNannySetupContext(
"EVec", 0);
6599 if (__pyx_optional_args) {
6600 if (__pyx_optional_args->__pyx_n > 0) {
6601 __pyx_v_x = __pyx_optional_args->x;
6602 if (__pyx_optional_args->__pyx_n > 1) {
6603 __pyx_v_y = __pyx_optional_args->y;
6604 if (__pyx_optional_args->__pyx_n > 2) {
6605 __pyx_v_z = __pyx_optional_args->z;
6610 __pyx_pybuffer_v.pybuffer.buf = NULL;
6611 __pyx_pybuffer_v.refcount = 0;
6612 __pyx_pybuffernd_v.data = NULL;
6613 __pyx_pybuffernd_v.rcbuffer = &__pyx_pybuffer_v;
6622 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
6623 __Pyx_GOTREF(__pyx_t_1);
6624 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_zeros);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
6625 __Pyx_GOTREF(__pyx_t_2);
6626 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6627 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
6628 __Pyx_GOTREF(__pyx_t_1);
6629 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6630 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 26, __pyx_L1_error)
6632 __Pyx_BufFmt_StackElem __pyx_stack[1];
6633 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
6634 __pyx_v_v = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_v.rcbuffer->pybuffer.buf = NULL;
6635 __PYX_ERR(0, 26, __pyx_L1_error)
6636 }
else {__pyx_pybuffernd_v.diminfo[0].strides = __pyx_pybuffernd_v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v.diminfo[0].shape = __pyx_pybuffernd_v.rcbuffer->pybuffer.shape[0];
6639 __pyx_v_v = ((PyArrayObject *)__pyx_t_1);
6651 if (__pyx_t_3 < 0) {
6652 __pyx_t_3 += __pyx_pybuffernd_v.diminfo[0].shape;
6653 if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
6654 }
else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_v.diminfo[0].shape)) __pyx_t_4 = 0;
6655 if (unlikely(__pyx_t_4 != -1)) {
6656 __Pyx_RaiseBufferIndexError(__pyx_t_4);
6657 __PYX_ERR(0, 27, __pyx_L1_error)
6659 *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_v.diminfo[0].strides) = __pyx_v_x;
6670 if (__pyx_t_3 < 0) {
6671 __pyx_t_3 += __pyx_pybuffernd_v.diminfo[0].shape;
6672 if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
6673 }
else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_v.diminfo[0].shape)) __pyx_t_4 = 0;
6674 if (unlikely(__pyx_t_4 != -1)) {
6675 __Pyx_RaiseBufferIndexError(__pyx_t_4);
6676 __PYX_ERR(0, 28, __pyx_L1_error)
6678 *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_v.diminfo[0].strides) = __pyx_v_y;
6689 if (__pyx_t_3 < 0) {
6690 __pyx_t_3 += __pyx_pybuffernd_v.diminfo[0].shape;
6691 if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
6692 }
else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_v.diminfo[0].shape)) __pyx_t_4 = 0;
6693 if (unlikely(__pyx_t_4 != -1)) {
6694 __Pyx_RaiseBufferIndexError(__pyx_t_4);
6695 __PYX_ERR(0, 29, __pyx_L1_error)
6697 *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_v.diminfo[0].strides) = __pyx_v_z;
6707 PyArrayObject *__pyx_temp;
6709 __pyx_temp = __pyx_r;
6710 __Pyx_INCREF((PyObject *)__pyx_v_v);
6711 __pyx_r = ((PyArrayObject *)__pyx_v_v);
6713 __Pyx_XDECREF((PyObject *)__pyx_temp);
6727 __Pyx_XDECREF(__pyx_t_1);
6728 __Pyx_XDECREF(__pyx_t_2);
6729 { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
6730 __Pyx_PyThreadState_declare
6731 __Pyx_PyThreadState_assign
6732 __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
6733 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v.rcbuffer->pybuffer);
6734 __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
6735 __Pyx_AddTraceback(
"Isosurface.EVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
6739 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v.rcbuffer->pybuffer);
6741 __Pyx_XDECREF((PyObject *)__pyx_v_v);
6744 __Pyx_XGIVEREF((PyObject *)__pyx_r);
6745 __Pyx_RefNannyFinishContext();
6757static double __pyx_f_10Isosurface_enorm(PyArrayObject *__pyx_v_v) {
6758 __Pyx_LocalBuf_ND __pyx_pybuffernd_v;
6759 __Pyx_Buffer __pyx_pybuffer_v;
6761 Py_ssize_t __pyx_t_1;
6763 Py_ssize_t __pyx_t_3;
6764 Py_ssize_t __pyx_t_4;
6765 int __pyx_lineno = 0;
6766 const char *__pyx_filename = NULL;
6767 int __pyx_clineno = 0;
6768 __pyx_pybuffer_v.pybuffer.buf = NULL;
6769 __pyx_pybuffer_v.refcount = 0;
6770 __pyx_pybuffernd_v.data = NULL;
6771 __pyx_pybuffernd_v.rcbuffer = &__pyx_pybuffer_v;
6773 __Pyx_BufFmt_StackElem __pyx_stack[1];
6774 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v.rcbuffer->pybuffer, (PyObject*)__pyx_v_v, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 32, __pyx_L1_error)
6776 __pyx_pybuffernd_v.diminfo[0].strides = __pyx_pybuffernd_v.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v.diminfo[0].shape = __pyx_pybuffernd_v.rcbuffer->pybuffer.shape[0];
6787 if (__pyx_t_1 < 0) {
6788 __pyx_t_1 += __pyx_pybuffernd_v.diminfo[0].shape;
6789 if (unlikely(__pyx_t_1 < 0)) __pyx_t_2 = 0;
6790 }
else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_v.diminfo[0].shape)) __pyx_t_2 = 0;
6791 if (unlikely(__pyx_t_2 != -1)) {
6792 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6793 __PYX_ERR(0, 33, __pyx_L1_error)
6797 if (__pyx_t_3 < 0) {
6798 __pyx_t_3 += __pyx_pybuffernd_v.diminfo[0].shape;
6799 if (unlikely(__pyx_t_3 < 0)) __pyx_t_2 = 0;
6800 }
else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_v.diminfo[0].shape)) __pyx_t_2 = 0;
6801 if (unlikely(__pyx_t_2 != -1)) {
6802 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6803 __PYX_ERR(0, 33, __pyx_L1_error)
6807 if (__pyx_t_4 < 0) {
6808 __pyx_t_4 += __pyx_pybuffernd_v.diminfo[0].shape;
6809 if (unlikely(__pyx_t_4 < 0)) __pyx_t_2 = 0;
6810 }
else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_v.diminfo[0].shape)) __pyx_t_2 = 0;
6811 if (unlikely(__pyx_t_2 != -1)) {
6812 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6813 __PYX_ERR(0, 33, __pyx_L1_error)
6817 __pyx_r = sqrt(((pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_v.diminfo[0].strides)), 2.0) + pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_v.diminfo[0].strides)), 2.0)) + pow((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_v.diminfo[0].strides)), 2.0)));
6831 { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
6832 __Pyx_PyThreadState_declare
6833 __Pyx_PyThreadState_assign
6834 __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
6835 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v.rcbuffer->pybuffer);
6836 __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
6837 __Pyx_AddTraceback(
"Isosurface.enorm", __pyx_clineno, __pyx_lineno, __pyx_filename);
6841 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v.rcbuffer->pybuffer);
6857static double __pyx_f_10Isosurface_edot(PyArrayObject *__pyx_v_v0, PyArrayObject *__pyx_v_v1) {
6858 __Pyx_LocalBuf_ND __pyx_pybuffernd_v0;
6859 __Pyx_Buffer __pyx_pybuffer_v0;
6860 __Pyx_LocalBuf_ND __pyx_pybuffernd_v1;
6861 __Pyx_Buffer __pyx_pybuffer_v1;
6863 Py_ssize_t __pyx_t_1;
6865 Py_ssize_t __pyx_t_3;
6866 Py_ssize_t __pyx_t_4;
6867 Py_ssize_t __pyx_t_5;
6868 Py_ssize_t __pyx_t_6;
6869 Py_ssize_t __pyx_t_7;
6870 int __pyx_lineno = 0;
6871 const char *__pyx_filename = NULL;
6872 int __pyx_clineno = 0;
6873 __pyx_pybuffer_v0.pybuffer.buf = NULL;
6874 __pyx_pybuffer_v0.refcount = 0;
6875 __pyx_pybuffernd_v0.data = NULL;
6876 __pyx_pybuffernd_v0.rcbuffer = &__pyx_pybuffer_v0;
6877 __pyx_pybuffer_v1.pybuffer.buf = NULL;
6878 __pyx_pybuffer_v1.refcount = 0;
6879 __pyx_pybuffernd_v1.data = NULL;
6880 __pyx_pybuffernd_v1.rcbuffer = &__pyx_pybuffer_v1;
6882 __Pyx_BufFmt_StackElem __pyx_stack[1];
6883 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v0.rcbuffer->pybuffer, (PyObject*)__pyx_v_v0, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 35, __pyx_L1_error)
6885 __pyx_pybuffernd_v0.diminfo[0].strides = __pyx_pybuffernd_v0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v0.diminfo[0].shape = __pyx_pybuffernd_v0.rcbuffer->pybuffer.shape[0];
6887 __Pyx_BufFmt_StackElem __pyx_stack[1];
6888 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v1.rcbuffer->pybuffer, (PyObject*)__pyx_v_v1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 35, __pyx_L1_error)
6890 __pyx_pybuffernd_v1.diminfo[0].strides = __pyx_pybuffernd_v1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v1.diminfo[0].shape = __pyx_pybuffernd_v1.rcbuffer->pybuffer.shape[0];
6901 if (__pyx_t_1 < 0) {
6902 __pyx_t_1 += __pyx_pybuffernd_v0.diminfo[0].shape;
6903 if (unlikely(__pyx_t_1 < 0)) __pyx_t_2 = 0;
6904 }
else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
6905 if (unlikely(__pyx_t_2 != -1)) {
6906 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6907 __PYX_ERR(0, 36, __pyx_L1_error)
6911 if (__pyx_t_3 < 0) {
6912 __pyx_t_3 += __pyx_pybuffernd_v1.diminfo[0].shape;
6913 if (unlikely(__pyx_t_3 < 0)) __pyx_t_2 = 0;
6914 }
else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
6915 if (unlikely(__pyx_t_2 != -1)) {
6916 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6917 __PYX_ERR(0, 36, __pyx_L1_error)
6921 if (__pyx_t_4 < 0) {
6922 __pyx_t_4 += __pyx_pybuffernd_v0.diminfo[0].shape;
6923 if (unlikely(__pyx_t_4 < 0)) __pyx_t_2 = 0;
6924 }
else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
6925 if (unlikely(__pyx_t_2 != -1)) {
6926 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6927 __PYX_ERR(0, 36, __pyx_L1_error)
6931 if (__pyx_t_5 < 0) {
6932 __pyx_t_5 += __pyx_pybuffernd_v1.diminfo[0].shape;
6933 if (unlikely(__pyx_t_5 < 0)) __pyx_t_2 = 0;
6934 }
else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
6935 if (unlikely(__pyx_t_2 != -1)) {
6936 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6937 __PYX_ERR(0, 36, __pyx_L1_error)
6941 if (__pyx_t_6 < 0) {
6942 __pyx_t_6 += __pyx_pybuffernd_v0.diminfo[0].shape;
6943 if (unlikely(__pyx_t_6 < 0)) __pyx_t_2 = 0;
6944 }
else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
6945 if (unlikely(__pyx_t_2 != -1)) {
6946 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6947 __PYX_ERR(0, 36, __pyx_L1_error)
6951 if (__pyx_t_7 < 0) {
6952 __pyx_t_7 += __pyx_pybuffernd_v1.diminfo[0].shape;
6953 if (unlikely(__pyx_t_7 < 0)) __pyx_t_2 = 0;
6954 }
else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
6955 if (unlikely(__pyx_t_2 != -1)) {
6956 __Pyx_RaiseBufferIndexError(__pyx_t_2);
6957 __PYX_ERR(0, 36, __pyx_L1_error)
6961 __pyx_r = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_v1.diminfo[0].strides))) + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_v1.diminfo[0].strides)))) + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_v1.diminfo[0].strides))));
6975 { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
6976 __Pyx_PyThreadState_declare
6977 __Pyx_PyThreadState_assign
6978 __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
6979 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v0.rcbuffer->pybuffer);
6980 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v1.rcbuffer->pybuffer);
6981 __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
6982 __Pyx_AddTraceback(
"Isosurface.edot", __pyx_clineno, __pyx_lineno, __pyx_filename);
6986 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v0.rcbuffer->pybuffer);
6987 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v1.rcbuffer->pybuffer);
7005static PyArrayObject *__pyx_f_10Isosurface_ecross(PyArrayObject *__pyx_v_v0, PyArrayObject *__pyx_v_v1) {
7006 __Pyx_LocalBuf_ND __pyx_pybuffernd_v0;
7007 __Pyx_Buffer __pyx_pybuffer_v0;
7008 __Pyx_LocalBuf_ND __pyx_pybuffernd_v1;
7009 __Pyx_Buffer __pyx_pybuffer_v1;
7010 PyArrayObject *__pyx_r = NULL;
7011 __Pyx_RefNannyDeclarations
7012 Py_ssize_t __pyx_t_1;
7014 Py_ssize_t __pyx_t_3;
7015 Py_ssize_t __pyx_t_4;
7016 Py_ssize_t __pyx_t_5;
7017 Py_ssize_t __pyx_t_6;
7018 Py_ssize_t __pyx_t_7;
7019 Py_ssize_t __pyx_t_8;
7020 Py_ssize_t __pyx_t_9;
7021 Py_ssize_t __pyx_t_10;
7022 Py_ssize_t __pyx_t_11;
7023 Py_ssize_t __pyx_t_12;
7024 Py_ssize_t __pyx_t_13;
7025 PyObject *__pyx_t_14 = NULL;
7026 struct __pyx_opt_args_10Isosurface_EVec __pyx_t_15;
7027 int __pyx_lineno = 0;
7028 const char *__pyx_filename = NULL;
7029 int __pyx_clineno = 0;
7030 __Pyx_RefNannySetupContext(
"ecross", 0);
7031 __pyx_pybuffer_v0.pybuffer.buf = NULL;
7032 __pyx_pybuffer_v0.refcount = 0;
7033 __pyx_pybuffernd_v0.data = NULL;
7034 __pyx_pybuffernd_v0.rcbuffer = &__pyx_pybuffer_v0;
7035 __pyx_pybuffer_v1.pybuffer.buf = NULL;
7036 __pyx_pybuffer_v1.refcount = 0;
7037 __pyx_pybuffernd_v1.data = NULL;
7038 __pyx_pybuffernd_v1.rcbuffer = &__pyx_pybuffer_v1;
7040 __Pyx_BufFmt_StackElem __pyx_stack[1];
7041 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v0.rcbuffer->pybuffer, (PyObject*)__pyx_v_v0, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 38, __pyx_L1_error)
7043 __pyx_pybuffernd_v0.diminfo[0].strides = __pyx_pybuffernd_v0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v0.diminfo[0].shape = __pyx_pybuffernd_v0.rcbuffer->pybuffer.shape[0];
7045 __Pyx_BufFmt_StackElem __pyx_stack[1];
7046 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v1.rcbuffer->pybuffer, (PyObject*)__pyx_v_v1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 38, __pyx_L1_error)
7048 __pyx_pybuffernd_v1.diminfo[0].strides = __pyx_pybuffernd_v1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v1.diminfo[0].shape = __pyx_pybuffernd_v1.rcbuffer->pybuffer.shape[0];
7059 if (__pyx_t_1 < 0) {
7060 __pyx_t_1 += __pyx_pybuffernd_v0.diminfo[0].shape;
7061 if (unlikely(__pyx_t_1 < 0)) __pyx_t_2 = 0;
7062 }
else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
7063 if (unlikely(__pyx_t_2 != -1)) {
7064 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7065 __PYX_ERR(0, 39, __pyx_L1_error)
7069 if (__pyx_t_3 < 0) {
7070 __pyx_t_3 += __pyx_pybuffernd_v1.diminfo[0].shape;
7071 if (unlikely(__pyx_t_3 < 0)) __pyx_t_2 = 0;
7072 }
else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
7073 if (unlikely(__pyx_t_2 != -1)) {
7074 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7075 __PYX_ERR(0, 39, __pyx_L1_error)
7079 if (__pyx_t_4 < 0) {
7080 __pyx_t_4 += __pyx_pybuffernd_v0.diminfo[0].shape;
7081 if (unlikely(__pyx_t_4 < 0)) __pyx_t_2 = 0;
7082 }
else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
7083 if (unlikely(__pyx_t_2 != -1)) {
7084 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7085 __PYX_ERR(0, 39, __pyx_L1_error)
7089 if (__pyx_t_5 < 0) {
7090 __pyx_t_5 += __pyx_pybuffernd_v1.diminfo[0].shape;
7091 if (unlikely(__pyx_t_5 < 0)) __pyx_t_2 = 0;
7092 }
else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
7093 if (unlikely(__pyx_t_2 != -1)) {
7094 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7095 __PYX_ERR(0, 39, __pyx_L1_error)
7107 if (__pyx_t_6 < 0) {
7108 __pyx_t_6 += __pyx_pybuffernd_v0.diminfo[0].shape;
7109 if (unlikely(__pyx_t_6 < 0)) __pyx_t_2 = 0;
7110 }
else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
7111 if (unlikely(__pyx_t_2 != -1)) {
7112 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7113 __PYX_ERR(0, 40, __pyx_L1_error)
7117 if (__pyx_t_7 < 0) {
7118 __pyx_t_7 += __pyx_pybuffernd_v1.diminfo[0].shape;
7119 if (unlikely(__pyx_t_7 < 0)) __pyx_t_2 = 0;
7120 }
else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
7121 if (unlikely(__pyx_t_2 != -1)) {
7122 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7123 __PYX_ERR(0, 40, __pyx_L1_error)
7127 if (__pyx_t_8 < 0) {
7128 __pyx_t_8 += __pyx_pybuffernd_v0.diminfo[0].shape;
7129 if (unlikely(__pyx_t_8 < 0)) __pyx_t_2 = 0;
7130 }
else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
7131 if (unlikely(__pyx_t_2 != -1)) {
7132 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7133 __PYX_ERR(0, 40, __pyx_L1_error)
7137 if (__pyx_t_9 < 0) {
7138 __pyx_t_9 += __pyx_pybuffernd_v1.diminfo[0].shape;
7139 if (unlikely(__pyx_t_9 < 0)) __pyx_t_2 = 0;
7140 }
else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
7141 if (unlikely(__pyx_t_2 != -1)) {
7142 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7143 __PYX_ERR(0, 40, __pyx_L1_error)
7155 if (__pyx_t_10 < 0) {
7156 __pyx_t_10 += __pyx_pybuffernd_v0.diminfo[0].shape;
7157 if (unlikely(__pyx_t_10 < 0)) __pyx_t_2 = 0;
7158 }
else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
7159 if (unlikely(__pyx_t_2 != -1)) {
7160 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7161 __PYX_ERR(0, 41, __pyx_L1_error)
7165 if (__pyx_t_11 < 0) {
7166 __pyx_t_11 += __pyx_pybuffernd_v1.diminfo[0].shape;
7167 if (unlikely(__pyx_t_11 < 0)) __pyx_t_2 = 0;
7168 }
else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
7169 if (unlikely(__pyx_t_2 != -1)) {
7170 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7171 __PYX_ERR(0, 41, __pyx_L1_error)
7175 if (__pyx_t_12 < 0) {
7176 __pyx_t_12 += __pyx_pybuffernd_v0.diminfo[0].shape;
7177 if (unlikely(__pyx_t_12 < 0)) __pyx_t_2 = 0;
7178 }
else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_v0.diminfo[0].shape)) __pyx_t_2 = 0;
7179 if (unlikely(__pyx_t_2 != -1)) {
7180 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7181 __PYX_ERR(0, 41, __pyx_L1_error)
7185 if (__pyx_t_13 < 0) {
7186 __pyx_t_13 += __pyx_pybuffernd_v1.diminfo[0].shape;
7187 if (unlikely(__pyx_t_13 < 0)) __pyx_t_2 = 0;
7188 }
else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_v1.diminfo[0].shape)) __pyx_t_2 = 0;
7189 if (unlikely(__pyx_t_2 != -1)) {
7190 __Pyx_RaiseBufferIndexError(__pyx_t_2);
7191 __PYX_ERR(0, 41, __pyx_L1_error)
7201 __pyx_t_15.__pyx_n = 3;
7202 __pyx_t_15.x = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_v1.diminfo[0].strides))) - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_v1.diminfo[0].strides))));
7203 __pyx_t_15.y = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_v1.diminfo[0].strides))) - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_v1.diminfo[0].strides))));
7204 __pyx_t_15.z = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_v1.diminfo[0].strides))) - ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v0.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_v0.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_v1.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_v1.diminfo[0].strides))));
7205 __pyx_t_14 = ((PyObject *)__pyx_f_10Isosurface_EVec(&__pyx_t_15));
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 39, __pyx_L1_error)
7206 __Pyx_GOTREF(__pyx_t_14);
7208 PyArrayObject *__pyx_temp;
7210 __pyx_temp = __pyx_r;
7211 __pyx_r = ((PyArrayObject *)__pyx_t_14);
7213 __Pyx_XDECREF((PyObject *)__pyx_temp);
7228 __Pyx_XDECREF(__pyx_t_14);
7229 { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
7230 __Pyx_PyThreadState_declare
7231 __Pyx_PyThreadState_assign
7232 __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
7233 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v0.rcbuffer->pybuffer);
7234 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v1.rcbuffer->pybuffer);
7235 __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
7236 __Pyx_AddTraceback(
"Isosurface.ecross", __pyx_clineno, __pyx_lineno, __pyx_filename);
7240 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v0.rcbuffer->pybuffer);
7241 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v1.rcbuffer->pybuffer);
7247 __Pyx_XGIVEREF((PyObject *)__pyx_r);
7248 __Pyx_RefNannyFinishContext();
7260static double __pyx_f_10Isosurface_etriple(PyArrayObject *__pyx_v_v0, PyArrayObject *__pyx_v_v1, PyArrayObject *__pyx_v_v2) {
7261 __Pyx_LocalBuf_ND __pyx_pybuffernd_v0;
7262 __Pyx_Buffer __pyx_pybuffer_v0;
7263 __Pyx_LocalBuf_ND __pyx_pybuffernd_v1;
7264 __Pyx_Buffer __pyx_pybuffer_v1;
7265 __Pyx_LocalBuf_ND __pyx_pybuffernd_v2;
7266 __Pyx_Buffer __pyx_pybuffer_v2;
7268 __Pyx_RefNannyDeclarations
7269 PyObject *__pyx_t_1 = NULL;
7271 int __pyx_lineno = 0;
7272 const char *__pyx_filename = NULL;
7273 int __pyx_clineno = 0;
7274 __Pyx_RefNannySetupContext(
"etriple", 0);
7275 __pyx_pybuffer_v0.pybuffer.buf = NULL;
7276 __pyx_pybuffer_v0.refcount = 0;
7277 __pyx_pybuffernd_v0.data = NULL;
7278 __pyx_pybuffernd_v0.rcbuffer = &__pyx_pybuffer_v0;
7279 __pyx_pybuffer_v1.pybuffer.buf = NULL;
7280 __pyx_pybuffer_v1.refcount = 0;
7281 __pyx_pybuffernd_v1.data = NULL;
7282 __pyx_pybuffernd_v1.rcbuffer = &__pyx_pybuffer_v1;
7283 __pyx_pybuffer_v2.pybuffer.buf = NULL;
7284 __pyx_pybuffer_v2.refcount = 0;
7285 __pyx_pybuffernd_v2.data = NULL;
7286 __pyx_pybuffernd_v2.rcbuffer = &__pyx_pybuffer_v2;
7288 __Pyx_BufFmt_StackElem __pyx_stack[1];
7289 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v0.rcbuffer->pybuffer, (PyObject*)__pyx_v_v0, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 43, __pyx_L1_error)
7291 __pyx_pybuffernd_v0.diminfo[0].strides = __pyx_pybuffernd_v0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v0.diminfo[0].shape = __pyx_pybuffernd_v0.rcbuffer->pybuffer.shape[0];
7293 __Pyx_BufFmt_StackElem __pyx_stack[1];
7294 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v1.rcbuffer->pybuffer, (PyObject*)__pyx_v_v1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 43, __pyx_L1_error)
7296 __pyx_pybuffernd_v1.diminfo[0].strides = __pyx_pybuffernd_v1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v1.diminfo[0].shape = __pyx_pybuffernd_v1.rcbuffer->pybuffer.shape[0];
7298 __Pyx_BufFmt_StackElem __pyx_stack[1];
7299 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v2.rcbuffer->pybuffer, (PyObject*)__pyx_v_v2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 43, __pyx_L1_error)
7301 __pyx_pybuffernd_v2.diminfo[0].strides = __pyx_pybuffernd_v2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v2.diminfo[0].shape = __pyx_pybuffernd_v2.rcbuffer->pybuffer.shape[0];
7310 __pyx_t_1 = ((PyObject *)__pyx_f_10Isosurface_ecross(((PyArrayObject *)__pyx_v_v1), ((PyArrayObject *)__pyx_v_v2)));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
7311 __Pyx_GOTREF(__pyx_t_1);
7312 __pyx_t_2 = __pyx_f_10Isosurface_edot(((PyArrayObject *)__pyx_v_v0), ((PyArrayObject *)__pyx_t_1));
if (unlikely(__pyx_t_2 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 44, __pyx_L1_error)
7313 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7315 __pyx_r = __pyx_t_2;
7329 __Pyx_XDECREF(__pyx_t_1);
7330 { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
7331 __Pyx_PyThreadState_declare
7332 __Pyx_PyThreadState_assign
7333 __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
7334 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v0.rcbuffer->pybuffer);
7335 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v1.rcbuffer->pybuffer);
7336 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v2.rcbuffer->pybuffer);
7337 __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
7338 __Pyx_AddTraceback(
"Isosurface.etriple", __pyx_clineno, __pyx_lineno, __pyx_filename);
7342 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v0.rcbuffer->pybuffer);
7343 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v1.rcbuffer->pybuffer);
7344 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v2.rcbuffer->pybuffer);
7353 __Pyx_RefNannyFinishContext();
7366static PyObject *__pyx_pw_10Isosurface_10Isosurface_1__init__(PyObject *__pyx_self,
7367#
if CYTHON_VECTORCALL
7368PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7370PyObject *__pyx_args, PyObject *__pyx_kwds
7373PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface___init__,
"Isosurface.__init__(self, isosurfaces, domain, activeTime=None, sampleRate=0, format=\047pov\047, writeBoundary=True)\n\nCreate a set of isosurfaces that will be extracted and serialized\n\n:param isosurfaces: An iterable of \"isosurfaces\". Each isosurface is\nspecified by a 2-tuple, with the first element in the tuple is a field\nfrom which to extract isosurfaces, and the second element is an n-tuple\nof isosurface values to extract.\n\n:param domain: a Domain object\n\n:param activeTime: If not None, a 2-tuple of start time and end time\nfor which the point gauge is active.\n\n:param sampleRate: The intervals at which samples should be measured.\nNote that this is a rough lower bound, and that the gauge values could\nbe computed less frequently depending on the time integrator. The\ndefault value of zero computes the gauge values at every time step.\n\n:param format: the file format for the isosurfaces (\047pov\047, None).\n\n:param writeBoundary: whether to write the boundary mesh to or the\ndomain bounding box\n\nExample:\n\nphi0 = (isosurfaces=(\047phi\047, (0.0,)),\n activeTime=(0, 2.5),\n sampleRate=0.2,\n fileName=\047water.pov\047)\n\nThis creates an Isosurfaces object that will extract phi(x,y,z,t) = 0\nat simulation time between = 0 and 2.5 with samples taken no more\nfrequently than every 0.2 seconds. Results will be saved to:\nwater.pov.");
7374static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_1__init__ = {
"__init__", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface___init__};
7375static PyObject *__pyx_pw_10Isosurface_10Isosurface_1__init__(PyObject *__pyx_self,
7376#
if CYTHON_VECTORCALL
7377PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7379PyObject *__pyx_args, PyObject *__pyx_kwds
7382 PyObject *__pyx_v_self = 0;
7383 PyObject *__pyx_v_isosurfaces = 0;
7384 PyObject *__pyx_v_domain = 0;
7385 PyObject *__pyx_v_activeTime = 0;
7386 PyObject *__pyx_v_sampleRate = 0;
7387 PyObject *__pyx_v_format = 0;
7388 PyObject *__pyx_v_writeBoundary = 0;
7389 #if !CYTHON_VECTORCALL
7390 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7392 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7393 PyObject* values[7] = {0,0,0,0,0,0,0};
7394 int __pyx_lineno = 0;
7395 const char *__pyx_filename = NULL;
7396 int __pyx_clineno = 0;
7397 PyObject *__pyx_r = 0;
7398 __Pyx_RefNannyDeclarations
7399 __Pyx_RefNannySetupContext(
"__init__ (wrapper)", 0);
7400 #if !CYTHON_VECTORCALL
7401 #if CYTHON_ASSUME_SAFE_SIZE
7402 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7404 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
7407 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7409 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_isosurfaces,&__pyx_mstate_global->__pyx_n_u_domain,&__pyx_mstate_global->__pyx_n_u_activeTime,&__pyx_mstate_global->__pyx_n_u_sampleRate,&__pyx_mstate_global->__pyx_n_u_format,&__pyx_mstate_global->__pyx_n_u_writeBoundary,0};
7410 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7411 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 51, __pyx_L3_error)
7412 if (__pyx_kwds_len > 0) {
7413 switch (__pyx_nargs) {
7415 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7416 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 51, __pyx_L3_error)
7419 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7420 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 51, __pyx_L3_error)
7423 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7424 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 51, __pyx_L3_error)
7427 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7428 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 51, __pyx_L3_error)
7431 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7432 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 51, __pyx_L3_error)
7435 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7436 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 51, __pyx_L3_error)
7439 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7440 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 51, __pyx_L3_error)
7443 default:
goto __pyx_L5_argtuple_error;
7445 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7446 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"__init__", 0) < (0)) __PYX_ERR(0, 51, __pyx_L3_error)
7447 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
7448 if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
7449 if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_pov)));
7458 if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
7459 for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
7460 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"__init__", 0, 3, 7, i); __PYX_ERR(0, 51, __pyx_L3_error) }
7463 switch (__pyx_nargs) {
7465 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7466 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 51, __pyx_L3_error)
7469 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7470 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 51, __pyx_L3_error)
7473 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7474 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 51, __pyx_L3_error)
7477 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7478 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 51, __pyx_L3_error)
7481 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7482 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 51, __pyx_L3_error)
7483 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7484 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 51, __pyx_L3_error)
7485 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7486 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 51, __pyx_L3_error)
7488 default:
goto __pyx_L5_argtuple_error;
7498 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
7499 if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
7500 if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_pov)));
7501 if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
7503 __pyx_v_self = values[0];
7504 __pyx_v_isosurfaces = values[1];
7505 __pyx_v_domain = values[2];
7506 __pyx_v_activeTime = values[3];
7507 __pyx_v_sampleRate = values[4];
7508 __pyx_v_format = values[5];
7509 __pyx_v_writeBoundary = values[6];
7512 __pyx_L5_argtuple_error:;
7513 __Pyx_RaiseArgtupleInvalid(
"__init__", 0, 3, 7, __pyx_nargs); __PYX_ERR(0, 51, __pyx_L3_error)
7515 goto __pyx_L4_argument_unpacking_done;
7517 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7518 Py_XDECREF(values[__pyx_temp]);
7520 __Pyx_AddTraceback(
"Isosurface.Isosurface.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7521 __Pyx_RefNannyFinishContext();
7523 __pyx_L4_argument_unpacking_done:;
7524 __pyx_r = __pyx_pf_10Isosurface_10Isosurface___init__(__pyx_self, __pyx_v_self, __pyx_v_isosurfaces, __pyx_v_domain, __pyx_v_activeTime, __pyx_v_sampleRate, __pyx_v_format, __pyx_v_writeBoundary);
7527 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
7528 Py_XDECREF(values[__pyx_temp]);
7530 __Pyx_RefNannyFinishContext();
7534static PyObject *__pyx_pf_10Isosurface_10Isosurface___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_isosurfaces, PyObject *__pyx_v_domain, PyObject *__pyx_v_activeTime, PyObject *__pyx_v_sampleRate, PyObject *__pyx_v_format, PyObject *__pyx_v_writeBoundary) {
7535 CYTHON_UNUSED PyObject *__pyx_v_f = NULL;
7536 PyObject *__pyx_v_values = NULL;
7537 PyObject *__pyx_v_v = NULL;
7538 PyObject *__pyx_r = NULL;
7539 __Pyx_RefNannyDeclarations
7540 PyObject *__pyx_t_1 = NULL;
7541 PyObject *__pyx_t_2 = NULL;
7542 Py_ssize_t __pyx_t_3;
7543 PyObject *(*__pyx_t_4)(PyObject *);
7544 PyObject *__pyx_t_5 = NULL;
7545 PyObject *__pyx_t_6 = NULL;
7546 PyObject *__pyx_t_7 = NULL;
7547 PyObject *(*__pyx_t_8)(PyObject *);
7548 Py_ssize_t __pyx_t_9;
7549 PyObject *(*__pyx_t_10)(PyObject *);
7552 int __pyx_lineno = 0;
7553 const char *__pyx_filename = NULL;
7554 int __pyx_clineno = 0;
7555 __Pyx_RefNannySetupContext(
"__init__", 0);
7564 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_isosurfaces, __pyx_v_isosurfaces) < (0)) __PYX_ERR(0, 88, __pyx_L1_error)
7573 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain, __pyx_v_domain) < (0)) __PYX_ERR(0, 89, __pyx_L1_error)
7582 __pyx_t_1 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
7583 __Pyx_GOTREF(__pyx_t_1);
7584 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodes, __pyx_t_1) < (0)) __PYX_ERR(0, 90, __pyx_L1_error)
7585 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7594 __pyx_t_1 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
7595 __Pyx_GOTREF(__pyx_t_1);
7596 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elements, __pyx_t_1) < (0)) __PYX_ERR(0, 91, __pyx_L1_error)
7597 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7606 __pyx_t_1 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
7607 __Pyx_GOTREF(__pyx_t_1);
7608 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_normals, __pyx_t_1) < (0)) __PYX_ERR(0, 92, __pyx_L1_error)
7609 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7618 __pyx_t_1 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
7619 __Pyx_GOTREF(__pyx_t_1);
7620 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_normal_indices, __pyx_t_1) < (0)) __PYX_ERR(0, 93, __pyx_L1_error)
7621 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7630 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_isosurfaces);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
7631 __Pyx_GOTREF(__pyx_t_1);
7632 if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
7633 __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
7637 __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
7638 __Pyx_GOTREF(__pyx_t_2);
7639 __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
7641 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7643 if (likely(!__pyx_t_4)) {
7644 if (likely(PyList_CheckExact(__pyx_t_2))) {
7646 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
7647 #if !CYTHON_ASSUME_SAFE_SIZE
7648 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 94, __pyx_L1_error)
7650 if (__pyx_t_3 >= __pyx_temp)
break;
7652 __pyx_t_1 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
7656 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
7657 #if !CYTHON_ASSUME_SAFE_SIZE
7658 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 94, __pyx_L1_error)
7660 if (__pyx_t_3 >= __pyx_temp)
break;
7662 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7663 __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
7665 __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
7669 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
7671 __pyx_t_1 = __pyx_t_4(__pyx_t_2);
7672 if (unlikely(!__pyx_t_1)) {
7673 PyObject* exc_type = PyErr_Occurred();
7675 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 94, __pyx_L1_error)
7681 __Pyx_GOTREF(__pyx_t_1);
7682 if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
7683 PyObject* sequence = __pyx_t_1;
7684 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
7685 if (unlikely(size != 2)) {
7686 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
7687 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
7688 __PYX_ERR(0, 94, __pyx_L1_error)
7690 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7691 if (likely(PyTuple_CheckExact(sequence))) {
7692 __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
7693 __Pyx_INCREF(__pyx_t_5);
7694 __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
7695 __Pyx_INCREF(__pyx_t_6);
7697 __pyx_t_5 = __Pyx_PyList_GET_ITEM_REF(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
7698 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error)
7699 __Pyx_XGOTREF(__pyx_t_5);
7700 __pyx_t_6 = __Pyx_PyList_GET_ITEM_REF(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
7701 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
7702 __Pyx_XGOTREF(__pyx_t_6);
7705 __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error)
7706 __Pyx_GOTREF(__pyx_t_5);
7707 __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
7708 __Pyx_GOTREF(__pyx_t_6);
7710 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7712 Py_ssize_t index = -1;
7713 __pyx_t_7 = PyObject_GetIter(__pyx_t_1);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error)
7714 __Pyx_GOTREF(__pyx_t_7);
7715 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7716 __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
7717 index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7);
if (unlikely(!__pyx_t_5))
goto __pyx_L5_unpacking_failed;
7718 __Pyx_GOTREF(__pyx_t_5);
7719 index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7);
if (unlikely(!__pyx_t_6))
goto __pyx_L5_unpacking_failed;
7720 __Pyx_GOTREF(__pyx_t_6);
7721 if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < (0)) __PYX_ERR(0, 94, __pyx_L1_error)
7723 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7724 goto __pyx_L6_unpacking_done;
7725 __pyx_L5_unpacking_failed:;
7726 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7728 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
7729 __PYX_ERR(0, 94, __pyx_L1_error)
7730 __pyx_L6_unpacking_done:;
7732 __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_5);
7734 __Pyx_XDECREF_SET(__pyx_v_values, __pyx_t_6);
7744 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
7745 __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1);
7749 __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
7750 __Pyx_GOTREF(__pyx_t_1);
7751 __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 95, __pyx_L1_error)
7754 if (likely(!__pyx_t_10)) {
7755 if (likely(PyList_CheckExact(__pyx_t_1))) {
7757 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
7758 #if !CYTHON_ASSUME_SAFE_SIZE
7759 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 95, __pyx_L1_error)
7761 if (__pyx_t_9 >= __pyx_temp)
break;
7763 __pyx_t_6 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_1, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
7767 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
7768 #if !CYTHON_ASSUME_SAFE_SIZE
7769 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 95, __pyx_L1_error)
7771 if (__pyx_t_9 >= __pyx_temp)
break;
7773 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7774 __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9));
7776 __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9);
7780 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
7782 __pyx_t_6 = __pyx_t_10(__pyx_t_1);
7783 if (unlikely(!__pyx_t_6)) {
7784 PyObject* exc_type = PyErr_Occurred();
7786 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 95, __pyx_L1_error)
7792 __Pyx_GOTREF(__pyx_t_6);
7793 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
7803 #ifndef CYTHON_WITHOUT_ASSERTIONS
7804 if (unlikely(__pyx_assertions_enabled())) {
7805 __pyx_t_11 = (__Pyx_PyFloat_BoolEqObjC(__pyx_v_v, __pyx_mstate_global->__pyx_float_0_0, 0.0, 0, 0));
if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 96, __pyx_L1_error)
7806 if (unlikely(!__pyx_t_11)) {
7807 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_only_implemented_for_0_isosurfac, 0, 0);
7808 __PYX_ERR(0, 96, __pyx_L1_error)
7813 if ((1));
else __PYX_ERR(0, 96, __pyx_L1_error)
7824 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7834 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7843 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_activeTime, __pyx_v_activeTime) < (0)) __PYX_ERR(0, 98, __pyx_L1_error)
7852 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sampleRate, __pyx_v_sampleRate) < (0)) __PYX_ERR(0, 99, __pyx_L1_error)
7861 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_format, __pyx_v_format) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
7871 __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Comm);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
7872 __Pyx_GOTREF(__pyx_t_6);
7873 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_get);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L1_error)
7874 __Pyx_GOTREF(__pyx_t_5);
7875 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7877 #if CYTHON_UNPACK_METHODS
7878 if (unlikely(PyMethod_Check(__pyx_t_5))) {
7879 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
7881 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
7882 __Pyx_INCREF(__pyx_t_1);
7883 __Pyx_INCREF(__pyx__function);
7884 __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
7889 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
7890 __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
7891 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
7892 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7893 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
7894 __Pyx_GOTREF(__pyx_t_2);
7896 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm, __pyx_t_2) < (0)) __PYX_ERR(0, 101, __pyx_L1_error)
7897 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7906 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_writeBoundary, __pyx_v_writeBoundary) < (0)) __PYX_ERR(0, 102, __pyx_L1_error)
7915 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_fileprefix, __pyx_mstate_global->__pyx_n_u_isosurface) < (0)) __PYX_ERR(0, 103, __pyx_L1_error)
7926 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7929 __Pyx_XDECREF(__pyx_t_1);
7930 __Pyx_XDECREF(__pyx_t_2);
7931 __Pyx_XDECREF(__pyx_t_5);
7932 __Pyx_XDECREF(__pyx_t_6);
7933 __Pyx_XDECREF(__pyx_t_7);
7934 __Pyx_AddTraceback(
"Isosurface.Isosurface.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7937 __Pyx_XDECREF(__pyx_v_f);
7938 __Pyx_XDECREF(__pyx_v_values);
7939 __Pyx_XDECREF(__pyx_v_v);
7940 __Pyx_XGIVEREF(__pyx_r);
7941 __Pyx_RefNannyFinishContext();
7954static PyObject *__pyx_pw_10Isosurface_10Isosurface_3attachModel(PyObject *__pyx_self,
7955#
if CYTHON_VECTORCALL
7956PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7958PyObject *__pyx_args, PyObject *__pyx_kwds
7961PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface_2attachModel,
"Isosurface.attachModel(self, model, ar)\n\nAttach this isosurface to the given simulation model.\n ");
7962static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_3attachModel = {
"attachModel", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_3attachModel, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface_2attachModel};
7963static PyObject *__pyx_pw_10Isosurface_10Isosurface_3attachModel(PyObject *__pyx_self,
7964#
if CYTHON_VECTORCALL
7965PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7967PyObject *__pyx_args, PyObject *__pyx_kwds
7970 PyObject *__pyx_v_self = 0;
7971 PyObject *__pyx_v_model = 0;
7972 CYTHON_UNUSED PyObject *__pyx_v_ar = 0;
7973 #if !CYTHON_VECTORCALL
7974 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7976 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
7977 PyObject* values[3] = {0,0,0};
7978 int __pyx_lineno = 0;
7979 const char *__pyx_filename = NULL;
7980 int __pyx_clineno = 0;
7981 PyObject *__pyx_r = 0;
7982 __Pyx_RefNannyDeclarations
7983 __Pyx_RefNannySetupContext(
"attachModel (wrapper)", 0);
7984 #if !CYTHON_VECTORCALL
7985 #if CYTHON_ASSUME_SAFE_SIZE
7986 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7988 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
7991 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7993 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_model,&__pyx_mstate_global->__pyx_n_u_ar,0};
7994 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7995 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 105, __pyx_L3_error)
7996 if (__pyx_kwds_len > 0) {
7997 switch (__pyx_nargs) {
7999 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
8000 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 105, __pyx_L3_error)
8003 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
8004 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 105, __pyx_L3_error)
8007 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
8008 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 105, __pyx_L3_error)
8011 default:
goto __pyx_L5_argtuple_error;
8013 const Py_ssize_t kwd_pos_args = __pyx_nargs;
8014 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"attachModel", 0) < (0)) __PYX_ERR(0, 105, __pyx_L3_error)
8015 for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
8016 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"attachModel", 1, 3, 3, i); __PYX_ERR(0, 105, __pyx_L3_error) }
8018 }
else if (unlikely(__pyx_nargs != 3)) {
8019 goto __pyx_L5_argtuple_error;
8021 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
8022 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 105, __pyx_L3_error)
8023 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
8024 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 105, __pyx_L3_error)
8025 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
8026 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 105, __pyx_L3_error)
8028 __pyx_v_self = values[0];
8029 __pyx_v_model = values[1];
8030 __pyx_v_ar = values[2];
8033 __pyx_L5_argtuple_error:;
8034 __Pyx_RaiseArgtupleInvalid(
"attachModel", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 105, __pyx_L3_error)
8036 goto __pyx_L4_argument_unpacking_done;
8038 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
8039 Py_XDECREF(values[__pyx_temp]);
8041 __Pyx_AddTraceback(
"Isosurface.Isosurface.attachModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
8042 __Pyx_RefNannyFinishContext();
8044 __pyx_L4_argument_unpacking_done:;
8045 __pyx_r = __pyx_pf_10Isosurface_10Isosurface_2attachModel(__pyx_self, __pyx_v_self, __pyx_v_model, __pyx_v_ar);
8048 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
8049 Py_XDECREF(values[__pyx_temp]);
8051 __Pyx_RefNannyFinishContext();
8054static PyObject *__pyx_gb_10Isosurface_10Isosurface_11attachModel_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value);
8064static PyObject *__pyx_pf_10Isosurface_10Isosurface_11attachModel_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
8065 struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *__pyx_cur_scope;
8066 PyObject *__pyx_r = NULL;
8067 __Pyx_RefNannyDeclarations
8068 int __pyx_lineno = 0;
8069 const char *__pyx_filename = NULL;
8070 int __pyx_clineno = 0;
8071 __Pyx_RefNannySetupContext(
"genexpr", 0);
8072 __pyx_cur_scope = (
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *)__pyx_tp_new_10Isosurface___pyx_scope_struct__genexpr(__pyx_mstate_global->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
8073 if (unlikely(!__pyx_cur_scope)) {
8074 __pyx_cur_scope = ((
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *)Py_None);
8075 __Pyx_INCREF(Py_None);
8076 __PYX_ERR(0, 122, __pyx_L1_error)
8078 __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
8080 __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
8081 __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
8082 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
8084 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10Isosurface_10Isosurface_11attachModel_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Isosurface_attachModel_locals_ge, __pyx_mstate_global->__pyx_n_u_Isosurface);
if (unlikely(!gen)) __PYX_ERR(0, 122, __pyx_L1_error)
8085 __Pyx_DECREF(__pyx_cur_scope);
8086 __Pyx_RefNannyFinishContext();
8087 return (PyObject *) gen;
8092 __Pyx_AddTraceback(
"Isosurface.Isosurface.attachModel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
8094 __Pyx_DECREF((PyObject *)__pyx_cur_scope);
8095 __Pyx_XGIVEREF(__pyx_r);
8096 __Pyx_RefNannyFinishContext();
8100static PyObject *__pyx_gb_10Isosurface_10Isosurface_11attachModel_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value)
8102 struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *__pyx_cur_scope = ((
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *)__pyx_generator->closure);
8103 PyObject *__pyx_r = NULL;
8104 PyObject *__pyx_t_1 = NULL;
8105 PyObject *__pyx_t_2 = NULL;
8106 Py_ssize_t __pyx_t_3;
8107 PyObject *(*__pyx_t_4)(PyObject *);
8108 PyObject *__pyx_t_5 = NULL;
8109 int __pyx_lineno = 0;
8110 const char *__pyx_filename = NULL;
8111 int __pyx_clineno = 0;
8112 __Pyx_RefNannyDeclarations
8113 __Pyx_RefNannySetupContext(
"genexpr", 0);
8114 switch (__pyx_generator->resume_label) {
8115 case 0:
goto __pyx_L3_first_run;
8117 __Pyx_RefNannyFinishContext();
8120 __pyx_L3_first_run:;
8121 if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 122, __pyx_L1_error)
8122 __pyx_r = PyDict_New();
if (unlikely(!__pyx_r)) __PYX_ERR(0, 122, __pyx_L1_error)
8123 __Pyx_GOTREF(__pyx_r);
8124 __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
8125 __pyx_t_1 = __pyx_mstate_global->__pyx_int_0;
8126 if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(
".0"); __PYX_ERR(0, 122, __pyx_L1_error) }
8127 if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) {
8128 __pyx_t_2 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_2);
8132 __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
8133 __Pyx_GOTREF(__pyx_t_2);
8134 __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
8137 if (likely(!__pyx_t_4)) {
8138 if (likely(PyList_CheckExact(__pyx_t_2))) {
8140 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
8141 #if !CYTHON_ASSUME_SAFE_SIZE
8142 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 122, __pyx_L1_error)
8144 if (__pyx_t_3 >= __pyx_temp)
break;
8146 __pyx_t_5 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
8150 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
8151 #if !CYTHON_ASSUME_SAFE_SIZE
8152 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 122, __pyx_L1_error)
8154 if (__pyx_t_3 >= __pyx_temp)
break;
8156 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8157 __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
8159 __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
8163 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
8165 __pyx_t_5 = __pyx_t_4(__pyx_t_2);
8166 if (unlikely(!__pyx_t_5)) {
8167 PyObject* exc_type = PyErr_Occurred();
8169 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 122, __pyx_L1_error)
8175 __Pyx_GOTREF(__pyx_t_5);
8176 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_gn);
8177 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_gn, __pyx_t_5);
8178 __Pyx_GIVEREF(__pyx_t_5);
8180 __Pyx_INCREF(__pyx_t_1);
8181 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_bn);
8182 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_bn, __pyx_t_1);
8183 __Pyx_GIVEREF(__pyx_t_1);
8184 __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
8185 __Pyx_GOTREF(__pyx_t_5);
8186 __Pyx_DECREF(__pyx_t_1);
8187 __pyx_t_1 = __pyx_t_5;
8189 if (unlikely(PyDict_SetItem(__pyx_r, __pyx_cur_scope->__pyx_v_gn, __pyx_cur_scope->__pyx_v_bn))) __PYX_ERR(0, 122, __pyx_L1_error)
8191 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8192 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8193 CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
8198 __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
8199 __Pyx_XDECREF(__pyx_t_1);
8200 __Pyx_XDECREF(__pyx_t_2);
8201 __Pyx_XDECREF(__pyx_t_5);
8202 if (__Pyx_PyErr_Occurred()) {
8203 __Pyx_Generator_Replace_StopIteration(0);
8204 __Pyx_AddTraceback(
"genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
8207 __Pyx_XGIVEREF(__pyx_r);
8208 #if !CYTHON_USE_EXC_INFO_STACK
8209 __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
8211 __pyx_generator->resume_label = -1;
8212 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
8213 __Pyx_RefNannyFinishContext();
8225static PyObject *__pyx_pf_10Isosurface_10Isosurface_2attachModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_model, CYTHON_UNUSED PyObject *__pyx_v_ar) {
8226 PyObject *__pyx_v_fine_grid = NULL;
8227 PyObject *__pyx_gb_10Isosurface_10Isosurface_11attachModel_2generator = 0;
8228 PyObject *__pyx_r = NULL;
8229 __Pyx_RefNannyDeclarations
8230 PyObject *__pyx_t_1 = NULL;
8231 PyObject *__pyx_t_2 = NULL;
8232 PyObject *__pyx_t_3 = NULL;
8233 PyObject *__pyx_t_4 = NULL;
8234 PyObject *__pyx_t_5 = NULL;
8236 int __pyx_lineno = 0;
8237 const char *__pyx_filename = NULL;
8238 int __pyx_clineno = 0;
8239 __Pyx_RefNannySetupContext(
"attachModel", 0);
8248 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_model, __pyx_v_model) < (0)) __PYX_ERR(0, 108, __pyx_L1_error)
8257 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_mstate_global->__pyx_n_u_levelModelList);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
8258 __Pyx_GOTREF(__pyx_t_1);
8259 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
8260 __Pyx_GOTREF(__pyx_t_2);
8261 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8262 __pyx_v_fine_grid = __pyx_t_2;
8272 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_coefficients);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
8273 __Pyx_GOTREF(__pyx_t_2);
8274 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_variableNames);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
8275 __Pyx_GOTREF(__pyx_t_1);
8276 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8277 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_fieldNames, __pyx_t_1) < (0)) __PYX_ERR(0, 110, __pyx_L1_error)
8278 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8287 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_mesh);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
8288 __Pyx_GOTREF(__pyx_t_1);
8289 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_elementNodesArray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
8290 __Pyx_GOTREF(__pyx_t_2);
8291 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8292 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementNodesArray, __pyx_t_2) < (0)) __PYX_ERR(0, 111, __pyx_L1_error)
8293 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8302 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_mesh);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
8303 __Pyx_GOTREF(__pyx_t_2);
8304 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_exteriorElementBoundariesArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
8305 __Pyx_GOTREF(__pyx_t_1);
8306 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8315 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exteriorElementBoundariesArray, __pyx_t_1) < (0)) __PYX_ERR(0, 112, __pyx_L1_error)
8316 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8325 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_mesh);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
8326 __Pyx_GOTREF(__pyx_t_1);
8327 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_elementBoundaryNodesArray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
8328 __Pyx_GOTREF(__pyx_t_2);
8329 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8338 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementBoundaryNodesArray, __pyx_t_2) < (0)) __PYX_ERR(0, 114, __pyx_L1_error)
8339 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8348 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_mesh);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
8349 __Pyx_GOTREF(__pyx_t_2);
8350 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_elementBoundaryMaterialTypes);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
8351 __Pyx_GOTREF(__pyx_t_1);
8352 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8361 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementBoundaryMaterialTypes, __pyx_t_1) < (0)) __PYX_ERR(0, 116, __pyx_L1_error)
8362 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8371 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementBoundaryNodesArray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
8372 __Pyx_GOTREF(__pyx_t_3);
8381 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exteriorElementBoundariesArray);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
8382 __Pyx_GOTREF(__pyx_t_4);
8391 __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_4);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error)
8392 __Pyx_GOTREF(__pyx_t_5);
8393 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8394 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8395 __pyx_t_2 = __pyx_t_5;
8396 __Pyx_INCREF(__pyx_t_2);
8399 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
8400 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flatten, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
8401 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8402 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8403 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
8404 __Pyx_GOTREF(__pyx_t_1);
8414 __pyx_t_5 = PySet_New(__pyx_t_1);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
8415 __Pyx_GOTREF(__pyx_t_5);
8416 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8417 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_boundaryNodes, __pyx_t_5) < (0)) __PYX_ERR(0, 118, __pyx_L1_error)
8418 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8427 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_boundaryNodes);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
8428 __Pyx_GOTREF(__pyx_t_5);
8429 __pyx_t_1 = __pyx_pf_10Isosurface_10Isosurface_11attachModel_genexpr(NULL, __pyx_t_5);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
8430 __Pyx_GOTREF(__pyx_t_1);
8431 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8432 __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_1);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
8433 __Pyx_GOTREF(__pyx_t_5);
8434 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8435 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_g2b, __pyx_t_5) < (0)) __PYX_ERR(0, 122, __pyx_L1_error)
8436 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8445 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_mesh);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
8446 __Pyx_GOTREF(__pyx_t_5);
8447 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
8448 __Pyx_GOTREF(__pyx_t_1);
8449 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8450 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray, __pyx_t_1) < (0)) __PYX_ERR(0, 123, __pyx_L1_error)
8451 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8460 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_mesh);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
8461 __Pyx_GOTREF(__pyx_t_1);
8462 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_nElements_global);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error)
8463 __Pyx_GOTREF(__pyx_t_5);
8464 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8465 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_owned_elements, __pyx_t_5) < (0)) __PYX_ERR(0, 124, __pyx_L1_error)
8466 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8475 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_u);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error)
8476 __Pyx_GOTREF(__pyx_t_5);
8477 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_u, __pyx_t_5) < (0)) __PYX_ERR(0, 125, __pyx_L1_error)
8478 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8487 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fine_grid, __pyx_mstate_global->__pyx_n_u_timeIntegration);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
8488 __Pyx_GOTREF(__pyx_t_5);
8489 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeIntegration, __pyx_t_5) < (0)) __PYX_ERR(0, 126, __pyx_L1_error)
8490 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8499 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 127, __pyx_L1_error)
8508 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_next_output, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 128, __pyx_L1_error)
8517 __pyx_t_1 = __pyx_v_self;
8518 __Pyx_INCREF(__pyx_t_1);
8521 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
8522 __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_writeSceneHeader, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
8523 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8524 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error)
8525 __Pyx_GOTREF(__pyx_t_5);
8527 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8537 PyObject *__pyx_temp;
8539 __pyx_temp = __pyx_r;
8540 __Pyx_INCREF(__pyx_v_self);
8541 __pyx_r = __pyx_v_self;
8543 __Pyx_XDECREF(__pyx_temp);
8557 __Pyx_XDECREF(__pyx_t_1);
8558 __Pyx_XDECREF(__pyx_t_2);
8559 __Pyx_XDECREF(__pyx_t_3);
8560 __Pyx_XDECREF(__pyx_t_4);
8561 __Pyx_XDECREF(__pyx_t_5);
8562 __Pyx_AddTraceback(
"Isosurface.Isosurface.attachModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
8565 __Pyx_XDECREF(__pyx_v_fine_grid);
8566 __Pyx_XDECREF(__pyx_gb_10Isosurface_10Isosurface_11attachModel_2generator);
8567 __Pyx_XGIVEREF(__pyx_r);
8568 __Pyx_RefNannyFinishContext();
8581static PyObject *__pyx_pw_10Isosurface_10Isosurface_5attachHDF5(PyObject *__pyx_self,
8582#
if CYTHON_VECTORCALL
8583PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8585PyObject *__pyx_args, PyObject *__pyx_kwds
8588PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface_4attachHDF5,
"Isosurface.attachHDF5(self, h5, step, cam=None)\n\nAttach this isosurface to and HDF5 archive (an h5py.File)");
8589static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_5attachHDF5 = {
"attachHDF5", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_5attachHDF5, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface_4attachHDF5};
8590static PyObject *__pyx_pw_10Isosurface_10Isosurface_5attachHDF5(PyObject *__pyx_self,
8591#
if CYTHON_VECTORCALL
8592PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
8594PyObject *__pyx_args, PyObject *__pyx_kwds
8597 PyObject *__pyx_v_self = 0;
8598 PyObject *__pyx_v_h5 = 0;
8599 PyObject *__pyx_v_step = 0;
8600 PyObject *__pyx_v_cam = 0;
8601 #if !CYTHON_VECTORCALL
8602 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
8604 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
8605 PyObject* values[4] = {0,0,0,0};
8606 int __pyx_lineno = 0;
8607 const char *__pyx_filename = NULL;
8608 int __pyx_clineno = 0;
8609 PyObject *__pyx_r = 0;
8610 __Pyx_RefNannyDeclarations
8611 __Pyx_RefNannySetupContext(
"attachHDF5 (wrapper)", 0);
8612 #if !CYTHON_VECTORCALL
8613 #if CYTHON_ASSUME_SAFE_SIZE
8614 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
8616 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
8619 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
8621 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_h5,&__pyx_mstate_global->__pyx_n_u_step,&__pyx_mstate_global->__pyx_n_u_cam,0};
8622 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
8623 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 132, __pyx_L3_error)
8624 if (__pyx_kwds_len > 0) {
8625 switch (__pyx_nargs) {
8627 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
8628 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 132, __pyx_L3_error)
8631 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
8632 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 132, __pyx_L3_error)
8635 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
8636 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 132, __pyx_L3_error)
8639 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
8640 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 132, __pyx_L3_error)
8643 default:
goto __pyx_L5_argtuple_error;
8645 const Py_ssize_t kwd_pos_args = __pyx_nargs;
8646 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"attachHDF5", 0) < (0)) __PYX_ERR(0, 132, __pyx_L3_error)
8647 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
8648 for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
8649 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"attachHDF5", 0, 3, 4, i); __PYX_ERR(0, 132, __pyx_L3_error) }
8652 switch (__pyx_nargs) {
8654 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
8655 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 132, __pyx_L3_error)
8658 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
8659 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 132, __pyx_L3_error)
8660 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
8661 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 132, __pyx_L3_error)
8662 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
8663 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 132, __pyx_L3_error)
8665 default:
goto __pyx_L5_argtuple_error;
8667 if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
8669 __pyx_v_self = values[0];
8670 __pyx_v_h5 = values[1];
8671 __pyx_v_step = values[2];
8672 __pyx_v_cam = values[3];
8675 __pyx_L5_argtuple_error:;
8676 __Pyx_RaiseArgtupleInvalid(
"attachHDF5", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 132, __pyx_L3_error)
8678 goto __pyx_L4_argument_unpacking_done;
8680 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
8681 Py_XDECREF(values[__pyx_temp]);
8683 __Pyx_AddTraceback(
"Isosurface.Isosurface.attachHDF5", __pyx_clineno, __pyx_lineno, __pyx_filename);
8684 __Pyx_RefNannyFinishContext();
8686 __pyx_L4_argument_unpacking_done:;
8687 __pyx_r = __pyx_pf_10Isosurface_10Isosurface_4attachHDF5(__pyx_self, __pyx_v_self, __pyx_v_h5, __pyx_v_step, __pyx_v_cam);
8690 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
8691 Py_XDECREF(values[__pyx_temp]);
8693 __Pyx_RefNannyFinishContext();
8697static PyObject *__pyx_pf_10Isosurface_10Isosurface_4attachHDF5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_h5, PyObject *__pyx_v_step, PyObject *__pyx_v_cam) {
8698 PyObject *__pyx_v_namedtuple = NULL;
8699 PyObject *__pyx_v_FemField = NULL;
8700 PyObject *__pyx_v_field_i = NULL;
8701 CYTHON_UNUSED PyObject *__pyx_v_field = NULL;
8702 PyObject *__pyx_8genexpr1__pyx_v_isosurface = NULL;
8703 PyObject *__pyx_r = NULL;
8704 __Pyx_RefNannyDeclarations
8705 PyObject *__pyx_t_1 = NULL;
8706 PyObject *__pyx_t_2 = NULL;
8707 Py_ssize_t __pyx_t_3;
8708 PyObject *__pyx_t_4 = NULL;
8709 PyObject *__pyx_t_5 = NULL;
8710 PyObject *(*__pyx_t_6)(PyObject *);
8712 PyObject *__pyx_t_8 = NULL;
8713 PyObject *__pyx_t_9 = NULL;
8714 PyObject *__pyx_t_10 = NULL;
8715 PyObject *__pyx_t_11 = NULL;
8716 PyObject *__pyx_t_12 = NULL;
8718 int __pyx_lineno = 0;
8719 const char *__pyx_filename = NULL;
8720 int __pyx_clineno = 0;
8721 __Pyx_RefNannySetupContext(
"attachHDF5", 0);
8731 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple};
8732 __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
8734 __pyx_t_1 = __pyx_t_2;
8735 __Pyx_GOTREF(__pyx_t_1);
8737 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_namedtuple};
8739 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
8740 __Pyx_GOTREF(__pyx_t_4);
8741 switch (__pyx_t_3) {
8743 __Pyx_INCREF(__pyx_t_4);
8744 __pyx_v_namedtuple = __pyx_t_4;
8748 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8751 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8761 __pyx_t_1 = PyList_New(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L5_error)
8762 __Pyx_GOTREF(__pyx_t_1);
8763 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_isosurfaces);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L5_error)
8764 __Pyx_GOTREF(__pyx_t_4);
8765 if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
8766 __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
8770 __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L5_error)
8771 __Pyx_GOTREF(__pyx_t_5);
8772 __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L5_error)
8774 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8776 if (likely(!__pyx_t_6)) {
8777 if (likely(PyList_CheckExact(__pyx_t_5))) {
8779 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
8780 #if !CYTHON_ASSUME_SAFE_SIZE
8781 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 137, __pyx_L5_error)
8783 if (__pyx_t_3 >= __pyx_temp)
break;
8785 __pyx_t_4 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_5, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
8789 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
8790 #if !CYTHON_ASSUME_SAFE_SIZE
8791 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 137, __pyx_L5_error)
8793 if (__pyx_t_3 >= __pyx_temp)
break;
8795 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8796 __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3));
8798 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_3);
8802 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L5_error)
8804 __pyx_t_4 = __pyx_t_6(__pyx_t_5);
8805 if (unlikely(!__pyx_t_4)) {
8806 PyObject* exc_type = PyErr_Occurred();
8808 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 137, __pyx_L5_error)
8814 __Pyx_GOTREF(__pyx_t_4);
8815 __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_isosurface, __pyx_t_4);
8817 __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr1__pyx_v_isosurface, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L5_error)
8818 __Pyx_GOTREF(__pyx_t_4);
8819 __Pyx_GIVEREF(__pyx_t_4);
8820 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_1, __pyx_t_4))) __PYX_ERR(0, 137, __pyx_L5_error)
8823 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8824 __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_isosurface); __pyx_8genexpr1__pyx_v_isosurface = 0;
8825 goto __pyx_L9_exit_scope;
8827 __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_isosurface); __pyx_8genexpr1__pyx_v_isosurface = 0;
8828 goto __pyx_L1_error;
8829 __pyx_L9_exit_scope:;
8831 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_fieldNames, __pyx_t_1) < (0)) __PYX_ERR(0, 137, __pyx_L1_error)
8832 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8842 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_fieldNames);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
8843 __Pyx_GOTREF(__pyx_t_4);
8846 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_ATTACHING_TO_HDF5, __pyx_t_4};
8847 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
8848 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
8849 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8850 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
8851 __Pyx_GOTREF(__pyx_t_1);
8853 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8862 __pyx_t_1 = PyObject_Repr(__pyx_v_step);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
8863 __Pyx_GOTREF(__pyx_t_1);
8864 __pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_elementsSpatial_Domain, __pyx_t_1);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
8865 __Pyx_GOTREF(__pyx_t_4);
8866 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8867 __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_h5, __pyx_t_4);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
8868 __Pyx_GOTREF(__pyx_t_1);
8869 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8870 __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
8871 __Pyx_GOTREF(__pyx_t_4);
8872 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8873 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementNodesArray, __pyx_t_4) < (0)) __PYX_ERR(0, 139, __pyx_L1_error)
8874 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8883 __pyx_t_4 = PyObject_Repr(__pyx_v_step);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
8884 __Pyx_GOTREF(__pyx_t_4);
8885 __pyx_t_1 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_nodesSpatial_Domain, __pyx_t_4);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
8886 __Pyx_GOTREF(__pyx_t_1);
8887 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8888 __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_h5, __pyx_t_1);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
8889 __Pyx_GOTREF(__pyx_t_4);
8890 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8891 __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
8892 __Pyx_GOTREF(__pyx_t_1);
8893 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8894 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray, __pyx_t_1) < (0)) __PYX_ERR(0, 140, __pyx_L1_error)
8895 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8904 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementNodesArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
8905 __Pyx_GOTREF(__pyx_t_1);
8906 __pyx_t_3 = PyObject_Length(__pyx_t_1);
if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 141, __pyx_L1_error)
8907 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8908 __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
8909 __Pyx_GOTREF(__pyx_t_1);
8911 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_owned_elements, __pyx_t_1) < (0)) __PYX_ERR(0, 141, __pyx_L1_error)
8912 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8921 __pyx_t_1 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
8922 __Pyx_GOTREF(__pyx_t_1);
8923 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_u, __pyx_t_1) < (0)) __PYX_ERR(0, 142, __pyx_L1_error)
8924 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8934 __Pyx_INCREF(__pyx_v_namedtuple);
8935 __pyx_t_5 = __pyx_v_namedtuple;
8936 __pyx_t_8 = PyList_New(1);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 143, __pyx_L1_error)
8937 __Pyx_GOTREF(__pyx_t_8);
8938 __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_dof);
8939 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_dof);
8940 if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_mstate_global->__pyx_n_u_dof) != (0)) __PYX_ERR(0, 143, __pyx_L1_error);
8942 #if CYTHON_UNPACK_METHODS
8943 if (unlikely(PyMethod_Check(__pyx_t_5))) {
8944 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
8946 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
8947 __Pyx_INCREF(__pyx_t_4);
8948 __Pyx_INCREF(__pyx__function);
8949 __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
8954 PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FemField, __pyx_t_8};
8955 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
8956 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
8957 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8958 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8959 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
8960 __Pyx_GOTREF(__pyx_t_1);
8962 __pyx_v_FemField = __pyx_t_1;
8972 __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
8973 __pyx_t_1 = __pyx_mstate_global->__pyx_int_0;
8974 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_fieldNames);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
8975 __Pyx_GOTREF(__pyx_t_5);
8976 if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
8977 __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8);
8981 __pyx_t_3 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 144, __pyx_L1_error)
8982 __Pyx_GOTREF(__pyx_t_8);
8983 __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
8985 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8987 if (likely(!__pyx_t_6)) {
8988 if (likely(PyList_CheckExact(__pyx_t_8))) {
8990 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
8991 #if !CYTHON_ASSUME_SAFE_SIZE
8992 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 144, __pyx_L1_error)
8994 if (__pyx_t_3 >= __pyx_temp)
break;
8996 __pyx_t_5 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_8, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
9000 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
9001 #if !CYTHON_ASSUME_SAFE_SIZE
9002 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 144, __pyx_L1_error)
9004 if (__pyx_t_3 >= __pyx_temp)
break;
9006 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9007 __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_3));
9009 __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_3);
9013 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
9015 __pyx_t_5 = __pyx_t_6(__pyx_t_8);
9016 if (unlikely(!__pyx_t_5)) {
9017 PyObject* exc_type = PyErr_Occurred();
9019 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 144, __pyx_L1_error)
9025 __Pyx_GOTREF(__pyx_t_5);
9026 __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_5);
9028 __Pyx_INCREF(__pyx_t_1);
9029 __Pyx_XDECREF_SET(__pyx_v_field_i, __pyx_t_1);
9030 __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
9031 __Pyx_GOTREF(__pyx_t_5);
9032 __Pyx_DECREF(__pyx_t_1);
9033 __pyx_t_1 = __pyx_t_5;
9044 __Pyx_INCREF(__pyx_v_FemField);
9045 __pyx_t_9 = __pyx_v_FemField;
9054 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_isosurfaces);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error)
9055 __Pyx_GOTREF(__pyx_t_10);
9056 __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_10, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 146, __pyx_L1_error)
9057 __Pyx_GOTREF(__pyx_t_11);
9058 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9059 __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_11, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error)
9060 __Pyx_GOTREF(__pyx_t_10);
9061 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9070 __pyx_t_11 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_u__3, __pyx_t_10);
if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 145, __pyx_L1_error)
9071 __Pyx_GOTREF(__pyx_t_11);
9072 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9081 __pyx_t_10 = PyObject_Repr(__pyx_v_step);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __pyx_L1_error)
9082 __Pyx_GOTREF(__pyx_t_10);
9091 __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_10);
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
9092 __Pyx_GOTREF(__pyx_t_12);
9093 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9094 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9103 __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_h5, __pyx_t_12);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error)
9104 __Pyx_GOTREF(__pyx_t_10);
9105 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9114 __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_t_10, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1);
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 147, __pyx_L1_error)
9115 __Pyx_GOTREF(__pyx_t_12);
9116 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9118 #if CYTHON_UNPACK_METHODS
9119 if (unlikely(PyMethod_Check(__pyx_t_9))) {
9120 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
9122 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
9123 __Pyx_INCREF(__pyx_t_4);
9124 __Pyx_INCREF(__pyx__function);
9125 __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
9130 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
9131 #if CYTHON_VECTORCALL
9132 __pyx_t_10 = __pyx_mstate_global->__pyx_tuple[2];
9133 if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error)
9134 __Pyx_INCREF(__pyx_t_10);
9137 PyObject *__pyx_temp[1] = {__pyx_mstate_global->__pyx_n_u_dof};
9138 __pyx_t_10 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+1, 1);
9139 if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 145, __pyx_L1_error)
9140 __Pyx_GOTREF(__pyx_t_10);
9143 __pyx_t_5 = __Pyx_Object_VectorcallKwds((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
9144 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9145 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9146 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9147 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9148 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
9149 __Pyx_GOTREF(__pyx_t_5);
9159 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_u);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
9160 __Pyx_GOTREF(__pyx_t_9);
9161 if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_field_i, __pyx_t_5) < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
9162 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9163 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9173 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9174 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9183 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames, __pyx_v_step) < (0)) __PYX_ERR(0, 148, __pyx_L1_error)
9192 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_next_output, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 149, __pyx_L1_error)
9201 __pyx_t_13 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_step, __pyx_mstate_global->__pyx_int_0, 0, 0));
if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 150, __pyx_L1_error)
9212 __pyx_t_8 = __pyx_v_self;
9213 __Pyx_INCREF(__pyx_t_8);
9216 PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_cam};
9217 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_writeSceneHeader, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
9218 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9219 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
9220 __Pyx_GOTREF(__pyx_t_1);
9222 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9241 PyObject *__pyx_temp;
9243 __pyx_temp = __pyx_r;
9244 __Pyx_INCREF(__pyx_v_self);
9245 __pyx_r = __pyx_v_self;
9247 __Pyx_XDECREF(__pyx_temp);
9261 __Pyx_XDECREF(__pyx_t_1);
9262 __Pyx_XDECREF(__pyx_t_4);
9263 __Pyx_XDECREF(__pyx_t_5);
9264 __Pyx_XDECREF(__pyx_t_8);
9265 __Pyx_XDECREF(__pyx_t_9);
9266 __Pyx_XDECREF(__pyx_t_10);
9267 __Pyx_XDECREF(__pyx_t_11);
9268 __Pyx_XDECREF(__pyx_t_12);
9269 __Pyx_AddTraceback(
"Isosurface.Isosurface.attachHDF5", __pyx_clineno, __pyx_lineno, __pyx_filename);
9272 __Pyx_XDECREF(__pyx_v_namedtuple);
9273 __Pyx_XDECREF(__pyx_v_FemField);
9274 __Pyx_XDECREF(__pyx_v_field_i);
9275 __Pyx_XDECREF(__pyx_v_field);
9276 __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_isosurface);
9277 __Pyx_XGIVEREF(__pyx_r);
9278 __Pyx_RefNannyFinishContext();
9291static PyObject *__pyx_pw_10Isosurface_10Isosurface_7triangulateIsosurface(PyObject *__pyx_self,
9292#
if CYTHON_VECTORCALL
9293PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9295PyObject *__pyx_args, PyObject *__pyx_kwds
9298PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface_6triangulateIsosurface,
"Isosurface.triangulateIsosurface(self, field, value)\n\nBuild a triangular mesh of the isosurface");
9299static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_7triangulateIsosurface = {
"triangulateIsosurface", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_7triangulateIsosurface, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface_6triangulateIsosurface};
9300static PyObject *__pyx_pw_10Isosurface_10Isosurface_7triangulateIsosurface(PyObject *__pyx_self,
9301#
if CYTHON_VECTORCALL
9302PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9304PyObject *__pyx_args, PyObject *__pyx_kwds
9307 PyObject *__pyx_v_self = 0;
9308 PyObject *__pyx_v_field = 0;
9309 PyObject *__pyx_v_value = 0;
9310 #if !CYTHON_VECTORCALL
9311 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9313 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
9314 PyObject* values[3] = {0,0,0};
9315 int __pyx_lineno = 0;
9316 const char *__pyx_filename = NULL;
9317 int __pyx_clineno = 0;
9318 PyObject *__pyx_r = 0;
9319 __Pyx_RefNannyDeclarations
9320 __Pyx_RefNannySetupContext(
"triangulateIsosurface (wrapper)", 0);
9321 #if !CYTHON_VECTORCALL
9322 #if CYTHON_ASSUME_SAFE_SIZE
9323 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9325 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
9328 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9330 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_field,&__pyx_mstate_global->__pyx_n_u_value,0};
9331 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
9332 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 154, __pyx_L3_error)
9333 if (__pyx_kwds_len > 0) {
9334 switch (__pyx_nargs) {
9336 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
9337 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 154, __pyx_L3_error)
9340 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
9341 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 154, __pyx_L3_error)
9344 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
9345 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 154, __pyx_L3_error)
9348 default:
goto __pyx_L5_argtuple_error;
9350 const Py_ssize_t kwd_pos_args = __pyx_nargs;
9351 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"triangulateIsosurface", 0) < (0)) __PYX_ERR(0, 154, __pyx_L3_error)
9352 for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
9353 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"triangulateIsosurface", 1, 3, 3, i); __PYX_ERR(0, 154, __pyx_L3_error) }
9355 }
else if (unlikely(__pyx_nargs != 3)) {
9356 goto __pyx_L5_argtuple_error;
9358 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
9359 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 154, __pyx_L3_error)
9360 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
9361 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 154, __pyx_L3_error)
9362 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
9363 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 154, __pyx_L3_error)
9365 __pyx_v_self = values[0];
9366 __pyx_v_field = values[1];
9367 __pyx_v_value = values[2];
9370 __pyx_L5_argtuple_error:;
9371 __Pyx_RaiseArgtupleInvalid(
"triangulateIsosurface", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 154, __pyx_L3_error)
9373 goto __pyx_L4_argument_unpacking_done;
9375 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
9376 Py_XDECREF(values[__pyx_temp]);
9378 __Pyx_AddTraceback(
"Isosurface.Isosurface.triangulateIsosurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
9379 __Pyx_RefNannyFinishContext();
9381 __pyx_L4_argument_unpacking_done:;
9382 __pyx_r = __pyx_pf_10Isosurface_10Isosurface_6triangulateIsosurface(__pyx_self, __pyx_v_self, __pyx_v_field, __pyx_v_value);
9385 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
9386 Py_XDECREF(values[__pyx_temp]);
9388 __Pyx_RefNannyFinishContext();
9392static PyObject *__pyx_pf_10Isosurface_10Isosurface_6triangulateIsosurface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value) {
9400 int __pyx_v_nN_start;
9403 PyArrayObject *__pyx_v_x = 0;
9404 PyArrayObject *__pyx_v_normal = 0;
9405 PyObject *__pyx_v_nodes = NULL;
9406 PyObject *__pyx_v_elements = NULL;
9407 PyObject *__pyx_v_normals = NULL;
9408 PyObject *__pyx_v_normal_indices = NULL;
9409 PyObject *__pyx_v_phi = NULL;
9410 PyObject *__pyx_v_plus = NULL;
9411 PyObject *__pyx_v_minus = NULL;
9412 PyObject *__pyx_v_zeros = NULL;
9413 long __pyx_8genexpr2__pyx_v_j;
9414 long __pyx_8genexpr3__pyx_v_j;
9415 long __pyx_8genexpr4__pyx_v_j;
9416 long __pyx_8genexpr5__pyx_v_j;
9417 long __pyx_8genexpr6__pyx_v_j;
9418 long __pyx_8genexpr7__pyx_v_j;
9419 long __pyx_8genexpr8__pyx_v_j;
9420 __Pyx_LocalBuf_ND __pyx_pybuffernd_normal;
9421 __Pyx_Buffer __pyx_pybuffer_normal;
9422 __Pyx_LocalBuf_ND __pyx_pybuffernd_x;
9423 __Pyx_Buffer __pyx_pybuffer_x;
9424 PyObject *__pyx_r = NULL;
9425 __Pyx_RefNannyDeclarations
9426 PyObject *__pyx_t_1 = NULL;
9427 PyObject *__pyx_t_2 = NULL;
9428 PyObject *__pyx_t_3 = NULL;
9431 PyObject *__pyx_t_6 = NULL;
9432 Py_ssize_t __pyx_t_7;
9433 Py_ssize_t __pyx_t_8;
9438 Py_ssize_t __pyx_t_13;
9440 Py_ssize_t __pyx_t_15;
9441 PyObject *__pyx_t_16 = NULL;
9442 PyObject *__pyx_t_17 = NULL;
9444 PyObject *__pyx_t_19 = NULL;
9445 PyObject *__pyx_t_20 = NULL;
9446 PyObject *__pyx_t_21 = NULL;
9448 int __pyx_lineno = 0;
9449 const char *__pyx_filename = NULL;
9450 int __pyx_clineno = 0;
9451 __Pyx_RefNannySetupContext(
"triangulateIsosurface", 0);
9452 __pyx_pybuffer_x.pybuffer.buf = NULL;
9453 __pyx_pybuffer_x.refcount = 0;
9454 __pyx_pybuffernd_x.data = NULL;
9455 __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x;
9456 __pyx_pybuffer_normal.pybuffer.buf = NULL;
9457 __pyx_pybuffer_normal.refcount = 0;
9458 __pyx_pybuffernd_normal.data = NULL;
9459 __pyx_pybuffernd_normal.rcbuffer = &__pyx_pybuffer_normal;
9468 __pyx_t_1 = PyList_New(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
9469 __Pyx_GOTREF(__pyx_t_1);
9470 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodes);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
9471 __Pyx_GOTREF(__pyx_t_2);
9472 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
9473 __Pyx_GOTREF(__pyx_t_3);
9474 __Pyx_INCREF(__pyx_v_field);
9475 __Pyx_GIVEREF(__pyx_v_field);
9476 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 161, __pyx_L1_error);
9477 __Pyx_INCREF(__pyx_v_value);
9478 __Pyx_GIVEREF(__pyx_v_value);
9479 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 161, __pyx_L1_error);
9480 if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 161, __pyx_L1_error)
9481 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9482 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9483 __Pyx_INCREF(__pyx_t_1);
9484 __pyx_v_nodes = __pyx_t_1;
9485 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9494 __pyx_t_1 = PyList_New(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
9495 __Pyx_GOTREF(__pyx_t_1);
9496 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elements);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
9497 __Pyx_GOTREF(__pyx_t_3);
9498 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
9499 __Pyx_GOTREF(__pyx_t_2);
9500 __Pyx_INCREF(__pyx_v_field);
9501 __Pyx_GIVEREF(__pyx_v_field);
9502 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 162, __pyx_L1_error);
9503 __Pyx_INCREF(__pyx_v_value);
9504 __Pyx_GIVEREF(__pyx_v_value);
9505 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 162, __pyx_L1_error);
9506 if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_t_2, __pyx_t_1) < 0))) __PYX_ERR(0, 162, __pyx_L1_error)
9507 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9508 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9509 __Pyx_INCREF(__pyx_t_1);
9510 __pyx_v_elements = __pyx_t_1;
9511 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9520 __pyx_t_1 = PyList_New(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
9521 __Pyx_GOTREF(__pyx_t_1);
9522 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_normals);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
9523 __Pyx_GOTREF(__pyx_t_2);
9524 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
9525 __Pyx_GOTREF(__pyx_t_3);
9526 __Pyx_INCREF(__pyx_v_field);
9527 __Pyx_GIVEREF(__pyx_v_field);
9528 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 163, __pyx_L1_error);
9529 __Pyx_INCREF(__pyx_v_value);
9530 __Pyx_GIVEREF(__pyx_v_value);
9531 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 163, __pyx_L1_error);
9532 if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 163, __pyx_L1_error)
9533 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9534 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9535 __Pyx_INCREF(__pyx_t_1);
9536 __pyx_v_normals = __pyx_t_1;
9537 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9546 __pyx_t_1 = PyList_New(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
9547 __Pyx_GOTREF(__pyx_t_1);
9548 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_normal_indices);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
9549 __Pyx_GOTREF(__pyx_t_3);
9550 __pyx_t_2 = PyTuple_New(2);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
9551 __Pyx_GOTREF(__pyx_t_2);
9552 __Pyx_INCREF(__pyx_v_field);
9553 __Pyx_GIVEREF(__pyx_v_field);
9554 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 164, __pyx_L1_error);
9555 __Pyx_INCREF(__pyx_v_value);
9556 __Pyx_GIVEREF(__pyx_v_value);
9557 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 164, __pyx_L1_error);
9558 if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_t_2, __pyx_t_1) < 0))) __PYX_ERR(0, 164, __pyx_L1_error)
9559 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9560 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9561 __Pyx_INCREF(__pyx_t_1);
9562 __pyx_v_normal_indices = __pyx_t_1;
9563 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9572 __pyx_t_4 = (__Pyx_PyFloat_BoolNeObjC(__pyx_v_value, __pyx_mstate_global->__pyx_float_0_0, 0.0, 0, 0));
if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 165, __pyx_L1_error)
9573 if (unlikely(__pyx_t_4)) {
9586 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Only_zero_isocontour_extraction};
9587 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
9588 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9589 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
9590 __Pyx_GOTREF(__pyx_t_1);
9592 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
9593 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9594 __PYX_ERR(0, 166, __pyx_L1_error)
9612 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_u);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
9613 __Pyx_GOTREF(__pyx_t_1);
9614 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_fieldNames);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error)
9615 __Pyx_GOTREF(__pyx_t_6);
9616 __pyx_t_3 = __pyx_t_6;
9617 __Pyx_INCREF(__pyx_t_3);
9620 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_field};
9621 __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_index, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
9622 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9623 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9624 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
9625 __Pyx_GOTREF(__pyx_t_2);
9627 __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error)
9628 __Pyx_GOTREF(__pyx_t_6);
9629 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9630 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9631 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_dof);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
9632 __Pyx_GOTREF(__pyx_t_2);
9633 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9634 __pyx_v_phi = __pyx_t_2;
9644 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_num_owned_elements);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
9645 __Pyx_GOTREF(__pyx_t_2);
9646 __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2);
if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 168, __pyx_L1_error)
9647 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9648 __pyx_t_8 = __pyx_t_7;
9650 for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
9651 __pyx_v_eN = __pyx_t_9;
9660 __pyx_t_2 = PyList_New(0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
9661 __Pyx_GOTREF(__pyx_t_2);
9662 __Pyx_XDECREF_SET(__pyx_v_plus, ((PyObject*)__pyx_t_2));
9672 __pyx_t_2 = PyList_New(0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
9673 __Pyx_GOTREF(__pyx_t_2);
9674 __Pyx_XDECREF_SET(__pyx_v_minus, ((PyObject*)__pyx_t_2));
9684 __pyx_t_2 = PyList_New(0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
9685 __Pyx_GOTREF(__pyx_t_2);
9686 __Pyx_XDECREF_SET(__pyx_v_zeros, ((PyObject*)__pyx_t_2));
9696 __pyx_v_eps = 1.0e-8;
9705 for (__pyx_t_10 = 0; __pyx_t_10 < 4; __pyx_t_10+=1) {
9706 __pyx_v_i = __pyx_t_10;
9715 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementNodesArray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
9716 __Pyx_GOTREF(__pyx_t_2);
9717 __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_eN);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error)
9718 __Pyx_GOTREF(__pyx_t_6);
9719 __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_i);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
9720 __Pyx_GOTREF(__pyx_t_1);
9721 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
9722 __Pyx_GOTREF(__pyx_t_3);
9723 __Pyx_GIVEREF(__pyx_t_6);
9724 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 174, __pyx_L1_error);
9725 __Pyx_GIVEREF(__pyx_t_1);
9726 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 174, __pyx_L1_error);
9729 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
9730 __Pyx_GOTREF(__pyx_t_1);
9731 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9732 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9733 __pyx_t_11 = __Pyx_PyLong_As_int(__pyx_t_1);
if (unlikely((__pyx_t_11 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error)
9734 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9735 __pyx_v_I = __pyx_t_11;
9744 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
9745 __Pyx_GOTREF(__pyx_t_1);
9746 __pyx_t_3 = PyFloat_FromDouble(__pyx_v_eps);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
9747 __Pyx_GOTREF(__pyx_t_3);
9748 __pyx_t_4 = __Pyx_PyObject_CompareBoolGt_object_float(__pyx_t_1, __pyx_t_3, Py_GT);
if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 175, __pyx_L1_error)
9749 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9750 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9761 __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_I);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
9762 __Pyx_GOTREF(__pyx_t_3);
9763 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_plus, __pyx_t_3);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 176, __pyx_L1_error)
9764 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9784 __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
9785 __Pyx_GOTREF(__pyx_t_3);
9786 __pyx_t_1 = PyFloat_FromDouble((-__pyx_v_eps));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
9787 __Pyx_GOTREF(__pyx_t_1);
9788 __pyx_t_4 = __Pyx_PyObject_CompareBoolLt_object_float(__pyx_t_3, __pyx_t_1, Py_LT);
if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 177, __pyx_L1_error)
9789 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9790 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9801 __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_I);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
9802 __Pyx_GOTREF(__pyx_t_1);
9803 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_minus, __pyx_t_1);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 178, __pyx_L1_error)
9804 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9825 __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_I);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
9826 __Pyx_GOTREF(__pyx_t_1);
9827 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_zeros, __pyx_t_1);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 180, __pyx_L1_error)
9828 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9841 __pyx_t_13 = __Pyx_PyList_GET_SIZE(__pyx_v_zeros);
if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 181, __pyx_L1_error)
9842 __pyx_v_nZeros = __pyx_t_13;
9851 __pyx_t_13 = __Pyx_PyList_GET_SIZE(__pyx_v_minus);
if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 182, __pyx_L1_error)
9852 __pyx_v_nMinus = __pyx_t_13;
9861 __pyx_t_13 = __Pyx_PyList_GET_SIZE(__pyx_v_plus);
if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 183, __pyx_L1_error)
9862 __pyx_v_nPlus = __pyx_t_13;
9871 #ifndef CYTHON_WITHOUT_ASSERTIONS
9872 if (unlikely(__pyx_assertions_enabled())) {
9873 __pyx_t_4 = (((__pyx_v_nZeros + __pyx_v_nMinus) + __pyx_v_nPlus) == 4);
9875 if (unlikely(!__pyx_t_4)) {
9876 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
9877 __PYX_ERR(0, 184, __pyx_L1_error)
9882 if ((1));
else __PYX_ERR(0, 184, __pyx_L1_error)
9892 __pyx_t_13 = __Pyx_PyList_GET_SIZE(__pyx_v_nodes);
if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 185, __pyx_L1_error)
9893 __pyx_v_nN_start = __pyx_t_13;
9902 __pyx_t_14 = (__pyx_v_nMinus == 2);
9908 __pyx_t_4 = __pyx_t_14;
9910 goto __pyx_L10_bool_binop_done;
9912 __pyx_t_14 = (__pyx_v_nPlus == 2);
9915 __pyx_t_4 = __pyx_t_14;
9917 __pyx_L10_bool_binop_done:;
9928 __pyx_t_1 = __pyx_v_minus; __Pyx_INCREF(__pyx_t_1);
9932 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
9933 #if !CYTHON_ASSUME_SAFE_SIZE
9934 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 187, __pyx_L1_error)
9936 if (__pyx_t_13 >= __pyx_temp)
break;
9938 __pyx_t_3 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_1, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
9940 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
9941 __Pyx_GOTREF(__pyx_t_3);
9942 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_3);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L1_error)
9943 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9944 __pyx_v_J = __pyx_t_10;
9953 __pyx_t_3 = __pyx_v_plus; __Pyx_INCREF(__pyx_t_3);
9957 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
9958 #if !CYTHON_ASSUME_SAFE_SIZE
9959 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 188, __pyx_L1_error)
9961 if (__pyx_t_15 >= __pyx_temp)
break;
9963 __pyx_t_2 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_3, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference);
9965 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
9966 __Pyx_GOTREF(__pyx_t_2);
9967 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_2);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error)
9968 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9969 __pyx_v_I = __pyx_t_10;
9978 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
9979 __Pyx_GOTREF(__pyx_t_2);
9980 __pyx_t_6 = PyNumber_Negative(__pyx_t_2);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
9981 __Pyx_GOTREF(__pyx_t_6);
9982 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9983 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
9984 __Pyx_GOTREF(__pyx_t_2);
9985 __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 189, __pyx_L1_error)
9986 __Pyx_GOTREF(__pyx_t_16);
9987 __pyx_t_17 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_2, __pyx_t_16);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 189, __pyx_L1_error)
9988 __Pyx_GOTREF(__pyx_t_17);
9989 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9990 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9991 __pyx_t_16 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_17);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 189, __pyx_L1_error)
9992 __Pyx_GOTREF(__pyx_t_16);
9993 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9994 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
9995 __pyx_t_18 = __Pyx_PyFloat_AsDouble(__pyx_t_16);
if (unlikely((__pyx_t_18 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L1_error)
9996 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9997 __pyx_v_s = __pyx_t_18;
10006 __pyx_t_16 = PyFloat_FromDouble(__pyx_v_s);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 190, __pyx_L1_error)
10007 __Pyx_GOTREF(__pyx_t_16);
10008 __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 190, __pyx_L1_error)
10009 __Pyx_GOTREF(__pyx_t_17);
10010 __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_17, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error)
10011 __Pyx_GOTREF(__pyx_t_6);
10012 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10013 __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 190, __pyx_L1_error)
10014 __Pyx_GOTREF(__pyx_t_17);
10015 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_17, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
10016 __Pyx_GOTREF(__pyx_t_2);
10017 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10018 __pyx_t_17 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_6, __pyx_t_2);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 190, __pyx_L1_error)
10019 __Pyx_GOTREF(__pyx_t_17);
10020 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10021 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10022 __pyx_t_2 = __Pyx_PyNumber_Multiply_float_object(__pyx_t_16, __pyx_t_17);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
10023 __Pyx_GOTREF(__pyx_t_2);
10024 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10025 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10034 __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 191, __pyx_L1_error)
10035 __Pyx_GOTREF(__pyx_t_17);
10036 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_17, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 191, __pyx_L1_error)
10037 __Pyx_GOTREF(__pyx_t_16);
10038 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10039 __pyx_t_17 = __Pyx_PyNumber_Add_object_object(__pyx_t_2, __pyx_t_16);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 191, __pyx_L1_error)
10040 __Pyx_GOTREF(__pyx_t_17);
10041 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10042 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10043 if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 191, __pyx_L1_error)
10045 __Pyx_BufFmt_StackElem __pyx_stack[1];
10046 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
10047 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_17), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
10048 if (unlikely(__pyx_t_10 < 0)) {
10049 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
10050 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
10051 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
10052 __Pyx_RaiseBufferFallbackError();
10054 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
10056 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
10058 __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0];
10059 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 190, __pyx_L1_error)
10061 __Pyx_XDECREF_SET(__pyx_v_x, ((PyArrayObject *)__pyx_t_17));
10071 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_nodes, ((PyObject *)__pyx_v_x));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 192, __pyx_L1_error)
10082 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10092 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10102 __pyx_t_1 = PyList_New(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
10103 __Pyx_GOTREF(__pyx_t_1);
10104 for (__pyx_t_22 = 0; __pyx_t_22 < 3; __pyx_t_22+=1) {
10105 __pyx_8genexpr2__pyx_v_j = __pyx_t_22;
10106 __pyx_t_3 = __Pyx_PyLong_From_long((__pyx_v_nN_start + __pyx_8genexpr2__pyx_v_j));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
10107 __Pyx_GOTREF(__pyx_t_3);
10108 __Pyx_GIVEREF(__pyx_t_3);
10109 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_1, __pyx_t_3))) __PYX_ERR(0, 193, __pyx_L1_error)
10113 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_elements, __pyx_t_1);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 193, __pyx_L1_error)
10114 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10125 __pyx_t_1 = PyList_New(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
10126 __Pyx_GOTREF(__pyx_t_1);
10127 for (__pyx_t_22 = 0; __pyx_t_22 < 3; __pyx_t_22+=1) {
10128 __pyx_8genexpr3__pyx_v_j = __pyx_t_22;
10129 __pyx_t_3 = __Pyx_PyLong_From_long(((__pyx_v_nN_start + __pyx_8genexpr3__pyx_v_j) + 1));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
10130 __Pyx_GOTREF(__pyx_t_3);
10131 __Pyx_GIVEREF(__pyx_t_3);
10132 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_1, __pyx_t_3))) __PYX_ERR(0, 194, __pyx_L1_error)
10136 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_elements, __pyx_t_1);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 194, __pyx_L1_error)
10137 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10147 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
10148 __Pyx_GOTREF(__pyx_t_1);
10149 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_plus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
10150 __Pyx_GOTREF(__pyx_t_3);
10151 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 195, __pyx_L1_error)
10152 __Pyx_GOTREF(__pyx_t_17);
10153 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10154 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10155 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -4L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
10156 __Pyx_GOTREF(__pyx_t_3);
10157 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
10158 __Pyx_GOTREF(__pyx_t_1);
10159 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10160 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10161 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 195, __pyx_L1_error)
10170 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
10171 __Pyx_GOTREF(__pyx_t_3);
10172 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_nodes, -4L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 196, __pyx_L1_error)
10173 __Pyx_GOTREF(__pyx_t_17);
10174 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_17);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 196, __pyx_L1_error)
10175 __Pyx_GOTREF(__pyx_t_16);
10176 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10177 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10178 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 196, __pyx_L1_error)
10187 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_nodes, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 197, __pyx_L1_error)
10188 __Pyx_GOTREF(__pyx_t_17);
10189 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -4L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error)
10190 __Pyx_GOTREF(__pyx_t_3);
10191 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
10192 __Pyx_GOTREF(__pyx_t_2);
10193 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10194 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10195 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 197, __pyx_L1_error)
10204 __pyx_t_18 = __pyx_f_10Isosurface_etriple(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_2));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L1_error)
10205 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10206 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10207 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10216 __pyx_t_4 = (__pyx_t_18 < 0.0);
10237 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
10238 __Pyx_GOTREF(__pyx_t_2);
10239 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_2, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 198, __pyx_L1_error)
10240 __Pyx_GOTREF(__pyx_t_16);
10241 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10250 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
10251 __Pyx_GOTREF(__pyx_t_2);
10252 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
10253 __Pyx_GOTREF(__pyx_t_1);
10254 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10263 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
10264 __Pyx_GOTREF(__pyx_t_2);
10265 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error)
10266 __Pyx_GOTREF(__pyx_t_3);
10267 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10276 __pyx_t_2 = PyList_New(3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
10277 __Pyx_GOTREF(__pyx_t_2);
10278 __Pyx_GIVEREF(__pyx_t_16);
10279 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_16) != (0)) __PYX_ERR(0, 198, __pyx_L1_error);
10280 __Pyx_GIVEREF(__pyx_t_1);
10281 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 198, __pyx_L1_error);
10282 __Pyx_GIVEREF(__pyx_t_3);
10283 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 198, __pyx_L1_error);
10287 if (unlikely((__Pyx_SetItemInt(__pyx_v_elements, -2L, __pyx_t_2,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 198, __pyx_L1_error)
10288 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10306 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
10307 __Pyx_GOTREF(__pyx_t_2);
10308 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_plus, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
10309 __Pyx_GOTREF(__pyx_t_3);
10310 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
10311 __Pyx_GOTREF(__pyx_t_1);
10312 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10313 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10314 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
10315 __Pyx_GOTREF(__pyx_t_3);
10316 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
10317 __Pyx_GOTREF(__pyx_t_2);
10318 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10319 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10320 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 201, __pyx_L1_error)
10329 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
10330 __Pyx_GOTREF(__pyx_t_3);
10331 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
10332 __Pyx_GOTREF(__pyx_t_1);
10333 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_1);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 202, __pyx_L1_error)
10334 __Pyx_GOTREF(__pyx_t_16);
10335 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10336 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10337 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 202, __pyx_L1_error)
10346 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
10347 __Pyx_GOTREF(__pyx_t_1);
10348 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
10349 __Pyx_GOTREF(__pyx_t_3);
10350 __pyx_t_17 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_3);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
10351 __Pyx_GOTREF(__pyx_t_17);
10352 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10353 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10354 if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 203, __pyx_L1_error)
10363 __pyx_t_18 = __pyx_f_10Isosurface_etriple(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_17));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L1_error)
10364 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10365 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10366 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10375 __pyx_t_4 = (__pyx_t_18 < 0.0);
10396 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
10397 __Pyx_GOTREF(__pyx_t_17);
10398 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_17, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 204, __pyx_L1_error)
10399 __Pyx_GOTREF(__pyx_t_16);
10400 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10409 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 205, __pyx_L1_error)
10410 __Pyx_GOTREF(__pyx_t_17);
10411 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_17, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
10412 __Pyx_GOTREF(__pyx_t_2);
10413 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10422 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 206, __pyx_L1_error)
10423 __Pyx_GOTREF(__pyx_t_17);
10424 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_17, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
10425 __Pyx_GOTREF(__pyx_t_3);
10426 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10435 __pyx_t_17 = PyList_New(3);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
10436 __Pyx_GOTREF(__pyx_t_17);
10437 __Pyx_GIVEREF(__pyx_t_16);
10438 if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_16) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
10439 __Pyx_GIVEREF(__pyx_t_2);
10440 if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
10441 __Pyx_GIVEREF(__pyx_t_3);
10442 if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
10446 if (unlikely((__Pyx_SetItemInt(__pyx_v_elements, -1L, __pyx_t_17,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 204, __pyx_L1_error)
10447 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10465 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 208, __pyx_L1_error)
10466 __Pyx_GOTREF(__pyx_t_17);
10467 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_17, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
10468 __Pyx_GOTREF(__pyx_t_3);
10469 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10470 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_3);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 208, __pyx_L1_error)
10471 __Pyx_GOTREF(__pyx_t_17);
10472 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10473 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
10474 __Pyx_GOTREF(__pyx_t_3);
10475 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
10476 __Pyx_GOTREF(__pyx_t_2);
10477 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10478 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
10479 __Pyx_GOTREF(__pyx_t_3);
10480 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10481 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
10482 __Pyx_GOTREF(__pyx_t_2);
10483 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10484 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10485 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 208, __pyx_L1_error)
10494 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
10495 __Pyx_GOTREF(__pyx_t_3);
10496 __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_3, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 209, __pyx_L1_error)
10497 __Pyx_GOTREF(__pyx_t_17);
10498 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10499 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_17);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
10500 __Pyx_GOTREF(__pyx_t_3);
10501 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10502 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 209, __pyx_L1_error)
10503 __Pyx_GOTREF(__pyx_t_17);
10504 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_17, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 209, __pyx_L1_error)
10505 __Pyx_GOTREF(__pyx_t_16);
10506 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10507 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_16);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 209, __pyx_L1_error)
10508 __Pyx_GOTREF(__pyx_t_17);
10509 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10510 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_17);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 209, __pyx_L1_error)
10511 __Pyx_GOTREF(__pyx_t_16);
10512 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10513 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10514 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 209, __pyx_L1_error)
10523 __pyx_t_17 = ((PyObject *)__pyx_f_10Isosurface_ecross(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_16)));
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 207, __pyx_L1_error)
10524 __Pyx_GOTREF(__pyx_t_17);
10525 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10526 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10528 __Pyx_BufFmt_StackElem __pyx_stack[1];
10529 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
10530 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_17), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
10531 if (unlikely(__pyx_t_10 < 0)) {
10532 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
10533 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
10534 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
10535 __Pyx_RaiseBufferFallbackError();
10537 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
10539 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
10541 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
10542 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 207, __pyx_L1_error)
10544 __Pyx_XDECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_17));
10554 __pyx_t_18 = __pyx_f_10Isosurface_enorm(((PyArrayObject *)__pyx_v_normal));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L1_error)
10555 __pyx_t_17 = PyFloat_FromDouble(__pyx_t_18);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 210, __pyx_L1_error)
10556 __Pyx_GOTREF(__pyx_t_17);
10558 __pyx_t_16 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_normal), __pyx_t_17);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 210, __pyx_L1_error)
10559 __Pyx_GOTREF(__pyx_t_16);
10560 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10561 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 210, __pyx_L1_error)
10563 __Pyx_BufFmt_StackElem __pyx_stack[1];
10564 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
10565 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_16), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
10566 if (unlikely(__pyx_t_10 < 0)) {
10567 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
10568 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
10569 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
10570 __Pyx_RaiseBufferFallbackError();
10572 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
10574 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
10576 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
10577 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 210, __pyx_L1_error)
10579 __Pyx_DECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_16));
10589 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 211, __pyx_L1_error)
10599 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 212, __pyx_L1_error)
10609 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 213, __pyx_L1_error)
10619 __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_elements, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 214, __pyx_L1_error)
10620 __Pyx_GOTREF(__pyx_t_16);
10621 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normal_indices, __pyx_t_16);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 214, __pyx_L1_error)
10622 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10632 __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 216, __pyx_L1_error)
10633 __Pyx_GOTREF(__pyx_t_16);
10634 __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_16, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 216, __pyx_L1_error)
10635 __Pyx_GOTREF(__pyx_t_17);
10636 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10637 __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_17);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 216, __pyx_L1_error)
10638 __Pyx_GOTREF(__pyx_t_16);
10639 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10640 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 216, __pyx_L1_error)
10641 __Pyx_GOTREF(__pyx_t_17);
10642 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_17, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
10643 __Pyx_GOTREF(__pyx_t_2);
10644 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10645 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_2);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 216, __pyx_L1_error)
10646 __Pyx_GOTREF(__pyx_t_17);
10647 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10648 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_16, __pyx_t_17);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
10649 __Pyx_GOTREF(__pyx_t_2);
10650 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10651 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10652 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 216, __pyx_L1_error)
10661 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 217, __pyx_L1_error)
10662 __Pyx_GOTREF(__pyx_t_17);
10663 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_17, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 217, __pyx_L1_error)
10664 __Pyx_GOTREF(__pyx_t_16);
10665 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10666 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_16);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 217, __pyx_L1_error)
10667 __Pyx_GOTREF(__pyx_t_17);
10668 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10669 __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 217, __pyx_L1_error)
10670 __Pyx_GOTREF(__pyx_t_16);
10671 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_16, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
10672 __Pyx_GOTREF(__pyx_t_3);
10673 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10674 __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_3);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 217, __pyx_L1_error)
10675 __Pyx_GOTREF(__pyx_t_16);
10676 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10677 __pyx_t_3 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_16);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
10678 __Pyx_GOTREF(__pyx_t_3);
10679 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10680 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10681 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 217, __pyx_L1_error)
10690 __pyx_t_16 = ((PyObject *)__pyx_f_10Isosurface_ecross(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3)));
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 215, __pyx_L1_error)
10691 __Pyx_GOTREF(__pyx_t_16);
10692 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10693 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10695 __Pyx_BufFmt_StackElem __pyx_stack[1];
10696 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
10697 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_16), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
10698 if (unlikely(__pyx_t_10 < 0)) {
10699 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
10700 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
10701 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
10702 __Pyx_RaiseBufferFallbackError();
10704 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
10706 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
10708 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
10709 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 215, __pyx_L1_error)
10711 __Pyx_DECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_16));
10721 __pyx_t_18 = __pyx_f_10Isosurface_enorm(((PyArrayObject *)__pyx_v_normal));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L1_error)
10722 __pyx_t_16 = PyFloat_FromDouble(__pyx_t_18);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 218, __pyx_L1_error)
10723 __Pyx_GOTREF(__pyx_t_16);
10725 __pyx_t_3 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_normal), __pyx_t_16);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error)
10726 __Pyx_GOTREF(__pyx_t_3);
10727 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10728 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 218, __pyx_L1_error)
10730 __Pyx_BufFmt_StackElem __pyx_stack[1];
10731 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
10732 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
10733 if (unlikely(__pyx_t_10 < 0)) {
10734 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
10735 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
10736 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
10737 __Pyx_RaiseBufferFallbackError();
10739 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
10741 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
10743 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
10744 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 218, __pyx_L1_error)
10746 __Pyx_DECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_3));
10756 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 219, __pyx_L1_error)
10766 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 220, __pyx_L1_error)
10776 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 221, __pyx_L1_error)
10786 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error)
10787 __Pyx_GOTREF(__pyx_t_3);
10788 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normal_indices, __pyx_t_3);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 222, __pyx_L1_error)
10789 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10809 __pyx_t_14 = (__pyx_v_nPlus == 3);
10815 __pyx_t_4 = __pyx_t_14;
10817 goto __pyx_L24_bool_binop_done;
10819 __pyx_t_14 = (__pyx_v_nMinus == 1);
10822 __pyx_t_4 = __pyx_t_14;
10824 __pyx_L24_bool_binop_done:;
10835 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_minus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error)
10836 __Pyx_GOTREF(__pyx_t_3);
10837 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_3);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L1_error)
10838 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10839 __pyx_v_I = __pyx_t_10;
10848 __pyx_t_3 = __pyx_v_plus; __Pyx_INCREF(__pyx_t_3);
10852 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
10853 #if !CYTHON_ASSUME_SAFE_SIZE
10854 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 225, __pyx_L1_error)
10856 if (__pyx_t_13 >= __pyx_temp)
break;
10858 __pyx_t_16 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_3, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
10860 if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 225, __pyx_L1_error)
10861 __Pyx_GOTREF(__pyx_t_16);
10862 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_16);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L1_error)
10863 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10864 __pyx_v_J = __pyx_t_10;
10873 __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 226, __pyx_L1_error)
10874 __Pyx_GOTREF(__pyx_t_16);
10875 __pyx_t_2 = PyNumber_Negative(__pyx_t_16);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
10876 __Pyx_GOTREF(__pyx_t_2);
10877 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10878 __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 226, __pyx_L1_error)
10879 __Pyx_GOTREF(__pyx_t_16);
10880 __pyx_t_17 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 226, __pyx_L1_error)
10881 __Pyx_GOTREF(__pyx_t_17);
10882 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_16, __pyx_t_17);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
10883 __Pyx_GOTREF(__pyx_t_1);
10884 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10885 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10886 __pyx_t_17 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 226, __pyx_L1_error)
10887 __Pyx_GOTREF(__pyx_t_17);
10888 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10889 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10890 __pyx_t_18 = __Pyx_PyFloat_AsDouble(__pyx_t_17);
if (unlikely((__pyx_t_18 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L1_error)
10891 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10892 __pyx_v_s = __pyx_t_18;
10901 __pyx_t_17 = PyFloat_FromDouble(__pyx_v_s);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 227, __pyx_L1_error)
10902 __Pyx_GOTREF(__pyx_t_17);
10903 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
10904 __Pyx_GOTREF(__pyx_t_1);
10905 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
10906 __Pyx_GOTREF(__pyx_t_2);
10907 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10908 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
10909 __Pyx_GOTREF(__pyx_t_1);
10910 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 227, __pyx_L1_error)
10911 __Pyx_GOTREF(__pyx_t_16);
10912 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10913 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_2, __pyx_t_16);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
10914 __Pyx_GOTREF(__pyx_t_1);
10915 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10916 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10917 __pyx_t_16 = __Pyx_PyNumber_Multiply_float_object(__pyx_t_17, __pyx_t_1);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 227, __pyx_L1_error)
10918 __Pyx_GOTREF(__pyx_t_16);
10919 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10920 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10929 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
10930 __Pyx_GOTREF(__pyx_t_1);
10931 __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 228, __pyx_L1_error)
10932 __Pyx_GOTREF(__pyx_t_17);
10933 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10942 __pyx_t_1 = __Pyx_PyNumber_Add_object_object(__pyx_t_16, __pyx_t_17);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
10943 __Pyx_GOTREF(__pyx_t_1);
10944 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
10945 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
10946 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 227, __pyx_L1_error)
10948 __Pyx_BufFmt_StackElem __pyx_stack[1];
10949 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
10950 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
10951 if (unlikely(__pyx_t_10 < 0)) {
10952 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
10953 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
10954 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
10955 __Pyx_RaiseBufferFallbackError();
10957 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
10959 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
10961 __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0];
10962 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 227, __pyx_L1_error)
10964 __Pyx_XDECREF_SET(__pyx_v_x, ((PyArrayObject *)__pyx_t_1));
10974 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_nodes, ((PyObject *)__pyx_v_x));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 229, __pyx_L1_error)
10985 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10995 __pyx_t_3 = PyList_New(0);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)
10996 __Pyx_GOTREF(__pyx_t_3);
10997 for (__pyx_t_22 = 0; __pyx_t_22 < 3; __pyx_t_22+=1) {
10998 __pyx_8genexpr4__pyx_v_j = __pyx_t_22;
10999 __pyx_t_1 = __Pyx_PyLong_From_long((__pyx_v_nN_start + __pyx_8genexpr4__pyx_v_j));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
11000 __Pyx_GOTREF(__pyx_t_1);
11001 __Pyx_GIVEREF(__pyx_t_1);
11002 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_3, __pyx_t_1))) __PYX_ERR(0, 230, __pyx_L1_error)
11006 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_elements, __pyx_t_3);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 230, __pyx_L1_error)
11007 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11017 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
11018 __Pyx_GOTREF(__pyx_t_3);
11019 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_minus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
11020 __Pyx_GOTREF(__pyx_t_1);
11021 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_1);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 231, __pyx_L1_error)
11022 __Pyx_GOTREF(__pyx_t_17);
11023 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11024 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11025 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
11026 __Pyx_GOTREF(__pyx_t_1);
11027 __pyx_t_3 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
11028 __Pyx_GOTREF(__pyx_t_3);
11029 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11030 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11031 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 231, __pyx_L1_error)
11040 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
11041 __Pyx_GOTREF(__pyx_t_1);
11042 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 232, __pyx_L1_error)
11043 __Pyx_GOTREF(__pyx_t_17);
11044 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_17);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 232, __pyx_L1_error)
11045 __Pyx_GOTREF(__pyx_t_16);
11046 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11047 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11048 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 232, __pyx_L1_error)
11057 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_nodes, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 233, __pyx_L1_error)
11058 __Pyx_GOTREF(__pyx_t_17);
11059 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
11060 __Pyx_GOTREF(__pyx_t_1);
11061 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
11062 __Pyx_GOTREF(__pyx_t_2);
11063 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11064 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11065 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 233, __pyx_L1_error)
11074 __pyx_t_18 = __pyx_f_10Isosurface_etriple(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_2));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 231, __pyx_L1_error)
11075 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11076 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11077 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11086 __pyx_t_4 = (__pyx_t_18 > 0.0);
11107 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
11108 __Pyx_GOTREF(__pyx_t_2);
11109 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_2, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 234, __pyx_L1_error)
11110 __Pyx_GOTREF(__pyx_t_16);
11111 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11120 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
11121 __Pyx_GOTREF(__pyx_t_2);
11122 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
11123 __Pyx_GOTREF(__pyx_t_3);
11124 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11133 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
11134 __Pyx_GOTREF(__pyx_t_2);
11135 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
11136 __Pyx_GOTREF(__pyx_t_1);
11137 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11146 __pyx_t_2 = PyList_New(3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
11147 __Pyx_GOTREF(__pyx_t_2);
11148 __Pyx_GIVEREF(__pyx_t_16);
11149 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_16) != (0)) __PYX_ERR(0, 234, __pyx_L1_error);
11150 __Pyx_GIVEREF(__pyx_t_3);
11151 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 234, __pyx_L1_error);
11152 __Pyx_GIVEREF(__pyx_t_1);
11153 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_1) != (0)) __PYX_ERR(0, 234, __pyx_L1_error);
11157 if (unlikely((__Pyx_SetItemInt(__pyx_v_elements, -1L, __pyx_t_2,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 234, __pyx_L1_error)
11158 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11176 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
11177 __Pyx_GOTREF(__pyx_t_2);
11178 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
11179 __Pyx_GOTREF(__pyx_t_1);
11180 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11181 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
11182 __Pyx_GOTREF(__pyx_t_2);
11183 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11184 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
11185 __Pyx_GOTREF(__pyx_t_1);
11186 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
11187 __Pyx_GOTREF(__pyx_t_3);
11188 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11189 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
11190 __Pyx_GOTREF(__pyx_t_1);
11191 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11192 __pyx_t_3 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_2, __pyx_t_1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
11193 __Pyx_GOTREF(__pyx_t_3);
11194 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11195 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11196 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 238, __pyx_L1_error)
11205 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
11206 __Pyx_GOTREF(__pyx_t_1);
11207 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
11208 __Pyx_GOTREF(__pyx_t_2);
11209 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11210 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
11211 __Pyx_GOTREF(__pyx_t_1);
11212 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11213 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
11214 __Pyx_GOTREF(__pyx_t_2);
11215 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_2, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 239, __pyx_L1_error)
11216 __Pyx_GOTREF(__pyx_t_16);
11217 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11218 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_16);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
11219 __Pyx_GOTREF(__pyx_t_2);
11220 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11221 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 239, __pyx_L1_error)
11222 __Pyx_GOTREF(__pyx_t_16);
11223 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11224 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11225 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 239, __pyx_L1_error)
11234 __pyx_t_2 = ((PyObject *)__pyx_f_10Isosurface_ecross(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_16)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
11235 __Pyx_GOTREF(__pyx_t_2);
11236 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11237 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11239 __Pyx_BufFmt_StackElem __pyx_stack[1];
11240 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
11241 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
11242 if (unlikely(__pyx_t_10 < 0)) {
11243 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
11244 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
11245 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
11246 __Pyx_RaiseBufferFallbackError();
11248 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
11250 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
11252 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
11253 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 237, __pyx_L1_error)
11255 __Pyx_XDECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_2));
11265 __pyx_t_18 = __pyx_f_10Isosurface_enorm(((PyArrayObject *)__pyx_v_normal));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L1_error)
11266 __pyx_t_2 = PyFloat_FromDouble(__pyx_t_18);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
11267 __Pyx_GOTREF(__pyx_t_2);
11269 __pyx_t_16 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_normal), __pyx_t_2);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 240, __pyx_L1_error)
11270 __Pyx_GOTREF(__pyx_t_16);
11271 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11272 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 240, __pyx_L1_error)
11274 __Pyx_BufFmt_StackElem __pyx_stack[1];
11275 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
11276 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_16), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
11277 if (unlikely(__pyx_t_10 < 0)) {
11278 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
11279 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
11280 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
11281 __Pyx_RaiseBufferFallbackError();
11283 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
11285 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
11287 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
11288 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 240, __pyx_L1_error)
11290 __Pyx_DECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_16));
11300 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 241, __pyx_L1_error)
11310 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 242, __pyx_L1_error)
11320 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 243, __pyx_L1_error)
11330 __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 244, __pyx_L1_error)
11331 __Pyx_GOTREF(__pyx_t_16);
11332 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normal_indices, __pyx_t_16);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
11333 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11353 __pyx_t_14 = (__pyx_v_nMinus == 3);
11359 __pyx_t_4 = __pyx_t_14;
11361 goto __pyx_L32_bool_binop_done;
11363 __pyx_t_14 = (__pyx_v_nPlus == 1);
11366 __pyx_t_4 = __pyx_t_14;
11368 __pyx_L32_bool_binop_done:;
11379 __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_plus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 246, __pyx_L1_error)
11380 __Pyx_GOTREF(__pyx_t_16);
11381 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_16);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L1_error)
11382 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11383 __pyx_v_I = __pyx_t_10;
11392 __pyx_t_16 = __pyx_v_minus; __Pyx_INCREF(__pyx_t_16);
11396 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_16);
11397 #if !CYTHON_ASSUME_SAFE_SIZE
11398 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 247, __pyx_L1_error)
11400 if (__pyx_t_13 >= __pyx_temp)
break;
11402 __pyx_t_2 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_16, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
11404 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
11405 __Pyx_GOTREF(__pyx_t_2);
11406 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_2);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L1_error)
11407 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11408 __pyx_v_J = __pyx_t_10;
11417 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error)
11418 __Pyx_GOTREF(__pyx_t_2);
11419 __pyx_t_3 = PyNumber_Negative(__pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
11420 __Pyx_GOTREF(__pyx_t_3);
11421 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11422 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error)
11423 __Pyx_GOTREF(__pyx_t_2);
11424 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
11425 __Pyx_GOTREF(__pyx_t_1);
11426 __pyx_t_17 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_2, __pyx_t_1);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 248, __pyx_L1_error)
11427 __Pyx_GOTREF(__pyx_t_17);
11428 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11429 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11430 __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_17);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
11431 __Pyx_GOTREF(__pyx_t_1);
11432 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11433 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11434 __pyx_t_18 = __Pyx_PyFloat_AsDouble(__pyx_t_1);
if (unlikely((__pyx_t_18 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L1_error)
11435 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11436 __pyx_v_s = __pyx_t_18;
11445 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_s);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
11446 __Pyx_GOTREF(__pyx_t_1);
11447 __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 249, __pyx_L1_error)
11448 __Pyx_GOTREF(__pyx_t_17);
11449 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_17, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
11450 __Pyx_GOTREF(__pyx_t_3);
11451 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11452 __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 249, __pyx_L1_error)
11453 __Pyx_GOTREF(__pyx_t_17);
11454 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_17, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
11455 __Pyx_GOTREF(__pyx_t_2);
11456 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11457 __pyx_t_17 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_2);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 249, __pyx_L1_error)
11458 __Pyx_GOTREF(__pyx_t_17);
11459 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11460 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11461 __pyx_t_2 = __Pyx_PyNumber_Multiply_float_object(__pyx_t_1, __pyx_t_17);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
11462 __Pyx_GOTREF(__pyx_t_2);
11463 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11464 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11473 __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 250, __pyx_L1_error)
11474 __Pyx_GOTREF(__pyx_t_17);
11475 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_17, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
11476 __Pyx_GOTREF(__pyx_t_1);
11477 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11486 __pyx_t_17 = __Pyx_PyNumber_Add_object_object(__pyx_t_2, __pyx_t_1);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 249, __pyx_L1_error)
11487 __Pyx_GOTREF(__pyx_t_17);
11488 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11489 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11490 if (!(likely(((__pyx_t_17) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_17, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 249, __pyx_L1_error)
11492 __Pyx_BufFmt_StackElem __pyx_stack[1];
11493 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
11494 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_17), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
11495 if (unlikely(__pyx_t_10 < 0)) {
11496 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
11497 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
11498 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
11499 __Pyx_RaiseBufferFallbackError();
11501 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
11503 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
11505 __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0];
11506 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 249, __pyx_L1_error)
11508 __Pyx_XDECREF_SET(__pyx_v_x, ((PyArrayObject *)__pyx_t_17));
11518 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_nodes, ((PyObject *)__pyx_v_x));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 251, __pyx_L1_error)
11529 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11539 __pyx_t_16 = PyList_New(0);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 252, __pyx_L1_error)
11540 __Pyx_GOTREF(__pyx_t_16);
11541 for (__pyx_t_22 = 0; __pyx_t_22 < 3; __pyx_t_22+=1) {
11542 __pyx_8genexpr5__pyx_v_j = __pyx_t_22;
11543 __pyx_t_17 = __Pyx_PyLong_From_long((__pyx_v_nN_start + __pyx_8genexpr5__pyx_v_j));
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 252, __pyx_L1_error)
11544 __Pyx_GOTREF(__pyx_t_17);
11545 __Pyx_GIVEREF(__pyx_t_17);
11546 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_16, __pyx_t_17))) __PYX_ERR(0, 252, __pyx_L1_error)
11550 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_elements, __pyx_t_16);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 252, __pyx_L1_error)
11551 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11561 __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 253, __pyx_L1_error)
11562 __Pyx_GOTREF(__pyx_t_16);
11563 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_plus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 253, __pyx_L1_error)
11564 __Pyx_GOTREF(__pyx_t_17);
11565 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_17);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
11566 __Pyx_GOTREF(__pyx_t_1);
11567 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11568 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11569 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 253, __pyx_L1_error)
11570 __Pyx_GOTREF(__pyx_t_17);
11571 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_17);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 253, __pyx_L1_error)
11572 __Pyx_GOTREF(__pyx_t_16);
11573 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11574 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11575 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 253, __pyx_L1_error)
11584 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_nodes, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 254, __pyx_L1_error)
11585 __Pyx_GOTREF(__pyx_t_17);
11586 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
11587 __Pyx_GOTREF(__pyx_t_1);
11588 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
11589 __Pyx_GOTREF(__pyx_t_2);
11590 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11591 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11592 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 254, __pyx_L1_error)
11601 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error)
11602 __Pyx_GOTREF(__pyx_t_1);
11603 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 255, __pyx_L1_error)
11604 __Pyx_GOTREF(__pyx_t_17);
11605 __pyx_t_3 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_17);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error)
11606 __Pyx_GOTREF(__pyx_t_3);
11607 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11608 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11609 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 255, __pyx_L1_error)
11618 __pyx_t_18 = __pyx_f_10Isosurface_etriple(((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 253, __pyx_L1_error)
11619 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11620 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11621 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11630 __pyx_t_4 = (__pyx_t_18 < 0.0);
11651 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error)
11652 __Pyx_GOTREF(__pyx_t_3);
11653 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
11654 __Pyx_GOTREF(__pyx_t_2);
11655 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11664 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
11665 __Pyx_GOTREF(__pyx_t_3);
11666 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_3, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 257, __pyx_L1_error)
11667 __Pyx_GOTREF(__pyx_t_16);
11668 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11677 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L1_error)
11678 __Pyx_GOTREF(__pyx_t_3);
11679 __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_3, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 258, __pyx_L1_error)
11680 __Pyx_GOTREF(__pyx_t_17);
11681 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11690 __pyx_t_3 = PyList_New(3);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error)
11691 __Pyx_GOTREF(__pyx_t_3);
11692 __Pyx_GIVEREF(__pyx_t_2);
11693 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 256, __pyx_L1_error);
11694 __Pyx_GIVEREF(__pyx_t_16);
11695 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_16) != (0)) __PYX_ERR(0, 256, __pyx_L1_error);
11696 __Pyx_GIVEREF(__pyx_t_17);
11697 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_17) != (0)) __PYX_ERR(0, 256, __pyx_L1_error);
11701 if (unlikely((__Pyx_SetItemInt(__pyx_v_elements, -1L, __pyx_t_3,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 256, __pyx_L1_error)
11702 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11720 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error)
11721 __Pyx_GOTREF(__pyx_t_3);
11722 __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_3, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 260, __pyx_L1_error)
11723 __Pyx_GOTREF(__pyx_t_17);
11724 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11725 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_17);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error)
11726 __Pyx_GOTREF(__pyx_t_3);
11727 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11728 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 260, __pyx_L1_error)
11729 __Pyx_GOTREF(__pyx_t_17);
11730 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_17, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 260, __pyx_L1_error)
11731 __Pyx_GOTREF(__pyx_t_16);
11732 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11733 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_16);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 260, __pyx_L1_error)
11734 __Pyx_GOTREF(__pyx_t_17);
11735 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11736 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_17);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 260, __pyx_L1_error)
11737 __Pyx_GOTREF(__pyx_t_16);
11738 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11739 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11740 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 260, __pyx_L1_error)
11749 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 261, __pyx_L1_error)
11750 __Pyx_GOTREF(__pyx_t_17);
11751 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_17, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
11752 __Pyx_GOTREF(__pyx_t_3);
11753 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11754 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_3);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 261, __pyx_L1_error)
11755 __Pyx_GOTREF(__pyx_t_17);
11756 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11757 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
11758 __Pyx_GOTREF(__pyx_t_3);
11759 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error)
11760 __Pyx_GOTREF(__pyx_t_2);
11761 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11762 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
11763 __Pyx_GOTREF(__pyx_t_3);
11764 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11765 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error)
11766 __Pyx_GOTREF(__pyx_t_2);
11767 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11768 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11769 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 261, __pyx_L1_error)
11778 __pyx_t_3 = ((PyObject *)__pyx_f_10Isosurface_ecross(((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_2)));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error)
11779 __Pyx_GOTREF(__pyx_t_3);
11780 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11781 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11783 __Pyx_BufFmt_StackElem __pyx_stack[1];
11784 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
11785 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
11786 if (unlikely(__pyx_t_10 < 0)) {
11787 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
11788 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
11789 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
11790 __Pyx_RaiseBufferFallbackError();
11792 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
11794 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
11796 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
11797 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 259, __pyx_L1_error)
11799 __Pyx_XDECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_3));
11809 __pyx_t_18 = __pyx_f_10Isosurface_enorm(((PyArrayObject *)__pyx_v_normal));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 262, __pyx_L1_error)
11810 __pyx_t_3 = PyFloat_FromDouble(__pyx_t_18);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error)
11811 __Pyx_GOTREF(__pyx_t_3);
11813 __pyx_t_2 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_normal), __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error)
11814 __Pyx_GOTREF(__pyx_t_2);
11815 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11816 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 262, __pyx_L1_error)
11818 __Pyx_BufFmt_StackElem __pyx_stack[1];
11819 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
11820 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
11821 if (unlikely(__pyx_t_10 < 0)) {
11822 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
11823 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
11824 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
11825 __Pyx_RaiseBufferFallbackError();
11827 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
11829 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
11831 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
11832 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 262, __pyx_L1_error)
11834 __Pyx_DECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_2));
11844 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 263, __pyx_L1_error)
11854 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 264, __pyx_L1_error)
11864 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 265, __pyx_L1_error)
11874 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
11875 __Pyx_GOTREF(__pyx_t_2);
11876 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normal_indices, __pyx_t_2);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 266, __pyx_L1_error)
11877 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11897 __pyx_t_14 = (__pyx_v_nZeros == 1);
11903 __pyx_t_4 = __pyx_t_14;
11905 goto __pyx_L40_bool_binop_done;
11907 __pyx_t_14 = (__pyx_v_nPlus == 2);
11911 goto __pyx_L42_next_or;
11915 __pyx_t_14 = (__pyx_v_nMinus == 1);
11921 __pyx_t_4 = __pyx_t_14;
11923 goto __pyx_L40_bool_binop_done;
11925 __pyx_L42_next_or:;
11934 __pyx_t_14 = (__pyx_v_nPlus == 1);
11940 __pyx_t_4 = __pyx_t_14;
11942 goto __pyx_L40_bool_binop_done;
11944 __pyx_t_14 = (__pyx_v_nMinus == 2);
11947 __pyx_t_4 = __pyx_t_14;
11949 __pyx_L40_bool_binop_done:;
11968 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
11969 __Pyx_GOTREF(__pyx_t_2);
11970 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_zeros, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
11971 __Pyx_GOTREF(__pyx_t_3);
11972 __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 270, __pyx_L1_error)
11973 __Pyx_GOTREF(__pyx_t_16);
11974 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11975 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11976 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_t_16);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 270, __pyx_L1_error)
11977 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11987 __pyx_t_16 = __pyx_v_minus; __Pyx_INCREF(__pyx_t_16);
11991 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_16);
11992 #if !CYTHON_ASSUME_SAFE_SIZE
11993 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 271, __pyx_L1_error)
11995 if (__pyx_t_13 >= __pyx_temp)
break;
11997 __pyx_t_3 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_16, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
11999 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
12000 __Pyx_GOTREF(__pyx_t_3);
12001 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_3);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error)
12002 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12003 __pyx_v_J = __pyx_t_10;
12012 __pyx_t_3 = __pyx_v_plus; __Pyx_INCREF(__pyx_t_3);
12016 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
12017 #if !CYTHON_ASSUME_SAFE_SIZE
12018 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 272, __pyx_L1_error)
12020 if (__pyx_t_15 >= __pyx_temp)
break;
12022 __pyx_t_2 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_3, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference);
12024 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
12025 __Pyx_GOTREF(__pyx_t_2);
12026 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_2);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L1_error)
12027 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12028 __pyx_v_I = __pyx_t_10;
12037 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
12038 __Pyx_GOTREF(__pyx_t_2);
12039 __pyx_t_17 = PyNumber_Negative(__pyx_t_2);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 273, __pyx_L1_error)
12040 __Pyx_GOTREF(__pyx_t_17);
12041 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12042 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
12043 __Pyx_GOTREF(__pyx_t_2);
12044 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
12045 __Pyx_GOTREF(__pyx_t_1);
12046 __pyx_t_6 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_2, __pyx_t_1);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
12047 __Pyx_GOTREF(__pyx_t_6);
12048 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12049 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12050 __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_17, __pyx_t_6);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
12051 __Pyx_GOTREF(__pyx_t_1);
12052 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
12053 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12054 __pyx_t_18 = __Pyx_PyFloat_AsDouble(__pyx_t_1);
if (unlikely((__pyx_t_18 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L1_error)
12055 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12056 __pyx_v_s = __pyx_t_18;
12065 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_s);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
12066 __Pyx_GOTREF(__pyx_t_1);
12067 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
12068 __Pyx_GOTREF(__pyx_t_6);
12069 __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 274, __pyx_L1_error)
12070 __Pyx_GOTREF(__pyx_t_17);
12071 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12072 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
12073 __Pyx_GOTREF(__pyx_t_6);
12074 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
12075 __Pyx_GOTREF(__pyx_t_2);
12076 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12077 __pyx_t_6 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_17, __pyx_t_2);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
12078 __Pyx_GOTREF(__pyx_t_6);
12079 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
12080 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12081 __pyx_t_2 = __Pyx_PyNumber_Multiply_float_object(__pyx_t_1, __pyx_t_6);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
12082 __Pyx_GOTREF(__pyx_t_2);
12083 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12084 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12093 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L1_error)
12094 __Pyx_GOTREF(__pyx_t_6);
12095 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error)
12096 __Pyx_GOTREF(__pyx_t_1);
12097 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12098 __pyx_t_6 = __Pyx_PyNumber_Add_object_object(__pyx_t_2, __pyx_t_1);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L1_error)
12099 __Pyx_GOTREF(__pyx_t_6);
12100 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12101 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12102 if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 275, __pyx_L1_error)
12104 __Pyx_BufFmt_StackElem __pyx_stack[1];
12105 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
12106 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_6), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
12107 if (unlikely(__pyx_t_10 < 0)) {
12108 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
12109 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
12110 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
12111 __Pyx_RaiseBufferFallbackError();
12113 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
12115 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
12117 __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0];
12118 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 274, __pyx_L1_error)
12120 __Pyx_XDECREF_SET(__pyx_v_x, ((PyArrayObject *)__pyx_t_6));
12130 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_nodes, ((PyObject *)__pyx_v_x));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 276, __pyx_L1_error)
12141 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12151 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12161 __pyx_t_16 = PyList_New(0);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L1_error)
12162 __Pyx_GOTREF(__pyx_t_16);
12163 for (__pyx_t_22 = 0; __pyx_t_22 < 3; __pyx_t_22+=1) {
12164 __pyx_8genexpr6__pyx_v_j = __pyx_t_22;
12165 __pyx_t_3 = __Pyx_PyLong_From_long((__pyx_v_nN_start + __pyx_8genexpr6__pyx_v_j));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
12166 __Pyx_GOTREF(__pyx_t_3);
12167 __Pyx_GIVEREF(__pyx_t_3);
12168 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_16, __pyx_t_3))) __PYX_ERR(0, 277, __pyx_L1_error)
12172 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_elements, __pyx_t_16);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 277, __pyx_L1_error)
12173 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12183 __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 278, __pyx_L1_error)
12184 __Pyx_GOTREF(__pyx_t_16);
12185 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_plus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
12186 __Pyx_GOTREF(__pyx_t_3);
12187 __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_3);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error)
12188 __Pyx_GOTREF(__pyx_t_6);
12189 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12190 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12191 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
12192 __Pyx_GOTREF(__pyx_t_3);
12193 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_6, __pyx_t_3);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 278, __pyx_L1_error)
12194 __Pyx_GOTREF(__pyx_t_16);
12195 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12196 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12197 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 278, __pyx_L1_error)
12206 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error)
12207 __Pyx_GOTREF(__pyx_t_3);
12208 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L1_error)
12209 __Pyx_GOTREF(__pyx_t_6);
12210 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_6);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
12211 __Pyx_GOTREF(__pyx_t_1);
12212 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12213 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12214 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 279, __pyx_L1_error)
12223 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_nodes, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 280, __pyx_L1_error)
12224 __Pyx_GOTREF(__pyx_t_6);
12225 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
12226 __Pyx_GOTREF(__pyx_t_3);
12227 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_6, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
12228 __Pyx_GOTREF(__pyx_t_2);
12229 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12230 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12231 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 280, __pyx_L1_error)
12240 __pyx_t_18 = __pyx_f_10Isosurface_etriple(((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_2));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 278, __pyx_L1_error)
12241 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12242 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12243 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12252 __pyx_t_4 = (__pyx_t_18 < 0.0);
12273 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
12274 __Pyx_GOTREF(__pyx_t_2);
12275 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
12276 __Pyx_GOTREF(__pyx_t_1);
12277 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12286 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
12287 __Pyx_GOTREF(__pyx_t_2);
12288 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_2, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 282, __pyx_L1_error)
12289 __Pyx_GOTREF(__pyx_t_16);
12290 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12299 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
12300 __Pyx_GOTREF(__pyx_t_2);
12301 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
12302 __Pyx_GOTREF(__pyx_t_3);
12303 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12312 __pyx_t_2 = PyList_New(3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
12313 __Pyx_GOTREF(__pyx_t_2);
12314 __Pyx_GIVEREF(__pyx_t_1);
12315 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 281, __pyx_L1_error);
12316 __Pyx_GIVEREF(__pyx_t_16);
12317 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_16) != (0)) __PYX_ERR(0, 281, __pyx_L1_error);
12318 __Pyx_GIVEREF(__pyx_t_3);
12319 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 281, __pyx_L1_error);
12323 if (unlikely((__Pyx_SetItemInt(__pyx_v_elements, -1L, __pyx_t_2,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 281, __pyx_L1_error)
12324 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12342 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
12343 __Pyx_GOTREF(__pyx_t_2);
12344 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
12345 __Pyx_GOTREF(__pyx_t_3);
12346 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12347 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
12348 __Pyx_GOTREF(__pyx_t_2);
12349 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12350 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
12351 __Pyx_GOTREF(__pyx_t_3);
12352 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_3, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 285, __pyx_L1_error)
12353 __Pyx_GOTREF(__pyx_t_16);
12354 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12355 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_16);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
12356 __Pyx_GOTREF(__pyx_t_3);
12357 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12358 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 285, __pyx_L1_error)
12359 __Pyx_GOTREF(__pyx_t_16);
12360 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12361 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12362 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 285, __pyx_L1_error)
12371 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
12372 __Pyx_GOTREF(__pyx_t_3);
12373 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
12374 __Pyx_GOTREF(__pyx_t_2);
12375 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12376 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
12377 __Pyx_GOTREF(__pyx_t_3);
12378 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12379 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
12380 __Pyx_GOTREF(__pyx_t_2);
12381 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
12382 __Pyx_GOTREF(__pyx_t_1);
12383 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12384 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_1);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
12385 __Pyx_GOTREF(__pyx_t_2);
12386 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12387 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
12388 __Pyx_GOTREF(__pyx_t_1);
12389 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12390 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12391 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 286, __pyx_L1_error)
12400 __pyx_t_2 = ((PyObject *)__pyx_f_10Isosurface_ecross(((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_1)));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
12401 __Pyx_GOTREF(__pyx_t_2);
12402 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12403 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12405 __Pyx_BufFmt_StackElem __pyx_stack[1];
12406 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
12407 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
12408 if (unlikely(__pyx_t_10 < 0)) {
12409 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
12410 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
12411 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
12412 __Pyx_RaiseBufferFallbackError();
12414 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
12416 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
12418 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
12419 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 284, __pyx_L1_error)
12421 __Pyx_XDECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_2));
12431 __pyx_t_18 = __pyx_f_10Isosurface_enorm(((PyArrayObject *)__pyx_v_normal));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 287, __pyx_L1_error)
12432 __pyx_t_2 = PyFloat_FromDouble(__pyx_t_18);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
12433 __Pyx_GOTREF(__pyx_t_2);
12435 __pyx_t_1 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_normal), __pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
12436 __Pyx_GOTREF(__pyx_t_1);
12437 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12438 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 287, __pyx_L1_error)
12440 __Pyx_BufFmt_StackElem __pyx_stack[1];
12441 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
12442 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
12443 if (unlikely(__pyx_t_10 < 0)) {
12444 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
12445 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
12446 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
12447 __Pyx_RaiseBufferFallbackError();
12449 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
12451 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
12453 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
12454 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 287, __pyx_L1_error)
12456 __Pyx_DECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_1));
12466 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
12476 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 289, __pyx_L1_error)
12486 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 290, __pyx_L1_error)
12496 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
12497 __Pyx_GOTREF(__pyx_t_1);
12498 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normal_indices, __pyx_t_1);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 291, __pyx_L1_error)
12499 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12519 __pyx_t_14 = (__pyx_v_nZeros == 2);
12525 __pyx_t_4 = __pyx_t_14;
12527 goto __pyx_L54_bool_binop_done;
12529 __pyx_t_14 = (__pyx_v_nPlus == 1);
12535 __pyx_t_4 = __pyx_t_14;
12537 goto __pyx_L54_bool_binop_done;
12539 __pyx_t_14 = (__pyx_v_nMinus == 1);
12542 __pyx_t_4 = __pyx_t_14;
12544 __pyx_L54_bool_binop_done:;
12555 __pyx_t_1 = __pyx_v_zeros; __Pyx_INCREF(__pyx_t_1);
12559 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
12560 #if !CYTHON_ASSUME_SAFE_SIZE
12561 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 294, __pyx_L1_error)
12563 if (__pyx_t_13 >= __pyx_temp)
break;
12565 __pyx_t_2 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_1, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
12567 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
12568 __Pyx_GOTREF(__pyx_t_2);
12569 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_2);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error)
12570 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12571 __pyx_v_I = __pyx_t_10;
12580 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error)
12581 __Pyx_GOTREF(__pyx_t_2);
12582 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 295, __pyx_L1_error)
12583 __Pyx_GOTREF(__pyx_t_16);
12584 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12585 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_t_16);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 295, __pyx_L1_error)
12586 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12597 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12606 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_plus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
12607 __Pyx_GOTREF(__pyx_t_1);
12608 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_1);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error)
12609 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12610 __pyx_v_I = __pyx_t_10;
12619 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_minus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
12620 __Pyx_GOTREF(__pyx_t_1);
12621 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_1);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L1_error)
12622 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12623 __pyx_v_J = __pyx_t_10;
12632 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
12633 __Pyx_GOTREF(__pyx_t_1);
12634 __pyx_t_16 = PyNumber_Negative(__pyx_t_1);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 298, __pyx_L1_error)
12635 __Pyx_GOTREF(__pyx_t_16);
12636 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12637 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
12638 __Pyx_GOTREF(__pyx_t_1);
12639 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_phi, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
12640 __Pyx_GOTREF(__pyx_t_2);
12641 __pyx_t_3 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)
12642 __Pyx_GOTREF(__pyx_t_3);
12643 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12644 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12645 __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_16, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
12646 __Pyx_GOTREF(__pyx_t_2);
12647 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12648 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12649 __pyx_t_18 = __Pyx_PyFloat_AsDouble(__pyx_t_2);
if (unlikely((__pyx_t_18 == (
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L1_error)
12650 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12651 __pyx_v_s = __pyx_t_18;
12660 __pyx_t_2 = PyFloat_FromDouble(__pyx_v_s);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
12661 __Pyx_GOTREF(__pyx_t_2);
12662 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
12663 __Pyx_GOTREF(__pyx_t_3);
12664 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_J,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 299, __pyx_L1_error)
12665 __Pyx_GOTREF(__pyx_t_16);
12666 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12667 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
12668 __Pyx_GOTREF(__pyx_t_3);
12669 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
12670 __Pyx_GOTREF(__pyx_t_1);
12671 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12672 __pyx_t_3 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_16, __pyx_t_1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
12673 __Pyx_GOTREF(__pyx_t_3);
12674 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12675 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12676 __pyx_t_1 = __Pyx_PyNumber_Multiply_float_object(__pyx_t_2, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
12677 __Pyx_GOTREF(__pyx_t_1);
12678 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12679 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12688 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
12689 __Pyx_GOTREF(__pyx_t_3);
12690 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
12691 __Pyx_GOTREF(__pyx_t_2);
12692 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12693 __pyx_t_3 = __Pyx_PyNumber_Add_object_object(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
12694 __Pyx_GOTREF(__pyx_t_3);
12695 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12696 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12697 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 300, __pyx_L1_error)
12699 __Pyx_BufFmt_StackElem __pyx_stack[1];
12700 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
12701 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
12702 if (unlikely(__pyx_t_10 < 0)) {
12703 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
12704 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
12705 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
12706 __Pyx_RaiseBufferFallbackError();
12708 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
12710 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
12712 __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0];
12713 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 299, __pyx_L1_error)
12715 __Pyx_XDECREF_SET(__pyx_v_x, ((PyArrayObject *)__pyx_t_3));
12725 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_nodes, ((PyObject *)__pyx_v_x));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 301, __pyx_L1_error)
12736 __pyx_t_3 = PyList_New(0);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
12737 __Pyx_GOTREF(__pyx_t_3);
12738 for (__pyx_t_22 = 0; __pyx_t_22 < 3; __pyx_t_22+=1) {
12739 __pyx_8genexpr7__pyx_v_j = __pyx_t_22;
12740 __pyx_t_2 = __Pyx_PyLong_From_long((__pyx_v_nN_start + __pyx_8genexpr7__pyx_v_j));
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
12741 __Pyx_GOTREF(__pyx_t_2);
12742 __Pyx_GIVEREF(__pyx_t_2);
12743 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_3, __pyx_t_2))) __PYX_ERR(0, 302, __pyx_L1_error)
12747 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_elements, __pyx_t_3);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 302, __pyx_L1_error)
12748 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12758 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)
12759 __Pyx_GOTREF(__pyx_t_3);
12760 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_plus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
12761 __Pyx_GOTREF(__pyx_t_2);
12762 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_2);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
12763 __Pyx_GOTREF(__pyx_t_1);
12764 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12765 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12766 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
12767 __Pyx_GOTREF(__pyx_t_2);
12768 __pyx_t_3 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)
12769 __Pyx_GOTREF(__pyx_t_3);
12770 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12771 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12772 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 303, __pyx_L1_error)
12781 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_nodes, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
12782 __Pyx_GOTREF(__pyx_t_2);
12783 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
12784 __Pyx_GOTREF(__pyx_t_1);
12785 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_2, __pyx_t_1);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 304, __pyx_L1_error)
12786 __Pyx_GOTREF(__pyx_t_16);
12787 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12788 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12789 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 304, __pyx_L1_error)
12798 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
12799 __Pyx_GOTREF(__pyx_t_1);
12800 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
12801 __Pyx_GOTREF(__pyx_t_2);
12802 __pyx_t_6 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_2);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 305, __pyx_L1_error)
12803 __Pyx_GOTREF(__pyx_t_6);
12804 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12805 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12806 if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 305, __pyx_L1_error)
12815 __pyx_t_18 = __pyx_f_10Isosurface_etriple(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_6));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
12816 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12817 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12818 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12827 __pyx_t_4 = (__pyx_t_18 < 0.0);
12848 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L1_error)
12849 __Pyx_GOTREF(__pyx_t_6);
12850 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_6, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 306, __pyx_L1_error)
12851 __Pyx_GOTREF(__pyx_t_16);
12852 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12861 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error)
12862 __Pyx_GOTREF(__pyx_t_6);
12863 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
12864 __Pyx_GOTREF(__pyx_t_3);
12865 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12874 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 308, __pyx_L1_error)
12875 __Pyx_GOTREF(__pyx_t_6);
12876 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
12877 __Pyx_GOTREF(__pyx_t_2);
12878 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12887 __pyx_t_6 = PyList_New(3);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L1_error)
12888 __Pyx_GOTREF(__pyx_t_6);
12889 __Pyx_GIVEREF(__pyx_t_16);
12890 if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_16) != (0)) __PYX_ERR(0, 306, __pyx_L1_error);
12891 __Pyx_GIVEREF(__pyx_t_3);
12892 if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 306, __pyx_L1_error);
12893 __Pyx_GIVEREF(__pyx_t_2);
12894 if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2) != (0)) __PYX_ERR(0, 306, __pyx_L1_error);
12898 if (unlikely((__Pyx_SetItemInt(__pyx_v_elements, -1L, __pyx_t_6,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 306, __pyx_L1_error)
12899 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12917 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error)
12918 __Pyx_GOTREF(__pyx_t_6);
12919 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
12920 __Pyx_GOTREF(__pyx_t_2);
12921 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12922 __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_2);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error)
12923 __Pyx_GOTREF(__pyx_t_6);
12924 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12925 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
12926 __Pyx_GOTREF(__pyx_t_2);
12927 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
12928 __Pyx_GOTREF(__pyx_t_3);
12929 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12930 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_3);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
12931 __Pyx_GOTREF(__pyx_t_2);
12932 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12933 __pyx_t_3 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_6, __pyx_t_2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
12934 __Pyx_GOTREF(__pyx_t_3);
12935 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12936 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12937 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 310, __pyx_L1_error)
12946 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error)
12947 __Pyx_GOTREF(__pyx_t_2);
12948 __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
12949 __Pyx_GOTREF(__pyx_t_6);
12950 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12951 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_6);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error)
12952 __Pyx_GOTREF(__pyx_t_2);
12953 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12954 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
12955 __Pyx_GOTREF(__pyx_t_6);
12956 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_6, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 311, __pyx_L1_error)
12957 __Pyx_GOTREF(__pyx_t_16);
12958 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12959 __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_16);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 311, __pyx_L1_error)
12960 __Pyx_GOTREF(__pyx_t_6);
12961 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12962 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_2, __pyx_t_6);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 311, __pyx_L1_error)
12963 __Pyx_GOTREF(__pyx_t_16);
12964 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12965 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12966 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 311, __pyx_L1_error)
12975 __pyx_t_6 = ((PyObject *)__pyx_f_10Isosurface_ecross(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_16)));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 309, __pyx_L1_error)
12976 __Pyx_GOTREF(__pyx_t_6);
12977 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12978 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
12980 __Pyx_BufFmt_StackElem __pyx_stack[1];
12981 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
12982 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_6), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
12983 if (unlikely(__pyx_t_10 < 0)) {
12984 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
12985 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
12986 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
12987 __Pyx_RaiseBufferFallbackError();
12989 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
12991 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
12993 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
12994 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 309, __pyx_L1_error)
12996 __Pyx_XDECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_6));
13006 __pyx_t_18 = __pyx_f_10Isosurface_enorm(((PyArrayObject *)__pyx_v_normal));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 312, __pyx_L1_error)
13007 __pyx_t_6 = PyFloat_FromDouble(__pyx_t_18);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L1_error)
13008 __Pyx_GOTREF(__pyx_t_6);
13010 __pyx_t_16 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_normal), __pyx_t_6);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 312, __pyx_L1_error)
13011 __Pyx_GOTREF(__pyx_t_16);
13012 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13013 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 312, __pyx_L1_error)
13015 __Pyx_BufFmt_StackElem __pyx_stack[1];
13016 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
13017 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_16), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
13018 if (unlikely(__pyx_t_10 < 0)) {
13019 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
13020 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
13021 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
13022 __Pyx_RaiseBufferFallbackError();
13024 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
13026 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
13028 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
13029 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 312, __pyx_L1_error)
13031 __Pyx_DECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_16));
13041 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 313, __pyx_L1_error)
13051 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 314, __pyx_L1_error)
13061 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 315, __pyx_L1_error)
13071 __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 316, __pyx_L1_error)
13072 __Pyx_GOTREF(__pyx_t_16);
13073 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normal_indices, __pyx_t_16);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 316, __pyx_L1_error)
13074 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
13094 __pyx_t_4 = (__pyx_v_nZeros == 3);
13106 __pyx_t_16 = __pyx_v_zeros; __Pyx_INCREF(__pyx_t_16);
13110 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_16);
13111 #if !CYTHON_ASSUME_SAFE_SIZE
13112 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 318, __pyx_L1_error)
13114 if (__pyx_t_13 >= __pyx_temp)
break;
13116 __pyx_t_6 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_16, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
13118 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
13119 __Pyx_GOTREF(__pyx_t_6);
13120 __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_6);
if (unlikely((__pyx_t_10 == (
int)-1) && PyErr_Occurred())) __PYX_ERR(0, 318, __pyx_L1_error)
13121 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13122 __pyx_v_I = __pyx_t_10;
13131 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 319, __pyx_L1_error)
13132 __Pyx_GOTREF(__pyx_t_6);
13133 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_I,
int, 1, __Pyx_PyLong_From_int, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
13134 __Pyx_GOTREF(__pyx_t_3);
13135 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13136 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_nodes, __pyx_t_3);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 319, __pyx_L1_error)
13137 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13148 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
13158 __pyx_t_16 = PyList_New(0);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 320, __pyx_L1_error)
13159 __Pyx_GOTREF(__pyx_t_16);
13160 for (__pyx_t_22 = 0; __pyx_t_22 < 3; __pyx_t_22+=1) {
13161 __pyx_8genexpr8__pyx_v_j = __pyx_t_22;
13162 __pyx_t_3 = __Pyx_PyLong_From_long((__pyx_v_nN_start + __pyx_8genexpr8__pyx_v_j));
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error)
13163 __Pyx_GOTREF(__pyx_t_3);
13164 __Pyx_GIVEREF(__pyx_t_3);
13165 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_16, __pyx_t_3))) __PYX_ERR(0, 320, __pyx_L1_error)
13169 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_elements, __pyx_t_16);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 320, __pyx_L1_error)
13170 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
13180 __pyx_t_4 = (__pyx_v_nPlus == 1);
13192 __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 322, __pyx_L1_error)
13193 __Pyx_GOTREF(__pyx_t_16);
13194 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_plus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
13195 __Pyx_GOTREF(__pyx_t_3);
13196 __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_3);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error)
13197 __Pyx_GOTREF(__pyx_t_6);
13198 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
13199 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13200 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
13201 __Pyx_GOTREF(__pyx_t_3);
13202 __pyx_t_16 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_6, __pyx_t_3);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 322, __pyx_L1_error)
13203 __Pyx_GOTREF(__pyx_t_16);
13204 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13205 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13206 if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 322, __pyx_L1_error)
13215 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error)
13216 __Pyx_GOTREF(__pyx_t_3);
13217 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error)
13218 __Pyx_GOTREF(__pyx_t_6);
13219 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_6);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error)
13220 __Pyx_GOTREF(__pyx_t_2);
13221 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13222 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13223 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 323, __pyx_L1_error)
13232 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_nodes, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 324, __pyx_L1_error)
13233 __Pyx_GOTREF(__pyx_t_6);
13234 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error)
13235 __Pyx_GOTREF(__pyx_t_3);
13236 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_6, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
13237 __Pyx_GOTREF(__pyx_t_1);
13238 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13239 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13240 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 324, __pyx_L1_error)
13249 __pyx_t_18 = __pyx_f_10Isosurface_etriple(((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_1));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L1_error)
13250 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
13251 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13252 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13261 __pyx_t_4 = (__pyx_t_18 < 0.0);
13282 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
13283 __Pyx_GOTREF(__pyx_t_1);
13284 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
13285 __Pyx_GOTREF(__pyx_t_2);
13286 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13295 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
13296 __Pyx_GOTREF(__pyx_t_1);
13297 __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_1, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 326, __pyx_L1_error)
13298 __Pyx_GOTREF(__pyx_t_16);
13299 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13308 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
13309 __Pyx_GOTREF(__pyx_t_1);
13310 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
13311 __Pyx_GOTREF(__pyx_t_3);
13312 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13321 __pyx_t_1 = PyList_New(3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
13322 __Pyx_GOTREF(__pyx_t_1);
13323 __Pyx_GIVEREF(__pyx_t_2);
13324 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 325, __pyx_L1_error);
13325 __Pyx_GIVEREF(__pyx_t_16);
13326 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_16) != (0)) __PYX_ERR(0, 325, __pyx_L1_error);
13327 __Pyx_GIVEREF(__pyx_t_3);
13328 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 325, __pyx_L1_error);
13332 if (unlikely((__Pyx_SetItemInt(__pyx_v_elements, -1L, __pyx_t_1,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 325, __pyx_L1_error)
13333 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13362 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
13363 __Pyx_GOTREF(__pyx_t_1);
13364 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_minus, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
13365 __Pyx_GOTREF(__pyx_t_3);
13366 __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 329, __pyx_L1_error)
13367 __Pyx_GOTREF(__pyx_t_16);
13368 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13369 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13370 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
13371 __Pyx_GOTREF(__pyx_t_3);
13372 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_16, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
13373 __Pyx_GOTREF(__pyx_t_1);
13374 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
13375 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13376 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 329, __pyx_L1_error)
13385 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -2L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error)
13386 __Pyx_GOTREF(__pyx_t_3);
13387 __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 330, __pyx_L1_error)
13388 __Pyx_GOTREF(__pyx_t_16);
13389 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_16);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
13390 __Pyx_GOTREF(__pyx_t_2);
13391 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13392 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
13393 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 330, __pyx_L1_error)
13402 __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_v_nodes, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 331, __pyx_L1_error)
13403 __Pyx_GOTREF(__pyx_t_16);
13404 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_nodes, -3L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
13405 __Pyx_GOTREF(__pyx_t_3);
13406 __pyx_t_6 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_16, __pyx_t_3);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error)
13407 __Pyx_GOTREF(__pyx_t_6);
13408 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
13409 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13410 if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 331, __pyx_L1_error)
13419 __pyx_t_18 = __pyx_f_10Isosurface_etriple(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_6));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error)
13420 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13421 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13422 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13431 __pyx_t_4 = (__pyx_t_18 > 0.0);
13452 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
13453 __Pyx_GOTREF(__pyx_t_6);
13454 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
13455 __Pyx_GOTREF(__pyx_t_2);
13456 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13465 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L1_error)
13466 __Pyx_GOTREF(__pyx_t_6);
13467 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
13468 __Pyx_GOTREF(__pyx_t_1);
13469 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13478 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L1_error)
13479 __Pyx_GOTREF(__pyx_t_6);
13480 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error)
13481 __Pyx_GOTREF(__pyx_t_3);
13482 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13491 __pyx_t_6 = PyList_New(3);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
13492 __Pyx_GOTREF(__pyx_t_6);
13493 __Pyx_GIVEREF(__pyx_t_2);
13494 if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 332, __pyx_L1_error);
13495 __Pyx_GIVEREF(__pyx_t_1);
13496 if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 332, __pyx_L1_error);
13497 __Pyx_GIVEREF(__pyx_t_3);
13498 if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 332, __pyx_L1_error);
13502 if (unlikely((__Pyx_SetItemInt(__pyx_v_elements, -1L, __pyx_t_6,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 332, __pyx_L1_error)
13503 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13523 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 336, __pyx_L1_error)
13524 __Pyx_GOTREF(__pyx_t_6);
13525 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error)
13526 __Pyx_GOTREF(__pyx_t_3);
13527 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13528 __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_3);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 336, __pyx_L1_error)
13529 __Pyx_GOTREF(__pyx_t_6);
13530 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13531 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error)
13532 __Pyx_GOTREF(__pyx_t_3);
13533 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
13534 __Pyx_GOTREF(__pyx_t_1);
13535 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13536 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_1);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error)
13537 __Pyx_GOTREF(__pyx_t_3);
13538 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13539 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_6, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
13540 __Pyx_GOTREF(__pyx_t_1);
13541 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13542 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13543 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 336, __pyx_L1_error)
13552 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
13553 __Pyx_GOTREF(__pyx_t_3);
13554 __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
13555 __Pyx_GOTREF(__pyx_t_6);
13556 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13557 __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_6);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
13558 __Pyx_GOTREF(__pyx_t_3);
13559 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13560 __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
13561 __Pyx_GOTREF(__pyx_t_6);
13562 __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
13563 __Pyx_GOTREF(__pyx_t_2);
13564 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13565 __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_nodes, __pyx_t_2);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
13566 __Pyx_GOTREF(__pyx_t_6);
13567 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13568 __pyx_t_2 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_3, __pyx_t_6);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
13569 __Pyx_GOTREF(__pyx_t_2);
13570 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13571 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13572 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 337, __pyx_L1_error)
13581 __pyx_t_6 = ((PyObject *)__pyx_f_10Isosurface_ecross(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_2)));
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L1_error)
13582 __Pyx_GOTREF(__pyx_t_6);
13583 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13584 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13586 __Pyx_BufFmt_StackElem __pyx_stack[1];
13587 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
13588 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_6), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
13589 if (unlikely(__pyx_t_10 < 0)) {
13590 __Pyx_PyErr_FetchException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
13591 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
13592 Py_XDECREF(__pyx_t_21); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_19);
13593 __Pyx_RaiseBufferFallbackError();
13595 __Pyx_PyErr_RestoreException(__pyx_t_21, __pyx_t_20, __pyx_t_19);
13597 __pyx_t_21 = __pyx_t_20 = __pyx_t_19 = 0;
13599 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
13600 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 335, __pyx_L1_error)
13602 __Pyx_XDECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_6));
13612 __pyx_t_18 = __pyx_f_10Isosurface_enorm(((PyArrayObject *)__pyx_v_normal));
if (unlikely(__pyx_t_18 == ((
double)-1) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L1_error)
13613 __pyx_t_6 = PyFloat_FromDouble(__pyx_t_18);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error)
13614 __Pyx_GOTREF(__pyx_t_6);
13616 __pyx_t_2 = __Pyx_PyNumber_InPlaceDivide(((PyObject *)__pyx_v_normal), __pyx_t_6);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error)
13617 __Pyx_GOTREF(__pyx_t_2);
13618 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13619 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 338, __pyx_L1_error)
13621 __Pyx_BufFmt_StackElem __pyx_stack[1];
13622 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
13623 __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
13624 if (unlikely(__pyx_t_10 < 0)) {
13625 __Pyx_PyErr_FetchException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
13626 if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_normal.rcbuffer->pybuffer, (PyObject*)__pyx_v_normal, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
13627 Py_XDECREF(__pyx_t_19); Py_XDECREF(__pyx_t_20); Py_XDECREF(__pyx_t_21);
13628 __Pyx_RaiseBufferFallbackError();
13630 __Pyx_PyErr_RestoreException(__pyx_t_19, __pyx_t_20, __pyx_t_21);
13632 __pyx_t_19 = __pyx_t_20 = __pyx_t_21 = 0;
13634 __pyx_pybuffernd_normal.diminfo[0].strides = __pyx_pybuffernd_normal.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_normal.diminfo[0].shape = __pyx_pybuffernd_normal.rcbuffer->pybuffer.shape[0];
13635 if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 338, __pyx_L1_error)
13637 __Pyx_DECREF_SET(__pyx_v_normal, ((PyArrayObject *)__pyx_t_2));
13647 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
13657 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 340, __pyx_L1_error)
13667 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normals, ((PyObject *)__pyx_v_normal));
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 341, __pyx_L1_error)
13677 __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_elements, -1L,
long, 1, __Pyx_PyLong_From_long, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
13678 __Pyx_GOTREF(__pyx_t_2);
13679 __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_normal_indices, __pyx_t_2);
if (unlikely(__pyx_t_12 == ((
int)-1))) __PYX_ERR(0, 342, __pyx_L1_error)
13680 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13705 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13708 __Pyx_XDECREF(__pyx_t_1);
13709 __Pyx_XDECREF(__pyx_t_2);
13710 __Pyx_XDECREF(__pyx_t_3);
13711 __Pyx_XDECREF(__pyx_t_6);
13712 __Pyx_XDECREF(__pyx_t_16);
13713 __Pyx_XDECREF(__pyx_t_17);
13714 { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
13715 __Pyx_PyThreadState_declare
13716 __Pyx_PyThreadState_assign
13717 __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
13718 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
13719 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
13720 __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
13721 __Pyx_AddTraceback(
"Isosurface.Isosurface.triangulateIsosurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
13725 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_normal.rcbuffer->pybuffer);
13726 __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
13738 __Pyx_XDECREF((PyObject *)__pyx_v_x);
13739 __Pyx_XDECREF((PyObject *)__pyx_v_normal);
13740 __Pyx_XDECREF(__pyx_v_nodes);
13741 __Pyx_XDECREF(__pyx_v_elements);
13742 __Pyx_XDECREF(__pyx_v_normals);
13743 __Pyx_XDECREF(__pyx_v_normal_indices);
13744 __Pyx_XDECREF(__pyx_v_phi);
13745 __Pyx_XDECREF(__pyx_v_plus);
13746 __Pyx_XDECREF(__pyx_v_minus);
13747 __Pyx_XDECREF(__pyx_v_zeros);
13759 __Pyx_XGIVEREF(__pyx_r);
13760 __Pyx_RefNannyFinishContext();
13773static PyObject *__pyx_pw_10Isosurface_10Isosurface_9writeIsosurfaceMesh(PyObject *__pyx_self,
13774#
if CYTHON_VECTORCALL
13775PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
13777PyObject *__pyx_args, PyObject *__pyx_kwds
13780PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface_8writeIsosurfaceMesh,
"Isosurface.writeIsosurfaceMesh(self, field, value, frame)");
13781static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_9writeIsosurfaceMesh = {
"writeIsosurfaceMesh", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_9writeIsosurfaceMesh, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface_8writeIsosurfaceMesh};
13782static PyObject *__pyx_pw_10Isosurface_10Isosurface_9writeIsosurfaceMesh(PyObject *__pyx_self,
13783#
if CYTHON_VECTORCALL
13784PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
13786PyObject *__pyx_args, PyObject *__pyx_kwds
13789 PyObject *__pyx_v_self = 0;
13790 PyObject *__pyx_v_field = 0;
13791 PyObject *__pyx_v_value = 0;
13792 PyObject *__pyx_v_frame = 0;
13793 #if !CYTHON_VECTORCALL
13794 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
13796 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
13797 PyObject* values[4] = {0,0,0,0};
13798 int __pyx_lineno = 0;
13799 const char *__pyx_filename = NULL;
13800 int __pyx_clineno = 0;
13801 PyObject *__pyx_r = 0;
13802 __Pyx_RefNannyDeclarations
13803 __Pyx_RefNannySetupContext(
"writeIsosurfaceMesh (wrapper)", 0);
13804 #if !CYTHON_VECTORCALL
13805 #if CYTHON_ASSUME_SAFE_SIZE
13806 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
13808 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
13811 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
13813 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_field,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_frame,0};
13814 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
13815 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 344, __pyx_L3_error)
13816 if (__pyx_kwds_len > 0) {
13817 switch (__pyx_nargs) {
13819 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
13820 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 344, __pyx_L3_error)
13821 CYTHON_FALLTHROUGH;
13823 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
13824 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 344, __pyx_L3_error)
13825 CYTHON_FALLTHROUGH;
13827 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
13828 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 344, __pyx_L3_error)
13829 CYTHON_FALLTHROUGH;
13831 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
13832 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 344, __pyx_L3_error)
13833 CYTHON_FALLTHROUGH;
13835 default:
goto __pyx_L5_argtuple_error;
13837 const Py_ssize_t kwd_pos_args = __pyx_nargs;
13838 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"writeIsosurfaceMesh", 0) < (0)) __PYX_ERR(0, 344, __pyx_L3_error)
13839 for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
13840 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"writeIsosurfaceMesh", 1, 4, 4, i); __PYX_ERR(0, 344, __pyx_L3_error) }
13842 }
else if (unlikely(__pyx_nargs != 4)) {
13843 goto __pyx_L5_argtuple_error;
13845 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
13846 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 344, __pyx_L3_error)
13847 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
13848 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 344, __pyx_L3_error)
13849 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
13850 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 344, __pyx_L3_error)
13851 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
13852 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 344, __pyx_L3_error)
13854 __pyx_v_self = values[0];
13855 __pyx_v_field = values[1];
13856 __pyx_v_value = values[2];
13857 __pyx_v_frame = values[3];
13859 goto __pyx_L6_skip;
13860 __pyx_L5_argtuple_error:;
13861 __Pyx_RaiseArgtupleInvalid(
"writeIsosurfaceMesh", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 344, __pyx_L3_error)
13863 goto __pyx_L4_argument_unpacking_done;
13865 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
13866 Py_XDECREF(values[__pyx_temp]);
13868 __Pyx_AddTraceback(
"Isosurface.Isosurface.writeIsosurfaceMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13869 __Pyx_RefNannyFinishContext();
13871 __pyx_L4_argument_unpacking_done:;
13872 __pyx_r = __pyx_pf_10Isosurface_10Isosurface_8writeIsosurfaceMesh(__pyx_self, __pyx_v_self, __pyx_v_field, __pyx_v_value, __pyx_v_frame);
13875 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
13876 Py_XDECREF(values[__pyx_temp]);
13878 __Pyx_RefNannyFinishContext();
13882static PyObject *__pyx_pf_10Isosurface_10Isosurface_8writeIsosurfaceMesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value, PyObject *__pyx_v_frame) {
13883 PyObject *__pyx_r = NULL;
13884 __Pyx_RefNannyDeclarations
13885 PyObject *__pyx_t_1 = NULL;
13887 PyObject *__pyx_t_3 = NULL;
13888 PyObject *__pyx_t_4 = NULL;
13889 PyObject *__pyx_t_5 = NULL;
13890 PyObject *__pyx_t_6 = NULL;
13892 int __pyx_lineno = 0;
13893 const char *__pyx_filename = NULL;
13894 int __pyx_clineno = 0;
13895 __Pyx_RefNannySetupContext(
"writeIsosurfaceMesh", 0);
13904 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
13905 __Pyx_GOTREF(__pyx_t_1);
13906 __pyx_t_2 = __Pyx_PyObject_CompareBoolEq_object_str(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pov, Py_EQ);
if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 345, __pyx_L1_error)
13907 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13919 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
13920 __Pyx_GOTREF(__pyx_t_4);
13921 __pyx_t_5 = PyObject_Repr(__pyx_v_frame);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error)
13922 __Pyx_GOTREF(__pyx_t_5);
13923 __pyx_t_6 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_Writing_pov_frame, __pyx_t_5);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
13924 __Pyx_GOTREF(__pyx_t_6);
13925 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13927 #if CYTHON_UNPACK_METHODS
13928 if (unlikely(PyMethod_Check(__pyx_t_4))) {
13929 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
13931 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
13932 __Pyx_INCREF(__pyx_t_3);
13933 __Pyx_INCREF(__pyx__function);
13934 __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
13939 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
13940 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
13941 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13942 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13943 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13944 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
13945 __Pyx_GOTREF(__pyx_t_1);
13947 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13956 __pyx_t_4 = __pyx_v_self;
13957 __Pyx_INCREF(__pyx_t_4);
13960 PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_field, __pyx_v_value, __pyx_v_frame};
13961 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_writeIsosurfaceMesh_povray, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
13962 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13963 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
13964 __Pyx_GOTREF(__pyx_t_1);
13966 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13985 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
13986 __Pyx_GOTREF(__pyx_t_1);
13987 __pyx_t_2 = __Pyx_PyObject_CompareBoolEq_object_str(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_h5, Py_EQ);
if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 348, __pyx_L1_error)
13988 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13999 __pyx_t_4 = __pyx_v_self;
14000 __Pyx_INCREF(__pyx_t_4);
14003 PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_field, __pyx_v_value, __pyx_v_frame};
14004 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_writeIsosurfaceMesh_h5, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
14005 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14006 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
14007 __Pyx_GOTREF(__pyx_t_1);
14009 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14028 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error)
14029 __Pyx_GOTREF(__pyx_t_1);
14030 __pyx_t_2 = (__pyx_t_1 == Py_None);
14031 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14046 __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L1_error)
14047 __Pyx_GOTREF(__pyx_t_6);
14049 #if CYTHON_UNPACK_METHODS
14050 if (unlikely(PyMethod_Check(__pyx_t_6))) {
14051 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
14053 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
14054 __Pyx_INCREF(__pyx_t_4);
14055 __Pyx_INCREF(__pyx__function);
14056 __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
14061 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Isosurface_file_format_not_recog};
14062 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
14063 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14064 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14065 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
14066 __Pyx_GOTREF(__pyx_t_1);
14068 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14081 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14084 __Pyx_XDECREF(__pyx_t_1);
14085 __Pyx_XDECREF(__pyx_t_3);
14086 __Pyx_XDECREF(__pyx_t_4);
14087 __Pyx_XDECREF(__pyx_t_5);
14088 __Pyx_XDECREF(__pyx_t_6);
14089 __Pyx_AddTraceback(
"Isosurface.Isosurface.writeIsosurfaceMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14092 __Pyx_XGIVEREF(__pyx_r);
14093 __Pyx_RefNannyFinishContext();
14106static PyObject *__pyx_pw_10Isosurface_10Isosurface_11writeIsosurfaceMesh_h5(PyObject *__pyx_self,
14107#
if CYTHON_VECTORCALL
14108PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14110PyObject *__pyx_args, PyObject *__pyx_kwds
14113PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface_10writeIsosurfaceMesh_h5,
"Isosurface.writeIsosurfaceMesh_h5(self, field, value, frame)");
14114static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_11writeIsosurfaceMesh_h5 = {
"writeIsosurfaceMesh_h5", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_11writeIsosurfaceMesh_h5, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface_10writeIsosurfaceMesh_h5};
14115static PyObject *__pyx_pw_10Isosurface_10Isosurface_11writeIsosurfaceMesh_h5(PyObject *__pyx_self,
14116#
if CYTHON_VECTORCALL
14117PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14119PyObject *__pyx_args, PyObject *__pyx_kwds
14122 PyObject *__pyx_v_self = 0;
14123 PyObject *__pyx_v_field = 0;
14124 PyObject *__pyx_v_value = 0;
14125 CYTHON_UNUSED PyObject *__pyx_v_frame = 0;
14126 #if !CYTHON_VECTORCALL
14127 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
14129 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14130 PyObject* values[4] = {0,0,0,0};
14131 int __pyx_lineno = 0;
14132 const char *__pyx_filename = NULL;
14133 int __pyx_clineno = 0;
14134 PyObject *__pyx_r = 0;
14135 __Pyx_RefNannyDeclarations
14136 __Pyx_RefNannySetupContext(
"writeIsosurfaceMesh_h5 (wrapper)", 0);
14137 #if !CYTHON_VECTORCALL
14138 #if CYTHON_ASSUME_SAFE_SIZE
14139 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
14141 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
14144 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
14146 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_field,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_frame,0};
14147 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
14148 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 355, __pyx_L3_error)
14149 if (__pyx_kwds_len > 0) {
14150 switch (__pyx_nargs) {
14152 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
14153 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 355, __pyx_L3_error)
14154 CYTHON_FALLTHROUGH;
14156 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
14157 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 355, __pyx_L3_error)
14158 CYTHON_FALLTHROUGH;
14160 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
14161 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 355, __pyx_L3_error)
14162 CYTHON_FALLTHROUGH;
14164 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
14165 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error)
14166 CYTHON_FALLTHROUGH;
14168 default:
goto __pyx_L5_argtuple_error;
14170 const Py_ssize_t kwd_pos_args = __pyx_nargs;
14171 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"writeIsosurfaceMesh_h5", 0) < (0)) __PYX_ERR(0, 355, __pyx_L3_error)
14172 for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
14173 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"writeIsosurfaceMesh_h5", 1, 4, 4, i); __PYX_ERR(0, 355, __pyx_L3_error) }
14175 }
else if (unlikely(__pyx_nargs != 4)) {
14176 goto __pyx_L5_argtuple_error;
14178 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
14179 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error)
14180 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
14181 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 355, __pyx_L3_error)
14182 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
14183 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 355, __pyx_L3_error)
14184 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
14185 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 355, __pyx_L3_error)
14187 __pyx_v_self = values[0];
14188 __pyx_v_field = values[1];
14189 __pyx_v_value = values[2];
14190 __pyx_v_frame = values[3];
14192 goto __pyx_L6_skip;
14193 __pyx_L5_argtuple_error:;
14194 __Pyx_RaiseArgtupleInvalid(
"writeIsosurfaceMesh_h5", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 355, __pyx_L3_error)
14196 goto __pyx_L4_argument_unpacking_done;
14198 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
14199 Py_XDECREF(values[__pyx_temp]);
14201 __Pyx_AddTraceback(
"Isosurface.Isosurface.writeIsosurfaceMesh_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
14202 __Pyx_RefNannyFinishContext();
14204 __pyx_L4_argument_unpacking_done:;
14205 __pyx_r = __pyx_pf_10Isosurface_10Isosurface_10writeIsosurfaceMesh_h5(__pyx_self, __pyx_v_self, __pyx_v_field, __pyx_v_value, __pyx_v_frame);
14208 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
14209 Py_XDECREF(values[__pyx_temp]);
14211 __Pyx_RefNannyFinishContext();
14215static PyObject *__pyx_pf_10Isosurface_10Isosurface_10writeIsosurfaceMesh_h5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_frame) {
14216 PyObject *__pyx_v_h5py = NULL;
14217 PyObject *__pyx_v_nodes = NULL;
14218 PyObject *__pyx_v_elements = NULL;
14219 PyObject *__pyx_v_normals = NULL;
14220 PyObject *__pyx_v_normal_indices = NULL;
14221 PyObject *__pyx_v_filename = NULL;
14222 PyObject *__pyx_v_f = NULL;
14223 CYTHON_UNUSED PyObject *__pyx_v_dset = NULL;
14224 PyObject *__pyx_r = NULL;
14225 __Pyx_RefNannyDeclarations
14226 PyObject *__pyx_t_1 = NULL;
14227 PyObject *__pyx_t_2 = NULL;
14228 PyObject *__pyx_t_3 = NULL;
14229 PyObject *__pyx_t_4 = NULL;
14230 PyObject *__pyx_t_5 = NULL;
14231 PyObject *__pyx_t_6 = NULL;
14232 PyObject *__pyx_t_7 = NULL;
14233 PyObject *__pyx_t_8 = NULL;
14234 PyObject *__pyx_t_9 = NULL;
14237 int __pyx_lineno = 0;
14238 const char *__pyx_filename = NULL;
14239 int __pyx_clineno = 0;
14240 __Pyx_RefNannySetupContext(
"writeIsosurfaceMesh_h5", 0);
14249 __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_h5py, 0, 0, NULL, 0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
14250 __pyx_t_1 = __pyx_t_2;
14251 __Pyx_GOTREF(__pyx_t_1);
14252 __pyx_v_h5py = __pyx_t_1;
14262 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodes);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
14263 __Pyx_GOTREF(__pyx_t_1);
14264 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error)
14265 __Pyx_GOTREF(__pyx_t_3);
14266 __Pyx_INCREF(__pyx_v_field);
14267 __Pyx_GIVEREF(__pyx_v_field);
14268 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 357, __pyx_L1_error);
14269 __Pyx_INCREF(__pyx_v_value);
14270 __Pyx_GIVEREF(__pyx_v_value);
14271 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 357, __pyx_L1_error);
14272 __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
14273 __Pyx_GOTREF(__pyx_t_4);
14274 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14275 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14276 __pyx_v_nodes = __pyx_t_4;
14286 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elements);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 358, __pyx_L1_error)
14287 __Pyx_GOTREF(__pyx_t_4);
14288 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error)
14289 __Pyx_GOTREF(__pyx_t_3);
14290 __Pyx_INCREF(__pyx_v_field);
14291 __Pyx_GIVEREF(__pyx_v_field);
14292 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 358, __pyx_L1_error);
14293 __Pyx_INCREF(__pyx_v_value);
14294 __Pyx_GIVEREF(__pyx_v_value);
14295 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 358, __pyx_L1_error);
14296 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
14297 __Pyx_GOTREF(__pyx_t_1);
14298 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14299 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14300 __pyx_v_elements = __pyx_t_1;
14310 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_normals);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
14311 __Pyx_GOTREF(__pyx_t_1);
14312 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error)
14313 __Pyx_GOTREF(__pyx_t_3);
14314 __Pyx_INCREF(__pyx_v_field);
14315 __Pyx_GIVEREF(__pyx_v_field);
14316 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 359, __pyx_L1_error);
14317 __Pyx_INCREF(__pyx_v_value);
14318 __Pyx_GIVEREF(__pyx_v_value);
14319 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 359, __pyx_L1_error);
14320 __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error)
14321 __Pyx_GOTREF(__pyx_t_4);
14322 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14323 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14324 __pyx_v_normals = __pyx_t_4;
14334 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_normal_indices);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 360, __pyx_L1_error)
14335 __Pyx_GOTREF(__pyx_t_4);
14336 __pyx_t_3 = PyTuple_New(2);
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
14337 __Pyx_GOTREF(__pyx_t_3);
14338 __Pyx_INCREF(__pyx_v_field);
14339 __Pyx_GIVEREF(__pyx_v_field);
14340 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 360, __pyx_L1_error);
14341 __Pyx_INCREF(__pyx_v_value);
14342 __Pyx_GIVEREF(__pyx_v_value);
14343 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 360, __pyx_L1_error);
14344 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
14345 __Pyx_GOTREF(__pyx_t_1);
14346 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14347 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14348 __pyx_v_normal_indices = __pyx_t_1;
14358 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_os);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
14359 __Pyx_GOTREF(__pyx_t_4);
14360 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_path);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L1_error)
14361 __Pyx_GOTREF(__pyx_t_5);
14362 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14363 __pyx_t_3 = __pyx_t_5;
14364 __Pyx_INCREF(__pyx_t_3);
14365 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Profiling);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
14366 __Pyx_GOTREF(__pyx_t_4);
14367 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_logDir);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
14368 __Pyx_GOTREF(__pyx_t_6);
14369 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14370 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_fileprefix);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
14371 __Pyx_GOTREF(__pyx_t_4);
14372 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
14373 __Pyx_GOTREF(__pyx_t_9);
14374 __pyx_t_8 = __pyx_t_9;
14375 __Pyx_INCREF(__pyx_t_8);
14378 PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
14379 __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_rank, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
14380 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14381 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14382 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 361, __pyx_L1_error)
14383 __Pyx_GOTREF(__pyx_t_7);
14385 __pyx_t_9 = __Pyx_PyObject_Unicode(__pyx_t_7);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
14386 __Pyx_GOTREF(__pyx_t_9);
14387 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14388 __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_9);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 361, __pyx_L1_error)
14389 __Pyx_GOTREF(__pyx_t_7);
14390 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14391 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14392 __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_h5_2);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error)
14393 __Pyx_GOTREF(__pyx_t_9);
14394 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14397 PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_9};
14398 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_join, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
14399 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14400 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14401 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14402 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14403 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
14404 __Pyx_GOTREF(__pyx_t_1);
14406 __pyx_v_filename = __pyx_t_1;
14416 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
14417 __Pyx_GOTREF(__pyx_t_1);
14418 __pyx_t_11 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, 0, 0));
if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 362, __pyx_L1_error)
14419 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14430 __pyx_t_5 = __pyx_v_h5py;
14431 __Pyx_INCREF(__pyx_t_5);
14434 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_filename, __pyx_mstate_global->__pyx_n_u_w};
14435 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_File, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
14436 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14437 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
14438 __Pyx_GOTREF(__pyx_t_1);
14440 __pyx_v_f = __pyx_t_1;
14461 __pyx_t_5 = __pyx_v_h5py;
14462 __Pyx_INCREF(__pyx_t_5);
14465 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_filename, __pyx_mstate_global->__pyx_n_u_a};
14466 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_File, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
14467 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14468 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
14469 __Pyx_GOTREF(__pyx_t_1);
14471 __pyx_v_f = __pyx_t_1;
14483 __pyx_t_5 = __pyx_v_f;
14484 __Pyx_INCREF(__pyx_t_5);
14485 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 366, __pyx_L1_error)
14486 __Pyx_GOTREF(__pyx_t_9);
14487 __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_t_9);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 366, __pyx_L1_error)
14488 __Pyx_GOTREF(__pyx_t_6);
14489 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14490 __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_n_u_nodes, __pyx_t_6);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 366, __pyx_L1_error)
14491 __Pyx_GOTREF(__pyx_t_9);
14492 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14495 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_9, __pyx_v_nodes};
14496 #if CYTHON_VECTORCALL
14497 __pyx_t_6 = __pyx_mstate_global->__pyx_tuple[3];
14498 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 366, __pyx_L1_error)
14499 __Pyx_INCREF(__pyx_t_6);
14502 PyObject *__pyx_temp[1] = {__pyx_mstate_global->__pyx_n_u_data};
14503 __pyx_t_6 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+2, 1);
14504 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 366, __pyx_L1_error)
14505 __Pyx_GOTREF(__pyx_t_6);
14508 __pyx_t_1 = __Pyx_Object_VectorcallMethodKwds((PyObject*)__pyx_mstate_global->__pyx_n_u_create_dataset, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
14509 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14510 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14511 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14512 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
14513 __Pyx_GOTREF(__pyx_t_1);
14515 __pyx_v_dset = __pyx_t_1;
14525 __pyx_t_6 = __pyx_v_f;
14526 __Pyx_INCREF(__pyx_t_6);
14527 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 367, __pyx_L1_error)
14528 __Pyx_GOTREF(__pyx_t_9);
14529 __pyx_t_5 = __Pyx_PyObject_Unicode(__pyx_t_9);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 367, __pyx_L1_error)
14530 __Pyx_GOTREF(__pyx_t_5);
14531 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14532 __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_n_u_elems, __pyx_t_5);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 367, __pyx_L1_error)
14533 __Pyx_GOTREF(__pyx_t_9);
14534 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14537 PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_9, __pyx_v_elements};
14538 #if CYTHON_VECTORCALL
14539 __pyx_t_5 = __pyx_mstate_global->__pyx_tuple[3];
14540 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 367, __pyx_L1_error)
14541 __Pyx_INCREF(__pyx_t_5);
14544 PyObject *__pyx_temp[1] = {__pyx_mstate_global->__pyx_n_u_data};
14545 __pyx_t_5 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+2, 1);
14546 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 367, __pyx_L1_error)
14547 __Pyx_GOTREF(__pyx_t_5);
14550 __pyx_t_1 = __Pyx_Object_VectorcallMethodKwds((PyObject*)__pyx_mstate_global->__pyx_n_u_create_dataset, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
14551 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14552 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14553 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14554 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
14555 __Pyx_GOTREF(__pyx_t_1);
14557 __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_1);
14567 __pyx_t_5 = __pyx_v_f;
14568 __Pyx_INCREF(__pyx_t_5);
14569 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 368, __pyx_L1_error)
14570 __Pyx_GOTREF(__pyx_t_9);
14571 __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_t_9);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error)
14572 __Pyx_GOTREF(__pyx_t_6);
14573 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14574 __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_n_u_normals, __pyx_t_6);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 368, __pyx_L1_error)
14575 __Pyx_GOTREF(__pyx_t_9);
14576 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14579 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_9, __pyx_v_normals};
14580 #if CYTHON_VECTORCALL
14581 __pyx_t_6 = __pyx_mstate_global->__pyx_tuple[3];
14582 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error)
14583 __Pyx_INCREF(__pyx_t_6);
14586 PyObject *__pyx_temp[1] = {__pyx_mstate_global->__pyx_n_u_data};
14587 __pyx_t_6 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+2, 1);
14588 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error)
14589 __Pyx_GOTREF(__pyx_t_6);
14592 __pyx_t_1 = __Pyx_Object_VectorcallMethodKwds((PyObject*)__pyx_mstate_global->__pyx_n_u_create_dataset, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
14593 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14594 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14595 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14596 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
14597 __Pyx_GOTREF(__pyx_t_1);
14599 __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_1);
14609 __pyx_t_6 = __pyx_v_f;
14610 __Pyx_INCREF(__pyx_t_6);
14611 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 369, __pyx_L1_error)
14612 __Pyx_GOTREF(__pyx_t_9);
14613 __pyx_t_5 = __Pyx_PyObject_Unicode(__pyx_t_9);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error)
14614 __Pyx_GOTREF(__pyx_t_5);
14615 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14616 __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_n_u_normal_indices, __pyx_t_5);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 369, __pyx_L1_error)
14617 __Pyx_GOTREF(__pyx_t_9);
14618 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14621 PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_9, __pyx_v_normal_indices};
14622 #if CYTHON_VECTORCALL
14623 __pyx_t_5 = __pyx_mstate_global->__pyx_tuple[3];
14624 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error)
14625 __Pyx_INCREF(__pyx_t_5);
14628 PyObject *__pyx_temp[1] = {__pyx_mstate_global->__pyx_n_u_data};
14629 __pyx_t_5 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+2, 1);
14630 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error)
14631 __Pyx_GOTREF(__pyx_t_5);
14634 __pyx_t_1 = __Pyx_Object_VectorcallMethodKwds((PyObject*)__pyx_mstate_global->__pyx_n_u_create_dataset, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
14635 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14636 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14637 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14638 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
14639 __Pyx_GOTREF(__pyx_t_1);
14641 __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_1);
14651 __pyx_t_5 = __pyx_v_f;
14652 __Pyx_INCREF(__pyx_t_5);
14655 PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
14656 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
14657 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14658 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)
14659 __Pyx_GOTREF(__pyx_t_1);
14661 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14672 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14675 __Pyx_XDECREF(__pyx_t_1);
14676 __Pyx_XDECREF(__pyx_t_3);
14677 __Pyx_XDECREF(__pyx_t_4);
14678 __Pyx_XDECREF(__pyx_t_5);
14679 __Pyx_XDECREF(__pyx_t_6);
14680 __Pyx_XDECREF(__pyx_t_7);
14681 __Pyx_XDECREF(__pyx_t_8);
14682 __Pyx_XDECREF(__pyx_t_9);
14683 __Pyx_AddTraceback(
"Isosurface.Isosurface.writeIsosurfaceMesh_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
14686 __Pyx_XDECREF(__pyx_v_h5py);
14687 __Pyx_XDECREF(__pyx_v_nodes);
14688 __Pyx_XDECREF(__pyx_v_elements);
14689 __Pyx_XDECREF(__pyx_v_normals);
14690 __Pyx_XDECREF(__pyx_v_normal_indices);
14691 __Pyx_XDECREF(__pyx_v_filename);
14692 __Pyx_XDECREF(__pyx_v_f);
14693 __Pyx_XDECREF(__pyx_v_dset);
14694 __Pyx_XGIVEREF(__pyx_r);
14695 __Pyx_RefNannyFinishContext();
14708static PyObject *__pyx_pw_10Isosurface_10Isosurface_13writeIsosurfaceMesh_povray(PyObject *__pyx_self,
14709#
if CYTHON_VECTORCALL
14710PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14712PyObject *__pyx_args, PyObject *__pyx_kwds
14715PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface_12writeIsosurfaceMesh_povray,
"Isosurface.writeIsosurfaceMesh_povray(self, field, value, frame)\n\nWrite the triangular mesh to a povray file");
14716static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_13writeIsosurfaceMesh_povray = {
"writeIsosurfaceMesh_povray", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_13writeIsosurfaceMesh_povray, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface_12writeIsosurfaceMesh_povray};
14717static PyObject *__pyx_pw_10Isosurface_10Isosurface_13writeIsosurfaceMesh_povray(PyObject *__pyx_self,
14718#
if CYTHON_VECTORCALL
14719PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
14721PyObject *__pyx_args, PyObject *__pyx_kwds
14724 PyObject *__pyx_v_self = 0;
14725 PyObject *__pyx_v_field = 0;
14726 PyObject *__pyx_v_value = 0;
14727 CYTHON_UNUSED PyObject *__pyx_v_frame = 0;
14728 #if !CYTHON_VECTORCALL
14729 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
14731 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
14732 PyObject* values[4] = {0,0,0,0};
14733 int __pyx_lineno = 0;
14734 const char *__pyx_filename = NULL;
14735 int __pyx_clineno = 0;
14736 PyObject *__pyx_r = 0;
14737 __Pyx_RefNannyDeclarations
14738 __Pyx_RefNannySetupContext(
"writeIsosurfaceMesh_povray (wrapper)", 0);
14739 #if !CYTHON_VECTORCALL
14740 #if CYTHON_ASSUME_SAFE_SIZE
14741 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
14743 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
14746 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
14748 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_field,&__pyx_mstate_global->__pyx_n_u_value,&__pyx_mstate_global->__pyx_n_u_frame,0};
14749 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
14750 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 372, __pyx_L3_error)
14751 if (__pyx_kwds_len > 0) {
14752 switch (__pyx_nargs) {
14754 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
14755 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 372, __pyx_L3_error)
14756 CYTHON_FALLTHROUGH;
14758 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
14759 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 372, __pyx_L3_error)
14760 CYTHON_FALLTHROUGH;
14762 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
14763 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 372, __pyx_L3_error)
14764 CYTHON_FALLTHROUGH;
14766 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
14767 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 372, __pyx_L3_error)
14768 CYTHON_FALLTHROUGH;
14770 default:
goto __pyx_L5_argtuple_error;
14772 const Py_ssize_t kwd_pos_args = __pyx_nargs;
14773 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"writeIsosurfaceMesh_povray", 0) < (0)) __PYX_ERR(0, 372, __pyx_L3_error)
14774 for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
14775 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"writeIsosurfaceMesh_povray", 1, 4, 4, i); __PYX_ERR(0, 372, __pyx_L3_error) }
14777 }
else if (unlikely(__pyx_nargs != 4)) {
14778 goto __pyx_L5_argtuple_error;
14780 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
14781 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 372, __pyx_L3_error)
14782 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
14783 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 372, __pyx_L3_error)
14784 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
14785 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 372, __pyx_L3_error)
14786 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
14787 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 372, __pyx_L3_error)
14789 __pyx_v_self = values[0];
14790 __pyx_v_field = values[1];
14791 __pyx_v_value = values[2];
14792 __pyx_v_frame = values[3];
14794 goto __pyx_L6_skip;
14795 __pyx_L5_argtuple_error:;
14796 __Pyx_RaiseArgtupleInvalid(
"writeIsosurfaceMesh_povray", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 372, __pyx_L3_error)
14798 goto __pyx_L4_argument_unpacking_done;
14800 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
14801 Py_XDECREF(values[__pyx_temp]);
14803 __Pyx_AddTraceback(
"Isosurface.Isosurface.writeIsosurfaceMesh_povray", __pyx_clineno, __pyx_lineno, __pyx_filename);
14804 __Pyx_RefNannyFinishContext();
14806 __pyx_L4_argument_unpacking_done:;
14807 __pyx_r = __pyx_pf_10Isosurface_10Isosurface_12writeIsosurfaceMesh_povray(__pyx_self, __pyx_v_self, __pyx_v_field, __pyx_v_value, __pyx_v_frame);
14810 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
14811 Py_XDECREF(values[__pyx_temp]);
14813 __Pyx_RefNannyFinishContext();
14817static PyObject *__pyx_pf_10Isosurface_10Isosurface_12writeIsosurfaceMesh_povray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_frame) {
14818 PyObject *__pyx_v_Template = NULL;
14819 PyObject *__pyx_v_nodes = NULL;
14820 PyObject *__pyx_v_elements = NULL;
14821 PyObject *__pyx_v_normals = NULL;
14822 PyObject *__pyx_v_normal_indices = NULL;
14823 PyObject *__pyx_v_pov_filename = NULL;
14824 PyObject *__pyx_v_pov = NULL;
14825 PyObject *__pyx_v_dx = NULL;
14826 PyObject *__pyx_v_nll = NULL;
14827 PyObject *__pyx_v_fur = NULL;
14828 PyObject *__pyx_v_povScene = NULL;
14829 PyObject *__pyx_v_n = NULL;
14830 PyObject *__pyx_v_ebN = NULL;
14831 PyObject *__pyx_v_bnt = NULL;
14832 PyObject *__pyx_v_e = NULL;
14833 PyObject *__pyx_v_ni = NULL;
14834 PyObject *__pyx_8genexpr9__pyx_v_n = NULL;
14835 PyObject *__pyx_r = NULL;
14836 __Pyx_RefNannyDeclarations
14837 PyObject *__pyx_t_1 = NULL;
14838 PyObject *__pyx_t_2 = NULL;
14839 Py_ssize_t __pyx_t_3;
14840 PyObject *__pyx_t_4 = NULL;
14841 PyObject *__pyx_t_5 = NULL;
14843 PyObject *__pyx_t_7 = NULL;
14845 PyObject *__pyx_t_9 = NULL;
14847 PyObject *__pyx_t_11 = NULL;
14848 PyObject *__pyx_t_12 = NULL;
14849 PyObject *__pyx_t_13 = NULL;
14850 PyObject *__pyx_t_14 = NULL;
14851 PyObject *__pyx_t_15 = NULL;
14852 PyObject *__pyx_t_16 = NULL;
14853 PyObject *__pyx_t_17 = NULL;
14854 PyObject *__pyx_t_18 = NULL;
14855 PyObject *__pyx_t_19 = NULL;
14856 PyObject *__pyx_t_20 = NULL;
14857 PyObject *__pyx_t_21 = NULL;
14858 PyObject *__pyx_t_22 = NULL;
14859 PyObject *__pyx_t_23 = NULL;
14860 PyObject *(*__pyx_t_24)(PyObject *);
14861 Py_ssize_t __pyx_t_25;
14862 PyObject *(*__pyx_t_26)(PyObject *);
14863 int __pyx_lineno = 0;
14864 const char *__pyx_filename = NULL;
14865 int __pyx_clineno = 0;
14866 __Pyx_RefNannySetupContext(
"writeIsosurfaceMesh_povray", 0);
14876 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Template};
14877 __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_string, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
14879 __pyx_t_1 = __pyx_t_2;
14880 __Pyx_GOTREF(__pyx_t_1);
14882 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Template};
14884 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error)
14885 __Pyx_GOTREF(__pyx_t_4);
14886 switch (__pyx_t_3) {
14888 __Pyx_INCREF(__pyx_t_4);
14889 __pyx_v_Template = __pyx_t_4;
14893 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14896 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14905 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodes);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
14906 __Pyx_GOTREF(__pyx_t_1);
14907 __pyx_t_4 = PyTuple_New(2);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
14908 __Pyx_GOTREF(__pyx_t_4);
14909 __Pyx_INCREF(__pyx_v_field);
14910 __Pyx_GIVEREF(__pyx_v_field);
14911 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 377, __pyx_L1_error);
14912 __Pyx_INCREF(__pyx_v_value);
14913 __Pyx_GIVEREF(__pyx_v_value);
14914 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 377, __pyx_L1_error);
14915 __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_4);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
14916 __Pyx_GOTREF(__pyx_t_5);
14917 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14918 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14919 __pyx_v_nodes = __pyx_t_5;
14929 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elements);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 378, __pyx_L1_error)
14930 __Pyx_GOTREF(__pyx_t_5);
14931 __pyx_t_4 = PyTuple_New(2);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error)
14932 __Pyx_GOTREF(__pyx_t_4);
14933 __Pyx_INCREF(__pyx_v_field);
14934 __Pyx_GIVEREF(__pyx_v_field);
14935 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 378, __pyx_L1_error);
14936 __Pyx_INCREF(__pyx_v_value);
14937 __Pyx_GIVEREF(__pyx_v_value);
14938 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 378, __pyx_L1_error);
14939 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_4);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
14940 __Pyx_GOTREF(__pyx_t_1);
14941 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14942 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14943 __pyx_v_elements = __pyx_t_1;
14953 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_normals);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
14954 __Pyx_GOTREF(__pyx_t_1);
14955 __pyx_t_4 = PyTuple_New(2);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error)
14956 __Pyx_GOTREF(__pyx_t_4);
14957 __Pyx_INCREF(__pyx_v_field);
14958 __Pyx_GIVEREF(__pyx_v_field);
14959 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 379, __pyx_L1_error);
14960 __Pyx_INCREF(__pyx_v_value);
14961 __Pyx_GIVEREF(__pyx_v_value);
14962 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 379, __pyx_L1_error);
14963 __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_4);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L1_error)
14964 __Pyx_GOTREF(__pyx_t_5);
14965 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14966 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14967 __pyx_v_normals = __pyx_t_5;
14977 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_normal_indices);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 380, __pyx_L1_error)
14978 __Pyx_GOTREF(__pyx_t_5);
14979 __pyx_t_4 = PyTuple_New(2);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)
14980 __Pyx_GOTREF(__pyx_t_4);
14981 __Pyx_INCREF(__pyx_v_field);
14982 __Pyx_GIVEREF(__pyx_v_field);
14983 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_field) != (0)) __PYX_ERR(0, 380, __pyx_L1_error);
14984 __Pyx_INCREF(__pyx_v_value);
14985 __Pyx_GIVEREF(__pyx_v_value);
14986 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value) != (0)) __PYX_ERR(0, 380, __pyx_L1_error);
14987 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_4);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
14988 __Pyx_GOTREF(__pyx_t_1);
14989 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14990 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14991 __pyx_v_normal_indices = __pyx_t_1;
15001 __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_field_s___value_f___frame_04d_p;
15002 __Pyx_INCREF(__pyx_t_4);
15011 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error)
15012 __Pyx_GOTREF(__pyx_t_5);
15015 PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_field, __pyx_v_value, __pyx_t_5};
15016 #if CYTHON_VECTORCALL
15017 __pyx_t_7 = __pyx_mstate_global->__pyx_tuple[4];
15018 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 381, __pyx_L1_error)
15019 __Pyx_INCREF(__pyx_t_7);
15022 PyObject *__pyx_temp[3] = {__pyx_mstate_global->__pyx_n_u_field, __pyx_mstate_global->__pyx_n_u_value, __pyx_mstate_global->__pyx_n_u_frame};
15023 __pyx_t_7 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+1, 3);
15024 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 381, __pyx_L1_error)
15025 __Pyx_GOTREF(__pyx_t_7);
15028 __pyx_t_1 = __Pyx_Object_VectorcallMethodKwds((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
15029 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15030 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15031 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15032 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
15033 __Pyx_GOTREF(__pyx_t_1);
15043 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_1))) __PYX_ERR(0, 381, __pyx_L1_error)
15044 __pyx_v_pov_filename = ((PyObject*)__pyx_t_1);
15054 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 385, __pyx_L1_error)
15055 __Pyx_GOTREF(__pyx_t_5);
15056 __pyx_t_7 = __pyx_t_5;
15057 __Pyx_INCREF(__pyx_t_7);
15060 PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
15061 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_beginSequential, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15062 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15063 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15064 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
15065 __Pyx_GOTREF(__pyx_t_1);
15067 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15076 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
15077 __Pyx_GOTREF(__pyx_t_7);
15078 __pyx_t_5 = __pyx_t_7;
15079 __Pyx_INCREF(__pyx_t_5);
15082 PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
15083 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isMaster, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15084 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15085 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15086 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
15087 __Pyx_GOTREF(__pyx_t_1);
15089 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1);
if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 386, __pyx_L1_error)
15090 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15104 PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_pov_filename, __pyx_mstate_global->__pyx_n_u_w};
15105 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_open, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15106 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15107 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
15108 __Pyx_GOTREF(__pyx_t_1);
15110 __pyx_v_pov = __pyx_t_1;
15121 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 388, __pyx_L1_error)
15122 __Pyx_GOTREF(__pyx_t_5);
15123 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_array);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error)
15124 __Pyx_GOTREF(__pyx_t_4);
15125 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15126 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 388, __pyx_L1_error)
15127 __Pyx_GOTREF(__pyx_t_5);
15128 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 388, __pyx_L1_error)
15129 __Pyx_GOTREF(__pyx_t_9);
15130 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15132 #if CYTHON_UNPACK_METHODS
15133 if (unlikely(PyMethod_Check(__pyx_t_4))) {
15134 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
15136 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
15137 __Pyx_INCREF(__pyx_t_7);
15138 __Pyx_INCREF(__pyx__function);
15139 __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
15144 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
15145 __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15146 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15147 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15148 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15149 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
15150 __Pyx_GOTREF(__pyx_t_1);
15152 __pyx_t_4 = __Pyx_PyNumber_Multiply_object_float(__pyx_t_1, __pyx_mstate_global->__pyx_float_0_02);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error)
15153 __Pyx_GOTREF(__pyx_t_4);
15154 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15155 __pyx_v_dx = __pyx_t_4;
15166 __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_np);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 389, __pyx_L1_error)
15167 __Pyx_GOTREF(__pyx_t_9);
15168 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_array);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error)
15169 __Pyx_GOTREF(__pyx_t_7);
15170 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15171 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 389, __pyx_L1_error)
15172 __Pyx_GOTREF(__pyx_t_9);
15173 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error)
15174 __Pyx_GOTREF(__pyx_t_5);
15175 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15177 #if CYTHON_UNPACK_METHODS
15178 if (unlikely(PyMethod_Check(__pyx_t_7))) {
15179 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
15181 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
15182 __Pyx_INCREF(__pyx_t_1);
15183 __Pyx_INCREF(__pyx__function);
15184 __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
15189 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5};
15190 __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15191 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15192 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15193 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15194 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error)
15195 __Pyx_GOTREF(__pyx_t_4);
15197 __pyx_t_7 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_4, __pyx_v_dx);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error)
15198 __Pyx_GOTREF(__pyx_t_7);
15199 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15200 __pyx_v_nll = __pyx_t_7;
15211 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error)
15212 __Pyx_GOTREF(__pyx_t_5);
15213 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_array);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
15214 __Pyx_GOTREF(__pyx_t_1);
15215 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15216 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 390, __pyx_L1_error)
15217 __Pyx_GOTREF(__pyx_t_5);
15218 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 390, __pyx_L1_error)
15219 __Pyx_GOTREF(__pyx_t_9);
15220 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15222 #if CYTHON_UNPACK_METHODS
15223 if (unlikely(PyMethod_Check(__pyx_t_1))) {
15224 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
15226 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
15227 __Pyx_INCREF(__pyx_t_4);
15228 __Pyx_INCREF(__pyx__function);
15229 __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
15234 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
15235 __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15236 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15237 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15238 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15239 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 390, __pyx_L1_error)
15240 __Pyx_GOTREF(__pyx_t_7);
15242 __pyx_t_1 = __Pyx_PyNumber_Add_object_object(__pyx_t_7, __pyx_v_dx);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
15243 __Pyx_GOTREF(__pyx_t_1);
15244 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15245 __pyx_v_fur = __pyx_t_1;
15255 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
15256 __Pyx_GOTREF(__pyx_t_1);
15257 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 391, __pyx_L1_error)
15258 __Pyx_GOTREF(__pyx_t_7);
15259 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15260 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
15261 __Pyx_GOTREF(__pyx_t_1);
15262 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15263 __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_dx, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 391, __pyx_L1_error)
15264 __Pyx_GOTREF(__pyx_t_7);
15265 __pyx_t_9 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_7);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 391, __pyx_L1_error)
15266 __Pyx_GOTREF(__pyx_t_9);
15267 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15268 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15269 if (unlikely((__Pyx_SetItemInt(__pyx_v_fur, 2, __pyx_t_9,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 391, __pyx_L1_error)
15270 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15279 __pyx_t_7 = __pyx_v_pov;
15280 __Pyx_INCREF(__pyx_t_7);
15283 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_version_3_7_include_proteus_inc};
15284 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15285 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15286 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 392, __pyx_L1_error)
15287 __Pyx_GOTREF(__pyx_t_9);
15289 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15298 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_writeBoundary);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 395, __pyx_L1_error)
15299 __Pyx_GOTREF(__pyx_t_9);
15300 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9);
if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 395, __pyx_L1_error)
15301 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15302 __pyx_t_10 = (!__pyx_t_8);
15315 __pyx_t_7 = __pyx_v_pov;
15316 __Pyx_INCREF(__pyx_t_7);
15334 __Pyx_INCREF(__pyx_v_Template);
15335 __pyx_t_12 = __pyx_v_Template;
15337 #if CYTHON_UNPACK_METHODS
15338 if (unlikely(PyMethod_Check(__pyx_t_12))) {
15339 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
15340 assert(__pyx_t_11);
15341 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
15342 __Pyx_INCREF(__pyx_t_11);
15343 __Pyx_INCREF(__pyx__function);
15344 __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
15349 PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_object_difference_box_nll_x_nll};
15350 __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15351 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
15352 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
15353 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 396, __pyx_L1_error)
15354 __Pyx_GOTREF(__pyx_t_5);
15356 __pyx_t_4 = __pyx_t_5;
15357 __Pyx_INCREF(__pyx_t_4);
15366 __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_nll, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 416, __pyx_L1_error)
15367 __Pyx_GOTREF(__pyx_t_12);
15376 __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_nll, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 417, __pyx_L1_error)
15377 __Pyx_GOTREF(__pyx_t_11);
15386 __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_nll, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 418, __pyx_L1_error)
15387 __Pyx_GOTREF(__pyx_t_13);
15396 __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_fur, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 419, __pyx_L1_error)
15397 __Pyx_GOTREF(__pyx_t_14);
15406 __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_fur, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 420, __pyx_L1_error)
15407 __Pyx_GOTREF(__pyx_t_15);
15416 __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_fur, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 421, __pyx_L1_error)
15417 __Pyx_GOTREF(__pyx_t_16);
15426 __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 422, __pyx_L1_error)
15427 __Pyx_GOTREF(__pyx_t_17);
15428 __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 422, __pyx_L1_error)
15429 __Pyx_GOTREF(__pyx_t_18);
15430 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
15431 __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_18, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 422, __pyx_L1_error)
15432 __Pyx_GOTREF(__pyx_t_17);
15433 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
15442 __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 423, __pyx_L1_error)
15443 __Pyx_GOTREF(__pyx_t_18);
15444 __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 423, __pyx_L1_error)
15445 __Pyx_GOTREF(__pyx_t_19);
15446 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
15447 __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_19, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 423, __pyx_L1_error)
15448 __Pyx_GOTREF(__pyx_t_18);
15449 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
15458 __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 424, __pyx_L1_error)
15459 __Pyx_GOTREF(__pyx_t_19);
15460 __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 424, __pyx_L1_error)
15461 __Pyx_GOTREF(__pyx_t_20);
15462 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
15463 __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_20, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 424, __pyx_L1_error)
15464 __Pyx_GOTREF(__pyx_t_19);
15465 __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
15474 __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 425, __pyx_L1_error)
15475 __Pyx_GOTREF(__pyx_t_20);
15476 __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 425, __pyx_L1_error)
15477 __Pyx_GOTREF(__pyx_t_21);
15478 __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
15479 __pyx_t_20 = __Pyx_GetItemInt(__pyx_t_21, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 425, __pyx_L1_error)
15480 __Pyx_GOTREF(__pyx_t_20);
15481 __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
15490 __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 426, __pyx_L1_error)
15491 __Pyx_GOTREF(__pyx_t_21);
15492 __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 426, __pyx_L1_error)
15493 __Pyx_GOTREF(__pyx_t_22);
15494 __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
15495 __pyx_t_21 = __Pyx_GetItemInt(__pyx_t_22, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 426, __pyx_L1_error)
15496 __Pyx_GOTREF(__pyx_t_21);
15497 __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
15506 __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 427, __pyx_L1_error)
15507 __Pyx_GOTREF(__pyx_t_22);
15508 __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 427, __pyx_L1_error)
15509 __Pyx_GOTREF(__pyx_t_23);
15510 __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
15511 __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_23, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 427, __pyx_L1_error)
15512 __Pyx_GOTREF(__pyx_t_22);
15513 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
15516 PyObject *__pyx_callargs[13] = {__pyx_t_4, __pyx_t_12, __pyx_t_11, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22};
15517 #if CYTHON_VECTORCALL
15518 __pyx_t_23 = __pyx_mstate_global->__pyx_tuple[5];
15519 if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 416, __pyx_L1_error)
15520 __Pyx_INCREF(__pyx_t_23);
15523 PyObject *__pyx_temp[12] = {__pyx_mstate_global->__pyx_n_u_nll_x, __pyx_mstate_global->__pyx_n_u_nll_y, __pyx_mstate_global->__pyx_n_u_nll_z, __pyx_mstate_global->__pyx_n_u_fur_x, __pyx_mstate_global->__pyx_n_u_fur_y, __pyx_mstate_global->__pyx_n_u_fur_z, __pyx_mstate_global->__pyx_n_u_domain_nll_x, __pyx_mstate_global->__pyx_n_u_domain_nll_y, __pyx_mstate_global->__pyx_n_u_domain_nll_z, __pyx_mstate_global->__pyx_n_u_domain_fur_x, __pyx_mstate_global->__pyx_n_u_domain_fur_y, __pyx_mstate_global->__pyx_n_u_domain_fur_z};
15524 __pyx_t_23 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+1, 12);
15525 if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 416, __pyx_L1_error)
15526 __Pyx_GOTREF(__pyx_t_23);
15529 __pyx_t_1 = __Pyx_Object_VectorcallMethodKwds((PyObject*)__pyx_mstate_global->__pyx_n_u_substitute, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_23);
15530 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15531 __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
15532 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15533 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
15534 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15535 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15536 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
15537 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
15538 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
15539 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
15540 __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
15541 __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
15542 __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
15543 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
15544 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15545 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
15546 __Pyx_GOTREF(__pyx_t_1);
15550 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1};
15551 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15552 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15553 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15554 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 396, __pyx_L1_error)
15555 __Pyx_GOTREF(__pyx_t_9);
15557 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15566 __pyx_t_1 = __pyx_v_pov;
15567 __Pyx_INCREF(__pyx_t_1);
15570 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
15571 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flush, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15572 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15573 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 428, __pyx_L1_error)
15574 __Pyx_GOTREF(__pyx_t_9);
15576 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15594 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_writeBoundary);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 429, __pyx_L1_error)
15595 __Pyx_GOTREF(__pyx_t_9);
15596 __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 429, __pyx_L1_error)
15597 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15608 __pyx_t_1 = __pyx_v_pov;
15609 __Pyx_INCREF(__pyx_t_1);
15627 __Pyx_INCREF(__pyx_v_Template);
15628 __pyx_t_21 = __pyx_v_Template;
15630 #if CYTHON_UNPACK_METHODS
15631 if (unlikely(PyMethod_Check(__pyx_t_21))) {
15632 __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_21);
15633 assert(__pyx_t_22);
15634 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_21);
15635 __Pyx_INCREF(__pyx_t_22);
15636 __Pyx_INCREF(__pyx__function);
15637 __Pyx_DECREF_SET(__pyx_t_21, __pyx__function);
15642 PyObject *__pyx_callargs[2] = {__pyx_t_22, __pyx_mstate_global->__pyx_kp_u_object_difference_box_nll_x_nll_2};
15643 __pyx_t_23 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15644 __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
15645 __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
15646 if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 430, __pyx_L1_error)
15647 __Pyx_GOTREF(__pyx_t_23);
15649 __pyx_t_5 = __pyx_t_23;
15650 __Pyx_INCREF(__pyx_t_5);
15659 __pyx_t_21 = __Pyx_GetItemInt(__pyx_v_nll, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 441, __pyx_L1_error)
15660 __Pyx_GOTREF(__pyx_t_21);
15669 __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_nll, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 442, __pyx_L1_error)
15670 __Pyx_GOTREF(__pyx_t_22);
15679 __pyx_t_20 = __Pyx_GetItemInt(__pyx_v_nll, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 443, __pyx_L1_error)
15680 __Pyx_GOTREF(__pyx_t_20);
15689 __pyx_t_19 = __Pyx_GetItemInt(__pyx_v_fur, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 444, __pyx_L1_error)
15690 __Pyx_GOTREF(__pyx_t_19);
15699 __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_fur, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 445, __pyx_L1_error)
15700 __Pyx_GOTREF(__pyx_t_18);
15709 __pyx_t_17 = __Pyx_GetItemInt(__pyx_v_fur, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 446, __pyx_L1_error)
15710 __Pyx_GOTREF(__pyx_t_17);
15713 PyObject *__pyx_callargs[7] = {__pyx_t_5, __pyx_t_21, __pyx_t_22, __pyx_t_20, __pyx_t_19, __pyx_t_18, __pyx_t_17};
15714 #if CYTHON_VECTORCALL
15715 __pyx_t_16 = __pyx_mstate_global->__pyx_tuple[6];
15716 if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 441, __pyx_L1_error)
15717 __Pyx_INCREF(__pyx_t_16);
15720 PyObject *__pyx_temp[6] = {__pyx_mstate_global->__pyx_n_u_nll_x, __pyx_mstate_global->__pyx_n_u_nll_y, __pyx_mstate_global->__pyx_n_u_nll_z, __pyx_mstate_global->__pyx_n_u_fur_x, __pyx_mstate_global->__pyx_n_u_fur_y, __pyx_mstate_global->__pyx_n_u_fur_z};
15721 __pyx_t_16 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+1, 6);
15722 if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 441, __pyx_L1_error)
15723 __Pyx_GOTREF(__pyx_t_16);
15726 __pyx_t_7 = __Pyx_Object_VectorcallMethodKwds((PyObject*)__pyx_mstate_global->__pyx_n_u_substitute, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16);
15727 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15728 __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
15729 __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
15730 __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
15731 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
15732 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
15733 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
15734 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
15735 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
15736 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 441, __pyx_L1_error)
15737 __Pyx_GOTREF(__pyx_t_7);
15741 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_7};
15742 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15743 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15744 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15745 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 430, __pyx_L1_error)
15746 __Pyx_GOTREF(__pyx_t_9);
15748 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15766 __pyx_t_7 = __pyx_v_pov;
15767 __Pyx_INCREF(__pyx_t_7);
15770 PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
15771 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flush, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15772 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15773 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 447, __pyx_L1_error)
15774 __Pyx_GOTREF(__pyx_t_9);
15776 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15799 PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_pov_filename, __pyx_mstate_global->__pyx_n_u_a};
15800 __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_open, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15801 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15802 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 449, __pyx_L1_error)
15803 __Pyx_GOTREF(__pyx_t_9);
15805 __pyx_v_pov = __pyx_t_9;
15817 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_writeBoundary);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 450, __pyx_L1_error)
15818 __Pyx_GOTREF(__pyx_t_9);
15819 __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 450, __pyx_L1_error)
15820 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15831 __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_mesh2_vertex_vectors);
15832 __pyx_v_povScene = __pyx_mstate_global->__pyx_kp_u_mesh2_vertex_vectors;
15841 __pyx_t_7 = __pyx_v_pov;
15842 __Pyx_INCREF(__pyx_t_7);
15845 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_povScene};
15846 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15847 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15848 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L1_error)
15849 __Pyx_GOTREF(__pyx_t_9);
15851 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15860 __pyx_t_7 = __pyx_v_pov;
15861 __Pyx_INCREF(__pyx_t_7);
15862 __pyx_t_23 = __pyx_mstate_global->__pyx_kp_u_0_d;
15863 __Pyx_INCREF(__pyx_t_23);
15864 __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_boundaryNodes);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 454, __pyx_L1_error)
15865 __Pyx_GOTREF(__pyx_t_16);
15866 __pyx_t_3 = PyObject_Length(__pyx_t_16);
if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
15867 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
15868 __pyx_t_16 = PyLong_FromSsize_t(__pyx_t_3);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 454, __pyx_L1_error)
15869 __Pyx_GOTREF(__pyx_t_16);
15873 PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_t_16};
15874 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15875 __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
15876 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
15877 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
15878 __Pyx_GOTREF(__pyx_t_1);
15880 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_1))) __PYX_ERR(0, 454, __pyx_L1_error)
15883 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1};
15884 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15885 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15886 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15887 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 454, __pyx_L1_error)
15888 __Pyx_GOTREF(__pyx_t_9);
15890 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15899 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_boundaryNodes);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 455, __pyx_L1_error)
15900 __Pyx_GOTREF(__pyx_t_9);
15901 if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
15902 __pyx_t_1 = __pyx_t_9; __Pyx_INCREF(__pyx_t_1);
15906 __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_9);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
15907 __Pyx_GOTREF(__pyx_t_1);
15908 __pyx_t_24 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 455, __pyx_L1_error)
15910 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15912 if (likely(!__pyx_t_24)) {
15913 if (likely(PyList_CheckExact(__pyx_t_1))) {
15915 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
15916 #if !CYTHON_ASSUME_SAFE_SIZE
15917 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 455, __pyx_L1_error)
15919 if (__pyx_t_3 >= __pyx_temp)
break;
15921 __pyx_t_9 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
15925 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
15926 #if !CYTHON_ASSUME_SAFE_SIZE
15927 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 455, __pyx_L1_error)
15929 if (__pyx_t_3 >= __pyx_temp)
break;
15931 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15932 __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
15934 __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
15938 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 455, __pyx_L1_error)
15940 __pyx_t_9 = __pyx_t_24(__pyx_t_1);
15941 if (unlikely(!__pyx_t_9)) {
15942 PyObject* exc_type = PyErr_Occurred();
15944 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 455, __pyx_L1_error)
15950 __Pyx_GOTREF(__pyx_t_9);
15951 __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_9);
15961 __pyx_t_7 = __pyx_v_pov;
15962 __Pyx_INCREF(__pyx_t_7);
15963 __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_mstate_global->__pyx_kp_u_0_f_1_f_2_f, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 456, __pyx_L1_error)
15964 __Pyx_GOTREF(__pyx_t_16);
15973 __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nodeArray);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 457, __pyx_L1_error)
15974 __Pyx_GOTREF(__pyx_t_23);
15975 __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_t_23, __pyx_v_n);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 457, __pyx_L1_error)
15976 __Pyx_GOTREF(__pyx_t_17);
15977 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
15986 __pyx_t_23 = __Pyx_PySequence_Tuple(__pyx_t_17);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 456, __pyx_L1_error)
15987 __Pyx_GOTREF(__pyx_t_23);
15988 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
15989 __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_23, NULL);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 456, __pyx_L1_error)
15990 __Pyx_GOTREF(__pyx_t_17);
15991 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
15992 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
15993 if (!(likely(PyUnicode_CheckExact(__pyx_t_17)) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_17))) __PYX_ERR(0, 456, __pyx_L1_error)
15996 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_17};
15997 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
15998 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15999 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16000 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 456, __pyx_L1_error)
16001 __Pyx_GOTREF(__pyx_t_9);
16003 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16013 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16022 __pyx_t_9 = __pyx_v_pov;
16023 __Pyx_INCREF(__pyx_t_9);
16026 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__4};
16027 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16028 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16029 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
16030 __Pyx_GOTREF(__pyx_t_1);
16032 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16041 __pyx_t_9 = __pyx_v_pov;
16042 __Pyx_INCREF(__pyx_t_9);
16045 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_face_indices};
16046 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16047 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16048 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
16049 __Pyx_GOTREF(__pyx_t_1);
16051 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16060 __pyx_t_9 = __pyx_v_pov;
16061 __Pyx_INCREF(__pyx_t_9);
16062 __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_0_d;
16063 __Pyx_INCREF(__pyx_t_7);
16073 __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_np);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 462, __pyx_L1_error)
16074 __Pyx_GOTREF(__pyx_t_18);
16075 __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_count_nonzero);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 462, __pyx_L1_error)
16076 __Pyx_GOTREF(__pyx_t_19);
16077 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
16078 __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementBoundaryMaterialTypes);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 462, __pyx_L1_error)
16079 __Pyx_GOTREF(__pyx_t_18);
16081 #if CYTHON_UNPACK_METHODS
16082 if (unlikely(PyMethod_Check(__pyx_t_19))) {
16083 __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_19);
16084 assert(__pyx_t_16);
16085 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_19);
16086 __Pyx_INCREF(__pyx_t_16);
16087 __Pyx_INCREF(__pyx__function);
16088 __Pyx_DECREF_SET(__pyx_t_19, __pyx__function);
16093 PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_18};
16094 __pyx_t_23 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16095 __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
16096 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
16097 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
16098 if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 462, __pyx_L1_error)
16099 __Pyx_GOTREF(__pyx_t_23);
16103 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_23};
16104 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16105 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16106 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16107 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 461, __pyx_L1_error)
16108 __Pyx_GOTREF(__pyx_t_17);
16118 if (!(likely(PyUnicode_CheckExact(__pyx_t_17))||((__pyx_t_17) == Py_None) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_17))) __PYX_ERR(0, 461, __pyx_L1_error)
16121 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_17};
16122 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16123 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16124 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16125 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
16126 __Pyx_GOTREF(__pyx_t_1);
16128 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16137 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exteriorElementBoundariesArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
16138 __Pyx_GOTREF(__pyx_t_1);
16139 if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
16140 __pyx_t_17 = __pyx_t_1; __Pyx_INCREF(__pyx_t_17);
16144 __pyx_t_3 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_t_1);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 463, __pyx_L1_error)
16145 __Pyx_GOTREF(__pyx_t_17);
16146 __pyx_t_24 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_17);
if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 463, __pyx_L1_error)
16148 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16150 if (likely(!__pyx_t_24)) {
16151 if (likely(PyList_CheckExact(__pyx_t_17))) {
16153 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_17);
16154 #if !CYTHON_ASSUME_SAFE_SIZE
16155 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 463, __pyx_L1_error)
16157 if (__pyx_t_3 >= __pyx_temp)
break;
16159 __pyx_t_1 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_17, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
16163 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_17);
16164 #if !CYTHON_ASSUME_SAFE_SIZE
16165 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 463, __pyx_L1_error)
16167 if (__pyx_t_3 >= __pyx_temp)
break;
16169 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16170 __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_3));
16172 __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_3);
16176 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
16178 __pyx_t_1 = __pyx_t_24(__pyx_t_17);
16179 if (unlikely(!__pyx_t_1)) {
16180 PyObject* exc_type = PyErr_Occurred();
16182 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 463, __pyx_L1_error)
16188 __Pyx_GOTREF(__pyx_t_1);
16189 __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_1);
16199 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementBoundaryMaterialTypes);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
16200 __Pyx_GOTREF(__pyx_t_1);
16201 __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ebN);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 464, __pyx_L1_error)
16202 __Pyx_GOTREF(__pyx_t_9);
16203 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16204 __pyx_t_10 = __Pyx_PyObject_CompareBoolGt_object_int(__pyx_t_9, __pyx_mstate_global->__pyx_int_0, Py_GT);
if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 464, __pyx_L1_error)
16205 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16225 __pyx_t_9 = PyList_New(0);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 466, __pyx_L15_error)
16226 __Pyx_GOTREF(__pyx_t_9);
16235 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementBoundaryNodesArray);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L15_error)
16236 __Pyx_GOTREF(__pyx_t_1);
16237 __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ebN);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 467, __pyx_L15_error)
16238 __Pyx_GOTREF(__pyx_t_23);
16239 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16240 if (likely(PyList_CheckExact(__pyx_t_23)) || PyTuple_CheckExact(__pyx_t_23)) {
16241 __pyx_t_1 = __pyx_t_23; __Pyx_INCREF(__pyx_t_1);
16245 __pyx_t_25 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_23);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L15_error)
16246 __Pyx_GOTREF(__pyx_t_1);
16247 __pyx_t_26 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 467, __pyx_L15_error)
16249 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16251 if (likely(!__pyx_t_26)) {
16252 if (likely(PyList_CheckExact(__pyx_t_1))) {
16254 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
16255 #if !CYTHON_ASSUME_SAFE_SIZE
16256 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 467, __pyx_L15_error)
16258 if (__pyx_t_25 >= __pyx_temp)
break;
16260 __pyx_t_23 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_1, __pyx_t_25, __Pyx_ReferenceSharing_OwnStrongReference);
16264 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
16265 #if !CYTHON_ASSUME_SAFE_SIZE
16266 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 467, __pyx_L15_error)
16268 if (__pyx_t_25 >= __pyx_temp)
break;
16270 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16271 __pyx_t_23 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_25));
16273 __pyx_t_23 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_25);
16277 if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 467, __pyx_L15_error)
16279 __pyx_t_23 = __pyx_t_26(__pyx_t_1);
16280 if (unlikely(!__pyx_t_23)) {
16281 PyObject* exc_type = PyErr_Occurred();
16283 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 467, __pyx_L15_error)
16289 __Pyx_GOTREF(__pyx_t_23);
16290 __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_n, __pyx_t_23);
16300 __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_g2b);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 466, __pyx_L15_error)
16301 __Pyx_GOTREF(__pyx_t_23);
16302 __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_23, __pyx_8genexpr9__pyx_v_n);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 466, __pyx_L15_error)
16303 __Pyx_GOTREF(__pyx_t_7);
16304 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16305 __Pyx_GIVEREF(__pyx_t_7);
16306 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_9, __pyx_t_7))) __PYX_ERR(0, 466, __pyx_L15_error)
16309 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16310 __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_n); __pyx_8genexpr9__pyx_v_n = 0;
16311 goto __pyx_L19_exit_scope;
16313 __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_n); __pyx_8genexpr9__pyx_v_n = 0;
16314 goto __pyx_L1_error;
16315 __pyx_L19_exit_scope:;
16325 __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_9));
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
16326 __Pyx_GOTREF(__pyx_t_1);
16327 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16328 __Pyx_XDECREF_SET(__pyx_v_bnt, ((PyObject*)__pyx_t_1));
16338 __pyx_t_9 = __pyx_v_pov;
16339 __Pyx_INCREF(__pyx_t_9);
16340 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_mstate_global->__pyx_kp_u_0_d_1_d_2_d, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 468, __pyx_L1_error)
16341 __Pyx_GOTREF(__pyx_t_7);
16342 __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_v_bnt, NULL);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 468, __pyx_L1_error)
16343 __Pyx_GOTREF(__pyx_t_23);
16344 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16345 if (!(likely(PyUnicode_CheckExact(__pyx_t_23)) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_23))) __PYX_ERR(0, 468, __pyx_L1_error)
16348 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_23};
16349 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16350 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16351 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16352 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
16353 __Pyx_GOTREF(__pyx_t_1);
16355 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16374 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16383 __pyx_t_1 = __pyx_v_pov;
16384 __Pyx_INCREF(__pyx_t_1);
16387 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u__4};
16388 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16389 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16390 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 469, __pyx_L1_error)
16391 __Pyx_GOTREF(__pyx_t_17);
16393 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16402 __pyx_t_1 = __pyx_v_pov;
16403 __Pyx_INCREF(__pyx_t_1);
16406 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_inside_vector_on_mesh};
16407 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16408 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16409 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 470, __pyx_L1_error)
16410 __Pyx_GOTREF(__pyx_t_17);
16412 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16421 __pyx_t_1 = __pyx_v_pov;
16422 __Pyx_INCREF(__pyx_t_1);
16425 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
16426 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flush, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16427 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16428 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 471, __pyx_L1_error)
16429 __Pyx_GOTREF(__pyx_t_17);
16431 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16440 __pyx_t_1 = __pyx_v_pov;
16441 __Pyx_INCREF(__pyx_t_1);
16444 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
16445 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16446 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16447 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 472, __pyx_L1_error)
16448 __Pyx_GOTREF(__pyx_t_17);
16450 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16459 __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 473, __pyx_L1_error)
16460 __Pyx_GOTREF(__pyx_t_23);
16461 __pyx_t_1 = __pyx_t_23;
16462 __Pyx_INCREF(__pyx_t_1);
16465 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
16466 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_endSequential, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16467 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16468 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16469 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 473, __pyx_L1_error)
16470 __Pyx_GOTREF(__pyx_t_17);
16472 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16481 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
16482 __Pyx_GOTREF(__pyx_t_1);
16483 __pyx_t_23 = __pyx_t_1;
16484 __Pyx_INCREF(__pyx_t_23);
16487 PyObject *__pyx_callargs[2] = {__pyx_t_23, NULL};
16488 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_barrier, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16489 __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
16490 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16491 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 474, __pyx_L1_error)
16492 __Pyx_GOTREF(__pyx_t_17);
16494 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16503 __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 475, __pyx_L1_error)
16504 __Pyx_GOTREF(__pyx_t_23);
16505 __pyx_t_1 = __pyx_t_23;
16506 __Pyx_INCREF(__pyx_t_1);
16509 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
16510 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_beginSequential, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16511 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16512 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16513 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 475, __pyx_L1_error)
16514 __Pyx_GOTREF(__pyx_t_17);
16516 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16528 PyObject *__pyx_callargs[3] = {__pyx_t_23, __pyx_v_pov_filename, __pyx_mstate_global->__pyx_n_u_a};
16529 __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_open, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16530 __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
16531 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 476, __pyx_L1_error)
16532 __Pyx_GOTREF(__pyx_t_17);
16534 __Pyx_DECREF_SET(__pyx_v_pov, __pyx_t_17);
16544 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
16545 __Pyx_GOTREF(__pyx_t_1);
16546 __pyx_t_23 = __pyx_t_1;
16547 __Pyx_INCREF(__pyx_t_23);
16550 PyObject *__pyx_callargs[2] = {__pyx_t_23, NULL};
16551 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isMaster, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16552 __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
16553 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16554 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 477, __pyx_L1_error)
16555 __Pyx_GOTREF(__pyx_t_17);
16557 __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_17);
if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 477, __pyx_L1_error)
16558 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16569 __pyx_t_1 = __pyx_v_pov;
16570 __Pyx_INCREF(__pyx_t_1);
16573 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_union_of_meshes_difference_of_p};
16574 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16575 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16576 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 478, __pyx_L1_error)
16577 __Pyx_GOTREF(__pyx_t_17);
16579 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16606 __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_mesh2_vertex_vectors);
16607 __Pyx_XDECREF_SET(__pyx_v_povScene, __pyx_mstate_global->__pyx_kp_u_mesh2_vertex_vectors);
16616 __pyx_t_1 = __pyx_v_pov;
16617 __Pyx_INCREF(__pyx_t_1);
16620 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_povScene};
16621 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16622 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16623 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 489, __pyx_L1_error)
16624 __Pyx_GOTREF(__pyx_t_17);
16626 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16635 __pyx_t_1 = __pyx_v_pov;
16636 __Pyx_INCREF(__pyx_t_1);
16637 __pyx_t_9 = __pyx_mstate_global->__pyx_kp_u_0_d;
16638 __Pyx_INCREF(__pyx_t_9);
16639 __pyx_t_3 = PyObject_Length(__pyx_v_nodes);
if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 490, __pyx_L1_error)
16640 __pyx_t_7 = PyLong_FromSsize_t(__pyx_t_3);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
16641 __Pyx_GOTREF(__pyx_t_7);
16645 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
16646 __pyx_t_23 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16647 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16648 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16649 if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 490, __pyx_L1_error)
16650 __Pyx_GOTREF(__pyx_t_23);
16652 if (!(likely(PyUnicode_CheckExact(__pyx_t_23))||((__pyx_t_23) == Py_None) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_23))) __PYX_ERR(0, 490, __pyx_L1_error)
16655 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_23};
16656 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16657 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16658 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16659 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 490, __pyx_L1_error)
16660 __Pyx_GOTREF(__pyx_t_17);
16662 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16671 if (likely(PyList_CheckExact(__pyx_v_nodes)) || PyTuple_CheckExact(__pyx_v_nodes)) {
16672 __pyx_t_17 = __pyx_v_nodes; __Pyx_INCREF(__pyx_t_17);
16676 __pyx_t_3 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_nodes);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 491, __pyx_L1_error)
16677 __Pyx_GOTREF(__pyx_t_17);
16678 __pyx_t_24 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_17);
if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 491, __pyx_L1_error)
16681 if (likely(!__pyx_t_24)) {
16682 if (likely(PyList_CheckExact(__pyx_t_17))) {
16684 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_17);
16685 #if !CYTHON_ASSUME_SAFE_SIZE
16686 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 491, __pyx_L1_error)
16688 if (__pyx_t_3 >= __pyx_temp)
break;
16690 __pyx_t_23 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_17, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
16694 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_17);
16695 #if !CYTHON_ASSUME_SAFE_SIZE
16696 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 491, __pyx_L1_error)
16698 if (__pyx_t_3 >= __pyx_temp)
break;
16700 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16701 __pyx_t_23 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_3));
16703 __pyx_t_23 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_3);
16707 if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 491, __pyx_L1_error)
16709 __pyx_t_23 = __pyx_t_24(__pyx_t_17);
16710 if (unlikely(!__pyx_t_23)) {
16711 PyObject* exc_type = PyErr_Occurred();
16713 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 491, __pyx_L1_error)
16719 __Pyx_GOTREF(__pyx_t_23);
16720 __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_23);
16730 __pyx_t_1 = __pyx_v_pov;
16731 __Pyx_INCREF(__pyx_t_1);
16732 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_mstate_global->__pyx_kp_u_0_f_1_f_2_f, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 492, __pyx_L1_error)
16733 __Pyx_GOTREF(__pyx_t_7);
16734 __pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_v_n);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 492, __pyx_L1_error)
16735 __Pyx_GOTREF(__pyx_t_9);
16736 __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 492, __pyx_L1_error)
16737 __Pyx_GOTREF(__pyx_t_19);
16738 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16739 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16740 if (!(likely(PyUnicode_CheckExact(__pyx_t_19)) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_19))) __PYX_ERR(0, 492, __pyx_L1_error)
16743 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_19};
16744 __pyx_t_23 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16745 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16746 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
16747 if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 492, __pyx_L1_error)
16748 __Pyx_GOTREF(__pyx_t_23);
16750 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
16760 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16769 __pyx_t_23 = __pyx_v_pov;
16770 __Pyx_INCREF(__pyx_t_23);
16773 PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_mstate_global->__pyx_kp_u_normal_vectors};
16774 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16775 __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
16776 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 493, __pyx_L1_error)
16777 __Pyx_GOTREF(__pyx_t_17);
16779 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16788 __pyx_t_23 = __pyx_v_pov;
16789 __Pyx_INCREF(__pyx_t_23);
16790 __pyx_t_1 = __pyx_mstate_global->__pyx_kp_u_0_d;
16791 __Pyx_INCREF(__pyx_t_1);
16792 __pyx_t_3 = PyObject_Length(__pyx_v_normals);
if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 496, __pyx_L1_error)
16793 __pyx_t_9 = PyLong_FromSsize_t(__pyx_t_3);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 496, __pyx_L1_error)
16794 __Pyx_GOTREF(__pyx_t_9);
16798 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_9};
16799 __pyx_t_19 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16800 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16801 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16802 if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 496, __pyx_L1_error)
16803 __Pyx_GOTREF(__pyx_t_19);
16805 if (!(likely(PyUnicode_CheckExact(__pyx_t_19))||((__pyx_t_19) == Py_None) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_19))) __PYX_ERR(0, 496, __pyx_L1_error)
16808 PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_t_19};
16809 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16810 __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
16811 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
16812 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 496, __pyx_L1_error)
16813 __Pyx_GOTREF(__pyx_t_17);
16815 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16824 if (likely(PyList_CheckExact(__pyx_v_normals)) || PyTuple_CheckExact(__pyx_v_normals)) {
16825 __pyx_t_17 = __pyx_v_normals; __Pyx_INCREF(__pyx_t_17);
16829 __pyx_t_3 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_normals);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 497, __pyx_L1_error)
16830 __Pyx_GOTREF(__pyx_t_17);
16831 __pyx_t_24 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_17);
if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 497, __pyx_L1_error)
16834 if (likely(!__pyx_t_24)) {
16835 if (likely(PyList_CheckExact(__pyx_t_17))) {
16837 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_17);
16838 #if !CYTHON_ASSUME_SAFE_SIZE
16839 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 497, __pyx_L1_error)
16841 if (__pyx_t_3 >= __pyx_temp)
break;
16843 __pyx_t_19 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_17, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
16847 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_17);
16848 #if !CYTHON_ASSUME_SAFE_SIZE
16849 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 497, __pyx_L1_error)
16851 if (__pyx_t_3 >= __pyx_temp)
break;
16853 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16854 __pyx_t_19 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_3));
16856 __pyx_t_19 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_3);
16860 if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 497, __pyx_L1_error)
16862 __pyx_t_19 = __pyx_t_24(__pyx_t_17);
16863 if (unlikely(!__pyx_t_19)) {
16864 PyObject* exc_type = PyErr_Occurred();
16866 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 497, __pyx_L1_error)
16872 __Pyx_GOTREF(__pyx_t_19);
16873 __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_19);
16883 __pyx_t_23 = __pyx_v_pov;
16884 __Pyx_INCREF(__pyx_t_23);
16885 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_mstate_global->__pyx_kp_u_0_f_1_f_2_f, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 498, __pyx_L1_error)
16886 __Pyx_GOTREF(__pyx_t_9);
16887 __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_n);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
16888 __Pyx_GOTREF(__pyx_t_1);
16889 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 498, __pyx_L1_error)
16890 __Pyx_GOTREF(__pyx_t_7);
16891 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16892 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16893 if (!(likely(PyUnicode_CheckExact(__pyx_t_7)) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_7))) __PYX_ERR(0, 498, __pyx_L1_error)
16896 PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_t_7};
16897 __pyx_t_19 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16898 __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
16899 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16900 if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 498, __pyx_L1_error)
16901 __Pyx_GOTREF(__pyx_t_19);
16903 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
16913 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16922 __pyx_t_19 = __pyx_v_pov;
16923 __Pyx_INCREF(__pyx_t_19);
16926 PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_mstate_global->__pyx_kp_u_face_indices_2};
16927 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16928 __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
16929 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 499, __pyx_L1_error)
16930 __Pyx_GOTREF(__pyx_t_17);
16932 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16941 __pyx_t_19 = __pyx_v_pov;
16942 __Pyx_INCREF(__pyx_t_19);
16943 __pyx_t_23 = __pyx_mstate_global->__pyx_kp_u_0_d;
16944 __Pyx_INCREF(__pyx_t_23);
16945 __pyx_t_3 = PyObject_Length(__pyx_v_elements);
if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 502, __pyx_L1_error)
16946 __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_3);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
16947 __Pyx_GOTREF(__pyx_t_1);
16951 PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_t_1};
16952 __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16953 __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
16954 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16955 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 502, __pyx_L1_error)
16956 __Pyx_GOTREF(__pyx_t_7);
16958 if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_7))) __PYX_ERR(0, 502, __pyx_L1_error)
16961 PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_7};
16962 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
16963 __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
16964 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16965 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 502, __pyx_L1_error)
16966 __Pyx_GOTREF(__pyx_t_17);
16968 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
16977 if (likely(PyList_CheckExact(__pyx_v_elements)) || PyTuple_CheckExact(__pyx_v_elements)) {
16978 __pyx_t_17 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_17);
16982 __pyx_t_3 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_elements);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 503, __pyx_L1_error)
16983 __Pyx_GOTREF(__pyx_t_17);
16984 __pyx_t_24 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_17);
if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 503, __pyx_L1_error)
16987 if (likely(!__pyx_t_24)) {
16988 if (likely(PyList_CheckExact(__pyx_t_17))) {
16990 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_17);
16991 #if !CYTHON_ASSUME_SAFE_SIZE
16992 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 503, __pyx_L1_error)
16994 if (__pyx_t_3 >= __pyx_temp)
break;
16996 __pyx_t_7 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_17, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
17000 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_17);
17001 #if !CYTHON_ASSUME_SAFE_SIZE
17002 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 503, __pyx_L1_error)
17004 if (__pyx_t_3 >= __pyx_temp)
break;
17006 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17007 __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_3));
17009 __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_3);
17013 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 503, __pyx_L1_error)
17015 __pyx_t_7 = __pyx_t_24(__pyx_t_17);
17016 if (unlikely(!__pyx_t_7)) {
17017 PyObject* exc_type = PyErr_Occurred();
17019 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 503, __pyx_L1_error)
17025 __Pyx_GOTREF(__pyx_t_7);
17026 __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_7);
17036 __pyx_t_19 = __pyx_v_pov;
17037 __Pyx_INCREF(__pyx_t_19);
17038 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_mstate_global->__pyx_kp_u_0_d_1_d_2_d_2, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
17039 __Pyx_GOTREF(__pyx_t_1);
17040 __pyx_t_23 = __Pyx_PySequence_Tuple(__pyx_v_e);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 504, __pyx_L1_error)
17041 __Pyx_GOTREF(__pyx_t_23);
17042 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_23, NULL);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 504, __pyx_L1_error)
17043 __Pyx_GOTREF(__pyx_t_9);
17044 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17045 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
17046 if (!(likely(PyUnicode_CheckExact(__pyx_t_9)) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_9))) __PYX_ERR(0, 504, __pyx_L1_error)
17049 PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_9};
17050 __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17051 __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
17052 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17053 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 504, __pyx_L1_error)
17054 __Pyx_GOTREF(__pyx_t_7);
17056 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17066 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
17075 __pyx_t_7 = __pyx_v_pov;
17076 __Pyx_INCREF(__pyx_t_7);
17079 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_normal_indices_2};
17080 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17081 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17082 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 505, __pyx_L1_error)
17083 __Pyx_GOTREF(__pyx_t_17);
17085 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
17094 __pyx_t_7 = __pyx_v_pov;
17095 __Pyx_INCREF(__pyx_t_7);
17096 __pyx_t_19 = __pyx_mstate_global->__pyx_kp_u_0_d;
17097 __Pyx_INCREF(__pyx_t_19);
17098 __pyx_t_3 = PyObject_Length(__pyx_v_normal_indices);
if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 508, __pyx_L1_error)
17099 __pyx_t_23 = PyLong_FromSsize_t(__pyx_t_3);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 508, __pyx_L1_error)
17100 __Pyx_GOTREF(__pyx_t_23);
17104 PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_23};
17105 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17106 __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
17107 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
17108 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 508, __pyx_L1_error)
17109 __Pyx_GOTREF(__pyx_t_9);
17111 if (!(likely(PyUnicode_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_9))) __PYX_ERR(0, 508, __pyx_L1_error)
17114 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
17115 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17116 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17117 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17118 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 508, __pyx_L1_error)
17119 __Pyx_GOTREF(__pyx_t_17);
17121 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
17130 if (likely(PyList_CheckExact(__pyx_v_normal_indices)) || PyTuple_CheckExact(__pyx_v_normal_indices)) {
17131 __pyx_t_17 = __pyx_v_normal_indices; __Pyx_INCREF(__pyx_t_17);
17135 __pyx_t_3 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_normal_indices);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 509, __pyx_L1_error)
17136 __Pyx_GOTREF(__pyx_t_17);
17137 __pyx_t_24 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_17);
if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 509, __pyx_L1_error)
17140 if (likely(!__pyx_t_24)) {
17141 if (likely(PyList_CheckExact(__pyx_t_17))) {
17143 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_17);
17144 #if !CYTHON_ASSUME_SAFE_SIZE
17145 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 509, __pyx_L1_error)
17147 if (__pyx_t_3 >= __pyx_temp)
break;
17149 __pyx_t_9 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_17, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
17153 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_17);
17154 #if !CYTHON_ASSUME_SAFE_SIZE
17155 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 509, __pyx_L1_error)
17157 if (__pyx_t_3 >= __pyx_temp)
break;
17159 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17160 __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_3));
17162 __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_3);
17166 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 509, __pyx_L1_error)
17168 __pyx_t_9 = __pyx_t_24(__pyx_t_17);
17169 if (unlikely(!__pyx_t_9)) {
17170 PyObject* exc_type = PyErr_Occurred();
17172 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 509, __pyx_L1_error)
17178 __Pyx_GOTREF(__pyx_t_9);
17179 __Pyx_XDECREF_SET(__pyx_v_ni, __pyx_t_9);
17189 __pyx_t_7 = __pyx_v_pov;
17190 __Pyx_INCREF(__pyx_t_7);
17191 __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_mstate_global->__pyx_kp_u_0_d_1_d_2_d_2, __pyx_mstate_global->__pyx_n_u_format);
if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 510, __pyx_L1_error)
17192 __Pyx_GOTREF(__pyx_t_23);
17193 __pyx_t_19 = __Pyx_PySequence_Tuple(__pyx_v_ni);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 510, __pyx_L1_error)
17194 __Pyx_GOTREF(__pyx_t_19);
17195 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_19, NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
17196 __Pyx_GOTREF(__pyx_t_1);
17197 __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
17198 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
17199 if (!(likely(PyUnicode_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_1))) __PYX_ERR(0, 510, __pyx_L1_error)
17202 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1};
17203 __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17204 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17205 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17206 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 510, __pyx_L1_error)
17207 __Pyx_GOTREF(__pyx_t_9);
17209 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17219 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
17228 __pyx_t_9 = __pyx_v_pov;
17229 __Pyx_INCREF(__pyx_t_9);
17232 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_matrix_1_000000_0_000000_0_0000};
17233 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17234 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17235 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 511, __pyx_L1_error)
17236 __Pyx_GOTREF(__pyx_t_17);
17238 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
17247 __pyx_t_9 = __pyx_v_pov;
17248 __Pyx_INCREF(__pyx_t_9);
17251 PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
17252 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flush, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17253 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17254 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 519, __pyx_L1_error)
17255 __Pyx_GOTREF(__pyx_t_17);
17257 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
17266 __pyx_t_9 = __pyx_v_pov;
17267 __Pyx_INCREF(__pyx_t_9);
17270 PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
17271 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17272 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17273 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 520, __pyx_L1_error)
17274 __Pyx_GOTREF(__pyx_t_17);
17276 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
17285 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
17286 __Pyx_GOTREF(__pyx_t_1);
17287 __pyx_t_9 = __pyx_t_1;
17288 __Pyx_INCREF(__pyx_t_9);
17291 PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
17292 __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_endSequential, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17293 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17294 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17295 if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 521, __pyx_L1_error)
17296 __Pyx_GOTREF(__pyx_t_17);
17298 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
17309 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17312 __Pyx_XDECREF(__pyx_t_1);
17313 __Pyx_XDECREF(__pyx_t_4);
17314 __Pyx_XDECREF(__pyx_t_5);
17315 __Pyx_XDECREF(__pyx_t_7);
17316 __Pyx_XDECREF(__pyx_t_9);
17317 __Pyx_XDECREF(__pyx_t_11);
17318 __Pyx_XDECREF(__pyx_t_12);
17319 __Pyx_XDECREF(__pyx_t_13);
17320 __Pyx_XDECREF(__pyx_t_14);
17321 __Pyx_XDECREF(__pyx_t_15);
17322 __Pyx_XDECREF(__pyx_t_16);
17323 __Pyx_XDECREF(__pyx_t_17);
17324 __Pyx_XDECREF(__pyx_t_18);
17325 __Pyx_XDECREF(__pyx_t_19);
17326 __Pyx_XDECREF(__pyx_t_20);
17327 __Pyx_XDECREF(__pyx_t_21);
17328 __Pyx_XDECREF(__pyx_t_22);
17329 __Pyx_XDECREF(__pyx_t_23);
17330 __Pyx_AddTraceback(
"Isosurface.Isosurface.writeIsosurfaceMesh_povray", __pyx_clineno, __pyx_lineno, __pyx_filename);
17333 __Pyx_XDECREF(__pyx_v_Template);
17334 __Pyx_XDECREF(__pyx_v_nodes);
17335 __Pyx_XDECREF(__pyx_v_elements);
17336 __Pyx_XDECREF(__pyx_v_normals);
17337 __Pyx_XDECREF(__pyx_v_normal_indices);
17338 __Pyx_XDECREF(__pyx_v_pov_filename);
17339 __Pyx_XDECREF(__pyx_v_pov);
17340 __Pyx_XDECREF(__pyx_v_dx);
17341 __Pyx_XDECREF(__pyx_v_nll);
17342 __Pyx_XDECREF(__pyx_v_fur);
17343 __Pyx_XDECREF(__pyx_v_povScene);
17344 __Pyx_XDECREF(__pyx_v_n);
17345 __Pyx_XDECREF(__pyx_v_ebN);
17346 __Pyx_XDECREF(__pyx_v_bnt);
17347 __Pyx_XDECREF(__pyx_v_e);
17348 __Pyx_XDECREF(__pyx_v_ni);
17349 __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_n);
17350 __Pyx_XGIVEREF(__pyx_r);
17351 __Pyx_RefNannyFinishContext();
17364static PyObject *__pyx_pw_10Isosurface_10Isosurface_15calculate(PyObject *__pyx_self,
17365#
if CYTHON_VECTORCALL
17366PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17368PyObject *__pyx_args, PyObject *__pyx_kwds
17371PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface_14calculate,
"Isosurface.calculate(self, checkTime=True)\n\nExtracts isosourfaces at current time and update open output files\n ");
17372static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_15calculate = {
"calculate", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_15calculate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface_14calculate};
17373static PyObject *__pyx_pw_10Isosurface_10Isosurface_15calculate(PyObject *__pyx_self,
17374#
if CYTHON_VECTORCALL
17375PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
17377PyObject *__pyx_args, PyObject *__pyx_kwds
17380 PyObject *__pyx_v_self = 0;
17381 PyObject *__pyx_v_checkTime = 0;
17382 #if !CYTHON_VECTORCALL
17383 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
17385 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
17386 PyObject* values[2] = {0,0};
17387 int __pyx_lineno = 0;
17388 const char *__pyx_filename = NULL;
17389 int __pyx_clineno = 0;
17390 PyObject *__pyx_r = 0;
17391 __Pyx_RefNannyDeclarations
17392 __Pyx_RefNannySetupContext(
"calculate (wrapper)", 0);
17393 #if !CYTHON_VECTORCALL
17394 #if CYTHON_ASSUME_SAFE_SIZE
17395 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
17397 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
17400 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
17402 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_checkTime,0};
17403 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
17404 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 523, __pyx_L3_error)
17405 if (__pyx_kwds_len > 0) {
17406 switch (__pyx_nargs) {
17408 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
17409 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 523, __pyx_L3_error)
17410 CYTHON_FALLTHROUGH;
17412 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
17413 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 523, __pyx_L3_error)
17414 CYTHON_FALLTHROUGH;
17416 default:
goto __pyx_L5_argtuple_error;
17418 const Py_ssize_t kwd_pos_args = __pyx_nargs;
17419 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"calculate", 0) < (0)) __PYX_ERR(0, 523, __pyx_L3_error)
17420 if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
17421 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
17422 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"calculate", 0, 1, 2, i); __PYX_ERR(0, 523, __pyx_L3_error) }
17425 switch (__pyx_nargs) {
17427 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
17428 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 523, __pyx_L3_error)
17429 CYTHON_FALLTHROUGH;
17431 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
17432 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 523, __pyx_L3_error)
17434 default:
goto __pyx_L5_argtuple_error;
17436 if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
17438 __pyx_v_self = values[0];
17439 __pyx_v_checkTime = values[1];
17441 goto __pyx_L6_skip;
17442 __pyx_L5_argtuple_error:;
17443 __Pyx_RaiseArgtupleInvalid(
"calculate", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 523, __pyx_L3_error)
17445 goto __pyx_L4_argument_unpacking_done;
17447 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
17448 Py_XDECREF(values[__pyx_temp]);
17450 __Pyx_AddTraceback(
"Isosurface.Isosurface.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
17451 __Pyx_RefNannyFinishContext();
17453 __pyx_L4_argument_unpacking_done:;
17454 __pyx_r = __pyx_pf_10Isosurface_10Isosurface_14calculate(__pyx_self, __pyx_v_self, __pyx_v_checkTime);
17457 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
17458 Py_XDECREF(values[__pyx_temp]);
17460 __Pyx_RefNannyFinishContext();
17464static PyObject *__pyx_pf_10Isosurface_10Isosurface_14calculate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_checkTime) {
17465 CYTHON_UNUSED PyObject *__pyx_v_Template = NULL;
17466 PyObject *__pyx_v_time = NULL;
17467 PyObject *__pyx_v_field = NULL;
17468 PyObject *__pyx_v_values = NULL;
17469 PyObject *__pyx_v_v = NULL;
17470 PyObject *__pyx_r = NULL;
17471 __Pyx_RefNannyDeclarations
17472 PyObject *__pyx_t_1 = NULL;
17473 PyObject *__pyx_t_2 = NULL;
17474 Py_ssize_t __pyx_t_3;
17475 PyObject *__pyx_t_4 = NULL;
17477 PyObject *__pyx_t_6 = NULL;
17478 PyObject *__pyx_t_7 = NULL;
17479 PyObject *__pyx_t_8 = NULL;
17482 PyObject *(*__pyx_t_11)(PyObject *);
17483 PyObject *(*__pyx_t_12)(PyObject *);
17484 Py_ssize_t __pyx_t_13;
17485 PyObject *(*__pyx_t_14)(PyObject *);
17486 int __pyx_lineno = 0;
17487 const char *__pyx_filename = NULL;
17488 int __pyx_clineno = 0;
17489 __Pyx_RefNannySetupContext(
"calculate", 0);
17499 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Template};
17500 __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_string, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
17502 __pyx_t_1 = __pyx_t_2;
17503 __Pyx_GOTREF(__pyx_t_1);
17505 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Template};
17507 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error)
17508 __Pyx_GOTREF(__pyx_t_4);
17509 switch (__pyx_t_3) {
17511 __Pyx_INCREF(__pyx_t_4);
17512 __pyx_v_Template = __pyx_t_4;
17516 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17519 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17528 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_checkTime);
if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 527, __pyx_L1_error)
17539 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeIntegration);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
17540 __Pyx_GOTREF(__pyx_t_1);
17541 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tLast);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error)
17542 __Pyx_GOTREF(__pyx_t_4);
17543 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17544 __pyx_v_time = __pyx_t_4;
17555 __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error)
17556 __Pyx_GOTREF(__pyx_t_6);
17557 __pyx_t_7 = PyObject_Repr(__pyx_v_time);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error)
17558 __Pyx_GOTREF(__pyx_t_7);
17559 __pyx_t_8 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u_Calculate_called_at_time, __pyx_t_7);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error)
17560 __Pyx_GOTREF(__pyx_t_8);
17561 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17563 #if CYTHON_UNPACK_METHODS
17564 if (unlikely(PyMethod_Check(__pyx_t_6))) {
17565 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
17567 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
17568 __Pyx_INCREF(__pyx_t_1);
17569 __Pyx_INCREF(__pyx__function);
17570 __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
17575 PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
17576 __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17577 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17578 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17579 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17580 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
17581 __Pyx_GOTREF(__pyx_t_4);
17583 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17592 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_activeTime);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
17593 __Pyx_GOTREF(__pyx_t_4);
17594 __pyx_t_10 = (__pyx_t_4 != Py_None);
17595 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17600 __pyx_t_5 = __pyx_t_10;
17602 goto __pyx_L5_bool_binop_done;
17604 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_activeTime);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
17605 __Pyx_GOTREF(__pyx_t_4);
17606 __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error)
17607 __Pyx_GOTREF(__pyx_t_6);
17608 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17609 __pyx_t_10 = __Pyx_PyObject_CompareBoolGt_object_object(__pyx_t_6, __pyx_v_time, Py_GT);
if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 531, __pyx_L1_error)
17610 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17615 __pyx_t_5 = __pyx_t_10;
17617 goto __pyx_L5_bool_binop_done;
17627 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_activeTime);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L1_error)
17628 __Pyx_GOTREF(__pyx_t_6);
17629 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
17630 __Pyx_GOTREF(__pyx_t_4);
17631 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17632 __pyx_t_10 = __Pyx_PyObject_CompareBoolLt_object_object(__pyx_t_4, __pyx_v_time, Py_LT);
if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 532, __pyx_L1_error)
17633 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17635 __pyx_t_5 = __pyx_t_10;
17637 __pyx_L5_bool_binop_done:;
17657 PyObject *__pyx_temp;
17659 __pyx_temp = __pyx_r;
17660 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17662 __Pyx_XDECREF(__pyx_temp);
17682 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_next_output);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 536, __pyx_L1_error)
17683 __Pyx_GOTREF(__pyx_t_4);
17684 __pyx_t_5 = __Pyx_PyObject_CompareBoolLt_object_object(__pyx_v_time, __pyx_t_4, Py_LT);
if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 536, __pyx_L1_error)
17685 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17697 PyObject *__pyx_temp;
17699 __pyx_temp = __pyx_r;
17700 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17702 __Pyx_XDECREF(__pyx_temp);
17731 #ifndef CYTHON_WITHOUT_ASSERTIONS
17732 if (unlikely(__pyx_assertions_enabled())) {
17733 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementNodesArray);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error)
17734 __Pyx_GOTREF(__pyx_t_4);
17735 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_shape);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 538, __pyx_L1_error)
17736 __Pyx_GOTREF(__pyx_t_6);
17737 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17738 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error)
17739 __Pyx_GOTREF(__pyx_t_4);
17740 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17741 __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_4, 4, 0));
if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 538, __pyx_L1_error)
17742 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17743 if (unlikely(!__pyx_t_5)) {
17752 __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_Elements_have_0_d_vertices_but_a;
17753 __Pyx_INCREF(__pyx_t_6);
17762 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_elementNodesArray);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 540, __pyx_L1_error)
17763 __Pyx_GOTREF(__pyx_t_8);
17764 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_shape);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
17765 __Pyx_GOTREF(__pyx_t_1);
17766 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17767 __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 540, __pyx_L1_error)
17768 __Pyx_GOTREF(__pyx_t_8);
17769 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17772 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
17773 __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17774 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17775 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17776 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error)
17777 __Pyx_GOTREF(__pyx_t_4);
17787 if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError(
"str", __pyx_t_4))) __PYX_ERR(0, 539, __pyx_L1_error)
17788 __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
17789 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17790 __PYX_ERR(0, 538, __pyx_L1_error)
17795 if ((1));
else __PYX_ERR(0, 538, __pyx_L1_error)
17805 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_isosurfaces);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
17806 __Pyx_GOTREF(__pyx_t_4);
17807 if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
17808 __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8);
17812 __pyx_t_3 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L1_error)
17813 __Pyx_GOTREF(__pyx_t_8);
17814 __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 541, __pyx_L1_error)
17816 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17818 if (likely(!__pyx_t_11)) {
17819 if (likely(PyList_CheckExact(__pyx_t_8))) {
17821 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
17822 #if !CYTHON_ASSUME_SAFE_SIZE
17823 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 541, __pyx_L1_error)
17825 if (__pyx_t_3 >= __pyx_temp)
break;
17827 __pyx_t_4 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_8, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
17831 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
17832 #if !CYTHON_ASSUME_SAFE_SIZE
17833 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 541, __pyx_L1_error)
17835 if (__pyx_t_3 >= __pyx_temp)
break;
17837 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17838 __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_3));
17840 __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_3);
17844 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
17846 __pyx_t_4 = __pyx_t_11(__pyx_t_8);
17847 if (unlikely(!__pyx_t_4)) {
17848 PyObject* exc_type = PyErr_Occurred();
17850 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 541, __pyx_L1_error)
17856 __Pyx_GOTREF(__pyx_t_4);
17857 if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
17858 PyObject* sequence = __pyx_t_4;
17859 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17860 if (unlikely(size != 2)) {
17861 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
17862 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17863 __PYX_ERR(0, 541, __pyx_L1_error)
17865 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17866 if (likely(PyTuple_CheckExact(sequence))) {
17867 __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
17868 __Pyx_INCREF(__pyx_t_6);
17869 __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
17870 __Pyx_INCREF(__pyx_t_1);
17872 __pyx_t_6 = __Pyx_PyList_GET_ITEM_REF(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
17873 if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error)
17874 __Pyx_XGOTREF(__pyx_t_6);
17875 __pyx_t_1 = __Pyx_PyList_GET_ITEM_REF(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
17876 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
17877 __Pyx_XGOTREF(__pyx_t_1);
17880 __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error)
17881 __Pyx_GOTREF(__pyx_t_6);
17882 __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
17883 __Pyx_GOTREF(__pyx_t_1);
17885 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17887 Py_ssize_t index = -1;
17888 __pyx_t_7 = PyObject_GetIter(__pyx_t_4);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L1_error)
17889 __Pyx_GOTREF(__pyx_t_7);
17890 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17891 __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
17892 index = 0; __pyx_t_6 = __pyx_t_12(__pyx_t_7);
if (unlikely(!__pyx_t_6))
goto __pyx_L11_unpacking_failed;
17893 __Pyx_GOTREF(__pyx_t_6);
17894 index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_7);
if (unlikely(!__pyx_t_1))
goto __pyx_L11_unpacking_failed;
17895 __Pyx_GOTREF(__pyx_t_1);
17896 if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_7), 2) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
17898 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17899 goto __pyx_L12_unpacking_done;
17900 __pyx_L11_unpacking_failed:;
17901 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17903 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17904 __PYX_ERR(0, 541, __pyx_L1_error)
17905 __pyx_L12_unpacking_done:;
17907 __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_6);
17909 __Pyx_XDECREF_SET(__pyx_v_values, __pyx_t_1);
17919 if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
17920 __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4);
17924 __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error)
17925 __Pyx_GOTREF(__pyx_t_4);
17926 __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 542, __pyx_L1_error)
17929 if (likely(!__pyx_t_14)) {
17930 if (likely(PyList_CheckExact(__pyx_t_4))) {
17932 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
17933 #if !CYTHON_ASSUME_SAFE_SIZE
17934 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L1_error)
17936 if (__pyx_t_13 >= __pyx_temp)
break;
17938 __pyx_t_1 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_4, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
17942 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
17943 #if !CYTHON_ASSUME_SAFE_SIZE
17944 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L1_error)
17946 if (__pyx_t_13 >= __pyx_temp)
break;
17948 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17949 __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13));
17951 __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_13);
17955 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
17957 __pyx_t_1 = __pyx_t_14(__pyx_t_4);
17958 if (unlikely(!__pyx_t_1)) {
17959 PyObject* exc_type = PyErr_Occurred();
17961 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 542, __pyx_L1_error)
17967 __Pyx_GOTREF(__pyx_t_1);
17968 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
17978 __pyx_t_6 = __pyx_v_self;
17979 __Pyx_INCREF(__pyx_t_6);
17982 PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_field, __pyx_v_v};
17983 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_triangulateIsosurface, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
17984 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17985 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
17986 __Pyx_GOTREF(__pyx_t_1);
17988 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17997 __pyx_t_6 = __pyx_v_self;
17998 __Pyx_INCREF(__pyx_t_6);
17999 __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames);
if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 544, __pyx_L1_error)
18000 __Pyx_GOTREF(__pyx_t_7);
18003 PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_field, __pyx_v_v, __pyx_t_7};
18004 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_writeIsosurfaceMesh, __pyx_callargs+__pyx_t_9, (4-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
18005 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18006 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18007 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
18008 __Pyx_GOTREF(__pyx_t_1);
18010 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18020 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18030 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18039 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L1_error)
18040 __Pyx_GOTREF(__pyx_t_8);
18041 __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_8, __pyx_mstate_global->__pyx_int_1, 1, 1, 0);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
18042 __Pyx_GOTREF(__pyx_t_4);
18043 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18044 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_nFrames, __pyx_t_4) < (0)) __PYX_ERR(0, 545, __pyx_L1_error)
18045 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18054 __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_checkTime);
if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 546, __pyx_L1_error)
18059 __pyx_t_5 = __pyx_t_10;
18061 goto __pyx_L18_bool_binop_done;
18063 if (unlikely(!__pyx_v_time)) { __Pyx_RaiseUnboundLocalError(
"time"); __PYX_ERR(0, 546, __pyx_L1_error) }
18064 __pyx_t_10 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_time, __pyx_mstate_global->__pyx_int_0, 0, 0));
if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 546, __pyx_L1_error)
18066 __pyx_t_5 = __pyx_t_10;
18068 __pyx_L18_bool_binop_done:;
18079 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_next_output);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 547, __pyx_L1_error)
18080 __Pyx_GOTREF(__pyx_t_4);
18081 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sampleRate);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 547, __pyx_L1_error)
18082 __Pyx_GOTREF(__pyx_t_8);
18083 __pyx_t_1 = __Pyx_PyNumber_InPlaceAdd_object_object(__pyx_t_4, __pyx_t_8);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
18084 __Pyx_GOTREF(__pyx_t_1);
18085 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18086 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18087 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_next_output, __pyx_t_1) < (0)) __PYX_ERR(0, 547, __pyx_L1_error)
18088 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18108 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18111 __Pyx_XDECREF(__pyx_t_1);
18112 __Pyx_XDECREF(__pyx_t_4);
18113 __Pyx_XDECREF(__pyx_t_6);
18114 __Pyx_XDECREF(__pyx_t_7);
18115 __Pyx_XDECREF(__pyx_t_8);
18116 __Pyx_AddTraceback(
"Isosurface.Isosurface.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
18119 __Pyx_XDECREF(__pyx_v_Template);
18120 __Pyx_XDECREF(__pyx_v_time);
18121 __Pyx_XDECREF(__pyx_v_field);
18122 __Pyx_XDECREF(__pyx_v_values);
18123 __Pyx_XDECREF(__pyx_v_v);
18124 __Pyx_XGIVEREF(__pyx_r);
18125 __Pyx_RefNannyFinishContext();
18138static PyObject *__pyx_pw_10Isosurface_10Isosurface_17writeSceneHeader(PyObject *__pyx_self,
18139#
if CYTHON_VECTORCALL
18140PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18142PyObject *__pyx_args, PyObject *__pyx_kwds
18145PyDoc_STRVAR(__pyx_doc_10Isosurface_10Isosurface_16writeSceneHeader,
"Isosurface.writeSceneHeader(self, cam=None)\n\nWrite a scene description (can be modified before running povray)");
18146static PyMethodDef __pyx_mdef_10Isosurface_10Isosurface_17writeSceneHeader = {
"writeSceneHeader", (PyCFunction)(
void(*)(
void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10Isosurface_10Isosurface_17writeSceneHeader, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10Isosurface_10Isosurface_16writeSceneHeader};
18147static PyObject *__pyx_pw_10Isosurface_10Isosurface_17writeSceneHeader(PyObject *__pyx_self,
18148#
if CYTHON_VECTORCALL
18149PyObject *
const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
18151PyObject *__pyx_args, PyObject *__pyx_kwds
18154 PyObject *__pyx_v_self = 0;
18155 PyObject *__pyx_v_cam = 0;
18156 #if !CYTHON_VECTORCALL
18157 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
18159 CYTHON_UNUSED PyObject *
const *__pyx_kwvalues;
18160 PyObject* values[2] = {0,0};
18161 int __pyx_lineno = 0;
18162 const char *__pyx_filename = NULL;
18163 int __pyx_clineno = 0;
18164 PyObject *__pyx_r = 0;
18165 __Pyx_RefNannyDeclarations
18166 __Pyx_RefNannySetupContext(
"writeSceneHeader (wrapper)", 0);
18167 #if !CYTHON_VECTORCALL
18168 #if CYTHON_ASSUME_SAFE_SIZE
18169 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
18171 __pyx_nargs = PyTuple_Size(__pyx_args);
if (unlikely(__pyx_nargs < 0))
return NULL;
18174 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
18176 PyObject **
const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_cam,0};
18177 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
18178 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 549, __pyx_L3_error)
18179 if (__pyx_kwds_len > 0) {
18180 switch (__pyx_nargs) {
18182 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
18183 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 549, __pyx_L3_error)
18184 CYTHON_FALLTHROUGH;
18186 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
18187 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 549, __pyx_L3_error)
18188 CYTHON_FALLTHROUGH;
18190 default:
goto __pyx_L5_argtuple_error;
18192 const Py_ssize_t kwd_pos_args = __pyx_nargs;
18193 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len,
"writeSceneHeader", 0) < (0)) __PYX_ERR(0, 549, __pyx_L3_error)
18194 if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
18195 for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
18196 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid(
"writeSceneHeader", 0, 1, 2, i); __PYX_ERR(0, 549, __pyx_L3_error) }
18199 switch (__pyx_nargs) {
18201 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
18202 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 549, __pyx_L3_error)
18203 CYTHON_FALLTHROUGH;
18205 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
18206 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 549, __pyx_L3_error)
18208 default:
goto __pyx_L5_argtuple_error;
18210 if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
18212 __pyx_v_self = values[0];
18213 __pyx_v_cam = values[1];
18215 goto __pyx_L6_skip;
18216 __pyx_L5_argtuple_error:;
18217 __Pyx_RaiseArgtupleInvalid(
"writeSceneHeader", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 549, __pyx_L3_error)
18219 goto __pyx_L4_argument_unpacking_done;
18221 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18222 Py_XDECREF(values[__pyx_temp]);
18224 __Pyx_AddTraceback(
"Isosurface.Isosurface.writeSceneHeader", __pyx_clineno, __pyx_lineno, __pyx_filename);
18225 __Pyx_RefNannyFinishContext();
18227 __pyx_L4_argument_unpacking_done:;
18228 __pyx_r = __pyx_pf_10Isosurface_10Isosurface_16writeSceneHeader(__pyx_self, __pyx_v_self, __pyx_v_cam);
18231 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(
sizeof(values)/
sizeof(values[0])); ++__pyx_temp) {
18232 Py_XDECREF(values[__pyx_temp]);
18234 __Pyx_RefNannyFinishContext();
18238static PyObject *__pyx_pf_10Isosurface_10Isosurface_16writeSceneHeader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cam) {
18239 PyObject *__pyx_v_Template = NULL;
18240 PyObject *__pyx_v_look_at = NULL;
18241 PyObject *__pyx_v_light = NULL;
18242 PyObject *__pyx_v_light_dx = NULL;
18243 PyObject *__pyx_v_light_dy = NULL;
18244 PyObject *__pyx_v_floor_z = NULL;
18245 PyObject *__pyx_v_wall_y = NULL;
18246 PyObject *__pyx_v_sky_z = NULL;
18247 PyObject *__pyx_v_pov = NULL;
18248 PyObject *__pyx_v_povSceneTemplate = NULL;
18249 PyObject *__pyx_9genexpr10__pyx_v_x = NULL;
18250 PyObject *__pyx_9genexpr10__pyx_v_L = NULL;
18251 PyObject *__pyx_9genexpr11__pyx_v_x = NULL;
18252 PyObject *__pyx_9genexpr11__pyx_v_L = NULL;
18253 PyObject *__pyx_r = NULL;
18254 __Pyx_RefNannyDeclarations
18255 PyObject *__pyx_t_1 = NULL;
18256 PyObject *__pyx_t_2 = NULL;
18257 Py_ssize_t __pyx_t_3;
18258 PyObject *__pyx_t_4 = NULL;
18259 PyObject *__pyx_t_5 = NULL;
18262 PyObject *__pyx_t_8 = NULL;
18263 PyObject *__pyx_t_9 = NULL;
18264 PyObject *__pyx_t_10 = NULL;
18265 PyObject *(*__pyx_t_11)(PyObject *);
18266 PyObject *(*__pyx_t_12)(PyObject *);
18267 PyObject *__pyx_t_13 = NULL;
18268 PyObject *__pyx_t_14 = NULL;
18269 PyObject *__pyx_t_15 = NULL;
18270 PyObject *__pyx_t_16 = NULL;
18271 PyObject *__pyx_t_17 = NULL;
18272 PyObject *__pyx_t_18 = NULL;
18273 PyObject *__pyx_t_19 = NULL;
18274 PyObject *__pyx_t_20 = NULL;
18275 int __pyx_lineno = 0;
18276 const char *__pyx_filename = NULL;
18277 int __pyx_clineno = 0;
18278 __Pyx_RefNannySetupContext(
"writeSceneHeader", 0);
18279 __Pyx_INCREF(__pyx_v_cam);
18289 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Template};
18290 __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_string, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
18292 __pyx_t_1 = __pyx_t_2;
18293 __Pyx_GOTREF(__pyx_t_1);
18295 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Template};
18297 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error)
18298 __Pyx_GOTREF(__pyx_t_4);
18299 switch (__pyx_t_3) {
18301 __Pyx_INCREF(__pyx_t_4);
18302 __pyx_v_Template = __pyx_t_4;
18306 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18309 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18318 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_comm);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 554, __pyx_L1_error)
18319 __Pyx_GOTREF(__pyx_t_5);
18320 __pyx_t_4 = __pyx_t_5;
18321 __Pyx_INCREF(__pyx_t_4);
18324 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
18325 __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isMaster, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
18326 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
18327 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18328 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
18329 __Pyx_GOTREF(__pyx_t_1);
18331 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1);
if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 554, __pyx_L1_error)
18332 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18344 __pyx_t_1 = PyList_New(0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L6_error)
18345 __Pyx_GOTREF(__pyx_t_1);
18355 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 556, __pyx_L6_error)
18356 __Pyx_GOTREF(__pyx_t_8);
18357 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 556, __pyx_L6_error)
18358 __Pyx_GOTREF(__pyx_t_9);
18359 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18360 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 556, __pyx_L6_error)
18361 __Pyx_GOTREF(__pyx_t_8);
18362 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 556, __pyx_L6_error)
18363 __Pyx_GOTREF(__pyx_t_10);
18364 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18367 PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_9, __pyx_t_10};
18368 __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
18369 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
18370 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18371 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18372 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L6_error)
18373 __Pyx_GOTREF(__pyx_t_5);
18375 if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
18376 __pyx_t_10 = __pyx_t_5; __Pyx_INCREF(__pyx_t_10);
18380 __pyx_t_3 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_5);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 556, __pyx_L6_error)
18381 __Pyx_GOTREF(__pyx_t_10);
18382 __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 556, __pyx_L6_error)
18384 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18386 if (likely(!__pyx_t_11)) {
18387 if (likely(PyList_CheckExact(__pyx_t_10))) {
18389 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
18390 #if !CYTHON_ASSUME_SAFE_SIZE
18391 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 556, __pyx_L6_error)
18393 if (__pyx_t_3 >= __pyx_temp)
break;
18395 __pyx_t_5 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_10, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
18399 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
18400 #if !CYTHON_ASSUME_SAFE_SIZE
18401 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 556, __pyx_L6_error)
18403 if (__pyx_t_3 >= __pyx_temp)
break;
18405 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18406 __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_3));
18408 __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_3);
18412 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L6_error)
18414 __pyx_t_5 = __pyx_t_11(__pyx_t_10);
18415 if (unlikely(!__pyx_t_5)) {
18416 PyObject* exc_type = PyErr_Occurred();
18418 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 556, __pyx_L6_error)
18424 __Pyx_GOTREF(__pyx_t_5);
18425 if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
18426 PyObject* sequence = __pyx_t_5;
18427 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
18428 if (unlikely(size != 2)) {
18429 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
18430 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
18431 __PYX_ERR(0, 556, __pyx_L6_error)
18433 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18434 if (likely(PyTuple_CheckExact(sequence))) {
18435 __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
18436 __Pyx_INCREF(__pyx_t_9);
18437 __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
18438 __Pyx_INCREF(__pyx_t_4);
18440 __pyx_t_9 = __Pyx_PyList_GET_ITEM_REF(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
18441 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 556, __pyx_L6_error)
18442 __Pyx_XGOTREF(__pyx_t_9);
18443 __pyx_t_4 = __Pyx_PyList_GET_ITEM_REF(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
18444 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L6_error)
18445 __Pyx_XGOTREF(__pyx_t_4);
18448 __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 556, __pyx_L6_error)
18449 __Pyx_GOTREF(__pyx_t_9);
18450 __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L6_error)
18451 __Pyx_GOTREF(__pyx_t_4);
18453 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18455 Py_ssize_t index = -1;
18456 __pyx_t_8 = PyObject_GetIter(__pyx_t_5);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 556, __pyx_L6_error)
18457 __Pyx_GOTREF(__pyx_t_8);
18458 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18459 __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
18460 index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_8);
if (unlikely(!__pyx_t_9))
goto __pyx_L9_unpacking_failed;
18461 __Pyx_GOTREF(__pyx_t_9);
18462 index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_8);
if (unlikely(!__pyx_t_4))
goto __pyx_L9_unpacking_failed;
18463 __Pyx_GOTREF(__pyx_t_4);
18464 if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 556, __pyx_L6_error)
18466 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18467 goto __pyx_L10_unpacking_done;
18468 __pyx_L9_unpacking_failed:;
18469 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18471 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
18472 __PYX_ERR(0, 556, __pyx_L6_error)
18473 __pyx_L10_unpacking_done:;
18475 __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_x, __pyx_t_9);
18477 __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_L, __pyx_t_4);
18487 __pyx_t_5 = __Pyx_PyNumber_Add_object_object(__pyx_9genexpr10__pyx_v_x, __pyx_9genexpr10__pyx_v_L);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 555, __pyx_L6_error)
18488 __Pyx_GOTREF(__pyx_t_5);
18489 __pyx_t_4 = __Pyx_PyNumber_Multiply_float_object(__pyx_mstate_global->__pyx_float_0_5, __pyx_t_5);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L6_error)
18490 __Pyx_GOTREF(__pyx_t_4);
18491 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18492 __Pyx_GIVEREF(__pyx_t_4);
18493 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_1, __pyx_t_4))) __PYX_ERR(0, 555, __pyx_L6_error)
18504 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18505 __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_L); __pyx_9genexpr10__pyx_v_L = 0;
18506 __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_x); __pyx_9genexpr10__pyx_v_x = 0;
18507 goto __pyx_L12_exit_scope;
18509 __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_L); __pyx_9genexpr10__pyx_v_L = 0;
18510 __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_x); __pyx_9genexpr10__pyx_v_x = 0;
18511 goto __pyx_L1_error;
18512 __pyx_L12_exit_scope:;
18514 __pyx_v_look_at = ((PyObject*)__pyx_t_1);
18524 __pyx_t_7 = (__pyx_v_cam == Py_None);
18535 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
18536 __Pyx_GOTREF(__pyx_t_1);
18537 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 558, __pyx_L1_error)
18538 __Pyx_GOTREF(__pyx_t_10);
18539 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18540 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_10, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
18541 __Pyx_GOTREF(__pyx_t_1);
18542 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18543 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 558, __pyx_L1_error)
18544 __Pyx_GOTREF(__pyx_t_10);
18545 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 558, __pyx_L1_error)
18546 __Pyx_GOTREF(__pyx_t_4);
18547 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18548 __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_4, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 558, __pyx_L1_error)
18549 __Pyx_GOTREF(__pyx_t_10);
18550 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18551 __pyx_t_4 = __Pyx_PyNumber_Add_object_object(__pyx_t_1, __pyx_t_10);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 558, __pyx_L1_error)
18552 __Pyx_GOTREF(__pyx_t_4);
18553 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18554 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18555 __pyx_t_10 = __Pyx_PyNumber_Multiply_float_object(__pyx_mstate_global->__pyx_float_0_5, __pyx_t_4);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 558, __pyx_L1_error)
18556 __Pyx_GOTREF(__pyx_t_10);
18557 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18566 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
18567 __Pyx_GOTREF(__pyx_t_4);
18568 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
18569 __Pyx_GOTREF(__pyx_t_1);
18570 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18571 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
18572 __Pyx_GOTREF(__pyx_t_4);
18573 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18574 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
18575 __Pyx_GOTREF(__pyx_t_1);
18576 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 559, __pyx_L1_error)
18577 __Pyx_GOTREF(__pyx_t_5);
18578 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18579 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
18580 __Pyx_GOTREF(__pyx_t_1);
18581 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18582 __pyx_t_5 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_2, __pyx_t_1, 2, 0, 0);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 559, __pyx_L1_error)
18583 __Pyx_GOTREF(__pyx_t_5);
18584 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18585 __pyx_t_1 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_4, __pyx_t_5);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
18586 __Pyx_GOTREF(__pyx_t_1);
18587 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18588 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18597 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
18598 __Pyx_GOTREF(__pyx_t_5);
18599 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
18600 __Pyx_GOTREF(__pyx_t_4);
18601 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18602 __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
18603 __Pyx_GOTREF(__pyx_t_5);
18604 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18605 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
18606 __Pyx_GOTREF(__pyx_t_4);
18607 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 560, __pyx_L1_error)
18608 __Pyx_GOTREF(__pyx_t_9);
18609 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18610 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_9, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error)
18611 __Pyx_GOTREF(__pyx_t_4);
18612 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18613 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 560, __pyx_L1_error)
18614 __Pyx_GOTREF(__pyx_t_9);
18615 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 560, __pyx_L1_error)
18616 __Pyx_GOTREF(__pyx_t_8);
18617 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18618 __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 560, __pyx_L1_error)
18619 __Pyx_GOTREF(__pyx_t_9);
18620 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18621 __pyx_t_8 = __Pyx_PyNumber_Add_object_object(__pyx_t_4, __pyx_t_9);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 560, __pyx_L1_error)
18622 __Pyx_GOTREF(__pyx_t_8);
18623 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18624 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18625 __pyx_t_9 = __Pyx_PyNumber_Multiply_float_object(__pyx_mstate_global->__pyx_float_0_85, __pyx_t_8);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 560, __pyx_L1_error)
18626 __Pyx_GOTREF(__pyx_t_9);
18627 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18628 __pyx_t_8 = __Pyx_PyNumber_Add_object_object(__pyx_t_5, __pyx_t_9);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 560, __pyx_L1_error)
18629 __Pyx_GOTREF(__pyx_t_8);
18630 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18631 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18640 __pyx_t_9 = PyList_New(3);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 558, __pyx_L1_error)
18641 __Pyx_GOTREF(__pyx_t_9);
18642 __Pyx_GIVEREF(__pyx_t_10);
18643 if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 558, __pyx_L1_error);
18644 __Pyx_GIVEREF(__pyx_t_1);
18645 if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 558, __pyx_L1_error);
18646 __Pyx_GIVEREF(__pyx_t_8);
18647 if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 2, __pyx_t_8) != (0)) __PYX_ERR(0, 558, __pyx_L1_error);
18651 __Pyx_DECREF_SET(__pyx_v_cam, __pyx_t_9);
18671 __pyx_t_9 = PyList_New(0);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L16_error)
18672 __Pyx_GOTREF(__pyx_t_9);
18682 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 562, __pyx_L16_error)
18683 __Pyx_GOTREF(__pyx_t_10);
18684 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L16_error)
18685 __Pyx_GOTREF(__pyx_t_5);
18686 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18687 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 562, __pyx_L16_error)
18688 __Pyx_GOTREF(__pyx_t_10);
18689 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L16_error)
18690 __Pyx_GOTREF(__pyx_t_4);
18691 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18694 PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_5, __pyx_t_4};
18695 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
18696 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
18697 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18698 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18699 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 562, __pyx_L16_error)
18700 __Pyx_GOTREF(__pyx_t_8);
18702 if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
18703 __pyx_t_4 = __pyx_t_8; __Pyx_INCREF(__pyx_t_4);
18707 __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L16_error)
18708 __Pyx_GOTREF(__pyx_t_4);
18709 __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 562, __pyx_L16_error)
18711 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18713 if (likely(!__pyx_t_11)) {
18714 if (likely(PyList_CheckExact(__pyx_t_4))) {
18716 Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
18717 #if !CYTHON_ASSUME_SAFE_SIZE
18718 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 562, __pyx_L16_error)
18720 if (__pyx_t_3 >= __pyx_temp)
break;
18722 __pyx_t_8 = __Pyx_PyList_GET_ITEM_REF(__pyx_t_4, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
18726 Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
18727 #if !CYTHON_ASSUME_SAFE_SIZE
18728 if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 562, __pyx_L16_error)
18730 if (__pyx_t_3 >= __pyx_temp)
break;
18732 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18733 __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3));
18735 __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3);
18739 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 562, __pyx_L16_error)
18741 __pyx_t_8 = __pyx_t_11(__pyx_t_4);
18742 if (unlikely(!__pyx_t_8)) {
18743 PyObject* exc_type = PyErr_Occurred();
18745 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 562, __pyx_L16_error)
18751 __Pyx_GOTREF(__pyx_t_8);
18752 if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
18753 PyObject* sequence = __pyx_t_8;
18754 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
18755 if (unlikely(size != 2)) {
18756 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
18757 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
18758 __PYX_ERR(0, 562, __pyx_L16_error)
18760 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18761 if (likely(PyTuple_CheckExact(sequence))) {
18762 __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
18763 __Pyx_INCREF(__pyx_t_5);
18764 __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
18765 __Pyx_INCREF(__pyx_t_1);
18767 __pyx_t_5 = __Pyx_PyList_GET_ITEM_REF(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
18768 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L16_error)
18769 __Pyx_XGOTREF(__pyx_t_5);
18770 __pyx_t_1 = __Pyx_PyList_GET_ITEM_REF(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
18771 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L16_error)
18772 __Pyx_XGOTREF(__pyx_t_1);
18775 __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L16_error)
18776 __Pyx_GOTREF(__pyx_t_5);
18777 __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L16_error)
18778 __Pyx_GOTREF(__pyx_t_1);
18780 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18782 Py_ssize_t index = -1;
18783 __pyx_t_10 = PyObject_GetIter(__pyx_t_8);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 562, __pyx_L16_error)
18784 __Pyx_GOTREF(__pyx_t_10);
18785 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18786 __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
18787 index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_10);
if (unlikely(!__pyx_t_5))
goto __pyx_L19_unpacking_failed;
18788 __Pyx_GOTREF(__pyx_t_5);
18789 index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_10);
if (unlikely(!__pyx_t_1))
goto __pyx_L19_unpacking_failed;
18790 __Pyx_GOTREF(__pyx_t_1);
18791 if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 562, __pyx_L16_error)
18793 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18794 goto __pyx_L20_unpacking_done;
18795 __pyx_L19_unpacking_failed:;
18796 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18798 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
18799 __PYX_ERR(0, 562, __pyx_L16_error)
18800 __pyx_L20_unpacking_done:;
18802 __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_x, __pyx_t_5);
18804 __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_L, __pyx_t_1);
18814 __pyx_t_8 = __Pyx_PyNumber_Add_object_object(__pyx_9genexpr11__pyx_v_x, __pyx_9genexpr11__pyx_v_L);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 561, __pyx_L16_error)
18815 __Pyx_GOTREF(__pyx_t_8);
18816 __pyx_t_1 = __Pyx_PyNumber_Multiply_float_object(__pyx_mstate_global->__pyx_float_0_5, __pyx_t_8);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L16_error)
18817 __Pyx_GOTREF(__pyx_t_1);
18818 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18819 __Pyx_GIVEREF(__pyx_t_1);
18820 if (unlikely(__Pyx_ListComp_AppendAndDecref(__pyx_t_9, __pyx_t_1))) __PYX_ERR(0, 561, __pyx_L16_error)
18831 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18832 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_L); __pyx_9genexpr11__pyx_v_L = 0;
18833 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x); __pyx_9genexpr11__pyx_v_x = 0;
18834 goto __pyx_L22_exit_scope;
18836 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_L); __pyx_9genexpr11__pyx_v_L = 0;
18837 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x); __pyx_9genexpr11__pyx_v_x = 0;
18838 goto __pyx_L1_error;
18839 __pyx_L22_exit_scope:;
18841 __pyx_v_light = ((PyObject*)__pyx_t_9);
18851 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 563, __pyx_L1_error)
18852 __Pyx_GOTREF(__pyx_t_9);
18853 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
18854 __Pyx_GOTREF(__pyx_t_4);
18855 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18856 __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 563, __pyx_L1_error)
18857 __Pyx_GOTREF(__pyx_t_9);
18858 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18859 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
18860 __Pyx_GOTREF(__pyx_t_4);
18861 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
18862 __Pyx_GOTREF(__pyx_t_1);
18863 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18864 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
18865 __Pyx_GOTREF(__pyx_t_4);
18866 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18867 __pyx_t_1 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_5, __pyx_t_4, 5, 0, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
18868 __Pyx_GOTREF(__pyx_t_1);
18869 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18870 __pyx_t_4 = __Pyx_PyNumber_Add_object_object(__pyx_t_9, __pyx_t_1);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
18871 __Pyx_GOTREF(__pyx_t_4);
18872 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18873 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18874 if (unlikely((__Pyx_SetItemInt(__pyx_v_light, 2, __pyx_t_4,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 563, __pyx_L1_error)
18875 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18884 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error)
18885 __Pyx_GOTREF(__pyx_t_4);
18886 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
18887 __Pyx_GOTREF(__pyx_t_1);
18888 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18889 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error)
18890 __Pyx_GOTREF(__pyx_t_4);
18891 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18892 __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_light, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
18893 __Pyx_GOTREF(__pyx_t_1);
18894 __pyx_t_9 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_4, __pyx_t_1);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 564, __pyx_L1_error)
18895 __Pyx_GOTREF(__pyx_t_9);
18896 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18897 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18906 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
18907 __Pyx_GOTREF(__pyx_t_1);
18908 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error)
18909 __Pyx_GOTREF(__pyx_t_4);
18910 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18911 __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
18912 __Pyx_GOTREF(__pyx_t_1);
18913 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18914 __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_light, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error)
18915 __Pyx_GOTREF(__pyx_t_4);
18916 __pyx_t_8 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_1, __pyx_t_4);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 565, __pyx_L1_error)
18917 __Pyx_GOTREF(__pyx_t_8);
18918 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18919 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18920 __pyx_v_light_dx = __pyx_t_9;
18922 __pyx_v_light_dy = __pyx_t_8;
18932 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 566, __pyx_L1_error)
18933 __Pyx_GOTREF(__pyx_t_8);
18934 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 566, __pyx_L1_error)
18935 __Pyx_GOTREF(__pyx_t_9);
18936 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18937 __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 566, __pyx_L1_error)
18938 __Pyx_GOTREF(__pyx_t_8);
18939 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18948 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 567, __pyx_L1_error)
18949 __Pyx_GOTREF(__pyx_t_9);
18950 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error)
18951 __Pyx_GOTREF(__pyx_t_4);
18952 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18953 __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 567, __pyx_L1_error)
18954 __Pyx_GOTREF(__pyx_t_9);
18955 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18964 __pyx_t_4 = __Pyx_PyNumber_Multiply_float_object(__pyx_mstate_global->__pyx_float_0_01, __pyx_t_9);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
18965 __Pyx_GOTREF(__pyx_t_4);
18966 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18967 __pyx_t_9 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_8, __pyx_t_4);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 566, __pyx_L1_error)
18968 __Pyx_GOTREF(__pyx_t_9);
18969 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18970 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18971 __pyx_v_floor_z = __pyx_t_9;
18981 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 568, __pyx_L1_error)
18982 __Pyx_GOTREF(__pyx_t_9);
18983 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
18984 __Pyx_GOTREF(__pyx_t_4);
18985 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18986 __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 568, __pyx_L1_error)
18987 __Pyx_GOTREF(__pyx_t_9);
18988 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18997 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error)
18998 __Pyx_GOTREF(__pyx_t_4);
18999 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 569, __pyx_L1_error)
19000 __Pyx_GOTREF(__pyx_t_8);
19001 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19002 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error)
19003 __Pyx_GOTREF(__pyx_t_4);
19004 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19013 __pyx_t_8 = __Pyx_PyNumber_Multiply_float_object(__pyx_mstate_global->__pyx_float_2_0, __pyx_t_4);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 568, __pyx_L1_error)
19014 __Pyx_GOTREF(__pyx_t_8);
19015 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19016 __pyx_t_4 = __Pyx_PyNumber_Subtract_object_object(__pyx_t_9, __pyx_t_8);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
19017 __Pyx_GOTREF(__pyx_t_4);
19018 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19019 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19020 __pyx_v_wall_y = __pyx_t_4;
19030 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error)
19031 __Pyx_GOTREF(__pyx_t_4);
19032 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_x);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 570, __pyx_L1_error)
19033 __Pyx_GOTREF(__pyx_t_8);
19034 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19035 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error)
19036 __Pyx_GOTREF(__pyx_t_4);
19037 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19038 __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_domain);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 570, __pyx_L1_error)
19039 __Pyx_GOTREF(__pyx_t_8);
19040 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_L);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 570, __pyx_L1_error)
19041 __Pyx_GOTREF(__pyx_t_9);
19042 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19043 __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 570, __pyx_L1_error)
19044 __Pyx_GOTREF(__pyx_t_8);
19045 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19046 __pyx_t_9 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_10, __pyx_t_8, 10, 0, 0);
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 570, __pyx_L1_error)
19047 __Pyx_GOTREF(__pyx_t_9);
19048 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19049 __pyx_t_8 = __Pyx_PyNumber_Add_object_object(__pyx_t_4, __pyx_t_9);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 570, __pyx_L1_error)
19050 __Pyx_GOTREF(__pyx_t_8);
19051 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19052 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19053 __pyx_v_sky_z = __pyx_t_8;
19063 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_mstate_global->__pyx_tuple[7], NULL);
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 571, __pyx_L1_error)
19064 __Pyx_GOTREF(__pyx_t_8);
19065 __pyx_v_pov = __pyx_t_8;
19076 __Pyx_INCREF(__pyx_v_Template);
19077 __pyx_t_4 = __pyx_v_Template;
19079 #if CYTHON_UNPACK_METHODS
19080 if (unlikely(PyMethod_Check(__pyx_t_4))) {
19081 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
19083 PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
19084 __Pyx_INCREF(__pyx_t_9);
19085 __Pyx_INCREF(__pyx__function);
19086 __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
19091 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_include_colors_inc_include_text};
19092 __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
19093 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
19094 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19095 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 572, __pyx_L1_error)
19096 __Pyx_GOTREF(__pyx_t_8);
19098 __pyx_v_povSceneTemplate = __pyx_t_8;
19108 __pyx_t_4 = __pyx_v_pov;
19109 __Pyx_INCREF(__pyx_t_4);
19110 __pyx_t_1 = __pyx_v_povSceneTemplate;
19111 __Pyx_INCREF(__pyx_t_1);
19112 __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_look_at, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 714, __pyx_L1_error)
19113 __Pyx_GOTREF(__pyx_t_5);
19122 __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_look_at, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 715, __pyx_L1_error)
19123 __Pyx_GOTREF(__pyx_t_10);
19132 __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_look_at, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 716, __pyx_L1_error)
19133 __Pyx_GOTREF(__pyx_t_13);
19142 __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_cam, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument);
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 717, __pyx_L1_error)
19143 __Pyx_GOTREF(__pyx_t_14);
19152 __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_cam, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument);
if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 718, __pyx_L1_error)
19153 __Pyx_GOTREF(__pyx_t_15);
19162 __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_cam, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument);
if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 719, __pyx_L1_error)
19163 __Pyx_GOTREF(__pyx_t_16);
19172 __pyx_t_17 = __Pyx_GetItemInt_List(__pyx_v_light, 0,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 720, __pyx_L1_error)
19173 __Pyx_GOTREF(__pyx_t_17);
19182 __pyx_t_18 = __Pyx_GetItemInt_List(__pyx_v_light, 1,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 721, __pyx_L1_error)
19183 __Pyx_GOTREF(__pyx_t_18);
19192 __pyx_t_19 = __Pyx_GetItemInt_List(__pyx_v_light, 2,
long, 1, __Pyx_PyLong_From_long, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference);
if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 722, __pyx_L1_error)
19193 __Pyx_GOTREF(__pyx_t_19);
19204 PyObject *__pyx_callargs[15] = {__pyx_t_1, __pyx_t_5, __pyx_t_10, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_v_light_dx, __pyx_v_light_dy, __pyx_v_floor_z, __pyx_v_wall_y, __pyx_v_sky_z};
19205 #if CYTHON_VECTORCALL
19206 __pyx_t_20 = __pyx_mstate_global->__pyx_tuple[8];
19207 if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 714, __pyx_L1_error)
19208 __Pyx_INCREF(__pyx_t_20);
19211 PyObject *__pyx_temp[14] = {__pyx_mstate_global->__pyx_n_u_look_at_x, __pyx_mstate_global->__pyx_n_u_look_at_y, __pyx_mstate_global->__pyx_n_u_look_at_z, __pyx_mstate_global->__pyx_n_u_cam_x, __pyx_mstate_global->__pyx_n_u_cam_y, __pyx_mstate_global->__pyx_n_u_cam_z, __pyx_mstate_global->__pyx_n_u_light_x, __pyx_mstate_global->__pyx_n_u_light_y, __pyx_mstate_global->__pyx_n_u_light_z, __pyx_mstate_global->__pyx_n_u_light_dx, __pyx_mstate_global->__pyx_n_u_light_dy, __pyx_mstate_global->__pyx_n_u_floor_z, __pyx_mstate_global->__pyx_n_u_wall_y, __pyx_mstate_global->__pyx_n_u_sky_z};
19212 __pyx_t_20 = __Pyx_MakeKwargDict(__pyx_temp, __pyx_callargs+1, 14);
19213 if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 714, __pyx_L1_error)
19214 __Pyx_GOTREF(__pyx_t_20);
19217 __pyx_t_9 = __Pyx_Object_VectorcallMethodKwds((PyObject*)__pyx_mstate_global->__pyx_n_u_substitute, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_20);
19218 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
19219 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19220 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19221 __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
19222 __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19223 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19224 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
19225 __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
19226 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
19227 __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
19228 __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
19229 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 714, __pyx_L1_error)
19230 __Pyx_GOTREF(__pyx_t_9);
19234 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
19235 __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_write, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
19236 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
19237 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19238 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 714, __pyx_L1_error)
19239 __Pyx_GOTREF(__pyx_t_8);
19241 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19248 __pyx_t_9 = __pyx_v_pov;
19249 __Pyx_INCREF(__pyx_t_9);
19252 PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
19253 __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
19254 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
19255 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 730, __pyx_L1_error)
19256 __Pyx_GOTREF(__pyx_t_8);
19258 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19278 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19281 __Pyx_XDECREF(__pyx_t_1);
19282 __Pyx_XDECREF(__pyx_t_4);
19283 __Pyx_XDECREF(__pyx_t_5);
19284 __Pyx_XDECREF(__pyx_t_8);
19285 __Pyx_XDECREF(__pyx_t_9);
19286 __Pyx_XDECREF(__pyx_t_10);
19287 __Pyx_XDECREF(__pyx_t_13);
19288 __Pyx_XDECREF(__pyx_t_14);
19289 __Pyx_XDECREF(__pyx_t_15);
19290 __Pyx_XDECREF(__pyx_t_16);
19291 __Pyx_XDECREF(__pyx_t_17);
19292 __Pyx_XDECREF(__pyx_t_18);
19293 __Pyx_XDECREF(__pyx_t_19);
19294 __Pyx_XDECREF(__pyx_t_20);
19295 __Pyx_AddTraceback(
"Isosurface.Isosurface.writeSceneHeader", __pyx_clineno, __pyx_lineno, __pyx_filename);
19298 __Pyx_XDECREF(__pyx_v_Template);
19299 __Pyx_XDECREF(__pyx_v_look_at);
19300 __Pyx_XDECREF(__pyx_v_light);
19301 __Pyx_XDECREF(__pyx_v_light_dx);
19302 __Pyx_XDECREF(__pyx_v_light_dy);
19303 __Pyx_XDECREF(__pyx_v_floor_z);
19304 __Pyx_XDECREF(__pyx_v_wall_y);
19305 __Pyx_XDECREF(__pyx_v_sky_z);
19306 __Pyx_XDECREF(__pyx_v_pov);
19307 __Pyx_XDECREF(__pyx_v_povSceneTemplate);
19308 __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_x);
19309 __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_L);
19310 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x);
19311 __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_L);
19312 __Pyx_XDECREF(__pyx_v_cam);
19313 __Pyx_XGIVEREF(__pyx_r);
19314 __Pyx_RefNannyFinishContext();
19319static PyObject *__pyx_tp_new__initialisation_10Isosurface___pyx_scope_struct__genexpr(PyObject *o,
19320#
if CYTHON_VECTORCALL_TPNEW
19321 CYTHON_UNUSED PyObject *
const *args, CYTHON_UNUSED Py_ssize_t nargs, CYTHON_UNUSED PyObject *kwnames
19323 CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k
19329static PyObject *__pyx_tp_new_vectorcall_10Isosurface___pyx_scope_struct__genexpr(PyTypeObject *t,
19330#
if CYTHON_VECTORCALL_TPNEW
19331 PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames
19333 PyObject *a, PyObject *k
19337 #if CYTHON_USE_FREELISTS
19338 if (likely((
int)(__pyx_mstate_global->__pyx_freecount_10Isosurface___pyx_scope_struct__genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr,
sizeof(
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr))))
19340 o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10Isosurface___pyx_scope_struct__genexpr[--__pyx_mstate_global->__pyx_freecount_10Isosurface___pyx_scope_struct__genexpr];
19341 #if CYTHON_USE_TYPE_SPECS
19342 Py_DECREF(Py_TYPE(o));
19344 memset(o, 0,
sizeof(
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr));
19345 #if CYTHON_COMPILING_IN_LIMITED_API
19346 (void) PyObject_Init(o, t);
19348 (void) PyObject_INIT(o, t);
19350 PyObject_GC_Track(o);
19354 o = __Pyx_AllocateExtensionType(t, 1);
19356 if (unlikely(!o))
return 0;
19357 return __pyx_tp_new__initialisation_10Isosurface___pyx_scope_struct__genexpr(o,
19358#
if CYTHON_VECTORCALL_TPNEW
19359 args, nargs, kwnames
19366#if CYTHON_VECTORCALL_TPNEW
19367static PyObject *__pyx_tp_new_10Isosurface___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k) {
19368 return __Pyx_CallTpnewAsVectorcall(__pyx_tp_new_vectorcall_10Isosurface___pyx_scope_struct__genexpr, t, a, k);
19372#if CYTHON_VECTORCALL_TPNEW
19373static PyObject *__pyx_tp_vectorcall_10Isosurface___pyx_scope_struct__genexpr(PyObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames) {
19374 if (unlikely((PyTypeObject*)t != __pyx_mstate_global->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr || __Pyx_PyType_HasFeature((PyTypeObject*)t, Py_TPFLAGS_IS_ABSTRACT))) {
19375 return __Pyx_CallNewInitFromVectorcall((PyTypeObject*)t, args, nargsf, kwnames);
19377 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
19378 PyObject *o = __pyx_tp_new_vectorcall_10Isosurface___pyx_scope_struct__genexpr((PyTypeObject*)t, args, nargs, kwnames);
19383static void __pyx_tp_dealloc_10Isosurface___pyx_scope_struct__genexpr(PyObject *o) {
19384 struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *p = (
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *)o;
19385 #if CYTHON_USE_TP_FINALIZE
19386 if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
19387 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10Isosurface___pyx_scope_struct__genexpr) {
19388 if (PyObject_CallFinalizerFromDealloc(o))
return;
19392 PyObject_GC_UnTrack(o);
19393 Py_CLEAR(p->__pyx_genexpr_arg_0);
19394 Py_CLEAR(p->__pyx_v_bn);
19395 Py_CLEAR(p->__pyx_v_gn);
19396 #if CYTHON_USE_FREELISTS
19397 if (likely((
int)(__pyx_mstate_global->__pyx_freecount_10Isosurface___pyx_scope_struct__genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr,
sizeof(
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr))))
19399 __pyx_mstate_global->__pyx_freelist_10Isosurface___pyx_scope_struct__genexpr[__pyx_mstate_global->__pyx_freecount_10Isosurface___pyx_scope_struct__genexpr++] = ((
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *)o);
19403 PyTypeObject *tp = Py_TYPE(o);
19404 #if CYTHON_USE_TYPE_SLOTS
19408 freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
19409 if (tp_free) tp_free(o);
19412 #if CYTHON_USE_TYPE_SPECS
19418static int __pyx_tp_traverse_10Isosurface___pyx_scope_struct__genexpr(PyObject *o, visitproc
v,
void *a) {
19420 struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *p = (
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr *)o;
19422 e = __Pyx_call_type_traverse(o, 1,
v, a);
19425 if (p->__pyx_genexpr_arg_0) {
19426 e = (*v)(p->__pyx_genexpr_arg_0, a);
if (e)
return e;
19428 if (p->__pyx_v_bn) {
19429 e = (*v)(p->__pyx_v_bn, a);
if (e)
return e;
19431 if (p->__pyx_v_gn) {
19432 e = (*v)(p->__pyx_v_gn, a);
if (e)
return e;
19436#if CYTHON_USE_TYPE_SPECS
19437static PyType_Slot __pyx_type_10Isosurface___pyx_scope_struct__genexpr_slots[] = {
19438 {Py_tp_dealloc, (
void *)__pyx_tp_dealloc_10Isosurface___pyx_scope_struct__genexpr},
19439 {Py_tp_traverse, (
void *)__pyx_tp_traverse_10Isosurface___pyx_scope_struct__genexpr},
19440 {Py_tp_new, (
void *)__pyx_tp_new_10Isosurface___pyx_scope_struct__genexpr},
19441 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
19442 #if CYTHON_VECTORCALL_TPNEW
19443 {Py_tp_vectorcall, (
void *)__pyx_tp_vectorcall_10Isosurface___pyx_scope_struct__genexpr},
19448static PyType_Spec __pyx_type_10Isosurface___pyx_scope_struct__genexpr_spec = {
19449 "Isosurface.__pyx_scope_struct__genexpr",
19450 sizeof(
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr),
19452 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
19453 __pyx_type_10Isosurface___pyx_scope_struct__genexpr_slots,
19457static PyTypeObject __pyx_type_10Isosurface___pyx_scope_struct__genexpr = {
19458 PyVarObject_HEAD_INIT(0, 0)
19459 "Isosurface.""__pyx_scope_struct__genexpr",
19460 sizeof(
struct __pyx_obj_10Isosurface___pyx_scope_struct__genexpr),
19462 __pyx_tp_dealloc_10Isosurface___pyx_scope_struct__genexpr,
19477 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_HAVE_GC,
19479 __pyx_tp_traverse_10Isosurface___pyx_scope_struct__genexpr,
19492 #if !CYTHON_USE_TYPE_SPECS
19497 __pyx_tp_new_10Isosurface___pyx_scope_struct__genexpr,
19507 #if CYTHON_USE_TP_FINALIZE
19512 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) && (!CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
19513 #if CYTHON_VECTORCALL_TPNEW
19514 __pyx_tp_vectorcall_10Isosurface___pyx_scope_struct__genexpr,
19519 #if __PYX_NEED_TP_PRINT_SLOT == 1
19522 #if PY_VERSION_HEX >= 0x030C0000
19525 #if PY_VERSION_HEX >= 0x030d00A4
19528 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x030a0000
19534static PyMethodDef __pyx_methods[] = {
19538static CYTHON_SMALL_CODE
int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate);
19539static CYTHON_SMALL_CODE
int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate);
19540static CYTHON_SMALL_CODE
int __Pyx_InitGlobals(
void);
19541static CYTHON_SMALL_CODE
int __Pyx_InitAfterSharedUtility(
void);
19542static CYTHON_SMALL_CODE
int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate);
19543static CYTHON_SMALL_CODE
int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate);
19544static CYTHON_SMALL_CODE
int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate);
19545static CYTHON_SMALL_CODE
int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate);
19546static CYTHON_SMALL_CODE
int __Pyx_modinit_Exttype___pyx_obj_10Isosurface___pyx_scope_struct__genexpr(__pyx_mstatetype *__pyx_mstate);
19547static CYTHON_SMALL_CODE
int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate);
19548static CYTHON_SMALL_CODE
int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate);
19549static CYTHON_SMALL_CODE
int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate);
19550static CYTHON_SMALL_CODE
int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate);
19553static int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate) {
19554 __Pyx_RefNannyDeclarations
19555 CYTHON_UNUSED_VAR(__pyx_mstate);
19556 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Global_init_code", 0);
19558 __Pyx_RefNannyFinishContext();
19562static int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate) {
19563 __Pyx_RefNannyDeclarations
19564 CYTHON_UNUSED_VAR(__pyx_mstate);
19565 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Variable_export_code", 0);
19567 __Pyx_RefNannyFinishContext();
19571static int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate) {
19572 __Pyx_RefNannyDeclarations
19573 CYTHON_UNUSED_VAR(__pyx_mstate);
19574 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Function_export_code", 0);
19576 __Pyx_RefNannyFinishContext();
19580static int __Pyx_modinit_Exttype___pyx_obj_10Isosurface___pyx_scope_struct__genexpr(__pyx_mstatetype *__pyx_mstate) {
19581 __Pyx_RefNannyDeclarations
19582 int __pyx_lineno = 0;
19583 const char *__pyx_filename = NULL;
19584 int __pyx_clineno = 0;
19585 CYTHON_UNUSED_VAR(__pyx_mstate);
19586 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Exttype___pyx_obj_10Isosurface___pyx_scope_struct__genexpr", 0);
19588 #if CYTHON_USE_TYPE_SPECS
19589 __pyx_mstate->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10Isosurface___pyx_scope_struct__genexpr_spec, NULL);
if (unlikely(!__pyx_mstate->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr)) __PYX_ERR(0, 122, __pyx_L1_error)
19591 __pyx_mstate->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr = &__pyx_type_10Isosurface___pyx_scope_struct__genexpr;
19593 #if !CYTHON_COMPILING_IN_LIMITED_API
19595 #if !CYTHON_USE_TYPE_SPECS
19596 if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 122, __pyx_L1_error)
19598 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
19599 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr);
19601 #if !CYTHON_COMPILING_IN_LIMITED_API
19602 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr->tp_getattro == PyObject_GenericGetAttr)) {
19603 __pyx_mstate->__pyx_ptype_10Isosurface___pyx_scope_struct__genexpr->tp_getattro = PyObject_GenericGetAttr;
19606 __Pyx_RefNannyFinishContext();
19609 __Pyx_RefNannyFinishContext();
19613static int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate) {
19614 __Pyx_RefNannyDeclarations
19615 PyObject *__pyx_t_1 = NULL;
19616 int __pyx_lineno = 0;
19617 const char *__pyx_filename = NULL;
19618 int __pyx_clineno = 0;
19619 CYTHON_UNUSED_VAR(__pyx_mstate);
19620 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Type_import_code", 0);
19622 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
19623 __Pyx_GOTREF(__pyx_t_1);
19624 __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_3_0(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME,
"type",
19625 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19626 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyTypeObject),
19627 #elif CYTHON_COMPILING_IN_LIMITED_API
19630 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyHeapTypeObject),
19632 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
19633 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19634 __pyx_t_1 = PyImport_ImportModule(
"numpy");
if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
19635 __Pyx_GOTREF(__pyx_t_1);
19636 __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"dtype",
19637 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19638 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
19639 #elif CYTHON_COMPILING_IN_LIMITED_API
19640 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
19642 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
19644 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 229, __pyx_L1_error)
19645 __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"flatiter",
19646 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19647 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
19648 #elif CYTHON_COMPILING_IN_LIMITED_API
19649 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
19651 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
19653 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 286, __pyx_L1_error)
19654 __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"broadcast",
19655 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19656 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
19657 #elif CYTHON_COMPILING_IN_LIMITED_API
19658 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
19660 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
19662 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 290, __pyx_L1_error)
19663 __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"ndarray",
19664 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19665 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
19666 #elif CYTHON_COMPILING_IN_LIMITED_API
19667 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
19669 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
19671 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 329, __pyx_L1_error)
19672 __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"generic",
19673 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19674 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19675 #elif CYTHON_COMPILING_IN_LIMITED_API
19676 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19678 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19680 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(1, 847, __pyx_L1_error)
19681 __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"number",
19682 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19683 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19684 #elif CYTHON_COMPILING_IN_LIMITED_API
19685 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19687 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19689 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(1, 849, __pyx_L1_error)
19690 __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"integer",
19691 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19692 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19693 #elif CYTHON_COMPILING_IN_LIMITED_API
19694 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19696 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19698 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(1, 851, __pyx_L1_error)
19699 __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"signedinteger",
19700 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19701 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19702 #elif CYTHON_COMPILING_IN_LIMITED_API
19703 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19705 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19707 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 853, __pyx_L1_error)
19708 __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"unsignedinteger",
19709 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19710 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19711 #elif CYTHON_COMPILING_IN_LIMITED_API
19712 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19714 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19716 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 855, __pyx_L1_error)
19717 __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"inexact",
19718 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19719 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19720 #elif CYTHON_COMPILING_IN_LIMITED_API
19721 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19723 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19725 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 857, __pyx_L1_error)
19726 __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"floating",
19727 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19728 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19729 #elif CYTHON_COMPILING_IN_LIMITED_API
19730 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19732 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19734 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(1, 859, __pyx_L1_error)
19735 __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"complexfloating",
19736 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19737 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19738 #elif CYTHON_COMPILING_IN_LIMITED_API
19739 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19741 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19743 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 861, __pyx_L1_error)
19744 __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"flexible",
19745 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19746 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19747 #elif CYTHON_COMPILING_IN_LIMITED_API
19748 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19750 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19752 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 863, __pyx_L1_error)
19753 __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"character",
19754 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19755 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19756 #elif CYTHON_COMPILING_IN_LIMITED_API
19757 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19759 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
19761 __Pyx_ImportType_CheckSize_Warn_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(1, 865, __pyx_L1_error)
19762 __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_3_0(__pyx_t_1,
"numpy",
"ufunc",
19763 #
if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
19764 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
19765 #elif CYTHON_COMPILING_IN_LIMITED_API
19766 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
19768 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
19770 __Pyx_ImportType_CheckSize_Ignore_3_3_0);
if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 946, __pyx_L1_error)
19771 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19772 __Pyx_RefNannyFinishContext();
19775 __Pyx_XDECREF(__pyx_t_1);
19776 __Pyx_RefNannyFinishContext();
19780static int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate) {
19781 __Pyx_RefNannyDeclarations
19782 CYTHON_UNUSED_VAR(__pyx_mstate);
19783 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Variable_import_code", 0);
19785 __Pyx_RefNannyFinishContext();
19789static int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate) {
19790 __Pyx_RefNannyDeclarations
19791 CYTHON_UNUSED_VAR(__pyx_mstate);
19792 __Pyx_RefNannySetupContext(
"__Pyx_modinit_Function_import_code", 0);
19794 __Pyx_RefNannyFinishContext();
19798#if CYTHON_PEP489_MULTI_PHASE_INIT
19799static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def);
19800static int __pyx_pymod_exec_Isosurface(PyObject* module);
19801static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19802 {Py_mod_create, (
void*)__pyx_pymod_create},
19803 {Py_mod_exec, (
void*)__pyx_pymod_exec_Isosurface},
19804 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
19805 {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
19807 #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
19808 {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
19816 struct PyModuleDef __pyx_moduledef =
19818 static struct PyModuleDef __pyx_moduledef =
19821 PyModuleDef_HEAD_INIT,
19823 __pyx_k_AuxiliaryVariables_subclasses_f,
19824 #if CYTHON_USE_MODULE_STATE
19825 sizeof(__pyx_mstatetype),
19827 (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1,
19830 #if CYTHON_PEP489_MULTI_PHASE_INIT
19831 __pyx_moduledef_slots,
19835 #if CYTHON_USE_MODULE_STATE
19850#ifndef CYTHON_NO_PYINIT_EXPORT
19851 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19854 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
19856 #define __Pyx_PyMODINIT_FUNC PyObject *
19860__Pyx_PyMODINIT_FUNC PyInit_Isosurface(
void) CYTHON_SMALL_CODE;
19861__Pyx_PyMODINIT_FUNC PyInit_Isosurface(
void)
19862#if CYTHON_PEP489_MULTI_PHASE_INIT
19864 return PyModuleDef_Init(&__pyx_moduledef);
19867#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
19868 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
19869static PY_INT64_T __Pyx_GetCurrentInterpreterId(
void) {
19871 PyObject *module = PyImport_ImportModule(
"_interpreters");
19873 if (!PyErr_ExceptionMatches(PyExc_Exception)) {
19877 module = PyImport_ImportModule("_xxsubinterpreters");
19878 if (!module)
goto bad;
19880 PyObject *current = PyObject_CallMethod(module,
"get_current", NULL);
19882 if (!current)
goto bad;
19883 if (PyTuple_Check(current)) {
19884 PyObject *new_current = PySequence_GetItem(current, 0);
19885 Py_DECREF(current);
19886 current = new_current;
19887 if (!new_current)
goto bad;
19889 long long as_c_int = PyLong_AsLongLong(current);
19890 Py_DECREF(current);
19894 PySys_WriteStderr(
"__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
19898#if !CYTHON_USE_MODULE_STATE
19899static CYTHON_SMALL_CODE
int __Pyx_check_single_interpreter(
void) {
19900 static PY_INT64_T main_interpreter_id = -1;
19901#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
19902 PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
19903#elif CYTHON_COMPILING_IN_GRAAL
19904 PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
19905#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
19906 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
19907 PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
19908#elif CYTHON_COMPILING_IN_LIMITED_API
19909 PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
19911 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
19913 if (unlikely(current_id == -1)) {
19916 if (main_interpreter_id == -1) {
19917 main_interpreter_id = current_id;
19919 }
else if (unlikely(main_interpreter_id != current_id)) {
19922 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
19928static CYTHON_SMALL_CODE
int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict,
const char* from_name,
const char* to_name,
int allow_none)
19930 PyObject *value = PyObject_GetAttrString(spec, from_name);
19932 if (likely(value)) {
19933 if (allow_none || value != Py_None) {
19934 result = PyDict_SetItemString(moddict, to_name, value);
19937 }
else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19944static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
19945 PyObject *module = NULL, *moddict, *modname;
19946 CYTHON_UNUSED_VAR(def);
19947 #if !CYTHON_USE_MODULE_STATE
19948 if (__Pyx_check_single_interpreter())
19952 return __Pyx_NewRef(__pyx_m);
19953 modname = PyObject_GetAttrString(spec,
"name");
19954 if (unlikely(!modname))
goto bad;
19955 module = PyModule_NewObject(modname);
19956 Py_DECREF(modname);
19957 if (unlikely(!module))
goto bad;
19958 moddict = PyModule_GetDict(module);
19959 if (unlikely(!moddict))
goto bad;
19960 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"loader",
"__loader__", 1) < 0))
goto bad;
19961 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"origin",
"__file__", 1) < 0))
goto bad;
19962 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"parent",
"__package__", 1) < 0))
goto bad;
19963 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict,
"submodule_search_locations",
"__path__", 0) < 0))
goto bad;
19966 Py_XDECREF(module);
19971static CYTHON_SMALL_CODE
int __pyx_pymod_exec_Isosurface(PyObject *__pyx_pyinit_module)
19974 int stringtab_initialized = 0;
19975 #if CYTHON_USE_MODULE_STATE
19976 int pystate_addmodule_run = 0;
19978 __pyx_mstatetype *__pyx_mstate = NULL;
19979 PyObject *__pyx_t_1 = NULL;
19980 PyObject *__pyx_t_2 = NULL;
19981 Py_ssize_t __pyx_t_3;
19982 PyObject *__pyx_t_4 = NULL;
19983 PyObject *__pyx_t_5 = NULL;
19984 PyObject *__pyx_t_6 = NULL;
19985 int __pyx_lineno = 0;
19986 const char *__pyx_filename = NULL;
19987 int __pyx_clineno = 0;
19988 __Pyx_RefNannyDeclarations
19989 #if CYTHON_PEP489_MULTI_PHASE_INIT
19991 if (__pyx_m == __pyx_pyinit_module)
return 0;
19992 PyErr_SetString(PyExc_RuntimeError,
"Module 'Isosurface' has already been imported. Re-initialisation is not supported.");
19996 if (__pyx_m)
return __Pyx_NewRef(__pyx_m);
19999 #if CYTHON_PEP489_MULTI_PHASE_INIT
20000 __pyx_t_1 = __pyx_pyinit_module;
20001 Py_INCREF(__pyx_t_1);
20003 __pyx_t_1 = PyModule_Create(&__pyx_moduledef);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20005 #if CYTHON_USE_MODULE_STATE
20007 int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
20009 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
20010 pystate_addmodule_run = 1;
20013 __pyx_m = __pyx_t_1;
20015 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
20016 PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
20018 __pyx_mstate = __pyx_mstate_global;
20019 CYTHON_UNUSED_VAR(__pyx_t_1);
20020 __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m);
if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20021 Py_INCREF(__pyx_mstate->__pyx_d);
20022 __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME);
if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20023 __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef(
"cython_runtime");
if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20024 if (PyObject_SetAttrString(__pyx_m,
"__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20026 #if CYTHON_REFNANNY
20027 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"refnanny");
20028 if (!__Pyx_RefNanny) {
20029 if (PyErr_ExceptionMatches(PyExc_Exception)) {
20031 __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
"Cython.Runtime.refnanny");
20033 if (!__Pyx_RefNanny)
20034 Py_FatalError(
"failed to import 'refnanny' module");
20038__Pyx_RefNannySetupContext(
"PyInit_Isosurface", 0);
20039 __Pyx_init_runtime_version();
20040 if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20041 __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0);
if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20042 __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20043 __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize(
"", 0);
if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20046 if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20047 stringtab_initialized = 1;
20048 if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20049 if (__pyx_module_is_main_Isosurface) {
20050 if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20053 PyObject *modules = PyImport_GetModuleDict();
if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
20054 if (!PyDict_GetItemString(modules,
"Isosurface")) {
20055 if (unlikely((PyDict_SetItemString(modules,
"Isosurface", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
20059 if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20061 if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20062 if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20064 (void)__Pyx_modinit_Global_init_code(__pyx_mstate);
20065 (void)__Pyx_modinit_Variable_export_code(__pyx_mstate);
20066 (void)__Pyx_modinit_Function_export_code(__pyx_mstate);
20068 if (unlikely((__Pyx_modinit_Exttype___pyx_obj_10Isosurface___pyx_scope_struct__genexpr(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
20069 if (unlikely((__Pyx_modinit_Type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
20070 (void)__Pyx_modinit_Variable_import_code(__pyx_mstate);
20071 (void)__Pyx_modinit_Function_import_code(__pyx_mstate);
20072 if (__Pyx_InitAfterSharedUtility() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20083 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_defaultdict,__pyx_mstate_global->__pyx_n_u_OrderedDict};
20084 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_imported_names, 2, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
20086 __pyx_t_2 = __pyx_t_1;
20087 __Pyx_GOTREF(__pyx_t_2);
20089 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_defaultdict,__pyx_mstate_global->__pyx_n_u_OrderedDict};
20090 for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
20091 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7, __pyx_L1_error)
20092 __Pyx_GOTREF(__pyx_t_4);
20093 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 7, __pyx_L1_error)
20094 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20097 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20107 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_product};
20108 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_itertools, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
20110 __pyx_t_2 = __pyx_t_1;
20111 __Pyx_GOTREF(__pyx_t_2);
20113 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_product};
20115 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error)
20116 __Pyx_GOTREF(__pyx_t_4);
20117 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 8, __pyx_L1_error)
20118 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20121 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20130 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
20131 __pyx_t_2 = __pyx_t_1;
20132 __Pyx_GOTREF(__pyx_t_2);
20133 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < (0)) __PYX_ERR(0, 9, __pyx_L1_error)
20134 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20144 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MPI};
20145 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_mpi4py, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
20147 __pyx_t_2 = __pyx_t_1;
20148 __Pyx_GOTREF(__pyx_t_2);
20150 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MPI};
20152 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error)
20153 __Pyx_GOTREF(__pyx_t_4);
20154 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 12, __pyx_L1_error)
20155 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20158 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20168 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PETSc};
20169 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_petsc4py, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
20171 __pyx_t_2 = __pyx_t_1;
20172 __Pyx_GOTREF(__pyx_t_2);
20174 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PETSc};
20176 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
20177 __Pyx_GOTREF(__pyx_t_4);
20178 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 13, __pyx_L1_error)
20179 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20182 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20191 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
20192 __pyx_t_2 = __pyx_t_1;
20193 __Pyx_GOTREF(__pyx_t_2);
20194 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 14, __pyx_L1_error)
20195 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20205 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_norm};
20206 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy_linalg, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
20208 __pyx_t_2 = __pyx_t_1;
20209 __Pyx_GOTREF(__pyx_t_2);
20211 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_norm};
20213 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 16, __pyx_L1_error)
20214 __Pyx_GOTREF(__pyx_t_4);
20215 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 16, __pyx_L1_error)
20216 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20219 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20229 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Comm};
20230 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u__5, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u__2, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
20232 __pyx_t_2 = __pyx_t_1;
20233 __Pyx_GOTREF(__pyx_t_2);
20235 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Comm};
20237 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18, __pyx_L1_error)
20238 __Pyx_GOTREF(__pyx_t_4);
20239 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 18, __pyx_L1_error)
20240 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20243 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20253 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AV_base};
20254 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_AuxiliaryVariables, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_AuxiliaryVariables_2, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
20256 __pyx_t_2 = __pyx_t_1;
20257 __Pyx_GOTREF(__pyx_t_2);
20259 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AV_base};
20261 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error)
20262 __Pyx_GOTREF(__pyx_t_4);
20263 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 19, __pyx_L1_error)
20264 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20267 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20277 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Profiling};
20278 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_proteus, __pyx_imported_names, 1, NULL, 0);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
20280 __pyx_t_2 = __pyx_t_1;
20281 __Pyx_GOTREF(__pyx_t_2);
20283 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Profiling};
20285 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20, __pyx_L1_error)
20286 __Pyx_GOTREF(__pyx_t_4);
20287 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
20288 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20291 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20301 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_logEvent};
20302 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_Profiling, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_Profiling_2, 1);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
20304 __pyx_t_2 = __pyx_t_1;
20305 __Pyx_GOTREF(__pyx_t_2);
20307 PyObject*
const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_logEvent};
20309 __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21, __pyx_L1_error)
20310 __Pyx_GOTREF(__pyx_t_4);
20311 switch (__pyx_t_3) {
20313 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_log, __pyx_t_4) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
20317 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20320 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20329 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_AV_base);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
20330 __Pyx_GOTREF(__pyx_t_2);
20332 PyObject* __pyx_temp[1] = {__pyx_t_2};
20333 __pyx_t_4 = __Pyx_PyTuple_FromArray(__pyx_temp, 1);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
20334 __Pyx_GOTREF(__pyx_t_4);
20336 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20337 __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
20338 __Pyx_GOTREF(__pyx_t_2);
20339 __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2);
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error)
20340 __Pyx_GOTREF(__pyx_t_5);
20341 __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_n_u_Isosurface, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_kp_u_Extract_isosurfaces);
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error)
20342 __Pyx_GOTREF(__pyx_t_6);
20343 if (__pyx_t_2 != __pyx_t_4) {
20344 if (unlikely((PyDict_SetItemString(__pyx_t_6,
"__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 47, __pyx_L1_error)
20346 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20355 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_1__init__, 0, __pyx_mstate_global->__pyx_n_u_Isosurface___init, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error)
20356 __Pyx_GOTREF(__pyx_t_4);
20357 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20358 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20360 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[9]);
20361 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 51, __pyx_L1_error)
20362 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20371 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_3attachModel, 0, __pyx_mstate_global->__pyx_n_u_Isosurface_attachModel, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
20372 __Pyx_GOTREF(__pyx_t_4);
20373 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20374 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20376 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_attachModel, __pyx_t_4) < (0)) __PYX_ERR(0, 105, __pyx_L1_error)
20377 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20386 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_5attachHDF5, 0, __pyx_mstate_global->__pyx_n_u_Isosurface_attachHDF5, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
20387 __Pyx_GOTREF(__pyx_t_4);
20388 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20389 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20391 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[10]);
20392 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_attachHDF5, __pyx_t_4) < (0)) __PYX_ERR(0, 132, __pyx_L1_error)
20393 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20402 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_7triangulateIsosurface, 0, __pyx_mstate_global->__pyx_n_u_Isosurface_triangulateIsosurface, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
20403 __Pyx_GOTREF(__pyx_t_4);
20404 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20405 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20407 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_triangulateIsosurface, __pyx_t_4) < (0)) __PYX_ERR(0, 154, __pyx_L1_error)
20408 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20417 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_9writeIsosurfaceMesh, 0, __pyx_mstate_global->__pyx_n_u_Isosurface_writeIsosurfaceMesh, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error)
20418 __Pyx_GOTREF(__pyx_t_4);
20419 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20420 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20422 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_writeIsosurfaceMesh, __pyx_t_4) < (0)) __PYX_ERR(0, 344, __pyx_L1_error)
20423 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20432 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_11writeIsosurfaceMesh_h5, 0, __pyx_mstate_global->__pyx_n_u_Isosurface_writeIsosurfaceMesh_h, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
20433 __Pyx_GOTREF(__pyx_t_4);
20434 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20435 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20437 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_writeIsosurfaceMesh_h5, __pyx_t_4) < (0)) __PYX_ERR(0, 355, __pyx_L1_error)
20438 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20447 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_13writeIsosurfaceMesh_povray, 0, __pyx_mstate_global->__pyx_n_u_Isosurface_writeIsosurfaceMesh_p, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 372, __pyx_L1_error)
20448 __Pyx_GOTREF(__pyx_t_4);
20449 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20450 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20452 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_writeIsosurfaceMesh_povray, __pyx_t_4) < (0)) __PYX_ERR(0, 372, __pyx_L1_error)
20453 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20462 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_15calculate, 0, __pyx_mstate_global->__pyx_n_u_Isosurface_calculate, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error)
20463 __Pyx_GOTREF(__pyx_t_4);
20464 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20465 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20467 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11]);
20468 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_calculate, __pyx_t_4) < (0)) __PYX_ERR(0, 523, __pyx_L1_error)
20469 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20478 __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10Isosurface_10Isosurface_17writeSceneHeader, 0, __pyx_mstate_global->__pyx_n_u_Isosurface_writeSceneHeader, NULL, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9]));
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error)
20479 __Pyx_GOTREF(__pyx_t_4);
20480 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20481 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20483 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[10]);
20484 if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_writeSceneHeader, __pyx_t_4) < (0)) __PYX_ERR(0, 549, __pyx_L1_error)
20485 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20494 __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_t_2, __pyx_t_6, NULL, 0, 0);
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
20495 __Pyx_GOTREF(__pyx_t_4);
20496 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
20497 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
20499 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Isosurface, __pyx_t_4) < (0)) __PYX_ERR(0, 47, __pyx_L1_error)
20500 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20501 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20502 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20503 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20510 __pyx_t_2 = __Pyx_PyDict_NewPresized(0);
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
20511 __Pyx_GOTREF(__pyx_t_2);
20512 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
20513 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20519 __Pyx_XDECREF(__pyx_t_2);
20520 __Pyx_XDECREF(__pyx_t_4);
20521 __Pyx_XDECREF(__pyx_t_5);
20522 __Pyx_XDECREF(__pyx_t_6);
20524 if (__pyx_mstate->__pyx_d && stringtab_initialized) {
20525 __Pyx_AddTraceback(
"init Isosurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
20527 #if !CYTHON_USE_MODULE_STATE
20530 Py_DECREF(__pyx_m);
20531 if (pystate_addmodule_run) {
20532 PyObject *tp, *value, *tb;
20533 __Pyx_PyErr_FetchException(&tp, &value, &tb);
20534 __Pyx_State_RemoveModule(&__pyx_moduledef);
20535 __Pyx_PyErr_RestoreException(tp, value, tb);
20538 }
else if (!PyErr_Occurred()) {
20539 PyErr_SetString(PyExc_ImportError,
"init Isosurface");
20542 __Pyx_RefNannyFinishContext();
20543 #if CYTHON_PEP489_MULTI_PHASE_INIT
20544 return (__pyx_m != NULL) ? 0 : -1;
20552static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
20553 int __pyx_lineno = 0;
20554 const char *__pyx_filename = NULL;
20555 int __pyx_clineno = 0;
20556 CYTHON_UNUSED_VAR(__pyx_mstate);
20557 __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate);
if (!__pyx_builtin_enumerate) __PYX_ERR(0, 122, __pyx_L1_error)
20558 __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_print);
if (!__pyx_builtin_print) __PYX_ERR(0, 138, __pyx_L1_error)
20559 __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_open);
if (!__pyx_builtin_open) __PYX_ERR(0, 387, __pyx_L1_error)
20560 __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip);
if (!__pyx_builtin_zip) __PYX_ERR(0, 556, __pyx_L1_error)
20563 __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
20564 __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
20565 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
20566 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
20567 __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
20568 __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
20575static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
20576 __Pyx_RefNannyDeclarations
20577 int __pyx_lineno = 0;
20578 const char *__pyx_filename = NULL;
20579 int __pyx_clineno = 0;
20580 CYTHON_UNUSED_VAR(__pyx_mstate);
20581 __Pyx_RefNannySetupContext(
"__Pyx_InitCachedConstants", 0);
20591 PyObject* __pyx_temp[1] = {__pyx_mstate_global->__pyx_int_3};
20592 __pyx_mstate_global->__pyx_tuple[0] = __Pyx_PyTuple_FromArray(__pyx_temp, 1);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 26, __pyx_L1_error)
20593 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
20595 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);
20597 PyObject* __pyx_temp[2] = {__pyx_mstate_global->__pyx_tuple[0], __pyx_mstate_global->__pyx_n_u_d};
20598 __pyx_mstate_global->__pyx_tuple[1] = __Pyx_PyTuple_FromArray(__pyx_temp, 2);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 26, __pyx_L1_error)
20599 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
20601 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);
20610 __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None);
if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 139, __pyx_L1_error)
20611 __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]);
20612 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
20622 PyObject* __pyx_temp[1] = {__pyx_mstate_global->__pyx_n_u_dof};
20623 __pyx_mstate_global->__pyx_tuple[2] = __Pyx_PyTuple_FromArray(__pyx_temp, 1);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 145, __pyx_L1_error)
20624 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
20626 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);
20636 PyObject* __pyx_temp[1] = {__pyx_mstate_global->__pyx_n_u_data};
20637 __pyx_mstate_global->__pyx_tuple[3] = __Pyx_PyTuple_FromArray(__pyx_temp, 1);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 366, __pyx_L1_error)
20638 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
20640 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);
20650 PyObject* __pyx_temp[3] = {__pyx_mstate_global->__pyx_n_u_field, __pyx_mstate_global->__pyx_n_u_value, __pyx_mstate_global->__pyx_n_u_frame};
20651 __pyx_mstate_global->__pyx_tuple[4] = __Pyx_PyTuple_FromArray(__pyx_temp, 3);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 381, __pyx_L1_error)
20652 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
20654 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);
20664 PyObject* __pyx_temp[12] = {__pyx_mstate_global->__pyx_n_u_nll_x, __pyx_mstate_global->__pyx_n_u_nll_y, __pyx_mstate_global->__pyx_n_u_nll_z, __pyx_mstate_global->__pyx_n_u_fur_x, __pyx_mstate_global->__pyx_n_u_fur_y, __pyx_mstate_global->__pyx_n_u_fur_z, __pyx_mstate_global->__pyx_n_u_domain_nll_x, __pyx_mstate_global->__pyx_n_u_domain_nll_y, __pyx_mstate_global->__pyx_n_u_domain_nll_z, __pyx_mstate_global->__pyx_n_u_domain_fur_x, __pyx_mstate_global->__pyx_n_u_domain_fur_y, __pyx_mstate_global->__pyx_n_u_domain_fur_z};
20665 __pyx_mstate_global->__pyx_tuple[5] = __Pyx_PyTuple_FromArray(__pyx_temp, 12);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 416, __pyx_L1_error)
20666 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
20668 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);
20678 PyObject* __pyx_temp[6] = {__pyx_mstate_global->__pyx_n_u_nll_x, __pyx_mstate_global->__pyx_n_u_nll_y, __pyx_mstate_global->__pyx_n_u_nll_z, __pyx_mstate_global->__pyx_n_u_fur_x, __pyx_mstate_global->__pyx_n_u_fur_y, __pyx_mstate_global->__pyx_n_u_fur_z};
20679 __pyx_mstate_global->__pyx_tuple[6] = __Pyx_PyTuple_FromArray(__pyx_temp, 6);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 441, __pyx_L1_error)
20680 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
20682 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);
20692 PyObject* __pyx_temp[2] = {__pyx_mstate_global->__pyx_kp_u_proteus_inc, __pyx_mstate_global->__pyx_n_u_w};
20693 __pyx_mstate_global->__pyx_tuple[7] = __Pyx_PyTuple_FromArray(__pyx_temp, 2);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 571, __pyx_L1_error)
20694 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
20696 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);
20706 PyObject* __pyx_temp[14] = {__pyx_mstate_global->__pyx_n_u_look_at_x, __pyx_mstate_global->__pyx_n_u_look_at_y, __pyx_mstate_global->__pyx_n_u_look_at_z, __pyx_mstate_global->__pyx_n_u_cam_x, __pyx_mstate_global->__pyx_n_u_cam_y, __pyx_mstate_global->__pyx_n_u_cam_z, __pyx_mstate_global->__pyx_n_u_light_x, __pyx_mstate_global->__pyx_n_u_light_y, __pyx_mstate_global->__pyx_n_u_light_z, __pyx_mstate_global->__pyx_n_u_light_dx, __pyx_mstate_global->__pyx_n_u_light_dy, __pyx_mstate_global->__pyx_n_u_floor_z, __pyx_mstate_global->__pyx_n_u_wall_y, __pyx_mstate_global->__pyx_n_u_sky_z};
20707 __pyx_mstate_global->__pyx_tuple[8] = __Pyx_PyTuple_FromArray(__pyx_temp, 14);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 714, __pyx_L1_error)
20708 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]);
20710 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]);
20720 PyObject* __pyx_temp[4] = {Py_None, ((PyObject*)__pyx_mstate_global->__pyx_int_0), ((PyObject*)__pyx_mstate_global->__pyx_n_u_pov), ((PyObject*)Py_True)};
20721 __pyx_mstate_global->__pyx_tuple[9] = __Pyx_PyTuple_FromArray(__pyx_temp, 4);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 51, __pyx_L1_error)
20722 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]);
20724 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]);
20734 PyObject* __pyx_temp[1] = {Py_None};
20735 __pyx_mstate_global->__pyx_tuple[10] = __Pyx_PyTuple_FromArray(__pyx_temp, 1);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 132, __pyx_L1_error)
20736 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]);
20738 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]);
20748 PyObject* __pyx_temp[1] = {((PyObject*)Py_True)};
20749 __pyx_mstate_global->__pyx_tuple[11] = __Pyx_PyTuple_FromArray(__pyx_temp, 1);
if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(0, 523, __pyx_L1_error)
20750 __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]);
20752 __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]);
20753 #if CYTHON_IMMORTAL_CONSTANTS
20755 PyObject **table = __pyx_mstate->__pyx_tuple;
20756 for (Py_ssize_t i=0; i<12; ++i) {
20757 #if PY_VERSION_HEX >= 0x030F0000
20758 PyUnstable_SetImmortal(table[i]);
20759 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
20760 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL))
break;
20761 #if PY_VERSION_HEX < 0x030E0000
20762 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
20764 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
20767 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
20770 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
20771 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
20776 #if CYTHON_IMMORTAL_CONSTANTS
20778 PyObject **table = __pyx_mstate->__pyx_slice;
20779 for (Py_ssize_t i=0; i<1; ++i) {
20780 #if PY_VERSION_HEX >= 0x030F0000
20781 PyUnstable_SetImmortal(table[i]);
20782 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
20783 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL))
break;
20784 #if PY_VERSION_HEX < 0x030E0000
20785 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
20787 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
20790 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
20793 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
20794 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
20799 __Pyx_RefNannyFinishContext();
20802 __Pyx_RefNannyFinishContext();
20807static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
20808 int __pyx_lineno = 0;
20809 const char *__pyx_filename = NULL;
20810 int __pyx_clineno = 0;
20811 CYTHON_UNUSED_VAR(__pyx_mstate);
20813 const struct {
const unsigned int length: 12; } str_length_index[] = {{166},{645},{307},{67},{69},{67},{3869},{38},{1},{19},{10},{3},{1},{27},{23},{20},{23},{21},{23},{1},{20},{25},{54},{19},{37},{31},{18},{7},{6},{44},{2},{9},{24},{39},{34},{47},{11},{22},{7},{35},{2},{357},{0},{7},{18},{4},{8},{4},{1},{10},{19},{21},{22},{39},{20},{32},{30},{33},{37},{27},{1},{1},{3},{11},{5},{9},{8},{20},{12},{17},{7},{8},{8},{8},{13},{10},{15},{8},{11},{12},{8},{13},{1},{10},{2},{5},{18},{10},{11},{7},{15},{2},{3},{13},{9},{3},{5},{5},{5},{9},{18},{5},{12},{11},{4},{13},{14},{1},{4},{11},{3},{6},{12},{12},{12},{12},{12},{12},{4},{2},{1},{2},{3},{28},{25},{17},{8},{5},{13},{9},{3},{30},{1},{5},{10},{7},{8},{10},{9},{7},{7},{5},{6},{5},{3},{5},{5},{5},{3},{7},{3},{2},{2},{4},{1},{5},{8},{10},{11},{5},{9},{1},{4},{14},{5},{8},{8},{7},{7},{7},{3},{6},{8},{7},{9},{9},{9},{4},{5},{5},{6},{1},{16},{7},{6},{8},{5},{6},{10},{4},{11},{2},{3},{5},{5},{5},{9},{5},{4},{6},{14},{7},{2},{18},{5},{12},{4},{2},{4},{8},{3},{4},{3},{3},{8},{16},{12},{5},{7},{7},{4},{1},{10},{4},{4},{10},{5},{5},{4},{6},{10},{5},{5},{4},{15},{21},{1},{1},{5},{6},{13},{1},{6},{5},{13},{19},{22},{26},{16},{1},{5},{3}};
20814 const struct {
const unsigned int length: 12; } bytes_length_index[] = {{84},{242},{187},{1011},{2717},{2},{217},{524},{227},{135}};
20815 #ifndef CYTHON_COMPRESS_STRINGS
20816 #define CYTHON_COMPRESS_STRINGS 90
20818 #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000
20819static const char cstring[] =
"(\265/\375`c3\305\213\000Z\232\224 H\340\3208\0070\3143\004\306\363\004B`|\204\2010\020\006\314\016\263#\214\261H\023\364\333\203H\221\266EZimo.)\317\372\017\002\376\325>\004~\034\345\037\002\335\270\274\352w 2\244\216\276DO\240\333j\267#\364}\327\001\325\001\016\002\236\026\277\355tz\030&\273\377\252O\306W\034\375\214da\376\373\335\363\344\327\267\216\177\301\312\342S\277G\324\335V\303\213[Z\377m\205\030J\324\217\340g\325\366\272li\361\212\340\226\002\243R\311\240\301\364\002\252@Q\313\337v\343la\027~Tc\214J~\030\336\267\274\227\331\261\266\266\010\353\301#xRUN>\243\024(.\200\370\273o\362\263]\330`6\013\247\025-2\230N*\333\313^\341C\352\032\253\342g}v(\2227U%\207\002\316\236u\231\214T\250P\333I\014\001\216\366f\303i\343P\177\264\236N\376\255mN\035\275\377LF\372\276K\374\352_;\222\365\373l\313\227\256 \256///\027.\\PQ\355+\342\215I\255B\231P)0\031>\013\277\305\326\t\231O}/\227Xw\262m;\0308U\177\014/\013\013Y\252d0t\217\314zx|\236\047\265\315\357\262\036\214\006T\n\225\252*-\0324h\330XL\047\237\232C\030\236e\215F?#T\265.\227\r\273\357]\245i{\251\2540\327\261\333\367E\226\313\356\375\232\205\307p\004\352ksk\333\213\305\355\335\022D=i[\030\303\376\342\255\277\021\217v\277K\3331\374\330\357Q\211i\304^I\375\257\034\275+\232d\3143ZW\306\327\247\352\367\304\237\367,\230K\215\265\370S\201\302h\305\374\035\214k7L\335NU\345d\332\352K\215\211y[W\035\311\262\2756\274\342w\313\357Y\271\334\025\304\365G\326]\321\272\360w\261x\313\321O+\0243I\22655\227`\376\233\261W7\370\017\303c\315\366qjU\201\351\221\251\304\272q\274\047/5\206Y\365\275\373\371AP\374VVF>\243\355\375\013\026\036\005\235\276WF\246D\322\345\322\345\025]=\262}\237\207&\2133!\036{dZ\0141>\317\217W\304/^\350\021k\021Z\214\275(#U-U\353\206,T\330\322\345\010\336\337\340\047\346\020\214e\362\212\235\306\001E\232\330k\362\363\277\346\364\223\262\035\02118\254\307\371\217\311zd \376\276\357\333\257\355\266\337g\357\342\333m\317\345\022=\021\004\037{\257\361\350}\347\365\310\\\326\3238\373\262.\353~\371z\235+\206/\262\264""\t\213\336\225i\233\355\216\265\177\305]b\275\365\3571[\3623\351\262\367\357w8\377X~\330\356\367\360\347\332\037v\336\306\367\332\256\003?g\307\036\247\213\311Ht\035\351\372\035Og\207\206\304\366\304\231\357\363\010\017$D\204\370\220\377\263\177\343\351\250Z\235\0101\303\302\273\275L\306\376~h\202\321x|1\215\"Z\236\335\333v\335\026;\01755\256\257q\271\260\314k\313\352Lp\372M?_\352\344\342\323}9Z\036\237\356G\273|\343\213\240\317(&#M+0|g\304z\302\255rgL\272\266(\263y\217\245\313\364\331$#]\345\215=\352\323\242\027\336\267<\047\276\346\022\357\357\251\262\361\216\370n\210\275\317u\343[\277z\320\333\263y\307h\364\256\256\214\303\321\326]\262v\255\317c[\225\246\276K\334u\333\261\376\036\255L\251TU537u\304N\265\301\361p#\303\355\354p\035@\020\034\251\300\2406\237\252\362\363\271\234|^\376\303we\246\333\226\324\321?\376\312\250\245\337\365\237\250\257\270\262\262\242j\231\302\013\342L\302\244\177dY\023\262l\305Q\214\225\234\311T\376\306\231,\251\033ZL,:?\217\t\013\013J\245A\303h4\032\215\002iF\t\240\247\0054\222LO!\231\030\2026\023\304\000\000\217\032\335\000Wu\224\020\032G\261u\027\2574\047\rQ\014\020h+\316c\212\200\224R\227J\253\016j$\223N\352;#5.-IK\244Dh\251\215o\223\300*\324M\246G\220\335:\003N\022R\333R\0334\305\200Fz\021\3642E8j\257\240\005\233=\321Az\311\362\0257\341\014@H\3343\007\010\000@\241\306F\341\243#enk\256L\036Vg\351%\021\276c\n\340\316\222\363\3530\236\342\245\222\323\343\334\351!?\301`z\230\244\036\303\364`\226\244^\"\321l\311\364\340\250m3\233\364E\204&\342\002(\201\001\000\005V\033\037\021:e<B\211\223\2304@\252\263B/A\351$\\\004\211g\023D\010\202\032g\202t\244\204\272\016\177P\232\"\tj\334\353D9Iz\211\203\026B9\364\n\034\007\210\343\014pF\0001=\000!00\343\005\264\000\310\000\r\232Y\203t\007\345\320\0174\204\236*\2554+\221Z@\277su\232\234\244\320L\225\036@g6N\005f\020\327S8\211\323l|\203\313R\240\240\2418A;\261C+i\240\320\370f\253\231\311\2144\203\201\236\240$\247\201\376\342(\274\204\211Z\241\341\031sv\034\204\223\024\250\275:\201\316\342-\363\304""\364(P#\235\023z\200.3S\346G\201\332\326mx\t\2571EfG\201Z\207\202\220\371\002\352@\000`@\r\213\302N\002\347\253O\340\037|\304$!\250\225\322\026\324\306B\007\255\203\243\306\235\333\271{NG\351\240\275\200\024p\324J\\\2331\240\024\320\201\0025n\006)\366\350\030\214G\363\2249\374}=\300pn\355\020\373w\271\305\255Ye\336Z\203\333\346\274\325:o/\223\373\212\035\211IRl\221O\222\032\337\047\277\373\376\302pG^}\307\273K\262\333#Y\356O\253\030I\334\235\355\326\035\316\025qs\315\r%\216#\272\t\311\246\310\252\007H\206CXY\363C\350\246\306\352\214\301#\220TD\245\315\3340U\251\004n\3661s\200n\027j-\276\301,\231\001^]\344)F\027\023\t,\016h\033\36701c\2450\047\264\322\371u\t\th+ \004\251\324\305\t\262*\205zE@\333\272\211\210\224j@\271lp\331H3\274\240l\322\024\030]\202\210E\215\030\217\320e\344d\356\024\205\240\354\031\342\321\047\360OBI\211\260\237\364\321\243d\223L\022\001\321\316G\247!a\345\254h+\0224\026\r\330,5\363\230y\251\r\253\224\352t\256\245%\047w\324f\023\322\017=\331\337@\244\306\342,\326\\\360\342\021D4\256\213z\355\240y<\304%\304Cl\240\"\024RV.\246\rw\202]\002\010\215\206\315l\206C\233\350(\037\264\034\022)u\252\225h\224\230\241f\033 P\321\277\004m\034\265MD\232\345\024%\r\220\316|\320\211B\001\224\221Z(e\225T\336I\004V\032\222r\351\033CmK\341\237\271`K\031\240; 1\234\3462:&\027\n*\245z\246\204\222P\032\216\2370C:\202\270\n&2\351G:\341\343\304\320M\314,@\215\220V\217\306\240\"\224\0173\221\n\024\004\315\333\311\300\204\007\010\311h\226\276Q\3423\"\244V\310!\300L\221\336\021\232\241\322\014h\t-q\242\316\335m\217\351%\0138\211\312I\350\346AJliR\033\354\223\236\226\331\007H\271\264DQbHz\007\367\340\344\316\224\376q\010\016j\334l\2331@\275N\025\035\244{\034\272\241\033(\253t\352\217\316q\007#\002x<`\332\236,\247\211\226\220\214\216\031\022D\022\341$\334\362\230\020\037\t\251\205\010\360\021\315\222J\031\241\315l%\314\017\021\177\231(%\264\245\2467\340>\240\004\335\203f~t0\321>\364\023\034EB{\272\n\036\2321\346\315\206\0368_p\230\231s\242\350.\334\246&\001\207\320Q\023:u:""\212#\204R\250c\326\233*%B\245j\244I*\031\306\323`(@(\023\013H%z\367\001\243U\332<\024\221 \007\r!F\031B\210H \"\"\"\"\022H \"\222\244\r\337a\374\314\233 \373DTe_jN\026Fx\235\252\372\005\260\3540\244\020h\"\024\001\202;\3421\352<u\347\246\226l\002qe\355Lf~D)1\\z\225\047\230;\020b`\014\022\362\240\267\300\240@\314\227\313\302\227\251\200:\220\203Y\353\t(\226\021\002\021\020\365\2405\035\276\201\024\272\262\340-\234\010D\033\221\350Y\255dls\310Z\r\027y\321\203H\236]\233=n\366\020\010O\353\031#p.s\027?\366w\372\341<\330PPa)\311\251J#\260\351\236RXE\n\376o_p\323\276T\016\234W\203\2540!\021\307\177\213\332\366\242\314\nF\257\026\r\047O+`\346B\275|\357\005\033\031.M-\212L\2218\030\335\370*\022m\223N\n\207\325\253<\3077\361\267\355\342\265/\323\2612pX\203zSu]K\007+\021\342\244\361n\022\242\320!\241\013\037\207\375\366\nn\307pU\346gl\033^\354W\231\201\355\3224\250=\047\343\n\306\013\327\343~%:\317\260Eo\007d\047ko\351o\340w\222\253m\250\000+\301`\271\306p\314q\000\331\230\257#\254\372,[Ku\322*\247\004\030&\240\027\224\"\031\027\315:\036\036\256\367\242\260:\005;\246\020w\007\221[\342\364M}L\337\324K)\356\272G\276\230\204\216\316GtVF\225Z9\030+\326\364\002fxg\306\030X\375\235\225\247\3714\352\2249Y\336\3452\025\007\016!\003\212\361aLn\262+\036\212\267\310\313\377\375\337\217\260K\001gh\013\272\237\327\366:x\263\234\213\236\037 \231\372\t\355A\343\323\201\213CL\245\224[V\313\275\322\343\225Sw;\261.\004\350$\tM\371\225\242\325\327\352\215$\370\326\306\224\213\305\374\275\037\276\332\022\025\374)\246\376B\235&\\T\325\344\207\245\376~\255W\342\234\304\007\014\306\002\3222/\223h\377\201\354_.\372\262,\376\222n%q#\342H\017_?N\363$;\343\245\273\266\230\2029v\020\261\230\"\320\223\363\251\330\261\252\013\231\230\364\351\264\301\034\322\326\313\200\271\0339\303+\020>\037w}\010\220L\247o5\303\303\252R=\177\202b\331Mz\332\327\rz\352\363\272\313\035cR\037mC\247\234M\023\266\030\326\336\340\006\367\\X\200\312\013\302b\266)\352\270\325\310\223Ql\274\035\003\320\326\013\255\355;Ll\251r>a""\200\244 \264\023\337q\222\204\354K*s\306I\225\330\315\236\231\2119pH\202\300ND\002\331\335\306a\003\237\321\375[(\031z2\267\325\304rl_)Md\224H\322\211\201o\346\315?\320Wj\030Me\305\035\320_\004\300|\375\n\233\253v,~\332\217\204\326.\361\263\207@\236\316mq\013\367}\000\305\t\026\335\327\260\340\216F\302[\307\224\250a\005p\000:q\005Cd\323r\314W#\355\003\266!\323\302\357\243\3302\021&\023\246\264C\367]\333\257Y\344\013\374\375\225,\232g\255\337\030\233\263\252t({\020<a\252\331\021&,\244M8\014&\310\202\345?\"\370\003P\232\244`\362\275E\240<\325]\373k^|\34196\323K\307>u$/\2332\313\210\236A\357\371w\204qU\340[\356\222h\220\314\005/\313/\340\233\203)6\247\353\275\3407\026\263!\213\366\250e\306\255\262%r\351}4\332@\300\271\275IYO\240{\276M\263\254dg\322\026n\227\037$*\270t\326\350\203\312\211c\365[nL\347\n\254\217c\002\304!\317^E!\200T\217\2317\251\251\323;\026\032l\037\220\260Se\036\273\t\3324\272\246\360\356:\323rXT\027\275\2716\234Rq\216\003\235m\331\216r\236\246\004\234\017\000\200\353x\204`\006\253\302\210\332\241\225\014\240q\337\322\013\347\267\314\0346\206\307\331;=\350\034\020\215\244\2272\214\335A=\341\n\200:<\253\350\361\321(I\367\250<\234\3773\006\324\016Q\"\343\273X)\207\245\253e)\241X\334\353\020%\360\"\213Qq\214\331]\336\366\250\2071*/\030\314!N\242\305\035\201U\364z\251g\031f\353G\240\251\270\210\341\302\363\374\010\200}\031 \026\301d\324@H\237ms\303\206K\335\366\217@D\256\313\362\234\301\302U\036j)\257\026\352\"p\346\223^\221O|\013/_\020\272\245\200n%\3226\t\020SN\006\225|\343dp\036\366\026\326%\233\335\372\217I\223|\213\220\340\214\032\330\363\005s\314c3\225\277iR\325\214F\037\264>\264\225o\017\350r\235t\374\344\246\030\021X4\273\205{:\025e\337\264B\207\262\361\242\314\237\010\256\367\332\005G\250\203v\217\241Qw\036\377\367j\240J\t\232\310\027\301\362\274\300\341\274\006\221\213,\343\242\343S\312\312\"2\203f\331\310\367\2736[\036y\275@$\354M\361<r?V\375\322Lv]\203\333\325\037\326\270IV\342^\326\t\013\312\306\214\207=\241\241\212g\014\030?\212XA\225)\240N""\223\004\351\362}\261$PZ\001?E\251\3302\313N\n\010bzm\255\262\212\334\337\216Z\017\204H\32314[\024\022\224\"1R\n(E\237\373Q\346\207\325T\375\267\342\254\274\"\211\324\300D\031DXQ\350\014Q\373.\234\303 \363\2442\211w\246|\236\205J>\\;\312{\0064D\010\000m\230\231\024\027\235\265\217\314B\014<\302\352\320i\000\036\262I\250\332xN\330~n\346i\263E-5\047\305L\r\300\352\023\341\013\006\304\302\010\301\345\"\345\022\343\026\344WEnp\047s\023\263\274T@\326\361\251\204\023\025\211\0022\355\202\367\375\004\346\234\211\207\0264\303\207\010 \217\301\332\013\"s\360F\025\\DB\244\037\326\260\324\n\313\207\351\0372n\211\301u\001\321\"\314\226\325)\030\333\323\240\375\235\000\340KwQb\230~Jk\202U\321\201*\331\364 \037]\322\324q\222Ei\344\034\374hYM\367Pu\223\210\262\222<\341\0471tx\017\261!\1770~\022t\307\344\231\345h\016\350\0259\336\257v,\256\0018\014\310\3768B\245#\232\004\311\215\000\212(@\177Upf\231\260\205\276\300\005\244\004\341Dv\351\010)\3060\201\016n\262\300q\257K+g\205\"+CW\0370\333H\352sGC\035\373\374_\345O^\216N\371SU6\367x0\240\312b\327\r}\332\t?\214B\001\023\351\303\3040_\266U\"\362?\265\020K\215\032\210\246Mf4\261\221\271\006\204[\334\204\214\334\201\377v\266\"\304\047\017\215\363\025\200\345\311\367&\225\006\233\3642\336\037\0107\252\273\215\000\336\353\016\300\305\336u\266\177\035}\373l$\213\331\275\030){\216\210\214?\367BjD\013\241;\205\277$\262\252\263]\002\004\006\223a,\242\337\301\210\364Q-\373}\326\004\241`\243W[\212&\275\217R\376\021XQ\331\022\350AE\014\r\267\373C\204\275=T\211]\254\344jri@\300\201x\324w;\262\251\3560\303[/h\351\376\004\266\204:v\310G\325Cf9\200\377*\353\275\276PP\374I\025\377\222\005\364\321i\227\310\376;\027\014x;\237\007D\203%\207ml\213\310\3407\000M\002p\021;\232\331\376V\335\236\351\016\213\t\350^\231]F\306>\260\360\260\0302\216\016\225n\036#\031\r\227\037`\021y\261\374=\277i\047\275F\365\235\342\303#U\274\033\200\316\261t\345\3524\270_\2023\335\232\351\030\315\343H\362\266\0054qk(\03465\2367\226\027\002\3016\276\367@\256\206\036\363\322e""\252\230\000\036\374\355)\000\014\344:\016\200\303\215%\360\240s\345\317\030\356\245*\024\327\032\006\013\306\273D\331\016:\264=\026B\354C\336\3630xR\337\027V\004D\234?\017\343\324\334T\260\047\323\251\007\262aY\260\326\264\226\263\200k\202=N<z\265HO\340\367\200n\272\"\027|(&\335*\\\\\047*Q!\226h\001\006u\264d/\307\226\222nv`+a\2533Z$s\271 `\321F\237\014\321\247\240\211\025\221\222\370\233u[\267\246\303\365\255c\260;*3g\250\235Q-L\362\356W\241\031)\364\r\340ri\221\010\0160M\233\r5o\255\013T\375Q\370\026\r\200T2i\266^\222\372\347)\245\205\000Q\371\372\225\264\337|\350\t\256\342\362\307K\201\323\010\035\344\365l#\266\004\255\236-\247gO\354\307G\306\373\324\303$\237M:\300\031\002\027\372gN\006\351y\001AAD6h<e\047u\337\047\342+\340r6\017\003qs\242LN`\3623\317\032\221\256\210J\303\310\014\325d8\001\230G\272";
20820 PyObject *data = __Pyx_DecompressString(cstring, 4482, 3);
20821 #define __Pyx_DecompressString_LZSS_UNUSED
20822 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
20823 const char*
const bytes = __Pyx_PyBytes_AsString(data);
20824 #if !CYTHON_ASSUME_SAFE_MACROS
20825 if (likely(bytes));
else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
20827 #elif (CYTHON_COMPRESS_STRINGS) == 1
20828static const char cstring[] =
"x\332\355YKw\323X\266\256@\252\001\023\252\342<\010P4\310y\000\005!\330N\302\253\322\3642IxT\003EBx\024}oy\311\322\261-\220%G\222\223\230\254\364\355a\206\032j\250\241\206\032z\350!C\017=\344\047\360\023\356\267\217dG\211\315\233Uu\273o\033b\035\235\347>{\177\347\333{\037\307\364\334\013&Y\261\315\330\245K\262\222\3173\203i\022\303\013U\0109}C\340\005|\346\3065U\315nL\362G5x\274\2721)\010h~\300DCP\365u\206o\226\267\004I74f\264\007\346+\006\r\244G5x\274\272!\360\201\2670\256R.c\234\241\024\212{\006n\305*\232\242k\220-\326\2262\"\343f,\020\3573\205\373L\321\002\301\242+\313zIT\264l(@\344\255\272\353\355\243\304\t\373\207RE\336\252\273\336>J\306\255\250E\005=/\240\237U1rL\206]+\232\254h\005n`Q\013+D\243\312\207\356\375\224D\313P6\2049!5\225\344\237I!\331Y\352:\264\375\331\031\220\372\374\241]&\371\364\241\255\222p\243\353XK\324^f\261cf(\242z\356G\322b\010\276V\217\255\377(I1u\263b\344E\211EU\265\267\327\326\373T\306\007+@\241\304\314\360(\275\367\323e\nM7J\242\372e\223\204s\254\301\300\272\361\2769\306\024MR+2\023F%]E\327)\274\217\306vj-\266\201\303\305:\352\013\252hvT\226\230%\252\235]uU\356\2504-]\353\234u]\327\273t-\212e\366\216\332\364\336\352|E\223,\260k\247l\242U\354\330\234!jf\036\252\n{\307\n\252\236\203\332LfY\240\221\250\336\304RNa\232\225UCB\202\256\004\243\220\023\346\200F\016I\376\265\003+h\247Rbr\266 \226J\242\220\216m\305b9QzY0\210\221\204\315\350\014\311\251\351\324\265k\327\256\020<\247g\200\3164\225f\322\250\273v\003\343$\261\304\0141\"\013\010\317,\303\262\312\032k\327\251\272$\322\276A\266\350O,K\217j\360x\265#\227\371\262J+\006gaR\230\215\312\\)\243\t\r\330\312Ne\300\300\330\346\3644o\212\356Q+\250L\230\231\r\017UD\026\375eV\304\240\361\260D\342\264\212\325\235\"\304\302\366\270F\263\246^1@\347\233\030\303\337i\004/T[\0058\207@iO\213\212\305:\006\266Wo\317p!,\310;s\265\253\"\263\266\007\006\263C9\320\373U\256 ^\210\224n\234OO\245gw\355\325,\353\026\237i\307:\272\002\234\320\366\223S\263\223\301_\262\313N?J\340\213\377\247\005\276\370/,\360\205N|""\375~r\"\306\t\231\340\342\227~0\327\007\373\314\315\315\tmNC\304d\256VD\003\361RY\0255&\310J\211i&qflLf\222\212&aY4\341\377\036I\"\016\370_\260\353T\362\247\275\215wD5\177O\301x\336!\231J\317\276\263\313\363H\227\217\020\367\243\267>V\022%C\017\027;\267\314\305\235\024\356\320\222m\267]V\n\330\236\265\t\205\2132Q\270\260!\230|_A\377\016\317\310\215\017\377_\336\374;\017\027\332x\000Y[s\251I\372\007\373\047\247\256\376\367{<\363\337\223\027\270\034_wl\352\306{\307\245.~\345q\037!k\352\003:\332\242\350d\214i20\017\350u\265\325En\307\257\n\r:b\273a\376\354\327XP\330$/\227\204N&\205\361<|\021\362\016!\310;\202\366u\305*\n\252Xe4\266\025\377\264U\020V`\226\026\262\244\"\223^\"W\211x\247\311\360\345\246\n\237\337\031\235\005\370k3%\3644\333\352\264\025\025\362\"i\021R\256\213\224v}\231\220Q\327\371\356\370\321\320-\004\276\\?mG\277\265[o\027\271\342\020G|\251\332B\rU>C\240OG\212\000\004vR\337\263\347-\016\331\233\037\265\212p\"\241\350\344N\332d\002\234\347\347\246\256]\235l\375\001\352\2637\316\247H\360\274\242)f\021;\rcF\242\276\350\016){\255\230\214Xu6Zo\260\274\312x\360\212\246t\264\205\242\275\nx\025\365\227w\215\320+\205\"\302h\223\0476\321\311\310*E\035\231p\252Ke\326T^!nK&\337\261\372&M7\315\003Z!\017#jL\025P\275c\024~\217!\301a0c\215e\031r\363B$\305\246~[\324\047Ty\250\277\030\252\341\017\241U\335\330\024\360\205\371w\355\037\271\223\314\262e~\205\220J&S\235m\262b\302N\022\251\256\313\310\266\327\346\326\240\277h\226\027\225\250%F,\026\213V\267l\036#\272\212\265\220\321=)\374t|\\#>\2746\373%\010\371t\034`w\2358hU~\014\016\322\357\201\301\207@\360\261(\230\236\376\275`\320\025\004\357\206\300\330\0322-\322\304\364\324\225\237v\362Fa\264\014Zb\2250k\234\232\312T6\024U\021\215\352\023\021\203s*\262\325\207\206\236G\235V\230*\316^\272tIA\200\005\331\202|\034Z\244\373\227\0223\213\261KLe\004\031\363Q\031\371\033r\317\005~\035vI\323e\266\247nn3y]\336\232\0246S\301#\215\307\215\311XX\035\324F+\363A\337|\3207O\325\177\315\254\254d\346\357\334}p[X\371E\270\263pkVH$\346E""\225Pe\301\377\303\317\200\033\021\261Z\210\t\205\305P4\241(\256\201\271i\031\001\032\261\370\265D\256b\t\242Z\320\r\320~\t\207D@\036\r#[\346\342\006\322j\311\212\234\033\363n\273\010\350\303\363Q\312\215E4\335\002\334$\275\240\001\207\362/\232Z\025^\261\340\304\001W\026\242x\201\005\223\301\006O\261\020]\355\225\3655\240\021)1N\211I\272f\032}\177\312\275KAR\314`\224L6H\243?m\213m\354\334\227h\225R\271:\005,\031l\252TQa\005\303\020\253\000\230B\n\262 c\251\254\033V\264[\205n\030:z\350\264+\024\003U\242\205\324\224\214(\0078\024\246\027x\265\246\257G\200\025\026/\355(o\252\\\335\010\214\035\333\314+L\225\257\233[\331\3155\021.\024\346\315nr\265\\O\316\310[S\320\022\277)\3457\315\034\330\330(\334\361\245K\377\271>\375\272\327\247\231\047\331\234h\262N\n\230\327K\245[\254t\213\014u\013\240\270\273c\310\210I\263\000\255be\263\221*\321\262D\251H\207\263\243\362>XA\355^;5GW@\252yc\252\000.\336(\033\221nR\353\204G\352`<Q+\354\251\215\264\257\343\274E\336\357\003?\357o\315\026g?\320\001\240\304!\332\333\351\221\004y\3570P\267\361\363\275\373\017\357\376b\310\024B.(\222\365pq\345\221\324f\322\025\206c\004q\263\331\207\325\r\374Q\217\354\0030\3042\313g\263\242\246\361P1\213\217D\227\223\331\002\2630}\211*d]\242\007]\016\3223Py6\313\177x\240\047\203\032\371\030z\321\345\212\312\247)\031:\374\032\024\305x\203\206\323E\317\262\301\312\210!\251\210`RmU[\314\244I\025\223\350@\257\200\254\230(\362K\272\025\220\251hp\006\021\315\252&)\372T\273\213\271c\355\2101s\350\2540\034\312\202\242=b\253\025H\001\334\345\264\234f\265\316\344\003r\020m\303Jb\211_\373\361K?~\345\307\263\022ZY\202\356\210\032\263\304\244\214.!%U7A\273,\237W$\n?L\270\314\320\347\243X*IX\302\312j\272Fl,\031\214\264*\213\026Pn\311\364\224\301\266\340Dp\255%\353\371\340\367\233\350/<\321\337w\242\277\356D\177Q\212\376\236\024\3755I\246E6\030{\300r\017B\327x3\334\361\375\360\370\255T\313\314\334\323\306\265\221!\r\207\r\035\025|\004h_\336\321\047\003}3\003\263\262\262\t\030\361h`q\327\274J8G\236\323-\377z\000s\233\274""\224U\310\231\221\371\351\tT\344\225\215<\351\272`(r\036V\261\230\026\346\227y\265b\026\003\257\307I\032\352\340\232\342*\342\272)\244s\341\271\005l\013Zq\2668[\256*\320+\333P\314\373<i\336\361\031\021\327J\010\247/x\032]5_\274\320\025MekL\3450\272\207@\211\047\231\255[\257V\306\031^\207\2057`\341\375\227\252\027\360\177A1\360\275\270\006%\204\367\264\355K\334\366\025n\373\002\227\274JI\321*f\211\226+\225\225\231rU\323ZqC6\270N\327n\321\226M\355>u\324\036d\021\274\301s>\204J\264\347\000\230I\032\224\255\n\\$\366o\321_\026g\243\\\2614\354E\345h\3410\341\370\240\270\210\233\204\007H\3643G\360S\307\356\037M\2027S+\303\302Y}]cr\266\005\003\356\262\003\277\215\203A\021L\231i\272\211H\253XF\364\"a\007\345\242R\206te\275\014\306\302\177\316P\255g\213\205\360\236m\331\277l \230\204\277\226+\222\025\272m\003\016\3034Er\374\313\350\r\364\345\t|\204\356\340\364\004\277_P\026\r\333\226M\260\214V0+9\023\234UA\030u\017&\267\212\206\276N\221\030\375\335E\364P0\370\035\177W\352\256\254\361@\200\177\231k\241\023\342`]\017\256\0178\331\362\257\326\241\351\302\321\335y\375\335d\276\227\3017\2102\314WJ\371\237\231\346\301\303\3333\333\033\266\351$\232}\337o\2576\372\047\334e\327\362R^\246\331\327\337\350\277\200\322m\377J-\321<\022\267\2179\203NP}\326]\365\016x\353\276\330\256~\373\247o\216\364o\257\332=\230\363\373\376\346\301~\273\327\276\345\214:\267\335T\363\340\240=cW\335}\356Y/\336<8`\217\333E\047\347\036pW\233\007\217;CN\326\273\351\025\374%\352\226\266\037;\023\316\252{\310;\356\217\373/\353\361\372X}\251.\277\236x]i\254<m<}\326x\366k r\325\331\357\244 \013\226Yt\342\316y7\363&\372\322<\210\315\330\337c*,\343\355\307.\026\374\303\265\331z\317G4\034\362\342\336\230\267\344\311\376\205\332\343z\242\335\320\020\222~\217?\350g\374\225\332\017\365\305\327\330\313\241\355\243\333\253\377\244\315\037:\262}\327\306\036\206 \301io\237\207a}\333\017\234\037\335\277\370\230\272\257\321\227p\217{\023\336*Ug\232\337\215\330\025\250\362\335\345F\337\237\235Gn\017W\366yL\326?dg\232G\206i\205""\276\355\277\331\206\023\247\302}\347\270;AjD\377Q\367Go\226\257\265\275h\037w\022\274\362\264S\365z\202!|\345_\240\263`\362%\276-\210~\360\233C\337m\377F\365\237c\262\221\306\310\\\355v\035\226\030\260\023\355\257q[\344r4\342\t7\036\330\253b\337\305\232A\233\375\017\027\305\270=`_\206\265\306\235\202\273\342\rx|\216QH\220pf\234uW\366F\t\203]\252\310\034\337\332+\316\010\304K\270\323n\216\324M\303\277\337^\263\227l1\200\242\205\r\2546\373\007\371\032\347\3201\365\366\3347\337\022D\377dK\250J4\207N8c\316\222#~\\!\341\016\271O\261m\0216\374\342\227@,\222\330\262S\273\205<\372\005B\006\032x\023\3212\327\375j\263o\304^}\323\322OKQ/\"G\200\220\306\225\032\017\245i\234\230\361o\327R\315\341\343\316\t7\345f\232{G\213o\242\3234\373\007\354)\267\007[\\\242\231\016\330\226\303\3675\323\030\231\301\201y\\\033\255eHN\034\356\3461B\320\212\033w\307`\367x\363\244\320\020\256\327\022Xkh\304^s\226\032\247.\373\205\332rm\265s\311\260\320~\220\310\277\271\251\240\360\314\tj\032\303\023\356n\244\221\226g\235CnkoN\342\355\3007\207\206\354\324\033\250\347\262\035\007h\303\302y\002\277;\017\265\204\007)\036\256\3258\232\364\017\370F-\336\352\231\2403\337\327\036\224v\037y=^\374\323\006}\326J\221A\267\354\304\273\007\365\207\203\302\232`\221S\016\035\371\357\210\255n\341`\335v\256\273\317<\316)w\355e{\335y\341\035\366\211!\266\357\3307\355\202\363\334}\345\307\003\336H;O\335\237\033S\177\205Y\370\204\2036\035\316\306\000t\355\342\260\177\267-c\276\014\000\364\203{\013\247\361\212\237\010$\234\260W\235^\362\032\203\000z\037\261X\360\305\231\202\314\366\030\207;E\374\266\3208\006\246\363f\202\3431\r\343\231 #\240\346\230s\000\254\334\323\034>\346\364\300\325\334tD\200h\3508\316\177\217\033\177\323*4\373\206\355G\350\020-\014\331\363X\276\207\026\277\302\211-\355>\361\246=\221\316\203\311\327\205\372\326q\322\006\300/kdB\022\004.\204\026\375\026x:v\322\311\020\017\273\203\320\272\t\351\246\275\234\277\337O\371\031j\272\351H\000\374so\025Ui8\205\023\365T=\323<y\312\221\335\363^\006z=\366gh-""\003\010\366\207{\200\017\030\005\005\310\376\204_\251ej\035\r9\177\037\374\036#\177T\347h\275\302\251\357\025<\3228\210\303\3022\301Q\372A\000\371\215\301UW\210Qv\277\312\376(\344\033\"\371\030\340r\207\317\333\003C\216Ov+\376N\253\034w\216\006f#\242\033uo\272\"\302\214\264\367\330O\370Wki:\357\360\301\037h\356\347\004\002(\364\217\000\254\004\203.\205S\360\047Kn\221\326\375\203V\215\217p\350.\200\030\315\300w/r.\337\301\026\341\230\200\265\037\356KD\247Qo\036(\352\241\246}\340\362\025\367\004Xy\3363\374!\3779d\350\255s\274\375\214\276;\310\177\017\250\242\026E\314\341\367\3727\001\2524\232\376\345-\032?\206\300/\r\r\035m\351v\201\237\365?D\267\377f\247%\324\355\023\367\2627\310e>[\033\254\315\203\361\307~\214Td\336\364\017\333O\241\342@\223\213~\334O\374\356\264\371\357o\205\000\341\243\210\315\016\370f-\361\246\245\341\000\241\201\376z\366\342? \231\014\367\177\203\316\274c\206\001\362~\236\320\241\351&\234\335\020\374:\305}io\305?QKQ`v\324\226)k\"\225\007\266\375\377\254\373T\363\035\272~\217F.\363\324x(\230\324r\257\363\3641\341\317 &\033\256\345 \312\351q\310(!\315\231\205\213O\354~\035\367s\265\236\3461\322\026\2629\357 \252\240+\244W\347\222]\212ov\255\302p\252\026j\373j\0235\003\021\303\327[\345\2171\000\362\216^08E\274aRzx;E\341\033\362\210\263\356jxE1\311\265\237\360Soxh?\207\324\220a\213\275\376\337\260\350\376z\272\376\370u\242\231\234i\277b3qJ\n\343\0107\227\203\314$N\351\257\325\030\234@@H\336\300\204\266\372\026\352\267_\223\361\033Cg\334<g\"\204\260\267\355\353\224\254\004\301\352\022o=\037\006\270T>\207\260\177\004D6\343\363\004\373\036\242M\310|\035\201\3600h.\316\023x\301\355u3\215\336\323\316j$\333\216$\305G\021\353Z\3164\022l$\264\315\221\037Pd\334yYXf\334\227kg\353a\256\210\250\270\331\1774\014\215)\2760\370]\3052\316\340\025:\201\000#\206_\201=2\210fyZ\314\t\004\231A-\261\273i\034\372\356E\212\207\250\240&\325\007\3523\365\365\327\271\306\303\245\306\3222\017\321\261\003\212\265s\024x\037Gq\021d\236A\3026\202Q\013\265\003\224\236\305\221hL@""\362\235IGC/1\300i\005\033S\335q\267\000\371\002\256\177\314\323\274\3213\035U}D@g\335\001\236\335\030\3360\310\003g\3606h\220\247\265\303\273\262\375\336\200\312\332\255D\201\007\034\203\047\224\313m\316\014\266\034\246\201\377\203\034\245\357\264\263A\231\323\333\377\352\245\373\001\2365\235q_\302}\235\247\033\014\270\240\364\\G\341jm?\337J\227\302u\2349\302x\227\302O\330R\360\205\304\266\231\276\206\274\014\343z\202\213\tZ\270w\014\231>a\241qDp{\202\253\242\004\222\261%\234\326!\357\267\332\014\245YG\266\227\032\337\235qe/\021^ A=\215\361\033\240\023\304,\365\047\257S\301\025\320\200\223j\234\234\346\2364^;S\357\to\203\3060Y0\224\047\227\007\007\201\343%G\3457%<\337\373\325Q\240\216^~\321g\357\263\023\366ON1<\304\234\274\232\027S\376I\200\003\354U\037\204.\360\032\367\317\324:\256\223\016o\317\332\373)\271\003\322\0230Bpa\326\350\235\304\314\361\323\316?\274\245\267wz(\343\014.\237\266\177\016.\207\356\006wY\374\300\264&l\364\235rx\343\374\366+\270\251\245\366\241\033\261\215\200`\207C]E\036\341|w\200\202\336\366\335\331R\330\341\177\001\314/\344|";
20829 PyObject *data = __Pyx_DecompressString(cstring, 4525, 1);
20830 #define __Pyx_DecompressString_LZSS_UNUSED
20831 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
20832 const char*
const bytes = __Pyx_PyBytes_AsString(data);
20833 #if !CYTHON_ASSUME_SAFE_MACROS
20834 if (likely(bytes));
else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
20836 #elif (CYTHON_COMPRESS_STRINGS) > 0 && (CYTHON_COMPRESS_STRINGS) <= 90
20837static const char cstring[] =
"\377\nobject\n\377{\n//diff?erence\n\000\r\001\337 box \004\002 \377 <$nll_x\365,\002\002y\001\003z>, \377 // Near\337 lowe\003\000ef\377t corner:P\000 4\002fur5\001\003\001\\6\000\n\001z> 4\002F5\000\367upp5\000righ\376*\014}\nunionX\231\000\234\007\231\010{\n\231\003 g3\364d4\316\001}m\ndoma\007in_\227$\003\010\242 \021\010\215<\200\244#E\004\252$\003\010B\007\234\201 \236\003}\336\306I of \344 tu\357rbed\325@und\267ing\334Ban\n\004a\207ry\n\255A\261A\000\005\275Am\377atrix < \3371.000\000\000, A0\000\007\014\005&\022F\006\047\0071\0017\3302\020N%\237\017 >\330\022ta\367nk_\357\000eria\217l()\n\303 \234\205\004\223%}\376#\377isosurf\007ace\237)\254m\237\047\24008\002\377indices \361{\237{\356\205\003\212\204\016norm\347al_\010:=\004vec\367torm\031#inc\377lude \"co\265l(\000.\r\000\"\n\014\007t\177extures\010\r\357glas\004\016met\273al\031\017old/\016swtonD\017woo\030\020Whapo\017s\021\0022\240\r\377function\356\212\017ath\314\016ran\363sf\354 \330\004\nglo\375b\370 settin\375g\265Iambien\347t_l\311\212\004\251 rg\177b <1.0,\276\207\001\370\000\002\362\205\007\233 umed_\377gamma 2\n\377}\n\nbackg\377round { \374\351\"<\0030.3199\37397\373\207\00134000m2\205\210\00142\021\0009>5\000\277camera\302hp\337erspe\344\000ve\336\320\210\006loca\364\001 <\261$-\000\314\214\001\003\001y,\t\002z~\212\207\007sky <0\260\001n\000\0025.0\246\207\007up\030\000\303, \314\001\273\207\007\273\214\003\344\00033\374\026\002%\010angle \36345\270\211\004\201\010ok_a?t <$lo\005\002\333\215\001\206\003\005y,\r\006\224\000\224 \315\"_\377source {\3001\000\256\215\001-\002\004\002,\001\r\002z>>\256$White(\016\332\212\006v9\006+$U\003dx,\003\004\201y\n\006K\010\223\213\006\215C\232 \212@8\346\322@0.\004\002\000\0070>*\3172.25\251\213\001\310\213\006spsot\217b\332\213\006poi\245`^\373\0010.5,\000\0010\341!\022{3-\274\005\034\222-\320/\010\246\226e\356\225\202r// \203\207\004---\340\000\000\000\003\000\t\000\025\037\016\n//\336#\036<<< \313\210\006of\377 squared\377 plane d\337imens\260\211""\001\n#\357decl\030\000 Ra\377sterScal\377e = 0.10\375;\r\rHalfLi\274=\000\034\0020125\n\026Z\370\030\010\214\200 \354\200%\n#mac\333ro\246\004(R\252\002, uH\222\001)\353\222\005pig\334\000\333t{\356 ad\277\212\001 x\303 s\323\002*\003\212\223\016\203\215\002_moap{[\212\223\002 \243\212\007\377t<1,1,1,\1770>*0.8]\201\223\030\307[0+\203\002\0009f\0171>\006W\0321-]\024\0005\305\200 \270\225\002\2118\377} }\n #enGd//\251\226\001\323c\235L-\303Bq\n\317\202I\241\232\001\331\204\013XY\n\352\204\003\375{\342\214\0010,1>, \377$floor_z\371 \261\232\003\212\205\003with \017laye\237\205\001\370\220\005\271\227\006\212\221\004\367 { \322echec\327ker\222\214\t,\331\216\004Bl\207ack\307\225\017\372c\322\212\006\311`5\312\366\225\005}\231\t-\346a\243\000waOll_yg;\332\222\001 \264\215\004\376\270\224\027rotate<\3170,0,\220\217\006\206\n0,\235-\264\"sky\367\200=\215\002B\207lue\350\227\017\202\230\007{\023\223\207/ \032\377` \352\210\016XZ\274\207\005\220\231\r\243\231\005\307{\n \374\224\004\311\226\001\304\207\006rg\177bf<.98,\000\001\376\004\0010.85>*1\376\301\231\001finish \303{ \255\223\004\322\233\001\365\233\t\214\240\001us\365e\322\211\0015\215\234\trefl~\322\222\001on 0.2\247\234\t\376\352\222\001ular 0.\3756%\noughne\363ss\264\234\002A\t// p?hong 1\360\234\010\r\005\377_size 40\3250g\024{\204\235\0013\321\224\002 f\177resnel \222\000\366\227\233\007//\220\211\002nser\377ve_energ\304\330\235\010\305\233\001}\273\241\001\354$\274\227\004\n\n\377 interi\357or{ \002\000 1.\376\363\n fade_p\256\352\241\002100\256\t \026\003d?istanc\267!\047\020^\267\222\0068,0.\000\0018\377\234\t\234\206\t\177\005\n\n\n\235\t\227\235\005\n\242\253\210\001\n\326\213\005\377\232\023\356\202/9\260\213\001995\346\2029\326\202/ //\366O\r\005\322\344\202!2\354X\345] \337\202$33\360\223\242\n\254\202X\360R\351W#ver\276\225\221\001 3.7;\213\235\007 \177\"proteu\216\235\004\377..Auxili\377aryVaria\377bles.Pro\375f\021\000ng.h5/\377//inside\335_\212\236\003 on\374\241\001me\177sh\n/ele\234\220\001\377s""Spatial\373_D\362\245\002/node\376\005\014<{0:d},\327 {1\001\0032\013\000>,)\n\020\004\020\003{\n\010f&\003\002\002\3572:f})\000?AT\377TACHING \377TO HDF5 \377!!Calcul\377ate call\377ed at ti\357me E\224\004 haWve y\002 \217 t\327\240\002\377but algo\377rithm is\377 for tet\377sExtract\255 \303\241\007sI\317\241\006 \222 e\376\047\001mat not\377 recogni\377zedOnly \357zero6\001con\277tour eG\003i\347onWf\000\327\246\001pov\357 fra\234\000dis\346\350!en\356!\314\241)gci\365s0\003d\200A2 {\n\356\323\001ex_\247\241\006num\377py._core\357.mul\227@rra_y fai\235!t\241\000\337mport\033\tum\327ath\021\016o\322\001im\255p\340Ced\242\"0\222( \337in 3D\271\"no\351w\316h\335d/\263\047.py\375x\376C\n{fiel\377d:s}_{va\267lue\334@_{\222\":_04d}.\243 }\340\246\001\370\345\253\002\241\251\001\351aes\n//\360\275\247\377\322\252\021\361\252\006\216\251.AV_b\367ase\361\206\017Comm\257FemF\245AF\264`I\374\374\204\007\310H__init\373__\333Hattac\371h\231\206\001\004\016Model\366\000\023.<\377\242\001ls>.\177genexpr\255h\371c\332\206\005\301htrian\371g\363\206\002\204\022write\236\257\206\007Mesh\377h\013\020_\373h5\002\034povra\375y6\rSceneH\377eaderJLM\357PIOr\007\000edD\377ictPETSc\336\301\211\006Temp\243\210\001__\347Pyx\001\000\036\001_Ne\377xtRef__a\373nn\267\224\002____c\376\231\250\001_getite\035m\r\001doc\024\001\231\247\001\034\001\006\355#__\334\260\002.\000\264\250\001.\003\t\001\337oduleC\001mr\377o_entrie\335sR\001nam\022\002pr\357epar\035\002qua\335l\017\005tes\305@_i\375s\262\207\001outine\373aa\240\246\002Timea\373ra\276\207\001async\277io.cor\035\003s\350\344G\362C\336Bb*\000ier\377beginSeq\367uen\230\213\001bnbn{tb\275\247\001aryN\235\213\001\216\320Fcam\362\246\002\360\246\002\375\246\001z\374\221\230\002v\001cline_\327in_\223\212\001e\201\250\001cl\377osecoeff{ic\321\250\001scol\363\223\004\376\010\000mmcount\357_non\212\212\001cre\377ate_data\357setd\004\001def\337aultd\237@do!f\242\263\003\326\262\t\324\262\t\357\262\010z\306\263\t\304\263\t\372\302\263\tda\001xeeNek""bN\224\215\004B\353\004Ma\271\223\001\177alTypes\r\014\302\211\"A\240\212\001\311\215\004\000\016-\002se\273nd\306\047enu\326\251\001t?eepsex\224\224\003\355\214\004\310m\004\367@P\002f\352\211\002\357\211\002Na7mes\371\211\002_i\311\214\001\222a\274\321\214\001\223`fixf\350!g\377ridflatt\373en\331\233\004flushv\345\253\001at\267\214\002fur\270\267\002\334\266\267\002\264\267\002g2b\261\206\004ge\377tgnh5h5p\377yiindexi\303sM\211\242\002\224\260\007\320\215\010\336\204\001si\377tertools\377jjoinlev;el\245\207\002Lis\227\250\003\201\251\005\312\212\251\004y\356\251\003x\365\251\003\007\004zl\273og\000\000Dir\006\000E\017vent\267\252\004\274\252\006\272\252\006\317\252\005\375z\277\220\001minusm\376\225\210\001mpi4pyn\265n\260\217\005_\311\255\003nF\253\216\001s\373nM%\001nN_st\337artnP\220 nZ\357eros\324\205\001dtu\373pl\264\210\001tnext\377_outputnR\311\000l\231\272\002\237\272\001y\244\272\001z\224\221\001\300\343B\234\221\002\247\261\001\251\261\003\247\261\013\275\261\003sn\377pnum_own\307ed_\340\221\005\325\216\002\331\216\003li\375n\276\220\001penosp\377athpetsc\336\277\000phip\256@po\177ppovpov\235\210\002\274\000\005\376\207\005pov_\370Ep\377rintprod\367uct\224\223\004rankwssa\365\216\001Rat\254\204\001\301f\371a\277\205\001\270\205\003\272\260\003\302\235\001st\372\375`t@\000gsubs\377titutetL\377astthrow\374\206\222\001\212\222\001Integr\314\337\256\002\246\212\022uv\204\217\002\211\217\002sv\004\201\224\004\250\204\002w\271\237\003\314\212\002\321\212\002\311\205\005\320\212\020\240\302\212\023\332\212\021\307\212\003\241\213\002\267\212\010x\275\222\001s\377zip\200A\330\010\013\377\2104\210x\220s\230!\377\330\014\017\210q\320\020%\377\240R\240t\2501\250A\277\330\014\020\320\020+\007\000G\377\2607\270!\330\r\021\220\357\030\230\023\230\021\003\047\240q\277\250\007\250w\260a\016\006\360\377\006\000\r\020\210q\220\001\376Q\000\017\020\330\010\020\220\004\377\220F\230\"\230G\2401\377\330\010\023\2204\220y\240\377\002\240\047\250\021\330\010\022\377\220$\220h""\230b\240\007\377\240q\330\010\031\230\024\230\177_\250B\250g\260Q#\001\3772\220U\230%\230q\240\377\t\250\031\260$\260k\300\377\021\300#\300Q\300d\310\377%\310u\320TW\320W\357X\320XY\255\003y\230\003\363\2301\240\000d\000E\230\021\230\277*\240A\340\014\020\003\007\330\315\010\312\000\220\017H\000d\000\250\003\376\315\000D\260\013\2705\300\001\374\000\026(\007\t\250\021\250#\250\377Q\250d\260+\270U\300\375!B\006\320 0\260\001\260\377\023\260A\260T\270\033\300\373E\310\311\000\t\210\026\210q\373\200A\372\000\t\r\210I\220\376\301\000\024\220E\230\037\250\002\375\2504\000\014\210N\230)\240\373=\260q\000\014\320\014!\240\357\031\250%\250\360\000\014\210A_\330\016\027\220u\310 \010\000\t\376\013\n\320\014\035\230S\240\001\372\377\"*J\000\020\024\220A\330\373\r\025^\001\014\210K\220r\375\230\306 \014\210M\230\031\240\371%\303!]\000\"\240)\2505^g\002\210E\220\031\314@\010r\000\217\037\230y\250{\0010\000u\002O\234\261 \024\001\035\230Q\235\"\270\000\010\237\000\t\016\210^\024\001\377\2011\027\277\320\027<\270G\300\207@\022\261\220\277`\000\002\335Aa\330\331\000E\337\320\021!\240\021\335cu\220\365Iq\000\014\027\002\220~\240Q\177\330\014\021\220\022\2206\270@\377$\230g\240T\250\022\250\372?\002\"\262`!\2304\230wo\240d\250\"\200\204\001\022\220\002\016\276\326A\005\220T\230\027\317`!\317\2403\240b\353!;\001\017\210_v\220Q\220a\205\204\003t\361`\357q\330\020\023_\002(\240!\277\2401\360(\000\005\237\204\001\006\373\220c\257`!\330\024\032\230\037#\230Q\230a\000\006\000\017\031\010\377!\240\024\240W\250B\250\005a\301@\024\000\n\000\027\033\026\221\003\356\205\001Wt\2201\227\013\026j8\014\375\002\371\340\333(\332\206\002q\330\014\027\220\273q\340\030\003\220a\330\002\004j\251\240\222\205\007\346a\220\321!\021\254$\320\377\0324\260G\2701\330\025\377\031\230\032\2401\240A\330\366.\ra\340;\t\330\020\022\220\347.\240\001\241 \327@\020\220\007\367\220t\230\323\0024\320\0274\377\260A\260U\270\"\270A\276\355!%\230q\330\030\361\206\001T\357\240\021\240#\365@\021\330\034\277 \320 :\270!i""\000\024\377\027\220v\230Q\320\0366?\260g\270R\270qa\017\263\004\274\272\004\372\206\001\005\220^\240\202\207\002\005\373\220X\334a\020\220\005\320\025\371%\333a\337h\017\210t\2205\367\230\t\240\324\005\230!\360\022\377\000\t\024\2201\340\010\013\177\2106\220\021\220!\330\002\004\275*\254\210\001\240C\240q\260\205\003E\373\220\021\246$\320\0260\260\007\257\260r\270\021\"\005!\360\206\001\014|9\0021\0012\240S\250\001\332\210\001K\014\210\013\047161*\010F\357\205\001\034\360\204\002\214\020\020\000\t\232\002\324\004\213\206\002\367\220\036\230\252\210\001\016\000\t\r\377\210F\220\"\220G\230:\357\240X\250Q\250\206\001I\220R\377\220w\230j\250\013\2601\376\267\206\001H\220B\220g\230Z\367\240z\260\344\207\002O\2302\230?W\240J\320.?\224@\260\"\377\023\220A\330\014\022\320\022\376\351 \240a\330\010\016\210d\377\220\"\220A\220T\230\033\177\240F\250!\2507\260\374\210\002\177F\220%\220q\230\004\262\213\001\237\023\2201\330\014\302\210\001\000\002\014\274\252\207\002\253@\220U\230!\247a\024\337\220D\320\030*7\0004\250\376\261\206\0023\220a\220s\230\"\375\230\263`\030\230\007\230q\240\377\001\330\025\030\230\001\230\023\357\230B\230a\302`\024\031\230\355\027\355`\021\340\001\005\330\014\025K\220S\036\000\021\000\006k\001C|\000\277\001\330\014\023\2207\207\214\0022\277\240V\2503\250a\214\205\001s\376s\002\014\017\210w\220c\230\337\022\2304\230v\277A\330\020\376\275\212\001\021\330\024\030\230\005\230\277Q\330\030\034\230A\204\212\001\240\365\023\222`s\325\0003\250b\260\337\003\2601\260A\027\001B\230\177c\240\024\240Z\250q\020\000\3772\260T\270\032\3001\300\377A\330\034\036\230d\240*\333\250A\325 \030\035\263 A\240\367Q\330\020\275\004\240\031\250\"\377\250B\250d\260%\260u\367\270A\270\010\016b\260\002\260W$\260e\245\214\001\300\205\206\0027\233 \3774\230z\250\021\250$\250\337a\250t\2602\304\205\004\033 \377\240\002\240#\240R\240u\272\217\210\001\330\002\nd\260\"\235\000\024\375\034\247 e\2401\240H\2505B\262\000\001\306@$,\000\010\r\006q\020\231!\360\211\001\010[\031\230\026\261C""\377\021\230(\240\"\240B\240\377a\240t\2502\250U\260\337!\2608\2702\354\206\001\300\001\331\330\323@\003\031\020\032\231\217\002\001\330\217\020\027\220w\202b\000\006\010\007\036\277\230g\240Q\240h\360\001\330\355\020\001r\021\027\266\204\002D\240\007\023\240s\266\216\003\237\220\001!\321h\304\204\001\325a\367\003\2403\205 s\250\"\250\371C\303`\375\000\030\230\002\230#\277\230T\240\032\2501\020\000r\377\260\024\260Z\270q\300\0045\300\353bJ\261 q\330\350\204\006\273w\376\306I%\250q\260\004\260B\342\322`2\355`\354\202I\346\200s\030\230\003+\2302\237 \026\324%D\360\206\002\256\206\007\370\361\200h\272\205W\340\200yV\2406\250\023\376\241\210\002\047\270\023\270C\270q\367\330#)\006\010A\340\020\025\357\220W\230A\237\204\004E\260\021\323\260!\306\210n\331\206\330\021\326\204\t\"\250\377D\260\007\260s\270!\340H\221\214\005\362\214\003\361\213\003\001\253\214\001\364\204\t\230\340\207\002\375A\204\215\002\023\230C\230s\240\364\233\225\003\375\230\001A\330\214\001B\220c\230\377\024\230Z\240q\250\003\250\1772\250T\260\032\2701\225\222\001\007\026\220d\277\231\001\246\214\001\326C\227\214\031\234\200\335C1\330\3254\254\216\026\341\227\001\227\235\001\024\221\214\003\367t\240:\272\233\002!\2604\260\377r\270\025\270b\300\001\330\377\037$\240B\240c\250\022\277\2505\260\002\260!\001\013$\277\260b\270\001\330\030\317\216\001%\277\240q\250\010\260\002\276\216\001\260OQ\330(0\000\010\016\005\340Y\n\377e\2601\260D\270\002\270\237%\270r\300\021\033H\305\214s\230?\021\320\004\030\230\001\314\235\001\216\234\004\367\013\2101\273\222\0014\320\027\047\363\240q\234\240\004\303\220\001d\260!\260\3751\317\230\001t\220<\230w\240\377e\2505\260\004\260K\270\377q\300\003\3002\300U\310\357!\33004\006\006Q\330\020}\021\234\240\001\021\220\005\220R\224\230\003\375\021\235\237\001t\320\023%\240V\376\345\215\002s\260!\330\014D\300\373G\310\371A\320\024&\240f\376\274\222\002\010\014\210G\220:\230\367T\240\021\347\227\003Q\330\020\024\347\320\024*\332\224\004\010\001(\250\001\317\250\027\260\003\347@""\326\236\002L\230\375\001\317\241\001:\220T\230\025\230\375c2\002\320\020 \240\004\240\177A\320\004\037\230q\360\344\235\007\374\364\241\001\216\235\004\026\220a\220t\230w3\230b\315\234\001\330\027\033\010\000\375e\224\217\002t\2507\260$\260\357d\270\047\300\203\230\002t\2203\237\220a\330\020\026\224\225\004\334\217\001r\276\247\240\002R\250t\2607\337\231\001\270\375Q;\0017\240\"\240A\240\371S\221\235\003\274\207\002r\270\021\270!\376\r\013$\250b\260\004\260G\377\2702\270Q\270c\300\022\377\3004\300w\310b\320PoQ\320QR\243\226\002\220T\347\225\002\375b\365\225\001\031\230\023\230E\240U\023R\000T\352\000\004\356`\007\233\232\001\377\021\220\021\220%\220t\230\334f\007\327\224\003\047\270\022\322\207\002\014\026\377\220l\240$\240g\250R\232\234\225\004U\342\232\002\"&\002\016\047\000d\337\230\047\240\022\240\217\231\001r\250\373\025\250\344\000\024\220G\23026\233\236\002\014\025\341\236\n\004\250\306\210\002\025\006\177\024\220D\230\007\230r\314\233\002\253R\240\311\221\001D\246\232\003\270\215\240\002$\377\220a\220\177\240a\330\014w\037\230x\325\232\001\360\\\004\247\244\001\377v\220Q\320\026&\240k\357\260\021\260*\276\240\001\300A\330s2<\000\006\n\0058\270\003\235\211\002\3712\000\006\t\006:\270%\270q\317\300\001\3302\000\006\t\006;\270\3671\3302\000\002:\270!\330_29\270\021\330>\000\001\236\245\003\336u\001\004#\2401\207b\320\r\373 \240\234\242\002N\230!\230:\377\240Q\240c\250\024\250^\373\2704\343\231\001\r\210Q\320\016\307&\240d\307\243\002\275\243\001\234 \320$w>\270b\214\223\001\300V\310\244\232\002\377M\230\022\2301\320\0343\275\260\375\227\001\021\270&\300\350\243\003\"\317\240#\240Q4\004\215\234\002\010\023\377\220:\230Q\230l\250!\375\250\334\232\002I\220Y\230i\240\373q\250\311!\014\020\220\002\220\237!\220;\230h\216\226\004\370\244\001!\337\330-1\260\034\232`b\300\337\001\300\023\300A\013\001\021\260\373&\270\276\243\016\013\2105\220\003\376\331\232\001\020\320\020!\240\021\240\376\253\245\003\320\004,\250A\330\021\377\037\230~\250Q\360H\001\234\356\233\001""\367\243\003\210J\220\230\243\002\251\245\002\014\365\210\254\205\002\014\231\244\004\320\014\036\230\276\265\243\002C\210z\230\024\311\236\004\220\265Q\353\226\001r\367\247\002\024\025\324\243\001N\021\230\327\245\004\340\245\002I\004H\203`\345\233\001\326\244\006\002\373\245\001!";
20838 PyObject *data = __Pyx_DecompressString_LZSS(cstring, 6113, 13411);
20839 #define __Pyx_DecompressString_UNUSED
20840 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
20841 const char*
const bytes = __Pyx_PyBytes_AsString(data);
20842 #if !CYTHON_ASSUME_SAFE_MACROS
20843 if (likely(bytes));
else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
20846static const char bytes[] =
"\nobject\n{\n//difference\n//{\n// box {\n// <$nll_x,$nll_y,$nll_z>, // Near lower left corner\n// <$fur_x,$fur_y,$fur_z> // Far upper right corner\n// }\nunion\n{\n\nobject\n{\ndifference\n{\nbox {\n <$nll_x,$nll_y,$nll_z>, // Near lower left corner\n <$fur_x,$fur_y,$fur_z> // Far upper right corner\n }\nbox {\n <$domain_nll_x,$domain_nll_y,$domain_nll_z>, // Near lower left corner\n <$domain_fur_x,$domain_fur_y,$domain_fur_z> // Far upper right corner\n }\n}//difference of perturbed bounding box and boundary\n matrix < 1.000000, 0.000000, 0.000000,\n 0.000000, 1.000000, 0.000000,\n 0.000000, 0.000000, 1.000000,\n 0.000000, 0.000000, 0.000000 >\n tank_material()\n}//object\n }\n matrix < 1.000000, 0.000000, 0.000000,\n 0.000000, 1.000000, 0.000000,\n 0.000000, 0.000000, 1.000000,\n 0.000000, 0.000000, 0.000000 >\n isosurface_material()\n }\n }\n face_indices {\n }\n normal_indices {\n }\n normal_vectors {\n #include \"colors.inc\"\n#include \"textures.inc\"\n#include \"glass.inc\"\n#include \"metals.inc\"\n#include \"golds.inc\"\n#include \"stones.inc\"\n#include \"woods.inc\"\n#include \"shapes.inc\"\n#include \"shapes2.inc\"\n#include \"functions.inc\"\n#include \"math.inc\"\n#include \"transforms.inc\"\n\nglobal_settings {\n ambient_light color rgb <1.0, 1.0, 1.0>\n assumed_gamma 2\n}\n\nbackground { color rgb <0.319997, 0.340002, 0.429999>}\n\ncamera {\n perspective\n location <$cam_x,$cam_y,$cam_z>\n sky <0.0, 0.0, 5.0>\n up <0, 0, 1>\n right <1.33, 0, 0>\n angle 45.0000""00\n look_at <$look_at_x,$look_at_y,$look_at_z>\n}\n\nlight_source {<$light_x,$light_y,$light_z> color White}\n\nlight_source {\n <$light_x+$light_dx,$light_y+$light_dy,$light_z>\n color <0.99980, 0.999800, 0.999800>*2.250000\n spotlight\n point_at <0.5,0.5,0.0>\n}\n\nlight_source {\n <$light_x+$light_dx,$light_y-$light_dy,$light_z>\n color <0.99980, 0.999800, 0.999800>*2.250000\n spotlight\n point_at <0.5,0.5,0.0>\n}\n\nlight_source {\n <$light_x-$light_dx,$light_y-$light_dy,$light_z>\n color <0.99980, 0.999800, 0.999800>*2.250000\n spotlight\n point_at <0.5,0.5,0.0>\n}\n\nlight_source {\n <$light_x-$light_dx,+$light_y,$light_z>\n color <0.99980, 0.999800, 0.999800>*2.250000\n spotlight\n point_at <0.5,0.5,0.0>\n}\n\n// ground -----------------------------------------------------------------\n//---------------------------------<<< settings of squared plane dimensions\n#declare RasterScale = 0.10;\n#declare RasterHalfLine = 0.0125;\n#declare RasterHalfLineZ = 0.0125;\n//-------------------------------------------------------------------------\n#macro Raster(RScale, HLine)\n pigment{ gradient x scale RScale\n color_map{[0.000 color rgbt<1,1,1,0>*0.8]\n [0+HLine color rgbt<1,1,1,0>*0.8]\n [0+HLine color rgbt<1,1,1,1>]\n [1-HLine color rgbt<1,1,1,1>]\n [1-HLine color rgbt<1,1,1,0>*0.8]\n [1.000 color rgbt<1,1,1,0>*0.8]} }\n #end// of Raster(RScale, HLine)-macro\n//-------------------------------------------------------------------------\n\n// squared plane XY\nplane { <0,0,1>, $floor_z // plane with layered textures\n texture { pigment{checker color White, color Black}\n scale $light_dy*0.5}\n }\nplane { <0,-1,0>, $wall_y // plane with layered textures\n texture { ""pigment{color White}\n }\n rotate<0,0,0>\n }\nplane { <0,0,-1>, $sky_z // plane with layered textures\n texture { pigment{color Blue}\n }\n rotate<0,0,0>\n }\n//------------------------------------------------ end of squared plane XZ\n#macro tank_material()\nmaterial{\n texture{\n pigment{ rgbf<.98,.98,.98,0.85>*1}\n finish { ambient 0.0\n diffuse 0.15\n reflection 0.2\n specular 0.6\n roughness 0.005\n // phong 1\n // phong_size 400\n reflection { 0.03, 1.0 fresnel on }\n // conserve_energy\n }\n } // end of texture\n\n interior{ ior 1.5\n fade_power 1001\n fade_distance 0.5\n fade_color <0.8,0.8,0.8>\n } // end of interior\n\n\n} // end of material\n#end\n\n#macro isosurface_material()\nmaterial{\n texture{\n pigment{ rgbf<.98,.98,.98,0.9>*0.95}\n finish { ambient 0.0\n diffuse 0.15\n specular 0.6\n roughness 0.005\n //phong 1\n //phong_size 400\n reflection { 0.2, 1.0 fresnel on }\n conserve_energy\n }\n } // end of texture\n\n interior{ ior 1.33\n fade_power 1001\n fade_distance 0.5\n fade_color <0.8,0.8,0.8>\n } // end of interior\n} // end of material\n#end\n#version 3.7;\n#include \"proteus.inc\"\n..AuxiliaryVariables.Profiling.h5///inside_vector on\n}//mesh\n/elementsSpatial_Domain/nodesSpatial_Domain<{0:d}, {1:d}, {2:d}>,\n<{0:d},{1:d},{2:d}>,\n<{0:f}, {1:f}, {2:f}>,\n?ATTACHING TO HDF5 !!Calculate called at time Elements have {0:d} vertices but algorithm is for tetsExtract isosurfacesIsosurface file format not recognizedOnly zero isocontour extractionWriting pov frame disableenableface_indices {\n gcisenabledmesh2 {\nvertex_vectors {numpy._core.multiarray failed to importnumpy._core.umath failed to importonly implem""ented for 0 isosurface in 3D for nowproteus.incproteus/Isosurface.pyx{0:d},\n{field:s}_{value:f}_{frame:04d}.pov}\n}//union of meshes\n//}//difference of perturbed bounding box and boundary\n matrix < 1.000000, 0.000000, 0.000000,\n 0.000000, 1.000000, 0.000000,\n 0.000000, 0.000000, 1.000000,\n 0.000000, 0.000000, 0.000000 >\n tank_material()\n}//object\nAV_baseAuxiliaryVariablesCommFemFieldFileIIsosurfaceIsosurface.__init__Isosurface.attachHDF5Isosurface.attachModelIsosurface.attachModel.<locals>.genexprIsosurface.calculateIsosurface.triangulateIsosurfaceIsosurface.writeIsosurfaceMeshIsosurface.writeIsosurfaceMesh_h5Isosurface.writeIsosurfaceMesh_povrayIsosurface.writeSceneHeaderJLMPIOrderedDictPETScProfilingTemplate__Pyx_PyDict_NextRef__annotate____class_getitem____doc____func____init____main____metaclass____module____mro_entries____name____prepare____qualname____test___is_coroutineaactiveTimeararrayasyncio.coroutinesattachHDF5attachModelbarrierbeginSequentialbnbntboundaryNodescalculatecamcam_xcam_ycam_zcheckTimecline_in_tracebackclosecoefficientscollectionscommcount_nonzerocreate_datasetddatadefaultdictdofdomaindomain_fur_xdomain_fur_ydomain_fur_zdomain_nll_xdomain_nll_ydomain_nll_zdsetdxeeNebNelementBoundaryMaterialTypeselementBoundaryNodesArrayelementNodesArrayelementselemsendSequentialenumerateepsexteriorElementBoundariesArrayffieldfieldNamesfield_ifilenamefileprefixfine_gridflattenfloor_zflushformatframefurfur_xfur_yfur_zg2bgenexprgetgnh5h5pyiindexisMasterisosurfaceisosurfacesitemsitertoolsjjoinlevelModelListlightlight_dxlight_dylight_xlight_ylight_zloglogDirlogEventlook_atlook_at_xlook_at_ylook_at_zmeshminusmodelmpi4pynnElements_globalnFramesnMinusnN_startnPlusnZerosnamedtuplenextnext_outputninllnll_xnll_ynll_znodeArraynodesnormnormalnormal_indicesnormalsnpnum_owned_elementsnumpynumpy.linalgopenospathpetsc4pyphipluspoppovpovScenepovScene""Templatepov_filenameprintproductproteusrankssampleRateselfsendsetdefaultshapesky_zstepstringsubstitutetLastthrowtimetimeIntegrationtriangulateIsosurfaceuvvaluevaluesvariableNameswwall_ywritewriteBoundarywriteIsosurfaceMeshwriteIsosurfaceMesh_h5writeIsosurfaceMesh_povraywriteSceneHeaderxzeroszip\200A\330\010\013\2104\210x\220s\230!\330\014\017\210q\320\020%\240R\240t\2501\250A\330\014\020\320\020+\2501\250G\2607\270!\330\r\021\220\030\230\023\230A\330\014\020\320\020\047\240q\250\007\250w\260a\330\r\021\220\030\230\023\230A\360\006\000\r\020\210q\220\001\200A\330\017\020\330\010\020\220\004\220F\230\"\230G\2401\330\010\023\2204\220y\240\002\240\047\250\021\330\010\022\220$\220h\230b\240\007\240q\330\010\031\230\024\230_\250B\250g\260Q\330\010\023\2202\220U\230%\230q\240\t\250\031\260$\260k\300\021\300#\300Q\300d\310%\310u\320TW\320WX\320XY\330\010\013\2104\210y\230\003\2301\330\014\020\220\004\220E\230\021\230*\240A\340\014\020\220\004\220E\230\021\230*\240A\330\010\017\210q\220\017\230q\240\007\240q\250\003\2501\250D\260\013\2705\300\001\330\010\017\210q\220\017\230q\240\007\240q\250\003\2501\250D\260\013\2705\300\001\330\010\017\210q\220\017\230q\240\t\250\021\250#\250Q\250d\260+\270U\300!\330\010\017\210q\220\017\230q\320 0\260\001\260\023\260A\260T\270\033\300E\310\021\330\010\t\210\026\210q\200A\360\006\000\t\r\210I\220Q\330\010\024\220E\230\037\250\002\250!\330\010\014\210N\230)\240=\260\001\330\010\014\320\014!\240\031\250%\250q\330\010\014\210A\330\016\027\220u\230A\330\010\014\210A\330\016\027\220u\230A\330\010\014\210A\330\016\027\220u\230A\330\010\014\320\014\035\230S\240\001\330\014\020\320\020*\250!\330\020\024\220A\330\r\025\220Q\330\010\014\210K\220r\230\021\330\010\014\210M\230\031\240%\240q\330\010\014\320\014\"\240)\2505\260\001\330\010\014\210E\220\031\230!\330\010\014\320\014\037\230y\250\001\330\010\014\210K\220q\330\010\014\210O\2301\330\010\014\320\014\035\230Q\330\010\017\210q\200A\360\010\000\t\016\210^\2301\330\010\020\220\004\220F\230\"""\230G\2401\330\010\023\2204\220y\240\002\240\047\250\021\330\010\022\220$\220h\230b\240\007\240q\330\010\031\230\024\230_\250B\250g\260Q\330\010\027\320\027<\270G\3001\330\014\022\220!\330\014\022\220!\330\014\022\220$\220a\330\010\014\210E\320\021!\240\021\330\010\013\2104\210u\220I\230Q\330\014\022\220$\220a\220~\240Q\330\014\021\220\022\2206\230\021\230$\230g\240T\250\022\2501\330\014\022\220\"\220F\230!\2304\230w\240d\250\"\250A\330\014\022\220\"\220F\230!\2304\230w\240d\250\"\250A\330\014\017\210q\220\005\220T\230\027\240\002\240!\2403\240b\250\002\250!\2501\330\014\017\210v\220Q\220a\360\006\000\r\020\210t\2204\220q\330\020\023\2206\230\021\230(\240!\2401\360(\000\005\020\210q\220\006\220c\230\021\230!\330\024\032\230#\230Q\230a\330\024\032\230#\230Q\230a\330\024\032\230#\230Q\230a\330\024\032\230#\230Q\230a\330\024\032\230#\230Q\230a\330\024!\240\024\240W\250B\250a\250q\330\024!\240\024\240W\250B\250a\250q\330\024!\240\024\240W\250B\250a\250q\330\024!\240\024\240W\250B\250a\250q\330\024!\240\024\240W\250B\250a\250q\330\024!\240\024\240W\250B\250a\250q\330\020\023\2206\230\021\330\014\017\210t\2201\330\020\023\2206\230\021\230(\240!\2401\360\026\000\005\020\210q\220\006\220c\230\021\230!\330\024\032\230#\230Q\230a\330\024\032\230#\230Q\230a\330\024\032\230#\230Q\230a\330\024\032\230#\230Q\230a\330\024\032\230#\230Q\230a\330\014\017\210v\220Q\340\014\022\220$\220a\220~\240Q\330\010\013\2104\210q\330\014\027\220q\340\014\017\210v\220Q\220a\330\014\017\210v\220Q\220j\240\007\240q\250\003\2501\250D\260\001\330\014\020\220\005\220T\230\021\330\020\023\2206\230\021\320\0324\260G\2701\330\025\031\230\032\2401\240A\330\014\017\210v\220Q\220a\330\014\017\210v\220Q\220a\340\014\017\210v\220Q\220j\240\007\240q\330\020\022\220.\240\001\240\024\240Q\330\014\020\220\007\220t\2301\330\020\023\2204\320\0274\260A\260U\270\"\270A\330\024\032\230%\230q\330\030\031\230\024\230T\240\021\240#\240T\250\021\330\034 \320 :\270!\2701\330\024\027\220v\230Q\320\0366\260g\270R\270q\330""\014\017\210v\220Q\220a\330\014\017\210v\220Q\220a\330\014\017\210v\220Q\330\014\017\210v\220Q\330\014\020\220\005\220^\2401\330\014\020\220\005\220X\230Q\330\014\020\220\005\320\025%\240Q\330\014\022\220$\220a\220~\240Q\330\014\017\210t\2205\230\t\240\021\330\020\023\2206\230\021\230!\360\022\000\t\024\2201\340\010\013\2106\220\021\220!\330\010\013\2106\220\021\220*\230G\2401\240C\240q\250\001\330\010\014\210E\220\021\330\014\017\210v\220Q\320\0260\260\007\260r\270\021\330\010\013\2106\220\021\220!\360\006\000\t\014\2106\220\021\220*\230G\2402\240S\250\001\250\021\330\010\014\210E\220\021\330\014\017\210v\220Q\320\0260\260\007\260r\270\021\330\010\013\2106\220\021\220!\360\006\000\t\014\2106\220\021\220*\230G\2401\240C\240q\250\001\330\010\014\210E\220\021\330\014\017\210v\220Q\320\0260\260\007\260r\270\021\330\010\013\2106\220\021\220!\360\006\000\t\014\2106\220\021\220*\230G\2401\240C\240q\250\001\330\010\014\210F\220!\330\014\017\210v\220Q\320\0260\260\007\260r\270\021\330\010\013\2106\220\021\220!\360\020\000\t\014\2106\220\021\330\010\013\2106\220\021\330\010\014\210E\220\036\230q\200A\360\016\000\t\r\210F\220\"\220G\230:\240X\250Q\330\010\014\210I\220R\220w\230j\250\013\2601\330\010\014\210H\220B\220g\230Z\240z\260\021\330\010\014\210O\2302\230W\240J\320.?\270q\330\010\013\2106\220\023\220A\330\014\022\320\022%\240Q\240a\330\010\016\210d\220\"\220A\220T\230\033\240F\250!\2507\260!\330\010\014\210F\220%\220q\230\004\230A\330\014\023\2201\330\014\024\220A\330\014\024\220A\330\014\022\220!\330\014\020\220\005\220U\230!\2301\330\020\024\220D\320\030*\250!\2504\250q\330\020\023\2203\220a\220s\230\"\230A\330\024\030\230\007\230q\240\001\330\025\030\230\001\230\023\230B\230a\230q\330\024\031\230\027\240\001\240\021\340\024\031\230\027\240\001\240\021\330\014\025\220S\230\001\230\021\330\014\025\220S\230\001\230\021\330\014\024\220C\220q\230\001\330\014\023\2207\230\"\230G\2402\240V\2503\250a\330\014\027\220s\230!\2301\330\014\017\210w\220c\230\022\2304\230v\240S""\250\001\330\020\024\220E\230\021\330\024\030\230\005\230Q\330\030\034\230A\230S\240\001\240\023\240C\240s\250!\2503\250b\260\003\2601\260A\330\030\034\230B\230c\240\024\240Z\250q\260\003\2602\260T\270\032\3001\300A\330\034\036\230d\240*\250A\250Q\330\030\035\230W\240A\240Q\330\020\030\230\007\230q\240\001\240\031\250\"\250B\250d\260%\260u\270A\270Q\330\020\030\230\007\230q\240\001\240\031\250\"\250B\250b\260\002\260$\260e\2705\300\001\300\021\330\020\023\2207\230!\2304\230z\250\021\250$\250a\250t\2602\260U\270\"\270A\330\033 \240\002\240#\240R\240u\250B\250a\330\033 \240\002\240#\240R\240u\250B\250d\260\"\260A\330\024\034\230B\230e\2401\240H\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330\020\023\2207\230!\2304\230z\250\021\250$\250a\250t\2602\260U\270\"\270A\330\033 \240\002\240#\240R\240u\250B\250a\330\033 \240\002\240#\240R\240u\250B\250d\260\"\260A\330\024\034\230B\230e\2401\240H\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330\020\031\230\026\230q\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\020\032\230%\230q\240\001\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\036\230g\240Q\240h\250b\260\001\330\020\031\230\026\230q\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\020\032\230%\230q\240\001\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\036\230g\240Q\240h\250b\260\001\330\021\027\220s\230\"\230D\240\007\240s\250!\330\020\024\220E\230\021\230!\330\020\024\220E\230\021\330\024\030\230\001\230\023\230A\230S\240\003\2403\240a\240s\250\"\250C\250q\260\001\330\024\030\230\002\230#\230T\240\032\2501\250C\250r\260\024\260Z\270q""\300\004\300A\330\030\034\230J\240a\240q\330\024\031\230\027\240\001\240\021\330\020\030\230\007\230q\240\001\240\031\250\"\250B\250d\260%\260u\270A\270Q\330\020\023\2207\230!\2304\230z\250\021\250%\250q\260\004\260B\260e\2702\270Q\330\033 \240\002\240#\240R\240u\250B\250a\330\033 \240\002\240#\240R\240u\250B\250d\260\"\260A\330\024\034\230B\230e\2401\240H\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330\020\031\230\026\230q\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\020\032\230%\230q\240\001\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\036\230g\240Q\240h\250b\260\001\330\021\030\230\003\2302\230T\240\026\240s\250!\330\020\024\220D\230\001\230\021\330\020\024\220E\230\021\330\024\030\230\001\230\023\230A\230S\240\003\2403\240a\240s\250\"\250C\250q\260\001\330\024\030\230\002\230#\230T\240\032\2501\250C\250r\260\024\260Z\270q\300\004\300A\330\030\034\230J\240a\240q\330\024\031\230\027\240\001\240\021\330\020\030\230\007\230q\240\001\240\031\250\"\250B\250d\260%\260u\270A\270Q\330\020\023\2207\230!\2304\230z\250\021\250$\250a\250t\2602\260U\270\"\270A\330\033 \240\002\240#\240R\240u\250B\250a\330\033 \240\002\240#\240R\240u\250B\250d\260\"\260A\330\024\034\230B\230e\2401\240H\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330\020\031\230\026\230q\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\020\032\230%\230q\240\001\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\036\230g\240Q\240h\250b\260\001\330\021\030\230\003\2302\230V\2406\250\023\250B\250d\260\047\270\023\270C\270q\330#)\250\023\250B\250d\260\047\270\023\270A\340\020""\025\220W\230A\230T\240\032\2501\250E\260\021\260!\330\020\024\220E\230\021\330\024\030\230\005\230Q\330\030\034\230A\230S\240\001\240\023\240C\240s\250!\2503\250b\260\003\2601\260A\330\030\034\230B\230c\240\024\240Z\250q\260\003\2602\260T\270\032\3001\300A\330\034\036\230d\240*\250A\250Q\330\030\035\230W\240A\240Q\330\020\030\230\007\230q\240\001\240\031\250\"\250B\250d\260%\260u\270A\270Q\330\020\023\2207\230!\2304\230z\250\021\250$\250a\250t\2602\260U\270\"\270A\330\033 \240\002\240#\240R\240u\250B\250a\330\033 \240\002\240#\240R\240u\250B\250d\260\"\260A\330\024\034\230B\230e\2401\240H\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330\020\031\230\026\230q\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\020\032\230%\230q\240\001\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\036\230g\240Q\240h\250b\260\001\330\021\030\230\003\2302\230T\240\026\240s\250\"\250D\260\007\260s\270!\340\020\024\220E\230\021\330\024\031\230\027\240\001\240\024\240Z\250q\260\001\330\020\024\220D\230\001\230\021\330\020\024\220E\230\021\230!\330\020\024\220A\220S\230\001\230\023\230C\230s\240!\2403\240b\250\003\2501\250A\330\020\024\220B\220c\230\024\230Z\240q\250\003\2502\250T\260\032\2701\270A\330\024\026\220d\230*\240A\240Q\330\020\025\220W\230A\230Q\330\020\030\230\007\230q\240\001\240\031\250\"\250B\250d\260%\260u\270A\270Q\330\020\023\2207\230!\2304\230z\250\021\250$\250a\250t\2602\260U\270\"\270A\330\033 \240\002\240#\240R\240u\250B\250a\330\033 \240\002\240#\240R\240u\250B\250d\260\"\260A\330\024\034\230B\230e\2401\240H\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330$,\250B\250b\260\001\260\021\330\020\031\230\026\230q\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\024\031\230\021\230(\240\"\240B\240a\240t""\2502\250U\260!\2608\2702\270R\270q\300\001\330\020\032\230%\230q\240\001\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\036\230g\240Q\240h\250b\260\001\330\021\030\230\003\2301\330\020\024\220E\230\021\330\024\031\230\027\240\001\240\024\240Z\250q\260\001\330\020\030\230\007\230q\240\001\240\031\250\"\250B\250d\260%\260u\270A\270Q\330\020\023\2206\230\023\230A\330\024\027\220w\230a\230t\240:\250Q\250d\260!\2604\260r\270\025\270b\300\001\330\037$\240B\240c\250\022\2505\260\002\260!\330\037$\240B\240c\250\022\2505\260\002\260$\260b\270\001\330\030 \240\002\240%\240q\250\010\260\002\260\"\260A\260Q\330(0\260\002\260\"\260A\260Q\330(0\260\002\260\"\260A\260Q\340\024\027\220w\230a\230t\240:\250Q\250e\2601\260D\270\002\270%\270r\300\021\330\037$\240B\240c\250\022\2505\260\002\260!\330\037$\240B\240c\250\022\2505\260\002\260$\260b\270\001\330\030 \240\002\240%\240q\250\010\260\002\260\"\260A\260Q\330(0\260\002\260\"\260A\260Q\330(0\260\002\260\"\260A\260Q\330\020\031\230\026\230q\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\024\031\230\021\230(\240\"\240B\240a\240t\2502\250U\260!\2608\2702\270R\270q\300\001\330\020\032\230%\230q\240\001\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\027\220w\230a\230q\330\020\036\230g\240Q\240h\250b\260\001\230\021\320\004\030\230\001\360\006\000\t\016\210^\2301\330\010\013\2101\330\014\023\2204\320\027\047\240q\330\014\017\210q\320\020,\250B\250d\260!\2601\340\014\017\210t\220<\230w\240e\2505\260\004\260K\270q\300\003\3002\300U\310!\33004\260K\270q\300\003\3002\300Q\330\020\021\360\006\000\r\021\220\005\220R\220t\2301\330\020\021\330\010\017\210t\320\023%\240V\2501\250C\250s\260!\330\014D\300G\3101\330\020\024\320\024&\240f\250A\250Q\330\010\014\210G\220:\230T\240\021\330\014\020\220\005\220Q\330\020\024\320\024*\250!\2507\260!\330\020\024\320\024(\250\001\250\027\260\003\2604\260q\330\010\014\210L\230\001\330\010\013\210:\220T\230""\025\230c\240\021\330\014\020\320\020 \240\004\240A\320\004\037\230q\360\010\000\t\016\210^\2301\330\010\013\2104\210u\220I\230Q\330\014\026\220a\220t\2303\230b\240\002\240!\330\027\033\2303\230e\2403\240a\240t\2507\260$\260d\270\047\300\021\330\014\017\210t\2203\220a\330\020\026\220a\220s\230\"\230D\240\007\240r\250\021\250#\250R\250t\2607\270\"\270A\270Q\330\027\033\2307\240\"\240A\240S\250\002\250!\2501\250D\260\007\260r\270\021\270!\330\027\033\2307\240\"\240A\240S\250\002\250$\250b\260\004\260G\2702\270Q\270c\300\022\3004\300w\310b\320PQ\320QR\330\014\024\220A\220T\230\023\230B\230b\240\001\330\025\031\230\023\230E\240\023\240A\240T\250\027\260\004\260D\270\007\270q\330\014\021\220\021\220%\220t\2307\240\"\240A\240S\250\002\250\"\250B\250d\260\047\270\022\2701\270A\330\014\026\220l\240$\240g\250R\250q\260\003\2602\260U\270!\2701\330\"&\240g\250R\250q\260\003\2602\260U\270!\2701\330\014\026\220d\230\047\240\022\2401\240C\240r\250\025\250a\330\020\024\220G\2302\230Q\230a\330\014\025\220T\230\027\240\002\240!\2403\240b\250\004\250A\330\020\024\220G\2302\230Q\230a\330\014\024\220D\230\007\230r\240\021\240#\240R\240s\250\"\250D\260\007\260r\270\021\270!\330\014\022\220$\220a\220\177\240a\330\014\037\230x\240q\250\001\360\\\004\000\r\020\210v\220Q\320\026&\240k\260\021\260*\270G\3001\300A\3302<\270G\3001\300A\3302<\270G\3001\300A\33028\270\003\2701\270A\33028\270\003\2701\270A\33028\270\003\2701\270A\3302:\270%\270q\300\001\3302:\270%\270q\300\001\3302:\270%\270q\300\001\3302;\2701\3302;\2701\3302:\270!\33029\270\021\33028\270\001\360\006\000\r\020\210v\220Q\320\004#\2401\360\010\000\t\016\320\r \240\001\330\010\014\210N\230!\230:\240Q\240c\250\024\250^\2704\270q\330\010\r\210Q\320\016&\240d\250!\330\010\014\320\014!\240\022\2401\320$>\270b\300\004\300A\300V\3101\330\010\014\210M\230\022\2301\320\0343\2602\260T\270\021\270&\300\001\330\010\014\320\014\"\240#\240Q\240d\250!\330\010\014\210E\220\021\330\010\023\220:\230Q\230l\250!\2501\330\010\014\210I\220Y\230i\240q""\250\004\250A\330\014\020\220\002\220!\220;\230h\240a\240t\2502\250Q\250d\260!\330-1\260\034\270Q\270b\300\001\300\023\300A\330-1\260\021\260&\270\001\330\010\014\210K\220q\330\010\014\210O\2301\330\010\013\2105\220\003\2201\330\014\020\320\020!\240\021\240!\330\010\017\210q\320\004,\250A\330\021\037\230~\250Q\360H\001\000\t\r\210O\2301\330\010\014\210J\220a\330\010\014\210I\220Q\330\010\014\210L\230\001\330\010\014\210K\220q\330\010\014\320\014\036\230a\330\010\014\210C\210z\230\024\230Q\330\014\020\220\005\220Q\330\020\027\220r\230\023\230A\330\024\025\330\010\014\210N\230!\330\010\014\210N\230!\330\010\014\210J\220a\330\010\014\210H\220D\230\004\230A\330\010\014\320\014\035\230Q\330\010\014\210N\230!";
20847 PyObject *data = NULL;
20848 #define __Pyx_DecompressString_UNUSED
20849 #define __Pyx_DecompressString_LZSS_UNUSED
20851 PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
20852 Py_ssize_t pos = 0;
20853 for (
int i = 0; i < 252; i++) {
20854 Py_ssize_t bytes_length = str_length_index[i].length;
20855 PyObject *
string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
20856 if (likely(
string) && i >= 42) PyUnicode_InternInPlace(&
string);
20857 if (unlikely(!
string)) {
20859 __PYX_ERR(0, 1, __pyx_L1_error)
20861 stringtab[i] = string;
20862 pos += bytes_length;
20864 for (
int i = 252; i < 262; i++) {
20865 Py_ssize_t bytes_length = bytes_length_index[i-252].length;
20866 PyObject *
string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
20867 stringtab[i] = string;
20868 pos += bytes_length;
20869 if (unlikely(!
string)) {
20871 __PYX_ERR(0, 1, __pyx_L1_error)
20875 for (Py_ssize_t i = 0; i < 262; i++) {
20876 if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
20877 __PYX_ERR(0, 1, __pyx_L1_error)
20880 #if CYTHON_IMMORTAL_CONSTANTS
20882 PyObject **table = stringtab + 252;
20883 for (Py_ssize_t i=0; i<10; ++i) {
20884 #if PY_VERSION_HEX >= 0x030F0000
20885 PyUnstable_SetImmortal(table[i]);
20886 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
20887 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL))
break;
20888 #if PY_VERSION_HEX < 0x030E0000
20889 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
20891 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
20894 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
20897 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
20898 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
20905 PyObject **numbertab = __pyx_mstate->__pyx_number_tab;
20906 double const c_constants[] = {0.0,0.5,2.0,0.01,0.02,0.85};
20907 for (
int i = 0; i < 6; i++) {
20908 numbertab[i] = PyFloat_FromDouble(c_constants[i]);
20909 if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
20913 PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 6;
20914 int8_t
const cint_constants_1[] = {0,1,2,3,4,5,10};
20915 for (
int i = 0; i < 7; i++) {
20916 numbertab[i] = PyLong_FromLong(cint_constants_1[i - 0]);
20917 if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
20920 #if CYTHON_IMMORTAL_CONSTANTS
20922 PyObject **table = __pyx_mstate->__pyx_number_tab;
20923 for (Py_ssize_t i=0; i<13; ++i) {
20924 #if PY_VERSION_HEX >= 0x030F0000
20925 PyUnstable_SetImmortal(table[i]);
20926 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
20927 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL))
break;
20928 #if PY_VERSION_HEX < 0x030E0000
20929 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
20931 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
20934 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
20937 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT))
break;
20938 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
20952 unsigned int argcount : 3;
20953 unsigned int num_posonly_args : 1;
20954 unsigned int num_kwonly_args : 1;
20955 unsigned int nlocals : 5;
20956 unsigned int flags : 10;
20957 unsigned int first_line : 10;
20958} __Pyx_PyCode_New_function_description;
20963static PyObject* __Pyx_PyCode_New(
20964 const __Pyx_PyCode_New_function_description descr,
20965 PyObject *
const *varnames,
20966 PyObject *filename,
20967 PyObject *funcname,
20968 PyObject *line_table,
20969 PyObject *tuple_dedup_map
20973static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
20974 PyObject* tuple_dedup_map = PyDict_New();
20975 if (unlikely(!tuple_dedup_map))
return -1;
20977 const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 122};
20978 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_bn, __pyx_mstate->__pyx_n_u_gn};
20979 __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0]))
goto bad;
20982 const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 10, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 51};
20983 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_isosurfaces, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_activeTime, __pyx_mstate->__pyx_n_u_sampleRate, __pyx_mstate->__pyx_n_u_format, __pyx_mstate->__pyx_n_u_writeBoundary, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_v};
20984 __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_QH_O1_Ja_IQ_L_Kq_a_Cz_Q_Q_r_A, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1]))
goto bad;
20987 const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 105};
20988 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_model, __pyx_mstate->__pyx_n_u_ar, __pyx_mstate->__pyx_n_u_fine_grid, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr};
20989 __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_attachModel, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ_E_N_q_A_uA_A_uA_A_uA_S_A_Q, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2]))
goto bad;
20992 const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 132};
20993 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_h5, __pyx_mstate->__pyx_n_u_step, __pyx_mstate->__pyx_n_u_cam, __pyx_mstate->__pyx_n_u_namedtuple, __pyx_mstate->__pyx_n_u_FemField, __pyx_mstate->__pyx_n_u_field_i, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_isosurface};
20994 __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_attachHDF5, __pyx_mstate->__pyx_kp_b_iso88591_1_N_Qc_4q_Q_d_1_b_AV1_M_1_32T_Q, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3]))
goto bad;
20997 const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 30, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 154};
20998 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_eN, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_J, __pyx_mstate->__pyx_n_u_I, __pyx_mstate->__pyx_n_u_nMinus, __pyx_mstate->__pyx_n_u_nPlus, __pyx_mstate->__pyx_n_u_nZeros, __pyx_mstate->__pyx_n_u_nN_start, __pyx_mstate->__pyx_n_u_eps, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_normal, __pyx_mstate->__pyx_n_u_nodes, __pyx_mstate->__pyx_n_u_elements, __pyx_mstate->__pyx_n_u_normals, __pyx_mstate->__pyx_n_u_normal_indices, __pyx_mstate->__pyx_n_u_phi, __pyx_mstate->__pyx_n_u_plus, __pyx_mstate->__pyx_n_u_minus, __pyx_mstate->__pyx_n_u_zeros, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_j};
20999 __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_triangulateIsosurface, __pyx_mstate->__pyx_kp_b_iso88591_A_F_G_XQ_IRwj_1_HBgZz_O2WJ_q_6_A, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4]))
goto bad;
21002 const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 344};
21003 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_frame};
21004 __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_writeIsosurfaceMesh, __pyx_mstate->__pyx_kp_b_iso88591_A_4xs_q_Rt1A_1G7_A_q_wa_A_q, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5]))
goto bad;
21007 const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 12, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 355};
21008 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_frame, __pyx_mstate->__pyx_n_u_h5py, __pyx_mstate->__pyx_n_u_nodes, __pyx_mstate->__pyx_n_u_elements, __pyx_mstate->__pyx_n_u_normals, __pyx_mstate->__pyx_n_u_normal_indices, __pyx_mstate->__pyx_n_u_filename, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_dset};
21009 __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_writeIsosurfaceMesh_h5, __pyx_mstate->__pyx_kp_b_iso88591_A_F_G1_4y_hb_q__BgQ_2U_q_k_Qd_uT, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6]))
goto bad;
21012 const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 21, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 372};
21013 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_frame, __pyx_mstate->__pyx_n_u_Template, __pyx_mstate->__pyx_n_u_nodes, __pyx_mstate->__pyx_n_u_elements, __pyx_mstate->__pyx_n_u_normals, __pyx_mstate->__pyx_n_u_normal_indices, __pyx_mstate->__pyx_n_u_pov_filename, __pyx_mstate->__pyx_n_u_pov, __pyx_mstate->__pyx_n_u_dx, __pyx_mstate->__pyx_n_u_nll, __pyx_mstate->__pyx_n_u_fur, __pyx_mstate->__pyx_n_u_povScene, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_ebN, __pyx_mstate->__pyx_n_u_bnt, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_ni, __pyx_mstate->__pyx_n_u_n};
21014 __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_writeIsosurfaceMesh_povray, __pyx_mstate->__pyx_kp_b_iso88591_A_1_F_G1_4y_hb_q__BgQ_G1_a_E_4uI, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7]))
goto bad;
21017 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 523};
21018 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_checkTime, __pyx_mstate->__pyx_n_u_Template, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_n_u_field, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_v};
21019 __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_calculate, __pyx_mstate->__pyx_kp_b_iso88591_1_1_4_q_q_Bd_1_t_we5_Kq_2U_04Kq, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8]))
goto bad;
21022 const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 16, (
unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 549};
21023 PyObject*
const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_cam, __pyx_mstate->__pyx_n_u_Template, __pyx_mstate->__pyx_n_u_look_at, __pyx_mstate->__pyx_n_u_light, __pyx_mstate->__pyx_n_u_light_dx, __pyx_mstate->__pyx_n_u_light_dy, __pyx_mstate->__pyx_n_u_floor_z, __pyx_mstate->__pyx_n_u_wall_y, __pyx_mstate->__pyx_n_u_sky_z, __pyx_mstate->__pyx_n_u_pov, __pyx_mstate->__pyx_n_u_povSceneTemplate, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_L, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_L};
21024 __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_Isosurface_pyx, __pyx_mstate->__pyx_n_u_writeSceneHeader, __pyx_mstate->__pyx_kp_b_iso88591_q_1_4uIQ_at3b_3e3at7_d_t3a_as_D, tuple_dedup_map);
if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9]))
goto bad;
21026 Py_DECREF(tuple_dedup_map);
21029 Py_DECREF(tuple_dedup_map);
21034static int __Pyx_InitGlobals(
void) {
21035 int __pyx_lineno = 0;
21036 const char *__pyx_filename = NULL;
21037 int __pyx_clineno = 0;
21039 if (likely(__Pyx_init_co_variables() == 0 && __Pyx_init_tpflags_variables() == 0));
else
21041 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21044 if (likely(__Pyx_init_assertions_enabled() == 0));
else
21046 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21049 #if CYTHON_COMPILING_IN_LIMITED_API
21051 PyObject *builtins = PyEval_GetBuiltins();
21052 if (likely(builtins)) {
21053 PyObject *type_name = PyUnicode_FromStringAndSize(
"frozendict",
sizeof(
"frozendict")-1);
21054 if (likely(type_name)) {
21055 PyObject *frozendict_type = PyObject_GetItem(builtins, type_name);
21056 Py_DECREF(type_name);
21057 if (!frozendict_type && PyErr_ExceptionMatches(PyExc_KeyError)) {
21059 frozendict_type = (PyObject*) &PyDict_Type;
21060 Py_INCREF(frozendict_type);
21062 __pyx_mstate_global->__Pyx_PyFrozenDictType = frozendict_type;
21068 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21077 #ifdef NPY_FEATURE_VERSION
21078 #ifndef NO_IMPORT_ARRAY
21079 if (unlikely(_import_array() == -1)) {
21080 PyErr_SetString(PyExc_ImportError,
"numpy.core.multiarray failed to import "
21081 "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; "
21082 "use '<void>numpy._import_array' to disable if you are certain you don't need it).");
21087 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21090 if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0));
else
21092 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21095 #if CYTHON_COMPILING_IN_LIMITED_API
21097 PyObject *typesModule=NULL;
21098 typesModule = PyImport_ImportModule(
"types");
21100 __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule,
"MethodType");
21101 Py_DECREF(typesModule);
21106 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21109 if (likely(__pyx_Generator_init(__pyx_m) == 0));
else
21111 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21119static int __Pyx_InitAfterSharedUtility(
void) {
21120 int __pyx_lineno = 0;
21121 const char *__pyx_filename = NULL;
21122 int __pyx_clineno = 0;
21124 if (likely(__pyx_CyFunction_init(__pyx_m) == 0));
else
21126 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21137#pragma warning( push )
21142#pragma warning( disable : 4127 )
21152static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(
const char *modname) {
21153 PyObject *m = NULL, *p = NULL;
21155 m = PyImport_ImportModule(modname);
21157 p = PyObject_GetAttrString(m,
"RefNannyAPI");
21159 r = PyLong_AsVoidPtr(p);
21163 return (__Pyx_RefNannyAPIStruct *)
r;
21168#if CYTHON_COMPILING_IN_CPYTHON
21169static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
21171 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
21175 return b == &PyBaseObject_Type;
21177static CYTHON_INLINE
int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
21179 if (a == b)
return 1;
21183 n = PyTuple_GET_SIZE(mro);
21184 for (i = 0; i <
n; i++) {
21185 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
21190 return __Pyx_InBases(a, b);
21192static CYTHON_INLINE
int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
21194 if (cls == a || cls == b)
return 1;
21198 n = PyTuple_GET_SIZE(mro);
21199 for (i = 0; i <
n; i++) {
21200 PyObject *base = PyTuple_GET_ITEM(mro, i);
21201 if (base == (PyObject *)a || base == (PyObject *)b)
21206 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
21211#if CYTHON_FAST_THREAD_STATE
21212static CYTHON_INLINE
void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21213#if PY_VERSION_HEX >= 0x030C00A6
21214 PyObject *tmp_value;
21215 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
21217 #if CYTHON_COMPILING_IN_CPYTHON
21218 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
21220 PyException_SetTraceback(value, tb);
21222 tmp_value = tstate->current_exception;
21223 tstate->current_exception = value;
21224 Py_XDECREF(tmp_value);
21228 PyObject *tmp_type, *tmp_value, *tmp_tb;
21229 tmp_type = tstate->curexc_type;
21230 tmp_value = tstate->curexc_value;
21231 tmp_tb = tstate->curexc_traceback;
21232 tstate->curexc_type = type;
21233 tstate->curexc_value = value;
21234 tstate->curexc_traceback = tb;
21235 Py_XDECREF(tmp_type);
21236 Py_XDECREF(tmp_value);
21237 Py_XDECREF(tmp_tb);
21240static CYTHON_INLINE
void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21241#if PY_VERSION_HEX >= 0x030C00A6
21242 PyObject* exc_value;
21243 exc_value = tstate->current_exception;
21244 tstate->current_exception = 0;
21245 *value = exc_value;
21249 *type = (PyObject*) Py_TYPE(exc_value);
21251 #if CYTHON_COMPILING_IN_CPYTHON
21252 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
21255 *tb = PyException_GetTraceback(exc_value);
21259 *type = tstate->curexc_type;
21260 *value = tstate->curexc_value;
21261 *tb = tstate->curexc_traceback;
21262 tstate->curexc_type = 0;
21263 tstate->curexc_value = 0;
21264 tstate->curexc_traceback = 0;
21270#if CYTHON_COMPILING_IN_CPYTHON
21271static CYTHON_INLINE
int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
21273 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
21275 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
21278static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21280 assert(PyExceptionClass_Check(exc_type));
21281 n = PyTuple_GET_SIZE(tuple);
21282 for (i=0; i<
n; i++) {
21283 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
21285 for (i=0; i<
n; i++) {
21286 PyObject *t = PyTuple_GET_ITEM(tuple, i);
21287 if (likely(PyExceptionClass_Check(t))) {
21288 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t))
return 1;
21294static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
21295 if (likely(err == exc_type))
return 1;
21296 if (likely(PyExceptionClass_Check(err))) {
21297 if (likely(PyExceptionClass_Check(exc_type))) {
21298 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
21299 }
else if (likely(PyTuple_Check(exc_type))) {
21300 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
21304 return PyErr_GivenExceptionMatches(err, exc_type);
21306static CYTHON_INLINE
int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
21307 assert(PyExceptionClass_Check(exc_type1));
21308 assert(PyExceptionClass_Check(exc_type2));
21309 if (likely(err == exc_type1 || err == exc_type2))
return 1;
21310 if (likely(PyExceptionClass_Check(err))) {
21311 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
21313 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
21318#if CYTHON_FAST_THREAD_STATE
21319static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21321 n = PyTuple_GET_SIZE(tuple);
21322 for (i=0; i<
n; i++) {
21323 if (exc_type == PyTuple_GET_ITEM(tuple, i))
return 1;
21325 for (i=0; i<
n; i++) {
21326 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i)))
return 1;
21330static CYTHON_INLINE
int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
21332 PyObject *exc_type;
21333#if PY_VERSION_HEX >= 0x030C00A6
21334 PyObject *current_exception = tstate->current_exception;
21335 if (unlikely(!current_exception))
return 0;
21336 exc_type = (PyObject*) Py_TYPE(current_exception);
21337 if (exc_type == err)
return 1;
21339 exc_type = tstate->curexc_type;
21340 if (exc_type == err)
return 1;
21341 if (unlikely(!exc_type))
return 0;
21343 #if CYTHON_AVOID_BORROWED_REFS
21344 Py_INCREF(exc_type);
21346 if (unlikely(PyTuple_Check(err))) {
21347 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
21349 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
21351 #if CYTHON_AVOID_BORROWED_REFS
21352 Py_DECREF(exc_type);
21359#if CYTHON_USE_TYPE_SLOTS
21360static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
21361 PyTypeObject* tp = Py_TYPE(obj);
21362 if (likely(tp->tp_getattro))
21363 return tp->tp_getattro(obj, attr_name);
21364 return PyObject_GetAttr(obj, attr_name);
21369#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
21370static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(
void) {
21371 __Pyx_PyThreadState_declare
21372 __Pyx_PyThreadState_assign
21373 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
21374 __Pyx_PyErr_Clear();
21377static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
21379#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
21380 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
21383#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
21384 PyTypeObject* tp = Py_TYPE(obj);
21385 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
21386 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
21389 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
21390 if (unlikely(!result)) {
21391 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
21398static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
21399 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
21400 if (unlikely(!result) && !PyErr_Occurred()) {
21401 PyErr_Format(PyExc_NameError,
21402 "name '%U' is not defined", name);
21408#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
21409static _PyErr_StackItem *
21410__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
21412 _PyErr_StackItem *exc_info = tstate->exc_info;
21413 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
21414 exc_info->previous_item != NULL)
21416 exc_info = exc_info->previous_item;
21423#if CYTHON_FAST_THREAD_STATE
21424static CYTHON_INLINE
void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21425 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
21426 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
21427 PyObject *exc_value = exc_info->exc_value;
21428 if (exc_value == NULL || exc_value == Py_None) {
21433 *value = exc_value;
21435 *type = (PyObject*) Py_TYPE(exc_value);
21437 *tb = PyException_GetTraceback(exc_value);
21439 #elif CYTHON_USE_EXC_INFO_STACK
21440 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
21441 *type = exc_info->exc_type;
21442 *value = exc_info->exc_value;
21443 *tb = exc_info->exc_traceback;
21445 Py_XINCREF(*value);
21448 *type = tstate->exc_type;
21449 *value = tstate->exc_value;
21450 *tb = tstate->exc_traceback;
21452 Py_XINCREF(*value);
21456static CYTHON_INLINE
void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21457 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
21458 _PyErr_StackItem *exc_info = tstate->exc_info;
21459 PyObject *tmp_value = exc_info->exc_value;
21460 exc_info->exc_value = value;
21461 Py_XDECREF(tmp_value);
21465 PyObject *tmp_type, *tmp_value, *tmp_tb;
21466 #if CYTHON_USE_EXC_INFO_STACK
21467 _PyErr_StackItem *exc_info = tstate->exc_info;
21468 tmp_type = exc_info->exc_type;
21469 tmp_value = exc_info->exc_value;
21470 tmp_tb = exc_info->exc_traceback;
21471 exc_info->exc_type = type;
21472 exc_info->exc_value = value;
21473 exc_info->exc_traceback = tb;
21475 tmp_type = tstate->exc_type;
21476 tmp_value = tstate->exc_value;
21477 tmp_tb = tstate->exc_traceback;
21478 tstate->exc_type = type;
21479 tstate->exc_value = value;
21480 tstate->exc_traceback = tb;
21482 Py_XDECREF(tmp_type);
21483 Py_XDECREF(tmp_value);
21484 Py_XDECREF(tmp_tb);
21490#if CYTHON_FAST_THREAD_STATE
21491static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
21493static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
21496 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
21497#if CYTHON_FAST_THREAD_STATE
21498 PyObject *tmp_type, *tmp_value, *tmp_tb;
21499 #if PY_VERSION_HEX >= 0x030C0000
21500 local_value = tstate->current_exception;
21501 tstate->current_exception = 0;
21503 local_type = tstate->curexc_type;
21504 local_value = tstate->curexc_value;
21505 local_tb = tstate->curexc_traceback;
21506 tstate->curexc_type = 0;
21507 tstate->curexc_value = 0;
21508 tstate->curexc_traceback = 0;
21510#elif __PYX_LIMITED_VERSION_HEX >= 0x030C0000
21511 local_value = PyErr_GetRaisedException();
21513 PyErr_Fetch(&local_type, &local_value, &local_tb);
21515#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
21516 if (likely(local_value)) {
21517 local_type = (PyObject*) Py_TYPE(local_value);
21518 Py_INCREF(local_type);
21519 local_tb = PyException_GetTraceback(local_value);
21522 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
21523#if CYTHON_FAST_THREAD_STATE
21524 if (unlikely(tstate->curexc_type))
21526 if (unlikely(PyErr_Occurred()))
21530 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
21534 Py_XINCREF(local_tb);
21535 Py_XINCREF(local_type);
21536 Py_XINCREF(local_value);
21537 *type = local_type;
21538 *value = local_value;
21540#if CYTHON_FAST_THREAD_STATE
21541 #if CYTHON_USE_EXC_INFO_STACK
21543 _PyErr_StackItem *exc_info = tstate->exc_info;
21544 #if PY_VERSION_HEX >= 0x030B00a4
21545 tmp_value = exc_info->exc_value;
21546 exc_info->exc_value = local_value;
21549 Py_XDECREF(local_type);
21550 Py_XDECREF(local_tb);
21552 tmp_type = exc_info->exc_type;
21553 tmp_value = exc_info->exc_value;
21554 tmp_tb = exc_info->exc_traceback;
21555 exc_info->exc_type = local_type;
21556 exc_info->exc_value = local_value;
21557 exc_info->exc_traceback = local_tb;
21561 tmp_type = tstate->exc_type;
21562 tmp_value = tstate->exc_value;
21563 tmp_tb = tstate->exc_traceback;
21564 tstate->exc_type = local_type;
21565 tstate->exc_value = local_value;
21566 tstate->exc_traceback = local_tb;
21568 Py_XDECREF(tmp_type);
21569 Py_XDECREF(tmp_value);
21570 Py_XDECREF(tmp_tb);
21571#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
21572 PyErr_SetHandledException(local_value);
21573 Py_XDECREF(local_value);
21574 Py_XDECREF(local_type);
21575 Py_XDECREF(local_tb);
21577 PyErr_SetExcInfo(local_type, local_value, local_tb);
21580#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
21585 Py_XDECREF(local_type);
21586 Py_XDECREF(local_value);
21587 Py_XDECREF(local_tb);
21593#if CYTHON_COMPILING_IN_CPYTHON
21594static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
21596 ternaryfunc call = Py_TYPE(func)->tp_call;
21597 if (unlikely(!call))
21598 return PyObject_Call(func, arg, kw);
21599 if (unlikely(Py_EnterRecursiveCall(
" while calling a Python object")))
21601 result = (*call)(func, arg, kw);
21602 Py_LeaveRecursiveCall();
21603 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21606 "NULL result without error in PyObject_Call");
21613#if CYTHON_COMPILING_IN_CPYTHON
21614static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
21615 PyObject *self, *result;
21617 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
21618 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
21619 if (unlikely(Py_EnterRecursiveCall(
" while calling a Python object")))
21621 result = cfunc(self, arg);
21622 Py_LeaveRecursiveCall();
21623 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21626 "NULL result without error in PyObject_Call");
21633#if CYTHON_COMPILING_IN_LIMITED_API
21634static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject *
const*args,
size_t nargs, PyObject *kwargs) {
21635 PyObject *argstuple;
21636 PyObject *result = 0;
21638 argstuple = PyTuple_New((Py_ssize_t)nargs);
21639 if (unlikely(!argstuple))
return NULL;
21640 for (i = 0; i < nargs; i++) {
21641 Py_INCREF(args[i]);
21642 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0))
goto bad;
21644 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
21646 Py_DECREF(argstuple);
21650#if CYTHON_VECTORCALL && !(CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY)
21651 #if CYTHON_COMPILING_IN_CPYTHON
21652static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
21653 PyTypeObject *tp = Py_TYPE(callable);
21654 #if defined(__Pyx_CyFunction_USED)
21655 if (__Pyx_CyFunction_CheckExact(callable)) {
21656 return __Pyx_CyFunction_func_vectorcall(callable);
21659 if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
21662 assert(PyCallable_Check(callable));
21663 Py_ssize_t offset = tp->tp_vectorcall_offset;
21664 assert(offset > 0);
21665 vectorcallfunc ptr;
21666 memcpy(&ptr, (
char *) callable + offset,
sizeof(ptr));
21670 #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
21673static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwargs) {
21674 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(nargsf);
21675#if CYTHON_COMPILING_IN_CPYTHON
21676 if (nargs == 0 && kwargs == NULL) {
21677 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
21678 return __Pyx_PyObject_CallMethO(func, NULL);
21680 else if (nargs == 1 && kwargs == NULL) {
21681 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
21682 return __Pyx_PyObject_CallMethO(func, args[0]);
21685 if (kwargs == NULL) {
21686 #if CYTHON_VECTORCALL
21687 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
21688 return PyObject_Vectorcall(func, args, nargsf, NULL);
21690 vectorcallfunc
f = __Pyx_PyVectorcall_Function(func);
21692 return f(func, args, nargsf, NULL);
21698 return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
21700 #if CYTHON_COMPILING_IN_LIMITED_API
21701 return __Pyx_PyObject_FastCall_fallback(func, args, (
size_t)nargs, kwargs);
21702 #elif CYTHON_COMPILING_IN_PYPY
21703 return PyObject_VectorcallDict(func, args, (
size_t) nargs, kwargs);
21705 return PyObject_VectorcallDict(func, args, nargsf, kwargs);
21710static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21711 PyObject* owned_instance = NULL;
21712 if (tb == Py_None) {
21714 }
else if (tb && !PyTraceBack_Check(tb)) {
21715 PyErr_SetString(PyExc_TypeError,
21716 "raise: arg 3 must be a traceback or None");
21719 if (value == Py_None)
21721 if (PyExceptionInstance_Check(type)) {
21723 PyErr_SetString(PyExc_TypeError,
21724 "instance exception may not have a separate value");
21728 type = (PyObject*) Py_TYPE(value);
21729 }
else if (PyExceptionClass_Check(type)) {
21730 PyObject *instance_class = NULL;
21731 if (value && PyExceptionInstance_Check(value)) {
21732 instance_class = (PyObject*) Py_TYPE(value);
21733 if (instance_class != type) {
21734 int is_subclass = PyObject_IsSubclass(instance_class, type);
21735 if (!is_subclass) {
21736 instance_class = NULL;
21737 }
else if (unlikely(is_subclass == -1)) {
21740 type = instance_class;
21744 if (!instance_class) {
21747 args = PyTuple_New(0);
21748 else if (PyTuple_Check(value)) {
21752 args = PyTuple_Pack(1, value);
21755 owned_instance = PyObject_Call(type, args, NULL);
21757 if (!owned_instance)
21759 value = owned_instance;
21760 if (!PyExceptionInstance_Check(value)) {
21761 PyErr_Format(PyExc_TypeError,
21762 "calling %R should have returned an instance of "
21763 "BaseException, not %R",
21764 type, Py_TYPE(value));
21769 PyErr_SetString(PyExc_TypeError,
21770 "raise: exception class must be a subclass of BaseException");
21774 PyObject *fixed_cause;
21775 if (cause == Py_None) {
21776 fixed_cause = NULL;
21777 }
else if (PyExceptionClass_Check(cause)) {
21778 fixed_cause = PyObject_CallObject(cause, NULL);
21779 if (fixed_cause == NULL)
21781 }
else if (PyExceptionInstance_Check(cause)) {
21782 fixed_cause = cause;
21783 Py_INCREF(fixed_cause);
21785 PyErr_SetString(PyExc_TypeError,
21786 "exception causes must derive from "
21790 PyException_SetCause(value, fixed_cause);
21792 PyErr_SetObject(type, value);
21794#if PY_VERSION_HEX >= 0x030C00A6
21795 PyException_SetTraceback(value, tb);
21796#elif CYTHON_FAST_THREAD_STATE
21797 PyThreadState *tstate = __Pyx_PyThreadState_Current;
21798 PyObject* tmp_tb = tstate->curexc_traceback;
21799 if (tb != tmp_tb) {
21801 tstate->curexc_traceback = tb;
21802 Py_XDECREF(tmp_tb);
21805 PyObject *tmp_type, *tmp_value, *tmp_tb;
21806 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21808 PyErr_Restore(tmp_type, tmp_value, tb);
21809 Py_XDECREF(tmp_tb);
21813 Py_XDECREF(owned_instance);
21818static CYTHON_INLINE
int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception) {
21819 if (PyErr_GivenExceptionMatches(given_exception ? given_exception : PyErr_Occurred(), ignorable_exception)) {
21827#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
21828static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
21829 PyObject *dict = Py_TYPE(obj)->tp_dict;
21830 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
21832static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
21833 PyObject **dictptr = NULL;
21834 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
21836#if CYTHON_COMPILING_IN_CPYTHON
21837 dictptr = (likely(offset > 0)) ? (PyObject **) ((
char *)obj + offset) : _PyObject_GetDictPtr(obj);
21839 dictptr = _PyObject_GetDictPtr(obj);
21842 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
21844static CYTHON_INLINE
int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
21845 PyObject *dict = Py_TYPE(obj)->tp_dict;
21846 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
21848 return obj_dict_version == __Pyx_get_object_dict_version(obj);
21853#if CYTHON_USE_DICT_VERSIONS
21854static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
21856static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
21860#if CYTHON_COMPILING_IN_LIMITED_API
21861 if (unlikely(!__pyx_m)) {
21862 if (!PyErr_Occurred())
21863 PyErr_SetNone(PyExc_NameError);
21866 result = PyObject_GetAttr(__pyx_m, name);
21867 if (likely(result)) {
21870 if (!__Pyx_IgnoreException(PyExc_Exception)) {
21873#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
21874 if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) {
21875 if (!__Pyx_IgnoreException(PyExc_Exception)) {
21879 __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
21880 if (likely(result)) {
21884 result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
21885 __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
21886 if (likely(result)) {
21887 return __Pyx_NewRef(result);
21889 PyObject *exc = PyErr_Occurred();
21890 if (unlikely(exc) && !__Pyx_IgnoreGivenException(exc, PyExc_Exception)) {
21894 return __Pyx_GetBuiltinName(name);
21898#if CYTHON_COMPILING_IN_CPYTHON
21899static CYTHON_INLINE
void __Pyx_copy_object_array(PyObject *
const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
21902 for (i = 0; i < length; i++) {
21903 v = dest[i] = src[i];
21910#if !(PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API)
21911CYTHON_UNUSED
static PyObject *
21912__Pyx_PyTuple_FromArray(PyObject *
const *src, Py_ssize_t
n) {
21914 return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
21916 PyObject *res = PyTuple_New(
n);
21917 if (unlikely(res == NULL))
return NULL;
21918 #if CYTHON_COMPILING_IN_CPYTHON
21919 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item,
n);
21922 for (i = 0; i <
n; i++) {
21924 if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
21935#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
21936static __Pyx_TypeName
21937__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
21939 PyObject *module = NULL, *name = NULL, *result = NULL;
21940 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
21941 name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
21942 __pyx_mstate_global->__pyx_n_u_qualname);
21944 name = PyType_GetQualName(tp);
21946 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name)))
goto bad;
21947 module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
21948 __pyx_mstate_global->__pyx_n_u_module);
21949 if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module)))
goto bad;
21950 if (PyUnicode_CompareWithASCIIString(module,
"builtins") == 0) {
21955 result = PyUnicode_FromFormat(
"%U.%U", module, name);
21956 if (unlikely(result == NULL))
goto bad;
21959 Py_XDECREF(module);
21967 result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_);
21974static void __Pyx_RaiseErrorWithTypes1(PyObject* exc_type,
const char *message,
const char *arg, PyTypeObject *type_obj1, PyTypeObject *type_obj2) {
21975 __Pyx_TypeName type_name1 = __Pyx_PyType_GetFullyQualifiedName(type_obj1);
21976 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
21977 if (unlikely(!type_name1))
return;
21979 __Pyx_TypeName type_name2 = __Pyx_PyType_GetFullyQualifiedName(type_obj2);
21980 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
21981 if (unlikely(!type_name2))
goto type2_failed;
21983 PyErr_Format(exc_type, message, arg, type_name1, type_name2);
21984 __Pyx_DECREF_TypeName(type_name2);
21985#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
21988 __Pyx_DECREF_TypeName(type_name1);
21992static CYTHON_INLINE
int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
21993 if (unlikely(!type)) {
21994 PyErr_SetString(PyExc_SystemError,
"Missing type object");
21997 if (likely(__Pyx_TypeCheck(obj, type)))
21999 __Pyx_RaiseTypeErrorWithTypes(
22000 "Cannot convert " __Pyx_FMT_TYPENAME
" to " __Pyx_FMT_TYPENAME,
22001 Py_TYPE(obj), type);
22006static CYTHON_INLINE
int __Pyx_Is_Little_Endian(
void)
22012 S.u32 = 0x01020304;
22013 return S.u8[0] == 4;
22017static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
22018 __Pyx_BufFmt_StackElem* stack,
22019 const __Pyx_TypeInfo* type) {
22020 stack[0].field = &ctx->root;
22021 stack[0].parent_offset = 0;
22022 ctx->root.type = type;
22023 ctx->root.name =
"buffer dtype";
22024 ctx->root.offset = 0;
22026 ctx->head->field = &ctx->root;
22027 ctx->fmt_offset = 0;
22028 ctx->head->parent_offset = 0;
22029 ctx->new_packmode =
'@';
22030 ctx->enc_packmode =
'@';
22031 ctx->new_count = 1;
22032 ctx->enc_count = 0;
22034 ctx->is_complex = 0;
22035 ctx->is_valid_array = 0;
22036 ctx->struct_alignment = 0;
22037 while (type->typegroup ==
'S') {
22039 ctx->head->field = type->fields;
22040 ctx->head->parent_offset = 0;
22041 type = type->fields->type;
22044static int __Pyx_BufFmt_ParseNumber(
const char** ts) {
22046 const char* t = *ts;
22047 if (*t <
'0' || *t >
'9') {
22050 count = *t++ -
'0';
22051 while (*t >=
'0' && *t <=
'9') {
22053 count += *t++ -
'0';
22059static int __Pyx_BufFmt_ExpectNumber(
const char **ts) {
22060 int number = __Pyx_BufFmt_ParseNumber(ts);
22062 PyErr_Format(PyExc_ValueError,\
22063 "Does not understand character buffer dtype format string ('%c')", **ts);
22066static void __Pyx_BufFmt_RaiseUnexpectedChar(
char ch) {
22067 PyErr_Format(PyExc_ValueError,
22068 "Unexpected format string character: '%c'", ch);
22070static const char* __Pyx_BufFmt_DescribeTypeChar(
char ch,
int is_complex) {
22072 case '?':
return "'bool'";
22073 case 'c':
return "'char'";
22074 case 'b':
return "'signed char'";
22075 case 'B':
return "'unsigned char'";
22076 case 'h':
return "'short'";
22077 case 'H':
return "'unsigned short'";
22078 case 'i':
return "'int'";
22079 case 'I':
return "'unsigned int'";
22080 case 'l':
return "'long'";
22081 case 'L':
return "'unsigned long'";
22082 case 'q':
return "'long long'";
22083 case 'Q':
return "'unsigned long long'";
22084 case 'f':
return (is_complex ?
"'complex float'" :
"'float'");
22085 case 'd':
return (is_complex ?
"'complex double'" :
"'double'");
22086 case 'g':
return (is_complex ?
"'complex long double'" :
"'long double'");
22087 case 'T':
return "a struct";
22088 case 'O':
return "Python object";
22089 case 'P':
return "a pointer";
22090 case 's':
case 'p':
return "a string";
22091 case 0:
return "end";
22092 default:
return "unparsable format string";
22095static size_t __Pyx_BufFmt_TypeCharToStandardSize(
char ch,
int is_complex) {
22097 case '?':
case 'c':
case 'b':
case 'B':
case 's':
case 'p':
return 1;
22098 case 'h':
case 'H':
return 2;
22099 case 'i':
case 'I':
case 'l':
case 'L':
return 4;
22100 case 'q':
case 'Q':
return 8;
22101 case 'f':
return (is_complex ? 8 : 4);
22102 case 'd':
return (is_complex ? 16 : 8);
22104 PyErr_SetString(PyExc_ValueError,
"Python does not define a standard format string size for long double ('g')..");
22107 case 'O':
case 'P':
return sizeof(
void*);
22109 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
22113static size_t __Pyx_BufFmt_TypeCharToNativeSize(
char ch,
int is_complex) {
22115 case '?':
case 'c':
case 'b':
case 'B':
case 's':
case 'p':
return 1;
22116 case 'h':
case 'H':
return sizeof(short);
22117 case 'i':
case 'I':
return sizeof(int);
22118 case 'l':
case 'L':
return sizeof(long);
22119 case 'q':
case 'Q':
return sizeof(PY_LONG_LONG);
22120 case 'f':
return sizeof(float) * (is_complex ? 2 : 1);
22121 case 'd':
return sizeof(double) * (is_complex ? 2 : 1);
22122 case 'g':
return sizeof(
long double) * (is_complex ? 2 : 1);
22123 case 'O':
case 'P':
return sizeof(
void*);
22125 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
22130typedef struct {
char c;
short x; } __Pyx_st_short;
22131typedef struct {
char c;
int x; } __Pyx_st_int;
22132typedef struct {
char c;
long x; } __Pyx_st_long;
22133typedef struct {
char c;
float x; } __Pyx_st_float;
22134typedef struct {
char c;
double x; } __Pyx_st_double;
22135typedef struct {
char c;
long double x; } __Pyx_st_longdouble;
22136typedef struct {
char c;
void *x; } __Pyx_st_void_p;
22137typedef struct {
char c; PY_LONG_LONG x; } __Pyx_st_longlong;
22138static size_t __Pyx_BufFmt_TypeCharToAlignment(
char ch,
int is_complex) {
22139 CYTHON_UNUSED_VAR(is_complex);
22141 case '?':
case 'c':
case 'b':
case 'B':
case 's':
case 'p':
return 1;
22142 case 'h':
case 'H':
return sizeof(__Pyx_st_short) -
sizeof(
short);
22143 case 'i':
case 'I':
return sizeof(__Pyx_st_int) -
sizeof(
int);
22144 case 'l':
case 'L':
return sizeof(__Pyx_st_long) -
sizeof(
long);
22145 case 'q':
case 'Q':
return sizeof(__Pyx_st_longlong) -
sizeof(PY_LONG_LONG);
22146 case 'f':
return sizeof(__Pyx_st_float) -
sizeof(
float);
22147 case 'd':
return sizeof(__Pyx_st_double) -
sizeof(
double);
22148 case 'g':
return sizeof(__Pyx_st_longdouble) -
sizeof(
long double);
22149 case 'P':
case 'O':
return sizeof(__Pyx_st_void_p) -
sizeof(
void*);
22151 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
22159typedef struct {
short x;
char c; } __Pyx_pad_short;
22160typedef struct {
int x;
char c; } __Pyx_pad_int;
22161typedef struct {
long x;
char c; } __Pyx_pad_long;
22162typedef struct {
float x;
char c; } __Pyx_pad_float;
22163typedef struct {
double x;
char c; } __Pyx_pad_double;
22164typedef struct {
long double x;
char c; } __Pyx_pad_longdouble;
22165typedef struct {
void *x;
char c; } __Pyx_pad_void_p;
22166typedef struct { PY_LONG_LONG x;
char c; } __Pyx_pad_longlong;
22167static size_t __Pyx_BufFmt_TypeCharToPadding(
char ch,
int is_complex) {
22168 CYTHON_UNUSED_VAR(is_complex);
22170 case '?':
case 'c':
case 'b':
case 'B':
case 's':
case 'p':
return 1;
22171 case 'h':
case 'H':
return sizeof(__Pyx_pad_short) -
sizeof(
short);
22172 case 'i':
case 'I':
return sizeof(__Pyx_pad_int) -
sizeof(
int);
22173 case 'l':
case 'L':
return sizeof(__Pyx_pad_long) -
sizeof(
long);
22174 case 'q':
case 'Q':
return sizeof(__Pyx_pad_longlong) -
sizeof(PY_LONG_LONG);
22175 case 'f':
return sizeof(__Pyx_pad_float) -
sizeof(
float);
22176 case 'd':
return sizeof(__Pyx_pad_double) -
sizeof(
double);
22177 case 'g':
return sizeof(__Pyx_pad_longdouble) -
sizeof(
long double);
22178 case 'P':
case 'O':
return sizeof(__Pyx_pad_void_p) -
sizeof(
void*);
22180 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
22184static char __Pyx_BufFmt_TypeCharToGroup(
char ch,
int is_complex) {
22188 case 'b':
case 'h':
case 'i':
22189 case 'l':
case 'q':
case 's':
case 'p':
22191 case '?':
case 'B':
case 'H':
case 'I':
case 'L':
case 'Q':
22193 case 'f':
case 'd':
case 'g':
22194 return (is_complex ?
'C' :
'R');
22200 __Pyx_BufFmt_RaiseUnexpectedChar(ch);
22205static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
22206 if (ctx->head == NULL || ctx->head->field == &ctx->root) {
22207 const char* expected;
22209 if (ctx->head == NULL) {
22213 expected = ctx->head->field->type->name;
22216 PyErr_Format(PyExc_ValueError,
22217 "Buffer dtype mismatch, expected %s%s%s but got %s",
22218 quote, expected, quote,
22219 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
22221 const __Pyx_StructField* field = ctx->head->field;
22222 const __Pyx_StructField* parent = (ctx->head - 1)->field;
22223 PyErr_Format(PyExc_ValueError,
22224 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
22225 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
22226 parent->type->name, field->name);
22229static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
22231 size_t size, offset, arraysize = 1;
22232 if (ctx->enc_type == 0)
return 0;
22233 if (ctx->head->field->type->arraysize[0]) {
22235 if (ctx->enc_type ==
's' || ctx->enc_type ==
'p') {
22236 ctx->is_valid_array = ctx->head->field->type->ndim == 1;
22238 if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
22239 PyErr_Format(PyExc_ValueError,
22240 "Expected a dimension of size %zu, got %zu",
22241 ctx->head->field->type->arraysize[0], ctx->enc_count);
22245 if (!ctx->is_valid_array) {
22246 PyErr_Format(PyExc_ValueError,
"Expected %d dimensions, got %d",
22247 ctx->head->field->type->ndim, ndim);
22250 for (i = 0; i < ctx->head->field->type->ndim; i++) {
22251 arraysize *= ctx->head->field->type->arraysize[i];
22253 ctx->is_valid_array = 0;
22254 ctx->enc_count = 1;
22256 group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
22258 const __Pyx_StructField* field = ctx->head->field;
22259 const __Pyx_TypeInfo* type = field->type;
22260 if (ctx->enc_packmode ==
'@' || ctx->enc_packmode ==
'^') {
22261 size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
22263 size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
22265 if (ctx->enc_packmode ==
'@') {
22266 size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
22267 size_t align_mod_offset;
22268 if (align_at == 0)
return -1;
22269 align_mod_offset = ctx->fmt_offset % align_at;
22270 if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
22271 if (ctx->struct_alignment == 0)
22272 ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
22275 if (type->size != size || type->typegroup != group) {
22276 if (type->typegroup ==
'C' && type->fields != NULL) {
22277 size_t parent_offset = ctx->head->parent_offset + field->offset;
22279 ctx->head->field = type->fields;
22280 ctx->head->parent_offset = parent_offset;
22283 if ((type->typegroup ==
'H' || group ==
'H') && type->size == size) {
22285 __Pyx_BufFmt_RaiseExpected(ctx);
22289 offset = ctx->head->parent_offset + field->offset;
22290 if (ctx->fmt_offset != offset) {
22291 PyErr_Format(PyExc_ValueError,
22292 "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T
"d but %" CYTHON_FORMAT_SSIZE_T
"d expected",
22293 (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
22296 ctx->fmt_offset += size;
22298 ctx->fmt_offset += (arraysize - 1) * size;
22301 if (field == &ctx->root) {
22303 if (ctx->enc_count != 0) {
22304 __Pyx_BufFmt_RaiseExpected(ctx);
22309 ctx->head->field = ++field;
22310 if (field->type == NULL) {
22312 field = ctx->head->field;
22314 }
else if (field->type->typegroup ==
'S') {
22315 size_t parent_offset = ctx->head->parent_offset + field->offset;
22316 if (field->type->fields->type == NULL)
continue;
22317 field = field->type->fields;
22319 ctx->head->field = field;
22320 ctx->head->parent_offset = parent_offset;
22326 }
while (ctx->enc_count);
22328 ctx->is_complex = 0;
22332__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx,
const char** tsp)
22334 const char *ts = *tsp;
22335 int i = 0,
number, ndim;
22337 if (ctx->new_count != 1) {
22338 PyErr_SetString(PyExc_ValueError,
22339 "Cannot handle repeated arrays in format string");
22342 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return -1;
22343 ndim = ctx->head->field->type->ndim;
22344 while (*ts && *ts !=
')') {
22346 case ' ':
case '\f':
case '\r':
case '\n':
case '\t':
case '\v':
continue;
22349 number = __Pyx_BufFmt_ExpectNumber(&ts);
22350 if (
number == -1)
return -1;
22351 if (i < ndim && (
size_t)
number != ctx->head->field->type->arraysize[i]) {
22352 PyErr_Format(PyExc_ValueError,
22353 "Expected a dimension of size %zu, got %d",
22354 ctx->head->field->type->arraysize[i],
number);
22357 if (*ts !=
',' && *ts !=
')') {
22358 PyErr_Format(PyExc_ValueError,
22359 "Expected a comma in format string, got '%c'", *ts);
22362 if (*ts ==
',') ts++;
22366 PyErr_Format(PyExc_ValueError,
"Expected %d dimension(s), got %d",
22367 ctx->head->field->type->ndim, i);
22371 PyErr_SetString(PyExc_ValueError,
22372 "Unexpected end of format string, expected ')'");
22375 ctx->is_valid_array = 1;
22376 ctx->new_count = 1;
22380static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx,
const char* ts) {
22385 if (ctx->enc_type != 0 && ctx->head == NULL) {
22386 __Pyx_BufFmt_RaiseExpected(ctx);
22389 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return NULL;
22390 if (ctx->head != NULL) {
22391 __Pyx_BufFmt_RaiseExpected(ctx);
22401 if (!__Pyx_Is_Little_Endian()) {
22402 PyErr_SetString(PyExc_ValueError,
"Little-endian buffer not supported on big-endian compiler");
22405 ctx->new_packmode =
'=';
22410 if (__Pyx_Is_Little_Endian()) {
22411 PyErr_SetString(PyExc_ValueError,
"Big-endian buffer not supported on little-endian compiler");
22414 ctx->new_packmode =
'=';
22420 ctx->new_packmode = *ts++;
22424 const char* ts_after_sub;
22425 size_t i, struct_count = ctx->new_count;
22426 size_t struct_alignment = ctx->struct_alignment;
22427 ctx->new_count = 1;
22429 if (*ts !=
'\x7B') {
22430 PyErr_SetString(PyExc_ValueError,
"Buffer acquisition: Expected '\x7B' after 'T'");
22433 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return NULL;
22435 ctx->enc_count = 0;
22436 ctx->struct_alignment = 0;
22439 for (i = 0; i != struct_count; ++i) {
22440 ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
22441 if (!ts_after_sub)
return NULL;
22444 if (struct_alignment) ctx->struct_alignment = struct_alignment;
22449 size_t alignment = ctx->struct_alignment;
22451 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return NULL;
22453 if (alignment && ctx->fmt_offset % alignment) {
22454 ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
22459 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return NULL;
22460 ctx->fmt_offset += ctx->new_count;
22461 ctx->new_count = 1;
22462 ctx->enc_count = 0;
22464 ctx->enc_packmode = ctx->new_packmode;
22470 if (*ts !=
'f' && *ts !=
'd' && *ts !=
'g') {
22471 __Pyx_BufFmt_RaiseUnexpectedChar(
'Z');
22474 CYTHON_FALLTHROUGH;
22475 case '?':
case 'c':
case 'b':
case 'B':
case 'h':
case 'H':
case 'i':
case 'I':
22476 case 'l':
case 'L':
case 'q':
case 'Q':
22477 case 'f':
case 'd':
case 'g':
22478 case 'O':
case 'p':
22479 if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
22480 (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
22481 ctx->enc_count += ctx->new_count;
22482 ctx->new_count = 1;
22487 CYTHON_FALLTHROUGH;
22489 if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1)
return NULL;
22490 ctx->enc_count = ctx->new_count;
22491 ctx->enc_packmode = ctx->new_packmode;
22492 ctx->enc_type = *ts;
22493 ctx->is_complex = got_Z;
22495 ctx->new_count = 1;
22500 while(*ts !=
':') ++ts;
22504 if (__pyx_buffmt_parse_array(ctx, &ts) < 0)
return NULL;
22508 int number = __Pyx_BufFmt_ExpectNumber(&ts);
22509 if (
number == -1)
return NULL;
22510 ctx->new_count = (size_t)
number;
22517static CYTHON_INLINE
void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
22518 if (unlikely(info->buf == NULL))
return;
22519 if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
22520 PyBuffer_Release(info);
22522static void __Pyx_ZeroBuffer(Py_buffer* buf) {
22525 buf->strides = __Pyx_zeros;
22526 buf->shape = __Pyx_zeros;
22527 buf->suboffsets = __Pyx_minusones;
22529static int __Pyx__GetBufferAndValidate(
22530 Py_buffer* buf, PyObject* obj,
const __Pyx_TypeInfo* dtype,
int flags,
22531 int nd,
int cast, __Pyx_BufFmt_StackElem* stack)
22534 if (unlikely(PyObject_GetBuffer(obj, buf, flags) == -1)) {
22535 __Pyx_ZeroBuffer(buf);
22538 if (unlikely(buf->ndim != nd)) {
22539 PyErr_Format(PyExc_ValueError,
22540 "Buffer has wrong number of dimensions (expected %d, got %d)",
22545 __Pyx_BufFmt_Context ctx;
22546 __Pyx_BufFmt_Init(&ctx, stack, dtype);
22547 if (!__Pyx_BufFmt_CheckString(&ctx, buf->format))
goto fail;
22549 if (unlikely((
size_t)buf->itemsize != dtype->size)) {
22550 PyErr_Format(PyExc_ValueError,
22551 "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T
"d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T
"d byte%s)",
22552 buf->itemsize, (buf->itemsize > 1) ?
"s" :
"",
22553 dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ?
"s" :
"");
22556 if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
22559 __Pyx_SafeReleaseBuffer(buf);
22564static void __Pyx_RaiseBufferIndexError(
int axis) {
22565 PyErr_Format(PyExc_IndexError,
22566 "Out of bounds on buffer access (axis %d)", axis);
22570#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
22571#define __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
22572static CYTHON_INLINE
int __Pyx_PyObject_CompareStrStrBoolEq(PyObject* s1, PyObject* s2) {
22573 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
22574 int result = PyUnicode_Equal(s1, s2);
22575 #if !CYTHON_COMPILING_IN_CPYTHON
22576 if (unlikely(result == -1))
return -1;
22578 if (result == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
22580 int result = PyUnicode_Compare(s1, s2);
22581 if (unlikely((result == -1) && PyErr_Occurred()))
return -1;
22582 if (result == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
22590static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2,
int pyop) {
22591 CYTHON_UNUSED_VAR(pyop);
22592 if (unlikely(op1 == Py_None)) {
22593 if (op2 == Py_None)
goto __pyx_return_true;
else goto __pyx_return_false;
22595 if (unlikely(op2 == Py_None)) {
22596 if (op1 == Py_None)
goto __pyx_return_true;
else goto __pyx_return_false;
22599 if (likely(op1 != Py_None)) {
22600 if (op1 == op2)
goto __pyx_return_true;
22601 if (likely(op2 != Py_None)) {
22602 return __Pyx_PyObject_CompareStrStrBoolEq(op1, op2);
22604 goto __pyx_richcmp;
22607 if ((0))
goto __pyx_richcmp;
22608 if ((0))
goto __pyx_return_true;
22609 if ((0))
goto __pyx_return_false;
22611 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
22619#if CYTHON_VECTORCALL
22620static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues, PyObject *
s)
22622 Py_ssize_t i,
n = __Pyx_PyTuple_GET_SIZE(kwnames);
22623 #if !CYTHON_ASSUME_SAFE_SIZE
22624 if (unlikely(
n == -1))
return NULL;
22626 for (i = 0; i <
n; i++)
22628 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
22629 #if !CYTHON_ASSUME_SAFE_MACROS
22630 if (unlikely(!namei))
return NULL;
22632 if (
s == namei)
return kwvalues[i];
22634 for (i = 0; i <
n; i++)
22636 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
22637 #if !CYTHON_ASSUME_SAFE_MACROS
22638 if (unlikely(!namei))
return NULL;
22640 int eq = __Pyx_PyUnicode_Equals(
s, namei);
22641 if (unlikely(eq != 0)) {
22642 if (unlikely(eq < 0))
return NULL;
22643 return kwvalues[i];
22648#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
22649CYTHON_UNUSED
static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *
const *kwvalues) {
22650 Py_ssize_t i, nkwargs;
22652#if !CYTHON_ASSUME_SAFE_SIZE
22653 nkwargs = PyTuple_Size(kwnames);
22654 if (unlikely(nkwargs < 0))
return NULL;
22656 nkwargs = PyTuple_GET_SIZE(kwnames);
22658 dict = PyDict_New();
22659 if (unlikely(!dict))
22661 for (i=0; i<nkwargs; i++) {
22662#if !CYTHON_ASSUME_SAFE_MACROS
22663 PyObject *key = PyTuple_GetItem(kwnames, i);
22664 if (!key)
goto bad;
22666 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
22668 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
22680static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
22681 PyObject *args[2] = {NULL, arg};
22682 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
22686#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
22687static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
22689 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
22690 if (unlikely(!selfless_args))
return NULL;
22691 result = PyObject_Call(method, selfless_args, kwargs);
22692 Py_DECREF(selfless_args);
22696static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *
const *args, Py_ssize_t nargs, PyObject *kwnames) {
22697 return PyObject_Vectorcall(method, args ? args+1 : NULL, nargs ? (
size_t) nargs-1 : 0, kwnames);
22700static PyMethodDef __Pyx_UnboundCMethod_Def = {
22701 "CythonUnboundCMethod",
22702 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
22703#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
22704 METH_VARARGS | METH_KEYWORDS,
22706 METH_FASTCALL | METH_KEYWORDS,
22710static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
22711 PyObject *method, *result=NULL;
22712 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
22713 if (unlikely(!method))
22716#if CYTHON_COMPILING_IN_CPYTHON
22717 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
22719 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
22720 target->func = descr->d_method->ml_meth;
22721 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
22724#if CYTHON_COMPILING_IN_PYPY
22726 if (PyCFunction_Check(method))
22731#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
22732 self = PyObject_GetAttrString(method,
"__self__");
22733 if (!self && !__Pyx_IgnoreException(PyExc_AttributeError)) {
22737 self = PyCFunction_GET_SELF(method);
22739 self_found = (self && self != Py_None);
22740#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
22744 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
22745 if (unlikely(!unbound_method))
return -1;
22747 result = unbound_method;
22750#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
22751 if (unlikely(target->method)) {
22755 target->method = result;
22760#if CYTHON_COMPILING_IN_CPYTHON
22761static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
22762 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
22763 if (likely(was_initialized == 2 && cfunc->func)) {
22764 if (likely(cfunc->flag == METH_NOARGS))
22765 return __Pyx_CallCFunction(cfunc, self, NULL);
22766 if (likely(cfunc->flag == METH_FASTCALL))
22767 return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
22768 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
22769 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
22770 if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
22771 return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
22772 if (cfunc->flag == METH_VARARGS)
22773 return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
22774 return __Pyx__CallUnboundCMethod0(cfunc, self);
22776#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
22777 else if (unlikely(was_initialized == 1)) {
22778 __Pyx_CachedCFunction tmp_cfunc = {
22783 tmp_cfunc.type = cfunc->type;
22784 tmp_cfunc.method_name = cfunc->method_name;
22785 return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
22788 PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
22789 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
22793static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
22795 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0))
return NULL;
22796 result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
22801static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
22802 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
22806static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
22807 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
22811#if CYTHON_AVOID_BORROWED_REFS
22812static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
22813 PyObject *next = NULL;
22816 PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
22817 if (unlikely(!dictview))
goto bad;
22818 *ppos = PyObject_GetIter(dictview);
22819 Py_DECREF(dictview);
22821 *ppos = PyObject_GetIter(p);
22823 if (unlikely(!*ppos))
goto bad;
22825 next = PyIter_Next(*ppos);
22827 if (PyErr_Occurred())
goto bad;
22830 if (pkey && pvalue) {
22831 *pkey = __Pyx_PySequence_ITEM(next, 0);
22832 if (unlikely(*pkey))
goto bad;
22833 *pvalue = __Pyx_PySequence_ITEM(next, 1);
22834 if (unlikely(*pvalue))
goto bad;
22845#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
22846 PyErr_FormatUnraisable(
"Exception ignored in __Pyx_PyDict_NextRef");
22848 PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
22850 if (pkey) *pkey = NULL;
22851 if (pvalue) *pvalue = NULL;
22855static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
22856 int result = PyDict_Next(p, ppos, pkey, pvalue);
22857 if (likely(result == 1)) {
22858 if (pkey) Py_INCREF(*pkey);
22859 if (pvalue) Py_INCREF(*pvalue);
22866static void __Pyx_RaiseDoubleKeywordsError(
22867 const char* func_name,
22870 PyErr_Format(PyExc_TypeError,
22871 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
22875#if CYTHON_COMPILING_IN_CPYTHON
22876static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
22877 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
22878 if (likely(was_initialized == 2 && cfunc->func)) {
22879 PyObject *args[2] = {arg1, arg2};
22880 if (cfunc->flag == METH_FASTCALL) {
22881 return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
22883 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
22884 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
22886#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
22887 else if (unlikely(was_initialized == 1)) {
22888 __Pyx_CachedCFunction tmp_cfunc = {
22893 tmp_cfunc.type = cfunc->type;
22894 tmp_cfunc.method_name = cfunc->method_name;
22895 return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
22898 PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
22899 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
22903static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
22904 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0))
return NULL;
22905#if CYTHON_COMPILING_IN_CPYTHON
22906 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
22907 PyObject *result = NULL;
22908 PyObject *args = PyTuple_New(2);
22909 if (unlikely(!args))
return NULL;
22911 PyTuple_SET_ITEM(args, 0, arg1);
22913 PyTuple_SET_ITEM(args, 1, arg2);
22914 if (cfunc->flag & METH_KEYWORDS)
22915 result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
22917 result = __Pyx_CallCFunction(cfunc, self, args);
22923 PyObject *args[4] = {NULL, self, arg1, arg2};
22924 return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
22929static int __Pyx_ValidateDuplicatePosArgs(
22931 PyObject **
const argnames[],
22932 PyObject **
const *first_kw_arg,
22933 const char* function_name)
22935 PyObject **
const *name = argnames;
22936 while (name != first_kw_arg) {
22937 PyObject *key = **name;
22938 int found = PyDict_Contains(kwds, key);
22939 if (unlikely(found)) {
22940 if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
22949#if CYTHON_USE_UNICODE_INTERNALS
22950static CYTHON_INLINE
int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
22952 Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
22953 if (len != PyUnicode_GET_LENGTH(s2))
return 0;
22954 kind = PyUnicode_KIND(s1);
22955 if (kind != PyUnicode_KIND(s2))
return 0;
22956 const void *data1 = PyUnicode_DATA(s1);
22957 const void *data2 = PyUnicode_DATA(s2);
22958 return (memcmp(data1, data2, (
size_t) len * (
size_t) kind) == 0);
22961static int __Pyx_MatchKeywordArg_str(
22963 PyObject **
const argnames[],
22964 PyObject **
const *first_kw_arg,
22965 size_t *index_found,
22966 const char *function_name)
22968 PyObject **
const *name;
22969 #if CYTHON_USE_UNICODE_INTERNALS
22970 Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
22971 if (unlikely(key_hash == -1)) {
22972 key_hash = PyObject_Hash(key);
22973 if (unlikely(key_hash == -1))
22977 name = first_kw_arg;
22979 PyObject *name_str = **name;
22980 #if CYTHON_USE_UNICODE_INTERNALS
22981 if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
22982 *index_found = (size_t) (name - argnames);
22986 #if CYTHON_ASSUME_SAFE_SIZE
22987 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
22990 int cmp = PyUnicode_Compare(name_str, key);
22991 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
22993 *index_found = (size_t) (name - argnames);
23001 while (name != first_kw_arg) {
23002 PyObject *name_str = **name;
23003 #if CYTHON_USE_UNICODE_INTERNALS
23004 if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
23005 if (__Pyx_UnicodeKeywordsEqual(name_str, key))
23006 goto arg_passed_twice;
23009 #if CYTHON_ASSUME_SAFE_SIZE
23010 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
23013 if (unlikely(name_str == key))
goto arg_passed_twice;
23014 int cmp = PyUnicode_Compare(name_str, key);
23015 if (cmp < 0 && unlikely(PyErr_Occurred()))
goto bad;
23016 if (cmp == 0)
goto arg_passed_twice;
23023 __Pyx_RaiseDoubleKeywordsError(function_name, key);
23028static int __Pyx_MatchKeywordArg_nostr(
23030 PyObject **
const argnames[],
23031 PyObject **
const *first_kw_arg,
23032 size_t *index_found,
23033 const char *function_name)
23035 PyObject **
const *name;
23036 if (unlikely(!PyUnicode_Check(key)))
goto invalid_keyword_type;
23037 name = first_kw_arg;
23039 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
23041 *index_found = (size_t) (name - argnames);
23044 if (unlikely(cmp == -1))
goto bad;
23048 while (name != first_kw_arg) {
23049 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
23050 if (unlikely(cmp != 0)) {
23051 if (cmp == 1)
goto arg_passed_twice;
23058 __Pyx_RaiseDoubleKeywordsError(function_name, key);
23060invalid_keyword_type:
23061 PyErr_Format(PyExc_TypeError,
23062 "%.200s() keywords must be strings", function_name);
23067static CYTHON_INLINE
int __Pyx_MatchKeywordArg(
23069 PyObject **
const argnames[],
23070 PyObject **
const *first_kw_arg,
23071 size_t *index_found,
23072 const char *function_name)
23074 return likely(PyUnicode_CheckExact(key)) ?
23075 __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
23076 __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
23078static void __Pyx_RejectUnknownKeyword(
23080 PyObject **
const argnames[],
23081 PyObject **
const *first_kw_arg,
23082 const char *function_name)
23084 #if CYTHON_AVOID_BORROWED_REFS
23085 PyObject *pos = NULL;
23087 Py_ssize_t pos = 0;
23089 PyObject *key = NULL;
23090 __Pyx_BEGIN_CRITICAL_SECTION(kwds);
23091 #if CYTHON_AVOID_BORROWED_REFS
23092 while (__Pyx_PyDict_NextRef(kwds, &pos, &key, NULL))
23094 (void) __Pyx_PyDict_NextRef;
23095 while (PyDict_Next(kwds, &pos, &key, NULL))
23098 PyObject**
const *name = first_kw_arg;
23099 while (*name && (**name != key)) name++;
23101 size_t index_found = 0;
23102 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
23105 PyErr_Format(PyExc_TypeError,
23106 "%s() got an unexpected keyword argument '%U'",
23107 function_name, key);
23109 #if CYTHON_AVOID_BORROWED_REFS
23115 #if CYTHON_AVOID_BORROWED_REFS
23119 __Pyx_END_CRITICAL_SECTION();
23120 #if CYTHON_AVOID_BORROWED_REFS
23123 assert(PyErr_Occurred());
23125static int __Pyx_ParseKeywordDict(
23127 PyObject **
const argnames[],
23128 PyObject *values[],
23129 Py_ssize_t num_pos_args,
23130 Py_ssize_t num_kwargs,
23131 const char* function_name,
23132 int ignore_unknown_kwargs)
23134 PyObject**
const *name;
23135 PyObject**
const *first_kw_arg = argnames + num_pos_args;
23136 Py_ssize_t extracted = 0;
23137#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
23138 if (unlikely(!PyArg_ValidateKeywordArguments(kwds)))
return -1;
23140 name = first_kw_arg;
23141 while (*name && num_kwargs > extracted) {
23142 PyObject * key = **name;
23145 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
23146 found = PyDict_GetItemRef(kwds, key, &value);
23148 value = PyDict_GetItemWithError(kwds, key);
23153 if (unlikely(PyErr_Occurred()))
goto bad;
23157 if (unlikely(found < 0))
goto bad;
23158 values[name-argnames] = value;
23163 if (num_kwargs > extracted) {
23164 if (ignore_unknown_kwargs) {
23165 if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
23168 __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
23176static int __Pyx_ParseKeywordDictToDict(
23178 PyObject **
const argnames[],
23180 PyObject *values[],
23181 Py_ssize_t num_pos_args,
23182 const char* function_name)
23184 PyObject**
const *name;
23185 PyObject**
const *first_kw_arg = argnames + num_pos_args;
23187#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
23188 if (unlikely(!PyArg_ValidateKeywordArguments(kwds)))
return -1;
23190 if (PyDict_Update(kwds2, kwds) < 0)
goto bad;
23191 name = first_kw_arg;
23193 PyObject *key = **name;
23195#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
23196 int found = PyDict_Pop(kwds2, key, &value);
23198 if (unlikely(found < 0))
goto bad;
23199 values[name-argnames] = value;
23201#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
23202 int found = PyDict_GetItemRef(kwds2, key, &value);
23204 if (unlikely(found < 0))
goto bad;
23205 values[name-argnames] = value;
23206 if (unlikely(PyDict_DelItem(kwds2, key) < 0))
goto bad;
23209 #if CYTHON_COMPILING_IN_CPYTHON
23210 value = _PyDict_Pop(kwds2, key, kwds2);
23212 value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
23214 if (value == kwds2) {
23217 if (unlikely(!value))
goto bad;
23218 values[name-argnames] = value;
23223 len = PyDict_Size(kwds2);
23225 return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
23226 }
else if (unlikely(len == -1)) {
23233static int __Pyx_ParseKeywordsTuple(
23235 PyObject *
const *kwvalues,
23236 PyObject **
const argnames[],
23238 PyObject *values[],
23239 Py_ssize_t num_pos_args,
23240 Py_ssize_t num_kwargs,
23241 const char* function_name,
23242 int ignore_unknown_kwargs)
23244 PyObject *key = NULL;
23245 PyObject**
const * name;
23246 PyObject**
const *first_kw_arg = argnames + num_pos_args;
23247 for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
23248#if CYTHON_AVOID_BORROWED_REFS
23249 key = __Pyx_PySequence_ITEM(kwds, pos);
23251 key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
23253#if !CYTHON_ASSUME_SAFE_MACROS
23254 if (unlikely(!key))
goto bad;
23256 name = first_kw_arg;
23257 while (*name && (**name != key)) name++;
23259 PyObject *value = kwvalues[pos];
23260 values[name-argnames] = __Pyx_NewRef(value);
23262 size_t index_found = 0;
23263 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
23265 PyObject *value = kwvalues[pos];
23266 values[index_found] = __Pyx_NewRef(value);
23268 if (unlikely(cmp == -1))
goto bad;
23270 PyObject *value = kwvalues[pos];
23271 if (unlikely(PyDict_SetItem(kwds2, key, value)))
goto bad;
23272 }
else if (!ignore_unknown_kwargs) {
23273 goto invalid_keyword;
23277 #if CYTHON_AVOID_BORROWED_REFS
23284 PyErr_Format(PyExc_TypeError,
23285 "%s() got an unexpected keyword argument '%U'",
23286 function_name, key);
23289 #if CYTHON_AVOID_BORROWED_REFS
23296static int __Pyx_ParseKeywords(
23298 PyObject *
const *kwvalues,
23299 PyObject **
const argnames[],
23301 PyObject *values[],
23302 Py_ssize_t num_pos_args,
23303 Py_ssize_t num_kwargs,
23304 const char* function_name,
23305 int ignore_unknown_kwargs)
23307 if (CYTHON_VECTORCALL && likely(PyTuple_Check(kwds)))
23308 return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
23310 return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
23312 return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
23316static void __Pyx_RaiseArgtupleInvalid(
23317 const char* func_name,
23319 Py_ssize_t num_min,
23320 Py_ssize_t num_max,
23321 Py_ssize_t num_found)
23323 Py_ssize_t num_expected;
23324 const char *more_or_less;
23325 if (num_found < num_min) {
23326 num_expected = num_min;
23327 more_or_less =
"at least";
23329 num_expected = num_max;
23330 more_or_less =
"at most";
23333 more_or_less =
"exactly";
23335 PyErr_Format(PyExc_TypeError,
23336 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
23337 func_name, more_or_less, num_expected,
23338 (num_expected == 1) ?
"" :
"s", num_found);
23342#if CYTHON_USE_TYPE_SLOTS
23343static CYTHON_INLINE
int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
23344 PyTypeObject* tp = Py_TYPE(obj);
23345 if (likely(tp->tp_setattro))
23346 return tp->tp_setattro(obj, attr_name, value);
23347 return PyObject_SetAttr(obj, attr_name, value);
23352static CYTHON_INLINE
void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
23353 PyErr_Format(PyExc_ValueError,
23354 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T
"d)", expected);
23358static CYTHON_INLINE
void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
23359 PyErr_Format(PyExc_ValueError,
23360 "need more than %" CYTHON_FORMAT_SSIZE_T
"d value%.1s to unpack",
23361 index, (index == 1) ?
"" :
"s");
23365static CYTHON_INLINE
int __Pyx_IterFinish(
void) {
23366 PyObject* exc_type;
23367 __Pyx_PyThreadState_declare
23368 __Pyx_PyThreadState_assign
23369 exc_type = __Pyx_PyErr_CurrentExceptionType();
23370 if (unlikely(exc_type)) {
23371 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
23373 __Pyx_PyErr_Clear();
23380static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
23381 if (unlikely(retval)) {
23383 __Pyx_RaiseTooManyValuesError(expected);
23386 return __Pyx_IterFinish();
23390#if !CYTHON_COMPILING_IN_PYPY
23391static int __Pyx_PyFloat_BoolEqObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check) {
23392 const double b = floatval;
23394 CYTHON_UNUSED_VAR(inplace);
23395 CYTHON_UNUSED_VAR(zerodivision_check);
23399 if (likely(PyFloat_CheckExact(op1))) {
23400 a = __Pyx_PyFloat_AS_DOUBLE(op1);
23403 if (likely(PyLong_CheckExact(op1))) {
23404 #if CYTHON_USE_PYLONG_INTERNALS
23405 if (__Pyx_PyLong_IsZero(op1)) {
23409 }
else if (__Pyx_PyLong_IsCompact(op1)) {
23410 a = (double) __Pyx_PyLong_CompactValue(op1);
23413 const digit* digits = __Pyx_PyLong_Digits(op1);
23414 const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
23415 if (size <= 2 && (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (1 * PyLong_SHIFT < 53)))) {
23416 a = (double) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
23417 if ((8 *
sizeof(
unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (
double) ((PY_LONG_LONG)1 << 53))) {
23418 if (__Pyx_PyLong_IsNeg(op1)) a = -a;
23422 if (size <= 3 && (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (2 * PyLong_SHIFT < 53)))) {
23423 a = (double) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
23424 if ((8 *
sizeof(
unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (
double) ((PY_LONG_LONG)1 << 53))) {
23425 if (__Pyx_PyLong_IsNeg(op1)) a = -a;
23429 if (size <= 4 && (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (3 * PyLong_SHIFT < 53)))) {
23430 a = (double) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
23431 if ((8 *
sizeof(
unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (
double) ((PY_LONG_LONG)1 << 53))) {
23432 if (__Pyx_PyLong_IsNeg(op1)) a = -a;
23440 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
23441 __Pyx_PyType_GetSlot((&PyFloat_Type), tp_richcompare, richcmpfunc)
23443 PyObject_RichCompare
23447 return __Pyx_PyObject_IsTrueAndDecref(res);
23450 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
23452#if CYTHON_USE_PYLONG_INTERNALS
23464static void __Pyx_RaiseUnboundLocalError(
const char *varname) {
23465 PyErr_Format(PyExc_UnboundLocalError,
"local variable '%s' referenced before assignment", varname);
23469#if !CYTHON_COMPILING_IN_PYPY
23470static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2,
int inplace) {
23471 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
23473#if CYTHON_USE_PYLONG_INTERNALS
23474static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check) {
23475 CYTHON_MAYBE_UNUSED_VAR(inplace);
23476 CYTHON_UNUSED_VAR(zerodivision_check);
23477 const long b = intval;
23479 const PY_LONG_LONG llb = intval;
23481 if (unlikely(__Pyx_PyLong_IsZero(op1))) {
23482 return __Pyx_NewRef(op2);
23484 const int is_positive = __Pyx_PyLong_IsPos(op1);
23485 const digit* digits = __Pyx_PyLong_Digits(op1);
23486 const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
23487 if (likely(size == 1)) {
23488 a = (long) digits[0];
23489 if (!is_positive) a *= -1;
23491 if (size == 2 && 8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT) {
23492 a = (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
23493 if (!is_positive) a *= -1;
23494 goto calculate_long;
23495 }
else if (size == 2 && 8 *
sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
23496 lla = (PY_LONG_LONG) (((((
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
23497 if (!is_positive) lla *= -1;
23498 goto calculate_long_long;
23500 if (size == 3 && 8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT) {
23501 a = (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
23502 if (!is_positive) a *= -1;
23503 goto calculate_long;
23504 }
else if (size == 3 && 8 *
sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
23505 lla = (PY_LONG_LONG) (((((((
unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
23506 if (!is_positive) lla *= -1;
23507 goto calculate_long_long;
23509 if (size == 4 && 8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT) {
23510 a = (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
23511 if (!is_positive) a *= -1;
23512 goto calculate_long;
23513 }
else if (size == 4 && 8 *
sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
23514 lla = (PY_LONG_LONG) (((((((((
unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
23515 if (!is_positive) lla *= -1;
23516 goto calculate_long_long;
23519 return PyLong_Type.tp_as_number->nb_add(op1, op2);
23525 return PyLong_FromLong(x);
23527 calculate_long_long:
23531 return PyLong_FromLongLong(llx);
23536static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val,
long intval,
int zerodivision_check) {
23537 CYTHON_UNUSED_VAR(zerodivision_check);
23538 const long b = intval;
23539 double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
23542 result = ((double)a) + (
double)b;
23543 return PyFloat_FromDouble(result);
23545static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check) {
23546 CYTHON_MAYBE_UNUSED_VAR(intval);
23547 CYTHON_UNUSED_VAR(zerodivision_check);
23548 #if CYTHON_USE_PYLONG_INTERNALS
23549 if (likely(PyLong_CheckExact(op1))) {
23550 return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check);
23553 if (PyFloat_CheckExact(op1)) {
23554 return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check);
23556 return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace);
23561static void __Pyx_Generator_Replace_StopIteration(
int in_async_gen) {
23562 PyObject *exc, *val, *tb, *cur_exc, *new_exc;
23563 __Pyx_PyThreadState_declare
23564 int is_async_stopiteration = 0;
23565 CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
23566 __Pyx_PyThreadState_assign
23567 cur_exc = __Pyx_PyErr_CurrentExceptionType();
23568 if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
23569 if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) {
23570 is_async_stopiteration = 1;
23575 __Pyx_GetException(&exc, &val, &tb);
23578 new_exc = PyObject_CallFunction(PyExc_RuntimeError,
"s",
23579 is_async_stopiteration ?
"async generator raised StopAsyncIteration" :
23580 in_async_gen ?
"async generator raised StopIteration" :
23581 "generator raised StopIteration");
23586 PyException_SetCause(new_exc, val);
23587 PyErr_SetObject(PyExc_RuntimeError, new_exc);
23588 Py_DECREF(new_exc);
23592#if CYTHON_COMPILING_IN_LIMITED_API
23593static CYTHON_INLINE PyObject* __Pyx__PyFrozenDict_New(PyObject* frozendict_type, PyObject* it) {
23594 return PyObject_CallFunctionObjArgs(frozendict_type, it, NULL);
23599#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
23600static int __Pyx_GetItemInt_wraparound(PyObject *o, PySequenceMethods *sm, Py_ssize_t *i) {
23602 if (likely(sm->sq_length)) {
23603 Py_ssize_t l = sm->sq_length(o);
23604 if (likely(l >= 0)) {
23607 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
23617static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
23619 if (unlikely(!j))
return NULL;
23620 r = PyObject_GetItem(o, j);
23624static PyObject *__Pyx_GetItemInt_Generic_size(PyObject *o, Py_ssize_t i) {
23625 return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
23627static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
23628 int wraparound,
int boundscheck,
int unsafe_shared) {
23629 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
23630#if CYTHON_AVOID_BORROWED_REFS
23631 CYTHON_UNUSED_VAR(boundscheck);
23632 Py_ssize_t wrapped_i = i;
23633 if (wraparound & unlikely(i < 0)) {
23634 Py_ssize_t size = __Pyx_PyList_GET_SIZE(o);
23635 #if !CYTHON_ASSUME_SAFE_SIZE
23636 if (unlikely(size < 0))
return NULL;
23640 return __Pyx_PyList_GetItemRef(o, wrapped_i);
23641#elif CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
23642 Py_ssize_t wrapped_i = i;
23643 Py_ssize_t size = (wraparound | boundscheck) ? PyList_GET_SIZE(o) : -1;
23644 if (wraparound & unlikely(i < 0)) {
23647 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, size))) {
23648 return __Pyx_PyList_GET_ITEM_REF(o, wrapped_i, unsafe_shared);
23650 return __Pyx_GetItemInt_Generic_size(o, i);
23654 return PySequence_GetItem(o, i);
23657static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
23658 int wraparound,
int boundscheck,
int unsafe_shared) {
23659 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
23660#if CYTHON_AVOID_BORROWED_REFS
23661 CYTHON_UNUSED_VAR(boundscheck);
23662 Py_ssize_t wrapped_i = i;
23663 if (wraparound & unlikely(i < 0)) {
23664 Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(o);
23665 #if !CYTHON_ASSUME_SAFE_SIZE
23666 if (unlikely(size < 0))
return NULL;
23670 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_LIMITED_API
23671 return PySequence_ITEM(o, wrapped_i);
23673 if (unlikely(wrapped_i < 0)) {
23674 PyErr_SetString(PyExc_IndexError,
"tuple index out of range");
23677 return PySequence_GetItem(o, wrapped_i);
23679#elif CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
23680 Py_ssize_t wrapped_i = i;
23681 Py_ssize_t size = (wraparound | boundscheck) ? PyTuple_GET_SIZE(o) : -1;
23682 if (wraparound & unlikely(i < 0)) {
23685 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, size))) {
23686 return __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(o, wrapped_i));
23688 return __Pyx_GetItemInt_Generic_size(o, i);
23692 return PySequence_GetItem(o, i);
23695#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
23696static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast_mapping(PyObject *o, binaryfunc getitem, Py_ssize_t i) {
23697 PyObject *
r, *key = PyLong_FromSsize_t(i);
23698 if (unlikely(!key))
return NULL;
23699 r = getitem(o, key);
23704static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
23705 int wraparound,
int boundscheck,
int unsafe_shared) {
23706 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
23707#if CYTHON_ASSUME_SAFE_SIZE
23708 if (PyList_CheckExact(o)) {
23709 return __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck, unsafe_shared);
23711 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23712 if (PyTuple_CheckExact(o)) {
23713 return __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck, unsafe_shared);
23717 if ((!wraparound || i >= 0) & PyList_CheckExact(o)) {
23718 return boundscheck ? __Pyx_PyList_GetItemRef(o, i) : __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared);
23721#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
23722 if (PyDict_CheckExact(o)) {
23723 return __Pyx_GetItemInt_Fast_mapping(o, PyDict_Type.tp_as_mapping->mp_subscript, i);
23724 #if defined(PyFrozenDict_CheckExact)
23725 }
else if (PyFrozenDict_CheckExact(o)) {
23726 return __Pyx_GetItemInt_Fast_mapping(o, PyFrozenDict_Type.tp_as_mapping->mp_subscript, i);
23730 PyTypeObject *obj_type = Py_TYPE(o);
23731 int seq_or_mapping = __Pyx_PyType_GetFlags(obj_type) & (Py_TPFLAGS_SEQUENCE|Py_TPFLAGS_MAPPING);
23732 if (seq_or_mapping != Py_TPFLAGS_SEQUENCE) {
23733 PyMappingMethods *mm = obj_type->tp_as_mapping;
23734 if (mm && mm->mp_subscript)
23735 return __Pyx_GetItemInt_Fast_mapping(o, mm->mp_subscript, i);
23737 PySequenceMethods *sm = obj_type->tp_as_sequence;
23738 if (likely(sm && sm->sq_item)) {
23739 if (wraparound && (i < 0) && unlikely(__Pyx_GetItemInt_wraparound(o, sm, &i) == -1))
23741 return sm->sq_item(o, i);
23743 if (seq_or_mapping == Py_TPFLAGS_SEQUENCE) {
23744 PyMappingMethods *mm = obj_type->tp_as_mapping;
23745 if (likely(mm && mm->mp_subscript))
23746 return __Pyx_GetItemInt_Fast_mapping(o, mm->mp_subscript, i);
23750 if (!PyMapping_Check(o)) {
23751 return PySequence_GetItem(o, i);
23756 return __Pyx_GetItemInt_Generic_size(o, i);
23760static void __Pyx_RaiseErrorWithType(PyObject* exc_type,
const char* message, PyTypeObject *type_obj) {
23761 __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(type_obj);
23762 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
23763 if (unlikely(!type_name))
return;
23765 PyErr_Format(exc_type, message, type_name);
23766 __Pyx_DECREF_TypeName(type_name);
23770#if CYTHON_USE_TYPE_SLOTS
23771static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
23772 PyObject *runerr = NULL;
23773 Py_ssize_t key_value;
23774 key_value = __Pyx_PyIndex_AsSsize_t(index);
23775 if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
23776 return __Pyx_GetItemInt_Fast(obj, key_value, 1, 1, 1);
23778 if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
23780 __Pyx_RaiseErrorWithObjectType(
23782 "cannot fit '" __Pyx_FMT_TYPENAME
"' into an index-sized integer",
23787static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
23788 if (likely(PyType_Check(obj))) {
23789 if ((PyTypeObject*)obj == &PyType_Type) {
23790 return Py_GenericAlias(obj, key);
23792 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
23794 if (PyErr_Occurred()) {
23798 PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
23803 __Pyx_RaiseTypeErrorWithObjectType(
23804 "'" __Pyx_FMT_TYPENAME
"' object is not subscriptable", obj);
23807static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
23808 PyTypeObject *tp = Py_TYPE(obj);
23809 PyMappingMethods *mm = tp->tp_as_mapping;
23810 PySequenceMethods *sm = tp->tp_as_sequence;
23811 if (likely(mm && mm->mp_subscript)) {
23812 return mm->mp_subscript(obj, key);
23814 if (likely(sm && sm->sq_item)) {
23815 return __Pyx_PyObject_GetIndex(obj, key);
23817 return __Pyx_PyObject_GetItem_Slow(obj, key);
23822#if !CYTHON_VECTORCALL
23823static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *
const *args,
size_t nargsf) {
23825 switch (__Pyx_PyVectorcall_NARGS(nargsf)) {
23827 return PyObject_CallMethodObjArgs(args[0], name, NULL);
23829 return PyObject_CallMethodObjArgs(args[0], name, args[1], NULL);
23831 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], NULL);
23833 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], args[3], NULL);
23835 return PyObject_CallMethodObjArgs(args[0], name, args[1], args[2], args[3], args[4], NULL);
23837 PyObject *attr = PyObject_GetAttr(args[0], name);
23838 if (unlikely(!attr))
23840 result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
23847#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
23848static CYTHON_INLINE
int __Pyx_HasAttr(PyObject *o, PyObject *
n) {
23850 if (unlikely(!PyUnicode_Check(
n))) {
23851 PyErr_SetString(PyExc_TypeError,
23852 "hasattr(): attribute name must be string");
23855 r = __Pyx_PyObject_GetAttrStrNoError(o,
n);
23857 return (unlikely(PyErr_Occurred())) ? -1 : 0;
23866CYTHON_UNUSED
static PyObject *
23867__Pyx_PyList_FromArray(PyObject *
const *src, Py_ssize_t
n) {
23868 PyObject *res = PyList_New(
n);
23869 if (unlikely(res == NULL))
return NULL;
23870 #if CYTHON_COMPILING_IN_CPYTHON
23871 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item,
n);
23874 for (i = 0; i <
n; i++) {
23876 if (unlikely(__Pyx_PyList_SET_ITEM(res, i, src[i]) < (0))) {
23886static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
23887 PyObject *imported_module = PyImport_GetModule(qualname);
23888 if (unlikely(!imported_module)) {
23890 if (PyErr_Occurred()) {
23895 *
module = imported_module;
23898static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
23899 PyObject *imported_module;
23900 PyObject *top_level_package_name;
23902 int status, module_found;
23903 Py_ssize_t dot_index;
23904 module_found = __Pyx__Import_GetModule(qualname, &imported_module);
23905 if (unlikely(!module_found || module_found == -1)) {
23907 return module_found;
23909 if (imported_names) {
23910 for (i = 0; i < len_imported_names; i++) {
23911 PyObject *imported_name = imported_names[i];
23912#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
23913 int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
23915 int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
23916 if (unlikely(has_imported_attribute == -1))
goto error;
23918 if (!has_imported_attribute) {
23922 *
module = imported_module;
23925 dot_index = PyUnicode_FindChar(qualname,
'.', 0, PY_SSIZE_T_MAX, 1);
23926 if (dot_index == -1) {
23927 *
module = imported_module;
23930 if (unlikely(dot_index == -2))
goto error;
23931 top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
23932 if (unlikely(!top_level_package_name))
goto error;
23933 Py_DECREF(imported_module);
23934 status = __Pyx__Import_GetModule(top_level_package_name, module);
23935 Py_DECREF(top_level_package_name);
23938 Py_DECREF(imported_module);
23942 Py_DECREF(imported_module);
23946static PyObject *__Pyx__Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict,
int level) {
23947 PyObject *module = 0;
23948 PyObject *empty_dict = 0;
23949 PyObject *from_list = 0;
23954 module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
23955 if (likely(module_found == 1)) {
23957 }
else if (unlikely(module_found == -1)) {
23960 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030f00a6
23961 empty_dict = PyFrozenDict_New(NULL);
23963 empty_dict = PyDict_New();
23965 if (unlikely(!empty_dict))
23967 if (imported_names) {
23968 from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
23969 if (unlikely(!from_list))
23973 const char* package_sep = strchr(__Pyx_MODULE_NAME,
'.');
23974 if (package_sep != (0)) {
23975 module = PyImport_ImportModuleLevelObject(
23976 name, moddict, empty_dict, from_list, 1);
23977 if (unlikely(!module)) {
23978 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
23986 module = PyImport_ImportModuleLevelObject(
23987 name, moddict, empty_dict, from_list, level);
23990 Py_XDECREF(from_list);
23991 Py_XDECREF(empty_dict);
23996static PyObject *__Pyx_Import(PyObject *name, PyObject *
const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname,
int level) {
23997 return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
24001static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
24002 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
24003 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
24004 const char* module_name_str = 0;
24005 PyObject* module_name = 0;
24006 PyObject* module_dot = 0;
24007 PyObject* full_name = 0;
24009 module_name_str = PyModule_GetName(module);
24010 if (unlikely(!module_name_str)) {
goto modbad; }
24011 module_name = PyUnicode_FromString(module_name_str);
24012 if (unlikely(!module_name)) {
goto modbad; }
24013 module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__2);
24014 if (unlikely(!module_dot)) {
goto modbad; }
24015 full_name = PyUnicode_Concat(module_dot, name);
24016 if (unlikely(!full_name)) {
goto modbad; }
24017 #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\
24018 CYTHON_COMPILING_IN_GRAAL
24020 PyObject *modules = PyImport_GetModuleDict();
24021 if (unlikely(!modules))
24023 value = PyObject_GetItem(modules, full_name);
24026 value = PyImport_GetModule(full_name);
24029 Py_XDECREF(full_name);
24030 Py_XDECREF(module_dot);
24031 Py_XDECREF(module_name);
24033 if (unlikely(!value)) {
24034 PyErr_Format(PyExc_ImportError,
"cannot import name %S", name);
24040#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
24041static CYTHON_INLINE
void __Pyx__ListComp_AppendAndDecref(PyObject* list, Py_ssize_t len, PyObject* x) {
24042 PyList_SET_ITEM(list, len, x);
24043 Py_SET_SIZE(list, len + 1);
24048#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
24049static CYTHON_INLINE
int __Pyx_ListComp_AppendAndDecref(PyObject* list, PyObject* x) {
24050 PyListObject*
L = (PyListObject*) list;
24051 Py_ssize_t len = Py_SIZE(list);
24052 if (likely(
L->allocated > len)) {
24053 __Pyx__ListComp_AppendAndDecref(list, len, x);
24056 int result = PyList_Append(list, x);
24061static CYTHON_INLINE
int __Pyx_ListComp_AppendAndDecref(PyObject* list, PyObject* x) {
24062 int result = PyList_Append(list, x);
24069#if !CYTHON_COMPILING_IN_PYPY
24070static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
24072 if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) {
24073 if (unlikely(PyTuple_Check(key))) {
24074 PyObject* args = PyTuple_Pack(1, key);
24075 if (likely(args)) {
24076 PyErr_SetObject(PyExc_KeyError, args);
24080 PyErr_SetObject(PyExc_KeyError, key);
24088static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
24089 Py_ssize_t cstart, Py_ssize_t cstop,
24090 PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
24091 int has_cstart,
int has_cstop, CYTHON_UNUSED
int wraparound) {
24092#if CYTHON_USE_TYPE_SLOTS
24093 PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping;
24094 if (likely(mp && mp->mp_subscript))
24100 PyObject *py_slice, *py_start, *py_stop;
24102 py_slice = *_py_slice;
24104 PyObject* owned_start = NULL;
24105 PyObject* owned_stop = NULL;
24107 py_start = *_py_start;
24110 owned_start = py_start = PyLong_FromSsize_t(cstart);
24111 if (unlikely(!py_start))
goto bad;
24113 py_start = Py_None;
24116 py_stop = *_py_stop;
24119 owned_stop = py_stop = PyLong_FromSsize_t(cstop);
24120 if (unlikely(!py_stop)) {
24121 Py_XDECREF(owned_start);
24127 py_slice = PySlice_New(py_start, py_stop, Py_None);
24128 Py_XDECREF(owned_start);
24129 Py_XDECREF(owned_stop);
24130 if (unlikely(!py_slice))
goto bad;
24132#if CYTHON_USE_TYPE_SLOTS
24133 result = mp->mp_subscript(obj, py_slice);
24135 result = PyObject_GetItem(obj, py_slice);
24138 Py_DECREF(py_slice);
24142 __Pyx_RaiseTypeErrorWithObjectType(
24143 "'" __Pyx_FMT_TYPENAME
"' object is unsliceable", obj);
24150#if CYTHON_VECTORCALL
24151CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i) {
24152 PyObject *key = __Pyx_PyTuple_GET_ITEM(kwnames, i);
24153#if !CYTHON_ASSUME_SAFE_MACROS
24154 if (unlikely(!key))
return -1;
24156 if (unlikely(!PyUnicode_Check(key))) {
24157 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
24163CYTHON_UNUSED
static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t
n) {
24164 PyObject *out = PyDict_New();
24165 if (unlikely(!out))
return NULL;
24166 for (Py_ssize_t i=0; i<
n; ++i) {
24167 if (unlikely(PyDict_SetItem(out, keys[i], values[i]) < 0)) {
24174CYTHON_UNUSED
static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i) {
24175 PyObject *key = kwnames[i];
24176 if (unlikely(!PyUnicode_Check(key))) {
24177 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
24185static CYTHON_INLINE
int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2,
long intval,
long inplace) {
24186 CYTHON_MAYBE_UNUSED_VAR(intval);
24187 CYTHON_UNUSED_VAR(inplace);
24191 #if CYTHON_USE_PYLONG_INTERNALS
24192 if (likely(PyLong_CheckExact(op1))) {
24194 unsigned long uintval;
24195 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
24196 const digit* digits = __Pyx_PyLong_Digits(op1);
24198 return (__Pyx_PyLong_IsZero(op1) == 1);
24199 }
else if (intval < 0) {
24200 if (__Pyx_PyLong_IsNonNeg(op1))
24204 if (__Pyx_PyLong_IsNeg(op1))
24207 uintval = (
unsigned long) intval;
24208#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
24209 if (uintval >> (PyLong_SHIFT * 4)) {
24210 unequal = (size != 5) || (digits[0] != (uintval & (
unsigned long) PyLong_MASK))
24211 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK));
24214#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
24215 if (uintval >> (PyLong_SHIFT * 3)) {
24216 unequal = (size != 4) || (digits[0] != (uintval & (
unsigned long) PyLong_MASK))
24217 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK));
24220#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
24221 if (uintval >> (PyLong_SHIFT * 2)) {
24222 unequal = (size != 3) || (digits[0] != (uintval & (
unsigned long) PyLong_MASK))
24223 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK));
24226#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
24227 if (uintval >> (PyLong_SHIFT * 1)) {
24228 unequal = (size != 2) || (digits[0] != (uintval & (
unsigned long) PyLong_MASK))
24229 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK));
24232 unequal = (size != 1) || (((
unsigned long) digits[0]) != (uintval & (
unsigned long) PyLong_MASK));
24233 return (unequal == 0);
24236 if (PyFloat_CheckExact(op1)) {
24237 const long b = intval;
24238 double a = __Pyx_PyFloat_AS_DOUBLE(op1);
24239 return ((
double)a == (
double)b);
24241 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
24245#if !CYTHON_COMPILING_IN_PYPY
24246static int __Pyx_PyFloat_BoolNeObjC(PyObject *op1, PyObject *op2,
double floatval,
int inplace,
int zerodivision_check) {
24247 const double b = floatval;
24249 CYTHON_UNUSED_VAR(inplace);
24250 CYTHON_UNUSED_VAR(zerodivision_check);
24254 if (likely(PyFloat_CheckExact(op1))) {
24255 a = __Pyx_PyFloat_AS_DOUBLE(op1);
24258 if (likely(PyLong_CheckExact(op1))) {
24259 #if CYTHON_USE_PYLONG_INTERNALS
24260 if (__Pyx_PyLong_IsZero(op1)) {
24264 }
else if (__Pyx_PyLong_IsCompact(op1)) {
24265 a = (double) __Pyx_PyLong_CompactValue(op1);
24268 const digit* digits = __Pyx_PyLong_Digits(op1);
24269 const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
24270 if (size <= 2 && (8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (1 * PyLong_SHIFT < 53)))) {
24271 a = (double) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
24272 if ((8 *
sizeof(
unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (
double) ((PY_LONG_LONG)1 << 53))) {
24273 if (__Pyx_PyLong_IsNeg(op1)) a = -a;
24277 if (size <= 3 && (8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (2 * PyLong_SHIFT < 53)))) {
24278 a = (double) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
24279 if ((8 *
sizeof(
unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (
double) ((PY_LONG_LONG)1 << 53))) {
24280 if (__Pyx_PyLong_IsNeg(op1)) a = -a;
24284 if (size <= 4 && (8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT && ((8 *
sizeof(
unsigned long) < 53) || (3 * PyLong_SHIFT < 53)))) {
24285 a = (double) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
24286 if ((8 *
sizeof(
unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (
double) ((PY_LONG_LONG)1 << 53))) {
24287 if (__Pyx_PyLong_IsNeg(op1)) a = -a;
24295 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24296 __Pyx_PyType_GetSlot((&PyFloat_Type), tp_richcompare, richcmpfunc)
24298 PyObject_RichCompare
24302 return __Pyx_PyObject_IsTrueAndDecref(res);
24305 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_NE);
24307#if CYTHON_USE_PYLONG_INTERNALS
24319#ifndef __Pyx_DEFINED_PyObject_CompareIntFloatBoolGt
24320#define __Pyx_DEFINED_PyObject_CompareIntFloatBoolGt
24321static int __Pyx_PyObject_CompareIntFloatBoolGt(PyObject *op1, PyObject *op2) {
24322 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24323 #if !CYTHON_ASSUME_SAFE_MACROS
24324 if (unlikely(float_op2 == -1. && PyErr_Occurred()))
return -1;
24326 #if CYTHON_USE_PYLONG_INTERNALS
24327 if (__Pyx_PyLong_IsCompact(op1)) {
24328 Py_ssize_t iop1 = __Pyx_PyLong_CompactValue(op1);
24329 if (((
double)iop1) > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24331 if (unlikely(!isfinite(float_op2))) {
24332 if (0.0 > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24334 int sign1 = __Pyx_PyLong_Sign(op1);
24335 if (float_op2 >= 0.) {
24336 if (sign1 < 0)
goto __pyx_return_false;
24337 if (float_op2 < (
double) (1L << PyLong_SHIFT))
goto __pyx_return_true;
24339 if (sign1 > 0)
goto __pyx_return_true;
24340 if (float_op2 > -(
double) (1L << PyLong_SHIFT))
goto __pyx_return_false;
24344 if (unlikely(!isfinite(float_op2))) {
24345 if (0.0 > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24348 long iop1 = PyLong_AsLongAndOverflow(op1, &overflow1);
24349 if (likely(!overflow1)) {
24350 if ((
long long) iop1 >= (1LL << 53)) {
24352 }
else if ((
long long) iop1 <= - (1LL << 53)) {
24355 if (((
double) iop1) > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24358 if (overflow1 < 0) {
24359 if (float_op2 > ((
double) (1LL << 53)))
goto __pyx_return_false;
24361 if (float_op2 < - ((
double) (1LL << 53)))
goto __pyx_return_true;
24365 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
24372static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolGt_object_float(PyObject *op1, PyObject *op2,
int pyop) {
24373 CYTHON_UNUSED_VAR(pyop);
24374 if (unlikely(op2 == Py_None)) {
24375 goto __pyx_richcmp;
24377 if (likely(PyFloat_CheckExact(op1))) {
24378 if (likely(op2 != Py_None)) {
24379 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
24380 #if !CYTHON_ASSUME_SAFE_MACROS
24381 if (unlikely(float_op1 == -1. && PyErr_Occurred()))
return -1;
24383 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24384 #if !CYTHON_ASSUME_SAFE_MACROS
24385 if (unlikely(float_op2 == -1. && PyErr_Occurred()))
return -1;
24387 if (float_op1 > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24389 goto __pyx_richcmp;
24391 if (PyLong_CheckExact(op1)) {
24392 if (op1 == op2)
goto __pyx_return_false;
24393 if (likely(op2 != Py_None)) {
24394 return __Pyx_PyObject_CompareIntFloatBoolGt(op1, op2);
24396 goto __pyx_richcmp;
24398 if ((0))
goto __pyx_richcmp;
24399 if ((0))
goto __pyx_return_true;
24400 if ((0))
goto __pyx_return_false;
24402 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
24410#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
24411static CYTHON_INLINE
int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
24412 PyListObject*
L = (PyListObject*) list;
24413 Py_ssize_t len = Py_SIZE(list);
24414 if (likely(
L->allocated > len) & likely(len > (
L->allocated >> 1))) {
24416 __Pyx__ListComp_AppendAndDecref(list, len, x);
24419 return PyList_Append(list, x);
24424#ifndef __Pyx_DEFINED_PyObject_CompareIntFloatBoolLt
24425#define __Pyx_DEFINED_PyObject_CompareIntFloatBoolLt
24426static int __Pyx_PyObject_CompareIntFloatBoolLt(PyObject *op1, PyObject *op2) {
24427 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24428 #if !CYTHON_ASSUME_SAFE_MACROS
24429 if (unlikely(float_op2 == -1. && PyErr_Occurred()))
return -1;
24431 #if CYTHON_USE_PYLONG_INTERNALS
24432 if (__Pyx_PyLong_IsCompact(op1)) {
24433 Py_ssize_t iop1 = __Pyx_PyLong_CompactValue(op1);
24434 if (((
double)iop1) < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24436 if (unlikely(!isfinite(float_op2))) {
24437 if (0.0 < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24439 int sign1 = __Pyx_PyLong_Sign(op1);
24440 if (float_op2 >= 0.) {
24441 if (sign1 < 0)
goto __pyx_return_true;
24442 if (float_op2 < (
double) (1L << PyLong_SHIFT))
goto __pyx_return_false;
24444 if (sign1 > 0)
goto __pyx_return_false;
24445 if (float_op2 > -(
double) (1L << PyLong_SHIFT))
goto __pyx_return_true;
24449 if (unlikely(!isfinite(float_op2))) {
24450 if (0.0 < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24453 long iop1 = PyLong_AsLongAndOverflow(op1, &overflow1);
24454 if (likely(!overflow1)) {
24455 if ((
long long) iop1 >= (1LL << 53)) {
24457 }
else if ((
long long) iop1 <= - (1LL << 53)) {
24460 if (((
double) iop1) < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24463 if (overflow1 < 0) {
24464 if (float_op2 > ((
double) (1LL << 53)))
goto __pyx_return_true;
24466 if (float_op2 < - ((
double) (1LL << 53)))
goto __pyx_return_false;
24470 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
24477static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolLt_object_float(PyObject *op1, PyObject *op2,
int pyop) {
24478 CYTHON_UNUSED_VAR(pyop);
24479 if (unlikely(op2 == Py_None)) {
24480 goto __pyx_richcmp;
24482 if (likely(PyFloat_CheckExact(op1))) {
24483 if (likely(op2 != Py_None)) {
24484 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
24485 #if !CYTHON_ASSUME_SAFE_MACROS
24486 if (unlikely(float_op1 == -1. && PyErr_Occurred()))
return -1;
24488 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24489 #if !CYTHON_ASSUME_SAFE_MACROS
24490 if (unlikely(float_op2 == -1. && PyErr_Occurred()))
return -1;
24492 if (float_op1 < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
24494 goto __pyx_richcmp;
24496 if (PyLong_CheckExact(op1)) {
24497 if (op1 == op2)
goto __pyx_return_false;
24498 if (likely(op2 != Py_None)) {
24499 return __Pyx_PyObject_CompareIntFloatBoolLt(op1, op2);
24501 goto __pyx_richcmp;
24503 if ((0))
goto __pyx_richcmp;
24504 if ((0))
goto __pyx_return_true;
24505 if ((0))
goto __pyx_return_false;
24507 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
24515#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API)
24516#if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24517#ifndef __Pyx_DEFINED_BinopTypeError
24518#define __Pyx_DEFINED_BinopTypeError
24519static void __Pyx_BinopTypeError(PyObject *op1, PyObject *op2,
const char* op,
int inplace) {
24520 char opname[4] = {op[0], op[1], 0, 0};
24522 opname[op[1] ? 2 : 1] =
'=';
24524 __Pyx_RaiseErrorWithObjectTypes1(
24526 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME
"' and '" __Pyx_FMT_TYPENAME
"'",
24531#ifndef __Pyx_DEFINED_PyNumber_Subtract_xfloat_object
24532#define __Pyx_DEFINED_PyNumber_Subtract_xfloat_object
24533static PyObject* __Pyx_PyNumber_Subtract_xfloat_object(PyObject *op1, PyObject *op2,
int inplace) {
24534 if (PyLong_CheckExact(op2)) {
24536 #if CYTHON_USE_PYLONG_INTERNALS
24537 if (__Pyx_PyLong_IsCompact(op2)) {
24538 Py_ssize_t compact_op2 = __Pyx_PyLong_CompactValue(op2);
24539 if (compact_op2 == 0)
return __Pyx_NewRef(op1);
24540 int_op2 = (double) compact_op2;
24544 int_op2 = PyLong_AsDouble(op2);
24545 if (unlikely((int_op2 == -1.) && PyErr_Occurred()))
return NULL;
24546 #if !CYTHON_USE_PYLONG_INTERNALS
24547 if (int_op2 == 0.)
return __Pyx_NewRef(op1);
24550 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
24551 #if !CYTHON_ASSUME_SAFE_MACROS
24552 if (unlikely((float_op1 == -1.) && PyErr_Occurred()))
return NULL;
24554 return PyFloat_FromDouble(float_op1 - int_op2);
24556 if (PyLong_Check(op2)) {
24557 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyFloat_Type, tp_as_number, nb_subtract, binaryfunc);
24558 if (likely(slot_func)) {
24559 return slot_func(op1, op2);
24562 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24564 PyTypeObject *type_op2 = Py_TYPE(op2);
24565 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_subtract, binaryfunc);
24566 if (likely(slot_func)) {
24567 PyObject *result = slot_func(op1, op2);
24568 if (likely(result != Py_NotImplemented)) {
24573 __Pyx_BinopTypeError(op1, op2,
"-", inplace);
24577 return (inplace) ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2);
24581#ifndef __Pyx_DEFINED_PyNumber_Subtract_xint_object
24582#define __Pyx_DEFINED_PyNumber_Subtract_xint_object
24583static PyObject* __Pyx_PyNumber_Subtract_xint_object(PyObject *op1, PyObject *op2,
int inplace) {
24584 if (PyFloat_CheckExact(op2)) {
24586 #if CYTHON_USE_PYLONG_INTERNALS
24587 if (__Pyx_PyLong_IsCompact(op1)) {
24588 Py_ssize_t compact_op1 = __Pyx_PyLong_CompactValue(op1);
24589 int_op1 = (double) compact_op1;
24593 int_op1 = PyLong_AsDouble(op1);
24594 if (unlikely((int_op1 == -1.) && PyErr_Occurred()))
return NULL;
24596 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24597 #if !CYTHON_ASSUME_SAFE_MACROS
24598 if (unlikely((float_op2 == -1.) && PyErr_Occurred()))
return NULL;
24600 return PyFloat_FromDouble(int_op1 - float_op2);
24602 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24604 PyTypeObject *type_op2 = Py_TYPE(op2);
24605 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_subtract, binaryfunc);
24606 if (likely(slot_func)) {
24607 PyObject *result = slot_func(op1, op2);
24608 if (likely(result != Py_NotImplemented)) {
24613 __Pyx_BinopTypeError(op1, op2,
"-", inplace);
24617 return (inplace) ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2);
24621static CYTHON_INLINE PyObject* __Pyx__PyNumber_Subtract_object_object(PyObject *op1, PyObject *op2,
int inplace) {
24622 if (PyFloat_CheckExact(op1)) {
24623 if (PyFloat_CheckExact(op2)) {
24624 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24625 #if !CYTHON_ASSUME_SAFE_MACROS
24626 if (unlikely((float_op2 == -1.) && PyErr_Occurred()))
return NULL;
24628 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
24629 #if !CYTHON_ASSUME_SAFE_MACROS
24630 if (unlikely((float_op1 == -1.) && PyErr_Occurred()))
return NULL;
24632 return PyFloat_FromDouble(float_op1 - float_op2);
24634 return __Pyx_PyNumber_Subtract_xfloat_object(op1, op2, inplace);
24636 if (PyLong_CheckExact(op1)) {
24637 if (PyLong_CheckExact(op2)) {
24638 #if CYTHON_USE_PYLONG_INTERNALS
24639 if (__Pyx_PyLong_IsCompact(op1)) {
24640 Py_ssize_t int_op1 = __Pyx_PyLong_CompactValue(op1);
24641 if (__Pyx_PyLong_IsCompact(op2)) {
24642 Py_ssize_t int_op2 = __Pyx_PyLong_CompactValue(op2);
24643 if (int_op2 == 0)
return __Pyx_NewRef(op1);
24644 return PyLong_FromSsize_t(int_op1 - int_op2);
24647 else if (__Pyx_PyLong_IsZero(op2))
return __Pyx_NewRef(op1);
24649 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyLong_Type, tp_as_number, nb_subtract, binaryfunc);
24650 if (likely(slot_func)) {
24651 return slot_func(op1, op2);
24654 return __Pyx_PyNumber_Subtract_xint_object(op1, op2, inplace);
24656 return (inplace) ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2);
24661#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API)
24662#if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24663#ifndef __Pyx_DEFINED_BinopTypeError
24664#define __Pyx_DEFINED_BinopTypeError
24665static void __Pyx_BinopTypeError(PyObject *op1, PyObject *op2,
const char* op,
int inplace) {
24666 char opname[4] = {op[0], op[1], 0, 0};
24668 opname[op[1] ? 2 : 1] =
'=';
24670 __Pyx_RaiseErrorWithObjectTypes1(
24672 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME
"' and '" __Pyx_FMT_TYPENAME
"'",
24677#ifndef __Pyx_DEFINED_PyNumber_Multiply_xfloat_object
24678#define __Pyx_DEFINED_PyNumber_Multiply_xfloat_object
24679static PyObject* __Pyx_PyNumber_Multiply_xfloat_object(PyObject *op1, PyObject *op2,
int inplace) {
24680 if (PyLong_CheckExact(op2)) {
24682 #if CYTHON_USE_PYLONG_INTERNALS
24683 if (__Pyx_PyLong_IsCompact(op2)) {
24684 Py_ssize_t compact_op2 = __Pyx_PyLong_CompactValue(op2);
24685 int_op2 = (double) compact_op2;
24689 int_op2 = PyLong_AsDouble(op2);
24690 if (unlikely((int_op2 == -1.) && PyErr_Occurred()))
return NULL;
24692 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
24693 #if !CYTHON_ASSUME_SAFE_MACROS
24694 if (unlikely((float_op1 == -1.) && PyErr_Occurred()))
return NULL;
24696 if (float_op1 == 0.)
return __Pyx_NewRef(op1);
24697 return PyFloat_FromDouble(float_op1 * int_op2);
24699 if (PyLong_Check(op2)) {
24700 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyFloat_Type, tp_as_number, nb_multiply, binaryfunc);
24701 if (likely(slot_func)) {
24702 return slot_func(op1, op2);
24705 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24707 PyTypeObject *type_op2 = Py_TYPE(op2);
24708 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_multiply, binaryfunc);
24709 if (likely(slot_func)) {
24710 PyObject *result = slot_func(op1, op2);
24711 if (likely(result != Py_NotImplemented)) {
24716 __Pyx_BinopTypeError(op1, op2,
"*", inplace);
24720 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
24724static CYTHON_INLINE PyObject* __Pyx__PyNumber_Multiply_float_object(PyObject *op1, PyObject *op2,
int inplace) {
24725 if (likely(op1 != Py_None)) {
24726 if (likely(PyFloat_CheckExact(op2))) {
24727 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24728 #if !CYTHON_ASSUME_SAFE_MACROS
24729 if (unlikely((float_op2 == -1.) && PyErr_Occurred()))
return NULL;
24731 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
24732 #if !CYTHON_ASSUME_SAFE_MACROS
24733 if (unlikely((float_op1 == -1.) && PyErr_Occurred()))
return NULL;
24735 return PyFloat_FromDouble(float_op1 * float_op2);
24737 return __Pyx_PyNumber_Multiply_xfloat_object(op1, op2, inplace);
24739 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
24744#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API)
24745#if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24746#ifndef __Pyx_DEFINED_BinopTypeError
24747#define __Pyx_DEFINED_BinopTypeError
24748static void __Pyx_BinopTypeError(PyObject *op1, PyObject *op2,
const char* op,
int inplace) {
24749 char opname[4] = {op[0], op[1], 0, 0};
24751 opname[op[1] ? 2 : 1] =
'=';
24753 __Pyx_RaiseErrorWithObjectTypes1(
24755 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME
"' and '" __Pyx_FMT_TYPENAME
"'",
24760#ifndef __Pyx_DEFINED_PyNumber_Add_xfloat_object
24761#define __Pyx_DEFINED_PyNumber_Add_xfloat_object
24762static PyObject* __Pyx_PyNumber_Add_xfloat_object(PyObject *op1, PyObject *op2,
int inplace) {
24763 if (PyLong_CheckExact(op2)) {
24765 #if CYTHON_USE_PYLONG_INTERNALS
24766 if (__Pyx_PyLong_IsCompact(op2)) {
24767 Py_ssize_t compact_op2 = __Pyx_PyLong_CompactValue(op2);
24768 if (compact_op2 == 0)
return __Pyx_NewRef(op1);
24769 int_op2 = (double) compact_op2;
24773 int_op2 = PyLong_AsDouble(op2);
24774 if (unlikely((int_op2 == -1.) && PyErr_Occurred()))
return NULL;
24775 #if !CYTHON_USE_PYLONG_INTERNALS
24776 if (int_op2 == 0.)
return __Pyx_NewRef(op1);
24779 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
24780 #if !CYTHON_ASSUME_SAFE_MACROS
24781 if (unlikely((float_op1 == -1.) && PyErr_Occurred()))
return NULL;
24783 return PyFloat_FromDouble(float_op1 + int_op2);
24785 if (PyLong_Check(op2)) {
24786 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyFloat_Type, tp_as_number, nb_add, binaryfunc);
24787 if (likely(slot_func)) {
24788 return slot_func(op1, op2);
24791 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24793 PyTypeObject *type_op2 = Py_TYPE(op2);
24794 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_add, binaryfunc);
24795 if (likely(slot_func)) {
24796 PyObject *result = slot_func(op1, op2);
24797 if (likely(result != Py_NotImplemented)) {
24802 __Pyx_BinopTypeError(op1, op2,
"+", inplace);
24806 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
24810#ifndef __Pyx_DEFINED_PyNumber_Add_xint_object
24811#define __Pyx_DEFINED_PyNumber_Add_xint_object
24812static PyObject* __Pyx_PyNumber_Add_xint_object(PyObject *op1, PyObject *op2,
int inplace) {
24813 if (PyFloat_CheckExact(op2)) {
24815 #if CYTHON_USE_PYLONG_INTERNALS
24816 if (__Pyx_PyLong_IsCompact(op1)) {
24817 Py_ssize_t compact_op1 = __Pyx_PyLong_CompactValue(op1);
24818 if (compact_op1 == 0)
return __Pyx_NewRef(op2);
24819 int_op1 = (double) compact_op1;
24823 int_op1 = PyLong_AsDouble(op1);
24824 if (unlikely((int_op1 == -1.) && PyErr_Occurred()))
return NULL;
24825 #if !CYTHON_USE_PYLONG_INTERNALS
24826 if (int_op1 == 0.)
return __Pyx_NewRef(op2);
24829 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24830 #if !CYTHON_ASSUME_SAFE_MACROS
24831 if (unlikely((float_op2 == -1.) && PyErr_Occurred()))
return NULL;
24833 return PyFloat_FromDouble(int_op1 + float_op2);
24835 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
24837 PyTypeObject *type_op2 = Py_TYPE(op2);
24838 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_add, binaryfunc);
24839 if (likely(slot_func)) {
24840 PyObject *result = slot_func(op1, op2);
24841 if (likely(result != Py_NotImplemented)) {
24846 __Pyx_BinopTypeError(op1, op2,
"+", inplace);
24850 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
24854static CYTHON_INLINE PyObject* __Pyx__PyNumber_Add_object_object(PyObject *op1, PyObject *op2,
int inplace) {
24855 if (PyFloat_CheckExact(op1)) {
24856 if (PyFloat_CheckExact(op2)) {
24857 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
24858 #if !CYTHON_ASSUME_SAFE_MACROS
24859 if (unlikely((float_op2 == -1.) && PyErr_Occurred()))
return NULL;
24861 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
24862 #if !CYTHON_ASSUME_SAFE_MACROS
24863 if (unlikely((float_op1 == -1.) && PyErr_Occurred()))
return NULL;
24865 return PyFloat_FromDouble(float_op1 + float_op2);
24867 return __Pyx_PyNumber_Add_xfloat_object(op1, op2, inplace);
24869 if (PyLong_CheckExact(op1)) {
24870 if (PyLong_CheckExact(op2)) {
24871 #if CYTHON_USE_PYLONG_INTERNALS
24872 if (__Pyx_PyLong_IsCompact(op1)) {
24873 Py_ssize_t int_op1 = __Pyx_PyLong_CompactValue(op1);
24874 if (int_op1 == 0)
return __Pyx_NewRef(op2);
24875 if (__Pyx_PyLong_IsCompact(op2)) {
24876 Py_ssize_t int_op2 = __Pyx_PyLong_CompactValue(op2);
24877 if (int_op2 == 0)
return __Pyx_NewRef(op1);
24878 return PyLong_FromSsize_t(int_op1 + int_op2);
24881 else if (__Pyx_PyLong_IsZero(op2))
return __Pyx_NewRef(op1);
24883 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(&PyLong_Type, tp_as_number, nb_add, binaryfunc);
24884 if (likely(slot_func)) {
24885 return slot_func(op1, op2);
24888 return __Pyx_PyNumber_Add_xint_object(op1, op2, inplace);
24890 return (inplace) ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2);
24895static void __Pyx_RaiseBufferFallbackError(
void) {
24896 PyErr_SetString(PyExc_ValueError,
24897 "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
24901static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *
v) {
24903 if (unlikely(!j))
return -1;
24904 r = PyObject_SetItem(o, j,
v);
24908#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
24909static CYTHON_INLINE
int __Pyx_SetItemInt_Fast_mapping(PyObject *o, objobjargproc setitem, Py_ssize_t i, PyObject *value) {
24910 PyObject *key = PyLong_FromSsize_t(i);
24911 if (unlikely(!key))
return -1;
24912 int r = setitem(o, key, value);
24917static CYTHON_INLINE
int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *
v,
24918 int wraparound,
int boundscheck,
int unsafe_shared) {
24919 CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
24920#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS
24921 if (PyList_CheckExact(o)) {
24922 Py_ssize_t
n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
24923 if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) {
24925 return PyList_SetItem(o,
n,
v);
24926 }
else if ((!boundscheck) || likely(__Pyx_is_valid_index(
n, PyList_GET_SIZE(o)))) {
24929 old = PyList_GET_ITEM(o,
n);
24930 PyList_SET_ITEM(o,
n,
v);
24936#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
24937 if (PyDict_CheckExact(o)) {
24938 return __Pyx_SetItemInt_Fast_mapping(o, PyDict_Type.tp_as_mapping->mp_ass_subscript, i,
v);
24941 PyTypeObject *obj_type = Py_TYPE(o);
24942 int seq_or_mapping = __Pyx_PyType_GetFlags(obj_type) & (Py_TPFLAGS_SEQUENCE|Py_TPFLAGS_MAPPING);
24943 if (seq_or_mapping != Py_TPFLAGS_SEQUENCE) {
24944 PyMappingMethods *mm = obj_type->tp_as_mapping;
24945 if (mm && mm->mp_ass_subscript)
24946 return __Pyx_SetItemInt_Fast_mapping(o, mm->mp_ass_subscript, i,
v);
24948 PySequenceMethods *sm = obj_type->tp_as_sequence;
24949 if (likely(sm && sm->sq_ass_item)) {
24950 if (wraparound && (i < 0) && unlikely(__Pyx_GetItemInt_wraparound(o, sm, &i) == -1))
24952 return sm->sq_ass_item(o, i,
v);
24954 if (seq_or_mapping == Py_TPFLAGS_SEQUENCE) {
24955 PyMappingMethods *mm = obj_type->tp_as_mapping;
24956 if (likely(mm && mm->mp_ass_subscript))
24957 return __Pyx_SetItemInt_Fast_mapping(o, mm->mp_ass_subscript, i,
v);
24961 if (!PyMapping_Check(o)) {
24962 return PySequence_SetItem(o, i,
v);
24967 return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i),
v);
24971#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
24972#define __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
24973static CYTHON_INLINE
int __Pyx_PyObject_CompareStrStrBoolEq(PyObject* s1, PyObject* s2) {
24974 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
24975 int result = PyUnicode_Equal(s1, s2);
24976 #if !CYTHON_COMPILING_IN_CPYTHON
24977 if (unlikely(result == -1))
return -1;
24979 if (result == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
24981 int result = PyUnicode_Compare(s1, s2);
24982 if (unlikely((result == -1) && PyErr_Occurred()))
return -1;
24983 if (result == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
24991static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolEq_object_str(PyObject *op1, PyObject *op2,
int pyop) {
24992 CYTHON_UNUSED_VAR(pyop);
24993 if (unlikely(op2 == Py_None)) {
24994 if (op1 == Py_None)
goto __pyx_return_true;
else goto __pyx_richcmp;
24996 if (PyFloat_CheckExact(op1)) {
24997 goto __pyx_richcmp;
24999 if (PyLong_CheckExact(op1)) {
25000 if (op1 == op2)
goto __pyx_return_true;
25001 goto __pyx_richcmp;
25004 if (likely(PyUnicode_CheckExact(op1))) {
25005 if (op1 == op2)
goto __pyx_return_true;
25006 if (likely(op2 != Py_None)) {
25007 return __Pyx_PyObject_CompareStrStrBoolEq(op1, op2);
25009 goto __pyx_richcmp;
25012 if ((0))
goto __pyx_richcmp;
25013 if ((0))
goto __pyx_return_true;
25014 if ((0))
goto __pyx_return_false;
25016 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
25024#if !CYTHON_VECTORCALL
25025static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *
const *args,
size_t nargsf, PyObject *kwnames) {
25027 PyObject *obj = PyObject_GetAttr(args[0], name);
25028 if (unlikely(!obj))
25030 result = __Pyx_Object_VectorcallKwds(obj, args+1, nargsf-1, kwnames);
25037static void __Pyx_RaiseErrorWithType1(PyObject* exc_type,
const char* message,
const char *arg, PyTypeObject *type_obj) {
25038 __Pyx_TypeName type_name = __Pyx_PyType_GetFullyQualifiedName(type_obj);
25039 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
25040 if (unlikely(!type_name))
return;
25042 PyErr_Format(exc_type, message, arg, type_name);
25043 __Pyx_DECREF_TypeName(type_name);
25047static int __Pyx_RaiseUnexpectedTypeError(
const char *expected, PyObject *obj) {
25048 __Pyx_RaiseTypeErrorWithObjectType1(
25049 "Expected %.42s, got " __Pyx_FMT_TYPENAME,
25055#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL || CYTHON_COMPILING_IN_LIMITED_API)
25056#if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
25057#ifndef __Pyx_DEFINED_BinopTypeError
25058#define __Pyx_DEFINED_BinopTypeError
25059static void __Pyx_BinopTypeError(PyObject *op1, PyObject *op2,
const char* op,
int inplace) {
25060 char opname[4] = {op[0], op[1], 0, 0};
25062 opname[op[1] ? 2 : 1] =
'=';
25064 __Pyx_RaiseErrorWithObjectTypes1(
25066 "unsupported operand type(s) for %.3s: '" __Pyx_FMT_TYPENAME
"' and '" __Pyx_FMT_TYPENAME
"'",
25071#ifndef __Pyx_DEFINED_PyNumber_Multiply_xfloat_float
25072#define __Pyx_DEFINED_PyNumber_Multiply_xfloat_float
25073static PyObject* __Pyx_PyNumber_Multiply_xfloat_float(PyObject *op1, PyObject *op2,
int inplace) {
25074 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
25076 PyTypeObject *type_op2 = Py_TYPE(op2);
25077 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_multiply, binaryfunc);
25078 if (likely(slot_func)) {
25079 PyObject *result = slot_func(op1, op2);
25080 if (likely(result != Py_NotImplemented)) {
25085 __Pyx_BinopTypeError(op1, op2,
"*", inplace);
25089 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
25093#ifndef __Pyx_DEFINED_PyNumber_Multiply_xint_float
25094#define __Pyx_DEFINED_PyNumber_Multiply_xint_float
25095static PyObject* __Pyx_PyNumber_Multiply_xint_float(PyObject *op1, PyObject *op2,
int inplace) {
25096 if (likely(op2 != Py_None)) {
25098 #if CYTHON_USE_PYLONG_INTERNALS
25099 if (__Pyx_PyLong_IsCompact(op1)) {
25100 Py_ssize_t compact_op1 = __Pyx_PyLong_CompactValue(op1);
25101 int_op1 = (double) compact_op1;
25105 int_op1 = PyLong_AsDouble(op1);
25106 if (unlikely((int_op1 == -1.) && PyErr_Occurred()))
return NULL;
25108 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
25109 #if !CYTHON_ASSUME_SAFE_MACROS
25110 if (unlikely((float_op2 == -1.) && PyErr_Occurred()))
return NULL;
25112 return PyFloat_FromDouble(int_op1 * float_op2);
25114 #if CYTHON_USE_TYPE_SLOTS || __PYX_LIMITED_VERSION_HEX >= 0x030A0000
25116 PyTypeObject *type_op2 = Py_TYPE(op2);
25117 binaryfunc slot_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_number, nb_multiply, binaryfunc);
25118 if (likely(slot_func)) {
25119 PyObject *result = slot_func(op1, op2);
25120 if (likely(result != Py_NotImplemented)) {
25125 ssizeargfunc repeat_func = __Pyx_PyType_GetSubSlot(type_op2, tp_as_sequence, sq_repeat, ssizeargfunc);
25126 if (likely(repeat_func)) {
25128 #if CYTHON_USE_PYLONG_INTERNALS
25129 if (__Pyx_PyLong_IsCompact(op1)) {
25130 count = __Pyx_PyLong_CompactValue(op1);
25134 count = PyLong_AsSsize_t(op1);
25135 if (unlikely((count == -1) && PyErr_Occurred()))
return NULL;
25137 return repeat_func(op2, count);
25139 __Pyx_BinopTypeError(op1, op2,
"*", inplace);
25143 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
25147static CYTHON_INLINE PyObject* __Pyx__PyNumber_Multiply_object_float(PyObject *op1, PyObject *op2,
int inplace) {
25148 if (likely(PyFloat_CheckExact(op1))) {
25149 if (likely(op2 != Py_None)) {
25150 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
25151 #if !CYTHON_ASSUME_SAFE_MACROS
25152 if (unlikely((float_op2 == -1.) && PyErr_Occurred()))
return NULL;
25154 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
25155 #if !CYTHON_ASSUME_SAFE_MACROS
25156 if (unlikely((float_op1 == -1.) && PyErr_Occurred()))
return NULL;
25158 return PyFloat_FromDouble(float_op1 * float_op2);
25160 return __Pyx_PyNumber_Multiply_xfloat_float(op1, op2, inplace);
25162 if (PyLong_CheckExact(op1)) {
25163 return __Pyx_PyNumber_Multiply_xint_float(op1, op2, inplace);
25165 return (inplace) ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2);
25170#ifndef __Pyx_DEFINED_PyObject_CompareFloatIntBoolGt
25171#define __Pyx_DEFINED_PyObject_CompareFloatIntBoolGt
25172static int __Pyx_PyObject_CompareFloatIntBoolGt(PyObject *op1, PyObject *op2) {
25173 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
25174 #if !CYTHON_ASSUME_SAFE_MACROS
25175 if (unlikely(float_op1 == -1. && PyErr_Occurred()))
return -1;
25177 #if CYTHON_USE_PYLONG_INTERNALS
25178 if (__Pyx_PyLong_IsCompact(op2)) {
25179 Py_ssize_t iop2 = __Pyx_PyLong_CompactValue(op2);
25180 if (float_op1 > ((
double)iop2))
goto __pyx_return_true;
else goto __pyx_return_false;
25182 if (unlikely(!isfinite(float_op1))) {
25183 if (float_op1 > 0.0)
goto __pyx_return_true;
else goto __pyx_return_false;
25185 int sign2 = __Pyx_PyLong_Sign(op2);
25186 if (float_op1 >= 0.) {
25187 if (sign2 < 0)
goto __pyx_return_true;
25188 if (float_op1 < (
double) (1L << PyLong_SHIFT))
goto __pyx_return_false;
25190 if (sign2 > 0)
goto __pyx_return_false;
25191 if (float_op1 > -(
double) (1L << PyLong_SHIFT))
goto __pyx_return_true;
25195 if (unlikely(!isfinite(float_op1))) {
25196 if (float_op1 > 0.0)
goto __pyx_return_true;
else goto __pyx_return_false;
25199 long iop2 = PyLong_AsLongAndOverflow(op2, &overflow2);
25200 if (likely(!overflow2)) {
25201 if ((
long long) iop2 >= (1LL << 53)) {
25203 }
else if ((
long long) iop2 <= - (1LL << 53)) {
25206 if (float_op1 > ((
double) iop2))
goto __pyx_return_true;
else goto __pyx_return_false;
25209 if (overflow2 > 0) {
25210 if (float_op1 < ((
double) (1LL << 53)))
goto __pyx_return_false;
25212 if (float_op1 > - ((
double) (1LL << 53)))
goto __pyx_return_true;
25216 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
25223#ifndef __Pyx_DEFINED_PyObject_CompareIntIntBoolGt
25224#define __Pyx_DEFINED_PyObject_CompareIntIntBoolGt
25225static int __Pyx_PyObject_CompareIntIntBoolGt(PyObject *op1, PyObject *op2) {
25226#if CYTHON_USE_PYLONG_INTERNALS
25227 Py_ssize_t cmp = __Pyx_PyLong_CompareSignAndSize(op1, op2);
25229 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
25231 const digit* digits1 = __Pyx_PyLong_Digits(op1);
25232 const digit* digits2 = __Pyx_PyLong_Digits(op2);
25234 cmp = (Py_ssize_t) digits1[0] - (Py_ssize_t) digits2[0];
25235 }
else if ((size == 2) && (8 *
sizeof(Py_ssize_t) >= 2 * PyLong_SHIFT)) {
25236 cmp = (Py_ssize_t) (((((
size_t)digits1[1]) << PyLong_SHIFT) | (
size_t)digits1[0])) - (Py_ssize_t) (((((
size_t)digits2[1]) << PyLong_SHIFT) | (
size_t)digits2[0]));
25238 for (Py_ssize_t i=size-1; i >= 0 && !cmp; --i) {
25239 cmp = (Py_ssize_t) digits1[i] - (Py_ssize_t) digits2[i];
25243 if (cmp == 0)
goto __pyx_return_false;
25244 if (__Pyx_PyLong_IsNeg(op1)) cmp = -cmp;
25246 if (cmp < 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25248 int overflow1, overflow2;
25249 long long iop1 = PyLong_AsLongLongAndOverflow(op1, &overflow1);
25250 long long iop2 = PyLong_AsLongLongAndOverflow(op2, &overflow2);
25251 if (likely(!(overflow1 | overflow2))) {
25252 if (iop1 > iop2)
goto __pyx_return_true;
else goto __pyx_return_false;
25253 }
else if (overflow1 != overflow2) {
25254 if (overflow1 > overflow2)
goto __pyx_return_true;
else goto __pyx_return_false;
25256 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
25265static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolGt_object_int(PyObject *op1, PyObject *op2,
int pyop) {
25266 CYTHON_UNUSED_VAR(pyop);
25267 if (unlikely(op2 == Py_None)) {
25268 goto __pyx_richcmp;
25270 if (op1 == op2)
goto __pyx_return_false;
25271 if (PyFloat_CheckExact(op1)) {
25272 if (likely(op2 != Py_None)) {
25273 return __Pyx_PyObject_CompareFloatIntBoolGt(op1, op2);
25275 goto __pyx_richcmp;
25277 if (likely(PyLong_CheckExact(op1))) {
25278 if (op1 == op2)
goto __pyx_return_false;
25279 if (likely(op2 != Py_None)) {
25280 return __Pyx_PyObject_CompareIntIntBoolGt(op1, op2);
25282 goto __pyx_richcmp;
25284 if ((0))
goto __pyx_richcmp;
25285 if ((0))
goto __pyx_return_true;
25286 if ((0))
goto __pyx_return_false;
25288 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
25296#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolGt
25297#define __Pyx_DEFINED_PyObject_CompareStrStrBoolGt
25298static CYTHON_INLINE
int __Pyx_PyObject_CompareStrStrBoolGt(PyObject* s1, PyObject* s2) {
25299 int result = PyUnicode_Compare(s1, s2);
25300 if (unlikely((result == -1) && PyErr_Occurred()))
return -1;
25301 if (result > 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25308#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25309#ifndef __Pyx_DEFINED_PyObject_ComparePyBytesPyBytesBoolGt
25310#define __Pyx_DEFINED_PyObject_ComparePyBytesPyBytesBoolGt
25311static CYTHON_INLINE
int __Pyx_PyObject_ComparePyBytesPyBytesBoolGt(PyObject* s1, PyObject* s2) {
25313 Py_ssize_t length1, length2, short_length;
25314 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
25315 const char *ps1, *ps2;
25316 length1 = __Pyx_PyBytes_GET_SIZE(s1);
25317 length2 = __Pyx_PyBytes_GET_SIZE(s2);
25318 short_length = (length1 < length2) ? length1 : length2;
25319 if (short_length == 0) {
25320 if (length1 == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25322 ps1 = PyBytes_AS_STRING(s1);
25323 ps2 = PyBytes_AS_STRING(s2);
25326 if (unlikely(PyBytes_AsStringAndSize(s1, &ps1, &length1) == -1))
return -1;
25327 if (unlikely(PyBytes_AsStringAndSize(s2, &ps2, &length2) == -1))
return -1;
25328 short_length = (length1 < length2) ? length1 : length2;
25329 if (short_length == 0) {
25330 if (length1 == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25333 cmp = (Py_ssize_t) ((
const unsigned char*) ps1)[0] - (Py_ssize_t) ((
const unsigned char*) ps2)[0];
25334 if (cmp == 0 && short_length > 1) {
25335 cmp = memcmp(ps1, ps2, (
size_t)short_length);
25337 if (cmp == 0) cmp = (length1 - length2);
25338 if (cmp > 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25346#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25347#ifndef __Pyx_DEFINED_PyObject_ComparePyBytesPyByteArrayBoolGt
25348#define __Pyx_DEFINED_PyObject_ComparePyBytesPyByteArrayBoolGt
25349static CYTHON_INLINE
int __Pyx_PyObject_ComparePyBytesPyByteArrayBoolGt(PyObject* s1, PyObject* s2) {
25351 Py_ssize_t length1, length2, short_length;
25352 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
25353 const char *ps1, *ps2;
25354 length1 = __Pyx_PyBytes_GET_SIZE(s1);
25355 length2 = __Pyx_PyByteArray_GET_SIZE(s2);
25356 short_length = (length1 < length2) ? length1 : length2;
25357 if (short_length == 0) {
25358 if (length1 == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25360 ps1 = PyBytes_AS_STRING(s1);
25361 ps2 = PyByteArray_AS_STRING(s2);
25364 if (unlikely(PyBytes_AsStringAndSize(s1, &ps1, &length1) == -1))
return -1;
25365 ps2 = __Pyx_PyByteArray_AsString(s2);
if (unlikely(!ps2))
return -1;
25366 length2 = __Pyx_PyByteArray_GET_SIZE(s2);
if (unlikely(length2 == -1))
return -1;
25367 short_length = (length1 < length2) ? length1 : length2;
25368 if (short_length == 0) {
25369 if (length1 == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25372 cmp = (Py_ssize_t) ((
const unsigned char*) ps1)[0] - (Py_ssize_t) ((
const unsigned char*) ps2)[0];
25373 if (cmp == 0 && short_length > 1) {
25374 cmp = memcmp(ps1, ps2, (
size_t)short_length);
25376 if (cmp == 0) cmp = (length1 - length2);
25377 if (cmp > 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25385#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25386#ifndef __Pyx_DEFINED_PyObject_ComparePyByteArrayPyBytesBoolGt
25387#define __Pyx_DEFINED_PyObject_ComparePyByteArrayPyBytesBoolGt
25388static CYTHON_INLINE
int __Pyx_PyObject_ComparePyByteArrayPyBytesBoolGt(PyObject* s1, PyObject* s2) {
25390 Py_ssize_t length1, length2, short_length;
25391 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
25392 const char *ps1, *ps2;
25393 length1 = __Pyx_PyByteArray_GET_SIZE(s1);
25394 length2 = __Pyx_PyBytes_GET_SIZE(s2);
25395 short_length = (length1 < length2) ? length1 : length2;
25396 if (short_length == 0) {
25397 if (length1 == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25399 ps1 = PyByteArray_AS_STRING(s1);
25400 ps2 = PyBytes_AS_STRING(s2);
25403 ps1 = __Pyx_PyByteArray_AsString(s1);
if (unlikely(!ps1))
return -1;
25404 length1 = __Pyx_PyByteArray_GET_SIZE(s1);
if (unlikely(length1 == -1))
return -1;
25405 if (unlikely(PyBytes_AsStringAndSize(s2, &ps2, &length2) == -1))
return -1;
25406 short_length = (length1 < length2) ? length1 : length2;
25407 if (short_length == 0) {
25408 if (length1 == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25411 cmp = (Py_ssize_t) ((
const unsigned char*) ps1)[0] - (Py_ssize_t) ((
const unsigned char*) ps2)[0];
25412 if (cmp == 0 && short_length > 1) {
25413 cmp = memcmp(ps1, ps2, (
size_t)short_length);
25415 if (cmp == 0) cmp = (length1 - length2);
25416 if (cmp > 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25424#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25425#ifndef __Pyx_DEFINED_PyObject_ComparePyByteArrayPyByteArrayBoolGt
25426#define __Pyx_DEFINED_PyObject_ComparePyByteArrayPyByteArrayBoolGt
25427static CYTHON_INLINE
int __Pyx_PyObject_ComparePyByteArrayPyByteArrayBoolGt(PyObject* s1, PyObject* s2) {
25429 Py_ssize_t length1, length2, short_length;
25430 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
25431 const char *ps1, *ps2;
25432 length1 = __Pyx_PyByteArray_GET_SIZE(s1);
25433 length2 = __Pyx_PyByteArray_GET_SIZE(s2);
25434 short_length = (length1 < length2) ? length1 : length2;
25435 if (short_length == 0) {
25436 if (length1 == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25438 ps1 = PyByteArray_AS_STRING(s1);
25439 ps2 = PyByteArray_AS_STRING(s2);
25442 ps1 = __Pyx_PyByteArray_AsString(s1);
if (unlikely(!ps1))
return -1;
25443 length1 = __Pyx_PyByteArray_GET_SIZE(s1);
if (unlikely(length1 == -1))
return -1;
25444 ps2 = __Pyx_PyByteArray_AsString(s2);
if (unlikely(!ps2))
return -1;
25445 length2 = __Pyx_PyByteArray_GET_SIZE(s2);
if (unlikely(length2 == -1))
return -1;
25446 short_length = (length1 < length2) ? length1 : length2;
25447 if (short_length == 0) {
25448 if (length1 == 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25451 cmp = (Py_ssize_t) ((
const unsigned char*) ps1)[0] - (Py_ssize_t) ((
const unsigned char*) ps2)[0];
25452 if (cmp == 0 && short_length > 1) {
25453 cmp = memcmp(ps1, ps2, (
size_t)short_length);
25455 if (cmp == 0) cmp = (length1 - length2);
25456 if (cmp > 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25464#ifndef __Pyx_DEFINED_PyObject_CompareFloatIntBoolGt
25465#define __Pyx_DEFINED_PyObject_CompareFloatIntBoolGt
25466static int __Pyx_PyObject_CompareFloatIntBoolGt(PyObject *op1, PyObject *op2) {
25467 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
25468 #if !CYTHON_ASSUME_SAFE_MACROS
25469 if (unlikely(float_op1 == -1. && PyErr_Occurred()))
return -1;
25471 #if CYTHON_USE_PYLONG_INTERNALS
25472 if (__Pyx_PyLong_IsCompact(op2)) {
25473 Py_ssize_t iop2 = __Pyx_PyLong_CompactValue(op2);
25474 if (float_op1 > ((
double)iop2))
goto __pyx_return_true;
else goto __pyx_return_false;
25476 if (unlikely(!isfinite(float_op1))) {
25477 if (float_op1 > 0.0)
goto __pyx_return_true;
else goto __pyx_return_false;
25479 int sign2 = __Pyx_PyLong_Sign(op2);
25480 if (float_op1 >= 0.) {
25481 if (sign2 < 0)
goto __pyx_return_true;
25482 if (float_op1 < (
double) (1L << PyLong_SHIFT))
goto __pyx_return_false;
25484 if (sign2 > 0)
goto __pyx_return_false;
25485 if (float_op1 > -(
double) (1L << PyLong_SHIFT))
goto __pyx_return_true;
25489 if (unlikely(!isfinite(float_op1))) {
25490 if (float_op1 > 0.0)
goto __pyx_return_true;
else goto __pyx_return_false;
25493 long iop2 = PyLong_AsLongAndOverflow(op2, &overflow2);
25494 if (likely(!overflow2)) {
25495 if ((
long long) iop2 >= (1LL << 53)) {
25497 }
else if ((
long long) iop2 <= - (1LL << 53)) {
25500 if (float_op1 > ((
double) iop2))
goto __pyx_return_true;
else goto __pyx_return_false;
25503 if (overflow2 > 0) {
25504 if (float_op1 < ((
double) (1LL << 53)))
goto __pyx_return_false;
25506 if (float_op1 > - ((
double) (1LL << 53)))
goto __pyx_return_true;
25510 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
25517#ifndef __Pyx_DEFINED_PyObject_CompareIntFloatBoolGt
25518#define __Pyx_DEFINED_PyObject_CompareIntFloatBoolGt
25519static int __Pyx_PyObject_CompareIntFloatBoolGt(PyObject *op1, PyObject *op2) {
25520 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
25521 #if !CYTHON_ASSUME_SAFE_MACROS
25522 if (unlikely(float_op2 == -1. && PyErr_Occurred()))
return -1;
25524 #if CYTHON_USE_PYLONG_INTERNALS
25525 if (__Pyx_PyLong_IsCompact(op1)) {
25526 Py_ssize_t iop1 = __Pyx_PyLong_CompactValue(op1);
25527 if (((
double)iop1) > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25529 if (unlikely(!isfinite(float_op2))) {
25530 if (0.0 > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25532 int sign1 = __Pyx_PyLong_Sign(op1);
25533 if (float_op2 >= 0.) {
25534 if (sign1 < 0)
goto __pyx_return_false;
25535 if (float_op2 < (
double) (1L << PyLong_SHIFT))
goto __pyx_return_true;
25537 if (sign1 > 0)
goto __pyx_return_true;
25538 if (float_op2 > -(
double) (1L << PyLong_SHIFT))
goto __pyx_return_false;
25542 if (unlikely(!isfinite(float_op2))) {
25543 if (0.0 > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25546 long iop1 = PyLong_AsLongAndOverflow(op1, &overflow1);
25547 if (likely(!overflow1)) {
25548 if ((
long long) iop1 >= (1LL << 53)) {
25550 }
else if ((
long long) iop1 <= - (1LL << 53)) {
25553 if (((
double) iop1) > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25556 if (overflow1 < 0) {
25557 if (float_op2 > ((
double) (1LL << 53)))
goto __pyx_return_false;
25559 if (float_op2 < - ((
double) (1LL << 53)))
goto __pyx_return_true;
25563 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
25570#ifndef __Pyx_DEFINED_PyObject_CompareIntIntBoolGt
25571#define __Pyx_DEFINED_PyObject_CompareIntIntBoolGt
25572static int __Pyx_PyObject_CompareIntIntBoolGt(PyObject *op1, PyObject *op2) {
25573#if CYTHON_USE_PYLONG_INTERNALS
25574 Py_ssize_t cmp = __Pyx_PyLong_CompareSignAndSize(op1, op2);
25576 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
25578 const digit* digits1 = __Pyx_PyLong_Digits(op1);
25579 const digit* digits2 = __Pyx_PyLong_Digits(op2);
25581 cmp = (Py_ssize_t) digits1[0] - (Py_ssize_t) digits2[0];
25582 }
else if ((size == 2) && (8 *
sizeof(Py_ssize_t) >= 2 * PyLong_SHIFT)) {
25583 cmp = (Py_ssize_t) (((((
size_t)digits1[1]) << PyLong_SHIFT) | (
size_t)digits1[0])) - (Py_ssize_t) (((((
size_t)digits2[1]) << PyLong_SHIFT) | (
size_t)digits2[0]));
25585 for (Py_ssize_t i=size-1; i >= 0 && !cmp; --i) {
25586 cmp = (Py_ssize_t) digits1[i] - (Py_ssize_t) digits2[i];
25590 if (cmp == 0)
goto __pyx_return_false;
25591 if (__Pyx_PyLong_IsNeg(op1)) cmp = -cmp;
25593 if (cmp < 0)
goto __pyx_return_false;
else goto __pyx_return_true;
25595 int overflow1, overflow2;
25596 long long iop1 = PyLong_AsLongLongAndOverflow(op1, &overflow1);
25597 long long iop2 = PyLong_AsLongLongAndOverflow(op2, &overflow2);
25598 if (likely(!(overflow1 | overflow2))) {
25599 if (iop1 > iop2)
goto __pyx_return_true;
else goto __pyx_return_false;
25600 }
else if (overflow1 != overflow2) {
25601 if (overflow1 > overflow2)
goto __pyx_return_true;
else goto __pyx_return_false;
25603 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
25612static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolGt_object_object(PyObject *op1, PyObject *op2,
int pyop) {
25613 CYTHON_UNUSED_VAR(pyop);
25614 if (PyFloat_CheckExact(op1)) {
25615 if (PyFloat_CheckExact(op2)) {
25616 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
25617 #if !CYTHON_ASSUME_SAFE_MACROS
25618 if (unlikely(float_op1 == -1. && PyErr_Occurred()))
return -1;
25620 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
25621 #if !CYTHON_ASSUME_SAFE_MACROS
25622 if (unlikely(float_op2 == -1. && PyErr_Occurred()))
return -1;
25624 if (float_op1 > float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25626 if (PyLong_CheckExact(op2)) {
25627 return __Pyx_PyObject_CompareFloatIntBoolGt(op1, op2);
25629 goto __pyx_richcmp;
25631 if (PyLong_CheckExact(op1)) {
25632 if (op1 == op2)
goto __pyx_return_false;
25633 if (PyLong_CheckExact(op2)) {
25634 return __Pyx_PyObject_CompareIntIntBoolGt(op1, op2);
25636 if (PyFloat_CheckExact(op2)) {
25637 return __Pyx_PyObject_CompareIntFloatBoolGt(op1, op2);
25639 goto __pyx_richcmp;
25642 if (PyUnicode_CheckExact(op1)) {
25643 if (op1 == op2)
goto __pyx_return_false;
25644 if (PyUnicode_CheckExact(op2)) {
25645 return __Pyx_PyObject_CompareStrStrBoolGt(op1, op2);
25647 goto __pyx_richcmp;
25650 #if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25651 if (PyBytes_CheckExact(op1)) {
25652 if (op1 == op2)
goto __pyx_return_false;
25653 if (PyBytes_CheckExact(op2)) {
25654 return __Pyx_PyObject_ComparePyBytesPyBytesBoolGt(op1, op2);
25656 if (PyByteArray_CheckExact(op2)) {
25657 return __Pyx_PyObject_ComparePyBytesPyByteArrayBoolGt(op1, op2);
25659 goto __pyx_richcmp;
25662 #if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25663 if (PyByteArray_CheckExact(op1)) {
25664 if (op1 == op2)
goto __pyx_return_false;
25665 if (PyByteArray_CheckExact(op2)) {
25666 return __Pyx_PyObject_ComparePyByteArrayPyByteArrayBoolGt(op1, op2);
25668 if (PyBytes_CheckExact(op2)) {
25669 return __Pyx_PyObject_ComparePyByteArrayPyBytesBoolGt(op1, op2);
25671 goto __pyx_richcmp;
25674 if ((0))
goto __pyx_richcmp;
25675 if ((0))
goto __pyx_return_true;
25676 if ((0))
goto __pyx_return_false;
25678 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_GT);
25686#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolLt
25687#define __Pyx_DEFINED_PyObject_CompareStrStrBoolLt
25688static CYTHON_INLINE
int __Pyx_PyObject_CompareStrStrBoolLt(PyObject* s1, PyObject* s2) {
25689 int result = PyUnicode_Compare(s1, s2);
25690 if (unlikely((result == -1) && PyErr_Occurred()))
return -1;
25691 if (result < 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25698#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25699#ifndef __Pyx_DEFINED_PyObject_ComparePyBytesPyBytesBoolLt
25700#define __Pyx_DEFINED_PyObject_ComparePyBytesPyBytesBoolLt
25701static CYTHON_INLINE
int __Pyx_PyObject_ComparePyBytesPyBytesBoolLt(PyObject* s1, PyObject* s2) {
25703 Py_ssize_t length1, length2, short_length;
25704 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
25705 const char *ps1, *ps2;
25706 length1 = __Pyx_PyBytes_GET_SIZE(s1);
25707 length2 = __Pyx_PyBytes_GET_SIZE(s2);
25708 short_length = (length1 < length2) ? length1 : length2;
25709 if (short_length == 0) {
25710 if (length1 == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25712 ps1 = PyBytes_AS_STRING(s1);
25713 ps2 = PyBytes_AS_STRING(s2);
25716 if (unlikely(PyBytes_AsStringAndSize(s1, &ps1, &length1) == -1))
return -1;
25717 if (unlikely(PyBytes_AsStringAndSize(s2, &ps2, &length2) == -1))
return -1;
25718 short_length = (length1 < length2) ? length1 : length2;
25719 if (short_length == 0) {
25720 if (length1 == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25723 cmp = (Py_ssize_t) ((
const unsigned char*) ps1)[0] - (Py_ssize_t) ((
const unsigned char*) ps2)[0];
25724 if (cmp == 0 && short_length > 1) {
25725 cmp = memcmp(ps1, ps2, (
size_t)short_length);
25727 if (cmp == 0) cmp = (length1 - length2);
25728 if (cmp < 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25736#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25737#ifndef __Pyx_DEFINED_PyObject_ComparePyBytesPyByteArrayBoolLt
25738#define __Pyx_DEFINED_PyObject_ComparePyBytesPyByteArrayBoolLt
25739static CYTHON_INLINE
int __Pyx_PyObject_ComparePyBytesPyByteArrayBoolLt(PyObject* s1, PyObject* s2) {
25741 Py_ssize_t length1, length2, short_length;
25742 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
25743 const char *ps1, *ps2;
25744 length1 = __Pyx_PyBytes_GET_SIZE(s1);
25745 length2 = __Pyx_PyByteArray_GET_SIZE(s2);
25746 short_length = (length1 < length2) ? length1 : length2;
25747 if (short_length == 0) {
25748 if (length1 == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25750 ps1 = PyBytes_AS_STRING(s1);
25751 ps2 = PyByteArray_AS_STRING(s2);
25754 if (unlikely(PyBytes_AsStringAndSize(s1, &ps1, &length1) == -1))
return -1;
25755 ps2 = __Pyx_PyByteArray_AsString(s2);
if (unlikely(!ps2))
return -1;
25756 length2 = __Pyx_PyByteArray_GET_SIZE(s2);
if (unlikely(length2 == -1))
return -1;
25757 short_length = (length1 < length2) ? length1 : length2;
25758 if (short_length == 0) {
25759 if (length1 == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25762 cmp = (Py_ssize_t) ((
const unsigned char*) ps1)[0] - (Py_ssize_t) ((
const unsigned char*) ps2)[0];
25763 if (cmp == 0 && short_length > 1) {
25764 cmp = memcmp(ps1, ps2, (
size_t)short_length);
25766 if (cmp == 0) cmp = (length1 - length2);
25767 if (cmp < 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25775#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25776#ifndef __Pyx_DEFINED_PyObject_ComparePyByteArrayPyBytesBoolLt
25777#define __Pyx_DEFINED_PyObject_ComparePyByteArrayPyBytesBoolLt
25778static CYTHON_INLINE
int __Pyx_PyObject_ComparePyByteArrayPyBytesBoolLt(PyObject* s1, PyObject* s2) {
25780 Py_ssize_t length1, length2, short_length;
25781 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
25782 const char *ps1, *ps2;
25783 length1 = __Pyx_PyByteArray_GET_SIZE(s1);
25784 length2 = __Pyx_PyBytes_GET_SIZE(s2);
25785 short_length = (length1 < length2) ? length1 : length2;
25786 if (short_length == 0) {
25787 if (length1 == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25789 ps1 = PyByteArray_AS_STRING(s1);
25790 ps2 = PyBytes_AS_STRING(s2);
25793 ps1 = __Pyx_PyByteArray_AsString(s1);
if (unlikely(!ps1))
return -1;
25794 length1 = __Pyx_PyByteArray_GET_SIZE(s1);
if (unlikely(length1 == -1))
return -1;
25795 if (unlikely(PyBytes_AsStringAndSize(s2, &ps2, &length2) == -1))
return -1;
25796 short_length = (length1 < length2) ? length1 : length2;
25797 if (short_length == 0) {
25798 if (length1 == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25801 cmp = (Py_ssize_t) ((
const unsigned char*) ps1)[0] - (Py_ssize_t) ((
const unsigned char*) ps2)[0];
25802 if (cmp == 0 && short_length > 1) {
25803 cmp = memcmp(ps1, ps2, (
size_t)short_length);
25805 if (cmp == 0) cmp = (length1 - length2);
25806 if (cmp < 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25814#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
25815#ifndef __Pyx_DEFINED_PyObject_ComparePyByteArrayPyByteArrayBoolLt
25816#define __Pyx_DEFINED_PyObject_ComparePyByteArrayPyByteArrayBoolLt
25817static CYTHON_INLINE
int __Pyx_PyObject_ComparePyByteArrayPyByteArrayBoolLt(PyObject* s1, PyObject* s2) {
25819 Py_ssize_t length1, length2, short_length;
25820 #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS
25821 const char *ps1, *ps2;
25822 length1 = __Pyx_PyByteArray_GET_SIZE(s1);
25823 length2 = __Pyx_PyByteArray_GET_SIZE(s2);
25824 short_length = (length1 < length2) ? length1 : length2;
25825 if (short_length == 0) {
25826 if (length1 == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25828 ps1 = PyByteArray_AS_STRING(s1);
25829 ps2 = PyByteArray_AS_STRING(s2);
25832 ps1 = __Pyx_PyByteArray_AsString(s1);
if (unlikely(!ps1))
return -1;
25833 length1 = __Pyx_PyByteArray_GET_SIZE(s1);
if (unlikely(length1 == -1))
return -1;
25834 ps2 = __Pyx_PyByteArray_AsString(s2);
if (unlikely(!ps2))
return -1;
25835 length2 = __Pyx_PyByteArray_GET_SIZE(s2);
if (unlikely(length2 == -1))
return -1;
25836 short_length = (length1 < length2) ? length1 : length2;
25837 if (short_length == 0) {
25838 if (length1 == 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25841 cmp = (Py_ssize_t) ((
const unsigned char*) ps1)[0] - (Py_ssize_t) ((
const unsigned char*) ps2)[0];
25842 if (cmp == 0 && short_length > 1) {
25843 cmp = memcmp(ps1, ps2, (
size_t)short_length);
25845 if (cmp == 0) cmp = (length1 - length2);
25846 if (cmp < 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25854#ifndef __Pyx_DEFINED_PyObject_CompareFloatIntBoolLt
25855#define __Pyx_DEFINED_PyObject_CompareFloatIntBoolLt
25856static int __Pyx_PyObject_CompareFloatIntBoolLt(PyObject *op1, PyObject *op2) {
25857 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
25858 #if !CYTHON_ASSUME_SAFE_MACROS
25859 if (unlikely(float_op1 == -1. && PyErr_Occurred()))
return -1;
25861 #if CYTHON_USE_PYLONG_INTERNALS
25862 if (__Pyx_PyLong_IsCompact(op2)) {
25863 Py_ssize_t iop2 = __Pyx_PyLong_CompactValue(op2);
25864 if (float_op1 < ((
double)iop2))
goto __pyx_return_true;
else goto __pyx_return_false;
25866 if (unlikely(!isfinite(float_op1))) {
25867 if (float_op1 < 0.0)
goto __pyx_return_true;
else goto __pyx_return_false;
25869 int sign2 = __Pyx_PyLong_Sign(op2);
25870 if (float_op1 >= 0.) {
25871 if (sign2 < 0)
goto __pyx_return_false;
25872 if (float_op1 < (
double) (1L << PyLong_SHIFT))
goto __pyx_return_true;
25874 if (sign2 > 0)
goto __pyx_return_true;
25875 if (float_op1 > -(
double) (1L << PyLong_SHIFT))
goto __pyx_return_false;
25879 if (unlikely(!isfinite(float_op1))) {
25880 if (float_op1 < 0.0)
goto __pyx_return_true;
else goto __pyx_return_false;
25883 long iop2 = PyLong_AsLongAndOverflow(op2, &overflow2);
25884 if (likely(!overflow2)) {
25885 if ((
long long) iop2 >= (1LL << 53)) {
25887 }
else if ((
long long) iop2 <= - (1LL << 53)) {
25890 if (float_op1 < ((
double) iop2))
goto __pyx_return_true;
else goto __pyx_return_false;
25893 if (overflow2 > 0) {
25894 if (float_op1 < ((
double) (1LL << 53)))
goto __pyx_return_true;
25896 if (float_op1 > - ((
double) (1LL << 53)))
goto __pyx_return_false;
25900 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
25907#ifndef __Pyx_DEFINED_PyObject_CompareIntFloatBoolLt
25908#define __Pyx_DEFINED_PyObject_CompareIntFloatBoolLt
25909static int __Pyx_PyObject_CompareIntFloatBoolLt(PyObject *op1, PyObject *op2) {
25910 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
25911 #if !CYTHON_ASSUME_SAFE_MACROS
25912 if (unlikely(float_op2 == -1. && PyErr_Occurred()))
return -1;
25914 #if CYTHON_USE_PYLONG_INTERNALS
25915 if (__Pyx_PyLong_IsCompact(op1)) {
25916 Py_ssize_t iop1 = __Pyx_PyLong_CompactValue(op1);
25917 if (((
double)iop1) < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25919 if (unlikely(!isfinite(float_op2))) {
25920 if (0.0 < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25922 int sign1 = __Pyx_PyLong_Sign(op1);
25923 if (float_op2 >= 0.) {
25924 if (sign1 < 0)
goto __pyx_return_true;
25925 if (float_op2 < (
double) (1L << PyLong_SHIFT))
goto __pyx_return_false;
25927 if (sign1 > 0)
goto __pyx_return_false;
25928 if (float_op2 > -(
double) (1L << PyLong_SHIFT))
goto __pyx_return_true;
25932 if (unlikely(!isfinite(float_op2))) {
25933 if (0.0 < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25936 long iop1 = PyLong_AsLongAndOverflow(op1, &overflow1);
25937 if (likely(!overflow1)) {
25938 if ((
long long) iop1 >= (1LL << 53)) {
25940 }
else if ((
long long) iop1 <= - (1LL << 53)) {
25943 if (((
double) iop1) < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
25946 if (overflow1 < 0) {
25947 if (float_op2 > ((
double) (1LL << 53)))
goto __pyx_return_true;
25949 if (float_op2 < - ((
double) (1LL << 53)))
goto __pyx_return_false;
25953 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
25960#ifndef __Pyx_DEFINED_PyObject_CompareIntIntBoolLt
25961#define __Pyx_DEFINED_PyObject_CompareIntIntBoolLt
25962static int __Pyx_PyObject_CompareIntIntBoolLt(PyObject *op1, PyObject *op2) {
25963#if CYTHON_USE_PYLONG_INTERNALS
25964 Py_ssize_t cmp = __Pyx_PyLong_CompareSignAndSize(op1, op2);
25966 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
25968 const digit* digits1 = __Pyx_PyLong_Digits(op1);
25969 const digit* digits2 = __Pyx_PyLong_Digits(op2);
25971 cmp = (Py_ssize_t) digits1[0] - (Py_ssize_t) digits2[0];
25972 }
else if ((size == 2) && (8 *
sizeof(Py_ssize_t) >= 2 * PyLong_SHIFT)) {
25973 cmp = (Py_ssize_t) (((((
size_t)digits1[1]) << PyLong_SHIFT) | (
size_t)digits1[0])) - (Py_ssize_t) (((((
size_t)digits2[1]) << PyLong_SHIFT) | (
size_t)digits2[0]));
25975 for (Py_ssize_t i=size-1; i >= 0 && !cmp; --i) {
25976 cmp = (Py_ssize_t) digits1[i] - (Py_ssize_t) digits2[i];
25980 if (cmp == 0)
goto __pyx_return_false;
25981 if (__Pyx_PyLong_IsNeg(op1)) cmp = -cmp;
25983 if (cmp < 0)
goto __pyx_return_true;
else goto __pyx_return_false;
25985 int overflow1, overflow2;
25986 long long iop1 = PyLong_AsLongLongAndOverflow(op1, &overflow1);
25987 long long iop2 = PyLong_AsLongLongAndOverflow(op2, &overflow2);
25988 if (likely(!(overflow1 | overflow2))) {
25989 if (iop1 < iop2)
goto __pyx_return_true;
else goto __pyx_return_false;
25990 }
else if (overflow1 != overflow2) {
25991 if (overflow1 < overflow2)
goto __pyx_return_true;
else goto __pyx_return_false;
25993 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
26002static CYTHON_INLINE
int __Pyx_PyObject_CompareBoolLt_object_object(PyObject *op1, PyObject *op2,
int pyop) {
26003 CYTHON_UNUSED_VAR(pyop);
26004 if (PyFloat_CheckExact(op1)) {
26005 if (PyFloat_CheckExact(op2)) {
26006 double float_op1 = __Pyx_PyFloat_AS_DOUBLE(op1);
26007 #if !CYTHON_ASSUME_SAFE_MACROS
26008 if (unlikely(float_op1 == -1. && PyErr_Occurred()))
return -1;
26010 double float_op2 = __Pyx_PyFloat_AS_DOUBLE(op2);
26011 #if !CYTHON_ASSUME_SAFE_MACROS
26012 if (unlikely(float_op2 == -1. && PyErr_Occurred()))
return -1;
26014 if (float_op1 < float_op2)
goto __pyx_return_true;
else goto __pyx_return_false;
26016 if (PyLong_CheckExact(op2)) {
26017 return __Pyx_PyObject_CompareFloatIntBoolLt(op1, op2);
26019 goto __pyx_richcmp;
26021 if (PyLong_CheckExact(op1)) {
26022 if (op1 == op2)
goto __pyx_return_false;
26023 if (PyLong_CheckExact(op2)) {
26024 return __Pyx_PyObject_CompareIntIntBoolLt(op1, op2);
26026 if (PyFloat_CheckExact(op2)) {
26027 return __Pyx_PyObject_CompareIntFloatBoolLt(op1, op2);
26029 goto __pyx_richcmp;
26032 if (PyUnicode_CheckExact(op1)) {
26033 if (op1 == op2)
goto __pyx_return_false;
26034 if (PyUnicode_CheckExact(op2)) {
26035 return __Pyx_PyObject_CompareStrStrBoolLt(op1, op2);
26037 goto __pyx_richcmp;
26040 #if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
26041 if (PyBytes_CheckExact(op1)) {
26042 if (op1 == op2)
goto __pyx_return_false;
26043 if (PyBytes_CheckExact(op2)) {
26044 return __Pyx_PyObject_ComparePyBytesPyBytesBoolLt(op1, op2);
26046 if (PyByteArray_CheckExact(op2)) {
26047 return __Pyx_PyObject_ComparePyBytesPyByteArrayBoolLt(op1, op2);
26049 goto __pyx_richcmp;
26052 #if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL)
26053 if (PyByteArray_CheckExact(op1)) {
26054 if (op1 == op2)
goto __pyx_return_false;
26055 if (PyByteArray_CheckExact(op2)) {
26056 return __Pyx_PyObject_ComparePyByteArrayPyByteArrayBoolLt(op1, op2);
26058 if (PyBytes_CheckExact(op2)) {
26059 return __Pyx_PyObject_ComparePyByteArrayPyBytesBoolLt(op1, op2);
26061 goto __pyx_richcmp;
26064 if ((0))
goto __pyx_richcmp;
26065 if ((0))
goto __pyx_return_true;
26066 if ((0))
goto __pyx_return_false;
26068 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_LT);
26076static CYTHON_INLINE
int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2,
long intval,
long inplace) {
26077 CYTHON_MAYBE_UNUSED_VAR(intval);
26078 CYTHON_UNUSED_VAR(inplace);
26082 #if CYTHON_USE_PYLONG_INTERNALS
26083 if (likely(PyLong_CheckExact(op1))) {
26085 unsigned long uintval;
26086 Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
26087 const digit* digits = __Pyx_PyLong_Digits(op1);
26089 return (__Pyx_PyLong_IsZero(op1) != 1);
26090 }
else if (intval < 0) {
26091 if (__Pyx_PyLong_IsNonNeg(op1))
26095 if (__Pyx_PyLong_IsNeg(op1))
26098 uintval = (
unsigned long) intval;
26099#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
26100 if (uintval >> (PyLong_SHIFT * 4)) {
26101 unequal = (size != 5) || (digits[0] != (uintval & (
unsigned long) PyLong_MASK))
26102 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK));
26105#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
26106 if (uintval >> (PyLong_SHIFT * 3)) {
26107 unequal = (size != 4) || (digits[0] != (uintval & (
unsigned long) PyLong_MASK))
26108 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK));
26111#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
26112 if (uintval >> (PyLong_SHIFT * 2)) {
26113 unequal = (size != 3) || (digits[0] != (uintval & (
unsigned long) PyLong_MASK))
26114 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK));
26117#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
26118 if (uintval >> (PyLong_SHIFT * 1)) {
26119 unequal = (size != 2) || (digits[0] != (uintval & (
unsigned long) PyLong_MASK))
26120 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (
unsigned long) PyLong_MASK));
26123 unequal = (size != 1) || (((
unsigned long) digits[0]) != (uintval & (
unsigned long) PyLong_MASK));
26124 return (unequal != 0);
26127 if (PyFloat_CheckExact(op1)) {
26128 const long b = intval;
26129 double a = __Pyx_PyFloat_AS_DOUBLE(op1);
26130 return ((
double)a != (
double)b);
26132 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_NE);
26136#if !CYTHON_COMPILING_IN_PYPY
26137static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2,
int inplace) {
26138 return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
26140#if CYTHON_USE_PYLONG_INTERNALS
26141static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check) {
26142 CYTHON_MAYBE_UNUSED_VAR(inplace);
26143 CYTHON_UNUSED_VAR(zerodivision_check);
26144 const long a = intval;
26146 const PY_LONG_LONG lla = intval;
26148 if (unlikely(__Pyx_PyLong_IsZero(op2))) {
26149 return __Pyx_NewRef(op2);
26151 const int is_positive = __Pyx_PyLong_IsPos(op2);
26152 const digit* digits = __Pyx_PyLong_Digits(op2);
26153 const Py_ssize_t size = __Pyx_PyLong_DigitCount(op2);
26154 if (likely(size == 1)) {
26155 b = (long) digits[0];
26156 if (!is_positive) b *= -1;
26158 if (size == 2 && 8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT+30) {
26159 b = (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
26160 if (!is_positive) b *= -1;
26161 goto calculate_long;
26162 }
else if (size == 2 && 8 *
sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
26163 llb = (PY_LONG_LONG) (((((
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
26164 if (!is_positive) llb *= -1;
26165 goto calculate_long_long;
26167 if (size == 3 && 8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT+30) {
26168 b = (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
26169 if (!is_positive) b *= -1;
26170 goto calculate_long;
26171 }
else if (size == 3 && 8 *
sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
26172 llb = (PY_LONG_LONG) (((((((
unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
26173 if (!is_positive) llb *= -1;
26174 goto calculate_long_long;
26176 if (size == 4 && 8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT+30) {
26177 b = (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
26178 if (!is_positive) b *= -1;
26179 goto calculate_long;
26180 }
else if (size == 4 && 8 *
sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
26181 llb = (PY_LONG_LONG) (((((((((
unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (
unsigned PY_LONG_LONG)digits[0]));
26182 if (!is_positive) llb *= -1;
26183 goto calculate_long_long;
26186 return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
26189 CYTHON_UNUSED_VAR(a);
26190 CYTHON_UNUSED_VAR(b);
26192 goto calculate_long_long;
26193 calculate_long_long:
26197 return PyLong_FromLongLong(llx);
26202static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyCObj(PyObject *float_val,
long intval,
int zerodivision_check) {
26203 CYTHON_UNUSED_VAR(zerodivision_check);
26204 const long a = intval;
26205 double b = __Pyx_PyFloat_AS_DOUBLE(float_val);
26208 result = ((double)a) * (
double)b;
26209 return PyFloat_FromDouble(result);
26211static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyCObj(PyObject *op1, PyObject *op2,
long intval,
int inplace,
int zerodivision_check) {
26212 CYTHON_MAYBE_UNUSED_VAR(intval);
26213 CYTHON_UNUSED_VAR(zerodivision_check);
26214 #if CYTHON_USE_PYLONG_INTERNALS
26215 if (likely(PyLong_CheckExact(op2))) {
26216 return __Pyx_Unpacked___Pyx_PyLong_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check);
26219 if (PyFloat_CheckExact(op2)) {
26220 return __Pyx_Float___Pyx_PyLong_MultiplyCObj(op2, intval, zerodivision_check);
26222 return __Pyx_Fallback___Pyx_PyLong_MultiplyCObj(op1, op2, inplace);
26227static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t,
int is_final) {
26228 if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
26229 allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
26230 return alloc_func(t, 0);
26232 newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
26233 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
26235 PyObject *new_str = PyUnicode_FromString(
"__new__");
26236 if (likely(new_str)) {
26237 PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
26238 Py_DECREF(new_str);
26244 return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
26249static CYTHON_INLINE
int __Pyx_CallSlotAsVectorcallUnpackDict(Py_ssize_t args_size, PyObject *keys_dict, PyObject **args, PyObject *kwnames) {
26250 Py_ssize_t pos = 0, i = 0;
26251 PyObject *key, *value;
26252 while (PyDict_Next(keys_dict, &pos, &key, &value)) {
26254 args[args_size+i] = value;
26256 if (unlikely(__Pyx_PyTuple_SET_ITEM(kwnames, i, key) == -1)) {
26265#if CYTHON_VECTORCALL_TPNEW
26266static PyObject * __Pyx_CallTpnewAsVectorcall(__Pyx_tpnewvectorcallfunc
f, PyTypeObject* o, PyObject *a, PyObject *k) {
26267 Py_ssize_t k_size = k ? __Pyx_PyDict_GET_SIZE(k) : 0;
26268#if !CYTHON_ASSUME_SAFE_SIZE
26269 if (unlikely(k_size < 0))
return NULL;
26271 Py_ssize_t a_size = __Pyx_PyTuple_GET_SIZE(a);
26272#if !CYTHON_ASSUME_SAFE_SIZE
26273 if (unlikely(a_size < 0))
return NULL;
26275#if CYTHON_ASSUME_SAFE_MACROS
26277 return f(o, &PyTuple_GET_ITEM(a, 0), a_size, NULL);
26280 if (k_size == 0 && a_size == 0) {
26281 return f(o, NULL, 0, NULL);
26284 PyObject *stack_args[5];
26285 PyObject **args = stack_args;
26286 Py_ssize_t maxnargs = PY_SSIZE_T_MAX /
sizeof(PyObject*) - 1;
26287 if (a_size > maxnargs - k_size) {
26291 Py_ssize_t total_size = a_size + k_size;
26292 if (total_size > 5) {
26293 args = (PyObject**)PyMem_Malloc(((
size_t)total_size)*
sizeof(PyObject*));
26294 if (unlikely(!args)) {
26299 PyObject * result = NULL;
26300 PyObject *kwnames = NULL;
26301 int unpack_dict_result;
26303 for (; i < a_size; ++i) {
26304 args[i] = __Pyx_PyTuple_GET_ITEM(a, i);
26305#if !CYTHON_ASSUME_SAFE_MACROS
26306 if (unlikely(!args[i]))
goto cleanup;
26309#if !CYTHON_ASSUME_SAFE_MACROS
26313 kwnames = PyTuple_New(k_size);
26314 if (unlikely(!kwnames))
goto cleanup;
26315 __Pyx_BEGIN_CRITICAL_SECTION(k);
26316 unpack_dict_result = __Pyx_CallSlotAsVectorcallUnpackDict(a_size, k, args, kwnames);
26317 __Pyx_END_CRITICAL_SECTION();
26318 if (unlikely(unpack_dict_result == -1))
goto cleanup;
26320 result =
f(o, args, a_size, kwnames);
26322 Py_XDECREF(kwnames);
26323 for (i=a_size; i<total_size; ++i) {
26324 Py_XDECREF(args[i]);
26326 if (args != stack_args) {
26334#if CYTHON_VECTORCALL_TPNEW
26335static PyObject *__Pyx_CallNewInitFromVectorcall(PyTypeObject *t, PyObject *
const *args,
size_t nargsf, PyObject *kwnames) {
26336 newfunc tp_new = __Pyx_PyType_GetSlot(t, tp_new, newfunc);
26337 if (unlikely(!tp_new)) {
26338 __Pyx_RaiseErrorWithType(PyExc_TypeError,
"cannot create " __Pyx_FMT_TYPENAME
" instances", t);
26341 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(nargsf);
26342 PyObject *result = NULL, *args_tuple = NULL, *kwds_dict = NULL;
26343 Py_ssize_t kw_size = kwnames ? __Pyx_PyTuple_GET_SIZE(kwnames) : 0;
26344#if !CYTHON_ASSUME_SAFE_SIZE
26345 if (unlikely(kw_size == -1)) {
26350 kwds_dict = __Pyx_PyDict_NewPresized(kw_size);
26351 if (unlikely(!kwds_dict)) {
26354 for (Py_ssize_t i=0; i<kw_size; ++i) {
26355 PyObject *
v = args[nargs + i];
26356 PyObject *k = __Pyx_PyTuple_GET_ITEM(kwnames, i);
26357#if !CYTHON_ASSUME_SAFE_MACROS
26358 if (unlikely(!k)) {
26362 if (unlikely(PyDict_SetItem(kwds_dict, k,
v) < 0)) {
26368 args_tuple = __Pyx_PyTuple_FromArray(args, nargs);
26369 if (unlikely(!args_tuple)) {
26373 args_tuple = __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
26375 result = tp_new(t, args_tuple, kwds_dict);
26376 if (unlikely(!result)) {
26379 if (PyObject_TypeCheck(result, t)) {
26380 initproc tp_init = __Pyx_PyObject_GetSlot(result, tp_init, initproc);
26381 if (tp_init && unlikely(tp_init(result, args_tuple, kwds_dict) < 0)) {
26386 Py_XDECREF(args_tuple);
26387 Py_XDECREF(kwds_dict);
26393#if !CYTHON_USE_TYPE_SPECS
26395static int __Pyx_call_type_traverse(PyObject *o,
int always_call, visitproc visit,
void *arg) {
26396 if (!always_call) {
26397 PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
26398 unsigned long flags = PyType_GetFlags(base);
26399 if (flags & Py_TPFLAGS_HEAPTYPE) {
26403 Py_VISIT((PyObject*)Py_TYPE(o));
26409static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
26410#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || !CYTHON_COMPILING_IN_LIMITED_API)
26411 return PyObject_VectorcallMethod(method_name, &obj, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
26412#elif CYTHON_COMPILING_IN_LIMITED_API
26413 return PyObject_CallMethodObjArgs(obj, method_name, NULL);
26415 return PyObject_CallMethodNoArgs(obj, method_name);
26420#if !CYTHON_USE_TYPE_SLOTS
26421CYTHON_UNUSED
static Py_ssize_t __Pyx_GetTypeDictOffset(PyObject *tp,
int require_cython_valid_result) {
26422 PyObject *tp_dictoffset_o;
26423 Py_ssize_t tp_dictoffset;
26424 tp_dictoffset_o = PyObject_GetAttrString(tp,
"__dictoffset__");
26425 if (unlikely(!tp_dictoffset_o))
return -1;
26426 tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
26427 Py_DECREF(tp_dictoffset_o);
26428 if (unlikely(require_cython_valid_result && tp_dictoffset == 0)) {
26431 "'type' doesn't have a dictoffset");
26433 }
else if (unlikely(require_cython_valid_result && tp_dictoffset < 0)) {
26436 "'type' has an unexpected negative dictoffset. "
26437 "Please report this as Cython bug");
26440 return tp_dictoffset;
26445#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
26446static int __Pyx_validate_bases_tuple(
const char *type_name,
int has_dictoffset, PyObject *bases) {
26448#if CYTHON_ASSUME_SAFE_SIZE
26449 n = PyTuple_GET_SIZE(bases);
26451 n = PyTuple_Size(bases);
26452 if (unlikely(
n < 0))
return -1;
26454 if (!has_dictoffset) {
26456#if CYTHON_AVOID_BORROWED_REFS
26457 b = PySequence_GetItem(bases, 0);
26459#elif CYTHON_ASSUME_SAFE_MACROS
26460 b = PyTuple_GET_ITEM(bases, 0);
26462 b = PyTuple_GetItem(bases, 0);
26465#if CYTHON_USE_TYPE_SLOTS
26466 has_dictoffset = ((PyTypeObject*)b)->tp_dictoffset != 0;
26468 Py_ssize_t dictoffset = __Pyx_GetTypeDictOffset(b, 0);
26469 has_dictoffset = dictoffset != 0;
26471#if CYTHON_AVOID_BORROWED_REFS
26474#if !CYTHON_USE_TYPE_SLOTS
26475 if (dictoffset == -1 && PyErr_Occurred())
return -1;
26478 for (i = 1; i <
n; i++)
26481#if CYTHON_AVOID_BORROWED_REFS
26482 PyObject *b0 = PySequence_GetItem(bases, i);
26483 if (!b0)
return -1;
26484#elif CYTHON_ASSUME_SAFE_MACROS
26485 PyObject *b0 = PyTuple_GET_ITEM(bases, i);
26487 PyObject *b0 = PyTuple_GetItem(bases, i);
26488 if (!b0)
return -1;
26490 b = (PyTypeObject*) b0;
26491 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
26493 __Pyx_RaiseErrorWithType(
26494 PyExc_TypeError,
"base class '" __Pyx_FMT_TYPENAME
"' is not a heap type", b);
26495#if CYTHON_AVOID_BORROWED_REFS
26500 if (!has_dictoffset)
26502 Py_ssize_t b_dictoffset = 0;
26503#if CYTHON_USE_TYPE_SLOTS
26504 b_dictoffset = b->tp_dictoffset;
26506 b_dictoffset = __Pyx_GetTypeDictOffset((PyObject*)b, 0);
26507 if (b_dictoffset == -1 && PyErr_Occurred())
goto dictoffset_return;
26509 if (b_dictoffset) {
26510 __Pyx_RaiseErrorWithType1(
26512 "extension type '%.200s' has no __dict__ slot, "
26513 "but base type '" __Pyx_FMT_TYPENAME
"' has: "
26514 "either add 'cdef dict __dict__' to the extension type "
26515 "or add '__slots__ = [...]' to the base type",
26517#if !CYTHON_USE_TYPE_SLOTS
26520#if CYTHON_AVOID_BORROWED_REFS
26526#if CYTHON_AVOID_BORROWED_REFS
26535CYTHON_UNUSED
static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
26537 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
26541 t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
26545static int __Pyx_PyType_Ready(PyTypeObject *t) {
26546#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON
26547 (void)__Pyx_PyObject_CallMethod0;
26548#if CYTHON_USE_TYPE_SPECS
26549 (void)__Pyx_validate_bases_tuple;
26551 return PyType_Ready(t);
26554 if (!__Pyx_PyType_HasMultipleInheritance(t)) {
26555 return PyType_Ready(t);
26557 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
26558 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset != 0, bases) == -1))
26561 int gc_was_enabled;
26562 #if PY_VERSION_HEX >= 0x030A00b1
26563 gc_was_enabled = PyGC_Disable();
26564 (void)__Pyx_PyObject_CallMethod0;
26566 PyObject *ret, *py_status;
26567 PyObject *gc = NULL;
26568 #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
26569 !CYTHON_COMPILING_IN_GRAAL
26570 gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
26572 if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
26573 if (unlikely(!gc))
return -1;
26574 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
26575 if (unlikely(!py_status)) {
26579 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
26580 Py_DECREF(py_status);
26581 if (gc_was_enabled > 0) {
26582 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
26583 if (unlikely(!ret)) {
26588 }
else if (unlikely(gc_was_enabled == -1)) {
26593 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
26594#if PY_VERSION_HEX >= 0x030A0000
26595 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
26597 r = PyType_Ready(t);
26598 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
26599 #if PY_VERSION_HEX >= 0x030A00b1
26600 if (gc_was_enabled)
26603 if (gc_was_enabled) {
26604 PyObject *tp, *
v, *tb;
26605 PyErr_Fetch(&tp, &
v, &tb);
26606 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
26607 if (likely(ret ||
r == -1)) {
26609 PyErr_Restore(tp,
v, tb);
26625#ifndef __PYX_HAVE_RT_ImportType_3_3_0
26626#define __PYX_HAVE_RT_ImportType_3_3_0
26627static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject *module,
const char *module_name,
const char *class_name,
26628 size_t size,
size_t alignment,
enum __Pyx_ImportType_CheckSize_3_3_0 check_size)
26630 PyObject *result = 0;
26631 Py_ssize_t basicsize;
26632 Py_ssize_t itemsize;
26633#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
26634 PyObject *py_basicsize;
26635 PyObject *py_itemsize;
26637 result = PyObject_GetAttrString(module, class_name);
26640 if (!PyType_Check(result)) {
26641 PyErr_Format(PyExc_TypeError,
26642 "%.200s.%.200s is not a type object",
26643 module_name, class_name);
26646#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
26647 basicsize = ((PyTypeObject *)result)->tp_basicsize;
26648 itemsize = ((PyTypeObject *)result)->tp_itemsize;
26651 return (PyTypeObject *)result;
26653 py_basicsize = PyObject_GetAttrString(result,
"__basicsize__");
26656 basicsize = PyLong_AsSsize_t(py_basicsize);
26657 Py_DECREF(py_basicsize);
26659 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
26661 py_itemsize = PyObject_GetAttrString(result,
"__itemsize__");
26664 itemsize = PyLong_AsSsize_t(py_itemsize);
26665 Py_DECREF(py_itemsize);
26667 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
26671 if (size % alignment) {
26672 alignment = size % alignment;
26674 if (itemsize < (Py_ssize_t)alignment)
26675 itemsize = (Py_ssize_t)alignment;
26677 if ((
size_t)(basicsize + itemsize) < size) {
26678 PyErr_Format(PyExc_ValueError,
26679 "%.200s.%.200s size changed, may indicate binary incompatibility. "
26680 "Expected %zd from C header, got %zd from PyObject",
26681 module_name, class_name, size, basicsize+itemsize);
26684 if (check_size == __Pyx_ImportType_CheckSize_Error_3_3_0 &&
26685 ((
size_t)basicsize > size || (
size_t)(basicsize + itemsize) < size)) {
26686 PyErr_Format(PyExc_ValueError,
26687 "%.200s.%.200s size changed, may indicate binary incompatibility. "
26688 "Expected %zd from C header, got %zd-%zd from PyObject",
26689 module_name, class_name, size, basicsize, basicsize+itemsize);
26692 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_3_0 && (
size_t)basicsize > size) {
26693 if (PyErr_WarnFormat(NULL, 0,
26694 "%.200s.%.200s size changed, may indicate binary incompatibility. "
26695 "Expected %zd from C header, got %zd from PyObject",
26696 module_name, class_name, size, basicsize) < 0) {
26700 return (PyTypeObject *)result;
26702 Py_XDECREF(result);
26709__Pyx_PEP560_update_bases(PyObject *bases)
26711 Py_ssize_t i, j, size_bases;
26712 PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
26713#if CYTHON_ASSUME_SAFE_SIZE
26714 size_bases = PyTuple_GET_SIZE(bases);
26716 size_bases = PyTuple_Size(bases);
26717 if (size_bases < 0)
return NULL;
26719 for (i = 0; i < size_bases; i++) {
26720#if CYTHON_AVOID_BORROWED_REFS
26723#if CYTHON_ASSUME_SAFE_MACROS
26724 base = PyTuple_GET_ITEM(bases, i);
26726 base = PyTuple_GetItem(bases, i);
26727 if (!base)
goto error;
26729#if CYTHON_AVOID_BORROWED_REFS
26732 if (PyType_Check(base)) {
26734 if (PyList_Append(new_bases, base) < 0) {
26740 meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
26741 if (!meth && PyErr_Occurred()) {
26746 if (PyList_Append(new_bases, base) < 0) {
26752 new_base = __Pyx_PyObject_CallOneArg(meth, bases);
26757 if (!PyTuple_Check(new_base)) {
26758 PyErr_SetString(PyExc_TypeError,
26759 "__mro_entries__ must return a tuple");
26760 Py_DECREF(new_base);
26764 if (!(new_bases = PyList_New(i))) {
26767 for (j = 0; j < i; j++) {
26768 PyObject *base_from_list;
26769#if CYTHON_ASSUME_SAFE_MACROS
26770 base_from_list = PyTuple_GET_ITEM(bases, j);
26771 PyList_SET_ITEM(new_bases, j, base_from_list);
26772 Py_INCREF(base_from_list);
26774 base_from_list = PyTuple_GetItem(bases, j);
26775 if (!base_from_list)
goto error;
26776 Py_INCREF(base_from_list);
26777 if (PyList_SetItem(new_bases, j, base_from_list) < 0)
goto error;
26781#if CYTHON_ASSUME_SAFE_SIZE
26782 j = PyList_GET_SIZE(new_bases);
26784 j = PyList_Size(new_bases);
26785 if (j < 0)
goto error;
26787 if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
26790 Py_DECREF(new_base);
26796 result = PyList_AsTuple(new_bases);
26797 Py_DECREF(new_bases);
26798#if CYTHON_AVOID_BORROWED_REFS
26803 Py_XDECREF(new_bases);
26804#if CYTHON_AVOID_BORROWED_REFS
26811static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
26812 Py_ssize_t i, nbases;
26813#if CYTHON_ASSUME_SAFE_SIZE
26814 nbases = PyTuple_GET_SIZE(bases);
26816 nbases = PyTuple_Size(bases);
26817 if (nbases < 0)
return NULL;
26819 for (i=0; i < nbases; i++) {
26820 PyTypeObject *tmptype;
26821#if CYTHON_ASSUME_SAFE_MACROS
26822 PyObject *tmp = PyTuple_GET_ITEM(bases, i);
26824 PyObject *tmp = PyTuple_GetItem(bases, i);
26825 if (!tmp)
return NULL;
26827 tmptype = Py_TYPE(tmp);
26829 metaclass = tmptype;
26832 if (PyType_IsSubtype(metaclass, tmptype))
26834 if (PyType_IsSubtype(tmptype, metaclass)) {
26835 metaclass = tmptype;
26838 PyErr_SetString(PyExc_TypeError,
26839 "metaclass conflict: "
26840 "the metaclass of a derived class "
26841 "must be a (non-strict) subclass "
26842 "of the metaclasses of all its bases");
26846 metaclass = &PyType_Type;
26848 Py_INCREF((PyObject*) metaclass);
26849 return (PyObject*) metaclass;
26853static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
26855#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
26856 PyDict_SetDefaultRef(d, key, default_value, &value);
26857#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
26858 PyObject *args[] = {d, key, default_value};
26859 value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
26860#elif CYTHON_COMPILING_IN_LIMITED_API
26861 value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
26863 value = PyDict_SetDefault(d, key, default_value);
26864 if (unlikely(!value))
return NULL;
26871#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3
26872 static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
26873 PyObject *module_dict = PyImport_GetModuleDict();
26875 if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
26878 if (m != NULL && PyModule_Check(m)) {
26882 m = PyModule_NewObject(name);
26885 if (PyDict_CheckExact(module_dict)) {
26887 (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
26891 if (PyObject_SetItem(module_dict, name, m) != 0) {
26898 static PyObject *__Pyx_PyImport_AddModuleRef(
const char *name) {
26899 if ((PY_VERSION_HEX >= 0x030E0000) && Py_Version >= 0x030E0100) {
26900 return PyImport_AddModuleRef(name);
26902 PyObject *py_name = PyUnicode_FromString(name);
26903 if (!py_name)
return NULL;
26904 PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
26905 Py_DECREF(py_name);
26908#elif __PYX_LIMITED_VERSION_HEX < 0x030d0000
26909 static PyObject *__Pyx_PyImport_AddModuleRef(
const char *name) {
26910 PyObject *module = PyImport_AddModule(name);
26911 Py_XINCREF(module);
26917static PyObject *__Pyx_FetchSharedCythonABIModule(
void) {
26918 return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
26922static int __Pyx_VerifyCachedType(PyObject *cached_type,
26924 Py_ssize_t expected_basicsize) {
26925 Py_ssize_t basicsize;
26926 if (!PyType_Check(cached_type)) {
26927 PyErr_Format(PyExc_TypeError,
26928 "Shared Cython type %.200s is not a type object", name);
26931 if (expected_basicsize == 0) {
26934#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_OPAQUE_OBJECTS
26935 if (expected_basicsize < 0) {
26936 basicsize = PyType_GetTypeDataSize((PyTypeObject*)cached_type);
26940 #if CYTHON_COMPILING_IN_LIMITED_API
26941 PyObject *py_basicsize;
26942 py_basicsize = PyObject_GetAttrString(cached_type,
"__basicsize__");
26943 if (unlikely(!py_basicsize))
return -1;
26944 basicsize = PyLong_AsSsize_t(py_basicsize);
26945 Py_DECREF(py_basicsize);
26946 py_basicsize = NULL;
26947 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred())
return -1;
26949 basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
26952 if ((expected_basicsize >= 0) ?
26953 (basicsize != expected_basicsize) :
26954 (basicsize < -expected_basicsize)) {
26955 PyErr_Format(PyExc_TypeError,
26956 "Shared Cython type %.200s has the wrong size, try recompiling",
26964#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
26965static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
26966 PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
26967 if (result && metaclass) {
26968 PyObject *old_tp = (PyObject*)Py_TYPE(result);
26969 Py_INCREF((PyObject*)metaclass);
26970 Py_SET_TYPE(result, metaclass);
26972 PyType_Modified((PyTypeObject*)result);
26977#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
26979static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
26980 PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
26981 int get_item_ref_result;
26982 const char* object_name = strrchr(spec->name,
'.');
26983 object_name = object_name ? object_name+1 : spec->name;
26984 py_object_name = PyUnicode_FromString(object_name);
26985 if (!py_object_name)
return NULL;
26986 abi_module = __Pyx_FetchSharedCythonABIModule();
26987 if (!abi_module)
goto done;
26988 abi_module_dict = PyModule_GetDict(abi_module);
26989 if (!abi_module_dict)
goto done;
26990 get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
26991 if (get_item_ref_result == 1) {
26992 if (__Pyx_VerifyCachedType(
26995 spec->basicsize) < 0) {
26999 }
else if (unlikely(get_item_ref_result == -1)) {
27002 cached_type = __Pyx_PyType_FromMetaclass(
27004 CYTHON_USE_MODULE_STATE ? module : abi_module,
27006 if (unlikely(!cached_type))
goto bad;
27007 new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
27008 if (unlikely(new_cached_type != cached_type)) {
27009 if (unlikely(!new_cached_type))
goto bad;
27010 Py_DECREF(cached_type);
27011 cached_type = new_cached_type;
27012 if (__Pyx_VerifyCachedType(
27015 spec->basicsize) < 0) {
27020 Py_DECREF(new_cached_type);
27023 Py_XDECREF(abi_module);
27024 Py_DECREF(py_object_name);
27025 assert(cached_type == NULL || PyType_Check(cached_type));
27026 return (PyTypeObject *) cached_type;
27028 Py_XDECREF(cached_type);
27029 cached_type = NULL;
27034static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED
void* context) {
27035 return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
27037#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
27038static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
27039 PyErr_SetString(PyExc_TypeError,
"Cannot instantiate Cython internal types");
27042static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
27043 PyErr_SetString(PyExc_TypeError,
"Cython internal types are immutable");
27047static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
27048 {
"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
27051static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
27052 {Py_tp_getset, (
void *)__pyx_CommonTypesMetaclass_getset},
27053 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
27054 {Py_tp_call, (
void*)__pyx_CommonTypesMetaclass_call},
27055 {Py_tp_new, (
void*)__pyx_CommonTypesMetaclass_call},
27056 {Py_tp_setattro, (
void*)__pyx_CommonTypesMetaclass_setattr},
27060static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
27061 __PYX_TYPE_MODULE_PREFIX
"_common_types_metatype",
27064 Py_TPFLAGS_IMMUTABLETYPE |
27065 Py_TPFLAGS_DISALLOW_INSTANTIATION |
27066 Py_TPFLAGS_DEFAULT,
27067 __pyx_CommonTypesMetaclass_slots
27069static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
27070 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
27071 PyObject *bases = PyTuple_Pack(1, &PyType_Type);
27072 if (unlikely(!bases)) {
27075 mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
27077 if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
27084#if CYTHON_COMPILING_IN_LIMITED_API
27085static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func,
void (*cfunc)(
void)) {
27086 if (__Pyx_CyFunction_Check(func)) {
27087 return __Pyx_as_CyFunctionObject(func)->func_methoddef->ml_meth == (PyCFunction) cfunc;
27088 }
else if (PyCFunction_Check(func)) {
27089 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
27093static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void (*cfunc)(
void)) {
27094 if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
27096 PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
27097 if (unlikely(!newFunc)) {
27101 result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
27102 Py_DECREF(newFunc);
27105 return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
27108static CYTHON_INLINE
int __Pyx__IsSameCyOrCFunction(PyObject *func,
void (*cfunc)(
void)) {
27109 if (PyMethod_Check(func)) {
27110 func = PyMethod_GET_FUNCTION(func);
27112 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
27115static CYTHON_INLINE
void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject*
f, PyObject* classobj) {
27116#if CYTHON_COMPILING_IN_LIMITED_API
27117 __Pyx_Py_XDECREF_SET(
27118 __Pyx__CyFunction_GetClassObj(
f),
27119 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
27121 __Pyx_Py_XDECREF_SET(
27122 ((PyCMethodObject *) (
f))->mm_class,
27123 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
27126static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
27127 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
27128 m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL);
27129 if (unlikely(!m->defaults))
27131 return m->defaults;
27133static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
27134 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
27135 m->defaults_tuple = tuple;
27138static CYTHON_INLINE
void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
27139 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
27140 m->defaults_kwdict = dict;
27143static CYTHON_INLINE
void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
27144 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
27145 m->func_annotations = dict;
27150#if CYTHON_COMPILING_IN_LIMITED_API
27151static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
27153 CYTHON_UNUSED_VAR(typ);
27155 return __Pyx_NewRef(func);
27156 #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
27158 PyObject *args[] = {func, self};
27159 result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
27162 result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
27167static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
27168 CYTHON_UNUSED_VAR(typ);
27170 return __Pyx_NewRef(func);
27171 return PyMethod_New(func, self);
27176#if CYTHON_VECTORCALL
27177static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw)
27179 PyObject *res = NULL;
27181 PyObject **newargs;
27182 PyObject **kwvalues;
27184 #if CYTHON_AVOID_BORROWED_REFS
27190 PyObject *key, *value;
27191 unsigned long keys_are_strings;
27192 #if !CYTHON_ASSUME_SAFE_SIZE
27193 Py_ssize_t nkw = PyDict_Size(kw);
27194 if (unlikely(nkw == -1))
return NULL;
27196 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
27198 newargs = (PyObject **)PyMem_Malloc((nargs + (
size_t)nkw) *
sizeof(args[0]));
27199 if (unlikely(newargs == NULL)) {
27203 for (j = 0; j < nargs; j++) newargs[j] = args[j];
27204 kwnames = PyTuple_New(nkw);
27205 if (unlikely(kwnames == NULL)) {
27206 PyMem_Free(newargs);
27209 kwvalues = newargs + nargs;
27212 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
27213 while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
27214 keys_are_strings &=
27215 #if CYTHON_COMPILING_IN_LIMITED_API
27216 PyType_GetFlags(Py_TYPE(key));
27218 Py_TYPE(key)->tp_flags;
27220 #if !CYTHON_ASSUME_SAFE_MACROS
27221 if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0))
goto cleanup;
27223 PyTuple_SET_ITEM(kwnames, i, key);
27225 kwvalues[i] = value;
27228 if (unlikely(!keys_are_strings)) {
27229 PyErr_SetString(PyExc_TypeError,
"keywords must be strings");
27232 res = vc(func, newargs, nargs, kwnames);
27234 #if CYTHON_AVOID_BORROWED_REFS
27237 Py_DECREF(kwnames);
27238 for (i = 0; i < nkw; i++)
27239 Py_DECREF(kwvalues[i]);
27240 PyMem_Free(newargs);
27243static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *
const *args,
size_t nargs, PyObject *kw)
27245 Py_ssize_t kw_size =
27246 likely(kw == NULL) ?
27248#if !CYTHON_ASSUME_SAFE_SIZE
27251 PyDict_GET_SIZE(kw);
27253 if (kw_size == 0) {
27254 return vc(func, args, nargs, NULL);
27256#if !CYTHON_ASSUME_SAFE_SIZE
27257 else if (unlikely(kw_size == -1)) {
27261 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
27267__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
27269 if (unlikely(op->func_doc == NULL)) {
27270#if CYTHON_COMPILING_IN_LIMITED_API
27271 const char *doc = op->func_methoddef->ml_doc;
27273 const char *doc = ((PyCFunctionObject*)op)->m_ml->ml_doc;
27276 op->func_doc = PyUnicode_FromString(doc);
27277 if (unlikely(op->func_doc == NULL))
27280 Py_INCREF(Py_None);
27284 Py_INCREF(op->func_doc);
27285 return op->func_doc;
27288__Pyx_CyFunction_get_doc(PyObject *op_in,
void *closure) {
27290 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27291 CYTHON_UNUSED_VAR(closure);
27292 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27293 result = __Pyx_CyFunction_get_doc_locked(op);
27294 __Pyx_END_CRITICAL_SECTION();
27298__Pyx_CyFunction_set_doc(PyObject *op_in, PyObject *value,
void *context)
27300 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27301 CYTHON_UNUSED_VAR(context);
27302 if (value == NULL) {
27306 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27307 __Pyx_Py_XDECREF_SET(op->func_doc, value);
27308 __Pyx_END_CRITICAL_SECTION();
27312__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
27314 if (unlikely(op->func_name == NULL)) {
27315#if CYTHON_COMPILING_IN_LIMITED_API
27316 const char *name = op->func_methoddef->ml_name;
27318 const char *name = ((PyCFunctionObject*)op)->m_ml->ml_name;
27320 op->func_name = PyUnicode_InternFromString(name);
27321 if (unlikely(op->func_name == NULL))
27324 Py_INCREF(op->func_name);
27325 return op->func_name;
27328__Pyx_CyFunction_get_name(PyObject *op,
void *context)
27330 PyObject *result = NULL;
27331 CYTHON_UNUSED_VAR(context);
27332 __Pyx_BEGIN_CRITICAL_SECTION(op);
27333 result = __Pyx_CyFunction_get_name_locked(__Pyx_as_CyFunctionObject(op));
27334 __Pyx_END_CRITICAL_SECTION();
27338__Pyx_CyFunction_set_name(PyObject *op_in, PyObject *value,
void *context)
27340 CYTHON_UNUSED_VAR(context);
27341 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
27342 PyErr_SetString(PyExc_TypeError,
27343 "__name__ must be set to a string object");
27346 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27348 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27349 __Pyx_Py_XDECREF_SET(op->func_name, value);
27350 __Pyx_END_CRITICAL_SECTION();
27354__Pyx_CyFunction_get_qualname(PyObject *op_in,
void *context)
27356 CYTHON_UNUSED_VAR(context);
27357 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27359 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27360 Py_INCREF(op->func_qualname);
27361 result = op->func_qualname;
27362 __Pyx_END_CRITICAL_SECTION();
27366__Pyx_CyFunction_set_qualname(PyObject *op_in, PyObject *value,
void *context)
27368 CYTHON_UNUSED_VAR(context);
27369 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
27370 PyErr_SetString(PyExc_TypeError,
27371 "__qualname__ must be set to a string object");
27374 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27376 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27377 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
27378 __Pyx_END_CRITICAL_SECTION();
27381#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
27383__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op,
void *context)
27385 CYTHON_UNUSED_VAR(context);
27386 if (unlikely(op->func_dict == NULL)) {
27387 op->func_dict = PyDict_New();
27388 if (unlikely(op->func_dict == NULL))
27391 Py_INCREF(op->func_dict);
27392 return op->func_dict;
27396__Pyx_CyFunction_get_globals(PyObject *op_in,
void *context)
27398 CYTHON_UNUSED_VAR(context);
27399 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27400 Py_INCREF(op->func_globals);
27401 return op->func_globals;
27404__Pyx_CyFunction_get_closure(PyObject *op,
void *context)
27406 CYTHON_UNUSED_VAR(op);
27407 CYTHON_UNUSED_VAR(context);
27408 Py_INCREF(Py_None);
27412__Pyx_CyFunction_get_code(PyObject *op_in,
void *context)
27414 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27415 PyObject* result = (op->func_code) ? op->func_code : Py_None;
27416 CYTHON_UNUSED_VAR(context);
27421__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op, PyObject *op_obj) {
27423 PyObject *res = op->defaults_getter(op_obj);
27424 if (unlikely(!res))
27426 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27427 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
27428 Py_INCREF(op->defaults_tuple);
27429 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
27430 Py_INCREF(op->defaults_kwdict);
27432 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
27433 if (unlikely(!op->defaults_tuple)) result = -1;
27435 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
27436 if (unlikely(!op->defaults_kwdict)) result = -1;
27443__Pyx_CyFunction_set_defaults(PyObject *op_in, PyObject* value,
void *context) {
27444 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27445 CYTHON_UNUSED_VAR(context);
27448 }
else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
27449 PyErr_SetString(PyExc_TypeError,
27450 "__defaults__ must be set to a tuple object");
27453 PyErr_WarnEx(PyExc_RuntimeWarning,
"changes to cyfunction.__defaults__ will not "
27454 "currently affect the values used in function calls", 1);
27456 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27457 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
27458 __Pyx_END_CRITICAL_SECTION();
27462__Pyx_CyFunction_get_defaults_locked(PyObject *op_in) {
27463 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27464 PyObject* result = op->defaults_tuple;
27465 if (unlikely(!result)) {
27466 if (op->defaults_getter) {
27467 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0))
return NULL;
27468 result = op->defaults_tuple;
27477__Pyx_CyFunction_get_defaults(PyObject *op,
void *context) {
27478 PyObject* result = NULL;
27479 CYTHON_UNUSED_VAR(context);
27480 __Pyx_BEGIN_CRITICAL_SECTION(op);
27481 result = __Pyx_CyFunction_get_defaults_locked(op);
27482 __Pyx_END_CRITICAL_SECTION();
27486__Pyx_CyFunction_set_kwdefaults(PyObject *op_in, PyObject* value,
void *context) {
27487 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27488 CYTHON_UNUSED_VAR(context);
27491 }
else if (unlikely(value != Py_None && !PyDict_Check(value))) {
27492 PyErr_SetString(PyExc_TypeError,
27493 "__kwdefaults__ must be set to a dict object");
27496 PyErr_WarnEx(PyExc_RuntimeWarning,
"changes to cyfunction.__kwdefaults__ will not "
27497 "currently affect the values used in function calls", 1);
27499 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27500 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
27501 __Pyx_END_CRITICAL_SECTION();
27505__Pyx_CyFunction_get_kwdefaults_locked(PyObject *op_in) {
27506 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27507 PyObject* result = op->defaults_kwdict;
27508 if (unlikely(!result)) {
27509 if (op->defaults_getter) {
27510 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0))
return NULL;
27511 result = op->defaults_kwdict;
27520__Pyx_CyFunction_get_kwdefaults(PyObject *op,
void *context) {
27522 CYTHON_UNUSED_VAR(context);
27523 __Pyx_BEGIN_CRITICAL_SECTION(op);
27524 result = __Pyx_CyFunction_get_kwdefaults_locked(op);
27525 __Pyx_END_CRITICAL_SECTION();
27528static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value);
27530__Pyx_CyFunction_set_annotations(PyObject *op_in, PyObject* value,
void *context) {
27531 CYTHON_UNUSED_VAR(context);
27532 if (!value || value == Py_None) {
27534 }
else if (unlikely(!PyDict_Check(value))) {
27535 PyErr_SetString(PyExc_TypeError,
27536 "__annotations__ must be set to a dict object");
27539 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27541 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27542 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
27543 __Pyx_END_CRITICAL_SECTION();
27544 if (unlikely(__Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, Py_None) < 0))
return -1;
27548__Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
27551#if CYTHON_COMPILING_IN_PYPY
27552 *dict = PyObject_GenericGetDict(op_in, NULL);
27553#elif CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030C0000
27554 *dict = __Pyx_as_CyFunctionObject(op_in)->func_dict;
27556 PyObject **dictptr = _PyObject_GetDictPtr(op_in);
27557 *dict = likely(dictptr) ? *dictptr : NULL;
27559 return *dict ? 1 : 0;
27562__Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
27566 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
27567 if (!dict_found)
return 0;
27568 return __Pyx_PyDict_GetItemRef(dict, __pyx_mstate_global->__pyx_n_u_annotate, annotate);
27571__Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
27574 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
27575 if (!dict_found)
return 0;
27577 return PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
27579#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
27580 return PyDict_Pop(dict, __pyx_mstate_global->__pyx_n_u_annotate, NULL);
27582 int result = PyDict_Contains(dict, __pyx_mstate_global->__pyx_n_u_annotate);
27584 result = PyDict_DelItem(dict, __pyx_mstate_global->__pyx_n_u_annotate);
27591__Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
27594#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
27595 dict = __Pyx_CyFunction_get_dict(__Pyx_as_CyFunctionObject(op_in), NULL);
27597 dict = PyObject_GenericGetDict(op_in, NULL);
27599 if (unlikely(!dict))
return -1;
27600 result = PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
27605__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
27606 PyObject* result = op->func_annotations;
27607 if (unlikely(!result)) {
27608 result = PyDict_New();
27609 if (unlikely(!result))
return NULL;
27610 op->func_annotations = result;
27616__Pyx_CyFunction_get_annotations(PyObject *op_in,
void *context) {
27617 PyObject *annotate = NULL;
27618 PyObject *result = NULL;
27619 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27620 CYTHON_UNUSED_VAR(context);
27621 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27622 result = __Pyx_XNewRef(op->func_annotations);
27623 __Pyx_END_CRITICAL_SECTION();
27624 if (result)
return result;
27625 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0))
return NULL;
27626 if (!annotate || annotate == Py_None) {
27627 Py_XDECREF(annotate);
27628 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27629 result = __Pyx_CyFunction_get_annotations_locked(op);
27630 __Pyx_END_CRITICAL_SECTION();
27633 PyObject *format = PyLong_FromLong(1L);
27634 if (likely(format)) {
27635 if (!Py_EnterRecursiveCall(
" cyfunction __annotations__.__get__")) {
27636 result = __Pyx_PyObject_CallOneArg(annotate, format);
27637 Py_LeaveRecursiveCall();
27641 Py_DECREF(annotate);
27642 if (unlikely(!result))
return NULL;
27643 if (unlikely(!PyDict_Check(result))) {
27644 PyErr_SetString(PyExc_TypeError,
"__annotate__ must return a dict");
27648 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27649 __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
27650 __Pyx_END_CRITICAL_SECTION();
27653static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *arg) {
27654 CYTHON_UNUSED_VAR(arg);
27655 if (unlikely(!self)) {
27656 PyErr_SetString(PyExc_SystemError,
"cython __annotate__ called without 'self' argument");
27660 if (Py_EnterRecursiveCall(
" in cyfunction annotate")) {
27663 result = __Pyx_CyFunction_get_annotations(self, NULL);
27664 Py_LeaveRecursiveCall();
27668__Pyx_CyFunction_get_annotate(PyObject *op_in,
void *context);
27670__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value,
void *context) {
27671 CYTHON_UNUSED_VAR(context);
27672 if (value == NULL) {
27673 PyErr_SetString(PyExc_TypeError,
"__annotate__ cannot be deleted");
27676 if (unlikely(value != Py_None && !PyCallable_Check(value))) {
27677 PyErr_SetString(PyExc_TypeError,
"__annotate__ must be callable or None");
27680 if (unlikely(__Pyx_TypeCheck(value, &PyCFunction_Type))) {
27681#if !CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_PYPY
27682 PyCFunction cfunction = PyCFunction_GetFunction(value);
27683 if (unlikely(!cfunction))
return -1;
27684 PyObject *value_self = PyCFunction_GetSelf(value);
27685 if (unlikely(!value_self && PyErr_Occurred()))
return -1;
27687 PyCFunction cfunction = PyCFunction_GET_FUNCTION(value);
27688 PyObject *value_self = PyCFunction_GET_SELF(value);
27690 if (cfunction == __Pyx_CyFunction_annotate_impl && value_self == op_in) {
27691 return __Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, NULL);
27694 if (value != Py_None) {
27695 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27696 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27697 Py_CLEAR(op->func_annotations);
27698 __Pyx_END_CRITICAL_SECTION();
27700 return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
27702#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
27704__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
27705 int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
27706 if (is_coroutine) {
27707 PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
27708 fromlist = PyList_New(1);
27709 if (unlikely(!fromlist))
return NULL;
27711#if CYTHON_ASSUME_SAFE_MACROS
27712 PyList_SET_ITEM(fromlist, 0, marker);
27714 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
27715 Py_DECREF(fromlist);
27719 module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
27720 Py_DECREF(fromlist);
27721 if (unlikely(!module)) {
27722 goto ignore_or_error;
27724 is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
27726 if (likely(is_coroutine_value)) {
27727 return is_coroutine_value;
27730 if (!__Pyx_IgnoreException(PyExc_Exception)) {
27734 return __Pyx_PyBool_FromLong(is_coroutine);
27737__Pyx_CyFunction_get_is_coroutine(PyObject *op_in,
void *context) {
27738 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27740 CYTHON_UNUSED_VAR(context);
27741 if (op->func_is_coroutine) {
27742 return __Pyx_NewRef(op->func_is_coroutine);
27744 result = __Pyx_CyFunction_get_is_coroutine_value(op);
27745 if (unlikely(!result))
27747 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
27748 if (op->func_is_coroutine) {
27750 result = __Pyx_NewRef(op->func_is_coroutine);
27752 op->func_is_coroutine = __Pyx_NewRef(result);
27754 __Pyx_END_CRITICAL_SECTION();
27758static void __Pyx_CyFunction_raise_argument_count_error(PyObject *func,
const char* message, Py_ssize_t size) {
27759#if CYTHON_COMPILING_IN_LIMITED_API
27760 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
27761 if (!py_name)
return;
27762 PyErr_Format(PyExc_TypeError,
27763 "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
27764 py_name, message, size);
27765 Py_DECREF(py_name);
27767 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
27768 PyErr_Format(PyExc_TypeError,
27769 "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T
"d given)",
27770 name, message, size);
27773static void __Pyx_CyFunction_raise_type_error(PyObject *func,
const char* message) {
27774#if CYTHON_COMPILING_IN_LIMITED_API
27775 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
27776 if (!py_name)
return;
27777 PyErr_Format(PyExc_TypeError,
27780 Py_DECREF(py_name);
27782 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
27783 PyErr_Format(PyExc_TypeError,
27788#if CYTHON_COMPILING_IN_LIMITED_API
27790__Pyx_CyFunction_get_module(PyObject *op_in,
void *context) {
27791 CYTHON_UNUSED_VAR(context);
27792 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27793 Py_INCREF(op->func_module);
27794 return op->func_module;
27797__Pyx_CyFunction_set_module(PyObject *op_in, PyObject* value,
void *context) {
27798 CYTHON_UNUSED_VAR(context);
27799 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
27800 if (value == NULL) {
27804 PyObject *old = op->func_module;
27805 op->func_module = value;
27810static PyGetSetDef __pyx_CyFunction_getsets[] = {
27811 {
"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
27812 {
"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
27813 {
"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
27814 {
"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
27815 {
"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
27816#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
27817 {
"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
27818 {
"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
27820 {
"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
27821 {
"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
27823 {
"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
27824 {
"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
27825 {
"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
27826 {
"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
27827 {
"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
27828 {
"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
27829 {
"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
27830 {
"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
27831 {
"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
27832 {
"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
27833 {
"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0},
27834#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
27835 {
"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
27837#if CYTHON_COMPILING_IN_LIMITED_API
27838 {
"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
27842static PyMemberDef __pyx_CyFunction_members[] = {
27843#if !CYTHON_COMPILING_IN_LIMITED_API
27844 {
"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
27846#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
27847 {
"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict),
27848 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
27850#if CYTHON_VECTORCALL
27851#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
27852 {
"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall),
27853 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
27855 {
"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
27857#if CYTHON_COMPILING_IN_LIMITED_API
27858 {
"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist),
27859 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
27861 {
"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
27867__Pyx_CyFunction_reduce(PyObject *m_in, PyObject *args)
27869 PyObject *result = NULL;
27870 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
27871 CYTHON_UNUSED_VAR(args);
27872 __Pyx_BEGIN_CRITICAL_SECTION(m_in);
27873 Py_INCREF(m->func_qualname);
27874 result = m->func_qualname;
27875 __Pyx_END_CRITICAL_SECTION();
27878static PyMethodDef __pyx_CyFunction_methods[] = {
27879 {
"__annotate_cython__", __Pyx_CyFunction_annotate_impl, METH_O,
27880 "Placeholder __annotate__ function to allow 'functools.wraps' to work "
27881 "on Cython functions."},
27882 {
"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_NOARGS, 0},
27886__Pyx_CyFunction_get_annotate(PyObject *op_in,
void *context) {
27887 PyObject *annotate = NULL;
27888 CYTHON_UNUSED_VAR(context);
27889 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0))
return NULL;
27890 if (annotate)
return annotate;
27891 PyObject *method = PyCFunction_New(
27892 &__pyx_CyFunction_methods[0],
27896#if CYTHON_COMPILING_IN_LIMITED_API
27897#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
27899#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
27901static PyObject *__Pyx_CyFunction_Init(PyObject *op_in,
27902 PyMethodDef *ml,
int flags, PyObject* qualname,
27903 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
27904 __pyx_CyFunctionObject* op = __Pyx_as_CyFunctionObject(op_in);
27905#if !CYTHON_COMPILING_IN_LIMITED_API
27906 PyCFunctionObject *cf = (PyCFunctionObject*) op;
27908 if (unlikely(op == NULL))
27910#if CYTHON_COMPILING_IN_LIMITED_API
27911 op->func_methoddef = ml;
27913 op->func_module =
module;
27916 __Pyx_CyFunction_weakreflist(op) = NULL;
27917#if !CYTHON_COMPILING_IN_LIMITED_API
27919 cf->m_self = (PyObject *) op;
27921 Py_XINCREF(closure);
27922 op->func_closure = closure;
27923#if !CYTHON_COMPILING_IN_LIMITED_API
27924 Py_XINCREF(module);
27925 cf->m_module =
module;
27927#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
27928 op->func_dict = NULL;
27930 op->func_name = NULL;
27931 Py_INCREF(qualname);
27932 op->func_qualname = qualname;
27933 op->func_doc = NULL;
27934#if CYTHON_COMPILING_IN_LIMITED_API
27935 op->func_classobj = NULL;
27937 ((PyCMethodObject*)op)->mm_class = NULL;
27939 op->func_globals = globals;
27940 Py_INCREF(op->func_globals);
27942 op->func_code = code;
27943 op->defaults = NULL;
27944 op->defaults_tuple = NULL;
27945 op->defaults_kwdict = NULL;
27946 op->defaults_getter = NULL;
27947 op->func_annotations = NULL;
27948#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
27949 op->func_is_coroutine = NULL;
27951#if CYTHON_VECTORCALL
27952 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
27954 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
27957 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
27959 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
27960 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
27962 case METH_FASTCALL | METH_KEYWORDS:
27963 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
27965 case METH_VARARGS | METH_KEYWORDS:
27966 __Pyx_CyFunction_func_vectorcall(op) = NULL;
27969 PyErr_SetString(PyExc_SystemError,
"Bad call flags for CyFunction");
27976static int __Pyx__CyFunction_clear(__pyx_CyFunctionObject *m)
27978 Py_CLEAR(m->func_closure);
27979#if CYTHON_COMPILING_IN_LIMITED_API
27980 Py_CLEAR(m->func_module);
27982 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
27984#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
27985 Py_CLEAR(m->func_dict);
27986#elif PY_VERSION_HEX < 0x030d0000
27987 _PyObject_ClearManagedDict((PyObject*)m);
27989 PyObject_ClearManagedDict((PyObject*)m);
27991 Py_CLEAR(m->func_name);
27992 Py_CLEAR(m->func_qualname);
27993 Py_CLEAR(m->func_doc);
27994 Py_CLEAR(m->func_globals);
27995 Py_CLEAR(m->func_code);
27996#if CYTHON_COMPILING_IN_LIMITED_API
27997 Py_CLEAR(m->func_classobj);
28000 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
28001 ((PyCMethodObject *) (m))->mm_class = NULL;
28005 Py_CLEAR(m->defaults_tuple);
28006 Py_CLEAR(m->defaults_kwdict);
28007 Py_CLEAR(m->func_annotations);
28008#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
28009 Py_CLEAR(m->func_is_coroutine);
28011 Py_CLEAR(m->defaults);
28015__Pyx_CyFunction_clear(PyObject *m)
28017 return __Pyx__CyFunction_clear(__Pyx_as_CyFunctionObject(m));
28019static void __Pyx__CyFunction_dealloc(PyObject *m)
28021 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(m);
28022 if (__Pyx_CyFunction_weakreflist(cyfunc) != NULL)
28023 PyObject_ClearWeakRefs(m);
28024 __Pyx__CyFunction_clear(cyfunc);
28025 __Pyx_PyHeapTypeObject_GC_Del(m);
28027static void __Pyx_CyFunction_dealloc(PyObject *m)
28029 PyObject_GC_UnTrack(m);
28030 __Pyx__CyFunction_dealloc(m);
28032static int __Pyx_CyFunction_traverse(PyObject *m_in, visitproc visit,
void *arg)
28034 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
28036 int e = __Pyx_call_type_traverse(m_in, 1, visit, arg);
28039 Py_VISIT(m->func_closure);
28040#if CYTHON_COMPILING_IN_LIMITED_API
28041 Py_VISIT(m->func_module);
28043 Py_VISIT(((PyCFunctionObject*)m)->m_module);
28045#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
28046 Py_VISIT(m->func_dict);
28050#if PY_VERSION_HEX < 0x030d0000
28051 _PyObject_VisitManagedDict
28053 PyObject_VisitManagedDict
28055 ((PyObject*)m, visit, arg);
28056 if (e != 0)
return e;
28059 __Pyx_VISIT_CONST(m->func_name);
28060 __Pyx_VISIT_CONST(m->func_qualname);
28061 Py_VISIT(m->func_doc);
28062 Py_VISIT(m->func_globals);
28063 __Pyx_VISIT_CONST(m->func_code);
28064 Py_VISIT(__Pyx__CyFunction_GetClassObj(m));
28065 Py_VISIT(m->defaults_tuple);
28066 Py_VISIT(m->defaults_kwdict);
28067 Py_VISIT(m->func_annotations);
28068#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
28069 Py_VISIT(m->func_is_coroutine);
28071 Py_VISIT(m->defaults);
28075__Pyx_CyFunction_repr(PyObject *op_in)
28077 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
28079 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
28080 repr = PyUnicode_FromFormat(
"<cyfunction %U at %p>",
28081 op->func_qualname, (
void *)op);
28082 __Pyx_END_CRITICAL_SECTION();
28085static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
28086#if CYTHON_COMPILING_IN_LIMITED_API
28087 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
28088 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
28089 int flags = cyfunc->func_methoddef->ml_flags;
28091 PyCFunctionObject*
f = (PyCFunctionObject*)func;
28092 PyCFunction meth =
f->m_ml->ml_meth;
28093 int flags =
f->m_ml->ml_flags;
28096 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
28098 if (likely(kw == NULL || PyDict_Size(kw) == 0))
28099 return (*meth)(self, arg);
28101 case METH_VARARGS | METH_KEYWORDS:
28102 return (*(PyCFunctionWithKeywords)(
void(*)(
void))meth)(self, arg, kw);
28104 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
28105#if CYTHON_ASSUME_SAFE_SIZE
28106 size = PyTuple_GET_SIZE(arg);
28108 size = PyTuple_Size(arg);
28109 if (unlikely(size < 0))
return NULL;
28111 if (likely(size == 0))
28112 return (*meth)(self, NULL);
28113 __Pyx_CyFunction_raise_argument_count_error(
28115 "takes no arguments", size);
28120 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
28121#if CYTHON_ASSUME_SAFE_SIZE
28122 size = PyTuple_GET_SIZE(arg);
28124 size = PyTuple_Size(arg);
28125 if (unlikely(size < 0))
return NULL;
28127 if (likely(size == 1)) {
28128 PyObject *result, *arg0;
28129 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
28130 arg0 = PyTuple_GET_ITEM(arg, 0);
28132 arg0 = __Pyx_PySequence_ITEM(arg, 0);
if (unlikely(!arg0))
return NULL;
28134 result = (*meth)(self, arg0);
28135 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
28140 __Pyx_CyFunction_raise_argument_count_error(
28142 "takes exactly one argument", size);
28147 PyErr_SetString(PyExc_SystemError,
"Bad call flags for CyFunction");
28150 __Pyx_CyFunction_raise_type_error(
28151 func,
"takes no keyword arguments");
28154static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
28156 result = __Pyx_CyFunction_CallMethod(func, func, arg, kw);
28159static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
28161 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
28162#if CYTHON_VECTORCALL
28163 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
28165#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
28166 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (
size_t)PyTuple_GET_SIZE(args), kw);
28168 (void) &__Pyx_PyVectorcall_FastCallDict;
28169 return PyVectorcall_Call(func, args, kw);
28173 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
28175 PyObject *new_args;
28177#if CYTHON_ASSUME_SAFE_SIZE
28178 argc = PyTuple_GET_SIZE(args);
28180 argc = PyTuple_Size(args);
28181 if (unlikely(argc < 0))
return NULL;
28183 new_args = PyTuple_GetSlice(args, 1, argc);
28184 if (unlikely(!new_args))
28186 self = PyTuple_GetItem(args, 0);
28187 if (unlikely(!self)) {
28188 Py_DECREF(new_args);
28189 PyErr_Format(PyExc_TypeError,
28190 "unbound method %.200S() needs an argument",
28191 cyfunc->func_qualname);
28194 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
28195 Py_DECREF(new_args);
28197 result = __Pyx_CyFunction_Call(func, args, kw);
28201#if CYTHON_VECTORCALL
28202static CYTHON_INLINE
int __Pyx_CyFunction_Vectorcall_CheckArgs(PyObject *func, __pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
28205 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
28206 if (unlikely(nargs < 1)) {
28207 __Pyx_CyFunction_raise_type_error(
28208 func,
"needs an argument");
28213 if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
28214 __Pyx_CyFunction_raise_type_error(
28215 func,
"takes no keyword arguments");
28220static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
28222 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
28223 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28225#if CYTHON_COMPILING_IN_LIMITED_API
28226 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
28227 if (unlikely(!meth))
return NULL;
28229 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
28231 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
28243 if (unlikely(nargs != 0)) {
28244 __Pyx_CyFunction_raise_argument_count_error(
28245 func,
"takes no arguments", nargs);
28248 return meth(self, NULL);
28250static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
28252 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
28253 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28255#if CYTHON_COMPILING_IN_LIMITED_API
28256 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
28257 if (unlikely(!meth))
return NULL;
28259 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
28261 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
28273 if (unlikely(nargs != 1)) {
28274 __Pyx_CyFunction_raise_argument_count_error(
28275 func,
"takes exactly one argument", nargs);
28278 return meth(self, args[0]);
28280static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
28282 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
28283 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28285#if CYTHON_COMPILING_IN_LIMITED_API
28286 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
28287 if (unlikely(!meth))
return NULL;
28289 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
28291 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
28303 return ((__Pyx_PyCFunctionFastWithKeywords)(
void(*)(
void))meth)(self, args, nargs, kwnames);
28305static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *
const *args,
size_t nargsf, PyObject *kwnames)
28307 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
28308 PyTypeObject *cls = (PyTypeObject *) __Pyx__CyFunction_GetClassObj(cyfunc);
28309 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
28311#if CYTHON_COMPILING_IN_LIMITED_API
28312 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
28313 if (unlikely(!meth))
return NULL;
28315 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
28317 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
28329 #if PY_VERSION_HEX < 0x030e00A6
28330 size_t nargs_value = (size_t) nargs;
28332 Py_ssize_t nargs_value = nargs;
28334 return ((__Pyx_PyCMethod)(
void(*)(
void))meth)(self, cls, args, nargs_value, kwnames);
28337static PyType_Slot __pyx_CyFunctionType_slots[] = {
28338 {Py_tp_dealloc, (
void *)__Pyx_CyFunction_dealloc},
28339 {Py_tp_repr, (
void *)__Pyx_CyFunction_repr},
28340 {Py_tp_call, (
void *)__Pyx_CyFunction_CallAsMethod},
28341 {Py_tp_traverse, (
void *)__Pyx_CyFunction_traverse},
28342 {Py_tp_clear, (
void *)__Pyx_CyFunction_clear},
28343 {Py_tp_methods, (
void *)__pyx_CyFunction_methods},
28344 {Py_tp_members, (
void *)__pyx_CyFunction_members},
28345 {Py_tp_getset, (
void *)__pyx_CyFunction_getsets},
28346 {Py_tp_descr_get, (
void *)__Pyx_PyMethod_New},
28349static PyType_Spec __pyx_CyFunctionType_spec = {
28350 __PYX_TYPE_MODULE_PREFIX
"cython_function_or_method",
28351 __PYX_SHARED_SIZEOF(__pyx_CyFunctionObject),
28353#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
28354 Py_TPFLAGS_METHOD_DESCRIPTOR |
28356#if CYTHON_VECTORCALL
28357#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
28358 Py_TPFLAGS_HAVE_VECTORCALL |
28359#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
28360 _Py_TPFLAGS_HAVE_VECTORCALL |
28363#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
28364 Py_TPFLAGS_MANAGED_DICT |
28366 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
28367 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
28368 __pyx_CyFunctionType_slots
28370static int __pyx_CyFunction_init(PyObject *module) {
28371 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
28372 mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
28373 mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
28374 if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
28381static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
int flags, PyObject* qualname,
28382 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
28383 (void)&__Pyx_Get_CyFunction_Type;
28384 PyObject *op = __Pyx_CyFunction_Init(
28385 PyObject_GC_New(PyObject, __pyx_mstate_global->__pyx_CyFunctionType),
28386 ml, flags, qualname, closure, module, globals, code
28389 PyObject_GC_Track(op);
28393static PyTypeObject *__Pyx_Get_CyFunction_Type(
void) {
28394 PyTypeObject *tp = __pyx_mstate_global->__pyx_CyFunctionType;
28395 Py_INCREF((PyObject*)tp);
28400static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
28401 PyObject *args[3] = {NULL, arg1, arg2};
28402 return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
28406#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
28407static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name,
int with_error) {
28409 PyTypeObject *tp = Py_TYPE(obj);
28410 res = _PyType_Lookup(tp, attr_name);
28412 descrgetfunc
f = Py_TYPE(res)->tp_descr_get;
28416 res =
f(res, obj, (PyObject *)tp);
28418 }
else if (with_error) {
28419 PyErr_SetObject(PyExc_AttributeError, attr_name);
28426static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
28427 PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
28430 PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
28432 PyObject *pargs[3] = {NULL, name, bases};
28433 ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
28436 if (unlikely(PyErr_Occurred()))
28445 if (unlikely(PyObject_SetItem(
ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0))
goto bad;
28446 if (unlikely(PyObject_SetItem(
ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0))
goto bad;
28447 if (unlikely(doc && PyObject_SetItem(
ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0))
goto bad;
28453static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
28454 PyObject *dict, PyObject *mkw,
28455 int calculate_metaclass,
int allow_py2_metaclass) {
28457 PyObject *owned_metaclass = NULL;
28458 PyObject *margs[4] = {NULL, name, bases, dict};
28459 if (allow_py2_metaclass) {
28460 owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass);
28461 if (owned_metaclass) {
28462 metaclass = owned_metaclass;
28463 }
else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
28469 if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
28470 metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
28471 Py_XDECREF(owned_metaclass);
28472 if (unlikely(!metaclass))
28474 owned_metaclass = metaclass;
28476 result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
28477 Py_XDECREF(owned_metaclass);
28482#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
28483#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
28484#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
28485#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
28486#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
28488PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
28489 PyObject **dict_ptr = _PyObject_GetDictPtr(o);
28490 return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
28493static int __Pyx_CLineForTraceback(PyThreadState *tstate,
int c_line) {
28494 PyObject *use_cline = NULL;
28495 PyObject *ptype, *pvalue, *ptraceback;
28496 PyObject *cython_runtime_dict;
28497 CYTHON_MAYBE_UNUSED_VAR(tstate);
28498 if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
28501 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
28502 cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
28503 if (likely(cython_runtime_dict)) {
28504 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
28505 use_cline, cython_runtime_dict,
28506 __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
28508 if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
28511 Py_XDECREF(use_cline);
28512 Py_XDECREF(cython_runtime_dict);
28513 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
28519static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries,
int count,
int code_line) {
28520 int start = 0, mid = 0, end = count - 1;
28521 if (end >= 0 && code_line > entries[end].code_line) {
28524 while (start < end) {
28525 mid = start + (end - start) / 2;
28526 if (code_line < entries[mid].code_line) {
28528 }
else if (code_line > entries[mid].code_line) {
28534 if (code_line <= entries[mid].code_line) {
28540static __Pyx_CachedCodeObjectType *__pyx__find_code_object(
struct __Pyx_CodeObjectCache *code_cache,
int code_line) {
28541 __Pyx_CachedCodeObjectType* code_object;
28543 if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
28546 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
28547 if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
28550 code_object = code_cache->entries[pos].code_object;
28551 Py_INCREF(code_object);
28552 return code_object;
28554static __Pyx_CachedCodeObjectType *__pyx_find_code_object(
int code_line) {
28555#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
28556 (void)__pyx__find_code_object;
28559 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
28560#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
28561 __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
28562 if (old_count < 0) {
28563 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
28567 __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
28568#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
28569 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
28574static void __pyx__insert_code_object(
struct __Pyx_CodeObjectCache *code_cache,
int code_line, __Pyx_CachedCodeObjectType* code_object)
28577 __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
28578 if (unlikely(!code_line)) {
28581 if (unlikely(!entries)) {
28582 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*
sizeof(__Pyx_CodeObjectCacheEntry));
28583 if (likely(entries)) {
28584 code_cache->entries = entries;
28585 code_cache->max_count = 64;
28586 code_cache->count = 1;
28587 entries[0].code_line = code_line;
28588 entries[0].code_object = code_object;
28589 Py_INCREF(code_object);
28593 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
28594 if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
28595 __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
28596 entries[pos].code_object = code_object;
28597 Py_INCREF(code_object);
28601 if (code_cache->count == code_cache->max_count) {
28602 int new_max = code_cache->max_count + 64;
28603 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
28604 code_cache->entries, ((
size_t)new_max) *
sizeof(__Pyx_CodeObjectCacheEntry));
28605 if (unlikely(!entries)) {
28608 code_cache->entries = entries;
28609 code_cache->max_count = new_max;
28611 for (i=code_cache->count; i>pos; i--) {
28612 entries[i] = entries[i-1];
28614 entries[pos].code_line = code_line;
28615 entries[pos].code_object = code_object;
28616 code_cache->count++;
28617 Py_INCREF(code_object);
28619static void __pyx_insert_code_object(
int code_line, __Pyx_CachedCodeObjectType* code_object) {
28620#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
28621 (void)__pyx__insert_code_object;
28624 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
28625#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
28626 __pyx_nonatomic_int_type expected = 0;
28627 if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
28631 __pyx__insert_code_object(code_cache, code_line, code_object);
28632#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
28633 __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
28639#include "compile.h"
28640#include "frameobject.h"
28641#include "traceback.h"
28642#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
28643 #ifndef Py_BUILD_CORE
28644 #define Py_BUILD_CORE 1
28646 #include "internal/pycore_frame.h"
28648#if CYTHON_COMPILING_IN_LIMITED_API
28649static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
28650 PyObject *firstlineno, PyObject *name) {
28651 PyObject *replace = NULL;
28652 if (unlikely(PyDict_SetItemString(scratch_dict,
"co_firstlineno", firstlineno)))
return NULL;
28653 if (unlikely(PyDict_SetItemString(scratch_dict,
"co_name", name)))
return NULL;
28654 replace = PyObject_GetAttrString(code,
"replace");
28655 if (likely(replace)) {
28656 PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
28657 Py_DECREF(replace);
28662static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
28663 int py_line,
const char *filename) {
28664 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
28665 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
28666 PyObject *exc_type, *exc_value, *exc_traceback;
28669 c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
28671 __Pyx_PyErr_FetchException(&exc_type, &exc_value, &exc_traceback);
28672 code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
28673 if (!code_object) {
28674 code_object = Py_CompileString(
"_getframe()", filename, Py_eval_input);
28675 if (unlikely(!code_object))
goto bad;
28676 py_py_line = PyLong_FromLong(py_line);
28677 if (unlikely(!py_py_line))
goto bad;
28679 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
28681 py_funcname = PyUnicode_FromString(funcname);
28683 if (unlikely(!py_funcname))
goto bad;
28684 dict = PyDict_New();
28685 if (unlikely(!dict))
goto bad;
28687 PyObject *old_code_object = code_object;
28688 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
28689 Py_DECREF(old_code_object);
28691 if (unlikely(!code_object))
goto bad;
28692 __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
28694 dict = PyDict_New();
28696 getframe = PySys_GetObject(
"_getframe");
28697 if (unlikely(!getframe))
goto bad;
28698 if (unlikely(PyDict_SetItemString(dict,
"_getframe", getframe)))
goto bad;
28699 frame = PyEval_EvalCode(code_object, dict, dict);
28700 if (unlikely(!frame) || frame == Py_None)
goto bad;
28703 __Pyx_PyErr_RestoreException(exc_type, exc_value, exc_traceback);
28704 Py_XDECREF(code_object);
28705 Py_XDECREF(py_py_line);
28706 Py_XDECREF(py_funcname);
28708 Py_XDECREF(replace);
28711 (
struct _frame*)frame);
28716static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
28717 const char *funcname,
int c_line,
28718 int py_line,
const char *filename) {
28719 PyCodeObject *py_code = NULL;
28720 PyObject *py_funcname = NULL;
28722 py_funcname = PyUnicode_FromFormat(
"%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
28723 if (!py_funcname)
goto bad;
28724 funcname = PyUnicode_AsUTF8(py_funcname);
28725 if (!funcname)
goto bad;
28727 py_code = PyCode_NewEmpty(filename, funcname, py_line);
28728 Py_XDECREF(py_funcname);
28731 Py_XDECREF(py_funcname);
28734static void __Pyx_AddTraceback(
const char *funcname,
int c_line,
28735 int py_line,
const char *filename) {
28736 PyCodeObject *py_code = 0;
28737 PyFrameObject *py_frame = 0;
28738 PyThreadState *tstate = __Pyx_PyThreadState_Current;
28739 PyObject *ptype, *pvalue, *ptraceback;
28741 c_line = __Pyx_CLineForTraceback(tstate, c_line);
28743 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
28745 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
28746 py_code = __Pyx_CreateCodeObjectForTraceback(
28747 funcname, c_line, py_line, filename);
28752 Py_XDECREF(pvalue);
28753 Py_XDECREF(ptraceback);
28756 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
28757 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
28759 py_frame = PyFrame_New(
28762 __pyx_mstate_global->__pyx_d,
28765 if (!py_frame)
goto bad;
28766 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
28767 PyTraceBack_Here(py_frame);
28769 Py_XDECREF(py_code);
28770 Py_XDECREF(py_frame);
28775#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
28776 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
28777#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
28778 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
28779#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
28781 func_type value = func_value;\
28782 if (sizeof(target_type) < sizeof(func_type)) {\
28783 if (unlikely(value != (func_type) (target_type) value)) {\
28784 func_type zero = 0;\
28785 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
28786 return (target_type) -1;\
28787 if (is_unsigned && unlikely(value < zero))\
28788 goto raise_neg_overflow;\
28790 goto raise_overflow;\
28793 return (target_type) value;\
28797#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
28799 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
28800 return ::std::complex< float >(x, y);
28803 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
28804 return x + y*(__pyx_t_float_complex)_Complex_I;
28808 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(
float x,
float y) {
28809 __pyx_t_float_complex
z;
28817#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
28819 static CYTHON_INLINE
int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
28820 return (a.real == b.real) && (a.imag == b.imag);
28822 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
28823 __pyx_t_float_complex
z;
28824 z.real = a.real + b.real;
28825 z.imag = a.imag + b.imag;
28828 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
28829 __pyx_t_float_complex
z;
28830 z.real = a.real - b.real;
28831 z.imag = a.imag - b.imag;
28834 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
28835 __pyx_t_float_complex
z;
28836 z.real = a.real * b.real - a.imag * b.imag;
28837 z.imag = a.real * b.imag + a.imag * b.real;
28841 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
28843 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
28844 }
else if (fabsf(b.real) >= fabsf(b.imag)) {
28845 if (b.real == 0 && b.imag == 0) {
28846 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
28848 float r = b.imag / b.real;
28849 float s = (float)(1.0) / (b.real + b.imag *
r);
28850 return __pyx_t_float_complex_from_parts(
28851 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
28854 float r = b.real / b.imag;
28855 float s = (float)(1.0) / (b.imag + b.real *
r);
28856 return __pyx_t_float_complex_from_parts(
28857 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
28861 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
28863 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
28865 float denom = b.real * b.real + b.imag * b.imag;
28866 return __pyx_t_float_complex_from_parts(
28867 (a.real * b.real + a.imag * b.imag) / denom,
28868 (a.imag * b.real - a.real * b.imag) / denom);
28872 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
28873 __pyx_t_float_complex
z;
28878 static CYTHON_INLINE
int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
28879 return (a.real == 0) && (a.imag == 0);
28881 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
28882 __pyx_t_float_complex
z;
28888 static CYTHON_INLINE
float __Pyx_c_abs_float(__pyx_t_float_complex
z) {
28889 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
28890 return sqrtf(
z.real*
z.real +
z.imag*
z.imag);
28892 return hypotf(
z.real,
z.imag);
28895 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
28896 __pyx_t_float_complex
z;
28897 float r, lnr, theta, z_r, z_theta;
28898 if (b.imag == 0 && b.real == (
int)b.real) {
28900 float denom = a.real * a.real + a.imag * a.imag;
28901 a.real = a.real / denom;
28902 a.imag = -a.imag / denom;
28905 switch ((
int)b.real) {
28913 return __Pyx_c_prod_float(a, a);
28915 z = __Pyx_c_prod_float(a, a);
28916 return __Pyx_c_prod_float(
z, a);
28918 z = __Pyx_c_prod_float(a, a);
28919 return __Pyx_c_prod_float(
z,
z);
28925 }
else if ((b.imag == 0) && (a.real >= 0)) {
28926 z.real = powf(a.real, b.real);
28929 }
else if (a.real > 0) {
28934 theta = atan2f(0.0, -1.0);
28937 r = __Pyx_c_abs_float(a);
28938 theta = atan2f(a.imag, a.real);
28941 z_r = expf(lnr * b.real - theta * b.imag);
28942 z_theta = theta * b.real + lnr * b.imag;
28943 z.real = z_r * cosf(z_theta);
28944 z.imag = z_r * sinf(z_theta);
28951#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
28953 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
28954 return ::std::complex< double >(x, y);
28957 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
28958 return x + y*(__pyx_t_double_complex)_Complex_I;
28962 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(
double x,
double y) {
28963 __pyx_t_double_complex
z;
28971#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
28973 static CYTHON_INLINE
int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
28974 return (a.real == b.real) && (a.imag == b.imag);
28976 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
28977 __pyx_t_double_complex
z;
28978 z.real = a.real + b.real;
28979 z.imag = a.imag + b.imag;
28982 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
28983 __pyx_t_double_complex
z;
28984 z.real = a.real - b.real;
28985 z.imag = a.imag - b.imag;
28988 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
28989 __pyx_t_double_complex
z;
28990 z.real = a.real * b.real - a.imag * b.imag;
28991 z.imag = a.real * b.imag + a.imag * b.real;
28995 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
28997 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
28998 }
else if (fabs(b.real) >= fabs(b.imag)) {
28999 if (b.real == 0 && b.imag == 0) {
29000 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
29002 double r = b.imag / b.real;
29003 double s = (double)(1.0) / (b.real + b.imag *
r);
29004 return __pyx_t_double_complex_from_parts(
29005 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
29008 double r = b.real / b.imag;
29009 double s = (double)(1.0) / (b.imag + b.real *
r);
29010 return __pyx_t_double_complex_from_parts(
29011 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
29015 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
29017 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
29019 double denom = b.real * b.real + b.imag * b.imag;
29020 return __pyx_t_double_complex_from_parts(
29021 (a.real * b.real + a.imag * b.imag) / denom,
29022 (a.imag * b.real - a.real * b.imag) / denom);
29026 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
29027 __pyx_t_double_complex
z;
29032 static CYTHON_INLINE
int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
29033 return (a.real == 0) && (a.imag == 0);
29035 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
29036 __pyx_t_double_complex
z;
29042 static CYTHON_INLINE
double __Pyx_c_abs_double(__pyx_t_double_complex
z) {
29043 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
29044 return sqrt(
z.real*
z.real +
z.imag*
z.imag);
29046 return hypot(
z.real,
z.imag);
29049 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
29050 __pyx_t_double_complex
z;
29051 double r, lnr, theta, z_r, z_theta;
29052 if (b.imag == 0 && b.real == (
int)b.real) {
29054 double denom = a.real * a.real + a.imag * a.imag;
29055 a.real = a.real / denom;
29056 a.imag = -a.imag / denom;
29059 switch ((
int)b.real) {
29067 return __Pyx_c_prod_double(a, a);
29069 z = __Pyx_c_prod_double(a, a);
29070 return __Pyx_c_prod_double(
z, a);
29072 z = __Pyx_c_prod_double(a, a);
29073 return __Pyx_c_prod_double(
z,
z);
29079 }
else if ((b.imag == 0) && (a.real >= 0)) {
29080 z.real = pow(a.real, b.real);
29083 }
else if (a.real > 0) {
29088 theta = atan2(0.0, -1.0);
29091 r = __Pyx_c_abs_double(a);
29092 theta = atan2(a.imag, a.real);
29095 z_r = exp(lnr * b.real - theta * b.imag);
29096 z_theta = theta * b.real + lnr * b.imag;
29097 z.real = z_r * cos(z_theta);
29098 z.imag = z_r * sin(z_theta);
29105#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
29107 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double x,
long double y) {
29108 return ::std::complex< long double >(x, y);
29111 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double x,
long double y) {
29112 return x + y*(__pyx_t_long_double_complex)_Complex_I;
29116 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(
long double x,
long double y) {
29117 __pyx_t_long_double_complex
z;
29125#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
29127 static CYTHON_INLINE
int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
29128 return (a.real == b.real) && (a.imag == b.imag);
29130 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
29131 __pyx_t_long_double_complex
z;
29132 z.real = a.real + b.real;
29133 z.imag = a.imag + b.imag;
29136 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
29137 __pyx_t_long_double_complex
z;
29138 z.real = a.real - b.real;
29139 z.imag = a.imag - b.imag;
29142 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
29143 __pyx_t_long_double_complex
z;
29144 z.real = a.real * b.real - a.imag * b.imag;
29145 z.imag = a.real * b.imag + a.imag * b.real;
29149 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
29151 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
29152 }
else if (fabsl(b.real) >= fabsl(b.imag)) {
29153 if (b.real == 0 && b.imag == 0) {
29154 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
29156 long double r = b.imag / b.real;
29157 long double s = (
long double)(1.0) / (b.real + b.imag *
r);
29158 return __pyx_t_long_double_complex_from_parts(
29159 (a.real + a.imag *
r) *
s, (a.imag - a.real *
r) *
s);
29162 long double r = b.real / b.imag;
29163 long double s = (
long double)(1.0) / (b.imag + b.real *
r);
29164 return __pyx_t_long_double_complex_from_parts(
29165 (a.real *
r + a.imag) *
s, (a.imag *
r - a.real) *
s);
29169 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
29171 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
29173 long double denom = b.real * b.real + b.imag * b.imag;
29174 return __pyx_t_long_double_complex_from_parts(
29175 (a.real * b.real + a.imag * b.imag) / denom,
29176 (a.imag * b.real - a.real * b.imag) / denom);
29180 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
29181 __pyx_t_long_double_complex
z;
29186 static CYTHON_INLINE
int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
29187 return (a.real == 0) && (a.imag == 0);
29189 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
29190 __pyx_t_long_double_complex
z;
29196 static CYTHON_INLINE
long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex
z) {
29197 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
29198 return sqrtl(
z.real*
z.real +
z.imag*
z.imag);
29200 return hypotl(
z.real,
z.imag);
29203 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
29204 __pyx_t_long_double_complex
z;
29205 long double r, lnr, theta, z_r, z_theta;
29206 if (b.imag == 0 && b.real == (
int)b.real) {
29208 long double denom = a.real * a.real + a.imag * a.imag;
29209 a.real = a.real / denom;
29210 a.imag = -a.imag / denom;
29213 switch ((
int)b.real) {
29221 return __Pyx_c_prod_long__double(a, a);
29223 z = __Pyx_c_prod_long__double(a, a);
29224 return __Pyx_c_prod_long__double(
z, a);
29226 z = __Pyx_c_prod_long__double(a, a);
29227 return __Pyx_c_prod_long__double(
z,
z);
29233 }
else if ((b.imag == 0) && (a.real >= 0)) {
29234 z.real = powl(a.real, b.real);
29237 }
else if (a.real > 0) {
29242 theta = atan2l(0.0, -1.0);
29245 r = __Pyx_c_abs_long__double(a);
29246 theta = atan2l(a.imag, a.real);
29249 z_r = expl(lnr * b.real - theta * b.imag);
29250 z_theta = theta * b.real + lnr * b.imag;
29251 z.real = z_r * cosl(z_theta);
29252 z.imag = z_r * sinl(z_theta);
29259static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(
long value) {
29260#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29261#pragma GCC diagnostic push
29262#pragma GCC diagnostic ignored "-Wconversion"
29264 const long neg_one = (long) -1, const_zero = (
long) 0;
29265#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29266#pragma GCC diagnostic pop
29268 const int is_unsigned = neg_one > const_zero;
29270 if (
sizeof(
long) <
sizeof(
long)) {
29271 return PyLong_FromLong((
long) value);
29272 }
else if (
sizeof(
long) <=
sizeof(
unsigned long)) {
29273 return PyLong_FromUnsignedLong((
unsigned long) value);
29274#if !CYTHON_COMPILING_IN_PYPY
29275 }
else if (
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG)) {
29276 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
29280 if (
sizeof(
long) <=
sizeof(
long)) {
29281 return PyLong_FromLong((
long) value);
29282 }
else if (
sizeof(
long) <=
sizeof(PY_LONG_LONG)) {
29283 return PyLong_FromLongLong((PY_LONG_LONG) value);
29287 unsigned char *bytes = (
unsigned char *)&value;
29288#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
29290 return PyLong_FromUnsignedNativeBytes(bytes,
sizeof(value), -1);
29292 return PyLong_FromNativeBytes(bytes,
sizeof(value), -1);
29294#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
29295 int one = 1;
int little = (int)*(
unsigned char *)&one;
29296 return _PyLong_FromByteArray(bytes,
sizeof(
long),
29297 little, !is_unsigned);
29299 int one = 1;
int little = (int)*(
unsigned char *)&one;
29300 PyObject *result = NULL, *kwds = NULL;
29301 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
29302 py_bytes = PyBytes_FromStringAndSize((
char*)bytes,
sizeof(
long));
29303 if (!py_bytes)
goto limited_bad;
29304 from_bytes_str = PyUnicode_FromStringAndSize(
"from_bytes", 10);
29305 if (!from_bytes_str)
goto limited_bad;
29306 order_str = PyUnicode_FromString(little ?
"little" :
"big");
29307 if (!order_str)
goto limited_bad;
29309 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
29310 if (!is_unsigned) {
29311 PyObject *signed_str = PyUnicode_FromStringAndSize(
"signed", 6);
29312 if (!signed_str)
goto limited_bad;
29313#if CYTHON_VECTORCALL
29314 kwds = PyTuple_Pack(1, signed_str);
29317 PyObject *keys[] = {signed_str};
29318 PyObject *values[] = {Py_True};
29319 kwds = __Pyx_MakeKwargDict(keys, values, 1);
29322 Py_DECREF(signed_str);
29323 if (unlikely(!kwds))
goto limited_bad;
29325 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
29329 Py_XDECREF(order_str);
29330 Py_XDECREF(py_bytes);
29331 Py_XDECREF(from_bytes_str);
29338static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x);
29339static int __Pyx_raise_neg_overflow___Pyx_PyLong_As_int(
void) {
29340 const char* type_name =
"int";
29341 PyErr_Format(PyExc_OverflowError,
29342 "can't convert negative value to %.200s", type_name);
29345static int __Pyx_raise_overflow___Pyx_PyLong_As_int(
void) {
29346 const char* type_name =
"int";
29347 PyErr_Format(PyExc_OverflowError,
29348 "value too large to convert to %.200s", type_name);
29351static CYTHON_INLINE
int __Pyx_PyULong___Pyx_PyLong_As_int(PyObject *x) {
29352 const int is_unsigned = 1;
29353#if CYTHON_USE_PYLONG_INTERNALS
29355 const digit* digits = __Pyx_PyLong_Digits(x);
29356 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
29357 if (size == 2 && (8 *
sizeof(
int) > 1 * PyLong_SHIFT)) {
29358 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
29359 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29360 }
else if ((8 *
sizeof(
int) >= 2 * PyLong_SHIFT)) {
29361 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
29364 if (size == 3 && (8 *
sizeof(
int) > 2 * PyLong_SHIFT)) {
29365 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
29366 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29367 }
else if ((8 *
sizeof(
int) >= 3 * PyLong_SHIFT)) {
29368 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
29371 if (size == 4 && (8 *
sizeof(
int) > 3 * PyLong_SHIFT)) {
29372 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
29373 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29374 }
else if ((8 *
sizeof(
int) >= 4 * PyLong_SHIFT)) {
29375 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
29380#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
29381 if (unlikely(Py_SIZE(x) < 0)) {
29382 goto raise_neg_overflow;
29386 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
29387 if (unlikely(result < 0))
29389 if (unlikely(result == 1))
29390 goto raise_neg_overflow;
29393 if ((
sizeof(
int) <=
sizeof(
unsigned long))) {
29394 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned long, PyLong_AsUnsignedLong(x))
29395 }
else if ((
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG))) {
29396 __PYX_VERIFY_RETURN_INT_EXC(
int,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
29398 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
29400 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
29402 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
29404static CYTHON_INLINE
int __Pyx_PySLong___Pyx_PyLong_As_int(PyObject *x) {
29405 const int is_unsigned = 0;
29406#if CYTHON_USE_PYLONG_INTERNALS
29407 if (__Pyx_PyLong_IsNeg(x)) {
29408 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
29409 const digit* digits = __Pyx_PyLong_Digits(x);
29410 if (size == 2 && (8 *
sizeof(
int) > 1 * PyLong_SHIFT)) {
29411 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
29412 long ival = - (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
29413 __PYX_VERIFY_RETURN_INT(
int,
long, ival)
29414 }
else if ((8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT)) {
29415 return (
int) (((int) -1) * (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
29418 if (size == 3 && (8 *
sizeof(
int) > 2 * PyLong_SHIFT)) {
29419 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
29420 long ival = - (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
29421 __PYX_VERIFY_RETURN_INT(
int,
long, ival)
29422 }
else if ((8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT)) {
29423 return (
int) (((int) -1) * (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
29426 if (size == 4 && (8 *
sizeof(
int) > 3 * PyLong_SHIFT)) {
29427 if ((8 *
sizeof(
long) > 4 * PyLong_SHIFT)) {
29428 long ival = - (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
29429 __PYX_VERIFY_RETURN_INT(
int,
long, ival)
29430 }
else if ((8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT)) {
29431 return (
int) (((int) -1) * (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
29436 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
29437 const digit* digits = __Pyx_PyLong_Digits(x);
29438 if (size == 2 && (8 *
sizeof(
int) > 1 * PyLong_SHIFT)) {
29439 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
29440 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29441 }
else if ((8 *
sizeof(
int) - 1 > 2 * PyLong_SHIFT)) {
29442 return (
int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
29445 if (size == 3 && (8 *
sizeof(
int) > 2 * PyLong_SHIFT)) {
29446 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
29447 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29448 }
else if ((8 *
sizeof(
int) - 1 > 3 * PyLong_SHIFT)) {
29449 return (
int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
29452 if (size == 4 && (8 *
sizeof(
int) > 3 * PyLong_SHIFT)) {
29453 if ((8 *
sizeof(
long) > 4 * PyLong_SHIFT)) {
29454 __PYX_VERIFY_RETURN_INT(
int,
unsigned long, (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29455 }
else if ((8 *
sizeof(
int) - 1 > 4 * PyLong_SHIFT)) {
29456 return (
int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
29462 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
29463 if ((
sizeof(
int) <=
sizeof(
int)) && (
sizeof(
int) <
sizeof(
long))) {
29464 __PYX_VERIFY_RETURN_INT_EXC(
int,
int, PyLong_AsInt(x))
29467 if ((
sizeof(
int) <=
sizeof(
long))) {
29468 __PYX_VERIFY_RETURN_INT_EXC(
int,
long, PyLong_AsLong(x))
29469 }
else if ((
sizeof(
int) <=
sizeof(PY_LONG_LONG))) {
29470 __PYX_VERIFY_RETURN_INT_EXC(
int, PY_LONG_LONG, PyLong_AsLongLong(x))
29472 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
29474 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
29476 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
29478static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x) {
29479#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29480#pragma GCC diagnostic push
29481#pragma GCC diagnostic ignored "-Wconversion"
29483 const int neg_one = (int) -1, const_zero = (
int) 0;
29484#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29485#pragma GCC diagnostic pop
29487 const int is_unsigned = neg_one > const_zero;
29490#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
29491 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
29492 x, &val,
sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
29493 if (unlikely(bytes_copied == -1)) {
29494 }
else if (unlikely(bytes_copied > (Py_ssize_t)
sizeof(val))) {
29495 goto raise_overflow;
29499#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
29500 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
29501 unsigned char *bytes = (
unsigned char *)&val;
29502 ret = _PyLong_AsByteArray((PyLongObject *)x,
29503 bytes,
sizeof(val),
29504 is_little, !is_unsigned);
29505 if ((0))
goto raise_overflow;
29508 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
29509 int bits, remaining_bits, is_negative = 0;
29510 int chunk_size = (
sizeof(long) < 8) ? 30 : 62;
29511 if (likely(PyLong_CheckExact(x))) {
29512 v = __Pyx_NewRef(x);
29514 v = PyNumber_Long(x);
29515 if (unlikely(!
v))
return (
int) -1;
29516 assert(PyLong_CheckExact(
v));
29519 int result = PyObject_RichCompareBool(
v, Py_False, Py_LT);
29520 if (unlikely(result < 0)) {
29524 is_negative = result == 1;
29526 if (is_unsigned && unlikely(is_negative)) {
29528 PyErr_SetString(PyExc_OverflowError,
29529 "can't convert negative value to int");
29531 }
else if (is_negative) {
29532 stepval = PyNumber_Invert(
v);
29534 if (unlikely(!stepval))
29541 mask = PyLong_FromLong((1L << chunk_size) - 1);
if (unlikely(!mask))
goto done;
29542 shift = PyLong_FromLong(chunk_size);
if (unlikely(!shift))
goto done;
29543 for (bits = 0; bits < (int)
sizeof(int) * 8 - chunk_size; bits += chunk_size) {
29544 PyObject *tmp, *digit;
29546 digit = PyNumber_And(stepval, mask);
29547 if (unlikely(!digit))
goto done;
29548 idigit = PyLong_AsLong(digit);
29550 if (unlikely(idigit < 0))
goto done;
29551 val |= ((int) idigit) << bits;
29552 tmp = PyNumber_Rshift(stepval, shift);
29553 if (unlikely(!tmp))
goto done;
29554 Py_DECREF(stepval); stepval = tmp;
29556 Py_DECREF(shift); shift = NULL;
29557 Py_DECREF(mask); mask = NULL;
29559 long idigit = PyLong_AsLong(stepval);
29560 if (unlikely(idigit < 0))
goto done;
29561 remaining_bits = ((int)
sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
29562 if (unlikely(idigit >= (1L << remaining_bits)))
29563 goto raise_overflow;
29564 val |= ((int) idigit) << bits;
29566 if (!is_unsigned) {
29567 if (unlikely(val & (((
int) 1) << (
sizeof(
int) * 8 - 1))))
29568 goto raise_overflow;
29576 Py_XDECREF(stepval);
29582 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
29584static CYTHON_INLINE
int __Pyx_PyLong___Pyx_PyLong_As_int(PyObject *x) {
29585#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29586#pragma GCC diagnostic push
29587#pragma GCC diagnostic ignored "-Wconversion"
29589 const int neg_one = (int) -1, const_zero = (
int) 0;
29590#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29591#pragma GCC diagnostic pop
29593 const int is_unsigned = neg_one > const_zero;
29595 #if CYTHON_USE_PYLONG_INTERNALS
29596 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
29597 goto raise_neg_overflow;
29598 }
else if (__Pyx_PyLong_IsCompact(x)) {
29599 __PYX_VERIFY_RETURN_INT(
int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
29603 return __Pyx_PyULong___Pyx_PyLong_As_int(x);
29606 #if CYTHON_USE_PYLONG_INTERNALS
29607 if (__Pyx_PyLong_IsCompact(x)) {
29608 __PYX_VERIFY_RETURN_INT(
int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
29612 return __Pyx_PySLong___Pyx_PyLong_As_int(x);
29615#if CYTHON_USE_PYLONG_INTERNALS
29617 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
29619 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
29622static int __Pyx_NonPyLong___Pyx_PyLong_As_int(PyObject *x) {
29624 PyObject *tmp = __Pyx_PyNumber_Long(x);
29625 if (!tmp)
return (
int) -1;
29626 val = __Pyx_PyLong_As_int(tmp);
29630static CYTHON_INLINE
int __Pyx_PyLong_As_int(PyObject *x) {
29631 if (likely(PyLong_Check(x))) {
29632 return __Pyx_PyLong___Pyx_PyLong_As_int(x);
29634 return __Pyx_NonPyLong___Pyx_PyLong_As_int(x);
29639static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(
int value) {
29640#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29641#pragma GCC diagnostic push
29642#pragma GCC diagnostic ignored "-Wconversion"
29644 const int neg_one = (int) -1, const_zero = (
int) 0;
29645#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29646#pragma GCC diagnostic pop
29648 const int is_unsigned = neg_one > const_zero;
29650 if (
sizeof(
int) <
sizeof(
long)) {
29651 return PyLong_FromLong((
long) value);
29652 }
else if (
sizeof(
int) <=
sizeof(
unsigned long)) {
29653 return PyLong_FromUnsignedLong((
unsigned long) value);
29654#if !CYTHON_COMPILING_IN_PYPY
29655 }
else if (
sizeof(
int) <=
sizeof(
unsigned PY_LONG_LONG)) {
29656 return PyLong_FromUnsignedLongLong((
unsigned PY_LONG_LONG) value);
29660 if (
sizeof(
int) <=
sizeof(
long)) {
29661 return PyLong_FromLong((
long) value);
29662 }
else if (
sizeof(
int) <=
sizeof(PY_LONG_LONG)) {
29663 return PyLong_FromLongLong((PY_LONG_LONG) value);
29667 unsigned char *bytes = (
unsigned char *)&value;
29668#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
29670 return PyLong_FromUnsignedNativeBytes(bytes,
sizeof(value), -1);
29672 return PyLong_FromNativeBytes(bytes,
sizeof(value), -1);
29674#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
29675 int one = 1;
int little = (int)*(
unsigned char *)&one;
29676 return _PyLong_FromByteArray(bytes,
sizeof(
int),
29677 little, !is_unsigned);
29679 int one = 1;
int little = (int)*(
unsigned char *)&one;
29680 PyObject *result = NULL, *kwds = NULL;
29681 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
29682 py_bytes = PyBytes_FromStringAndSize((
char*)bytes,
sizeof(
int));
29683 if (!py_bytes)
goto limited_bad;
29684 from_bytes_str = PyUnicode_FromStringAndSize(
"from_bytes", 10);
29685 if (!from_bytes_str)
goto limited_bad;
29686 order_str = PyUnicode_FromString(little ?
"little" :
"big");
29687 if (!order_str)
goto limited_bad;
29689 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
29690 if (!is_unsigned) {
29691 PyObject *signed_str = PyUnicode_FromStringAndSize(
"signed", 6);
29692 if (!signed_str)
goto limited_bad;
29693#if CYTHON_VECTORCALL
29694 kwds = PyTuple_Pack(1, signed_str);
29697 PyObject *keys[] = {signed_str};
29698 PyObject *values[] = {Py_True};
29699 kwds = __Pyx_MakeKwargDict(keys, values, 1);
29702 Py_DECREF(signed_str);
29703 if (unlikely(!kwds))
goto limited_bad;
29705 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
29709 Py_XDECREF(order_str);
29710 Py_XDECREF(py_bytes);
29711 Py_XDECREF(from_bytes_str);
29718static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x);
29719static long __Pyx_raise_neg_overflow___Pyx_PyLong_As_long(
void) {
29720 const char* type_name =
"long";
29721 PyErr_Format(PyExc_OverflowError,
29722 "can't convert negative value to %.200s", type_name);
29725static long __Pyx_raise_overflow___Pyx_PyLong_As_long(
void) {
29726 const char* type_name =
"long";
29727 PyErr_Format(PyExc_OverflowError,
29728 "value too large to convert to %.200s", type_name);
29731static CYTHON_INLINE
long __Pyx_PyULong___Pyx_PyLong_As_long(PyObject *x) {
29732 const int is_unsigned = 1;
29733#if CYTHON_USE_PYLONG_INTERNALS
29735 const digit* digits = __Pyx_PyLong_Digits(x);
29736 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
29737 if (size == 2 && (8 *
sizeof(
long) > 1 * PyLong_SHIFT)) {
29738 if ((8 *
sizeof(
unsigned long) > 2 * PyLong_SHIFT)) {
29739 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29740 }
else if ((8 *
sizeof(
long) >= 2 * PyLong_SHIFT)) {
29741 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
29744 if (size == 3 && (8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
29745 if ((8 *
sizeof(
unsigned long) > 3 * PyLong_SHIFT)) {
29746 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29747 }
else if ((8 *
sizeof(
long) >= 3 * PyLong_SHIFT)) {
29748 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
29751 if (size == 4 && (8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
29752 if ((8 *
sizeof(
unsigned long) > 4 * PyLong_SHIFT)) {
29753 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29754 }
else if ((8 *
sizeof(
long) >= 4 * PyLong_SHIFT)) {
29755 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
29760#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
29761 if (unlikely(Py_SIZE(x) < 0)) {
29762 goto raise_neg_overflow;
29766 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
29767 if (unlikely(result < 0))
29769 if (unlikely(result == 1))
29770 goto raise_neg_overflow;
29773 if ((
sizeof(
long) <=
sizeof(
unsigned long))) {
29774 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned long, PyLong_AsUnsignedLong(x))
29775 }
else if ((
sizeof(
long) <=
sizeof(
unsigned PY_LONG_LONG))) {
29776 __PYX_VERIFY_RETURN_INT_EXC(
long,
unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
29778 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
29780 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
29782 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
29784static CYTHON_INLINE
long __Pyx_PySLong___Pyx_PyLong_As_long(PyObject *x) {
29785 const int is_unsigned = 0;
29786#if CYTHON_USE_PYLONG_INTERNALS
29787 if (__Pyx_PyLong_IsNeg(x)) {
29788 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
29789 const digit* digits = __Pyx_PyLong_Digits(x);
29790 if (size == 2 && (8 *
sizeof(
long) > 1 * PyLong_SHIFT)) {
29791 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
29792 long ival = - (long) (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
29793 __PYX_VERIFY_RETURN_INT(
long,
long, ival)
29794 }
else if ((8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT)) {
29795 return (
long) (((long) -1) * (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
29798 if (size == 3 && (8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
29799 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
29800 long ival = - (long) (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
29801 __PYX_VERIFY_RETURN_INT(
long,
long, ival)
29802 }
else if ((8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT)) {
29803 return (
long) (((long) -1) * (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
29806 if (size == 4 && (8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
29807 if ((8 *
sizeof(
long) > 4 * PyLong_SHIFT)) {
29808 long ival = - (long) (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0]));
29809 __PYX_VERIFY_RETURN_INT(
long,
long, ival)
29810 }
else if ((8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT)) {
29811 return (
long) (((long) -1) * (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
29816 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
29817 const digit* digits = __Pyx_PyLong_Digits(x);
29818 if (size == 2 && (8 *
sizeof(
long) > 1 * PyLong_SHIFT)) {
29819 if ((8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
29820 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29821 }
else if ((8 *
sizeof(
long) - 1 > 2 * PyLong_SHIFT)) {
29822 return (
long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
29825 if (size == 3 && (8 *
sizeof(
long) > 2 * PyLong_SHIFT)) {
29826 if ((8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
29827 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29828 }
else if ((8 *
sizeof(
long) - 1 > 3 * PyLong_SHIFT)) {
29829 return (
long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
29832 if (size == 4 && (8 *
sizeof(
long) > 3 * PyLong_SHIFT)) {
29833 if ((8 *
sizeof(
long) > 4 * PyLong_SHIFT)) {
29834 __PYX_VERIFY_RETURN_INT(
long,
unsigned long, (((((((((
unsigned long)digits[3]) << PyLong_SHIFT) | (
unsigned long)digits[2]) << PyLong_SHIFT) | (
unsigned long)digits[1]) << PyLong_SHIFT) | (
unsigned long)digits[0])))
29835 }
else if ((8 *
sizeof(
long) - 1 > 4 * PyLong_SHIFT)) {
29836 return (
long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
29842 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
29843 if ((
sizeof(
long) <=
sizeof(
int)) && (
sizeof(
int) <
sizeof(
long))) {
29844 __PYX_VERIFY_RETURN_INT_EXC(
long,
int, PyLong_AsInt(x))
29847 if ((
sizeof(
long) <=
sizeof(
long))) {
29848 __PYX_VERIFY_RETURN_INT_EXC(
long,
long, PyLong_AsLong(x))
29849 }
else if ((
sizeof(
long) <=
sizeof(PY_LONG_LONG))) {
29850 __PYX_VERIFY_RETURN_INT_EXC(
long, PY_LONG_LONG, PyLong_AsLongLong(x))
29852 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
29854 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
29856 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
29858static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x) {
29859#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29860#pragma GCC diagnostic push
29861#pragma GCC diagnostic ignored "-Wconversion"
29863 const long neg_one = (long) -1, const_zero = (
long) 0;
29864#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29865#pragma GCC diagnostic pop
29867 const int is_unsigned = neg_one > const_zero;
29870#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
29871 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
29872 x, &val,
sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
29873 if (unlikely(bytes_copied == -1)) {
29874 }
else if (unlikely(bytes_copied > (Py_ssize_t)
sizeof(val))) {
29875 goto raise_overflow;
29879#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
29880 int one = 1;
int is_little = (int)*(
unsigned char *)&one;
29881 unsigned char *bytes = (
unsigned char *)&val;
29882 ret = _PyLong_AsByteArray((PyLongObject *)x,
29883 bytes,
sizeof(val),
29884 is_little, !is_unsigned);
29885 if ((0))
goto raise_overflow;
29888 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
29889 int bits, remaining_bits, is_negative = 0;
29890 int chunk_size = (
sizeof(long) < 8) ? 30 : 62;
29891 if (likely(PyLong_CheckExact(x))) {
29892 v = __Pyx_NewRef(x);
29894 v = PyNumber_Long(x);
29895 if (unlikely(!
v))
return (
long) -1;
29896 assert(PyLong_CheckExact(
v));
29899 int result = PyObject_RichCompareBool(
v, Py_False, Py_LT);
29900 if (unlikely(result < 0)) {
29904 is_negative = result == 1;
29906 if (is_unsigned && unlikely(is_negative)) {
29908 PyErr_SetString(PyExc_OverflowError,
29909 "can't convert negative value to long");
29911 }
else if (is_negative) {
29912 stepval = PyNumber_Invert(
v);
29914 if (unlikely(!stepval))
29921 mask = PyLong_FromLong((1L << chunk_size) - 1);
if (unlikely(!mask))
goto done;
29922 shift = PyLong_FromLong(chunk_size);
if (unlikely(!shift))
goto done;
29923 for (bits = 0; bits < (int)
sizeof(long) * 8 - chunk_size; bits += chunk_size) {
29924 PyObject *tmp, *digit;
29926 digit = PyNumber_And(stepval, mask);
29927 if (unlikely(!digit))
goto done;
29928 idigit = PyLong_AsLong(digit);
29930 if (unlikely(idigit < 0))
goto done;
29931 val |= ((long) idigit) << bits;
29932 tmp = PyNumber_Rshift(stepval, shift);
29933 if (unlikely(!tmp))
goto done;
29934 Py_DECREF(stepval); stepval = tmp;
29936 Py_DECREF(shift); shift = NULL;
29937 Py_DECREF(mask); mask = NULL;
29939 long idigit = PyLong_AsLong(stepval);
29940 if (unlikely(idigit < 0))
goto done;
29941 remaining_bits = ((int)
sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
29942 if (unlikely(idigit >= (1L << remaining_bits)))
29943 goto raise_overflow;
29944 val |= ((long) idigit) << bits;
29946 if (!is_unsigned) {
29947 if (unlikely(val & (((
long) 1) << (
sizeof(
long) * 8 - 1))))
29948 goto raise_overflow;
29956 Py_XDECREF(stepval);
29962 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
29964static CYTHON_INLINE
long __Pyx_PyLong___Pyx_PyLong_As_long(PyObject *x) {
29965#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29966#pragma GCC diagnostic push
29967#pragma GCC diagnostic ignored "-Wconversion"
29969 const long neg_one = (long) -1, const_zero = (
long) 0;
29970#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
29971#pragma GCC diagnostic pop
29973 const int is_unsigned = neg_one > const_zero;
29975 #if CYTHON_USE_PYLONG_INTERNALS
29976 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
29977 goto raise_neg_overflow;
29978 }
else if (__Pyx_PyLong_IsCompact(x)) {
29979 __PYX_VERIFY_RETURN_INT(
long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
29983 return __Pyx_PyULong___Pyx_PyLong_As_long(x);
29986 #if CYTHON_USE_PYLONG_INTERNALS
29987 if (__Pyx_PyLong_IsCompact(x)) {
29988 __PYX_VERIFY_RETURN_INT(
long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
29992 return __Pyx_PySLong___Pyx_PyLong_As_long(x);
29995#if CYTHON_USE_PYLONG_INTERNALS
29997 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
29999 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
30002static long __Pyx_NonPyLong___Pyx_PyLong_As_long(PyObject *x) {
30004 PyObject *tmp = __Pyx_PyNumber_Long(x);
30005 if (!tmp)
return (
long) -1;
30006 val = __Pyx_PyLong_As_long(tmp);
30010static CYTHON_INLINE
long __Pyx_PyLong_As_long(PyObject *x) {
30011 if (likely(PyLong_Check(x))) {
30012 return __Pyx_PyLong___Pyx_PyLong_As_long(x);
30014 return __Pyx_NonPyLong___Pyx_PyLong_As_long(x);
30019#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
30020void __Pyx_init_runtime_version(
void) {
30021 if (__Pyx_cached_runtime_version == 0) {
30022 const char* rt_version = Py_GetVersion();
30023 unsigned long version = 0;
30024 unsigned long factor = 0x01000000UL;
30025 unsigned int digit = 0;
30028 while (
'0' <= rt_version[i] && rt_version[i] <=
'9') {
30029 digit = digit * 10 + (
unsigned int) (rt_version[i] -
'0');
30032 version += factor * digit;
30033 if (rt_version[i] !=
'.')
30039 __Pyx_cached_runtime_version = version;
30043static unsigned long __Pyx_get_runtime_version(
void) {
30044#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
30045 return Py_Version & ~0xFFUL;
30047 return __Pyx_cached_runtime_version;
30052#if CYTHON_FAST_THREAD_STATE
30053static CYTHON_INLINE
void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
30054 PyObject *tmp_type, *tmp_value, *tmp_tb;
30055 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
30056 _PyErr_StackItem *exc_info = tstate->exc_info;
30057 tmp_value = exc_info->exc_value;
30058 exc_info->exc_value = *value;
30059 if (tmp_value == NULL || tmp_value == Py_None) {
30060 Py_XDECREF(tmp_value);
30065 tmp_type = (PyObject*) Py_TYPE(tmp_value);
30066 Py_INCREF(tmp_type);
30067 #if CYTHON_COMPILING_IN_CPYTHON
30068 tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
30069 Py_XINCREF(tmp_tb);
30071 tmp_tb = PyException_GetTraceback(tmp_value);
30074 #elif CYTHON_USE_EXC_INFO_STACK
30075 _PyErr_StackItem *exc_info = tstate->exc_info;
30076 tmp_type = exc_info->exc_type;
30077 tmp_value = exc_info->exc_value;
30078 tmp_tb = exc_info->exc_traceback;
30079 exc_info->exc_type = *type;
30080 exc_info->exc_value = *value;
30081 exc_info->exc_traceback = *tb;
30083 tmp_type = tstate->exc_type;
30084 tmp_value = tstate->exc_value;
30085 tmp_tb = tstate->exc_traceback;
30086 tstate->exc_type = *type;
30087 tstate->exc_value = *value;
30088 tstate->exc_traceback = *tb;
30091 *value = tmp_value;
30095static CYTHON_INLINE
void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
30096 PyObject *tmp_type, *tmp_value, *tmp_tb;
30097 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
30098 PyErr_SetExcInfo(*type, *value, *tb);
30100 *value = tmp_value;
30106#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
30107static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(
void) {
30108 if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache))
30109 __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next);
30110 return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache;
30113static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) {
30114#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
30116 PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI();
30117 if (unlikely(!next))
return NULL;
30118 result = PyObject_CallFunctionObjArgs(next, iterator, NULL);
30121 (void)__Pyx_GetBuiltinName;
30122 iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator);
30124 return iternext(iterator);
30129static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
30130#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || !CYTHON_COMPILING_IN_LIMITED_API)
30131 PyObject *args[2] = {obj, arg};
30132 return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
30133#elif CYTHON_COMPILING_IN_LIMITED_API
30134 return PyObject_CallMethodObjArgs(obj, method_name, arg, NULL);
30136 return PyObject_CallMethodOneArg(obj, method_name, arg);
30141static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
30142 PyObject *arg[2] = {NULL, NULL};
30143 return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
30147static void __Pyx__ReturnWithStopIteration(PyObject* value,
int async);
30148static CYTHON_INLINE
void __Pyx_ReturnWithStopIteration(PyObject* value,
int async,
int iternext) {
30149 if (value == Py_None) {
30150 if (async || !iternext)
30151 PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration);
30154 __Pyx__ReturnWithStopIteration(value, async);
30156static void __Pyx__ReturnWithStopIteration(PyObject* value,
int async) {
30157#if CYTHON_COMPILING_IN_CPYTHON
30158 __Pyx_PyThreadState_declare
30161 PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration;
30162#if CYTHON_COMPILING_IN_CPYTHON
30163 if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
30164 if (PY_VERSION_HEX >= (0x030e00A1)) {
30165 exc = __Pyx_PyObject_CallOneArg(exc_type, value);
30167 PyObject *args_tuple = PyTuple_New(1);
30168 if (unlikely(!args_tuple))
return;
30170 PyTuple_SET_ITEM(args_tuple, 0, value);
30171 exc = PyObject_Call(exc_type, args_tuple, NULL);
30172 Py_DECREF(args_tuple);
30174 if (unlikely(!exc))
return;
30179 #if CYTHON_FAST_THREAD_STATE
30180 __Pyx_PyThreadState_assign
30181 #if CYTHON_USE_EXC_INFO_STACK
30182 if (!__pyx_tstate->exc_info->exc_value)
30184 if (!__pyx_tstate->exc_type)
30187 Py_INCREF(exc_type);
30188 __Pyx_ErrRestore(exc_type, exc, NULL);
30193 exc = __Pyx_PyObject_CallOneArg(exc_type, value);
30194 if (unlikely(!exc))
return;
30196 PyErr_SetObject(exc_type, exc);
30201#if !CYTHON_COMPILING_IN_LIMITED_API
30202#include <frameobject.h>
30203#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION)
30204 #ifndef Py_BUILD_CORE
30205 #define Py_BUILD_CORE 1
30207 #include "internal/pycore_frame.h"
30210static CYTHON_INLINE
void
30211__Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) {
30212#if CYTHON_USE_AM_SEND
30213 gen->yieldfrom_am_send = NULL;
30215 Py_CLEAR(gen->yieldfrom);
30217static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
30218 PyObject *et, *ev, *tb;
30219 PyObject *value = NULL;
30220 CYTHON_UNUSED_VAR(__pyx_tstate);
30221 __Pyx_ErrFetch(&et, &ev, &tb);
30225 Py_INCREF(Py_None);
30229 if (likely(et == PyExc_StopIteration)) {
30231 Py_INCREF(Py_None);
30234 else if (likely(Py_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
30235 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
30236 value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value);
30237 if (unlikely(!value))
goto limited_api_failure;
30239 value = ((PyStopIterationObject *)ev)->value;
30244 else if (unlikely(PyTuple_Check(ev))) {
30245 Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev);
30246 #if !CYTHON_ASSUME_SAFE_SIZE
30247 if (unlikely(tuple_size < 0)) {
30254 if (tuple_size >= 1) {
30255#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30256 value = PyTuple_GET_ITEM(ev, 0);
30258#elif CYTHON_ASSUME_SAFE_MACROS
30259 value = PySequence_ITEM(ev, 0);
30261 value = PySequence_GetItem(ev, 0);
30262 if (!value)
goto limited_api_failure;
30265 Py_INCREF(Py_None);
30270 else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
30273 if (likely(value)) {
30279 }
else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
30280 __Pyx_ErrRestore(et, ev, tb);
30283 PyErr_NormalizeException(&et, &ev, &tb);
30284 if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
30285 __Pyx_ErrRestore(et, ev, tb);
30290#if CYTHON_COMPILING_IN_LIMITED_API
30291 value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value);
30293 value = ((PyStopIterationObject *)ev)->value;
30297#if CYTHON_COMPILING_IN_LIMITED_API
30298 if (unlikely(!value))
return -1;
30302#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS
30303 limited_api_failure:
30310static CYTHON_INLINE
30311__Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) {
30314 }
else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) {
30315 return PYGEN_RETURN;
30317 return PYGEN_ERROR;
30320static CYTHON_INLINE
30321void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
30322#if PY_VERSION_HEX >= 0x030B00a4
30323 Py_CLEAR(exc_state->exc_value);
30325 PyObject *t, *
v, *tb;
30326 t = exc_state->exc_type;
30327 v = exc_state->exc_value;
30328 tb = exc_state->exc_traceback;
30329 exc_state->exc_type = NULL;
30330 exc_state->exc_value = NULL;
30331 exc_state->exc_traceback = NULL;
30337#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
30338static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
30340 CYTHON_MAYBE_UNUSED_VAR(gen);
30342 #ifdef __Pyx_Coroutine_USED
30343 }
else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
30344 msg =
"coroutine already executing";
30346 #ifdef __Pyx_AsyncGen_USED
30347 }
else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
30348 msg =
"async generator already executing";
30351 msg =
"generator already executing";
30353 PyErr_SetString(PyExc_ValueError, msg);
30355static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value,
int closing) {
30356 CYTHON_MAYBE_UNUSED_VAR(gen);
30357 CYTHON_MAYBE_UNUSED_VAR(closing);
30358 #ifdef __Pyx_Coroutine_USED
30359 if (!closing && __Pyx_Coroutine_Check(gen)) {
30360 PyErr_SetString(PyExc_RuntimeError,
"cannot reuse already awaited coroutine");
30364 #ifdef __Pyx_AsyncGen_USED
30365 if (__Pyx_AsyncGen_CheckExact(gen))
30366 PyErr_SetNone(PyExc_StopAsyncIteration);
30369 PyErr_SetNone(PyExc_StopIteration);
30373__Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result,
int closing) {
30374 __Pyx_PyThreadState_declare
30375 PyThreadState *tstate;
30376 __Pyx_ExcInfoStruct *exc_state;
30378 assert(__Pyx_Coroutine_get_is_running(self));
30379 if (unlikely(self->resume_label == -1)) {
30380 __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
30381 return PYGEN_ERROR;
30383#if CYTHON_FAST_THREAD_STATE
30384 __Pyx_PyThreadState_assign
30385 tstate = __pyx_tstate;
30387 tstate = __Pyx_PyThreadState_Current;
30389 exc_state = &self->gi_exc_state;
30390 if (exc_state->exc_value) {
30391 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
30394 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
30395 exc_tb = PyException_GetTraceback(exc_state->exc_value);
30396 #elif PY_VERSION_HEX >= 0x030B00a4
30397 exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback;
30399 exc_tb = exc_state->exc_traceback;
30402 PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
30403 PyFrameObject *
f = tb->tb_frame;
30404 assert(
f->f_back == NULL);
30405 #if PY_VERSION_HEX >= 0x030B00A1
30406 f->f_back = PyThreadState_GetFrame(tstate);
30408 Py_XINCREF(tstate->frame);
30409 f->f_back = tstate->frame;
30411 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
30417#if CYTHON_USE_EXC_INFO_STACK
30418 exc_state->previous_item = tstate->exc_info;
30419 tstate->exc_info = exc_state;
30421 if (exc_state->exc_type) {
30422 __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
30424 __Pyx_Coroutine_ExceptionClear(exc_state);
30425 __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
30428 retval = self->body(self, tstate, value);
30429#if CYTHON_USE_EXC_INFO_STACK
30430 exc_state = &self->gi_exc_state;
30431 tstate->exc_info = exc_state->previous_item;
30432 exc_state->previous_item = NULL;
30433 __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
30436 if (self->resume_label == -1) {
30437 return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR;
30441static CYTHON_INLINE
void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
30442#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
30443 CYTHON_UNUSED_VAR(exc_state);
30446 #if PY_VERSION_HEX >= 0x030B00a4
30447 if (!exc_state->exc_value)
return;
30448 exc_tb = PyException_GetTraceback(exc_state->exc_value);
30450 exc_tb = exc_state->exc_traceback;
30452 if (likely(exc_tb)) {
30453 PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
30454 PyFrameObject *
f = tb->tb_frame;
30455 Py_CLEAR(
f->f_back);
30456 #if PY_VERSION_HEX >= 0x030B00a4
30462#define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\
30463 ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext))
30465__Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval,
int iternext) {
30466 CYTHON_MAYBE_UNUSED_VAR(gen);
30467 if (likely(result == PYGEN_RETURN)) {
30469 #ifdef __Pyx_AsyncGen_USED
30470 is_async = __Pyx_AsyncGen_CheckExact(gen);
30472 __Pyx_ReturnWithStopIteration(retval, is_async, iternext);
30473 Py_XDECREF(retval);
30477#if CYTHON_COMPILING_IN_CPYTHON
30478static CYTHON_INLINE
30479PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
30480#if PY_VERSION_HEX <= 0x030A00A1
30481 return _PyGen_Send(gen, arg);
30484 if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
30485 if (PyAsyncGen_CheckExact(gen)) {
30486 assert(result == Py_None);
30487 PyErr_SetNone(PyExc_StopAsyncIteration);
30489 else if (result == Py_None) {
30490 PyErr_SetNone(PyExc_StopIteration);
30493#if PY_VERSION_HEX < 0x030d00A1
30494 _PyGen_SetStopIterationValue(result);
30496 if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) {
30497 PyErr_SetObject(PyExc_StopIteration, result);
30499 PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result);
30500 if (likely(exc != NULL)) {
30501 PyErr_SetObject(PyExc_StopIteration, exc);
30514static CYTHON_INLINE __Pyx_PySendResult
30515__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) {
30516 __Pyx_PySendResult result;
30517 PyObject *val = NULL;
30518 assert(__Pyx_Coroutine_get_is_running(gen));
30519 __Pyx_Coroutine_Undelegate(gen);
30520 __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
30521 result = __Pyx_Coroutine_SendEx(gen, val, retval, 0);
30525#if CYTHON_USE_AM_SEND
30526static __Pyx_PySendResult
30527__Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) {
30528 PyObject *ret = NULL;
30529 __Pyx_PySendResult delegate_result, result;
30530 assert(__Pyx_Coroutine_get_is_running(gen));
30531 delegate_result = gen_am_send(gen->yieldfrom, value, &ret);
30532 if (delegate_result == PYGEN_NEXT) {
30533 assert (ret != NULL);
30537 assert (delegate_result != PYGEN_ERROR || ret == NULL);
30538 __Pyx_Coroutine_Undelegate(gen);
30539 result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0);
30544static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
30545 PyObject *retval = NULL;
30546 __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval);
30547 return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0);
30549static __Pyx_PySendResult
30550__Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) {
30551 __Pyx_PySendResult result;
30552 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
30553 if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
30554 *retval = __Pyx_Coroutine_AlreadyRunningError(gen);
30555 return PYGEN_ERROR;
30557 #if CYTHON_USE_AM_SEND
30558 if (gen->yieldfrom_am_send) {
30559 result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval);
30562 if (gen->yieldfrom) {
30563 PyObject *yf = gen->yieldfrom;
30565 #if !CYTHON_USE_AM_SEND
30566 #ifdef __Pyx_Generator_USED
30567 if (__Pyx_Generator_CheckExact(yf)) {
30568 ret = __Pyx_Coroutine_Send(yf, value);
30571 #ifdef __Pyx_Coroutine_USED
30572 if (__Pyx_Coroutine_Check(yf)) {
30573 ret = __Pyx_Coroutine_Send(yf, value);
30576 #ifdef __Pyx_AsyncGen_USED
30577 if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
30578 ret = __Pyx_async_gen_asend_send(yf, value);
30581 #if CYTHON_COMPILING_IN_CPYTHON
30582 if (PyGen_CheckExact(yf)) {
30583 ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
30585 if (PyCoro_CheckExact(yf)) {
30586 ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
30591 if (value == Py_None && PyIter_Check(yf))
30592 ret = __Pyx_PyIter_Next_Plain(yf);
30594 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value);
30597 __Pyx_Coroutine_unset_is_running(gen);
30601 result = __Pyx_Coroutine_FinishDelegation(gen, retval);
30603 result = __Pyx_Coroutine_SendEx(gen, value, retval, 0);
30605 __Pyx_Coroutine_unset_is_running(gen);
30608static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
30609 __Pyx_PySendResult result;
30610 PyObject *retval = NULL;
30611 CYTHON_UNUSED_VAR(gen);
30612 assert(__Pyx_Coroutine_get_is_running(gen));
30613 #ifdef __Pyx_Generator_USED
30614 if (__Pyx_Generator_CheckExact(yf)) {
30615 result = __Pyx_Coroutine_Close(yf, &retval);
30618 #ifdef __Pyx_Coroutine_USED
30619 if (__Pyx_Coroutine_Check(yf)) {
30620 result = __Pyx_Coroutine_Close(yf, &retval);
30622 if (__Pyx_CoroutineAwait_CheckExact(yf)) {
30623 result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
30626 #ifdef __Pyx_AsyncGen_USED
30627 if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
30628 retval = __Pyx_async_gen_asend_close(yf, NULL);
30629 result = PYGEN_RETURN;
30631 if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
30632 retval = __Pyx_async_gen_athrow_close(yf, NULL);
30633 result = PYGEN_RETURN;
30638 result = PYGEN_RETURN;
30639 meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close);
30640 if (unlikely(!meth)) {
30641 if (unlikely(PyErr_Occurred())) {
30642 PyErr_WriteUnraisable(yf);
30645 retval = __Pyx_PyObject_CallNoArg(meth);
30647 if (unlikely(!retval)) {
30648 result = PYGEN_ERROR;
30652 Py_XDECREF(retval);
30653 return result == PYGEN_ERROR ? -1 : 0;
30655static PyObject *__Pyx_Generator_Next(PyObject *self) {
30656 __Pyx_PySendResult result;
30657 PyObject *retval = NULL;
30658 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
30659 if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
30660 return __Pyx_Coroutine_AlreadyRunningError(gen);
30662 #if CYTHON_USE_AM_SEND
30663 if (gen->yieldfrom_am_send) {
30664 result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval);
30667 if (gen->yieldfrom) {
30668 PyObject *yf = gen->yieldfrom;
30670 #ifdef __Pyx_Generator_USED
30671 if (__Pyx_Generator_CheckExact(yf)) {
30672 ret = __Pyx_Generator_Next(yf);
30675 #ifdef __Pyx_Coroutine_USED
30676 if (__Pyx_Coroutine_CheckExact(yf)) {
30677 ret = __Pyx_Coroutine_Send(yf, Py_None);
30680 #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND)
30681 if (PyGen_CheckExact(yf)) {
30682 ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
30685 ret = __Pyx_PyIter_Next_Plain(yf);
30687 __Pyx_Coroutine_unset_is_running(gen);
30690 result = __Pyx_Coroutine_FinishDelegation(gen, &retval);
30692 result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0);
30694 __Pyx_Coroutine_unset_is_running(gen);
30695 return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1);
30697static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
30698 PyObject *retval = NULL;
30699 __Pyx_PySendResult result;
30700 CYTHON_UNUSED_VAR(arg);
30701 result = __Pyx_Coroutine_Close(self, &retval);
30702 if (unlikely(result == PYGEN_ERROR))
30704 Py_XDECREF(retval);
30707static __Pyx_PySendResult
30708__Pyx_Coroutine_Close(PyObject *self, PyObject **retval) {
30709 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
30710 __Pyx_PySendResult result;
30713 if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
30714 *retval = __Pyx_Coroutine_AlreadyRunningError(gen);
30715 return PYGEN_ERROR;
30717 yf = gen->yieldfrom;
30720 err = __Pyx_Coroutine_CloseIter(gen, yf);
30721 __Pyx_Coroutine_Undelegate(gen);
30725 PyErr_SetNone(PyExc_GeneratorExit);
30726 result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1);
30727 if (result == PYGEN_ERROR) {
30728 __Pyx_PyThreadState_declare
30729 __Pyx_PyThreadState_assign
30730 __Pyx_Coroutine_unset_is_running(gen);
30731 if (!__Pyx_PyErr_Occurred()) {
30732 return PYGEN_RETURN;
30733 }
else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) {
30734 __Pyx_PyErr_Clear();
30735 return PYGEN_RETURN;
30737 return PYGEN_ERROR;
30738 }
else if (likely(result == PYGEN_RETURN && *retval == Py_None)) {
30739 __Pyx_Coroutine_unset_is_running(gen);
30740 return PYGEN_RETURN;
30743 Py_DECREF(*retval);
30746 #ifdef __Pyx_Coroutine_USED
30747 }
else if (__Pyx_Coroutine_Check(self)) {
30748 msg =
"coroutine ignored GeneratorExit";
30750 #ifdef __Pyx_AsyncGen_USED
30751 }
else if (__Pyx_AsyncGen_CheckExact(self)) {
30752 msg =
"async generator ignored GeneratorExit";
30755 msg =
"generator ignored GeneratorExit";
30757 PyErr_SetString(PyExc_RuntimeError, msg);
30758 __Pyx_Coroutine_unset_is_running(gen);
30759 return PYGEN_ERROR;
30762static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
30763 PyObject *args,
int close_on_genexit) {
30764 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
30766 if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen)))
30767 return __Pyx_Coroutine_AlreadyRunningError(gen);
30768 yf = gen->yieldfrom;
30770 __Pyx_PySendResult result;
30773 if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
30774 int err = __Pyx_Coroutine_CloseIter(gen, yf);
30776 __Pyx_Coroutine_Undelegate(gen);
30778 goto propagate_exception;
30782 #ifdef __Pyx_Generator_USED
30783 || __Pyx_Generator_CheckExact(yf)
30785 #ifdef __Pyx_Coroutine_USED
30786 || __Pyx_Coroutine_Check(yf)
30789 ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
30790 #ifdef __Pyx_Coroutine_USED
30791 }
else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
30792 ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
30795 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw);
30796 if (unlikely(!meth)) {
30798 if (unlikely(PyErr_Occurred())) {
30799 __Pyx_Coroutine_unset_is_running(gen);
30802 __Pyx_Coroutine_Undelegate(gen);
30806 ret = __Pyx_PyObject_Call(meth, args, NULL);
30808 PyObject *cargs[4] = {NULL, typ, val, tb};
30809 size_t nargs = 1U + (val != NULL) + (tb != NULL);
30810 ret = __Pyx_PyObject_FastCall(meth, cargs+1, nargs | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
30816 __Pyx_Coroutine_unset_is_running(gen);
30819 result = __Pyx_Coroutine_FinishDelegation(gen, &ret);
30820 __Pyx_Coroutine_unset_is_running(gen);
30821 return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0);
30824 __Pyx_Raise(typ, val, tb, NULL);
30825propagate_exception:
30827 PyObject *retval = NULL;
30828 __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0);
30829 __Pyx_Coroutine_unset_is_running(gen);
30830 return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0);
30833static PyObject *__Pyx_Coroutine_Throw(PyObject *self,
30834#
if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
30837 PyObject *
const *args, Py_ssize_t nargs
30841 PyObject *val = NULL;
30842 PyObject *tb = NULL;
30843#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
30844 if (unlikely(!PyArg_UnpackTuple(args,
"throw", 1, 3, &typ, &val, &tb)))
30850 CYTHON_FALLTHROUGH;
30853 CYTHON_FALLTHROUGH;
30858 PyErr_SetString(PyExc_TypeError,
"throw takes between 1 and 3 positional arguments");
30862 return __Pyx__Coroutine_Throw(self, typ, val, tb,
30863#
if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
30870static CYTHON_INLINE
int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit,
void *arg) {
30871#if PY_VERSION_HEX >= 0x030B00a4
30872 Py_VISIT(exc_state->exc_value);
30874 Py_VISIT(exc_state->exc_type);
30875 Py_VISIT(exc_state->exc_value);
30876 Py_VISIT(exc_state->exc_traceback);
30880static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit,
void *arg) {
30882 int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg);
30885 Py_VISIT(gen->closure);
30886 Py_VISIT(gen->classobj);
30887 Py_VISIT(gen->yieldfrom);
30888 return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
30890static int __Pyx_Coroutine_clear(PyObject *self) {
30891 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
30892 Py_CLEAR(gen->closure);
30893 Py_CLEAR(gen->classobj);
30894 __Pyx_Coroutine_Undelegate(gen);
30895 __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
30896#ifdef __Pyx_AsyncGen_USED
30897 if (__Pyx_AsyncGen_CheckExact(self)) {
30898 Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
30901 Py_CLEAR(gen->gi_code);
30902 Py_CLEAR(gen->gi_frame);
30903 Py_CLEAR(gen->gi_name);
30904 Py_CLEAR(gen->gi_qualname);
30905 Py_CLEAR(gen->gi_modulename);
30908static void __Pyx_Coroutine_dealloc(PyObject *self) {
30909 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
30910 PyObject_GC_UnTrack(gen);
30911 #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
30912 if (gen->gi_weakreflist != NULL)
30914 PyObject_ClearWeakRefs(self);
30915 if (gen->resume_label >= 0) {
30916#if CYTHON_USE_TP_FINALIZE
30917 PyObject_GC_Track(self);
30918 if (unlikely(PyObject_CallFinalizerFromDealloc(self)))
30922 PyObject_GC_UnTrack(self);
30925#ifdef __Pyx_AsyncGen_USED
30926 if (__Pyx_AsyncGen_CheckExact(self)) {
30930 Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
30933 __Pyx_Coroutine_clear(self);
30934 __Pyx_PyHeapTypeObject_GC_Del(gen);
30936#if CYTHON_USE_TP_FINALIZE
30937static void __Pyx_Coroutine_del(PyObject *self) {
30938 PyObject *error_type, *error_value, *error_traceback;
30939 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
30940 __Pyx_PyThreadState_declare
30941 if (gen->resume_label < 0) {
30944 __Pyx_PyThreadState_assign
30945 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
30946#ifdef __Pyx_AsyncGen_USED
30947 if (__Pyx_AsyncGen_CheckExact(self)) {
30948 __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
30949 PyObject *finalizer = agen->ag_finalizer;
30950 if (finalizer && !agen->ag_closed) {
30951 PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
30952 if (unlikely(!res)) {
30953 PyErr_WriteUnraisable(self);
30957 __Pyx_ErrRestore(error_type, error_value, error_traceback);
30962 if (unlikely(gen->resume_label == 0 && !error_value)) {
30963#ifdef __Pyx_Coroutine_USED
30964#ifdef __Pyx_Generator_USED
30965 if (!__Pyx_Generator_CheckExact(self))
30968 PyObject_GC_UnTrack(self);
30969 if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
"coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
30970 PyErr_WriteUnraisable(self);
30971 PyObject_GC_Track(self);
30975 PyObject *retval = NULL;
30976 __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval);
30977 if (result == PYGEN_ERROR) {
30978 PyErr_WriteUnraisable(self);
30980 Py_XDECREF(retval);
30983 __Pyx_ErrRestore(error_type, error_value, error_traceback);
30987__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self,
void *context)
30989 PyObject *name = self->gi_name;
30990 CYTHON_UNUSED_VAR(context);
30991 if (unlikely(!name)) name = Py_None;
30996__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value,
void *context)
30998 CYTHON_UNUSED_VAR(context);
30999 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
31000 PyErr_SetString(PyExc_TypeError,
31001 "__name__ must be set to a string object");
31005 __Pyx_Py_XDECREF_SET(self->gi_name, value);
31009__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self,
void *context)
31011 PyObject *name = self->gi_qualname;
31012 CYTHON_UNUSED_VAR(context);
31013 if (unlikely(!name)) name = Py_None;
31018__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value,
void *context)
31020 CYTHON_UNUSED_VAR(context);
31021 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
31022 PyErr_SetString(PyExc_TypeError,
31023 "__qualname__ must be set to a string object");
31027 __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
31030#if !CYTHON_COMPILING_IN_LIMITED_API
31032__Pyx__Coroutine_get_frame_locked(__pyx_CoroutineObject *self) {
31034 frame = self->gi_frame;
31036 if (unlikely(!self->gi_code)) {
31039 PyObject *globals = PyDict_New();
31040 if (unlikely(!globals))
return NULL;
31041 frame = (PyObject *) PyFrame_New(
31042 PyThreadState_Get(),
31043 (PyCodeObject*) self->gi_code,
31047 Py_DECREF(globals);
31048 if (unlikely(!frame))
31050 if (unlikely(self->gi_frame)) {
31052 frame = self->gi_frame;
31054 self->gi_frame = frame;
31062__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self)
31064#if !CYTHON_COMPILING_IN_LIMITED_API
31066 __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)self);
31067 frame = __Pyx__Coroutine_get_frame_locked(self);
31068 __Pyx_END_CRITICAL_SECTION();
31071 CYTHON_UNUSED_VAR(self);
31076__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self,
void *context) {
31077 CYTHON_UNUSED_VAR(context);
31078 PyObject *frame = self->gi_frame;
31080 return __Pyx_NewRef(frame);
31081 return __Pyx__Coroutine_get_frame(self);
31083static __pyx_CoroutineObject *__Pyx__Coroutine_New(
31084 PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
31085 PyObject *name, PyObject *qualname, PyObject *module_name) {
31086 __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
31087 if (unlikely(!gen))
31089 return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
31091static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
31092 __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
31093 PyObject *name, PyObject *qualname, PyObject *module_name) {
31095 gen->closure = closure;
31096 Py_XINCREF(closure);
31097 gen->is_running = 0;
31098 gen->resume_label = 0;
31099 gen->classobj = NULL;
31100 gen->yieldfrom = NULL;
31101 gen->yieldfrom_am_send = NULL;
31102 #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API
31103 gen->gi_exc_state.exc_value = NULL;
31105 gen->gi_exc_state.exc_type = NULL;
31106 gen->gi_exc_state.exc_value = NULL;
31107 gen->gi_exc_state.exc_traceback = NULL;
31109#if CYTHON_USE_EXC_INFO_STACK
31110 gen->gi_exc_state.previous_item = NULL;
31112#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
31113 gen->gi_weakreflist = NULL;
31115 Py_XINCREF(qualname);
31116 gen->gi_qualname = qualname;
31118 gen->gi_name = name;
31119 Py_XINCREF(module_name);
31120 gen->gi_modulename = module_name;
31122 gen->gi_code = code;
31123 gen->gi_frame = NULL;
31124#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE)
31125 memset(gen->__pyx_pymonitoring_state, 0,
sizeof(gen->__pyx_pymonitoring_state));
31126 gen->__pyx_pymonitoring_version = 0;
31128 PyObject_GC_Track(gen);
31131static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) {
31133 __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen);
31134 result = gen->is_running;
31135 gen->is_running = 1;
31136 __Pyx_END_CRITICAL_SECTION();
31139static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) {
31140 __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen);
31141 assert(gen->is_running);
31142 gen->is_running = 0;
31143 __Pyx_END_CRITICAL_SECTION();
31145static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) {
31147 __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen);
31148 result = gen->is_running;
31149 __Pyx_END_CRITICAL_SECTION();
31152static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen,
void *closure) {
31153 CYTHON_UNUSED_VAR(closure);
31154 char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen);
31155 if (result) Py_RETURN_TRUE;
31156 else Py_RETURN_FALSE;
31158#if __PYX_HAS_PY_AM_SEND == 2
31159static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) {
31160 Py_ssize_t ptr_offset = (
char*)(type->tp_as_async) - (
char*)type;
31161 if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) {
31164 memcpy((
void*)static_amsend_methods, (
void*)(type->tp_as_async),
sizeof(*type->tp_as_async));
31165 static_amsend_methods->am_send = am_send;
31166 type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods);
31169static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) {
31170 CYTHON_UNUSED_VAR(arg);
31171 __Pyx_RaiseTypeErrorWithObjectType(
31172 "cannot pickle '" __Pyx_FMT_TYPENAME
"' object", self);
31177static PyMethodDef __pyx_Generator_methods[] = {
31178 {
"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
31179 PyDoc_STR(
"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
31180 {
"throw", __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_Coroutine_Throw),
31181#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
31186 PyDoc_STR(
"throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
31187 {
"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
31188 PyDoc_STR(
"close() -> raise GeneratorExit inside generator.")},
31189 {
"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0},
31190 {
"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0},
31193static PyMemberDef __pyx_Generator_memberlist[] = {
31194 {
"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
31195 PyDoc_STR(
"object being iterated by 'yield from', or None")},
31196 {
"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
31197 {
"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
31198#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
31199 {
"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
31203static PyGetSetDef __pyx_Generator_getsets[] = {
31204 {
"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
31205 PyDoc_STR(
"name of the generator"), 0},
31206 {
"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
31207 PyDoc_STR(
"qualified name of the generator"), 0},
31208 {
"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
31209 PyDoc_STR(
"Frame of the generator"), 0},
31210 {
"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL},
31213static PyType_Slot __pyx_GeneratorType_slots[] = {
31214 {Py_tp_dealloc, (
void *)__Pyx_Coroutine_dealloc},
31215 {Py_tp_traverse, (
void *)__Pyx_Coroutine_traverse},
31216 {Py_tp_iter, (
void *)PyObject_SelfIter},
31217 {Py_tp_iternext, (
void *)__Pyx_Generator_Next},
31218 {Py_tp_methods, (
void *)__pyx_Generator_methods},
31219 {Py_tp_members, (
void *)__pyx_Generator_memberlist},
31220 {Py_tp_getset, (
void *)__pyx_Generator_getsets},
31221 {Py_tp_getattro, (
void *) PyObject_GenericGetAttr},
31222#if CYTHON_USE_TP_FINALIZE
31223 {Py_tp_finalize, (
void *)__Pyx_Coroutine_del},
31225#if __PYX_HAS_PY_AM_SEND == 1
31226 {Py_am_send, (
void *)__Pyx_Coroutine_AmSend},
31230static PyType_Spec __pyx_GeneratorType_spec = {
31231 __PYX_TYPE_MODULE_PREFIX
"generator",
31232 sizeof(__pyx_CoroutineObject),
31234#
if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
31235 Py_TPFLAGS_MANAGED_WEAKREF |
31237 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
31238 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND,
31239 __pyx_GeneratorType_slots
31241#if __PYX_HAS_PY_AM_SEND == 2
31242static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async;
31244static int __pyx_Generator_init(PyObject *module) {
31245 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
31246 mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(
31247 mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL);
31248 if (unlikely(!mstate->__pyx_GeneratorType)) {
31251#if __PYX_HAS_PY_AM_SEND == 2
31252 __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend);
31256static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) {
31257 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
31258 PyObject *retval = NULL;
31259 if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
31260 return __Pyx_Coroutine_AlreadyRunningError(gen);
31262 __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0);
31263 __Pyx_Coroutine_unset_is_running(gen);
31265 assert (result == PYGEN_RETURN || result == PYGEN_ERROR);
31266 assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL));
31271static int __Pyx_check_binary_version(
unsigned long ct_version,
unsigned long rt_version,
int allow_newer) {
31272 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
31273 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
31275 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
31279 PyOS_snprintf(message,
sizeof(message),
31280 "compile time Python version %d.%d "
31281 "of module '%.100s' "
31283 "runtime version %d.%d",
31284 (
int) (ct_version >> 24), (
int) ((ct_version >> 16) & 0xFF),
31286 (allow_newer) ?
"was newer than" :
"does not match",
31287 (
int) (rt_version >> 24), (
int) ((rt_version >> 16) & 0xFF)
31289 return PyErr_WarnEx(NULL, message, 1);
31294#if CYTHON_COMPILING_IN_LIMITED_API
31295 static PyObject* __Pyx__PyCode_New(
int a,
int p,
int k,
int l,
int s,
int f,
31296 PyObject *code, PyObject *
c, PyObject*
n, PyObject *
v,
31297 PyObject *fv, PyObject *cell, PyObject* fn,
31298 PyObject *name,
int fline, PyObject *lnos) {
31299 PyObject *exception_table = NULL;
31300 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
31301 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
31302 PyObject *version_info;
31303 PyObject *py_minor_version = NULL;
31305 long minor_version = 0;
31306 #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
31307 minor_version = 11;
31309 if (!(version_info = PySys_GetObject(
"version_info")))
goto end;
31310 if (!(py_minor_version = PySequence_GetItem(version_info, 1)))
goto end;
31311 minor_version = PyLong_AsLong(py_minor_version);
31312 Py_DECREF(py_minor_version);
31313 if (minor_version == -1 && PyErr_Occurred())
goto end;
31315 if (!(types_module = PyImport_ImportModule(
"types")))
goto end;
31316 if (!(code_type = PyObject_GetAttrString(types_module,
"CodeType")))
goto end;
31317 if (minor_version <= 10) {
31318 result = PyObject_CallFunction(code_type,
"iiiiiiOOOOOOiOOO", a,p, k, l,
s,
f, code,
31319 c,
n,
v, fn, name, fline, lnos, fv, cell);
31321 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0)))
goto end;
31322 result = PyObject_CallFunction(code_type,
"iiiiiiOOOOOOOiOOOO", a,p, k, l,
s,
f, code,
31323 c,
n,
v, fn, name, name, fline, lnos, exception_table, fv, cell);
31326 Py_XDECREF(code_type);
31327 Py_XDECREF(exception_table);
31328 Py_XDECREF(types_module);
31330 PyObject *exc_type, *exc_value, *exc_tb;
31331 PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
31332 if (PyErr_WarnFormat(
31333 PyExc_RuntimeWarning, 1,
31334 "Code object creation failed in Cython module: %S\nTry recompiling with a more recent version of Cython.",
31335 exc_value ? exc_value : exc_type) == 0) {
31339 Py_DECREF(exc_type);
31340 Py_XDECREF(exc_value);
31341 Py_XDECREF(exc_tb);
31345#elif PY_VERSION_HEX >= 0x030B0000
31346 static PyCodeObject* __Pyx__PyCode_New(
int a,
int p,
int k,
int l,
int s,
int f,
31347 PyObject *code, PyObject *
c, PyObject*
n, PyObject *
v,
31348 PyObject *fv, PyObject *cell, PyObject* fn,
31349 PyObject *name,
int fline, PyObject *lnos) {
31350 PyCodeObject *result;
31352 #if PY_VERSION_HEX >= 0x030C0000
31353 PyUnstable_Code_NewWithPosOnlyArgs
31355 PyCode_NewWithPosOnlyArgs
31357 (a, p, k, l,
s,
f, code,
c,
n,
v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
31358 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
31359 if (likely(result))
31360 result->_co_firsttraceable = 0;
31364#elif !CYTHON_COMPILING_IN_PYPY
31365 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
31366 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
31368 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
31369 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
31371static PyObject* __Pyx_PyCode_New(
31372 const __Pyx_PyCode_New_function_description descr,
31373 PyObject *
const *varnames,
31374 PyObject *filename,
31375 PyObject *funcname,
31376 PyObject *line_table,
31377 PyObject *tuple_dedup_map
31379 PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
31380 Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
31381 PyObject *varnames_tuple = PyTuple_New(var_count);
31382 if (unlikely(!varnames_tuple))
return NULL;
31383 for (Py_ssize_t i=0; i < var_count; i++) {
31384 Py_INCREF(varnames[i]);
31385 if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0))
goto done;
31387 #if CYTHON_COMPILING_IN_LIMITED_API
31388 varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
31389 if (!varnames_tuple_dedup) {
31390 if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0))
goto done;
31391 varnames_tuple_dedup = varnames_tuple;
31394 varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
31395 if (unlikely(!varnames_tuple_dedup))
goto done;
31397 #if CYTHON_AVOID_BORROWED_REFS
31398 Py_INCREF(varnames_tuple_dedup);
31400 if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
31401 Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
31402 #if !CYTHON_ASSUME_SAFE_SIZE
31403 if (unlikely(line_table_length == -1))
goto done;
31405 Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
31406 code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
31407 if (unlikely(!code_bytes))
goto done;
31408 char* c_code_bytes = PyBytes_AsString(code_bytes);
31409 if (unlikely(!c_code_bytes))
goto done;
31410 memset(c_code_bytes, 0, (
size_t) code_len);
31412 code_obj = (PyObject*) __Pyx__PyCode_New(
31413 (
int) descr.argcount,
31414 (
int) descr.num_posonly_args,
31415 (
int) descr.num_kwonly_args,
31416 (
int) descr.nlocals,
31419 code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
31420 __pyx_mstate_global->__pyx_empty_tuple,
31421 __pyx_mstate_global->__pyx_empty_tuple,
31422 varnames_tuple_dedup,
31423 __pyx_mstate_global->__pyx_empty_tuple,
31424 __pyx_mstate_global->__pyx_empty_tuple,
31427 (
int) descr.first_line,
31428 (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
31431 Py_XDECREF(code_bytes);
31432 #if CYTHON_AVOID_BORROWED_REFS
31433 Py_XDECREF(varnames_tuple_dedup);
31435 Py_DECREF(varnames_tuple);
31441static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString(
const char *
s, Py_ssize_t length,
int algo) {
31442#ifdef __Pyx_DecompressString_UNUSED
31443 CYTHON_UNUSED_VAR(
s);
31444 CYTHON_UNUSED_VAR(length);
31445 CYTHON_UNUSED_VAR(algo);
31448 PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
31449 const char* module_name = algo == 3 ?
"compression.zstd" : algo == 2 ?
"bz2" :
"zlib";
31450 PyObject *methodname = PyUnicode_FromString(
"decompress");
31451 if (unlikely(!methodname))
return NULL;
31452 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
31454 PyObject *fromlist = Py_BuildValue(
"[O]", methodname);
31455 if (unlikely(!fromlist))
goto bad;
31456 module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
31457 Py_DECREF(fromlist);
31460 module = PyImport_ImportModule(module_name);
31461 if (unlikely(!module))
goto import_failed;
31462 decompress = PyObject_GetAttr(module, methodname);
31463 if (unlikely(!decompress))
goto import_failed;
31466 char *memview_bytes =
const_cast<char*
>(
s);
31468 #if defined(__clang__)
31469 #pragma clang diagnostic push
31470 #pragma clang diagnostic ignored "-Wcast-qual"
31471 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
31472 #pragma GCC diagnostic push
31473 #pragma GCC diagnostic ignored "-Wcast-qual"
31475 char *memview_bytes = (
char*)
s;
31476 #if defined(__clang__)
31477 #pragma clang diagnostic pop
31478 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
31479 #pragma GCC diagnostic pop
31482 #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
31483 int memview_flags = 0x100;
31485 int memview_flags = PyBUF_READ;
31487 compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
31489 if (unlikely(!compressed_bytes)) {
31490 Py_DECREF(decompress);
31493 decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
31494 Py_DECREF(compressed_bytes);
31495 Py_DECREF(decompress);
31497 Py_DECREF(methodname);
31498 return decompressed;
31500 PyErr_Format(PyExc_ImportError,
31501 "Failed to import '%.20s.decompress' - cannot initialise module strings. "
31502 "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
31503 module_name, algo);
31505 Py_XDECREF(module);
31506 Py_DECREF(methodname);
31512#ifndef __Pyx_DecompressString_LZSS_UNUSED
31514static CYTHON_SMALL_CODE
size_t __pyx_lzss_decompress(
const uint8_t* src, uint8_t* dst,
size_t dst_len) {
31515 size_t pos = 0, out_pos = 0;
31517 uint32_t flags = src[pos++] | 0xFF00;
31518 while (flags & 0x100) {
31520 dst[out_pos++] = src[pos++];
31522 uint32_t lo = src[pos++], hi = src[pos++];
31523 uint32_t end_offset_of_last_occurrence, match_length;
31524 if (!(lo & 0x80)) {
31525 end_offset_of_last_occurrence = lo;
31527 }
else if (!(hi & 0x80)) {
31528 end_offset_of_last_occurrence = 0x80 + (((hi << 2) & 0x180) | (lo & 0x7F));
31529 match_length = hi & 0x1F;
31531 end_offset_of_last_occurrence = 0x80 + ((hi & 0x7F) << 7 | (lo & 0x7F));
31532 match_length = src[pos++];
31535 size_t ref_pos = out_pos - end_offset_of_last_occurrence - match_length;
31536 memcpy(dst + out_pos, dst + ref_pos, match_length);
31537 out_pos += match_length;
31539 if (out_pos >= dst_len)
return pos;
31545static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString_LZSS(
const char *
s,
size_t compressed_length,
size_t uncompressed_length) {
31546#ifdef __Pyx_DecompressString_LZSS_UNUSED
31547 CYTHON_UNUSED_VAR(
s);
31548 CYTHON_UNUSED_VAR(compressed_length);
31549 CYTHON_UNUSED_VAR(uncompressed_length);
31553 unsigned char *result_data;
31555 result = PyBytes_FromStringAndSize(NULL, (Py_ssize_t) uncompressed_length);
31556 if (unlikely(!result))
return NULL;
31557 result_data = __Pyx_PyBytes_AsWritableUString(result);
31558 if (unlikely(!result_data))
goto bad;
31559 src_length = __pyx_lzss_decompress((
const uint8_t*)
s, result_data, uncompressed_length);
31560 if (unlikely(src_length != compressed_length))
goto decompression_failed;
31562decompression_failed:
31563 PyErr_SetString(PyExc_RuntimeError,
"LZSS string data decompression failed");
31571static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(
const char *
s) {
31572 size_t len = strlen(
s);
31573 if (unlikely(len > (
size_t) PY_SSIZE_T_MAX)) {
31574 PyErr_SetString(PyExc_OverflowError,
"byte string is too long");
31577 return (Py_ssize_t) len;
31579static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(
const char* c_str) {
31580 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
31581 if (unlikely(len < 0))
return NULL;
31582 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
31584static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(
const char* c_str) {
31585 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
31586 if (unlikely(len < 0))
return NULL;
31587 return PyByteArray_FromStringAndSize(c_str, len);
31589static CYTHON_INLINE
const char* __Pyx_PyObject_AsString(PyObject* o) {
31591 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
31593#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
31594static CYTHON_INLINE
const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
31595 if (unlikely(__Pyx_PyUnicode_READY(o) == -1))
return NULL;
31596#if CYTHON_COMPILING_IN_LIMITED_API
31598 const char* result;
31599 Py_ssize_t unicode_length;
31600 CYTHON_MAYBE_UNUSED_VAR(unicode_length);
31601 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
31602 if (unlikely(PyArg_Parse(o,
"s#", &result, length) < 0))
return NULL;
31604 result = PyUnicode_AsUTF8AndSize(o, length);
31606 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
31607 unicode_length = PyUnicode_GetLength(o);
31608 if (unlikely(unicode_length < 0))
return NULL;
31609 if (unlikely(unicode_length != *length)) {
31610 PyUnicode_AsASCIIString(o);
31617#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
31618 if (likely(PyUnicode_IS_ASCII(o))) {
31619 *length = PyUnicode_GET_LENGTH(o);
31620 return PyUnicode_AsUTF8(o);
31622 PyUnicode_AsASCIIString(o);
31626 return PyUnicode_AsUTF8AndSize(o, length);
31631static CYTHON_INLINE
const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
31632#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
31633 if (PyUnicode_Check(o)) {
31634 return __Pyx_PyUnicode_AsStringAndSize(o, length);
31637 if (PyByteArray_Check(o)) {
31638#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
31639 *length = PyByteArray_GET_SIZE(o);
31640 return PyByteArray_AS_STRING(o);
31642 *length = PyByteArray_Size(o);
31643 if (*length == -1)
return NULL;
31644 return PyByteArray_AsString(o);
31649 int r = PyBytes_AsStringAndSize(o, &result, length);
31650 if (unlikely(
r < 0)) {
31657static CYTHON_INLINE
int __Pyx_PyObject_IsTrue(PyObject* x) {
31658 int is_true = x == Py_True;
31659 if (is_true | (x == Py_False) | (x == Py_None))
return is_true;
31660 else return PyObject_IsTrue(x);
31662static CYTHON_INLINE
int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
31664 if (unlikely(!x))
return -1;
31665 retval = __Pyx_PyObject_IsTrue(x);
31669static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
31670 __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
31671 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
31672 if (unlikely(!result_type_name))
goto bad;
31674 if (PyLong_Check(result)) {
31675 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
31676 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME
"). "
31677 "The ability to return an instance of a strict subclass of int is deprecated, "
31678 "and may be removed in a future version of Python.",
31679 result_type_name)) {
31680 __Pyx_DECREF_TypeName(result_type_name);
31683 __Pyx_DECREF_TypeName(result_type_name);
31686 PyErr_Format(PyExc_TypeError,
31687 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME
")",
31689 __Pyx_DECREF_TypeName(result_type_name);
31694static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
31695#if CYTHON_USE_TYPE_SLOTS
31696 PyNumberMethods *m;
31698 PyObject *res = NULL;
31699 if (likely(PyLong_Check(x)))
31700 return __Pyx_NewRef(x);
31701#if CYTHON_USE_TYPE_SLOTS
31702 m = Py_TYPE(x)->tp_as_number;
31703 if (likely(m && m->nb_int)) {
31704 res = m->nb_int(x);
31707 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
31708 res = PyNumber_Long(x);
31712 if (unlikely(!PyLong_CheckExact(res))) {
31713 return __Pyx_PyNumber_LongWrongResultType(res);
31716 else if (!PyErr_Occurred()) {
31717 PyErr_SetString(PyExc_TypeError,
31718 "an integer is required");
31722static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_AsSsize_t(PyObject* b) {
31723 #if CYTHON_USE_PYLONG_INTERNALS
31725 const Py_ssize_t size = __Pyx_PyLong_DigitCount(b);
31726 const int is_neg = __Pyx_PyLong_IsNeg(b);
31727 const digit* digits = __Pyx_PyLong_Digits(b);
31728 if (size == 0)
return 0;
31729 #if SIZEOF_SIZE_T * 8 > 1 * PyLong_SHIFT
31731 ival = (Py_ssize_t) (((
size_t)digits[0]));
31734 #if SIZEOF_SIZE_T * 8 > 2 * PyLong_SHIFT
31736 ival = (Py_ssize_t) (((((
size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
31739 #if SIZEOF_SIZE_T * 8 > 3 * PyLong_SHIFT
31741 ival = (Py_ssize_t) (((((((
size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
31744 #if SIZEOF_SIZE_T * 8 > 4 * PyLong_SHIFT
31746 ival = (Py_ssize_t) (((((((((
size_t)digits[3]) << PyLong_SHIFT) | (
size_t)digits[2]) << PyLong_SHIFT) | (
size_t)digits[1]) << PyLong_SHIFT) | (
size_t)digits[0]));
31749 return PyLong_AsSsize_t(b);
31750 return is_neg ? -ival : ival;
31752 return PyLong_AsSsize_t(b);
31755static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
31756 if (likely(PyLong_Check(b))) {
31757 return __Pyx_PyLong_AsSsize_t(b);
31760 PyObject *x = PyNumber_Index(b);
31761 if (unlikely(!x))
return -1;
31762 ival = __Pyx_PyLong_AsSsize_t(x);
31767static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
31768 if (
sizeof(Py_hash_t) ==
sizeof(Py_ssize_t)) {
31769 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
31773 x = PyNumber_Index(o);
31775 ival = PyLong_AsLong(x);
31780static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(
int b) {
31781 CYTHON_UNUSED_VAR(b);
31782 return __Pyx_NewRef(Py_None);
31784static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(
long b) {
31785 return __Pyx_NewRef(b ? Py_True: Py_False);
31787static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(
size_t ival) {
31788 return PyLong_FromSize_t(ival);
31793#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
31794#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
31795#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
31796 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
31798 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
31801#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
31802#error "Module state with PEP489 requires atomics. Currently that's one of\
31803 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
31805#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
31806#define __Pyx_ModuleStateLookup_Lock()
31807#define __Pyx_ModuleStateLookup_Unlock()
31808#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
31809static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
31810#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
31811#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
31812#elif defined(__cplusplus) && __cplusplus >= 201103L
31814static std::mutex __Pyx_ModuleStateLookup_mutex;
31815#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
31816#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
31817#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
31818#include <threads.h>
31819static mtx_t __Pyx_ModuleStateLookup_mutex;
31820static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
31821static void __Pyx_ModuleStateLookup_initialize_mutex(
void) {
31822 mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
31824#define __Pyx_ModuleStateLookup_Lock()\
31825 call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
31826 mtx_lock(&__Pyx_ModuleStateLookup_mutex)
31827#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
31828#elif defined(HAVE_PTHREAD_H)
31829#include <pthread.h>
31830static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
31831#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
31832#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
31833#elif defined(_WIN32)
31834#include <Windows.h>
31835static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
31836#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
31837#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
31839#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
31840 Requires C standard >= C11, or C++ standard >= C++11,\
31841 or pthreads, or the Windows 32 API, or Python >= 3.13."
31846} __Pyx_InterpreterIdAndModule;
31848 char interpreter_id_as_index;
31850 Py_ssize_t allocated;
31851 __Pyx_InterpreterIdAndModule table[1];
31852} __Pyx_ModuleStateLookupData;
31853#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
31854#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
31855static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
31857#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
31858static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
31860static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
31862static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
31863 __Pyx_InterpreterIdAndModule* table,
31865 int64_t interpreterId) {
31866 __Pyx_InterpreterIdAndModule* begin = table;
31867 __Pyx_InterpreterIdAndModule* end = begin + count;
31868 if (begin->id == interpreterId) {
31871 while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
31872 __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
31873 if (halfway->id == interpreterId) {
31876 if (halfway->id < interpreterId) {
31882 for (; begin < end; ++begin) {
31883 if (begin->id >= interpreterId)
return begin;
31887static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED
void* dummy) {
31888 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
31889 if (interpreter_id == -1)
return NULL;
31890#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
31891 __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
31893 __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
31894 if (likely(data)) {
31895 __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
31896 if (likely(data == new_data)) {
31897 goto read_finished;
31900 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
31901 __Pyx_ModuleStateLookup_Lock();
31902 __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
31903 data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
31904 __Pyx_ModuleStateLookup_Unlock();
31908 __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
31910 __Pyx_InterpreterIdAndModule* found = NULL;
31911 if (unlikely(!data))
goto end;
31912 if (data->interpreter_id_as_index) {
31913 if (interpreter_id < data->count) {
31914 found = data->table+interpreter_id;
31917 found = __Pyx_State_FindModuleStateLookupTableLowerBound(
31918 data->table, data->count, interpreter_id);
31922 PyObject *result=NULL;
31923 if (found && found->id == interpreter_id) {
31924 result = found->module;
31926#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
31927 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
31932#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
31933static void __Pyx_ModuleStateLookup_wait_until_no_readers(
void) {
31934 while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
31937#define __Pyx_ModuleStateLookup_wait_until_no_readers()
31939static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
31940 Py_ssize_t to_allocate = (*old_data)->allocated;
31941 while (to_allocate <= interpreter_id) {
31942 if (to_allocate == 0) to_allocate = 1;
31943 else to_allocate *= 2;
31945 __Pyx_ModuleStateLookupData *new_data = *old_data;
31946 if (to_allocate != (*old_data)->allocated) {
31947 new_data = (__Pyx_ModuleStateLookupData *)realloc(
31949 sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*
sizeof(__Pyx_InterpreterIdAndModule));
31954 for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
31955 new_data->table[i].id = i;
31956 new_data->table[i].module = NULL;
31958 new_data->allocated = to_allocate;
31960 new_data->table[interpreter_id].module =
module;
31961 if (new_data->count < interpreter_id+1) {
31962 new_data->count = interpreter_id+1;
31964 *old_data = new_data;
31967static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
31968 __Pyx_InterpreterIdAndModule *read = data->table;
31969 __Pyx_InterpreterIdAndModule *write = data->table;
31970 __Pyx_InterpreterIdAndModule *end = read + data->count;
31971 for (; read<end; ++read) {
31972 if (read->module) {
31973 write->id = read->id;
31974 write->module = read->module;
31978 data->count = write - data->table;
31979 for (; write<end; ++write) {
31981 write->module = NULL;
31983 data->interpreter_id_as_index = 0;
31985static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED
void* dummy) {
31986 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
31987 if (interpreter_id == -1)
return -1;
31989 __Pyx_ModuleStateLookup_Lock();
31990#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
31991 __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
31992 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
31994 __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
31996 __Pyx_ModuleStateLookupData *new_data = old_data;
31998 new_data = (__Pyx_ModuleStateLookupData *)calloc(1,
sizeof(__Pyx_ModuleStateLookupData));
32004 new_data->allocated = 1;
32005 new_data->interpreter_id_as_index = 1;
32007 __Pyx_ModuleStateLookup_wait_until_no_readers();
32008 if (new_data->interpreter_id_as_index) {
32009 if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
32010 result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
32013 __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
32016 Py_ssize_t insert_at = 0;
32018 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
32019 new_data->table, new_data->count, interpreter_id);
32020 assert(lower_bound);
32021 insert_at = lower_bound - new_data->table;
32022 if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
32023 lower_bound->module =
module;
32027 if (new_data->count+1 >= new_data->allocated) {
32028 Py_ssize_t to_allocate = (new_data->count+1)*2;
32030 (__Pyx_ModuleStateLookupData*)realloc(
32032 sizeof(__Pyx_ModuleStateLookupData) +
32033 (to_allocate-1)*
sizeof(__Pyx_InterpreterIdAndModule));
32036 new_data = old_data;
32040 new_data->allocated = to_allocate;
32043 int64_t last_id = interpreter_id;
32044 PyObject *last_module =
module;
32045 for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
32046 int64_t current_id = new_data->table[i].id;
32047 new_data->table[i].id = last_id;
32048 last_id = current_id;
32049 PyObject *current_module = new_data->table[i].module;
32050 new_data->table[i].module = last_module;
32051 last_module = current_module;
32055#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
32056 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
32058 __Pyx_ModuleStateLookup_data = new_data;
32060 __Pyx_ModuleStateLookup_Unlock();
32063static int __Pyx_State_RemoveModule(CYTHON_UNUSED
void* dummy) {
32064 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
32065 if (interpreter_id == -1)
return -1;
32066 __Pyx_ModuleStateLookup_Lock();
32067#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
32068 __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
32069 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
32071 __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
32073 if (data->interpreter_id_as_index) {
32074 if (interpreter_id < data->count) {
32075 data->table[interpreter_id].module = NULL;
32080 __Pyx_ModuleStateLookup_wait_until_no_readers();
32081 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
32082 data->table, data->count, interpreter_id);
32083 if (!lower_bound)
goto done;
32084 if (lower_bound->id != interpreter_id)
goto done;
32085 __Pyx_InterpreterIdAndModule *end = data->table+data->count;
32086 for (;lower_bound<end-1; ++lower_bound) {
32087 lower_bound->id = (lower_bound+1)->
id;
32088 lower_bound->module = (lower_bound+1)->module;
32092 if (data->count == 0) {
32097#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
32098 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
32100 __Pyx_ModuleStateLookup_data = data;
32102 __Pyx_ModuleStateLookup_Unlock();
32109#pragma warning( pop )