proteus 1.9.0
C/C++/Fortran libraries
Loading...
Searching...
No Matches
ctimeIntegration.c
Go to the documentation of this file.
1/* Generated by Cython 3.3.0 */
2
3/* BEGIN: Cython Metadata
4{
5 "distutils": {
6 "depends": [
7 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/arrayobject.h",
8 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/arrayscalars.h",
9 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ndarrayobject.h",
10 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ndarraytypes.h",
11 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ufuncobject.h",
12 "proteus/timeIntegration.h"
13 ],
14 "include_dirs": [
15 "proteus",
16 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include"
17 ],
18 "language": "c",
19 "name": "ctimeIntegration",
20 "sources": [
21 "proteus/ctimeIntegration.pyx",
22 "proteus/timeIntegration.c"
23 ]
24 },
25 "module_name": "ctimeIntegration"
26}
27END: Cython Metadata */
28
29#ifndef PY_SSIZE_T_CLEAN
30#define PY_SSIZE_T_CLEAN
31#endif /* PY_SSIZE_T_CLEAN */
32/* InitLimitedAPI */
33#if defined(Py_LIMITED_API)
34 #if !defined(CYTHON_LIMITED_API)
35 #define CYTHON_LIMITED_API 1
36 #endif
37#elif defined(CYTHON_LIMITED_API)
38 #ifdef _MSC_VER
39 #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.")
40 #else
41 #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.
42 #endif
43#endif
44
45#include "Python.h"
46#ifndef Py_PYTHON_H
47 #error Python headers needed to compile C extensions, please install development version of Python.
48#elif PY_VERSION_HEX < 0x03090000
49 #error Cython requires Python 3.9+.
50#elif defined(Py_LIMITED_API) && (Py_LIMITED_API & 0xFFFF0000) > (PY_VERSION_HEX & 0xFFFF0000)
51 #error 'Py_LIMITED_API' can only select past Python X.Y versions, not future ones.
52#else
53#define __PYX_ABI_VERSION "3_3_0"
54#define CYTHON_HEX_VERSION 0x030300F0
55#define CYTHON_FUTURE_DIVISION 1
56/* CModulePreamble */
57#include <stddef.h>
58#ifndef offsetof
59 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
60#endif
61#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
62 #ifndef __stdcall
63 #define __stdcall
64 #endif
65 #ifndef __cdecl
66 #define __cdecl
67 #endif
68 #ifndef __fastcall
69 #define __fastcall
70 #endif
71#endif
72#ifdef __has_builtin
73 #define __Pyx_has_cbuiltin(name) __has_builtin(name)
74#else
75 #define __Pyx_has_cbuiltin(name) (0)
76#endif
77#ifndef DL_IMPORT
78 #define DL_IMPORT(t) t
79#endif
80#ifndef DL_EXPORT
81 #define DL_EXPORT(t) t
82#endif
83#define __PYX_COMMA ,
84#ifndef PY_LONG_LONG
85 #define PY_LONG_LONG LONG_LONG
86#endif
87#ifndef Py_HUGE_VAL
88 #define Py_HUGE_VAL HUGE_VAL
89#endif
90#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
91#if defined(CYTHON_LIMITED_API)
92 #ifdef Py_LIMITED_API
93 #undef __PYX_LIMITED_VERSION_HEX
94 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
95 #if Py_LIMITED_API < 0x03090000
96 #error "Cython 3.3 requires the Python Limited API version to be 3.9 or greater."
97 #endif
98 #endif
99 #if defined(GRAALVM_PYTHON) || defined(PYPY_VERSION)
100 #ifdef _MSC_VER
101 #pragma message ("Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
102 code for PyPy and GraalPy and is unlikely to work.")
103 #else
104 #warning "Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
105 code for PyPy and GraalPy and is unlikely to work."
106 #endif
107 #endif
108 #define CYTHON_COMPILING_IN_PYPY 0
109 #define CYTHON_COMPILING_IN_CPYTHON 0
110 #define CYTHON_COMPILING_IN_LIMITED_API 1
111 #define CYTHON_COMPILING_IN_GRAAL 0
112 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
113 #undef CYTHON_USE_TYPE_SLOTS
114 #define CYTHON_USE_TYPE_SLOTS 0
115 #undef CYTHON_USE_TYPE_SPECS
116 #define CYTHON_USE_TYPE_SPECS 1
117 #undef CYTHON_USE_PYTYPE_LOOKUP
118 #define CYTHON_USE_PYTYPE_LOOKUP 0
119 #undef CYTHON_USE_PYLIST_INTERNALS
120 #define CYTHON_USE_PYLIST_INTERNALS 0
121 #undef CYTHON_USE_UNICODE_INTERNALS
122 #define CYTHON_USE_UNICODE_INTERNALS 0
123 #ifndef CYTHON_USE_UNICODE_WRITER
124 #define CYTHON_USE_UNICODE_WRITER 0
125 #endif
126 #undef CYTHON_USE_PYLONG_INTERNALS
127 #define CYTHON_USE_PYLONG_INTERNALS 0
128 #ifndef CYTHON_AVOID_BORROWED_REFS
129 #define CYTHON_AVOID_BORROWED_REFS 0
130 #endif
131 #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
132 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
133 #endif
134 #undef CYTHON_ASSUME_SAFE_MACROS
135 #define CYTHON_ASSUME_SAFE_MACROS 0
136 #undef CYTHON_ASSUME_SAFE_SIZE
137 #define CYTHON_ASSUME_SAFE_SIZE 0
138 #undef CYTHON_UNPACK_METHODS
139 #define CYTHON_UNPACK_METHODS 0
140 #undef CYTHON_FAST_THREAD_STATE
141 #define CYTHON_FAST_THREAD_STATE 0
142 #undef CYTHON_FAST_GIL
143 #define CYTHON_FAST_GIL 0
144 #undef CYTHON_VECTORCALL
145 #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
146 #ifndef CYTHON_VECTORCALL_TPNEW
147 #define CYTHON_VECTORCALL_TPNEW (CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
148 #endif
149 #ifndef CYTHON_PEP487_INIT_SUBCLASS
150 #define CYTHON_PEP487_INIT_SUBCLASS 1
151 #endif
152 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
153 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
154 #endif
155 #ifndef CYTHON_USE_MODULE_STATE
156 #define CYTHON_USE_MODULE_STATE 0
157 #endif
158 #undef CYTHON_USE_SYS_MONITORING
159 #define CYTHON_USE_SYS_MONITORING 0
160 #ifndef CYTHON_USE_TP_FINALIZE
161 #define CYTHON_USE_TP_FINALIZE (__PYX_LIMITED_VERSION_HEX >= 0x030F0000 && PY_VERSION_HEX > 0x030F00A8)
162 #endif
163 #ifndef CYTHON_USE_AM_SEND
164 #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
165 #endif
166 #undef CYTHON_USE_DICT_VERSIONS
167 #define CYTHON_USE_DICT_VERSIONS 0
168 #undef CYTHON_USE_EXC_INFO_STACK
169 #define CYTHON_USE_EXC_INFO_STACK 0
170 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
171 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
172 #endif
173 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
174 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
175 #endif
176 #ifndef CYTHON_USE_FREELISTS
177 #define CYTHON_USE_FREELISTS 1
178 #endif
179 #undef CYTHON_IMMORTAL_CONSTANTS
180 #define CYTHON_IMMORTAL_CONSTANTS 0
181 #if __PYX_LIMITED_VERSION_HEX < 0x030E0000
182 #undef CYTHON_OPAQUE_OBJECTS
183 #define CYTHON_OPAQUE_OBJECTS 0
184 #elif !defined(CYTHON_OPAQUE_OBJECTS)
185 #define CYTHON_OPAQUE_OBJECTS (__PYX_LIMITED_VERSION_HEX >= 0x030F0000)
186 #endif
187#elif defined(GRAALVM_PYTHON)
188 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
189 The existence of this section does not imply that anything works or is even tested */
190 #define CYTHON_COMPILING_IN_PYPY 0
191 #define CYTHON_COMPILING_IN_CPYTHON 0
192 #define CYTHON_COMPILING_IN_LIMITED_API 0
193 #define CYTHON_COMPILING_IN_GRAAL 1
194 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
195 #ifndef CYTHON_USE_TYPE_SLOTS
196 #define CYTHON_USE_TYPE_SLOTS 0
197 #endif
198 #undef CYTHON_USE_TYPE_SPECS
199 #define CYTHON_USE_TYPE_SPECS 0
200 #undef CYTHON_USE_PYTYPE_LOOKUP
201 #define CYTHON_USE_PYTYPE_LOOKUP 0
202 #undef CYTHON_USE_PYLIST_INTERNALS
203 #define CYTHON_USE_PYLIST_INTERNALS 0
204 #undef CYTHON_USE_UNICODE_INTERNALS
205 #define CYTHON_USE_UNICODE_INTERNALS 0
206 #undef CYTHON_USE_UNICODE_WRITER
207 #define CYTHON_USE_UNICODE_WRITER 0
208 #undef CYTHON_USE_PYLONG_INTERNALS
209 #define CYTHON_USE_PYLONG_INTERNALS 0
210 #undef CYTHON_AVOID_BORROWED_REFS
211 #define CYTHON_AVOID_BORROWED_REFS 1
212 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
213 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
214 #undef CYTHON_ASSUME_SAFE_MACROS
215 #define CYTHON_ASSUME_SAFE_MACROS 0
216 #undef CYTHON_ASSUME_SAFE_SIZE
217 #define CYTHON_ASSUME_SAFE_SIZE 0
218 #undef CYTHON_UNPACK_METHODS
219 #define CYTHON_UNPACK_METHODS 0
220 #undef CYTHON_FAST_THREAD_STATE
221 #define CYTHON_FAST_THREAD_STATE 0
222 #undef CYTHON_FAST_GIL
223 #define CYTHON_FAST_GIL 0
224 #ifndef CYTHON_VECTORCALL
225 #define CYTHON_VECTORCALL 1
226 #endif
227 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
228 #undef CYTHON_VECTORCALL_TPNEW
229 #define CYTHON_VECTORCALL_TPNEW 0
230 #elif !defined(CYTHON_VECTORCALL_TPNEW)
231 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
232 #endif
233 #ifndef CYTHON_PEP487_INIT_SUBCLASS
234 #define CYTHON_PEP487_INIT_SUBCLASS 1
235 #endif
236 #undef CYTHON_PEP489_MULTI_PHASE_INIT
237 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
238 #undef CYTHON_USE_MODULE_STATE
239 #define CYTHON_USE_MODULE_STATE 0
240 #undef CYTHON_USE_SYS_MONITORING
241 #define CYTHON_USE_SYS_MONITORING 0
242 #undef CYTHON_USE_TP_FINALIZE
243 #define CYTHON_USE_TP_FINALIZE 0
244 #undef CYTHON_USE_AM_SEND
245 #define CYTHON_USE_AM_SEND 0
246 #undef CYTHON_USE_DICT_VERSIONS
247 #define CYTHON_USE_DICT_VERSIONS 0
248 #undef CYTHON_USE_EXC_INFO_STACK
249 #define CYTHON_USE_EXC_INFO_STACK 1
250 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
251 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
252 #endif
253 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
254 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
255 #endif
256 #undef CYTHON_USE_FREELISTS
257 #define CYTHON_USE_FREELISTS 0
258 #undef CYTHON_IMMORTAL_CONSTANTS
259 #define CYTHON_IMMORTAL_CONSTANTS 0
260 #undef CYTHON_OPAQUE_OBJECTS
261 #define CYTHON_OPAQUE_OBJECTS 0
262#elif defined(PYPY_VERSION)
263 #define CYTHON_COMPILING_IN_PYPY 1
264 #define CYTHON_COMPILING_IN_CPYTHON 0
265 #define CYTHON_COMPILING_IN_LIMITED_API 0
266 #define CYTHON_COMPILING_IN_GRAAL 0
267 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
268 #undef CYTHON_USE_TYPE_SLOTS
269 #define CYTHON_USE_TYPE_SLOTS 1
270 #ifndef CYTHON_USE_TYPE_SPECS
271 #define CYTHON_USE_TYPE_SPECS 0
272 #endif
273 #undef CYTHON_USE_PYTYPE_LOOKUP
274 #define CYTHON_USE_PYTYPE_LOOKUP 0
275 #undef CYTHON_USE_PYLIST_INTERNALS
276 #define CYTHON_USE_PYLIST_INTERNALS 0
277 #undef CYTHON_USE_UNICODE_INTERNALS
278 #define CYTHON_USE_UNICODE_INTERNALS 0
279 #undef CYTHON_USE_UNICODE_WRITER
280 #define CYTHON_USE_UNICODE_WRITER 0
281 #undef CYTHON_USE_PYLONG_INTERNALS
282 #define CYTHON_USE_PYLONG_INTERNALS 0
283 #undef CYTHON_AVOID_BORROWED_REFS
284 #define CYTHON_AVOID_BORROWED_REFS 1
285 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
286 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
287 #undef CYTHON_ASSUME_SAFE_MACROS
288 #define CYTHON_ASSUME_SAFE_MACROS 0
289 #ifndef CYTHON_ASSUME_SAFE_SIZE
290 #define CYTHON_ASSUME_SAFE_SIZE 1
291 #endif
292 #undef CYTHON_UNPACK_METHODS
293 #define CYTHON_UNPACK_METHODS 0
294 #undef CYTHON_FAST_THREAD_STATE
295 #define CYTHON_FAST_THREAD_STATE 0
296 #undef CYTHON_FAST_GIL
297 #define CYTHON_FAST_GIL 0
298 #ifndef CYTHON_VECTORCALL
299 #define CYTHON_VECTORCALL 1
300 #endif
301 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
302 #undef CYTHON_VECTORCALL_TPNEW
303 #define CYTHON_VECTORCALL_TPNEW 0
304 #elif !defined(CYTHON_VECTORCALL_TPNEW)
305 #define CYTHON_VECTORCALL_TPNEW (PYPY_VERSION_NUM >= 0x07030800 && CYTHON_VECTORCALL)
306 #endif
307 #ifndef CYTHON_PEP487_INIT_SUBCLASS
308 #define CYTHON_PEP487_INIT_SUBCLASS 1
309 #endif
310 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
311 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
312 #endif
313 #undef CYTHON_USE_MODULE_STATE
314 #define CYTHON_USE_MODULE_STATE 0
315 #undef CYTHON_USE_SYS_MONITORING
316 #define CYTHON_USE_SYS_MONITORING 0
317 #ifndef CYTHON_USE_TP_FINALIZE
318 #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
319 #endif
320 #undef CYTHON_USE_AM_SEND
321 #define CYTHON_USE_AM_SEND 0
322 #undef CYTHON_USE_DICT_VERSIONS
323 #define CYTHON_USE_DICT_VERSIONS 0
324 #undef CYTHON_USE_EXC_INFO_STACK
325 #define CYTHON_USE_EXC_INFO_STACK 0
326 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
327 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
328 #endif
329 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
330 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
331 #endif
332 #undef CYTHON_USE_FREELISTS
333 #define CYTHON_USE_FREELISTS 0
334 #undef CYTHON_IMMORTAL_CONSTANTS
335 #define CYTHON_IMMORTAL_CONSTANTS 0
336 #undef CYTHON_OPAQUE_OBJECTS
337 #define CYTHON_OPAQUE_OBJECTS 0
338#else
339 #define CYTHON_COMPILING_IN_PYPY 0
340 #define CYTHON_COMPILING_IN_CPYTHON 1
341 #define CYTHON_COMPILING_IN_LIMITED_API 0
342 #define CYTHON_COMPILING_IN_GRAAL 0
343 #ifdef Py_GIL_DISABLED
344 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
345 #else
346 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
347 #endif
348 #if PY_VERSION_HEX < 0x030A0000
349 #undef CYTHON_USE_TYPE_SLOTS
350 #define CYTHON_USE_TYPE_SLOTS 1
351 #elif !defined(CYTHON_USE_TYPE_SLOTS)
352 #define CYTHON_USE_TYPE_SLOTS 1
353 #endif
354 #ifndef CYTHON_USE_TYPE_SPECS
355 #define CYTHON_USE_TYPE_SPECS 0
356 #endif
357 #ifndef CYTHON_USE_PYTYPE_LOOKUP
358 #define CYTHON_USE_PYTYPE_LOOKUP 1
359 #endif
360 #ifndef CYTHON_USE_PYLONG_INTERNALS
361 #define CYTHON_USE_PYLONG_INTERNALS 1
362 #endif
363 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
364 #undef CYTHON_USE_PYLIST_INTERNALS
365 #define CYTHON_USE_PYLIST_INTERNALS 0
366 #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
367 #define CYTHON_USE_PYLIST_INTERNALS 1
368 #endif
369 #ifndef CYTHON_USE_UNICODE_INTERNALS
370 #define CYTHON_USE_UNICODE_INTERNALS 1
371 #endif
372 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
373 #undef CYTHON_USE_UNICODE_WRITER
374 #define CYTHON_USE_UNICODE_WRITER 0
375 #elif !defined(CYTHON_USE_UNICODE_WRITER)
376 #define CYTHON_USE_UNICODE_WRITER 1
377 #endif
378 #ifndef CYTHON_AVOID_BORROWED_REFS
379 #define CYTHON_AVOID_BORROWED_REFS 0
380 #endif
381 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
382 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
383 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
384 #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
385 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
386 #endif
387 #ifndef CYTHON_ASSUME_SAFE_MACROS
388 #define CYTHON_ASSUME_SAFE_MACROS 1
389 #endif
390 #ifndef CYTHON_ASSUME_SAFE_SIZE
391 #define CYTHON_ASSUME_SAFE_SIZE 1
392 #endif
393 #ifndef CYTHON_UNPACK_METHODS
394 #define CYTHON_UNPACK_METHODS 1
395 #endif
396 #ifndef CYTHON_FAST_THREAD_STATE
397 #define CYTHON_FAST_THREAD_STATE 1
398 #endif
399 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
400 #undef CYTHON_FAST_GIL
401 #define CYTHON_FAST_GIL 0
402 #elif !defined(CYTHON_FAST_GIL)
403 #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
404 #endif
405 #ifndef CYTHON_VECTORCALL
406 #define CYTHON_VECTORCALL 1
407 #endif
408 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
409 #undef CYTHON_VECTORCALL_TPNEW
410 #define CYTHON_VECTORCALL_TPNEW 0
411 #elif !defined(CYTHON_VECTORCALL_TPNEW)
412 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
413 #endif
414 #ifndef CYTHON_PEP487_INIT_SUBCLASS
415 #define CYTHON_PEP487_INIT_SUBCLASS 1
416 #endif
417 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
418 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
419 #endif
420 #ifndef CYTHON_USE_MODULE_STATE
421 #define CYTHON_USE_MODULE_STATE 0
422 #endif
423 #ifndef CYTHON_USE_SYS_MONITORING
424 #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
425 #endif
426 #ifndef CYTHON_USE_TP_FINALIZE
427 #define CYTHON_USE_TP_FINALIZE 1
428 #endif
429 #ifndef CYTHON_USE_AM_SEND
430 #define CYTHON_USE_AM_SEND 1
431 #endif
432 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
433 #undef CYTHON_USE_DICT_VERSIONS
434 #define CYTHON_USE_DICT_VERSIONS 0
435 #elif !defined(CYTHON_USE_DICT_VERSIONS)
436 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
437 #endif
438 #ifndef CYTHON_USE_EXC_INFO_STACK
439 #define CYTHON_USE_EXC_INFO_STACK 1
440 #endif
441 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
442 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
443 #endif
444 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
445 #define CYTHON_USE_OWN_PREP_RERAISE_STAR (PY_VERSION_HEX < 0x030C00B2)
446 #endif
447 #ifndef CYTHON_USE_FREELISTS
448 #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
449 #endif
450 #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
451 #undef CYTHON_IMMORTAL_CONSTANTS
452 #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work
453 #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
454 #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
455 #endif
456 #ifndef CYTHON_OPAQUE_OBJECTS
457 #define CYTHON_OPAQUE_OBJECTS 0
458 #endif
459#endif
460#if CYTHON_USE_PYLONG_INTERNALS
461 #undef SHIFT
462 #undef BASE
463 #undef MASK
464 #ifdef SIZEOF_VOID_P
465 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
466 #endif
467#endif
468#ifndef __has_attribute
469 #define __has_attribute(x) 0
470#endif
471#ifndef __has_cpp_attribute
472 #define __has_cpp_attribute(x) 0
473#endif
474#ifndef CYTHON_RESTRICT
475 #if defined(__GNUC__)
476 #define CYTHON_RESTRICT __restrict__
477 #elif defined(_MSC_VER) && _MSC_VER >= 1400
478 #define CYTHON_RESTRICT __restrict
479 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
480 #define CYTHON_RESTRICT restrict
481 #else
482 #define CYTHON_RESTRICT
483 #endif
484#endif
485#ifndef CYTHON_UNUSED
486 #if defined(__cplusplus)
487 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
488 * but leads to warnings with -pedantic, since it is a C++17 feature */
489 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
490 #if __has_cpp_attribute(maybe_unused)
491 #define CYTHON_UNUSED [[maybe_unused]]
492 #endif
493 #endif
494 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
495 #define CYTHON_UNUSED [[maybe_unused]]
496 #endif
497#endif
498#ifndef CYTHON_UNUSED
499# if defined(__GNUC__)
500# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
501# define CYTHON_UNUSED __attribute__ ((__unused__))
502# else
503# define CYTHON_UNUSED
504# endif
505# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
506# define CYTHON_UNUSED __attribute__ ((__unused__))
507# else
508# define CYTHON_UNUSED
509# endif
510#endif
511#ifndef CYTHON_UNUSED_VAR
512# if defined(__cplusplus)
513 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
514# else
515# define CYTHON_UNUSED_VAR(x) (void)(x)
516# endif
517#endif
518#ifndef CYTHON_MAYBE_UNUSED_VAR
519 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
520#endif
521#ifndef CYTHON_NCP_UNUSED
522# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
523# define CYTHON_NCP_UNUSED
524# else
525# define CYTHON_NCP_UNUSED CYTHON_UNUSED
526# endif
527#endif
528#ifndef CYTHON_USE_CPP_STD_MOVE
529 #if defined(__cplusplus) && (\
530 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
531 #define CYTHON_USE_CPP_STD_MOVE 1
532 #else
533 #define CYTHON_USE_CPP_STD_MOVE 0
534 #endif
535#endif
536#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
537#include <stdint.h>
538typedef uintptr_t __pyx_uintptr_t;
539#ifndef CYTHON_FALLTHROUGH
540 #if defined(__cplusplus)
541 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
542 * but leads to warnings with -pedantic, since it is a C++17 feature */
543 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
544 #if __has_cpp_attribute(fallthrough)
545 #define CYTHON_FALLTHROUGH [[fallthrough]]
546 #endif
547 #endif
548 #ifndef CYTHON_FALLTHROUGH
549 #if __has_cpp_attribute(clang::fallthrough)
550 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
551 #elif __has_cpp_attribute(gnu::fallthrough)
552 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
553 #endif
554 #endif
555 #endif
556 #ifndef CYTHON_FALLTHROUGH
557 #if __has_attribute(fallthrough)
558 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
559 #else
560 #define CYTHON_FALLTHROUGH
561 #endif
562 #endif
563 #if defined(__clang__) && defined(__apple_build_version__)
564 #if __apple_build_version__ < 7000000
565 #undef CYTHON_FALLTHROUGH
566 #define CYTHON_FALLTHROUGH
567 #endif
568 #endif
569#endif
570#ifdef Py_UNREACHABLE
571 #define __Pyx_UNREACHABLE() Py_UNREACHABLE()
572#elif __Pyx_has_cbuiltin(__builtin_unreachable)
573 #define __Pyx_UNREACHABLE() __builtin_unreachable()
574#elif defined(__clang__) || defined(__INTEL_COMPILER) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
575 #define __Pyx_UNREACHABLE() __builtin_unreachable()
576#elif defined(_MSC_VER)
577 #define __Pyx_UNREACHABLE() __assume(0)
578#else
579 #define __Pyx_UNREACHABLE() Py_FatalError("Unreachable C code path reached")
580#endif
581#ifndef Py_UNREACHABLE
582 #define Py_UNREACHABLE() __Pyx_UNREACHABLE()
583#endif
584#ifdef __cplusplus
585 template <typename T>
586 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
587 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
588#else
589 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
590#endif
591#if CYTHON_COMPILING_IN_PYPY == 1
592 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
593#else
594 #define __PYX_NEED_TP_PRINT_SLOT 0
595#endif
596#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
597#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
598#define __Pyx_PyErr_FetchException(petype, peval, petb) PyErr_Fetch(petype, peval, petb)
599#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_Restore(etype, eval, etb)
600#else
601#define __Pyx_PyErr_FetchException(petype, peval, petb) *(petype)=NULL; *(peval)=PyErr_GetRaisedException(); *(petb)=NULL
602#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_SetRaisedException(eval)
603#endif
604
605/* CInitCode */
606#ifndef CYTHON_INLINE
607 #if defined(__clang__)
608 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
609 #elif defined(__GNUC__)
610 #define CYTHON_INLINE __inline__
611 #elif defined(_MSC_VER)
612 #define CYTHON_INLINE __inline
613 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
614 #define CYTHON_INLINE inline
615 #else
616 #define CYTHON_INLINE
617 #endif
618#endif
619
620/* PythonCompatibility */
621#define __PYX_BUILD_PY_SSIZE_T "n"
622#define CYTHON_FORMAT_SSIZE_T "z"
623#define __Pyx_BUILTIN_MODULE_NAME "builtins"
624#define __Pyx_DefaultClassType PyType_Type
625#if CYTHON_COMPILING_IN_LIMITED_API
626 #ifndef CO_OPTIMIZED
627 static int CO_OPTIMIZED;
628 #endif
629 #ifndef CO_NEWLOCALS
630 static int CO_NEWLOCALS;
631 #endif
632 #ifndef CO_VARARGS
633 static int CO_VARARGS;
634 #endif
635 #ifndef CO_VARKEYWORDS
636 static int CO_VARKEYWORDS;
637 #endif
638 #ifndef CO_ASYNC_GENERATOR
639 static int CO_ASYNC_GENERATOR;
640 #endif
641 #ifndef CO_GENERATOR
642 static int CO_GENERATOR;
643 #endif
644 #ifndef CO_COROUTINE
645 static int CO_COROUTINE;
646 #endif
647#else
648 #ifndef CO_COROUTINE
649 #define CO_COROUTINE 0x80
650 #endif
651 #ifndef CO_ASYNC_GENERATOR
652 #define CO_ASYNC_GENERATOR 0x200
653 #endif
654#endif
655static int __Pyx_init_co_variables(void);
656#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
657 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
658#else
659 #define __Pyx_Py_Is(x, y) ((x) == (y))
660#endif
661#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
662 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
663#else
664 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
665#endif
666#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
667 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
668#else
669 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
670#endif
671#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
672 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
673#else
674 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
675#endif
676#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
677#if CYTHON_COMPILING_IN_PYPY
678 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
679#else
680 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
681#endif
682#if CYTHON_COMPILING_IN_LIMITED_API
683static unsigned long __Pyx_Runtime_TPFLAGS_SEQUENCE;
684static unsigned long __Pyx_Runtime_TPFLAGS_MAPPING;
685#else
686#define __Pyx_Runtime_TPFLAGS_SEQUENCE Py_TPFLAGS_SEQUENCE
687#define __Pyx_Runtime_TPFLAGS_MAPPING Py_TPFLAGS_MAPPING
688#endif
689static int __Pyx_init_tpflags_variables(void);
690#ifndef Py_TPFLAGS_HAVE_FINALIZE
691 #define Py_TPFLAGS_HAVE_FINALIZE 0
692#endif
693#ifndef Py_TPFLAGS_SEQUENCE
694 #define Py_TPFLAGS_SEQUENCE (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 5)
695#endif
696#ifndef Py_TPFLAGS_MAPPING
697 #define Py_TPFLAGS_MAPPING (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 6)
698#endif
699#ifndef Py_TPFLAGS_IMMUTABLETYPE
700 #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
701#endif
702#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
703 #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
704#endif
705#ifndef METH_STACKLESS
706 #define METH_STACKLESS 0
707#endif
708#if !defined(METH_FASTCALL) || CYTHON_COMPILING_IN_PYPY
709 #ifndef METH_FASTCALL
710 #define METH_FASTCALL 0x80
711 #endif
712 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
713 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
714 Py_ssize_t nargs, PyObject *kwnames);
715#else
716 #if PY_VERSION_HEX >= 0x030d00A4
717 # define __Pyx_PyCFunctionFast PyCFunctionFast
718 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
719 #else
720 # define __Pyx_PyCFunctionFast _PyCFunctionFast
721 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
722 #endif
723#endif
724#if CYTHON_VECTORCALL
725 #define __Pyx_METH_FASTCALL METH_FASTCALL
726 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
727 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
728#else
729 #define __Pyx_METH_FASTCALL METH_VARARGS
730 #define __Pyx_PyCFunction_FastCall PyCFunction
731 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
732#endif
733#if CYTHON_VECTORCALL
734 #define __pyx_vectorcallfunc vectorcallfunc
735 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
736 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
737#else
738 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
739 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
740#endif
741#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
742#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
743#if CYTHON_COMPILING_IN_CPYTHON
744#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
745#elif !CYTHON_COMPILING_IN_LIMITED_API
746#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
747#endif
748#if CYTHON_COMPILING_IN_CPYTHON
749#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
750static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
751 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
752}
753#endif
754static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
755#if CYTHON_COMPILING_IN_LIMITED_API
756 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
757#else
758 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
759#endif
760}
761#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
762#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
763 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
764#else
765 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
766#endif
767#if CYTHON_COMPILING_IN_PYPY
768 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
769#else
770 #define __Pyx_PyCMethod PyCMethod
771#endif
772#ifndef METH_METHOD
773 #define METH_METHOD 0x200
774#endif
775#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
776 #define PyObject_Malloc(s) PyMem_Malloc(s)
777 #define PyObject_Free(p) PyMem_Free(p)
778 #define PyObject_Realloc(p) PyMem_Realloc(p)
779#endif
780#if CYTHON_COMPILING_IN_LIMITED_API
781 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
782#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
783 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
784 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
785#elif CYTHON_COMPILING_IN_GRAAL
786 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
787 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
788#else
789 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
790 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
791#endif
792#if CYTHON_COMPILING_IN_LIMITED_API
793 #define __Pyx_PyThreadState_Current PyThreadState_Get()
794#elif !CYTHON_FAST_THREAD_STATE
795 #define __Pyx_PyThreadState_Current PyThreadState_GET()
796#elif PY_VERSION_HEX >= 0x030d00A1
797 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
798#else
799 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
800#endif
801#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
802 #define __PYX_SHARED_SIZEOF(T) -((int)sizeof(T))
803 #define __PYX_SHARED_RELATIVE_OFFSET Py_RELATIVE_OFFSET
804 #define CYTHON_OPAQUE_SHARED_TYPES 1
805#else
806 #define __PYX_SHARED_SIZEOF(T) sizeof(T)
807 #define __PYX_SHARED_RELATIVE_OFFSET 0
808 #define CYTHON_OPAQUE_SHARED_TYPES 0
809#endif
810#if CYTHON_USE_MODULE_STATE
811static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
812{
813 void *result;
814 result = PyModule_GetState(op);
815 if (!result)
816 Py_FatalError("Couldn't find the module state");
817 return result;
818}
819#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
820#else
821#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
822#endif
823#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
824#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
825#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
826#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
827#if CYTHON_USE_TYPE_SLOTS
828 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
829 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
830 #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
831 #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
832#else
833 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
834 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
835 ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
836 (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
837 __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
838 #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
839 #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
840#endif
841#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
842#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
843#else
844#define __Pyx_PyDict_NewPresized(n) PyDict_New()
845#endif
846#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
847#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
848#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
849#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
850static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
851 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
852 if (res == NULL && PyErr_Occurred()) {
853 PyErr_WriteUnraisable(NULL);
854 }
855 return res;
856}
857#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
858#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
859#define __Pyx_PyDict_GetItemStr PyDict_GetItem
860#else
861static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
862#if CYTHON_COMPILING_IN_PYPY
863 return PyDict_GetItem(dict, name);
864#else
865 PyDictEntry *ep;
866 PyDictObject *mp = (PyDictObject*) dict;
867 long hash = ((PyStringObject *) name)->ob_shash;
868 assert(hash != -1);
869 ep = (mp->ma_lookup)(mp, name, hash);
870 if (ep == NULL) {
871 return NULL;
872 }
873 return ep->me_value;
874#endif
875}
876#define __Pyx_PyDict_GetItemStr PyDict_GetItem
877#endif
878#if CYTHON_USE_TYPE_SLOTS
879 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
880 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
881#else
882 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
883 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
884#endif
885#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
886#if CYTHON_USE_TYPE_SPECS
887#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
888 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
889 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
890 PyObject_GC_Del(obj);\
891 Py_DECREF(type);\
892}
893#else
894#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
895#endif
896#if CYTHON_COMPILING_IN_LIMITED_API
897 #define __Pyx_PyUnicode_READY(op) (0)
898 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
899 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
900 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
901 #define __Pyx_PyUnicode_KIND_04(u) __Pyx_PyUnicode_KIND(u)
902 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
903 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
904 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
905#else
906 #if PY_VERSION_HEX >= 0x030C0000
907 #define __Pyx_PyUnicode_READY(op) (0)
908 #else
909 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
910 0 : _PyUnicode_Ready((PyObject *)(op)))
911 #endif
912 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
913 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
914 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
915 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
916 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
917 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
918 #if PY_VERSION_HEX >= 0x030C0000
919 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
920 #else
921 #if CYTHON_COMPILING_IN_CPYTHON
922 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
923 #else
924 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
925 #endif
926 #endif
927 static CYTHON_INLINE int __Pyx_PyUnicode_KIND_04(PyObject *o) {
928 return __Pyx_PyUnicode_KIND(o) - (int) !!PyUnicode_IS_ASCII(o);
929 }
930#endif
931#if CYTHON_COMPILING_IN_PYPY
932 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
933 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
934#else
935 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
936 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
937 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
938#endif
939#if CYTHON_COMPILING_IN_PYPY
940 #if !defined(PyUnicode_DecodeUnicodeEscape)
941 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
942 #endif
943 #if !defined(PyUnicode_Contains)
944 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
945 #endif
946 #if !defined(PyByteArray_Check)
947 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
948 #endif
949 #if !defined(PyObject_Format)
950 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
951 #endif
952#endif
953#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
954#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
955 #define __Pyx_PySequence_ListKeepNew(obj)\
956 (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
957#elif CYTHON_COMPILING_IN_CPYTHON
958 #define __Pyx_PySequence_ListKeepNew(obj)\
959 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
960#else
961 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
962#endif
963#ifndef PySet_CheckExact
964 #define PySet_CheckExact(obj) Py_IS_TYPE(obj, &PySet_Type)
965#endif
966enum __Pyx_ReferenceSharing {
967 __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
968 __Pyx_ReferenceSharing_OwnStrongReference,
969 __Pyx_ReferenceSharing_FunctionArgument,
970 __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
971};
972#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
973#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
974 (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
975 (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
976 (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
977#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
978#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
979#else
980#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
981#endif
982#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
983 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
984#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
985 #if CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
986 #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
987 #else
988 #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
989 #endif
990#elif CYTHON_COMPILING_IN_LIMITED_API || !(CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE)
991 #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
992#else
993 #define __Pyx_PyList_GetItemRef(o, i) (likely(__Pyx_is_valid_index(i, PyList_GET_SIZE(o))) ?\
994 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
995#endif
996#if CYTHON_AVOID_BORROWED_REFS || CYTHON_COMPILING_IN_LIMITED_API
997 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
998 __Pyx_PyList_GetItemRef(o, i))
999#elif CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1000 #if CYTHON_ASSUME_SAFE_MACROS
1001 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1002 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1003 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1004 #else
1005 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1006 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1007 __Pyx_XNewRef(PyList_GetItem(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1008 #endif
1009#elif CYTHON_ASSUME_SAFE_MACROS
1010 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1011 __Pyx_NewRef(PyList_GET_ITEM(o, i)))
1012#else
1013 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1014 __Pyx_XNewRef(PyList_GetItem(o, i)))
1015#endif
1016#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1017#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
1018#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1019static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1020 *result = PyObject_GetItem(dict, key);
1021 if (*result == NULL) {
1022 if (PyErr_ExceptionMatches(PyExc_KeyError)) {
1023 PyErr_Clear();
1024 return 0;
1025 }
1026 return -1;
1027 }
1028 return 1;
1029}
1030#else
1031static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1032 *result = PyDict_GetItemWithError(dict, key);
1033 if (*result == NULL) {
1034 return PyErr_Occurred() ? -1 : 0;
1035 }
1036 Py_INCREF(*result);
1037 return 1;
1038}
1039#endif
1040#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
1041 #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
1042#else
1043 #define __Pyx_VISIT_CONST(obj)
1044#endif
1045#if CYTHON_ASSUME_SAFE_MACROS
1046 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1047 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1048 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1049 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
1050 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1051 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
1052#else
1053 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1054 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1055 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1056 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
1057 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1058 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
1059#endif
1060#if CYTHON_ASSUME_SAFE_SIZE
1061 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1062 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1063 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1064 #define __Pyx_PyDict_GET_SIZE(o) PyDict_GET_SIZE(o)
1065 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1066 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1067 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
1068#else
1069 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1070 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1071 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1072 #define __Pyx_PyDict_GET_SIZE(o) PyDict_Size(o)
1073 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1074 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1075 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
1076#endif
1077#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
1078 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1079#endif
1080#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
1081#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t
1082#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1083 #define __Pyx_PySendResult PySendResult
1084#else
1085 typedef enum {
1086 PYGEN_RETURN = 0,
1087 PYGEN_ERROR = -1,
1088 PYGEN_NEXT = 1,
1089 } __Pyx_PySendResult;
1090#endif
1091#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
1092 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
1093#else
1094 #define __Pyx_pyiter_sendfunc sendfunc
1095#endif
1096#if !CYTHON_USE_AM_SEND
1097#define __PYX_HAS_PY_AM_SEND 0
1098#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1099#define __PYX_HAS_PY_AM_SEND 1
1100#else
1101#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation
1102#endif
1103#if __PYX_HAS_PY_AM_SEND < 2
1104 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1105#else
1106 typedef struct {
1107 unaryfunc am_await;
1108 unaryfunc am_aiter;
1109 unaryfunc am_anext;
1110 __Pyx_pyiter_sendfunc am_send;
1111 } __Pyx_PyAsyncMethodsStruct;
1112 #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
1113#endif
1114#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
1115 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
1116#else
1117 #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
1118#endif
1119#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
1120#ifdef __cplusplus
1121extern "C"
1122#endif
1123PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
1124#endif
1125#if CYTHON_COMPILING_IN_LIMITED_API
1126static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
1127 int value;
1128 PyObject *py_value = PyObject_GetAttrString(inspect, name);
1129 if (!py_value) return 0;
1130 value = (int) PyLong_AsLong(py_value);
1131 Py_DECREF(py_value);
1132 *write_to = value;
1133 return value != -1 || !PyErr_Occurred();
1134}
1135static int __Pyx_init_co_variables(void) {
1136 PyObject *inspect;
1137 int result;
1138 inspect = PyImport_ImportModule("inspect");
1139 result =
1140#if !defined(CO_OPTIMIZED)
1141 __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
1142#endif
1143#if !defined(CO_NEWLOCALS)
1144 __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
1145#endif
1146#if !defined(CO_VARARGS)
1147 __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
1148#endif
1149#if !defined(CO_VARKEYWORDS)
1150 __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
1151#endif
1152#if !defined(CO_ASYNC_GENERATOR)
1153 __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
1154#endif
1155#if !defined(CO_GENERATOR)
1156 __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
1157#endif
1158#if !defined(CO_COROUTINE)
1159 __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
1160#endif
1161 1;
1162 Py_DECREF(inspect);
1163 return result ? 0 : -1;
1164}
1165static int __Pyx_init_tpflags_bitcount(unsigned long flag) {
1166 int count = 0;
1167 while (flag) {
1168 count += (int) (flag & 1);
1169 flag >>= 1;
1170 }
1171 return count;
1172}
1173static int __Pyx_init_tpflags_variables(void) {
1174 if (__Pyx_Runtime_TPFLAGS_SEQUENCE != 0 && __Pyx_Runtime_TPFLAGS_MAPPING != 0) {
1175 return 0;
1176 }
1177 PyObject *collections_abc = PyImport_ImportModule("collections.abc");
1178 if (!collections_abc) return -1;
1179 int result = 0;
1180 PyObject *sequence = NULL, *mapping = NULL;
1181#if __PYX_LIMITED_VERSION_HEX >= 0x030D0000
1182 if (PyObject_GetOptionalAttrString(collections_abc, "Sequence", &sequence) != 1) goto fail;
1183 if (PyObject_GetOptionalAttrString(collections_abc, "Mapping", &mapping) != 1) goto fail;
1184#else
1185 sequence = PyObject_GetAttrString(collections_abc, "Sequence");
1186 if (!sequence) goto fail_attr_lookup;
1187 mapping = PyObject_GetAttrString(collections_abc, "Mapping");
1188 if (!mapping) goto fail_attr_lookup;
1189#endif
1190 if (!PyType_Check(sequence) || !PyType_Check(mapping)) goto fail;
1191 {
1192 unsigned long sequence_flags = PyType_GetFlags((PyTypeObject*)sequence);
1193 unsigned long mapping_flags = PyType_GetFlags((PyTypeObject*)mapping);
1194 unsigned long mutual_flags = sequence_flags & mapping_flags;
1195 sequence_flags = sequence_flags ^ mutual_flags;
1196 mapping_flags = mapping_flags ^ mutual_flags;
1197 if (__Pyx_Runtime_TPFLAGS_SEQUENCE == 0 && __Pyx_init_tpflags_bitcount(sequence_flags) == 1) {
1198 __Pyx_Runtime_TPFLAGS_SEQUENCE = sequence_flags;
1199 }
1200 if (__Pyx_Runtime_TPFLAGS_MAPPING == 0 && __Pyx_init_tpflags_bitcount(mapping_flags) == 1) {
1201 __Pyx_Runtime_TPFLAGS_MAPPING = mapping_flags;
1202 }
1203 }
1204 cleanup:
1205 Py_XDECREF(mapping);
1206 Py_XDECREF(sequence);
1207 Py_DECREF(collections_abc);
1208 return result;
1209#if __PYX_LIMITED_VERSION_HEX < 0x030D0000
1210 fail_attr_lookup:
1211 if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
1212 PyErr_Clear();
1213 }
1214#endif
1215 fail:
1216 result = PyErr_Occurred() ? -1 : 0;
1217 goto cleanup;
1218}
1219#else
1220static int __Pyx_init_co_variables(void) {
1221 return 0; // It's a limited API-only feature
1222}
1223static int __Pyx_init_tpflags_variables(void) {
1224 return 0; // It's a limited API-only feature
1225}
1226#endif
1227
1228/* MathInitCode */
1229#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1230 #ifndef _USE_MATH_DEFINES
1231 #define _USE_MATH_DEFINES
1232 #endif
1233#endif
1234#include <math.h>
1235#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1236#define __Pyx_truncl trunc
1237#else
1238#define __Pyx_truncl truncl
1239#endif
1240
1241#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1242#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 1
1243#endif
1244#ifndef CYTHON_CLINE_IN_TRACEBACK
1245#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1246#endif
1247#if CYTHON_CLINE_IN_TRACEBACK
1248#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; }
1249#else
1250#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; }
1251#endif
1252#define __PYX_ERR(f_index, lineno, Ln_error) \
1253 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1254
1255#ifdef CYTHON_EXTERN_C
1256 #undef __PYX_EXTERN_C
1257 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1258#elif defined(__PYX_EXTERN_C)
1259 #ifdef _MSC_VER
1260 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1261 #else
1262 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1263 #endif
1264#else
1265 #ifdef __cplusplus
1266 #define __PYX_EXTERN_C extern "C"
1267 #else
1268 #define __PYX_EXTERN_C extern
1269 #endif
1270#endif
1271
1272#define __PYX_HAVE__ctimeIntegration
1273#define __PYX_HAVE_API__ctimeIntegration
1274/* Early includes */
1275#include <string.h>
1276#include <stdio.h>
1277
1278 /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
1279
1280#include "numpy/arrayobject.h"
1281#include "numpy/ndarrayobject.h"
1282#include "numpy/ndarraytypes.h"
1283#include "numpy/arrayscalars.h"
1284#include "numpy/ufuncobject.h"
1285#include "timeIntegration.h"
1286#ifdef _OPENMP
1287#include <omp.h>
1288#endif /* _OPENMP */
1289
1290#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1291#define CYTHON_WITHOUT_ASSERTIONS
1292#endif
1293
1294#ifdef CYTHON_FREETHREADING_COMPATIBLE
1295#if CYTHON_FREETHREADING_COMPATIBLE
1296#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
1297#else
1298#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1299#endif
1300#else
1301#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1302#endif
1303#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1304#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1305#define __PYX_DEFAULT_STRING_ENCODING ""
1306#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1307#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1308#define __Pyx_uchar_cast(c) ((unsigned char)c)
1309#define __Pyx_long_cast(x) ((long)x)
1310#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1311 (sizeof(type) < sizeof(Py_ssize_t)) ||\
1312 (sizeof(type) > sizeof(Py_ssize_t) &&\
1313 likely(v < (type)PY_SSIZE_T_MAX ||\
1314 v == (type)PY_SSIZE_T_MAX) &&\
1315 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1316 v == (type)PY_SSIZE_T_MIN))) ||\
1317 (sizeof(type) == sizeof(Py_ssize_t) &&\
1318 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1319 v == (type)PY_SSIZE_T_MAX))) )
1320static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1321 return (size_t) i < (size_t) limit;
1322}
1323#if defined (__cplusplus) && __cplusplus >= 201103L
1324 #include <cstdlib>
1325 #define __Pyx_sst_abs(value) std::abs(value)
1326#elif SIZEOF_INT >= SIZEOF_SIZE_T
1327 #define __Pyx_sst_abs(value) abs(value)
1328#elif SIZEOF_LONG >= SIZEOF_SIZE_T
1329 #define __Pyx_sst_abs(value) labs(value)
1330#elif defined (_MSC_VER)
1331 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1332#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1333 #define __Pyx_sst_abs(value) llabs(value)
1334#elif defined (__GNUC__)
1335 #define __Pyx_sst_abs(value) __builtin_llabs(value)
1336#else
1337 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1338#endif
1339static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
1340static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
1341static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1342static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
1343#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1344#define __Pyx_PyBytes_FromString PyBytes_FromString
1345#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1346static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
1347#if CYTHON_ASSUME_SAFE_MACROS
1348 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1349 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1350 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1351 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1352 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1353 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1354 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
1355#else
1356 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
1357 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
1358 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
1359 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
1360 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
1361 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
1362 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
1363#endif
1364#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1365#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1366#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1367#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1368#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1369#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1370#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1371#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1372#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1373#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1374#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1375static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
1376#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
1377 return Py_NewRef(obj);
1378#else
1379 Py_INCREF(obj);
1380 return obj;
1381#endif
1382}
1383static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
1384#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
1385 return Py_XNewRef(obj);
1386#else
1387 Py_XINCREF(obj);
1388 return obj;
1389#endif
1390}
1391static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
1392static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
1393static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
1394static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1395static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
1396#define __Pyx_PyObject_RichCompareBool(a,b,cmp) __Pyx_PyObject_IsTrueAndDecref(PyObject_RichCompare((a),(b),(cmp)))
1397#define __Pyx_PySequence_Tuple(obj)\
1398 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1399static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1400static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
1401static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1402#if CYTHON_ASSUME_SAFE_MACROS
1403#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1404#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
1405#define __Pyx_PyFloat_IsNonZero(x) (PyFloat_AS_DOUBLE(x) != 0.0)
1406#else
1407#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1408#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
1409#define __Pyx_PyFloat_IsNonZero(x) PyObject_IsTrue(x)
1410#endif
1411#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
1412#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1413#if CYTHON_USE_PYLONG_INTERNALS
1414 #if PY_VERSION_HEX >= 0x030C00A7
1415 #ifndef _PyLong_SIGN_MASK
1416 #define _PyLong_SIGN_MASK 3
1417 #endif
1418 #ifndef _PyLong_NON_SIZE_BITS
1419 #define _PyLong_NON_SIZE_BITS 3
1420 #endif
1421 #define __Pyx_PyLong_SignBits(x) ((int) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK))
1422 #define __Pyx_PyLong_Sign(x) (1 - __Pyx_PyLong_SignBits(x))
1423 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_SignBits(x) & 2) != 0)
1424 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1425 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_SignBits(x) & 1)
1426 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_SignBits(x) == 0)
1427 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1428 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1429 #define __Pyx_PyLong_SignedDigitCount(x)\
1430 (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1431 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1432 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1433 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1434 #else
1435 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1436 #define __Pyx_PyLong_CompactValue(x) (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1437 #endif
1438 static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_CompareSignAndSize(PyObject *a, PyObject *b) {
1439 uintptr_t tag_a = ((PyLongObject*)a)->long_value.lv_tag;
1440 uintptr_t tag_b = ((PyLongObject*)b)->long_value.lv_tag;
1441 if (tag_a == tag_b) return 0;
1442 int sign_a = (int) (tag_a & _PyLong_SIGN_MASK);
1443 int sign_b = (int) (tag_b & _PyLong_SIGN_MASK);
1444 if (sign_a > sign_b) return -1;
1445 if (sign_a < sign_b) return 1;
1446 Py_ssize_t size_a = (Py_ssize_t) (tag_a >> _PyLong_NON_SIZE_BITS);
1447 Py_ssize_t size_b = (Py_ssize_t) (tag_b >> _PyLong_NON_SIZE_BITS);
1448 return (1 - sign_a) * (size_a - size_b);
1449 }
1450 typedef Py_ssize_t __Pyx_compact_pylong;
1451 typedef size_t __Pyx_compact_upylong;
1452 #else
1453 #define __Pyx_PyLong_Sign(x) ((int) ((Py_SIZE(x) == 0) ? 0 : (Py_SIZE(x) < 0) ? -1 : 1))
1454 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1455 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1456 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1457 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1458 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1459 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1460 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1461 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1462 #define __Pyx_PyLong_CompactValue(x)\
1463 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1464 #define __Pyx_PyLong_CompareSignAndSize(a, b) (Py_SIZE(a) - Py_SIZE(b))
1465 typedef sdigit __Pyx_compact_pylong;
1466 typedef digit __Pyx_compact_upylong;
1467 #endif
1468 #if PY_VERSION_HEX >= 0x030C00A5
1469 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1470 #else
1471 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1472 #endif
1473 #define __Pyx_PyLong_IsNonZero(x) (!__Pyx_PyLong_IsZero(x))
1474#else
1475 #define __Pyx_PyLong_IsNonZero(x) PyObject_IsTrue(x)
1476#endif
1477#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
1478 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1479#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1480 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
1481#else
1482 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1483#endif
1484
1485
1486/* Test for GCC > 2.95 */
1487#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1488 #define likely(x) __builtin_expect(!!(x), 1)
1489 #define unlikely(x) __builtin_expect(!!(x), 0)
1490#else /* !__GNUC__ or GCC < 2.95 */
1491 #define likely(x) (x)
1492 #define unlikely(x) (x)
1493#endif /* __GNUC__ */
1494/* PretendToInitialize */
1495#ifdef __cplusplus
1496#if __cplusplus > 201103L
1497#include <type_traits>
1498#endif
1499template <typename T>
1500static void __Pyx_pretend_to_initialize(T* ptr) {
1501#if __cplusplus > 201103L
1502 if ((std::is_trivially_default_constructible<T>::value))
1503#endif
1504 *ptr = T();
1505 (void)ptr;
1506}
1507#else
1508static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1509#endif
1510
1511
1512#if !CYTHON_USE_MODULE_STATE
1513static PyObject *__pyx_m = NULL;
1514#endif
1515static const char * const __pyx_cfilenm = __FILE__;
1516
1517/* Header.proto */
1518#if !defined(CYTHON_CCOMPLEX)
1519 #if defined(__cplusplus)
1520 #define CYTHON_CCOMPLEX 1
1521 #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
1522 #define CYTHON_CCOMPLEX 1
1523 #else
1524 #define CYTHON_CCOMPLEX 0
1525 #endif
1526#endif
1527#if CYTHON_CCOMPLEX
1528 #ifdef __cplusplus
1529 #include <complex>
1530 #else
1531 #include <complex.h>
1532 #endif
1533#endif
1534#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
1535 #undef _Complex_I
1536 #define _Complex_I 1.0fj
1537#endif
1538
1539/* #### Code section: filename_table ### */
1540
1541static const char* const __pyx_f[] = {
1542 "proteus/ctimeIntegration.pyx",
1543 "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd",
1544 "cpython/type.pxd",
1545};
1546/* #### Code section: utility_code_proto_before_types ### */
1547/* Atomics.proto (used by UnpackUnboundCMethod) */
1548#include <pythread.h>
1549#ifndef CYTHON_ATOMICS
1550 #define CYTHON_ATOMICS 1
1551#endif
1552#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1553#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1554#define __pyx_atomic_int_type int
1555#define __pyx_nonatomic_int_type int
1556#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1557 (__STDC_VERSION__ >= 201112L) &&\
1558 !defined(__STDC_NO_ATOMICS__))
1559 #include <stdatomic.h>
1560#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1561 (__cplusplus >= 201103L) ||\
1562 (defined(_MSC_VER) && _MSC_VER >= 1700)))
1563 #include <atomic>
1564#endif
1565#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1566 (__STDC_VERSION__ >= 201112L) &&\
1567 !defined(__STDC_NO_ATOMICS__) &&\
1568 ATOMIC_INT_LOCK_FREE == 2)
1569 #undef __pyx_atomic_int_type
1570 #define __pyx_atomic_int_type atomic_int
1571 #define __pyx_atomic_ptr_type atomic_uintptr_t
1572 #define __pyx_nonatomic_ptr_type uintptr_t
1573 #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
1574 #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
1575 #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
1576 #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
1577 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1578 #define __pyx_atomic_load(value) atomic_load(value)
1579 #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
1580 #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
1581 #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
1582 #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1583 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1584 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1585 #pragma message ("Using standard C atomics")
1586 #elif defined(__PYX_DEBUG_ATOMICS)
1587 #warning "Using standard C atomics"
1588 #endif
1589#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1590 (__cplusplus >= 201103L) ||\
1591\
1592 (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
1593 ATOMIC_INT_LOCK_FREE == 2)
1594 #undef __pyx_atomic_int_type
1595 #define __pyx_atomic_int_type std::atomic_int
1596 #define __pyx_atomic_ptr_type std::atomic_uintptr_t
1597 #define __pyx_nonatomic_ptr_type uintptr_t
1598 #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
1599 #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
1600 #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
1601 #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
1602 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1603 #define __pyx_atomic_load(value) std::atomic_load(value)
1604 #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
1605 #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
1606 #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
1607 #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1608 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1609 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1610 #pragma message ("Using standard C++ atomics")
1611 #elif defined(__PYX_DEBUG_ATOMICS)
1612 #warning "Using standard C++ atomics"
1613 #endif
1614#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1615 (__GNUC_MINOR__ > 1 ||\
1616 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1617 #define __pyx_atomic_ptr_type void*
1618 #define __pyx_nonatomic_ptr_type void*
1619 #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
1620 #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
1621 #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
1622 #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
1623 static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1624 __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
1625 int result = old == *expected;
1626 *expected = old;
1627 return result;
1628 }
1629 #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
1630 #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
1631 #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
1632 #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
1633 #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
1634 static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1635 __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
1636 int result = old == *expected;
1637 *expected = old;
1638 return result;
1639 }
1640 #ifdef __PYX_DEBUG_ATOMICS
1641 #warning "Using GNU atomics"
1642 #endif
1643#elif CYTHON_ATOMICS && defined(_MSC_VER)
1644 #include <intrin.h>
1645 #undef __pyx_atomic_int_type
1646 #define __pyx_atomic_int_type long
1647 #define __pyx_atomic_ptr_type void*
1648 #undef __pyx_nonatomic_int_type
1649 #define __pyx_nonatomic_int_type long
1650 #define __pyx_nonatomic_ptr_type void*
1651 #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
1652 #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
1653 #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
1654 #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
1655 #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
1656 static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1657 __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
1658 int result = old == *expected;
1659 *expected = old;
1660 return result;
1661 }
1662 #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
1663 #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
1664 #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
1665 #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
1666 #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
1667 static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1668 __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
1669 int result = old == *expected;
1670 *expected = old;
1671 return result;
1672 }
1673 #ifdef __PYX_DEBUG_ATOMICS
1674 #pragma message ("Using MSVC atomics")
1675 #endif
1676#else
1677 #undef CYTHON_ATOMICS
1678 #define CYTHON_ATOMICS 0
1679 #ifdef __PYX_DEBUG_ATOMICS
1680 #warning "Not using atomics"
1681 #endif
1682#endif
1683
1684/* CriticalSectionsDefinition.proto (used by CriticalSections) */
1685#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1686#define __Pyx_PyCriticalSection void*
1687#define __Pyx_PyCriticalSection2 void*
1688#define __Pyx_PyCriticalSection_End(cs)
1689#define __Pyx_PyCriticalSection2_End(cs)
1690#else
1691#define __Pyx_PyCriticalSection PyCriticalSection
1692#define __Pyx_PyCriticalSection2 PyCriticalSection2
1693#define __Pyx_PyCriticalSection_End PyCriticalSection_End
1694#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
1695#endif
1696
1697/* CriticalSections.proto (used by ParseKeywordsImpl) */
1698#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1699#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
1700#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
1701#else
1702#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
1703#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
1704#endif
1705#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
1706#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
1707#define __Pyx_END_CRITICAL_SECTION() }
1708#else
1709#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
1710#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
1711#endif
1712
1713/* IncludeStructmemberH.proto (used by CythonFunctionShared) */
1714#include <structmember.h>
1715
1716/* #### Code section: numeric_typedefs ### */
1717
1718/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":761
1719 * # in Cython to enable them only on the right systems.
1720 *
1721 * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1722 * ctypedef npy_int16 int16_t
1723 * ctypedef npy_int32 int32_t
1724*/
1725typedef npy_int8 __pyx_t_5numpy_int8_t;
1726
1727/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":762
1728 *
1729 * ctypedef npy_int8 int8_t
1730 * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1731 * ctypedef npy_int32 int32_t
1732 * ctypedef npy_int64 int64_t
1733*/
1734typedef npy_int16 __pyx_t_5numpy_int16_t;
1735
1736/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":763
1737 * ctypedef npy_int8 int8_t
1738 * ctypedef npy_int16 int16_t
1739 * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1740 * ctypedef npy_int64 int64_t
1741 *
1742*/
1743typedef npy_int32 __pyx_t_5numpy_int32_t;
1744
1745/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":764
1746 * ctypedef npy_int16 int16_t
1747 * ctypedef npy_int32 int32_t
1748 * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1749 *
1750 * ctypedef npy_uint8 uint8_t
1751*/
1752typedef npy_int64 __pyx_t_5numpy_int64_t;
1753
1754/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":766
1755 * ctypedef npy_int64 int64_t
1756 *
1757 * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1758 * ctypedef npy_uint16 uint16_t
1759 * ctypedef npy_uint32 uint32_t
1760*/
1761typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1762
1763/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":767
1764 *
1765 * ctypedef npy_uint8 uint8_t
1766 * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1767 * ctypedef npy_uint32 uint32_t
1768 * ctypedef npy_uint64 uint64_t
1769*/
1770typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1771
1772/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":768
1773 * ctypedef npy_uint8 uint8_t
1774 * ctypedef npy_uint16 uint16_t
1775 * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1776 * ctypedef npy_uint64 uint64_t
1777 *
1778*/
1779typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1780
1781/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":769
1782 * ctypedef npy_uint16 uint16_t
1783 * ctypedef npy_uint32 uint32_t
1784 * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1785 *
1786 * ctypedef npy_float32 float32_t
1787*/
1788typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1789
1790/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":771
1791 * ctypedef npy_uint64 uint64_t
1792 *
1793 * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1794 * ctypedef npy_float64 float64_t
1795 * #ctypedef npy_float80 float80_t
1796*/
1797typedef npy_float32 __pyx_t_5numpy_float32_t;
1798
1799/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":772
1800 *
1801 * ctypedef npy_float32 float32_t
1802 * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1803 * #ctypedef npy_float80 float80_t
1804 * #ctypedef npy_float128 float128_t
1805*/
1806typedef npy_float64 __pyx_t_5numpy_float64_t;
1807
1808/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":779
1809 * ctypedef double complex complex128_t
1810 *
1811 * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1812 * ctypedef npy_ulonglong ulonglong_t
1813 *
1814*/
1815typedef npy_longlong __pyx_t_5numpy_longlong_t;
1816
1817/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":780
1818 *
1819 * ctypedef npy_longlong longlong_t
1820 * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1821 *
1822 * ctypedef npy_intp intp_t
1823*/
1824typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1825
1826/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":782
1827 * ctypedef npy_ulonglong ulonglong_t
1828 *
1829 * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1830 * ctypedef npy_uintp uintp_t
1831 *
1832*/
1833typedef npy_intp __pyx_t_5numpy_intp_t;
1834
1835/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":783
1836 *
1837 * ctypedef npy_intp intp_t
1838 * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1839 *
1840 * ctypedef npy_double float_t
1841*/
1842typedef npy_uintp __pyx_t_5numpy_uintp_t;
1843
1844/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":785
1845 * ctypedef npy_uintp uintp_t
1846 *
1847 * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1848 * ctypedef npy_double double_t
1849 * ctypedef npy_longdouble longdouble_t
1850*/
1851typedef npy_double __pyx_t_5numpy_float_t;
1852
1853/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":786
1854 *
1855 * ctypedef npy_double float_t
1856 * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1857 * ctypedef npy_longdouble longdouble_t
1858 *
1859*/
1860typedef npy_double __pyx_t_5numpy_double_t;
1861
1862/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":787
1863 * ctypedef npy_double float_t
1864 * ctypedef npy_double double_t
1865 * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1866 *
1867 * ctypedef float complex cfloat_t
1868*/
1869typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1870/* #### Code section: complex_type_declarations ### */
1871/* Declarations.proto */
1872#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1873 #ifdef __cplusplus
1874 typedef ::std::complex< float > __pyx_t_float_complex;
1875 #else
1876 typedef float _Complex __pyx_t_float_complex;
1877 #endif
1878#else
1879 typedef struct { float real, imag; } __pyx_t_float_complex;
1880#endif
1881static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1882
1883/* Declarations.proto */
1884#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1885 #ifdef __cplusplus
1886 typedef ::std::complex< double > __pyx_t_double_complex;
1887 #else
1888 typedef double _Complex __pyx_t_double_complex;
1889 #endif
1890#else
1891 typedef struct { double real, imag; } __pyx_t_double_complex;
1892#endif
1893static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1894
1895/* Declarations.proto */
1896#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1897 #ifdef __cplusplus
1898 typedef ::std::complex< long double > __pyx_t_long_double_complex;
1899 #else
1900 typedef long double _Complex __pyx_t_long_double_complex;
1901 #endif
1902#else
1903 typedef struct { long double real, imag; } __pyx_t_long_double_complex;
1904#endif
1905static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
1906
1907/* #### Code section: type_declarations ### */
1908
1909/*--- Type declarations ---*/
1910/* #### Code section: utility_code_proto ### */
1911
1912/* --- Runtime support code (head) --- */
1913/* Refnanny.proto */
1914#ifndef CYTHON_REFNANNY
1915 #define CYTHON_REFNANNY 0
1916#endif
1917#if CYTHON_REFNANNY
1918 typedef struct {
1919 void (*INCREF)(void*, PyObject*, Py_ssize_t);
1920 void (*DECREF)(void*, PyObject*, Py_ssize_t);
1921 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
1922 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
1923 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
1924 void (*FinishContext)(void**);
1925 } __Pyx_RefNannyAPIStruct;
1926 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1927 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1928 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1929 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1930 if (acquire_gil) {\
1931 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1932 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
1933 PyGILState_Release(__pyx_gilstate_save);\
1934 } else {\
1935 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
1936 }
1937 #define __Pyx_RefNannyFinishContextNogil() {\
1938 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1939 __Pyx_RefNannyFinishContext();\
1940 PyGILState_Release(__pyx_gilstate_save);\
1941 }
1942 #define __Pyx_RefNannyFinishContextNogil() {\
1943 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1944 __Pyx_RefNannyFinishContext();\
1945 PyGILState_Release(__pyx_gilstate_save);\
1946 }
1947 #define __Pyx_RefNannyFinishContext()\
1948 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1949 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1950 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1951 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1952 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
1953 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
1954 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
1955 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
1956 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
1957#else
1958 #define __Pyx_RefNannyDeclarations
1959 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1960 #define __Pyx_RefNannyFinishContextNogil()
1961 #define __Pyx_RefNannyFinishContext()
1962 #define __Pyx_INCREF(r) Py_INCREF(r)
1963 #define __Pyx_DECREF(r) Py_DECREF(r)
1964 #define __Pyx_GOTREF(r)
1965 #define __Pyx_GIVEREF(r)
1966 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1967 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1968 #define __Pyx_XGOTREF(r)
1969 #define __Pyx_XGIVEREF(r)
1970#endif
1971#define __Pyx_Py_XDECREF_SET(r, v) do {\
1972 PyObject *tmp = (PyObject *) r;\
1973 r = v; Py_XDECREF(tmp);\
1974 } while (0)
1975#define __Pyx_XDECREF_SET(r, v) do {\
1976 PyObject *tmp = (PyObject *) r;\
1977 r = v; __Pyx_XDECREF(tmp);\
1978 } while (0)
1979#define __Pyx_DECREF_SET(r, v) do {\
1980 PyObject *tmp = (PyObject *) r;\
1981 r = v; __Pyx_DECREF(tmp);\
1982 } while (0)
1983#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1984#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1985
1986/* GetTopmostException.proto (used by SaveResetException) */
1987#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
1988static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1989#endif
1990
1991/* PyThreadStateGet.proto (used by SaveResetException) */
1992#if CYTHON_FAST_THREAD_STATE
1993#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1994#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1995#if PY_VERSION_HEX >= 0x030C00A6
1996#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
1997#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
1998#else
1999#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2000#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
2001#endif
2002#else
2003#define __Pyx_PyThreadState_declare
2004#define __Pyx_PyThreadState_assign
2005#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
2006#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
2007#endif
2008
2009/* SaveResetException.proto */
2010#if CYTHON_FAST_THREAD_STATE
2011#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2012static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2013#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2014static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2015#else
2016#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2017#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2018#endif
2019
2020/* FastTypeChecks.proto (used by PyException_Check) */
2021#if CYTHON_COMPILING_IN_CPYTHON
2022#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2023#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
2024static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2025static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2026#define __Pyx_PyAnySet_Check(obj) __Pyx_TypeCheck2(obj, &PySet_Type, &PyFrozenSet_Type)
2027#else
2028#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2029#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
2030#define __Pyx_PyAnySet_Check(obj) PyAnySet_Check(obj)
2031#endif
2032
2033/* PyException_Check.proto */
2034#define __Pyx_PyExc_Exception_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2035
2036/* PyErrFetchRestore.proto (used by GivenExceptionMatches) */
2037#if CYTHON_FAST_THREAD_STATE
2038#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2039#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2040#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2041#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2042#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2043static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2044static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2045#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
2046#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2047#else
2048#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2049#endif
2050#else
2051#define __Pyx_PyErr_Clear() PyErr_Clear()
2052#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2053#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2054#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2055#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2056#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2057#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2058#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2059#endif
2060
2061/* GivenExceptionMatches.proto (used by PyErrExceptionMatches) */
2062#if CYTHON_COMPILING_IN_CPYTHON
2063static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2064static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2065#else
2066#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2067static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
2068 return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
2069}
2070#endif
2071#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
2072
2073/* PyErrExceptionMatches.proto */
2074#if CYTHON_FAST_THREAD_STATE
2075#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2076static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2077#else
2078#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2079#endif
2080
2081/* GetException.proto */
2082#if CYTHON_FAST_THREAD_STATE
2083#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2084static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2085#else
2086static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2087#endif
2088
2089/* PyImportError_Check.proto */
2090#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError)
2091
2092/* PyObjectCall.proto (used by PyObjectFastCall) */
2093#if CYTHON_COMPILING_IN_CPYTHON
2094static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2095#else
2096#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2097#endif
2098
2099/* PyObjectCallMethO.proto (used by PyObjectFastCall) */
2100#if CYTHON_COMPILING_IN_CPYTHON
2101static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2102#endif
2103
2104/* PyObjectFastCall.proto */
2105#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
2106static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargsf, PyObject *kwargs);
2107
2108/* RaiseException.export */
2109static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2110
2111/* CopyObjectArray.proto (used by TupleOrListFromArrayImpl) */
2112#if CYTHON_COMPILING_IN_CPYTHON
2113static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length);
2114#endif
2115
2116/* TupleOrListFromArrayImpl.proto (used by TupleFromArray) */
2117#if PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API
2118#define __Pyx_PyTuple_FromArray(src, n) PyTuple_FromArray(src, ((n)<0) ? 0 : (n))
2119#else
2120CYTHON_UNUSED static PyObject *
2121__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
2122#endif
2123
2124/* TupleFromArray.proto (used by fastcall) */
2125
2126
2127/* IncludeStringH.proto (used by PyObjectCompare) */
2128#include <string.h>
2129
2130/* PyObjectCompare.proto (used by UnicodeEquals) */
2131static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2, int pyop);
2132
2133/* UnicodeEquals.proto (used by fastcall) */
2134#define __Pyx_PyUnicode_Equals(s1, s2) __Pyx_PyObject_CompareBoolEq_str_str(s1, s2, Py_EQ)
2135
2136/* fastcall.proto */
2137#if CYTHON_AVOID_BORROWED_REFS
2138 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
2139#elif CYTHON_ASSUME_SAFE_MACROS
2140 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
2141#else
2142 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
2143#endif
2144#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
2145#define __Pyx_KwValues_VARARGS(args, nargs) NULL
2146#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
2147#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
2148#if CYTHON_VECTORCALL
2149 #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
2150 #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
2151 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
2152 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
2153 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
2154 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
2155 #else
2156 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
2157 #endif
2158#else
2159 #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
2160 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
2161 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
2162 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
2163 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
2164#endif
2165#if CYTHON_VECTORCALL_TPNEW
2166 #if !CYTHON_VECTORCALL
2167 #error Enabling CYTHON_VECTORCALL_TPNEW without CYTHON_VECTORCALL is not supported
2168 #endif
2169 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_FASTCALL
2170 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_FASTCALL
2171 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_FASTCALL
2172 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_FASTCALL
2173 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_FASTCALL
2174#else
2175 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_VARARGS
2176 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_VARARGS
2177 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_VARARGS
2178 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_VARARGS
2179 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_VARARGS
2180#endif
2181#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
2182#if CYTHON_VECTORCALL
2183#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
2184#else
2185#define __Pyx_ArgsSlice_FASTCALL __Pyx_ArgsSlice_VARARGS
2186#endif
2187
2188/* py_dict_items.proto (used by OwnedDictNext) */
2189#define __Pyx_PyDict_items_TypePtr (&PyDictKeys_Type)
2190#define __Pyx_PyDict_items_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictItems_TypePtr)
2191#define __Pyx_PyDict_items_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictItems_TypePtr)
2192static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
2193
2194/* CallCFunction.proto (used by CallUnboundCMethod0) */
2195#define __Pyx_CallCFunction(cfunc, self, args)\
2196 ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
2197#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
2198 ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
2199#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
2200 ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
2201#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
2202 ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
2203
2204/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
2205static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2206
2207/* UnpackUnboundCMethod_decl.proto (used by UnpackUnboundCMethod) */
2208typedef struct {
2209 PyObject *type;
2210 PyObject **method_name;
2211 PyCFunction func;
2212 PyObject *method;
2213 int flag;
2214#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
2215 __pyx_atomic_int_type initialized;
2216#endif
2217} __Pyx_CachedCFunction;
2218
2219/* IgnoreException.proto (used by UnpackUnboundCMethod_impl) */
2220static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception);
2221#define __Pyx_IgnoreException(ignorable_exception) __Pyx_IgnoreGivenException(NULL, ignorable_exception)
2222
2223/* PyObjectGetAttrStr.proto (used by UnpackUnboundCMethod_impl) */
2224#if CYTHON_USE_TYPE_SLOTS
2225static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2226#else
2227#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2228#endif
2229
2230/* UnpackUnboundCMethod_impl.export */
2231static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target);
2232
2233/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
2234#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2235static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
2236#if !CYTHON_ATOMICS
2237 return 1;
2238#else
2239 __pyx_nonatomic_int_type expected = 0;
2240 if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
2241 return 0;
2242 }
2243 return expected;
2244#endif
2245}
2246static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
2247#if CYTHON_ATOMICS
2248 __pyx_atomic_store(&cfunc->initialized, 2);
2249#endif
2250}
2251#else
2252#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
2253#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
2254#endif
2255
2256/* CallUnboundCMethod0.proto */
2257CYTHON_UNUSED
2258static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2259#if CYTHON_COMPILING_IN_CPYTHON
2260static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2261#else
2262#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
2263#endif
2264
2265/* py_dict_values.proto (used by OwnedDictNext) */
2266#define __Pyx_PyDict_values_TypePtr (&PyDictKeys_Type)
2267#define __Pyx_PyDict_values_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictValues_TypePtr)
2268#define __Pyx_PyDict_values_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictValues_TypePtr)
2269static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
2270
2271/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
2272#if CYTHON_AVOID_BORROWED_REFS
2273static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
2274#else
2275CYTHON_INLINE
2276static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
2277#endif
2278
2279/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
2280static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2281
2282/* ParseKeywordsImpl.export */
2283static int __Pyx_ParseKeywordsTuple(
2284 PyObject *kwds,
2285 PyObject * const *kwvalues,
2286 PyObject ** const argnames[],
2287 PyObject *kwds2,
2288 PyObject *values[],
2289 Py_ssize_t num_pos_args,
2290 Py_ssize_t num_kwargs,
2291 const char* function_name,
2292 int ignore_unknown_kwargs
2293);
2294static int __Pyx_ParseKeywordDictToDict(
2295 PyObject *kwds,
2296 PyObject ** const argnames[],
2297 PyObject *kwds2,
2298 PyObject *values[],
2299 Py_ssize_t num_pos_args,
2300 const char* function_name
2301);
2302static int __Pyx_ParseKeywordDict(
2303 PyObject *kwds,
2304 PyObject ** const argnames[],
2305 PyObject *values[],
2306 Py_ssize_t num_pos_args,
2307 Py_ssize_t num_kwargs,
2308 const char* function_name,
2309 int ignore_unknown_kwargs
2310);
2311
2312/* CallUnboundCMethod2.proto */
2313CYTHON_UNUSED
2314static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
2315#if CYTHON_COMPILING_IN_CPYTHON
2316static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
2317#else
2318#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
2319#endif
2320
2321/* ParseKeywords.proto */
2322static CYTHON_INLINE int __Pyx_ParseKeywords(
2323 PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
2324 PyObject *kwds2, PyObject *values[],
2325 Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
2326 const char* function_name,
2327 int ignore_unknown_kwargs
2328);
2329
2330/* RaiseArgTupleInvalid.export */
2331static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2332 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2333
2334/* ArgTypeTestError.export */
2335static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2336
2337/* ArgTypeTest.proto */
2338static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact);
2339
2340/* TypeImport.proto */
2341#ifndef __PYX_HAVE_RT_ImportType_proto_3_3_0
2342#define __PYX_HAVE_RT_ImportType_proto_3_3_0
2343#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2344#include <stdalign.h>
2345#endif
2346#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2347#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) alignof(s)
2348#else
2349#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) sizeof(void*)
2350#endif
2351enum __Pyx_ImportType_CheckSize_3_3_0 {
2352 __Pyx_ImportType_CheckSize_Error_3_3_0 = 0,
2353 __Pyx_ImportType_CheckSize_Warn_3_3_0 = 1,
2354 __Pyx_ImportType_CheckSize_Ignore_3_3_0 = 2
2355};
2356static 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);
2357#endif
2358
2359/* PyObjectGetAttrStrNoError.proto (used by HasAttr) */
2360static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2361
2362/* HasAttr.proto (used by ImportImpl) */
2363#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2364#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
2365#else
2366static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2367#endif
2368
2369/* TupleOrListFromArrayImpl.proto (used by ListFromArray) */
2370CYTHON_UNUSED static PyObject *
2371__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
2372
2373/* ListFromArray.proto (used by ImportImpl) */
2374
2375
2376/* ImportImpl.export */
2377static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);
2378
2379/* Import.proto */
2380static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);
2381
2382/* dict_setdefault.proto (used by FetchCommonType) */
2383static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
2384
2385/* AddModuleRef.proto (used by FetchSharedCythonModule) */
2386#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3) ||\
2387 __PYX_LIMITED_VERSION_HEX < 0x030d0000)
2388 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
2389#else
2390 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
2391#endif
2392
2393/* FetchSharedCythonModule.proto (used by FetchCommonType) */
2394static PyObject *__Pyx_FetchSharedCythonABIModule(void);
2395
2396/* VerifyCachedType.proto (used by FetchCommonType) */
2397static int __Pyx_VerifyCachedType(PyObject *cached_type,
2398 const char *name,
2399 Py_ssize_t expected_basicsize);
2400
2401/* FetchCommonType.proto (used by CommonTypesMetaclass) */
2402static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
2403
2404/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
2405static int __pyx_CommonTypesMetaclass_init(PyObject *module);
2406#define __Pyx_CommonTypesMetaclass_USED
2407
2408/* CythonFunctionPerModule.proto (used by CythonFunctionShared) */
2409#define __Pyx_CyFunction_USED
2410#if CYTHON_OPAQUE_SHARED_TYPES
2411#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)PyObject_GetTypeData((o), __pyx_mstate_global->__pyx_CyFunctionType))
2412#else
2413#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)o)
2414#endif
2415#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2416#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2417#define __Pyx_CYFUNCTION_CCLASS 0x04
2418#define __Pyx_CYFUNCTION_COROUTINE 0x08
2419#define __Pyx_CyFunction_GetClosure(f)\
2420 ((__Pyx_as_CyFunctionObject(f))->func_closure)
2421#if CYTHON_COMPILING_IN_LIMITED_API
2422 #define __Pyx__CyFunction_GetClassObj(f)\
2423 ((f)->func_classobj)
2424#else
2425 #define __Pyx__CyFunction_GetClassObj(f)\
2426 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
2427#endif
2428#define __Pyx_CyFunction_GetClassObj(f)\
2429 __Pyx__CyFunction_GetClassObj(__Pyx_as_CyFunctionObject(f))
2430#define __Pyx_CyFunction_SetClassObj(f, classobj)\
2431 __Pyx__CyFunction_SetClassObj(__Pyx_as_CyFunctionObject(f), (classobj))
2432#define __Pyx_CyFunction_Defaults(type, f)\
2433 ((type *)((__Pyx_as_CyFunctionObject(f))->defaults))
2434#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2435 (__Pyx_as_CyFunctionObject(f))->defaults_getter = (g)
2436typedef struct {
2437#if CYTHON_COMPILING_IN_LIMITED_API
2438#if !CYTHON_OPAQUE_OBJECTS
2439 PyObject_HEAD
2440#endif
2441 PyMethodDef *func_methoddef;
2442 PyObject *func_module;
2443#else
2444 PyCMethodObject func;
2445#endif
2446#if (CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY) && CYTHON_VECTORCALL
2447 __pyx_vectorcallfunc func_vectorcall;
2448#endif
2449#if CYTHON_COMPILING_IN_LIMITED_API
2450 PyObject *func_weakreflist;
2451#endif
2452#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
2453 PyObject *func_dict;
2454#endif
2455 PyObject *func_name;
2456 PyObject *func_qualname;
2457 PyObject *func_doc;
2458 PyObject *func_globals;
2459 PyObject *func_code;
2460 PyObject *func_closure;
2461#if CYTHON_COMPILING_IN_LIMITED_API
2462 PyObject *func_classobj;
2463#endif
2464 PyObject *defaults;
2465 int flags;
2466 PyObject *defaults_tuple;
2467 PyObject *defaults_kwdict;
2468 PyObject *(*defaults_getter)(PyObject *);
2469 PyObject *func_annotations;
2470#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
2471 PyObject *func_is_coroutine;
2472#endif
2473} __pyx_CyFunctionObject;
2474#undef __Pyx_CyOrPyCFunction_Check
2475#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
2476#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
2477#define __Pyx_CyFunction_CheckExact(obj) Py_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
2478static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
2479#undef __Pyx_IsSameCFunction
2480#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
2481static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
2482static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
2483 PyTypeObject *defaults_type);
2484static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2485 PyObject *tuple);
2486static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2487 PyObject *dict);
2488static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2489 PyObject *dict);
2490static int __pyx_CyFunction_init(PyObject *module);
2491#if CYTHON_VECTORCALL
2492#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
2493#define __Pyx_CyFunction_func_vectorcall(f) ((f)->func_vectorcall)
2494#else
2495#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
2496#endif
2497#endif
2498
2499/* CallTypeTraverse.proto (used by CythonFunctionShared) */
2500#if !CYTHON_USE_TYPE_SPECS
2501#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
2502#else
2503static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
2504#endif
2505
2506/* PyMethodNew.proto (used by CythonFunctionShared) */
2507static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
2508
2509/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
2510#if CYTHON_VECTORCALL
2511static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
2512#endif
2513
2514/* CythonFunctionShared.proto (used by CythonFunction) */
2515static PyObject *__Pyx_CyFunction_Init(PyObject *op_in, PyMethodDef *ml,
2516 int flags, PyObject* qualname,
2517 PyObject *closure,
2518 PyObject *module, PyObject *globals,
2519 PyObject* code);
2520#if CYTHON_VECTORCALL
2521static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2522static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2523static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2524static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2525#endif
2526
2527/* CythonFunction.export */
2528static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2529 int flags, PyObject* qualname,
2530 PyObject *closure,
2531 PyObject *module, PyObject *globals,
2532 PyObject* code);
2533static PyTypeObject *__Pyx_Get_CyFunction_Type(void);
2534
2535/* PyDictVersioning.proto (used by CLineInTraceback) */
2536#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2537#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2538#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2539#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2540 (version_var) = __PYX_GET_DICT_VERSION(dict);\
2541 (cache_var) = (value);
2542#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2543 static PY_UINT64_T __pyx_dict_version = 0;\
2544 static PyObject *__pyx_dict_cached_value = NULL;\
2545 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2546 (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
2547 } else {\
2548 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2549 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2550 }\
2551}
2552static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2553static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2554static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2555#else
2556#define __PYX_GET_DICT_VERSION(dict) (0)
2557#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2558#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2559#endif
2560
2561/* CLineInTraceback.proto (used by AddTraceback) */
2562#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
2563static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2564#else
2565#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2566#endif
2567
2568/* CodeObjectCache.proto (used by AddTraceback) */
2569#if CYTHON_COMPILING_IN_LIMITED_API
2570typedef PyObject __Pyx_CachedCodeObjectType;
2571#else
2572typedef PyCodeObject __Pyx_CachedCodeObjectType;
2573#endif
2574typedef struct {
2575 __Pyx_CachedCodeObjectType* code_object;
2576 int code_line;
2577} __Pyx_CodeObjectCacheEntry;
2578struct __Pyx_CodeObjectCache {
2579 int count;
2580 int max_count;
2581 __Pyx_CodeObjectCacheEntry* entries;
2582 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2583 __pyx_atomic_int_type accessor_count;
2584 #endif
2585};
2586static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2587static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
2588static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);
2589
2590/* AddTraceback.proto */
2591static void __Pyx_AddTraceback(const char *funcname, int c_line,
2592 int py_line, const char *filename);
2593
2594/* GCCDiagnostics.proto */
2595#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2596#define __Pyx_HAS_GCC_DIAGNOSTIC
2597#endif
2598
2599/* RealImag.proto */
2600#if CYTHON_CCOMPLEX
2601 #ifdef __cplusplus
2602 #define __Pyx_CREAL(z) ((z).real())
2603 #define __Pyx_CIMAG(z) ((z).imag())
2604 #else
2605 #define __Pyx_CREAL(z) (__real__(z))
2606 #define __Pyx_CIMAG(z) (__imag__(z))
2607 #endif
2608#else
2609 #define __Pyx_CREAL(z) ((z).real)
2610 #define __Pyx_CIMAG(z) ((z).imag)
2611#endif
2612#if defined(__cplusplus) && CYTHON_CCOMPLEX\
2613 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2614 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2615 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2616#else
2617 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2618 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2619#endif
2620
2621/* Arithmetic.proto */
2622#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2623 #define __Pyx_c_eq_float(a, b) ((a)==(b))
2624 #define __Pyx_c_sum_float(a, b) ((a)+(b))
2625 #define __Pyx_c_diff_float(a, b) ((a)-(b))
2626 #define __Pyx_c_prod_float(a, b) ((a)*(b))
2627 #define __Pyx_c_quot_float(a, b) ((a)/(b))
2628 #define __Pyx_c_neg_float(a) (-(a))
2629 #ifdef __cplusplus
2630 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2631 #define __Pyx_c_conj_float(z) (::std::conj(z))
2632 #if 1
2633 #define __Pyx_c_abs_float(z) (::std::abs(z))
2634 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2635 #endif
2636 #else
2637 #define __Pyx_c_is_zero_float(z) ((z)==0)
2638 #define __Pyx_c_conj_float(z) (conjf(z))
2639 #if 1
2640 #define __Pyx_c_abs_float(z) (cabsf(z))
2641 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2642 #endif
2643 #endif
2644#else
2645 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2646 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2647 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2648 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2649 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2650 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2651 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2652 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2653 #if 1
2654 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2655 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2656 #endif
2657#endif
2658
2659/* Arithmetic.proto */
2660#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2661 #define __Pyx_c_eq_double(a, b) ((a)==(b))
2662 #define __Pyx_c_sum_double(a, b) ((a)+(b))
2663 #define __Pyx_c_diff_double(a, b) ((a)-(b))
2664 #define __Pyx_c_prod_double(a, b) ((a)*(b))
2665 #define __Pyx_c_quot_double(a, b) ((a)/(b))
2666 #define __Pyx_c_neg_double(a) (-(a))
2667 #ifdef __cplusplus
2668 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2669 #define __Pyx_c_conj_double(z) (::std::conj(z))
2670 #if 1
2671 #define __Pyx_c_abs_double(z) (::std::abs(z))
2672 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2673 #endif
2674 #else
2675 #define __Pyx_c_is_zero_double(z) ((z)==0)
2676 #define __Pyx_c_conj_double(z) (conj(z))
2677 #if 1
2678 #define __Pyx_c_abs_double(z) (cabs(z))
2679 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2680 #endif
2681 #endif
2682#else
2683 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2684 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2685 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2686 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2687 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2688 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2689 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2690 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2691 #if 1
2692 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2693 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2694 #endif
2695#endif
2696
2697/* Arithmetic.proto */
2698#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2699 #define __Pyx_c_eq_long__double(a, b) ((a)==(b))
2700 #define __Pyx_c_sum_long__double(a, b) ((a)+(b))
2701 #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
2702 #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
2703 #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
2704 #define __Pyx_c_neg_long__double(a) (-(a))
2705 #ifdef __cplusplus
2706 #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
2707 #define __Pyx_c_conj_long__double(z) (::std::conj(z))
2708 #if 1
2709 #define __Pyx_c_abs_long__double(z) (::std::abs(z))
2710 #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b))
2711 #endif
2712 #else
2713 #define __Pyx_c_is_zero_long__double(z) ((z)==0)
2714 #define __Pyx_c_conj_long__double(z) (conjl(z))
2715 #if 1
2716 #define __Pyx_c_abs_long__double(z) (cabsl(z))
2717 #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b))
2718 #endif
2719 #endif
2720#else
2721 static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2722 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2723 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2724 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2725 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2726 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
2727 static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
2728 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
2729 #if 1
2730 static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
2731 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2732 #endif
2733#endif
2734
2735/* CIntFromPy.proto */
2736static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);
2737
2738/* FormatTypeName.proto */
2739#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2740typedef PyObject *__Pyx_TypeName;
2741#define __Pyx_FMT_TYPENAME "%N"
2742#define __Pyx_PyType_GetFullyQualifiedName(tp) Py_NewRef((PyObject*)tp)
2743#define __Pyx_DECREF_TypeName(obj) Py_DECREF(obj)
2744#elif CYTHON_COMPILING_IN_LIMITED_API
2745typedef PyObject *__Pyx_TypeName;
2746#define __Pyx_FMT_TYPENAME "%U"
2747#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
2748static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
2749#else // !LIMITED_API
2750typedef const char *__Pyx_TypeName;
2751#define __Pyx_FMT_TYPENAME "%.200s"
2752#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
2753#define __Pyx_DECREF_TypeName(obj)
2754#endif
2755
2756/* PyObjectVectorcallKwds.proto (used by PyObjectVectorcallMethodKwds) */
2757#if CYTHON_VECTORCALL
2758#define __Pyx_Object_VectorcallKwds PyObject_Vectorcall
2759CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i);
2760#else
2761#define __Pyx_Object_VectorcallKwds __Pyx_PyObject_FastCallDict
2762CYTHON_UNUSED static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t n);
2763CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i);
2764#endif
2765
2766/* PyObjectVectorcallMethodKwds.proto (used by CIntToPy) */
2767#if CYTHON_VECTORCALL
2768#define __Pyx_Object_VectorcallMethodKwds PyObject_VectorcallMethod
2769#else
2770static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2771#endif
2772
2773/* CIntToPy.proto */
2774static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);
2775
2776/* CIntFromPy.proto */
2777static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);
2778
2779/* GetRuntimeVersion.proto */
2780#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
2781static unsigned long __Pyx_cached_runtime_version = 0;
2782static void __Pyx_init_runtime_version(void);
2783#else
2784#define __Pyx_init_runtime_version()
2785#endif
2786static unsigned long __Pyx_get_runtime_version(void);
2787
2788/* CheckBinaryVersion.proto */
2789static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
2790
2791/* DecompressString.proto */
2792static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);
2793
2794/* DecompressString_LZSS.proto */
2795static PyObject *__Pyx_DecompressString_LZSS(const char *s, size_t compressed_length, size_t uncompressed_length);
2796
2797/* MultiPhaseInitModuleState.proto */
2798#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
2799#include <stdlib.h>
2800static PyObject *__Pyx_State_FindModule(void*);
2801static int __Pyx_State_AddModule(PyObject* module, void*);
2802static int __Pyx_State_RemoveModule(void*);
2803#elif CYTHON_USE_MODULE_STATE
2804#define __Pyx_State_FindModule PyState_FindModule
2805#define __Pyx_State_AddModule PyState_AddModule
2806#define __Pyx_State_RemoveModule PyState_RemoveModule
2807#endif
2808
2809/* #### Code section: module_declarations ### */
2810/* CythonABIVersion.proto */
2811#if CYTHON_COMPILING_IN_LIMITED_API
2812 #if CYTHON_VECTORCALL
2813 #define __PYX_VECTORCALL_ABI_SUFFIX "_vectorcall"
2814 #else
2815 #define __PYX_VECTORCALL_ABI_SUFFIX
2816 #endif
2817 #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_VECTORCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
2818#else
2819 #define __PYX_LIMITED_ABI_SUFFIX
2820#endif
2821#if __PYX_HAS_PY_AM_SEND == 1
2822 #define __PYX_AM_SEND_ABI_SUFFIX
2823#elif __PYX_HAS_PY_AM_SEND == 2
2824 #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
2825#else
2826 #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
2827#endif
2828#ifndef __PYX_MONITORING_ABI_SUFFIX
2829 #define __PYX_MONITORING_ABI_SUFFIX
2830#endif
2831#if CYTHON_USE_TP_FINALIZE
2832 #define __PYX_TP_FINALIZE_ABI_SUFFIX
2833#else
2834 #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
2835#endif
2836#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
2837 #define __PYX_FREELISTS_ABI_SUFFIX
2838#else
2839 #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
2840#endif
2841#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
2842 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX "opaque"
2843#else
2844 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
2845#endif
2846#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
2847#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
2848#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
2849
2850static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2851static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2852static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2853static CYTHON_INLINE char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2854static CYTHON_INLINE int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2855static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2856static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2857static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2858static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2859static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2860static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2861static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2862static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2863static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2864static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2865static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2866static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2867static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self); /* proto*/
2868static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self); /* proto*/
2869static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self); /* proto*/
2870static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self); /* proto*/
2871static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self); /* proto*/
2872static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self); /* proto*/
2873static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self); /* proto*/
2874static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2875static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2876static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2877static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2878static CYTHON_INLINE void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2879static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2880static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2881static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2882static CYTHON_INLINE void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2883static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2884static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2885
2886/* Module declarations from "libc.string" */
2887
2888/* Module declarations from "libc.stdio" */
2889
2890/* Module declarations from "__builtin__" */
2891
2892/* Module declarations from "cpython.type" */
2893
2894/* Module declarations from "cpython" */
2895
2896/* Module declarations from "cpython.object" */
2897
2898/* Module declarations from "cpython.ref" */
2899
2900/* Module declarations from "numpy" */
2901
2902/* Module declarations from "numpy" */
2903
2904/* Module declarations from "ctimeIntegration" */
2905/* #### Code section: typeinfo ### */
2906/* #### Code section: before_global_var ### */
2907#define __Pyx_MODULE_NAME "ctimeIntegration"
2908extern int __pyx_module_is_main_ctimeIntegration;
2909int __pyx_module_is_main_ctimeIntegration = 0;
2910
2911/* Implementation of "ctimeIntegration" */
2912/* #### Code section: global_var ### */
2913/* #### Code section: string_decls ### */
2914/* #### Code section: decls ### */
2915static PyObject *__pyx_pf_16ctimeIntegration_psiTCtteDT(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nPoints, double __pyx_v_tau, double __pyx_v_dtn, double __pyx_v_dtnm1, PyArrayObject *__pyx_v_yn, PyArrayObject *__pyx_v_ypn, PyArrayObject *__pyx_v_ypnm1, PyArrayObject *__pyx_v_dtnp1); /* proto */
2916static PyObject *__pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_limiterFlag, int __pyx_v_nElements_global, int __pyx_v_nNodes_element, int __pyx_v_nElementBoundaries_element, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
2917static PyObject *__pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_enforcePositivity, double __pyx_v_vacuumTol, int __pyx_v_nElements_global, int __pyx_v_nNodes_element, int __pyx_v_nElementBoundaries_element, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
2918static PyObject *__pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients); /* proto */
2919static PyObject *__pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors); /* proto */
2920static PyObject *__pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_nu, double __pyx_v_Mh2, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
2921static PyObject *__pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
2922static PyObject *__pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
2923static PyObject *__pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_enforcePositivity, double __pyx_v_vacuumTol, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout); /* proto */
2924/* #### Code section: late_includes ### */
2925/* #### Code section: module_state ### */
2926/* SmallCodeConfig */
2927#ifndef CYTHON_SMALL_CODE
2928#if defined(__clang__)
2929 #define CYTHON_SMALL_CODE
2930#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
2931 #define CYTHON_SMALL_CODE __attribute__((cold))
2932#else
2933 #define CYTHON_SMALL_CODE
2934#endif
2935#endif
2936
2937#ifdef __cplusplus
2938namespace {
2939 #endif
2940 typedef struct {
2941 PyObject *__pyx_d;
2942 PyObject *__pyx_b;
2943 PyObject *__pyx_cython_runtime;
2944 PyObject *__pyx_empty_tuple;
2945 PyObject *__pyx_empty_bytes;
2946 PyObject *__pyx_empty_unicode;
2947 PyTypeObject *__pyx_ptype_7cpython_4type_type;
2948 PyTypeObject *__pyx_ptype_5numpy_dtype;
2949 PyTypeObject *__pyx_ptype_5numpy_flatiter;
2950 PyTypeObject *__pyx_ptype_5numpy_broadcast;
2951 PyTypeObject *__pyx_ptype_5numpy_ndarray;
2952 PyTypeObject *__pyx_ptype_5numpy_generic;
2953 PyTypeObject *__pyx_ptype_5numpy_number;
2954 PyTypeObject *__pyx_ptype_5numpy_integer;
2955 PyTypeObject *__pyx_ptype_5numpy_signedinteger;
2956 PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
2957 PyTypeObject *__pyx_ptype_5numpy_inexact;
2958 PyTypeObject *__pyx_ptype_5numpy_floating;
2959 PyTypeObject *__pyx_ptype_5numpy_complexfloating;
2960 PyTypeObject *__pyx_ptype_5numpy_flexible;
2961 PyTypeObject *__pyx_ptype_5numpy_character;
2962 PyTypeObject *__pyx_ptype_5numpy_ufunc;
2963 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
2964 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
2965 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
2966 PyObject *__pyx_codeobj_tab[9];
2967 PyObject *__pyx_string_tab[77];
2968/* #### Code section: module_state_contents ### */
2969/* CommonTypesMetaclass.module_state_decls */
2970PyTypeObject *__pyx_CommonTypesMetaclassType;
2971
2972/* CachedMethodType.module_state_decls */
2973#if CYTHON_COMPILING_IN_LIMITED_API
2974PyObject *__Pyx_CachedMethodType;
2975#endif
2976
2977/* CythonFunctionPerModule.module_state_decls */
2978PyTypeObject *__pyx_CyFunctionType;
2979
2980/* CodeObjectCache.module_state_decls */
2981struct __Pyx_CodeObjectCache __pyx_code_cache;
2982
2983/* #### Code section: module_state_end ### */
2984} __pyx_mstatetype;
2985#ifdef __cplusplus
2986} /* anonymous namespace */
2987#endif
2988
2989#if CYTHON_USE_MODULE_STATE
2990#ifdef __cplusplus
2991namespace {
2992extern struct PyModuleDef __pyx_moduledef;
2993} /* anonymous namespace */
2994#else
2995static struct PyModuleDef __pyx_moduledef;
2996#endif
2997
2998#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
2999
3000#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
3001#else
3002static __pyx_mstatetype __pyx_mstate_global_static =
3003#ifdef __cplusplus
3004 {};
3005#else
3006 {0};
3007#endif
3008static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
3009#endif
3010/* #### Code section: constant_name_defines ### */
3011#define __pyx_kp_u_ __pyx_string_tab[0]
3012#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[1]
3013#define __pyx_kp_u_add_note __pyx_string_tab[2]
3014#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[3]
3015#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[4]
3016#define __pyx_kp_u_proteus_ctimeIntegration_pyx __pyx_string_tab[5]
3017#define __pyx_n_u_Mh2 __pyx_string_tab[6]
3018#define __pyx_n_u_Uin __pyx_string_tab[7]
3019#define __pyx_n_u_Uout __pyx_string_tab[8]
3020#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[9]
3021#define __pyx_n_u_annotate __pyx_string_tab[10]
3022#define __pyx_n_u_func __pyx_string_tab[11]
3023#define __pyx_n_u_main __pyx_string_tab[12]
3024#define __pyx_n_u_module __pyx_string_tab[13]
3025#define __pyx_n_u_name __pyx_string_tab[14]
3026#define __pyx_n_u_qualname __pyx_string_tab[15]
3027#define __pyx_n_u_test __pyx_string_tab[16]
3028#define __pyx_n_u_is_coroutine __pyx_string_tab[17]
3029#define __pyx_n_u_allowMinWithUndershoot __pyx_string_tab[18]
3030#define __pyx_n_u_alphaNeighbors __pyx_string_tab[19]
3031#define __pyx_n_u_alphas __pyx_string_tab[20]
3032#define __pyx_n_u_applyCockburnDGlimiterP1Lagrange __pyx_string_tab[21]
3033#define __pyx_n_u_applyDGlimitingP1Lagrange1d __pyx_string_tab[22]
3034#define __pyx_n_u_applyDGlimitingP1Lagrange1d_with __pyx_string_tab[23]
3035#define __pyx_n_u_applyDurlofskyDGlimiterP1Lagrang __pyx_string_tab[24]
3036#define __pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_3 __pyx_string_tab[25]
3037#define __pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_2 __pyx_string_tab[26]
3038#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[27]
3039#define __pyx_n_u_cline_in_traceback __pyx_string_tab[28]
3040#define __pyx_n_u_computeCockburnDGlimiterArrays2d __pyx_string_tab[29]
3041#define __pyx_n_u_computeElementNeighborShapeGradi __pyx_string_tab[30]
3042#define __pyx_n_u_ctimeIntegration __pyx_string_tab[31]
3043#define __pyx_n_u_dtn __pyx_string_tab[32]
3044#define __pyx_n_u_dtnm1 __pyx_string_tab[33]
3045#define __pyx_n_u_dtnp1 __pyx_string_tab[34]
3046#define __pyx_n_u_elementAverages __pyx_string_tab[35]
3047#define __pyx_n_u_elementBarycentersArray __pyx_string_tab[36]
3048#define __pyx_n_u_elementBoundariesArray __pyx_string_tab[37]
3049#define __pyx_n_u_elementBoundaryBarycentersArray __pyx_string_tab[38]
3050#define __pyx_n_u_elementNeighborShapeGradients __pyx_string_tab[39]
3051#define __pyx_n_u_elementNeighborsArray __pyx_string_tab[40]
3052#define __pyx_n_u_elementNodesArray __pyx_string_tab[41]
3053#define __pyx_n_u_enforcePositivity __pyx_string_tab[42]
3054#define __pyx_n_u_grad_v0 __pyx_string_tab[43]
3055#define __pyx_n_u_items __pyx_string_tab[44]
3056#define __pyx_n_u_killExtrema __pyx_string_tab[45]
3057#define __pyx_n_u_l2g __pyx_string_tab[46]
3058#define __pyx_n_u_limiterFlag __pyx_string_tab[47]
3059#define __pyx_n_u_nDOF_element __pyx_string_tab[48]
3060#define __pyx_n_u_nElementBoundaries_element __pyx_string_tab[49]
3061#define __pyx_n_u_nElements_global __pyx_string_tab[50]
3062#define __pyx_n_u_nNodes_element __pyx_string_tab[51]
3063#define __pyx_n_u_nPoints __pyx_string_tab[52]
3064#define __pyx_n_u_nSpace __pyx_string_tab[53]
3065#define __pyx_n_u_nodeArray __pyx_string_tab[54]
3066#define __pyx_n_u_np __pyx_string_tab[55]
3067#define __pyx_n_u_nu __pyx_string_tab[56]
3068#define __pyx_n_u_numpy __pyx_string_tab[57]
3069#define __pyx_n_u_pop __pyx_string_tab[58]
3070#define __pyx_n_u_psiTCtteDT __pyx_string_tab[59]
3071#define __pyx_n_u_setdefault __pyx_string_tab[60]
3072#define __pyx_n_u_tag __pyx_string_tab[61]
3073#define __pyx_n_u_tau __pyx_string_tab[62]
3074#define __pyx_n_u_vacuumTol __pyx_string_tab[63]
3075#define __pyx_n_u_values __pyx_string_tab[64]
3076#define __pyx_n_u_yn __pyx_string_tab[65]
3077#define __pyx_n_u_ypn __pyx_string_tab[66]
3078#define __pyx_n_u_ypnm1 __pyx_string_tab[67]
3079#define __pyx_kp_b_iso88591_vQa_6_6_AQ_6a_5Q_B __pyx_string_tab[68]
3080#define __pyx_kp_b_iso88591_Q_6_vQa_vQb_1_q_Gq_EQ_a_1 __pyx_string_tab[69]
3081#define __pyx_kp_b_iso88591_aq_c_e1_Q __pyx_string_tab[70]
3082#define __pyx_kp_b_iso88591_q_V1A_q_q_1_vQa_DA_s_s_2_Q_2_Q __pyx_string_tab[71]
3083#define __pyx_kp_b_iso88591_5Q_5Q_9A_1_1_3a_4q __pyx_string_tab[72]
3084#define __pyx_kp_b_iso88591_aq_31_7q_Ya_A_Q_Q_S_T __pyx_string_tab[73]
3085#define __pyx_kp_b_iso88591_9_5Q_y_a_Fa_DA_Cq_wa_a_Cq_s_t1 __pyx_string_tab[74]
3086#define __pyx_kp_b_iso88591_1_6a_q_Gq_EQ_S_q_q_S_1_A __pyx_string_tab[75]
3087#define __pyx_kp_b_iso88591_7aq_a_q_IQ_31_1_9_A_G1_O1_A_Cq __pyx_string_tab[76]
3088/* #### Code section: module_state_clear ### */
3089#if CYTHON_USE_MODULE_STATE
3090static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
3091 __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
3092 if (!clear_module_state) return 0;
3093 Py_CLEAR(clear_module_state->__pyx_d);
3094 Py_CLEAR(clear_module_state->__pyx_b);
3095 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
3096 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
3097 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
3098 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
3099 #if CYTHON_PEP489_MULTI_PHASE_INIT
3100 __Pyx_State_RemoveModule(NULL);
3101 #endif
3102 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
3103 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
3104 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
3105 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
3106 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
3107 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
3108 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
3109 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
3110 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
3111 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
3112 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
3113 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
3114 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
3115 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
3116 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
3117 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
3118 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_items.method);
3119 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_pop.method);
3120 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_values.method);
3121 for (int i=0; i<9; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
3122 for (int i=0; i<77; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
3123/* #### Code section: module_state_clear_contents ### */
3124/* CommonTypesMetaclass.module_state_clear */
3125Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
3126
3127/* CythonFunctionPerModule.module_state_clear */
3128Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
3129
3130/* #### Code section: module_state_clear_end ### */
3131return 0;
3132}
3133#endif
3134/* #### Code section: module_state_traverse ### */
3135#if CYTHON_USE_MODULE_STATE
3136static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3137 __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
3138 if (!traverse_module_state) return 0;
3139 Py_VISIT(traverse_module_state->__pyx_d);
3140 Py_VISIT(traverse_module_state->__pyx_b);
3141 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
3142 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
3143 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
3144 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
3145 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
3146 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
3147 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
3148 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
3149 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
3150 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
3151 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
3152 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
3153 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
3154 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
3155 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
3156 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
3157 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
3158 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
3159 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
3160 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
3161 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_items.method);
3162 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_pop.method);
3163 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_values.method);
3164 for (int i=0; i<9; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
3165 for (int i=0; i<77; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
3166/* #### Code section: module_state_traverse_contents ### */
3167/* CommonTypesMetaclass.module_state_traverse */
3168Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
3169
3170/* CythonFunctionPerModule.module_state_traverse */
3171Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
3172
3173/* #### Code section: module_state_traverse_end ### */
3174return 0;
3175}
3176#endif
3177/* #### Code section: module_code ### */
3178
3179/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":230
3180 *
3181 * ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
3182 * @property # <<<<<<<<<<<<<<
3183 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3184 * return PyDataType_TYPEOBJ(self)
3185*/
3186
3187static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self) {
3188 PyTypeObject *__pyx_r;
3189
3190 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":232
3191 * @property
3192 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3193 * return PyDataType_TYPEOBJ(self) # <<<<<<<<<<<<<<
3194 *
3195 * @property
3196*/
3197 {
3198
3199 __pyx_r = PyDataType_TYPEOBJ(__pyx_v_self);
3200 }
3201 goto __pyx_L0;
3202
3203 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":230
3204 *
3205 * ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
3206 * @property # <<<<<<<<<<<<<<
3207 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3208 * return PyDataType_TYPEOBJ(self)
3209*/
3210
3211 /* function exit code */
3212 __pyx_L0:;
3213 return __pyx_r;
3214}
3215
3216/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":234
3217 * return PyDataType_TYPEOBJ(self)
3218 *
3219 * @property # <<<<<<<<<<<<<<
3220 * cdef inline char kind(self) noexcept nogil:
3221 * return PyDataType_KIND(self)
3222*/
3223
3224static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self) {
3225 char __pyx_r;
3226
3227 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":236
3228 * @property
3229 * cdef inline char kind(self) noexcept nogil:
3230 * return PyDataType_KIND(self) # <<<<<<<<<<<<<<
3231 *
3232 * @property
3233*/
3234 {
3235
3236 __pyx_r = PyDataType_KIND(__pyx_v_self);
3237 }
3238 goto __pyx_L0;
3239
3240 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":234
3241 * return PyDataType_TYPEOBJ(self)
3242 *
3243 * @property # <<<<<<<<<<<<<<
3244 * cdef inline char kind(self) noexcept nogil:
3245 * return PyDataType_KIND(self)
3246*/
3247
3248 /* function exit code */
3249 __pyx_L0:;
3250 return __pyx_r;
3251}
3252
3253/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":238
3254 * return PyDataType_KIND(self)
3255 *
3256 * @property # <<<<<<<<<<<<<<
3257 * cdef inline char type(self) noexcept nogil:
3258 * return PyDataType_TYPE(self)
3259*/
3260
3261static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self) {
3262 char __pyx_r;
3263
3264 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":240
3265 * @property
3266 * cdef inline char type(self) noexcept nogil:
3267 * return PyDataType_TYPE(self) # <<<<<<<<<<<<<<
3268 *
3269 * # Numpy sometimes mutates this without warning (e.g. it'll
3270*/
3271 {
3272
3273 __pyx_r = PyDataType_TYPE(__pyx_v_self);
3274 }
3275 goto __pyx_L0;
3276
3277 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":238
3278 * return PyDataType_KIND(self)
3279 *
3280 * @property # <<<<<<<<<<<<<<
3281 * cdef inline char type(self) noexcept nogil:
3282 * return PyDataType_TYPE(self)
3283*/
3284
3285 /* function exit code */
3286 __pyx_L0:;
3287 return __pyx_r;
3288}
3289
3290/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":247
3291 * # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
3292 * # directly accessing this field.
3293 * @property # <<<<<<<<<<<<<<
3294 * cdef inline char byteorder(self) noexcept nogil:
3295 * return PyDataType_BYTEORDER(self)
3296*/
3297
3298static CYTHON_INLINE char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self) {
3299 char __pyx_r;
3300
3301 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":249
3302 * @property
3303 * cdef inline char byteorder(self) noexcept nogil:
3304 * return PyDataType_BYTEORDER(self) # <<<<<<<<<<<<<<
3305 *
3306 * @property
3307*/
3308 {
3309
3310 __pyx_r = PyDataType_BYTEORDER(__pyx_v_self);
3311 }
3312 goto __pyx_L0;
3313
3314 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":247
3315 * # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
3316 * # directly accessing this field.
3317 * @property # <<<<<<<<<<<<<<
3318 * cdef inline char byteorder(self) noexcept nogil:
3319 * return PyDataType_BYTEORDER(self)
3320*/
3321
3322 /* function exit code */
3323 __pyx_L0:;
3324 return __pyx_r;
3325}
3326
3327/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":251
3328 * return PyDataType_BYTEORDER(self)
3329 *
3330 * @property # <<<<<<<<<<<<<<
3331 * cdef inline int type_num(self) noexcept nogil:
3332 * return PyDataType_TYPENUM(self)
3333*/
3334
3335static CYTHON_INLINE int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self) {
3336 int __pyx_r;
3337
3338 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":253
3339 * @property
3340 * cdef inline int type_num(self) noexcept nogil:
3341 * return PyDataType_TYPENUM(self) # <<<<<<<<<<<<<<
3342 *
3343 * @property
3344*/
3345 {
3346
3347 __pyx_r = PyDataType_TYPENUM(__pyx_v_self);
3348 }
3349 goto __pyx_L0;
3350
3351 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":251
3352 * return PyDataType_BYTEORDER(self)
3353 *
3354 * @property # <<<<<<<<<<<<<<
3355 * cdef inline int type_num(self) noexcept nogil:
3356 * return PyDataType_TYPENUM(self)
3357*/
3358
3359 /* function exit code */
3360 __pyx_L0:;
3361 return __pyx_r;
3362}
3363
3364/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":255
3365 * return PyDataType_TYPENUM(self)
3366 *
3367 * @property # <<<<<<<<<<<<<<
3368 * cdef inline npy_intp itemsize(self) noexcept nogil:
3369 * return PyDataType_ELSIZE(self)
3370*/
3371
3372static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self) {
3373 npy_intp __pyx_r;
3374
3375 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":257
3376 * @property
3377 * cdef inline npy_intp itemsize(self) noexcept nogil:
3378 * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<<
3379 *
3380 * @property
3381*/
3382 {
3383
3384 __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
3385 }
3386 goto __pyx_L0;
3387
3388 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":255
3389 * return PyDataType_TYPENUM(self)
3390 *
3391 * @property # <<<<<<<<<<<<<<
3392 * cdef inline npy_intp itemsize(self) noexcept nogil:
3393 * return PyDataType_ELSIZE(self)
3394*/
3395
3396 /* function exit code */
3397 __pyx_L0:;
3398 return __pyx_r;
3399}
3400
3401/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":259
3402 * return PyDataType_ELSIZE(self)
3403 *
3404 * @property # <<<<<<<<<<<<<<
3405 * cdef inline npy_intp alignment(self) noexcept nogil:
3406 * return PyDataType_ALIGNMENT(self)
3407*/
3408
3409static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self) {
3410 npy_intp __pyx_r;
3411
3412 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":261
3413 * @property
3414 * cdef inline npy_intp alignment(self) noexcept nogil:
3415 * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<<
3416 *
3417 * # Use fields/names with care as they may be NULL. You must check
3418*/
3419 {
3420
3421 __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
3422 }
3423 goto __pyx_L0;
3424
3425 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":259
3426 * return PyDataType_ELSIZE(self)
3427 *
3428 * @property # <<<<<<<<<<<<<<
3429 * cdef inline npy_intp alignment(self) noexcept nogil:
3430 * return PyDataType_ALIGNMENT(self)
3431*/
3432
3433 /* function exit code */
3434 __pyx_L0:;
3435 return __pyx_r;
3436}
3437
3438/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":265
3439 * # Use fields/names with care as they may be NULL. You must check
3440 * # for this using PyDataType_HASFIELDS.
3441 * @property # <<<<<<<<<<<<<<
3442 * cdef inline object fields(self):
3443 * return <object>PyDataType_FIELDS(self)
3444*/
3445
3446static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self) {
3447 PyObject *__pyx_r = NULL;
3448 __Pyx_RefNannyDeclarations
3449 PyObject *__pyx_t_1;
3450 __Pyx_RefNannySetupContext("__get__", 0);
3451
3452 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":267
3453 * @property
3454 * cdef inline object fields(self):
3455 * return <object>PyDataType_FIELDS(self) # <<<<<<<<<<<<<<
3456 *
3457 * @property
3458*/
3459 __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
3460
3461 {
3462 PyObject *__pyx_temp;
3463 {
3464 __pyx_temp = __pyx_r;
3465 __Pyx_INCREF(((PyObject *)__pyx_t_1));
3466 __pyx_r = ((PyObject *)__pyx_t_1);
3467 }
3468 __Pyx_XDECREF(__pyx_temp);
3469 }
3470
3471 goto __pyx_L0;
3472
3473 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":265
3474 * # Use fields/names with care as they may be NULL. You must check
3475 * # for this using PyDataType_HASFIELDS.
3476 * @property # <<<<<<<<<<<<<<
3477 * cdef inline object fields(self):
3478 * return <object>PyDataType_FIELDS(self)
3479*/
3480
3481 /* function exit code */
3482 __pyx_L0:;
3483 __Pyx_XGIVEREF(__pyx_r);
3484 __Pyx_RefNannyFinishContext();
3485 return __pyx_r;
3486}
3487
3488/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":269
3489 * return <object>PyDataType_FIELDS(self)
3490 *
3491 * @property # <<<<<<<<<<<<<<
3492 * cdef inline tuple names(self):
3493 * return <tuple>PyDataType_NAMES(self)
3494*/
3495
3496static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self) {
3497 PyObject *__pyx_r = NULL;
3498 __Pyx_RefNannyDeclarations
3499 PyObject *__pyx_t_1;
3500 __Pyx_RefNannySetupContext("__get__", 0);
3501
3502 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":271
3503 * @property
3504 * cdef inline tuple names(self):
3505 * return <tuple>PyDataType_NAMES(self) # <<<<<<<<<<<<<<
3506 *
3507 * # Use PyDataType_HASSUBARRAY to test whether this field is
3508*/
3509 __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
3510
3511 {
3512 PyObject *__pyx_temp;
3513 {
3514 __pyx_temp = __pyx_r;
3515 __Pyx_INCREF(((PyObject*)__pyx_t_1));
3516 __pyx_r = ((PyObject*)__pyx_t_1);
3517 }
3518 __Pyx_XDECREF(__pyx_temp);
3519 }
3520
3521 goto __pyx_L0;
3522
3523 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":269
3524 * return <object>PyDataType_FIELDS(self)
3525 *
3526 * @property # <<<<<<<<<<<<<<
3527 * cdef inline tuple names(self):
3528 * return <tuple>PyDataType_NAMES(self)
3529*/
3530
3531 /* function exit code */
3532 __pyx_L0:;
3533 __Pyx_XGIVEREF(__pyx_r);
3534 __Pyx_RefNannyFinishContext();
3535 return __pyx_r;
3536}
3537
3538/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":276
3539 * # valid (the pointer can be NULL). Most users should access
3540 * # this field via the inline helper method PyDataType_SHAPE.
3541 * @property # <<<<<<<<<<<<<<
3542 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3543 * return PyDataType_SUBARRAY(self)
3544*/
3545
3546static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self) {
3547 PyArray_ArrayDescr *__pyx_r;
3548
3549 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":278
3550 * @property
3551 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3552 * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<<
3553 *
3554 * @property
3555*/
3556 {
3557
3558 __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
3559 }
3560 goto __pyx_L0;
3561
3562 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":276
3563 * # valid (the pointer can be NULL). Most users should access
3564 * # this field via the inline helper method PyDataType_SHAPE.
3565 * @property # <<<<<<<<<<<<<<
3566 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3567 * return PyDataType_SUBARRAY(self)
3568*/
3569
3570 /* function exit code */
3571 __pyx_L0:;
3572 return __pyx_r;
3573}
3574
3575/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":280
3576 * return PyDataType_SUBARRAY(self)
3577 *
3578 * @property # <<<<<<<<<<<<<<
3579 * cdef inline npy_uint64 flags(self) noexcept nogil:
3580 * """The data types flags."""
3581*/
3582
3583static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self) {
3584 npy_uint64 __pyx_r;
3585
3586 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":283
3587 * cdef inline npy_uint64 flags(self) noexcept nogil:
3588 * """The data types flags."""
3589 * return PyDataType_FLAGS(self) # <<<<<<<<<<<<<<
3590 *
3591 *
3592*/
3593 {
3594
3595 __pyx_r = PyDataType_FLAGS(__pyx_v_self);
3596 }
3597 goto __pyx_L0;
3598
3599 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":280
3600 * return PyDataType_SUBARRAY(self)
3601 *
3602 * @property # <<<<<<<<<<<<<<
3603 * cdef inline npy_uint64 flags(self) noexcept nogil:
3604 * """The data types flags."""
3605*/
3606
3607 /* function exit code */
3608 __pyx_L0:;
3609 return __pyx_r;
3610}
3611
3612/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":292
3613 * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
3614 *
3615 * @property # <<<<<<<<<<<<<<
3616 * cdef inline int numiter(self) noexcept nogil:
3617 * """The number of arrays that need to be broadcast to the same shape."""
3618*/
3619
3620static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self) {
3621 int __pyx_r;
3622
3623 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":295
3624 * cdef inline int numiter(self) noexcept nogil:
3625 * """The number of arrays that need to be broadcast to the same shape."""
3626 * return PyArray_MultiIter_NUMITER(self) # <<<<<<<<<<<<<<
3627 *
3628 * @property
3629*/
3630 {
3631
3632 __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
3633 }
3634 goto __pyx_L0;
3635
3636 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":292
3637 * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
3638 *
3639 * @property # <<<<<<<<<<<<<<
3640 * cdef inline int numiter(self) noexcept nogil:
3641 * """The number of arrays that need to be broadcast to the same shape."""
3642*/
3643
3644 /* function exit code */
3645 __pyx_L0:;
3646 return __pyx_r;
3647}
3648
3649/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":297
3650 * return PyArray_MultiIter_NUMITER(self)
3651 *
3652 * @property # <<<<<<<<<<<<<<
3653 * cdef inline npy_intp size(self) noexcept nogil:
3654 * """The total broadcasted size."""
3655*/
3656
3657static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self) {
3658 npy_intp __pyx_r;
3659
3660 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":300
3661 * cdef inline npy_intp size(self) noexcept nogil:
3662 * """The total broadcasted size."""
3663 * return PyArray_MultiIter_SIZE(self) # <<<<<<<<<<<<<<
3664 *
3665 * @property
3666*/
3667 {
3668
3669 __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
3670 }
3671 goto __pyx_L0;
3672
3673 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":297
3674 * return PyArray_MultiIter_NUMITER(self)
3675 *
3676 * @property # <<<<<<<<<<<<<<
3677 * cdef inline npy_intp size(self) noexcept nogil:
3678 * """The total broadcasted size."""
3679*/
3680
3681 /* function exit code */
3682 __pyx_L0:;
3683 return __pyx_r;
3684}
3685
3686/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":302
3687 * return PyArray_MultiIter_SIZE(self)
3688 *
3689 * @property # <<<<<<<<<<<<<<
3690 * cdef inline npy_intp index(self) noexcept nogil:
3691 * """The current (1-d) index into the broadcasted result."""
3692*/
3693
3694static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self) {
3695 npy_intp __pyx_r;
3696
3697 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":305
3698 * cdef inline npy_intp index(self) noexcept nogil:
3699 * """The current (1-d) index into the broadcasted result."""
3700 * return PyArray_MultiIter_INDEX(self) # <<<<<<<<<<<<<<
3701 *
3702 * @property
3703*/
3704 {
3705
3706 __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
3707 }
3708 goto __pyx_L0;
3709
3710 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":302
3711 * return PyArray_MultiIter_SIZE(self)
3712 *
3713 * @property # <<<<<<<<<<<<<<
3714 * cdef inline npy_intp index(self) noexcept nogil:
3715 * """The current (1-d) index into the broadcasted result."""
3716*/
3717
3718 /* function exit code */
3719 __pyx_L0:;
3720 return __pyx_r;
3721}
3722
3723/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":307
3724 * return PyArray_MultiIter_INDEX(self)
3725 *
3726 * @property # <<<<<<<<<<<<<<
3727 * cdef inline int nd(self) noexcept nogil:
3728 * """The number of dimensions in the broadcasted result."""
3729*/
3730
3731static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self) {
3732 int __pyx_r;
3733
3734 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":310
3735 * cdef inline int nd(self) noexcept nogil:
3736 * """The number of dimensions in the broadcasted result."""
3737 * return PyArray_MultiIter_NDIM(self) # <<<<<<<<<<<<<<
3738 *
3739 * @property
3740*/
3741 {
3742
3743 __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
3744 }
3745 goto __pyx_L0;
3746
3747 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":307
3748 * return PyArray_MultiIter_INDEX(self)
3749 *
3750 * @property # <<<<<<<<<<<<<<
3751 * cdef inline int nd(self) noexcept nogil:
3752 * """The number of dimensions in the broadcasted result."""
3753*/
3754
3755 /* function exit code */
3756 __pyx_L0:;
3757 return __pyx_r;
3758}
3759
3760/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":312
3761 * return PyArray_MultiIter_NDIM(self)
3762 *
3763 * @property # <<<<<<<<<<<<<<
3764 * cdef inline npy_intp* dimensions(self) noexcept nogil:
3765 * """The shape of the broadcasted result."""
3766*/
3767
3768static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self) {
3769 npy_intp *__pyx_r;
3770
3771 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":315
3772 * cdef inline npy_intp* dimensions(self) noexcept nogil:
3773 * """The shape of the broadcasted result."""
3774 * return PyArray_MultiIter_DIMS(self) # <<<<<<<<<<<<<<
3775 *
3776 * @property
3777*/
3778 {
3779
3780 __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
3781 }
3782 goto __pyx_L0;
3783
3784 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":312
3785 * return PyArray_MultiIter_NDIM(self)
3786 *
3787 * @property # <<<<<<<<<<<<<<
3788 * cdef inline npy_intp* dimensions(self) noexcept nogil:
3789 * """The shape of the broadcasted result."""
3790*/
3791
3792 /* function exit code */
3793 __pyx_L0:;
3794 return __pyx_r;
3795}
3796
3797/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":317
3798 * return PyArray_MultiIter_DIMS(self)
3799 *
3800 * @property # <<<<<<<<<<<<<<
3801 * cdef inline void** iters(self) noexcept nogil:
3802 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
3803*/
3804
3805static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self) {
3806 void **__pyx_r;
3807
3808 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":321
3809 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
3810 * On return, the iterators are adjusted for broadcasting."""
3811 * return PyArray_MultiIter_ITERS(self) # <<<<<<<<<<<<<<
3812 *
3813 *
3814*/
3815 {
3816
3817 __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
3818 }
3819 goto __pyx_L0;
3820
3821 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":317
3822 * return PyArray_MultiIter_DIMS(self)
3823 *
3824 * @property # <<<<<<<<<<<<<<
3825 * cdef inline void** iters(self) noexcept nogil:
3826 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
3827*/
3828
3829 /* function exit code */
3830 __pyx_L0:;
3831 return __pyx_r;
3832}
3833
3834/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":335
3835 * # Instead, we use properties that map to the corresponding C-API functions.
3836 *
3837 * @property # <<<<<<<<<<<<<<
3838 * cdef inline PyObject* base(self) noexcept nogil:
3839 * """Returns a borrowed reference to the object owning the data/memory.
3840*/
3841
3842static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self) {
3843 PyObject *__pyx_r;
3844
3845 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":339
3846 * """Returns a borrowed reference to the object owning the data/memory.
3847 * """
3848 * return PyArray_BASE(self) # <<<<<<<<<<<<<<
3849 *
3850 * @property
3851*/
3852 {
3853
3854 __pyx_r = PyArray_BASE(__pyx_v_self);
3855 }
3856 goto __pyx_L0;
3857
3858 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":335
3859 * # Instead, we use properties that map to the corresponding C-API functions.
3860 *
3861 * @property # <<<<<<<<<<<<<<
3862 * cdef inline PyObject* base(self) noexcept nogil:
3863 * """Returns a borrowed reference to the object owning the data/memory.
3864*/
3865
3866 /* function exit code */
3867 __pyx_L0:;
3868 return __pyx_r;
3869}
3870
3871/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":341
3872 * return PyArray_BASE(self)
3873 *
3874 * @property # <<<<<<<<<<<<<<
3875 * cdef inline dtype descr(self):
3876 * """Returns an owned reference to the dtype of the array.
3877*/
3878
3879static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self) {
3880 PyArray_Descr *__pyx_r = NULL;
3881 __Pyx_RefNannyDeclarations
3882 PyArray_Descr *__pyx_t_1;
3883 __Pyx_RefNannySetupContext("__get__", 0);
3884
3885 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":345
3886 * """Returns an owned reference to the dtype of the array.
3887 * """
3888 * return <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
3889 *
3890 * @property
3891*/
3892 __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
3893
3894 {
3895 PyArray_Descr *__pyx_temp;
3896 {
3897 __pyx_temp = __pyx_r;
3898 __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
3899 __pyx_r = ((PyArray_Descr *)__pyx_t_1);
3900 }
3901 __Pyx_XDECREF((PyObject *)__pyx_temp);
3902 }
3903
3904 goto __pyx_L0;
3905
3906 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":341
3907 * return PyArray_BASE(self)
3908 *
3909 * @property # <<<<<<<<<<<<<<
3910 * cdef inline dtype descr(self):
3911 * """Returns an owned reference to the dtype of the array.
3912*/
3913
3914 /* function exit code */
3915 __pyx_L0:;
3916 __Pyx_XGIVEREF((PyObject *)__pyx_r);
3917 __Pyx_RefNannyFinishContext();
3918 return __pyx_r;
3919}
3920
3921/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":347
3922 * return <dtype>PyArray_DESCR(self)
3923 *
3924 * @property # <<<<<<<<<<<<<<
3925 * cdef inline int ndim(self) noexcept nogil:
3926 * """Returns the number of dimensions in the array.
3927*/
3928
3929static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self) {
3930 int __pyx_r;
3931
3932 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":351
3933 * """Returns the number of dimensions in the array.
3934 * """
3935 * return PyArray_NDIM(self) # <<<<<<<<<<<<<<
3936 *
3937 * @property
3938*/
3939 {
3940
3941 __pyx_r = PyArray_NDIM(__pyx_v_self);
3942 }
3943 goto __pyx_L0;
3944
3945 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":347
3946 * return <dtype>PyArray_DESCR(self)
3947 *
3948 * @property # <<<<<<<<<<<<<<
3949 * cdef inline int ndim(self) noexcept nogil:
3950 * """Returns the number of dimensions in the array.
3951*/
3952
3953 /* function exit code */
3954 __pyx_L0:;
3955 return __pyx_r;
3956}
3957
3958/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":353
3959 * return PyArray_NDIM(self)
3960 *
3961 * @property # <<<<<<<<<<<<<<
3962 * cdef inline npy_intp *shape(self) noexcept nogil:
3963 * """Returns a pointer to the dimensions/shape of the array.
3964*/
3965
3966static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self) {
3967 npy_intp *__pyx_r;
3968
3969 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":359
3970 * Can return NULL for 0-dimensional arrays.
3971 * """
3972 * return PyArray_DIMS(self) # <<<<<<<<<<<<<<
3973 *
3974 * @property
3975*/
3976 {
3977
3978 __pyx_r = PyArray_DIMS(__pyx_v_self);
3979 }
3980 goto __pyx_L0;
3981
3982 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":353
3983 * return PyArray_NDIM(self)
3984 *
3985 * @property # <<<<<<<<<<<<<<
3986 * cdef inline npy_intp *shape(self) noexcept nogil:
3987 * """Returns a pointer to the dimensions/shape of the array.
3988*/
3989
3990 /* function exit code */
3991 __pyx_L0:;
3992 return __pyx_r;
3993}
3994
3995/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":361
3996 * return PyArray_DIMS(self)
3997 *
3998 * @property # <<<<<<<<<<<<<<
3999 * cdef inline npy_intp *strides(self) noexcept nogil:
4000 * """Returns a pointer to the strides of the array.
4001*/
4002
4003static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self) {
4004 npy_intp *__pyx_r;
4005
4006 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":366
4007 * The number of elements matches the number of dimensions of the array (ndim).
4008 * """
4009 * return PyArray_STRIDES(self) # <<<<<<<<<<<<<<
4010 *
4011 * @property
4012*/
4013 {
4014
4015 __pyx_r = PyArray_STRIDES(__pyx_v_self);
4016 }
4017 goto __pyx_L0;
4018
4019 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":361
4020 * return PyArray_DIMS(self)
4021 *
4022 * @property # <<<<<<<<<<<<<<
4023 * cdef inline npy_intp *strides(self) noexcept nogil:
4024 * """Returns a pointer to the strides of the array.
4025*/
4026
4027 /* function exit code */
4028 __pyx_L0:;
4029 return __pyx_r;
4030}
4031
4032/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":368
4033 * return PyArray_STRIDES(self)
4034 *
4035 * @property # <<<<<<<<<<<<<<
4036 * cdef inline npy_intp size(self) noexcept nogil:
4037 * """Returns the total size (in number of elements) of the array.
4038*/
4039
4040static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self) {
4041 npy_intp __pyx_r;
4042
4043 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":372
4044 * """Returns the total size (in number of elements) of the array.
4045 * """
4046 * return PyArray_SIZE(self) # <<<<<<<<<<<<<<
4047 *
4048 * @property
4049*/
4050 {
4051
4052 __pyx_r = PyArray_SIZE(__pyx_v_self);
4053 }
4054 goto __pyx_L0;
4055
4056 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":368
4057 * return PyArray_STRIDES(self)
4058 *
4059 * @property # <<<<<<<<<<<<<<
4060 * cdef inline npy_intp size(self) noexcept nogil:
4061 * """Returns the total size (in number of elements) of the array.
4062*/
4063
4064 /* function exit code */
4065 __pyx_L0:;
4066 return __pyx_r;
4067}
4068
4069/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":374
4070 * return PyArray_SIZE(self)
4071 *
4072 * @property # <<<<<<<<<<<<<<
4073 * cdef inline char* data(self) noexcept nogil:
4074 * """The pointer to the data buffer as a char*.
4075*/
4076
4077static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self) {
4078 char *__pyx_r;
4079
4080 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":381
4081 * of `PyArray_DATA()` instead, which returns a 'void*'.
4082 * """
4083 * return PyArray_BYTES(self) # <<<<<<<<<<<<<<
4084 *
4085 *
4086*/
4087 {
4088
4089 __pyx_r = PyArray_BYTES(__pyx_v_self);
4090 }
4091 goto __pyx_L0;
4092
4093 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":374
4094 * return PyArray_SIZE(self)
4095 *
4096 * @property # <<<<<<<<<<<<<<
4097 * cdef inline char* data(self) noexcept nogil:
4098 * """The pointer to the data buffer as a char*.
4099*/
4100
4101 /* function exit code */
4102 __pyx_L0:;
4103 return __pyx_r;
4104}
4105
4106/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":794
4107 * ctypedef long double complex clongdouble_t
4108 *
4109 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
4110 * return PyArray_MultiIterNew(1, <void*>a)
4111 *
4112*/
4113
4114static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
4115 PyObject *__pyx_r = NULL;
4116 __Pyx_RefNannyDeclarations
4117 PyObject *__pyx_t_1 = NULL;
4118 int __pyx_lineno = 0;
4119 const char *__pyx_filename = NULL;
4120 int __pyx_clineno = 0;
4121 __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
4122
4123 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":795
4124 *
4125 * cdef inline object PyArray_MultiIterNew1(a):
4126 * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
4127 *
4128 * cdef inline object PyArray_MultiIterNew2(a, b):
4129*/
4130 __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 795, __pyx_L1_error)
4131 __Pyx_GOTREF(__pyx_t_1);
4132 {
4133 PyObject *__pyx_temp;
4134 {
4135 __pyx_temp = __pyx_r;
4136 __pyx_r = __pyx_t_1;
4137 }
4138 __Pyx_XDECREF(__pyx_temp);
4139 }
4140 __pyx_t_1 = 0;
4141 goto __pyx_L0;
4142
4143 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":794
4144 * ctypedef long double complex clongdouble_t
4145 *
4146 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
4147 * return PyArray_MultiIterNew(1, <void*>a)
4148 *
4149*/
4150
4151 /* function exit code */
4152 __pyx_L1_error:;
4153 __Pyx_XDECREF(__pyx_t_1);
4154 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
4155 __pyx_r = 0;
4156 __pyx_L0:;
4157 __Pyx_XGIVEREF(__pyx_r);
4158 __Pyx_RefNannyFinishContext();
4159 return __pyx_r;
4160}
4161
4162/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":797
4163 * return PyArray_MultiIterNew(1, <void*>a)
4164 *
4165 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
4166 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4167 *
4168*/
4169
4170static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
4171 PyObject *__pyx_r = NULL;
4172 __Pyx_RefNannyDeclarations
4173 PyObject *__pyx_t_1 = NULL;
4174 int __pyx_lineno = 0;
4175 const char *__pyx_filename = NULL;
4176 int __pyx_clineno = 0;
4177 __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
4178
4179 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":798
4180 *
4181 * cdef inline object PyArray_MultiIterNew2(a, b):
4182 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
4183 *
4184 * cdef inline object PyArray_MultiIterNew3(a, b, c):
4185*/
4186 __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)
4187 __Pyx_GOTREF(__pyx_t_1);
4188 {
4189 PyObject *__pyx_temp;
4190 {
4191 __pyx_temp = __pyx_r;
4192 __pyx_r = __pyx_t_1;
4193 }
4194 __Pyx_XDECREF(__pyx_temp);
4195 }
4196 __pyx_t_1 = 0;
4197 goto __pyx_L0;
4198
4199 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":797
4200 * return PyArray_MultiIterNew(1, <void*>a)
4201 *
4202 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
4203 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4204 *
4205*/
4206
4207 /* function exit code */
4208 __pyx_L1_error:;
4209 __Pyx_XDECREF(__pyx_t_1);
4210 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
4211 __pyx_r = 0;
4212 __pyx_L0:;
4213 __Pyx_XGIVEREF(__pyx_r);
4214 __Pyx_RefNannyFinishContext();
4215 return __pyx_r;
4216}
4217
4218/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":800
4219 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4220 *
4221 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4222 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4223 *
4224*/
4225
4226static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
4227 PyObject *__pyx_r = NULL;
4228 __Pyx_RefNannyDeclarations
4229 PyObject *__pyx_t_1 = NULL;
4230 int __pyx_lineno = 0;
4231 const char *__pyx_filename = NULL;
4232 int __pyx_clineno = 0;
4233 __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
4234
4235 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":801
4236 *
4237 * cdef inline object PyArray_MultiIterNew3(a, b, c):
4238 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
4239 *
4240 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4241*/
4242 __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)
4243 __Pyx_GOTREF(__pyx_t_1);
4244 {
4245 PyObject *__pyx_temp;
4246 {
4247 __pyx_temp = __pyx_r;
4248 __pyx_r = __pyx_t_1;
4249 }
4250 __Pyx_XDECREF(__pyx_temp);
4251 }
4252 __pyx_t_1 = 0;
4253 goto __pyx_L0;
4254
4255 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":800
4256 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4257 *
4258 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4259 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4260 *
4261*/
4262
4263 /* function exit code */
4264 __pyx_L1_error:;
4265 __Pyx_XDECREF(__pyx_t_1);
4266 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4267 __pyx_r = 0;
4268 __pyx_L0:;
4269 __Pyx_XGIVEREF(__pyx_r);
4270 __Pyx_RefNannyFinishContext();
4271 return __pyx_r;
4272}
4273
4274/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":803
4275 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4276 *
4277 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4278 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4279 *
4280*/
4281
4282static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
4283 PyObject *__pyx_r = NULL;
4284 __Pyx_RefNannyDeclarations
4285 PyObject *__pyx_t_1 = NULL;
4286 int __pyx_lineno = 0;
4287 const char *__pyx_filename = NULL;
4288 int __pyx_clineno = 0;
4289 __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
4290
4291 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":804
4292 *
4293 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4294 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
4295 *
4296 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4297*/
4298 __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)
4299 __Pyx_GOTREF(__pyx_t_1);
4300 {
4301 PyObject *__pyx_temp;
4302 {
4303 __pyx_temp = __pyx_r;
4304 __pyx_r = __pyx_t_1;
4305 }
4306 __Pyx_XDECREF(__pyx_temp);
4307 }
4308 __pyx_t_1 = 0;
4309 goto __pyx_L0;
4310
4311 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":803
4312 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4313 *
4314 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4315 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4316 *
4317*/
4318
4319 /* function exit code */
4320 __pyx_L1_error:;
4321 __Pyx_XDECREF(__pyx_t_1);
4322 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4323 __pyx_r = 0;
4324 __pyx_L0:;
4325 __Pyx_XGIVEREF(__pyx_r);
4326 __Pyx_RefNannyFinishContext();
4327 return __pyx_r;
4328}
4329
4330/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":806
4331 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4332 *
4333 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4334 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4335 *
4336*/
4337
4338static 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) {
4339 PyObject *__pyx_r = NULL;
4340 __Pyx_RefNannyDeclarations
4341 PyObject *__pyx_t_1 = NULL;
4342 int __pyx_lineno = 0;
4343 const char *__pyx_filename = NULL;
4344 int __pyx_clineno = 0;
4345 __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
4346
4347 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":807
4348 *
4349 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4350 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
4351 *
4352 * cdef inline tuple PyDataType_SHAPE(dtype d):
4353*/
4354 __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)
4355 __Pyx_GOTREF(__pyx_t_1);
4356 {
4357 PyObject *__pyx_temp;
4358 {
4359 __pyx_temp = __pyx_r;
4360 __pyx_r = __pyx_t_1;
4361 }
4362 __Pyx_XDECREF(__pyx_temp);
4363 }
4364 __pyx_t_1 = 0;
4365 goto __pyx_L0;
4366
4367 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":806
4368 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4369 *
4370 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4371 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4372 *
4373*/
4374
4375 /* function exit code */
4376 __pyx_L1_error:;
4377 __Pyx_XDECREF(__pyx_t_1);
4378 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4379 __pyx_r = 0;
4380 __pyx_L0:;
4381 __Pyx_XGIVEREF(__pyx_r);
4382 __Pyx_RefNannyFinishContext();
4383 return __pyx_r;
4384}
4385
4386/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":809
4387 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4388 *
4389 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4390 * if PyDataType_HASSUBARRAY(d):
4391 * return <tuple>d.subarray.shape
4392*/
4393
4394static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
4395 PyObject *__pyx_r = NULL;
4396 __Pyx_RefNannyDeclarations
4397 int __pyx_t_1;
4398 PyObject *__pyx_t_2;
4399 __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
4400
4401 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":810
4402 *
4403 * cdef inline tuple PyDataType_SHAPE(dtype d):
4404 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4405 * return <tuple>d.subarray.shape
4406 * else:
4407*/
4408 __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
4409
4410 if (__pyx_t_1) {
4411
4412
4413 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":811
4414 * cdef inline tuple PyDataType_SHAPE(dtype d):
4415 * if PyDataType_HASSUBARRAY(d):
4416 * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
4417 * else:
4418 * return ()
4419*/
4420 __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray___get__(__pyx_v_d)->shape;
4421
4422 {
4423 PyObject *__pyx_temp;
4424 {
4425 __pyx_temp = __pyx_r;
4426 __Pyx_INCREF(((PyObject*)__pyx_t_2));
4427 __pyx_r = ((PyObject*)__pyx_t_2);
4428 }
4429 __Pyx_XDECREF(__pyx_temp);
4430 }
4431
4432 goto __pyx_L0;
4433
4434 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":810
4435 *
4436 * cdef inline tuple PyDataType_SHAPE(dtype d):
4437 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4438 * return <tuple>d.subarray.shape
4439 * else:
4440*/
4441 }
4442
4443 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":813
4444 * return <tuple>d.subarray.shape
4445 * else:
4446 * return () # <<<<<<<<<<<<<<
4447 *
4448 *
4449*/
4450 /*else*/ {
4451 {
4452 PyObject *__pyx_temp;
4453 {
4454 __pyx_temp = __pyx_r;
4455 __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
4456 __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
4457 }
4458 __Pyx_XDECREF(__pyx_temp);
4459 }
4460 goto __pyx_L0;
4461 }
4462
4463 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":809
4464 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4465 *
4466 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4467 * if PyDataType_HASSUBARRAY(d):
4468 * return <tuple>d.subarray.shape
4469*/
4470
4471 /* function exit code */
4472 __pyx_L0:;
4473 __Pyx_XGIVEREF(__pyx_r);
4474 __Pyx_RefNannyFinishContext();
4475 return __pyx_r;
4476}
4477
4478/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":947
4479 *
4480 * ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
4481 * @property # <<<<<<<<<<<<<<
4482 * cdef inline int nin(self) noexcept nogil:
4483 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4484*/
4485
4486static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self) {
4487 int __pyx_r;
4488
4489 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":949
4490 * @property
4491 * cdef inline int nin(self) noexcept nogil:
4492 * return _PyUFuncObject_GET_ITEM_DATA(self).nin # <<<<<<<<<<<<<<
4493 *
4494 * @property
4495*/
4496 {
4497
4498 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nin;
4499 }
4500 goto __pyx_L0;
4501
4502 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":947
4503 *
4504 * ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
4505 * @property # <<<<<<<<<<<<<<
4506 * cdef inline int nin(self) noexcept nogil:
4507 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4508*/
4509
4510 /* function exit code */
4511 __pyx_L0:;
4512 return __pyx_r;
4513}
4514
4515/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":951
4516 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4517 *
4518 * @property # <<<<<<<<<<<<<<
4519 * cdef inline int nout(self) noexcept nogil:
4520 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4521*/
4522
4523static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self) {
4524 int __pyx_r;
4525
4526 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":953
4527 * @property
4528 * cdef inline int nout(self) noexcept nogil:
4529 * return _PyUFuncObject_GET_ITEM_DATA(self).nout # <<<<<<<<<<<<<<
4530 *
4531 * @property
4532*/
4533 {
4534
4535 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nout;
4536 }
4537 goto __pyx_L0;
4538
4539 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":951
4540 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4541 *
4542 * @property # <<<<<<<<<<<<<<
4543 * cdef inline int nout(self) noexcept nogil:
4544 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4545*/
4546
4547 /* function exit code */
4548 __pyx_L0:;
4549 return __pyx_r;
4550}
4551
4552/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":955
4553 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4554 *
4555 * @property # <<<<<<<<<<<<<<
4556 * cdef inline int nargs(self) noexcept nogil:
4557 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4558*/
4559
4560static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self) {
4561 int __pyx_r;
4562
4563 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":957
4564 * @property
4565 * cdef inline int nargs(self) noexcept nogil:
4566 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs # <<<<<<<<<<<<<<
4567 *
4568 * @property
4569*/
4570 {
4571
4572 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nargs;
4573 }
4574 goto __pyx_L0;
4575
4576 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":955
4577 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4578 *
4579 * @property # <<<<<<<<<<<<<<
4580 * cdef inline int nargs(self) noexcept nogil:
4581 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4582*/
4583
4584 /* function exit code */
4585 __pyx_L0:;
4586 return __pyx_r;
4587}
4588
4589/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":959
4590 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4591 *
4592 * @property # <<<<<<<<<<<<<<
4593 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4594 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4595*/
4596
4597static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self) {
4598 PyUFuncGenericFunction *__pyx_r;
4599
4600 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":961
4601 * @property
4602 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4603 * return _PyUFuncObject_GET_ITEM_DATA(self).functions # <<<<<<<<<<<<<<
4604 *
4605 * @property
4606*/
4607 {
4608
4609 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->functions;
4610 }
4611 goto __pyx_L0;
4612
4613 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":959
4614 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4615 *
4616 * @property # <<<<<<<<<<<<<<
4617 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4618 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4619*/
4620
4621 /* function exit code */
4622 __pyx_L0:;
4623 return __pyx_r;
4624}
4625
4626/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":963
4627 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4628 *
4629 * @property # <<<<<<<<<<<<<<
4630 * cdef inline void ** data(self) noexcept nogil:
4631 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4632*/
4633
4634static CYTHON_INLINE void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self) {
4635 void **__pyx_r;
4636
4637 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":965
4638 * @property
4639 * cdef inline void ** data(self) noexcept nogil:
4640 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data # <<<<<<<<<<<<<<
4641 *
4642 * @property
4643*/
4644 {
4645
4646 __pyx_r = ((void **)_PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->data);
4647 }
4648 goto __pyx_L0;
4649
4650 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":963
4651 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4652 *
4653 * @property # <<<<<<<<<<<<<<
4654 * cdef inline void ** data(self) noexcept nogil:
4655 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4656*/
4657
4658 /* function exit code */
4659 __pyx_L0:;
4660 return __pyx_r;
4661}
4662
4663/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":967
4664 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4665 *
4666 * @property # <<<<<<<<<<<<<<
4667 * cdef inline int ntypes(self) noexcept nogil:
4668 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4669*/
4670
4671static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self) {
4672 int __pyx_r;
4673
4674 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":969
4675 * @property
4676 * cdef inline int ntypes(self) noexcept nogil:
4677 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes # <<<<<<<<<<<<<<
4678 *
4679 * @property
4680*/
4681 {
4682
4683 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ntypes;
4684 }
4685 goto __pyx_L0;
4686
4687 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":967
4688 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4689 *
4690 * @property # <<<<<<<<<<<<<<
4691 * cdef inline int ntypes(self) noexcept nogil:
4692 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4693*/
4694
4695 /* function exit code */
4696 __pyx_L0:;
4697 return __pyx_r;
4698}
4699
4700/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":971
4701 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4702 *
4703 * @property # <<<<<<<<<<<<<<
4704 * cdef inline const char* name(self) noexcept nogil:
4705 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4706*/
4707
4708static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self) {
4709 char const *__pyx_r;
4710
4711 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":973
4712 * @property
4713 * cdef inline const char* name(self) noexcept nogil:
4714 * return _PyUFuncObject_GET_ITEM_DATA(self).name # <<<<<<<<<<<<<<
4715 *
4716 * @property
4717*/
4718 {
4719
4720 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->name;
4721 }
4722 goto __pyx_L0;
4723
4724 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":971
4725 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4726 *
4727 * @property # <<<<<<<<<<<<<<
4728 * cdef inline const char* name(self) noexcept nogil:
4729 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4730*/
4731
4732 /* function exit code */
4733 __pyx_L0:;
4734 return __pyx_r;
4735}
4736
4737/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":975
4738 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4739 *
4740 * @property # <<<<<<<<<<<<<<
4741 * cdef inline const char* doc(self) noexcept nogil:
4742 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
4743*/
4744
4745static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self) {
4746 char const *__pyx_r;
4747
4748 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":977
4749 * @property
4750 * cdef inline const char* doc(self) noexcept nogil:
4751 * return _PyUFuncObject_GET_ITEM_DATA(self).doc # <<<<<<<<<<<<<<
4752 *
4753 * @property
4754*/
4755 {
4756
4757 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->doc;
4758 }
4759 goto __pyx_L0;
4760
4761 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":975
4762 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4763 *
4764 * @property # <<<<<<<<<<<<<<
4765 * cdef inline const char* doc(self) noexcept nogil:
4766 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
4767*/
4768
4769 /* function exit code */
4770 __pyx_L0:;
4771 return __pyx_r;
4772}
4773
4774/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":979
4775 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
4776 *
4777 * @property # <<<<<<<<<<<<<<
4778 * cdef inline void* ptr(self) noexcept nogil:
4779 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
4780*/
4781
4782static CYTHON_INLINE void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self) {
4783 void *__pyx_r;
4784
4785 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":981
4786 * @property
4787 * cdef inline void* ptr(self) noexcept nogil:
4788 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr # <<<<<<<<<<<<<<
4789 *
4790 * @property
4791*/
4792 {
4793
4794 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ptr;
4795 }
4796 goto __pyx_L0;
4797
4798 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":979
4799 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
4800 *
4801 * @property # <<<<<<<<<<<<<<
4802 * cdef inline void* ptr(self) noexcept nogil:
4803 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
4804*/
4805
4806 /* function exit code */
4807 __pyx_L0:;
4808 return __pyx_r;
4809}
4810
4811/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":983
4812 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
4813 *
4814 * @property # <<<<<<<<<<<<<<
4815 * cdef inline PyObject* obj(self) noexcept nogil:
4816 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
4817*/
4818
4819static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self) {
4820 PyObject *__pyx_r;
4821
4822 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":985
4823 * @property
4824 * cdef inline PyObject* obj(self) noexcept nogil:
4825 * return _PyUFuncObject_GET_ITEM_DATA(self).obj # <<<<<<<<<<<<<<
4826 *
4827 * @property
4828*/
4829 {
4830
4831 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->obj;
4832 }
4833 goto __pyx_L0;
4834
4835 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":983
4836 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
4837 *
4838 * @property # <<<<<<<<<<<<<<
4839 * cdef inline PyObject* obj(self) noexcept nogil:
4840 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
4841*/
4842
4843 /* function exit code */
4844 __pyx_L0:;
4845 return __pyx_r;
4846}
4847
4848/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":987
4849 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
4850 *
4851 * @property # <<<<<<<<<<<<<<
4852 * cdef inline PyObject* userloops(self) noexcept nogil:
4853 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops
4854*/
4855
4856static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self) {
4857 PyObject *__pyx_r;
4858
4859 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":989
4860 * @property
4861 * cdef inline PyObject* userloops(self) noexcept nogil:
4862 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops # <<<<<<<<<<<<<<
4863 *
4864 * PyUFuncObject_fields *_PyUFuncObject_GET_ITEM_DATA(ufunc) nogil
4865*/
4866 {
4867
4868 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->userloops;
4869 }
4870 goto __pyx_L0;
4871
4872 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":987
4873 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
4874 *
4875 * @property # <<<<<<<<<<<<<<
4876 * cdef inline PyObject* userloops(self) noexcept nogil:
4877 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops
4878*/
4879
4880 /* function exit code */
4881 __pyx_L0:;
4882 return __pyx_r;
4883}
4884
4885/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1065
4886 * int _import_umath() except -1
4887 *
4888 * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
4889 * Py_INCREF(base) # important to do this before stealing the reference below!
4890 * PyArray_SetBaseObject(arr, base)
4891*/
4892
4893static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
4894 int __pyx_t_1;
4895 int __pyx_lineno = 0;
4896 const char *__pyx_filename = NULL;
4897 int __pyx_clineno = 0;
4898
4899 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1066
4900 *
4901 * cdef inline void set_array_base(ndarray arr, object base) except *:
4902 * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
4903 * PyArray_SetBaseObject(arr, base)
4904 *
4905*/
4906 Py_INCREF(__pyx_v_base);
4907
4908 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1067
4909 * cdef inline void set_array_base(ndarray arr, object base) except *:
4910 * Py_INCREF(base) # important to do this before stealing the reference below!
4911 * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
4912 *
4913 * cdef inline object get_array_base(ndarray arr):
4914*/
4915 __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)
4916
4917
4918 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1065
4919 * int _import_umath() except -1
4920 *
4921 * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
4922 * Py_INCREF(base) # important to do this before stealing the reference below!
4923 * PyArray_SetBaseObject(arr, base)
4924*/
4925
4926 /* function exit code */
4927 goto __pyx_L0;
4928 __pyx_L1_error:;
4929 __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
4930 __pyx_L0:;
4931
4932}
4933
4934/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1069
4935 * PyArray_SetBaseObject(arr, base)
4936 *
4937 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
4938 * base = PyArray_BASE(arr)
4939 * if base is NULL:
4940*/
4941
4942static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
4943 PyObject *__pyx_v_base;
4944 PyObject *__pyx_r = NULL;
4945 __Pyx_RefNannyDeclarations
4946 int __pyx_t_1;
4947 __Pyx_RefNannySetupContext("get_array_base", 0);
4948
4949 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1070
4950 *
4951 * cdef inline object get_array_base(ndarray arr):
4952 * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
4953 * if base is NULL:
4954 * return None
4955*/
4956 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
4957
4958 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1071
4959 * cdef inline object get_array_base(ndarray arr):
4960 * base = PyArray_BASE(arr)
4961 * if base is NULL: # <<<<<<<<<<<<<<
4962 * return None
4963 * return <object>base
4964*/
4965 __pyx_t_1 = (__pyx_v_base == NULL);
4966
4967 if (__pyx_t_1) {
4968
4969
4970 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1072
4971 * base = PyArray_BASE(arr)
4972 * if base is NULL:
4973 * return None # <<<<<<<<<<<<<<
4974 * return <object>base
4975 *
4976*/
4977 {
4978 PyObject *__pyx_temp;
4979 {
4980 __pyx_temp = __pyx_r;
4981 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4982 }
4983 __Pyx_XDECREF(__pyx_temp);
4984 }
4985 goto __pyx_L0;
4986
4987 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1071
4988 * cdef inline object get_array_base(ndarray arr):
4989 * base = PyArray_BASE(arr)
4990 * if base is NULL: # <<<<<<<<<<<<<<
4991 * return None
4992 * return <object>base
4993*/
4994 }
4995
4996 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1073
4997 * if base is NULL:
4998 * return None
4999 * return <object>base # <<<<<<<<<<<<<<
5000 *
5001 * # Versions of the import_* functions which are more suitable for
5002*/
5003 {
5004 PyObject *__pyx_temp;
5005 {
5006 __pyx_temp = __pyx_r;
5007 __Pyx_INCREF(((PyObject *)__pyx_v_base));
5008 __pyx_r = ((PyObject *)__pyx_v_base);
5009 }
5010 __Pyx_XDECREF(__pyx_temp);
5011 }
5012 goto __pyx_L0;
5013
5014 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1069
5015 * PyArray_SetBaseObject(arr, base)
5016 *
5017 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
5018 * base = PyArray_BASE(arr)
5019 * if base is NULL:
5020*/
5021
5022 /* function exit code */
5023 __pyx_L0:;
5024
5025 __Pyx_XGIVEREF(__pyx_r);
5026 __Pyx_RefNannyFinishContext();
5027 return __pyx_r;
5028}
5029
5030/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1077
5031 * # Versions of the import_* functions which are more suitable for
5032 * # Cython code.
5033 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5034 * try:
5035 * __pyx_import_array()
5036*/
5037
5038static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
5039 int __pyx_r;
5040 __Pyx_RefNannyDeclarations
5041 PyObject *__pyx_t_1 = NULL;
5042 PyObject *__pyx_t_2 = NULL;
5043 PyObject *__pyx_t_3 = NULL;
5044 int __pyx_t_4;
5045 PyObject *__pyx_t_5 = NULL;
5046 PyObject *__pyx_t_6 = NULL;
5047 PyObject *__pyx_t_7 = NULL;
5048 PyObject *__pyx_t_8 = NULL;
5049 PyObject *__pyx_t_9 = NULL;
5050 size_t __pyx_t_10;
5051 int __pyx_lineno = 0;
5052 const char *__pyx_filename = NULL;
5053 int __pyx_clineno = 0;
5054 __Pyx_RefNannySetupContext("import_array", 0);
5055
5056 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5057 * # Cython code.
5058 * cdef inline int import_array() except -1:
5059 * try: # <<<<<<<<<<<<<<
5060 * __pyx_import_array()
5061 * except Exception:
5062*/
5063 {
5064 __Pyx_PyThreadState_declare
5065 __Pyx_PyThreadState_assign
5066 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5067 __Pyx_XGOTREF(__pyx_t_1);
5068 __Pyx_XGOTREF(__pyx_t_2);
5069 __Pyx_XGOTREF(__pyx_t_3);
5070 /*try:*/ {
5071
5072 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1079
5073 * cdef inline int import_array() except -1:
5074 * try:
5075 * __pyx_import_array() # <<<<<<<<<<<<<<
5076 * except Exception:
5077 * raise ImportError("numpy._core.multiarray failed to import")
5078*/
5079 __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1079, __pyx_L3_error)
5080
5081
5082 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5083 * # Cython code.
5084 * cdef inline int import_array() except -1:
5085 * try: # <<<<<<<<<<<<<<
5086 * __pyx_import_array()
5087 * except Exception:
5088*/
5089 }
5090 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5091 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5092 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5093 goto __pyx_L8_try_end;
5094 __pyx_L3_error:;
5095
5096 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1080
5097 * try:
5098 * __pyx_import_array()
5099 * except Exception: # <<<<<<<<<<<<<<
5100 * raise ImportError("numpy._core.multiarray failed to import")
5101 *
5102*/
5103 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5104 if (__pyx_t_4) {
5105 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5106 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1080, __pyx_L5_except_error)
5107 __Pyx_XGOTREF(__pyx_t_5);
5108 __Pyx_XGOTREF(__pyx_t_6);
5109 __Pyx_XGOTREF(__pyx_t_7);
5110
5111 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1081
5112 * __pyx_import_array()
5113 * except Exception:
5114 * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<<
5115 *
5116 * cdef inline int import_umath() except -1:
5117*/
5118 __pyx_t_9 = NULL;
5119 __pyx_t_10 = 1;
5120 {
5121 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to};
5122 __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));
5123 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5124 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1081, __pyx_L5_except_error)
5125 __Pyx_GOTREF(__pyx_t_8);
5126 }
5127 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5128 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5129 __PYX_ERR(1, 1081, __pyx_L5_except_error)
5130 }
5131 goto __pyx_L5_except_error;
5132
5133 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5134 * # Cython code.
5135 * cdef inline int import_array() except -1:
5136 * try: # <<<<<<<<<<<<<<
5137 * __pyx_import_array()
5138 * except Exception:
5139*/
5140 __pyx_L5_except_error:;
5141 __Pyx_XGIVEREF(__pyx_t_1);
5142 __Pyx_XGIVEREF(__pyx_t_2);
5143 __Pyx_XGIVEREF(__pyx_t_3);
5144 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5145 goto __pyx_L1_error;
5146 __pyx_L8_try_end:;
5147 }
5148
5149 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1077
5150 * # Versions of the import_* functions which are more suitable for
5151 * # Cython code.
5152 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5153 * try:
5154 * __pyx_import_array()
5155*/
5156
5157 /* function exit code */
5158 __pyx_r = 0;
5159 goto __pyx_L0;
5160 __pyx_L1_error:;
5161 __Pyx_XDECREF(__pyx_t_5);
5162 __Pyx_XDECREF(__pyx_t_6);
5163 __Pyx_XDECREF(__pyx_t_7);
5164 __Pyx_XDECREF(__pyx_t_8);
5165 __Pyx_XDECREF(__pyx_t_9);
5166 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5167 __pyx_r = -1;
5168 __pyx_L0:;
5169
5170 __Pyx_RefNannyFinishContext();
5171 return __pyx_r;
5172}
5173
5174/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1083
5175 * raise ImportError("numpy._core.multiarray failed to import")
5176 *
5177 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5178 * try:
5179 * _import_umath()
5180*/
5181
5182static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
5183 int __pyx_r;
5184 __Pyx_RefNannyDeclarations
5185 PyObject *__pyx_t_1 = NULL;
5186 PyObject *__pyx_t_2 = NULL;
5187 PyObject *__pyx_t_3 = NULL;
5188 int __pyx_t_4;
5189 PyObject *__pyx_t_5 = NULL;
5190 PyObject *__pyx_t_6 = NULL;
5191 PyObject *__pyx_t_7 = NULL;
5192 PyObject *__pyx_t_8 = NULL;
5193 PyObject *__pyx_t_9 = NULL;
5194 size_t __pyx_t_10;
5195 int __pyx_lineno = 0;
5196 const char *__pyx_filename = NULL;
5197 int __pyx_clineno = 0;
5198 __Pyx_RefNannySetupContext("import_umath", 0);
5199
5200 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5201 *
5202 * cdef inline int import_umath() except -1:
5203 * try: # <<<<<<<<<<<<<<
5204 * _import_umath()
5205 * except Exception:
5206*/
5207 {
5208 __Pyx_PyThreadState_declare
5209 __Pyx_PyThreadState_assign
5210 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5211 __Pyx_XGOTREF(__pyx_t_1);
5212 __Pyx_XGOTREF(__pyx_t_2);
5213 __Pyx_XGOTREF(__pyx_t_3);
5214 /*try:*/ {
5215
5216 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1085
5217 * cdef inline int import_umath() except -1:
5218 * try:
5219 * _import_umath() # <<<<<<<<<<<<<<
5220 * except Exception:
5221 * raise ImportError("numpy._core.umath failed to import")
5222*/
5223 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1085, __pyx_L3_error)
5224
5225
5226 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5227 *
5228 * cdef inline int import_umath() except -1:
5229 * try: # <<<<<<<<<<<<<<
5230 * _import_umath()
5231 * except Exception:
5232*/
5233 }
5234 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5235 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5236 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5237 goto __pyx_L8_try_end;
5238 __pyx_L3_error:;
5239
5240 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1086
5241 * try:
5242 * _import_umath()
5243 * except Exception: # <<<<<<<<<<<<<<
5244 * raise ImportError("numpy._core.umath failed to import")
5245 *
5246*/
5247 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5248 if (__pyx_t_4) {
5249 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5250 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1086, __pyx_L5_except_error)
5251 __Pyx_XGOTREF(__pyx_t_5);
5252 __Pyx_XGOTREF(__pyx_t_6);
5253 __Pyx_XGOTREF(__pyx_t_7);
5254
5255 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1087
5256 * _import_umath()
5257 * except Exception:
5258 * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
5259 *
5260 * cdef inline int import_ufunc() except -1:
5261*/
5262 __pyx_t_9 = NULL;
5263 __pyx_t_10 = 1;
5264 {
5265 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
5266 __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));
5267 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5268 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1087, __pyx_L5_except_error)
5269 __Pyx_GOTREF(__pyx_t_8);
5270 }
5271 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5272 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5273 __PYX_ERR(1, 1087, __pyx_L5_except_error)
5274 }
5275 goto __pyx_L5_except_error;
5276
5277 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5278 *
5279 * cdef inline int import_umath() except -1:
5280 * try: # <<<<<<<<<<<<<<
5281 * _import_umath()
5282 * except Exception:
5283*/
5284 __pyx_L5_except_error:;
5285 __Pyx_XGIVEREF(__pyx_t_1);
5286 __Pyx_XGIVEREF(__pyx_t_2);
5287 __Pyx_XGIVEREF(__pyx_t_3);
5288 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5289 goto __pyx_L1_error;
5290 __pyx_L8_try_end:;
5291 }
5292
5293 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1083
5294 * raise ImportError("numpy._core.multiarray failed to import")
5295 *
5296 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5297 * try:
5298 * _import_umath()
5299*/
5300
5301 /* function exit code */
5302 __pyx_r = 0;
5303 goto __pyx_L0;
5304 __pyx_L1_error:;
5305 __Pyx_XDECREF(__pyx_t_5);
5306 __Pyx_XDECREF(__pyx_t_6);
5307 __Pyx_XDECREF(__pyx_t_7);
5308 __Pyx_XDECREF(__pyx_t_8);
5309 __Pyx_XDECREF(__pyx_t_9);
5310 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5311 __pyx_r = -1;
5312 __pyx_L0:;
5313
5314 __Pyx_RefNannyFinishContext();
5315 return __pyx_r;
5316}
5317
5318/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1089
5319 * raise ImportError("numpy._core.umath failed to import")
5320 *
5321 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5322 * try:
5323 * _import_umath()
5324*/
5325
5326static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
5327 int __pyx_r;
5328 __Pyx_RefNannyDeclarations
5329 PyObject *__pyx_t_1 = NULL;
5330 PyObject *__pyx_t_2 = NULL;
5331 PyObject *__pyx_t_3 = NULL;
5332 int __pyx_t_4;
5333 PyObject *__pyx_t_5 = NULL;
5334 PyObject *__pyx_t_6 = NULL;
5335 PyObject *__pyx_t_7 = NULL;
5336 PyObject *__pyx_t_8 = NULL;
5337 PyObject *__pyx_t_9 = NULL;
5338 size_t __pyx_t_10;
5339 int __pyx_lineno = 0;
5340 const char *__pyx_filename = NULL;
5341 int __pyx_clineno = 0;
5342 __Pyx_RefNannySetupContext("import_ufunc", 0);
5343
5344 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5345 *
5346 * cdef inline int import_ufunc() except -1:
5347 * try: # <<<<<<<<<<<<<<
5348 * _import_umath()
5349 * except Exception:
5350*/
5351 {
5352 __Pyx_PyThreadState_declare
5353 __Pyx_PyThreadState_assign
5354 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5355 __Pyx_XGOTREF(__pyx_t_1);
5356 __Pyx_XGOTREF(__pyx_t_2);
5357 __Pyx_XGOTREF(__pyx_t_3);
5358 /*try:*/ {
5359
5360 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1091
5361 * cdef inline int import_ufunc() except -1:
5362 * try:
5363 * _import_umath() # <<<<<<<<<<<<<<
5364 * except Exception:
5365 * raise ImportError("numpy._core.umath failed to import")
5366*/
5367 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1091, __pyx_L3_error)
5368
5369
5370 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5371 *
5372 * cdef inline int import_ufunc() except -1:
5373 * try: # <<<<<<<<<<<<<<
5374 * _import_umath()
5375 * except Exception:
5376*/
5377 }
5378 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5379 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5380 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5381 goto __pyx_L8_try_end;
5382 __pyx_L3_error:;
5383
5384 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1092
5385 * try:
5386 * _import_umath()
5387 * except Exception: # <<<<<<<<<<<<<<
5388 * raise ImportError("numpy._core.umath failed to import")
5389 *
5390*/
5391 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5392 if (__pyx_t_4) {
5393 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5394 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1092, __pyx_L5_except_error)
5395 __Pyx_XGOTREF(__pyx_t_5);
5396 __Pyx_XGOTREF(__pyx_t_6);
5397 __Pyx_XGOTREF(__pyx_t_7);
5398
5399 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1093
5400 * _import_umath()
5401 * except Exception:
5402 * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
5403 *
5404 *
5405*/
5406 __pyx_t_9 = NULL;
5407 __pyx_t_10 = 1;
5408 {
5409 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
5410 __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));
5411 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5412 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1093, __pyx_L5_except_error)
5413 __Pyx_GOTREF(__pyx_t_8);
5414 }
5415 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5416 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5417 __PYX_ERR(1, 1093, __pyx_L5_except_error)
5418 }
5419 goto __pyx_L5_except_error;
5420
5421 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5422 *
5423 * cdef inline int import_ufunc() except -1:
5424 * try: # <<<<<<<<<<<<<<
5425 * _import_umath()
5426 * except Exception:
5427*/
5428 __pyx_L5_except_error:;
5429 __Pyx_XGIVEREF(__pyx_t_1);
5430 __Pyx_XGIVEREF(__pyx_t_2);
5431 __Pyx_XGIVEREF(__pyx_t_3);
5432 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5433 goto __pyx_L1_error;
5434 __pyx_L8_try_end:;
5435 }
5436
5437 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1089
5438 * raise ImportError("numpy._core.umath failed to import")
5439 *
5440 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5441 * try:
5442 * _import_umath()
5443*/
5444
5445 /* function exit code */
5446 __pyx_r = 0;
5447 goto __pyx_L0;
5448 __pyx_L1_error:;
5449 __Pyx_XDECREF(__pyx_t_5);
5450 __Pyx_XDECREF(__pyx_t_6);
5451 __Pyx_XDECREF(__pyx_t_7);
5452 __Pyx_XDECREF(__pyx_t_8);
5453 __Pyx_XDECREF(__pyx_t_9);
5454 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5455 __pyx_r = -1;
5456 __pyx_L0:;
5457
5458 __Pyx_RefNannyFinishContext();
5459 return __pyx_r;
5460}
5461
5462/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1096
5463 *
5464 *
5465 * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5466 * """
5467 * Cython equivalent of `isinstance(obj, np.timedelta64)`
5468*/
5469
5470static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
5471 int __pyx_r;
5472
5473 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1108
5474 * bool
5475 * """
5476 * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
5477 *
5478 *
5479*/
5480 {
5481
5482 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
5483 }
5484 goto __pyx_L0;
5485
5486 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1096
5487 *
5488 *
5489 * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5490 * """
5491 * Cython equivalent of `isinstance(obj, np.timedelta64)`
5492*/
5493
5494 /* function exit code */
5495 __pyx_L0:;
5496
5497 return __pyx_r;
5498}
5499
5500/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1111
5501 *
5502 *
5503 * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5504 * """
5505 * Cython equivalent of `isinstance(obj, np.datetime64)`
5506*/
5507
5508static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
5509 int __pyx_r;
5510
5511 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1123
5512 * bool
5513 * """
5514 * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
5515 *
5516 *
5517*/
5518 {
5519
5520 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
5521 }
5522 goto __pyx_L0;
5523
5524 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1111
5525 *
5526 *
5527 * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5528 * """
5529 * Cython equivalent of `isinstance(obj, np.datetime64)`
5530*/
5531
5532 /* function exit code */
5533 __pyx_L0:;
5534
5535 return __pyx_r;
5536}
5537
5538/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1126
5539 *
5540 *
5541 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5542 * """
5543 * returns the int64 value underlying scalar numpy datetime64 object
5544*/
5545
5546static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
5547 npy_datetime __pyx_r;
5548
5549 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1133
5550 * also needed. That can be found using `get_datetime64_unit`.
5551 * """
5552 * return _PyDatetimeScalarObject_GetValue(obj) # <<<<<<<<<<<<<<
5553 *
5554 *
5555*/
5556 {
5557
5558 __pyx_r = _PyDatetimeScalarObject_GetValue(__pyx_v_obj);
5559 }
5560 goto __pyx_L0;
5561
5562 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1126
5563 *
5564 *
5565 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5566 * """
5567 * returns the int64 value underlying scalar numpy datetime64 object
5568*/
5569
5570 /* function exit code */
5571 __pyx_L0:;
5572 return __pyx_r;
5573}
5574
5575/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1136
5576 *
5577 *
5578 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5579 * """
5580 * returns the int64 value underlying scalar numpy timedelta64 object
5581*/
5582
5583static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
5584 npy_timedelta __pyx_r;
5585
5586 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1140
5587 * returns the int64 value underlying scalar numpy timedelta64 object
5588 * """
5589 * return _PyTimedeltaScalarObject_GetValue(obj) # <<<<<<<<<<<<<<
5590 *
5591 *
5592*/
5593 {
5594
5595 __pyx_r = _PyTimedeltaScalarObject_GetValue(__pyx_v_obj);
5596 }
5597 goto __pyx_L0;
5598
5599 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1136
5600 *
5601 *
5602 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5603 * """
5604 * returns the int64 value underlying scalar numpy timedelta64 object
5605*/
5606
5607 /* function exit code */
5608 __pyx_L0:;
5609 return __pyx_r;
5610}
5611
5612/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1143
5613 *
5614 *
5615 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5616 * """
5617 * returns the unit part of the dtype for a numpy datetime64 object.
5618*/
5619
5620static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
5621 NPY_DATETIMEUNIT __pyx_r;
5622
5623 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1147
5624 * returns the unit part of the dtype for a numpy datetime64 object.
5625 * """
5626 * return _PyDatetimeScalarObject_GetMetadata(obj).base # <<<<<<<<<<<<<<
5627 *
5628 *
5629*/
5630 {
5631
5632 __pyx_r = _PyDatetimeScalarObject_GetMetadata(__pyx_v_obj).base;
5633 }
5634 goto __pyx_L0;
5635
5636 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1143
5637 *
5638 *
5639 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5640 * """
5641 * returns the unit part of the dtype for a numpy datetime64 object.
5642*/
5643
5644 /* function exit code */
5645 __pyx_L0:;
5646 return __pyx_r;
5647}
5648
5649/* "ctimeIntegration.pyx":144
5650 * double* Uout)
5651 * # ------------------------------------------- #
5652 * def psiTCtteDT(int nPoints, # <<<<<<<<<<<<<<
5653 * double tau,
5654 * double dtn,
5655*/
5656
5657/* Python wrapper */
5658static PyObject *__pyx_pw_16ctimeIntegration_1psiTCtteDT(PyObject *__pyx_self,
5659#if CYTHON_VECTORCALL
5660PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5661#else
5662PyObject *__pyx_args, PyObject *__pyx_kwds
5663#endif
5664); /*proto*/
5665static PyMethodDef __pyx_mdef_16ctimeIntegration_1psiTCtteDT = {"psiTCtteDT", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_1psiTCtteDT, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5666static PyObject *__pyx_pw_16ctimeIntegration_1psiTCtteDT(PyObject *__pyx_self,
5667#if CYTHON_VECTORCALL
5668PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5669#else
5670PyObject *__pyx_args, PyObject *__pyx_kwds
5671#endif
5672) {
5673 int __pyx_v_nPoints;
5674 double __pyx_v_tau;
5675 double __pyx_v_dtn;
5676 double __pyx_v_dtnm1;
5677 PyArrayObject *__pyx_v_yn = 0;
5678 PyArrayObject *__pyx_v_ypn = 0;
5679 PyArrayObject *__pyx_v_ypnm1 = 0;
5680 PyArrayObject *__pyx_v_dtnp1 = 0;
5681 #if !CYTHON_VECTORCALL
5682 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5683 #endif
5684 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5685 PyObject* values[8] = {0,0,0,0,0,0,0,0};
5686 int __pyx_lineno = 0;
5687 const char *__pyx_filename = NULL;
5688 int __pyx_clineno = 0;
5689 PyObject *__pyx_r = 0;
5690 __Pyx_RefNannyDeclarations
5691 __Pyx_RefNannySetupContext("psiTCtteDT (wrapper)", 0);
5692 #if !CYTHON_VECTORCALL
5693 #if CYTHON_ASSUME_SAFE_SIZE
5694 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5695 #else
5696 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
5697 #endif
5698 #endif
5699 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5700 {
5701 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nPoints,&__pyx_mstate_global->__pyx_n_u_tau,&__pyx_mstate_global->__pyx_n_u_dtn,&__pyx_mstate_global->__pyx_n_u_dtnm1,&__pyx_mstate_global->__pyx_n_u_yn,&__pyx_mstate_global->__pyx_n_u_ypn,&__pyx_mstate_global->__pyx_n_u_ypnm1,&__pyx_mstate_global->__pyx_n_u_dtnp1,0};
5702 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
5703 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 144, __pyx_L3_error)
5704 if (__pyx_kwds_len > 0) {
5705 switch (__pyx_nargs) {
5706 case 8:
5707 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
5708 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 144, __pyx_L3_error)
5709 CYTHON_FALLTHROUGH;
5710 case 7:
5711 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5712 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 144, __pyx_L3_error)
5713 CYTHON_FALLTHROUGH;
5714 case 6:
5715 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5716 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 144, __pyx_L3_error)
5717 CYTHON_FALLTHROUGH;
5718 case 5:
5719 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5720 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 144, __pyx_L3_error)
5721 CYTHON_FALLTHROUGH;
5722 case 4:
5723 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5724 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 144, __pyx_L3_error)
5725 CYTHON_FALLTHROUGH;
5726 case 3:
5727 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5728 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 144, __pyx_L3_error)
5729 CYTHON_FALLTHROUGH;
5730 case 2:
5731 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5732 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 144, __pyx_L3_error)
5733 CYTHON_FALLTHROUGH;
5734 case 1:
5735 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5736 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 144, __pyx_L3_error)
5737 CYTHON_FALLTHROUGH;
5738 case 0: break;
5739 default: goto __pyx_L5_argtuple_error;
5740 }
5741 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5742 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "psiTCtteDT", 0) < (0)) __PYX_ERR(0, 144, __pyx_L3_error)
5743 for (Py_ssize_t i = __pyx_nargs; i < 8; i++) {
5744 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, i); __PYX_ERR(0, 144, __pyx_L3_error) }
5745 }
5746 } else if (unlikely(__pyx_nargs != 8)) {
5747 goto __pyx_L5_argtuple_error;
5748 } else {
5749 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5750 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 144, __pyx_L3_error)
5751 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5752 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 144, __pyx_L3_error)
5753 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5754 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 144, __pyx_L3_error)
5755 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5756 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 144, __pyx_L3_error)
5757 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5758 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 144, __pyx_L3_error)
5759 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5760 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 144, __pyx_L3_error)
5761 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5762 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 144, __pyx_L3_error)
5763 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
5764 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 144, __pyx_L3_error)
5765 }
5766 __pyx_v_nPoints = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_nPoints == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L3_error)
5767 __pyx_v_tau = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_tau == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 145, __pyx_L3_error)
5768 __pyx_v_dtn = __Pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_dtn == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error)
5769 __pyx_v_dtnm1 = __Pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_dtnm1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
5770 __pyx_v_yn = ((PyArrayObject *)values[4]);
5771 __pyx_v_ypn = ((PyArrayObject *)values[5]);
5772 __pyx_v_ypnm1 = ((PyArrayObject *)values[6]);
5773 __pyx_v_dtnp1 = ((PyArrayObject *)values[7]);
5774 }
5775 goto __pyx_L6_skip;
5776 __pyx_L5_argtuple_error:;
5777 __Pyx_RaiseArgtupleInvalid("psiTCtteDT", 1, 8, 8, __pyx_nargs); __PYX_ERR(0, 144, __pyx_L3_error)
5778 __pyx_L6_skip:;
5779 goto __pyx_L4_argument_unpacking_done;
5780 __pyx_L3_error:;
5781 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5782 Py_XDECREF(values[__pyx_temp]);
5783 }
5784 __Pyx_AddTraceback("ctimeIntegration.psiTCtteDT", __pyx_clineno, __pyx_lineno, __pyx_filename);
5785 __Pyx_RefNannyFinishContext();
5786 return NULL;
5787 __pyx_L4_argument_unpacking_done:;
5788 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "yn", 0))) __PYX_ERR(0, 148, __pyx_L1_error)
5789 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ypn), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "ypn", 0))) __PYX_ERR(0, 149, __pyx_L1_error)
5790 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ypnm1), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "ypnm1", 0))) __PYX_ERR(0, 150, __pyx_L1_error)
5791 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtnp1), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "dtnp1", 0))) __PYX_ERR(0, 151, __pyx_L1_error)
5792 __pyx_r = __pyx_pf_16ctimeIntegration_psiTCtteDT(__pyx_self, __pyx_v_nPoints, __pyx_v_tau, __pyx_v_dtn, __pyx_v_dtnm1, __pyx_v_yn, __pyx_v_ypn, __pyx_v_ypnm1, __pyx_v_dtnp1);
5793
5794 /* function exit code */
5795 goto __pyx_L0;
5796 __pyx_L1_error:;
5797 __pyx_r = NULL;
5798 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5799 Py_XDECREF(values[__pyx_temp]);
5800 }
5801 goto __pyx_L7_cleaned_up;
5802 __pyx_L0:;
5803 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5804 Py_XDECREF(values[__pyx_temp]);
5805 }
5806 __pyx_L7_cleaned_up:;
5807
5808
5809
5810
5811 __Pyx_RefNannyFinishContext();
5812 return __pyx_r;
5813}
5814
5815static PyObject *__pyx_pf_16ctimeIntegration_psiTCtteDT(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nPoints, double __pyx_v_tau, double __pyx_v_dtn, double __pyx_v_dtnm1, PyArrayObject *__pyx_v_yn, PyArrayObject *__pyx_v_ypn, PyArrayObject *__pyx_v_ypnm1, PyArrayObject *__pyx_v_dtnp1) {
5816 PyObject *__pyx_r = NULL;
5817 __Pyx_RefNannyDeclarations
5818 __Pyx_RefNannySetupContext("psiTCtteDT", 0);
5819
5820 /* "ctimeIntegration.pyx":152
5821 * np.ndarray ypnm1,
5822 * np.ndarray dtnp1):
5823 * cpsiTCtteDT(nPoints, # <<<<<<<<<<<<<<
5824 * tau,
5825 * dtn,
5826*/
5827 psiTCtteDT(__pyx_v_nPoints, __pyx_v_tau, __pyx_v_dtn, __pyx_v_dtnm1, ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_yn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_ypn)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_ypnm1)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_dtnp1)));
5828
5829 /* "ctimeIntegration.pyx":144
5830 * double* Uout)
5831 * # ------------------------------------------- #
5832 * def psiTCtteDT(int nPoints, # <<<<<<<<<<<<<<
5833 * double tau,
5834 * double dtn,
5835*/
5836
5837 /* function exit code */
5838 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5839 __Pyx_XGIVEREF(__pyx_r);
5840 __Pyx_RefNannyFinishContext();
5841 return __pyx_r;
5842}
5843
5844/* "ctimeIntegration.pyx":161
5845 * <double*> dtnp1.data)
5846 *
5847 * def applyDGlimitingP1Lagrange1d(int limiterFlag, # <<<<<<<<<<<<<<
5848 * int nElements_global,
5849 * int nNodes_element,
5850*/
5851
5852/* Python wrapper */
5853static PyObject *__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d(PyObject *__pyx_self,
5854#if CYTHON_VECTORCALL
5855PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5856#else
5857PyObject *__pyx_args, PyObject *__pyx_kwds
5858#endif
5859); /*proto*/
5860static PyMethodDef __pyx_mdef_16ctimeIntegration_3applyDGlimitingP1Lagrange1d = {"applyDGlimitingP1Lagrange1d", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5861static PyObject *__pyx_pw_16ctimeIntegration_3applyDGlimitingP1Lagrange1d(PyObject *__pyx_self,
5862#if CYTHON_VECTORCALL
5863PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5864#else
5865PyObject *__pyx_args, PyObject *__pyx_kwds
5866#endif
5867) {
5868 int __pyx_v_limiterFlag;
5869 int __pyx_v_nElements_global;
5870 int __pyx_v_nNodes_element;
5871 int __pyx_v_nElementBoundaries_element;
5872 int __pyx_v_nDOF_element;
5873 PyArrayObject *__pyx_v_elementNodesArray = 0;
5874 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
5875 PyArrayObject *__pyx_v_nodeArray = 0;
5876 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
5877 PyArrayObject *__pyx_v_l2g = 0;
5878 PyArrayObject *__pyx_v_tag = 0;
5879 PyArrayObject *__pyx_v_Uin = 0;
5880 PyArrayObject *__pyx_v_Uout = 0;
5881 #if !CYTHON_VECTORCALL
5882 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5883 #endif
5884 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5885 PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
5886 int __pyx_lineno = 0;
5887 const char *__pyx_filename = NULL;
5888 int __pyx_clineno = 0;
5889 PyObject *__pyx_r = 0;
5890 __Pyx_RefNannyDeclarations
5891 __Pyx_RefNannySetupContext("applyDGlimitingP1Lagrange1d (wrapper)", 0);
5892 #if !CYTHON_VECTORCALL
5893 #if CYTHON_ASSUME_SAFE_SIZE
5894 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5895 #else
5896 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
5897 #endif
5898 #endif
5899 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5900 {
5901 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_limiterFlag,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
5902 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
5903 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 161, __pyx_L3_error)
5904 if (__pyx_kwds_len > 0) {
5905 switch (__pyx_nargs) {
5906 case 13:
5907 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
5908 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 161, __pyx_L3_error)
5909 CYTHON_FALLTHROUGH;
5910 case 12:
5911 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
5912 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 161, __pyx_L3_error)
5913 CYTHON_FALLTHROUGH;
5914 case 11:
5915 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
5916 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 161, __pyx_L3_error)
5917 CYTHON_FALLTHROUGH;
5918 case 10:
5919 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
5920 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 161, __pyx_L3_error)
5921 CYTHON_FALLTHROUGH;
5922 case 9:
5923 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
5924 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 161, __pyx_L3_error)
5925 CYTHON_FALLTHROUGH;
5926 case 8:
5927 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
5928 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 161, __pyx_L3_error)
5929 CYTHON_FALLTHROUGH;
5930 case 7:
5931 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5932 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 161, __pyx_L3_error)
5933 CYTHON_FALLTHROUGH;
5934 case 6:
5935 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5936 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 161, __pyx_L3_error)
5937 CYTHON_FALLTHROUGH;
5938 case 5:
5939 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5940 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 161, __pyx_L3_error)
5941 CYTHON_FALLTHROUGH;
5942 case 4:
5943 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5944 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 161, __pyx_L3_error)
5945 CYTHON_FALLTHROUGH;
5946 case 3:
5947 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5948 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 161, __pyx_L3_error)
5949 CYTHON_FALLTHROUGH;
5950 case 2:
5951 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5952 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 161, __pyx_L3_error)
5953 CYTHON_FALLTHROUGH;
5954 case 1:
5955 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5956 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 161, __pyx_L3_error)
5957 CYTHON_FALLTHROUGH;
5958 case 0: break;
5959 default: goto __pyx_L5_argtuple_error;
5960 }
5961 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5962 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "applyDGlimitingP1Lagrange1d", 0) < (0)) __PYX_ERR(0, 161, __pyx_L3_error)
5963 for (Py_ssize_t i = __pyx_nargs; i < 13; i++) {
5964 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, i); __PYX_ERR(0, 161, __pyx_L3_error) }
5965 }
5966 } else if (unlikely(__pyx_nargs != 13)) {
5967 goto __pyx_L5_argtuple_error;
5968 } else {
5969 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5970 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 161, __pyx_L3_error)
5971 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5972 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 161, __pyx_L3_error)
5973 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5974 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 161, __pyx_L3_error)
5975 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5976 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 161, __pyx_L3_error)
5977 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5978 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 161, __pyx_L3_error)
5979 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5980 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 161, __pyx_L3_error)
5981 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5982 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 161, __pyx_L3_error)
5983 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
5984 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 161, __pyx_L3_error)
5985 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
5986 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 161, __pyx_L3_error)
5987 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
5988 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 161, __pyx_L3_error)
5989 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
5990 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 161, __pyx_L3_error)
5991 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
5992 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 161, __pyx_L3_error)
5993 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
5994 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 161, __pyx_L3_error)
5995 }
5996 __pyx_v_limiterFlag = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_limiterFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L3_error)
5997 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L3_error)
5998 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L3_error)
5999 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
6000 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L3_error)
6001 __pyx_v_elementNodesArray = ((PyArrayObject *)values[5]);
6002 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[6]);
6003 __pyx_v_nodeArray = ((PyArrayObject *)values[7]);
6004 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[8]);
6005 __pyx_v_l2g = ((PyArrayObject *)values[9]);
6006 __pyx_v_tag = ((PyArrayObject *)values[10]);
6007 __pyx_v_Uin = ((PyArrayObject *)values[11]);
6008 __pyx_v_Uout = ((PyArrayObject *)values[12]);
6009 }
6010 goto __pyx_L6_skip;
6011 __pyx_L5_argtuple_error:;
6012 __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d", 1, 13, 13, __pyx_nargs); __PYX_ERR(0, 161, __pyx_L3_error)
6013 __pyx_L6_skip:;
6014 goto __pyx_L4_argument_unpacking_done;
6015 __pyx_L3_error:;
6016 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6017 Py_XDECREF(values[__pyx_temp]);
6018 }
6019 __Pyx_AddTraceback("ctimeIntegration.applyDGlimitingP1Lagrange1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6020 __Pyx_RefNannyFinishContext();
6021 return NULL;
6022 __pyx_L4_argument_unpacking_done:;
6023 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
6024 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 167, __pyx_L1_error)
6025 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 168, __pyx_L1_error)
6026 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 169, __pyx_L1_error)
6027 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
6028 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 171, __pyx_L1_error)
6029 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 172, __pyx_L1_error)
6030 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 173, __pyx_L1_error)
6031 __pyx_r = __pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(__pyx_self, __pyx_v_limiterFlag, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, __pyx_v_elementNodesArray, __pyx_v_elementNeighborsArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
6032
6033 /* function exit code */
6034 goto __pyx_L0;
6035 __pyx_L1_error:;
6036 __pyx_r = NULL;
6037 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6038 Py_XDECREF(values[__pyx_temp]);
6039 }
6040 goto __pyx_L7_cleaned_up;
6041 __pyx_L0:;
6042 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6043 Py_XDECREF(values[__pyx_temp]);
6044 }
6045 __pyx_L7_cleaned_up:;
6046
6047
6048
6049
6050
6051 __Pyx_RefNannyFinishContext();
6052 return __pyx_r;
6053}
6054
6055static PyObject *__pyx_pf_16ctimeIntegration_2applyDGlimitingP1Lagrange1d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_limiterFlag, int __pyx_v_nElements_global, int __pyx_v_nNodes_element, int __pyx_v_nElementBoundaries_element, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
6056 PyObject *__pyx_r = NULL;
6057 __Pyx_RefNannyDeclarations
6058 __Pyx_RefNannySetupContext("applyDGlimitingP1Lagrange1d", 0);
6059
6060 /* "ctimeIntegration.pyx":174
6061 * np.ndarray Uin,
6062 * np.ndarray Uout):
6063 * capplyDGlimitingP1Lagrange1d(limiterFlag, # <<<<<<<<<<<<<<
6064 * nElements_global,
6065 * nNodes_element,
6066*/
6067 applyDGlimitingP1Lagrange1d(__pyx_v_limiterFlag, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
6068
6069 /* "ctimeIntegration.pyx":161
6070 * <double*> dtnp1.data)
6071 *
6072 * def applyDGlimitingP1Lagrange1d(int limiterFlag, # <<<<<<<<<<<<<<
6073 * int nElements_global,
6074 * int nNodes_element,
6075*/
6076
6077 /* function exit code */
6078 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6079 __Pyx_XGIVEREF(__pyx_r);
6080 __Pyx_RefNannyFinishContext();
6081 return __pyx_r;
6082}
6083
6084/* "ctimeIntegration.pyx":188
6085 * <double*> Uout.data)
6086 *
6087 * def applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, # <<<<<<<<<<<<<<
6088 * double vacuumTol,
6089 * int nElements_global,
6090*/
6091
6092/* Python wrapper */
6093static PyObject *__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol(PyObject *__pyx_self,
6094#if CYTHON_VECTORCALL
6095PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6096#else
6097PyObject *__pyx_args, PyObject *__pyx_kwds
6098#endif
6099); /*proto*/
6100static PyMethodDef __pyx_mdef_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol = {"applyDGlimitingP1Lagrange1d_withVacuumTol", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6101static PyObject *__pyx_pw_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol(PyObject *__pyx_self,
6102#if CYTHON_VECTORCALL
6103PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6104#else
6105PyObject *__pyx_args, PyObject *__pyx_kwds
6106#endif
6107) {
6108 int __pyx_v_enforcePositivity;
6109 double __pyx_v_vacuumTol;
6110 int __pyx_v_nElements_global;
6111 int __pyx_v_nNodes_element;
6112 int __pyx_v_nElementBoundaries_element;
6113 int __pyx_v_nDOF_element;
6114 PyArrayObject *__pyx_v_elementNodesArray = 0;
6115 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6116 PyArrayObject *__pyx_v_nodeArray = 0;
6117 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
6118 PyArrayObject *__pyx_v_l2g = 0;
6119 PyArrayObject *__pyx_v_tag = 0;
6120 PyArrayObject *__pyx_v_Uin = 0;
6121 PyArrayObject *__pyx_v_Uout = 0;
6122 #if !CYTHON_VECTORCALL
6123 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6124 #endif
6125 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6126 PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
6127 int __pyx_lineno = 0;
6128 const char *__pyx_filename = NULL;
6129 int __pyx_clineno = 0;
6130 PyObject *__pyx_r = 0;
6131 __Pyx_RefNannyDeclarations
6132 __Pyx_RefNannySetupContext("applyDGlimitingP1Lagrange1d_withVacuumTol (wrapper)", 0);
6133 #if !CYTHON_VECTORCALL
6134 #if CYTHON_ASSUME_SAFE_SIZE
6135 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6136 #else
6137 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6138 #endif
6139 #endif
6140 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6141 {
6142 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_enforcePositivity,&__pyx_mstate_global->__pyx_n_u_vacuumTol,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
6143 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6144 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 188, __pyx_L3_error)
6145 if (__pyx_kwds_len > 0) {
6146 switch (__pyx_nargs) {
6147 case 14:
6148 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6149 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 188, __pyx_L3_error)
6150 CYTHON_FALLTHROUGH;
6151 case 13:
6152 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6153 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 188, __pyx_L3_error)
6154 CYTHON_FALLTHROUGH;
6155 case 12:
6156 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6157 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 188, __pyx_L3_error)
6158 CYTHON_FALLTHROUGH;
6159 case 11:
6160 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6161 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 188, __pyx_L3_error)
6162 CYTHON_FALLTHROUGH;
6163 case 10:
6164 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
6165 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 188, __pyx_L3_error)
6166 CYTHON_FALLTHROUGH;
6167 case 9:
6168 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6169 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 188, __pyx_L3_error)
6170 CYTHON_FALLTHROUGH;
6171 case 8:
6172 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6173 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 188, __pyx_L3_error)
6174 CYTHON_FALLTHROUGH;
6175 case 7:
6176 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6177 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 188, __pyx_L3_error)
6178 CYTHON_FALLTHROUGH;
6179 case 6:
6180 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6181 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 188, __pyx_L3_error)
6182 CYTHON_FALLTHROUGH;
6183 case 5:
6184 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6185 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 188, __pyx_L3_error)
6186 CYTHON_FALLTHROUGH;
6187 case 4:
6188 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6189 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 188, __pyx_L3_error)
6190 CYTHON_FALLTHROUGH;
6191 case 3:
6192 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6193 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 188, __pyx_L3_error)
6194 CYTHON_FALLTHROUGH;
6195 case 2:
6196 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6197 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 188, __pyx_L3_error)
6198 CYTHON_FALLTHROUGH;
6199 case 1:
6200 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6201 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 188, __pyx_L3_error)
6202 CYTHON_FALLTHROUGH;
6203 case 0: break;
6204 default: goto __pyx_L5_argtuple_error;
6205 }
6206 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6207 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "applyDGlimitingP1Lagrange1d_withVacuumTol", 0) < (0)) __PYX_ERR(0, 188, __pyx_L3_error)
6208 for (Py_ssize_t i = __pyx_nargs; i < 14; i++) {
6209 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, i); __PYX_ERR(0, 188, __pyx_L3_error) }
6210 }
6211 } else if (unlikely(__pyx_nargs != 14)) {
6212 goto __pyx_L5_argtuple_error;
6213 } else {
6214 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6215 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 188, __pyx_L3_error)
6216 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6217 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 188, __pyx_L3_error)
6218 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6219 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 188, __pyx_L3_error)
6220 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6221 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 188, __pyx_L3_error)
6222 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6223 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 188, __pyx_L3_error)
6224 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6225 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 188, __pyx_L3_error)
6226 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6227 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 188, __pyx_L3_error)
6228 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6229 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 188, __pyx_L3_error)
6230 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6231 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 188, __pyx_L3_error)
6232 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
6233 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 188, __pyx_L3_error)
6234 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6235 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 188, __pyx_L3_error)
6236 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6237 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 188, __pyx_L3_error)
6238 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6239 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 188, __pyx_L3_error)
6240 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6241 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 188, __pyx_L3_error)
6242 }
6243 __pyx_v_enforcePositivity = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_enforcePositivity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error)
6244 __pyx_v_vacuumTol = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_vacuumTol == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L3_error)
6245 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L3_error)
6246 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 191, __pyx_L3_error)
6247 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L3_error)
6248 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __pyx_L3_error)
6249 __pyx_v_elementNodesArray = ((PyArrayObject *)values[6]);
6250 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
6251 __pyx_v_nodeArray = ((PyArrayObject *)values[8]);
6252 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[9]);
6253 __pyx_v_l2g = ((PyArrayObject *)values[10]);
6254 __pyx_v_tag = ((PyArrayObject *)values[11]);
6255 __pyx_v_Uin = ((PyArrayObject *)values[12]);
6256 __pyx_v_Uout = ((PyArrayObject *)values[13]);
6257 }
6258 goto __pyx_L6_skip;
6259 __pyx_L5_argtuple_error:;
6260 __Pyx_RaiseArgtupleInvalid("applyDGlimitingP1Lagrange1d_withVacuumTol", 1, 14, 14, __pyx_nargs); __PYX_ERR(0, 188, __pyx_L3_error)
6261 __pyx_L6_skip:;
6262 goto __pyx_L4_argument_unpacking_done;
6263 __pyx_L3_error:;
6264 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6265 Py_XDECREF(values[__pyx_temp]);
6266 }
6267 __Pyx_AddTraceback("ctimeIntegration.applyDGlimitingP1Lagrange1d_withVacuumTol", __pyx_clineno, __pyx_lineno, __pyx_filename);
6268 __Pyx_RefNannyFinishContext();
6269 return NULL;
6270 __pyx_L4_argument_unpacking_done:;
6271 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
6272 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 195, __pyx_L1_error)
6273 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 196, __pyx_L1_error)
6274 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 197, __pyx_L1_error)
6275 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
6276 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 199, __pyx_L1_error)
6277 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 200, __pyx_L1_error)
6278 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 201, __pyx_L1_error)
6279 __pyx_r = __pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(__pyx_self, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, __pyx_v_elementNodesArray, __pyx_v_elementNeighborsArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
6280
6281 /* function exit code */
6282 goto __pyx_L0;
6283 __pyx_L1_error:;
6284 __pyx_r = NULL;
6285 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6286 Py_XDECREF(values[__pyx_temp]);
6287 }
6288 goto __pyx_L7_cleaned_up;
6289 __pyx_L0:;
6290 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6291 Py_XDECREF(values[__pyx_temp]);
6292 }
6293 __pyx_L7_cleaned_up:;
6294
6295
6296
6297
6298
6299
6300 __Pyx_RefNannyFinishContext();
6301 return __pyx_r;
6302}
6303
6304static PyObject *__pyx_pf_16ctimeIntegration_4applyDGlimitingP1Lagrange1d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_enforcePositivity, double __pyx_v_vacuumTol, int __pyx_v_nElements_global, int __pyx_v_nNodes_element, int __pyx_v_nElementBoundaries_element, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
6305 PyObject *__pyx_r = NULL;
6306 __Pyx_RefNannyDeclarations
6307 __Pyx_RefNannySetupContext("applyDGlimitingP1Lagrange1d_withVacuumTol", 0);
6308
6309 /* "ctimeIntegration.pyx":202
6310 * np.ndarray Uin,
6311 * np.ndarray Uout):
6312 * capplyDGlimitingP1Lagrange1d_withVacuumTol(enforcePositivity, # <<<<<<<<<<<<<<
6313 * vacuumTol,
6314 * nElements_global,
6315*/
6316 applyDGlimitingP1Lagrange1d_withVacuumTol(__pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nNodes_element, __pyx_v_nElementBoundaries_element, __pyx_v_nDOF_element, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
6317
6318 /* "ctimeIntegration.pyx":188
6319 * <double*> Uout.data)
6320 *
6321 * def applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, # <<<<<<<<<<<<<<
6322 * double vacuumTol,
6323 * int nElements_global,
6324*/
6325
6326 /* function exit code */
6327 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6328 __Pyx_XGIVEREF(__pyx_r);
6329 __Pyx_RefNannyFinishContext();
6330 return __pyx_r;
6331}
6332
6333/* "ctimeIntegration.pyx":218
6334 *
6335 *
6336 * def computeElementNeighborShapeGradients(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
6337 * np.ndarray elementNeighborsArray,
6338 * np.ndarray elementBarycentersArray,
6339*/
6340
6341/* Python wrapper */
6342static PyObject *__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients(PyObject *__pyx_self,
6343#if CYTHON_VECTORCALL
6344PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6345#else
6346PyObject *__pyx_args, PyObject *__pyx_kwds
6347#endif
6348); /*proto*/
6349static PyMethodDef __pyx_mdef_16ctimeIntegration_7computeElementNeighborShapeGradients = {"computeElementNeighborShapeGradients", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6350static PyObject *__pyx_pw_16ctimeIntegration_7computeElementNeighborShapeGradients(PyObject *__pyx_self,
6351#if CYTHON_VECTORCALL
6352PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6353#else
6354PyObject *__pyx_args, PyObject *__pyx_kwds
6355#endif
6356) {
6357 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
6358 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6359 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
6360 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
6361 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
6362 #if !CYTHON_VECTORCALL
6363 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6364 #endif
6365 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6366 PyObject* values[5] = {0,0,0,0,0};
6367 int __pyx_lineno = 0;
6368 const char *__pyx_filename = NULL;
6369 int __pyx_clineno = 0;
6370 PyObject *__pyx_r = 0;
6371 __Pyx_RefNannyDeclarations
6372 __Pyx_RefNannySetupContext("computeElementNeighborShapeGradients (wrapper)", 0);
6373 #if !CYTHON_VECTORCALL
6374 #if CYTHON_ASSUME_SAFE_SIZE
6375 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6376 #else
6377 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6378 #endif
6379 #endif
6380 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6381 {
6382 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,0};
6383 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6384 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 218, __pyx_L3_error)
6385 if (__pyx_kwds_len > 0) {
6386 switch (__pyx_nargs) {
6387 case 5:
6388 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6389 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 218, __pyx_L3_error)
6390 CYTHON_FALLTHROUGH;
6391 case 4:
6392 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6393 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 218, __pyx_L3_error)
6394 CYTHON_FALLTHROUGH;
6395 case 3:
6396 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6397 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 218, __pyx_L3_error)
6398 CYTHON_FALLTHROUGH;
6399 case 2:
6400 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6401 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 218, __pyx_L3_error)
6402 CYTHON_FALLTHROUGH;
6403 case 1:
6404 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6405 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error)
6406 CYTHON_FALLTHROUGH;
6407 case 0: break;
6408 default: goto __pyx_L5_argtuple_error;
6409 }
6410 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6411 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "computeElementNeighborShapeGradients", 0) < (0)) __PYX_ERR(0, 218, __pyx_L3_error)
6412 for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
6413 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("computeElementNeighborShapeGradients", 1, 5, 5, i); __PYX_ERR(0, 218, __pyx_L3_error) }
6414 }
6415 } else if (unlikely(__pyx_nargs != 5)) {
6416 goto __pyx_L5_argtuple_error;
6417 } else {
6418 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6419 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error)
6420 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6421 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 218, __pyx_L3_error)
6422 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6423 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 218, __pyx_L3_error)
6424 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6425 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 218, __pyx_L3_error)
6426 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6427 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 218, __pyx_L3_error)
6428 }
6429 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[0]);
6430 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[1]);
6431 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[2]);
6432 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[3]);
6433 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[4]);
6434 }
6435 goto __pyx_L6_skip;
6436 __pyx_L5_argtuple_error:;
6437 __Pyx_RaiseArgtupleInvalid("computeElementNeighborShapeGradients", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 218, __pyx_L3_error)
6438 __pyx_L6_skip:;
6439 goto __pyx_L4_argument_unpacking_done;
6440 __pyx_L3_error:;
6441 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6442 Py_XDECREF(values[__pyx_temp]);
6443 }
6444 __Pyx_AddTraceback("ctimeIntegration.computeElementNeighborShapeGradients", __pyx_clineno, __pyx_lineno, __pyx_filename);
6445 __Pyx_RefNannyFinishContext();
6446 return NULL;
6447 __pyx_L4_argument_unpacking_done:;
6448 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 218, __pyx_L1_error)
6449 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 219, __pyx_L1_error)
6450 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 220, __pyx_L1_error)
6451 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 221, __pyx_L1_error)
6452 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 222, __pyx_L1_error)
6453 __pyx_r = __pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(__pyx_self, __pyx_v_elementBoundariesArray, __pyx_v_elementNeighborsArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients);
6454
6455 /* function exit code */
6456 goto __pyx_L0;
6457 __pyx_L1_error:;
6458 __pyx_r = NULL;
6459 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6460 Py_XDECREF(values[__pyx_temp]);
6461 }
6462 goto __pyx_L7_cleaned_up;
6463 __pyx_L0:;
6464 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6465 Py_XDECREF(values[__pyx_temp]);
6466 }
6467 __pyx_L7_cleaned_up:;
6468 __Pyx_RefNannyFinishContext();
6469 return __pyx_r;
6470}
6471
6472static PyObject *__pyx_pf_16ctimeIntegration_6computeElementNeighborShapeGradients(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients) {
6473 PyObject *__pyx_r = NULL;
6474 __Pyx_RefNannyDeclarations
6475 __Pyx_RefNannySetupContext("computeElementNeighborShapeGradients", 0);
6476
6477 /* "ctimeIntegration.pyx":223
6478 * np.ndarray elementBoundaryBarycentersArray,
6479 * np.ndarray elementNeighborShapeGradients):
6480 * ccomputeElementNeighborShapeGradients(elementNeighborsArray.shape[0], # <<<<<<<<<<<<<<
6481 * elementNeighborsArray.shape[1],
6482 * elementNeighborsArray.shape[1]-1,#nSpace from simplex size
6483*/
6484 computeElementNeighborShapeGradients((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[0]), (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]), ((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]) - 1), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)));
6485
6486 /* "ctimeIntegration.pyx":218
6487 *
6488 *
6489 * def computeElementNeighborShapeGradients(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
6490 * np.ndarray elementNeighborsArray,
6491 * np.ndarray elementBarycentersArray,
6492*/
6493
6494 /* function exit code */
6495 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6496 __Pyx_XGIVEREF(__pyx_r);
6497 __Pyx_RefNannyFinishContext();
6498 return __pyx_r;
6499}
6500
6501/* "ctimeIntegration.pyx":232
6502 * <double*> elementNeighborShapeGradients.data)
6503 *
6504 * def computeCockburnDGlimiterArrays2d(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
6505 * np.ndarray elementNeighborsArray,
6506 * np.ndarray elementBarycentersArray,
6507*/
6508
6509/* Python wrapper */
6510static PyObject *__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d(PyObject *__pyx_self,
6511#if CYTHON_VECTORCALL
6512PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6513#else
6514PyObject *__pyx_args, PyObject *__pyx_kwds
6515#endif
6516); /*proto*/
6517static PyMethodDef __pyx_mdef_16ctimeIntegration_9computeCockburnDGlimiterArrays2d = {"computeCockburnDGlimiterArrays2d", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6518static PyObject *__pyx_pw_16ctimeIntegration_9computeCockburnDGlimiterArrays2d(PyObject *__pyx_self,
6519#if CYTHON_VECTORCALL
6520PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6521#else
6522PyObject *__pyx_args, PyObject *__pyx_kwds
6523#endif
6524) {
6525 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
6526 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6527 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
6528 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
6529 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
6530 PyArrayObject *__pyx_v_alphas = 0;
6531 PyArrayObject *__pyx_v_alphaNeighbors = 0;
6532 #if !CYTHON_VECTORCALL
6533 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6534 #endif
6535 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6536 PyObject* values[7] = {0,0,0,0,0,0,0};
6537 int __pyx_lineno = 0;
6538 const char *__pyx_filename = NULL;
6539 int __pyx_clineno = 0;
6540 PyObject *__pyx_r = 0;
6541 __Pyx_RefNannyDeclarations
6542 __Pyx_RefNannySetupContext("computeCockburnDGlimiterArrays2d (wrapper)", 0);
6543 #if !CYTHON_VECTORCALL
6544 #if CYTHON_ASSUME_SAFE_SIZE
6545 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6546 #else
6547 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6548 #endif
6549 #endif
6550 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6551 {
6552 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,&__pyx_mstate_global->__pyx_n_u_alphas,&__pyx_mstate_global->__pyx_n_u_alphaNeighbors,0};
6553 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6554 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 232, __pyx_L3_error)
6555 if (__pyx_kwds_len > 0) {
6556 switch (__pyx_nargs) {
6557 case 7:
6558 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6559 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 232, __pyx_L3_error)
6560 CYTHON_FALLTHROUGH;
6561 case 6:
6562 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6563 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 232, __pyx_L3_error)
6564 CYTHON_FALLTHROUGH;
6565 case 5:
6566 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6567 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 232, __pyx_L3_error)
6568 CYTHON_FALLTHROUGH;
6569 case 4:
6570 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6571 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 232, __pyx_L3_error)
6572 CYTHON_FALLTHROUGH;
6573 case 3:
6574 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6575 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 232, __pyx_L3_error)
6576 CYTHON_FALLTHROUGH;
6577 case 2:
6578 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6579 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 232, __pyx_L3_error)
6580 CYTHON_FALLTHROUGH;
6581 case 1:
6582 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6583 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 232, __pyx_L3_error)
6584 CYTHON_FALLTHROUGH;
6585 case 0: break;
6586 default: goto __pyx_L5_argtuple_error;
6587 }
6588 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6589 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "computeCockburnDGlimiterArrays2d", 0) < (0)) __PYX_ERR(0, 232, __pyx_L3_error)
6590 for (Py_ssize_t i = __pyx_nargs; i < 7; i++) {
6591 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, i); __PYX_ERR(0, 232, __pyx_L3_error) }
6592 }
6593 } else if (unlikely(__pyx_nargs != 7)) {
6594 goto __pyx_L5_argtuple_error;
6595 } else {
6596 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6597 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 232, __pyx_L3_error)
6598 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6599 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 232, __pyx_L3_error)
6600 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6601 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 232, __pyx_L3_error)
6602 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6603 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 232, __pyx_L3_error)
6604 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6605 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 232, __pyx_L3_error)
6606 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6607 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 232, __pyx_L3_error)
6608 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6609 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 232, __pyx_L3_error)
6610 }
6611 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[0]);
6612 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[1]);
6613 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[2]);
6614 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[3]);
6615 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[4]);
6616 __pyx_v_alphas = ((PyArrayObject *)values[5]);
6617 __pyx_v_alphaNeighbors = ((PyArrayObject *)values[6]);
6618 }
6619 goto __pyx_L6_skip;
6620 __pyx_L5_argtuple_error:;
6621 __Pyx_RaiseArgtupleInvalid("computeCockburnDGlimiterArrays2d", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 232, __pyx_L3_error)
6622 __pyx_L6_skip:;
6623 goto __pyx_L4_argument_unpacking_done;
6624 __pyx_L3_error:;
6625 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6626 Py_XDECREF(values[__pyx_temp]);
6627 }
6628 __Pyx_AddTraceback("ctimeIntegration.computeCockburnDGlimiterArrays2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6629 __Pyx_RefNannyFinishContext();
6630 return NULL;
6631 __pyx_L4_argument_unpacking_done:;
6632 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 232, __pyx_L1_error)
6633 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 233, __pyx_L1_error)
6634 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 234, __pyx_L1_error)
6635 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 235, __pyx_L1_error)
6636 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 236, __pyx_L1_error)
6637 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphas), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "alphas", 0))) __PYX_ERR(0, 237, __pyx_L1_error)
6638 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphaNeighbors), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "alphaNeighbors", 0))) __PYX_ERR(0, 238, __pyx_L1_error)
6639 __pyx_r = __pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(__pyx_self, __pyx_v_elementBoundariesArray, __pyx_v_elementNeighborsArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_alphas, __pyx_v_alphaNeighbors);
6640
6641 /* function exit code */
6642 goto __pyx_L0;
6643 __pyx_L1_error:;
6644 __pyx_r = NULL;
6645 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6646 Py_XDECREF(values[__pyx_temp]);
6647 }
6648 goto __pyx_L7_cleaned_up;
6649 __pyx_L0:;
6650 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6651 Py_XDECREF(values[__pyx_temp]);
6652 }
6653 __pyx_L7_cleaned_up:;
6654 __Pyx_RefNannyFinishContext();
6655 return __pyx_r;
6656}
6657
6658static PyObject *__pyx_pf_16ctimeIntegration_8computeCockburnDGlimiterArrays2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors) {
6659 PyObject *__pyx_r = NULL;
6660 __Pyx_RefNannyDeclarations
6661 __Pyx_RefNannySetupContext("computeCockburnDGlimiterArrays2d", 0);
6662
6663 /* "ctimeIntegration.pyx":239
6664 * np.ndarray alphas,
6665 * np.ndarray alphaNeighbors):
6666 * ccomputeCockburnDGlimiterArrays2d(elementNeighborsArray.shape[0], # <<<<<<<<<<<<<<
6667 * elementNeighborsArray.shape[1],
6668 * elementNeighborsArray.shape[1]-1,#nSpace from simplex size
6669*/
6670 computeCockburnDGlimiterArrays2d((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[0]), (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]), ((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]) - 1), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_alphas)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_alphaNeighbors)));
6671
6672 /* "ctimeIntegration.pyx":232
6673 * <double*> elementNeighborShapeGradients.data)
6674 *
6675 * def computeCockburnDGlimiterArrays2d(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
6676 * np.ndarray elementNeighborsArray,
6677 * np.ndarray elementBarycentersArray,
6678*/
6679
6680 /* function exit code */
6681 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6682 __Pyx_XGIVEREF(__pyx_r);
6683 __Pyx_RefNannyFinishContext();
6684 return __pyx_r;
6685}
6686
6687/* "ctimeIntegration.pyx":250
6688 * <int*> alphaNeighbors.data)
6689 *
6690 * def applyCockburnDGlimiterP1Lagrange2d(double nu, # <<<<<<<<<<<<<<
6691 * double Mh2,
6692 * np.ndarray elementNeighborsArray,
6693*/
6694
6695/* Python wrapper */
6696static PyObject *__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d(PyObject *__pyx_self,
6697#if CYTHON_VECTORCALL
6698PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6699#else
6700PyObject *__pyx_args, PyObject *__pyx_kwds
6701#endif
6702); /*proto*/
6703static PyMethodDef __pyx_mdef_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d = {"applyCockburnDGlimiterP1Lagrange2d", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6704static PyObject *__pyx_pw_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d(PyObject *__pyx_self,
6705#if CYTHON_VECTORCALL
6706PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6707#else
6708PyObject *__pyx_args, PyObject *__pyx_kwds
6709#endif
6710) {
6711 double __pyx_v_nu;
6712 double __pyx_v_Mh2;
6713 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6714 PyArrayObject *__pyx_v_l2g = 0;
6715 PyArrayObject *__pyx_v_tag = 0;
6716 PyArrayObject *__pyx_v_alphas = 0;
6717 PyArrayObject *__pyx_v_alphaNeighbors = 0;
6718 PyArrayObject *__pyx_v_Uin = 0;
6719 PyArrayObject *__pyx_v_Uout = 0;
6720 #if !CYTHON_VECTORCALL
6721 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6722 #endif
6723 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6724 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
6725 int __pyx_lineno = 0;
6726 const char *__pyx_filename = NULL;
6727 int __pyx_clineno = 0;
6728 PyObject *__pyx_r = 0;
6729 __Pyx_RefNannyDeclarations
6730 __Pyx_RefNannySetupContext("applyCockburnDGlimiterP1Lagrange2d (wrapper)", 0);
6731 #if !CYTHON_VECTORCALL
6732 #if CYTHON_ASSUME_SAFE_SIZE
6733 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6734 #else
6735 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6736 #endif
6737 #endif
6738 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6739 {
6740 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nu,&__pyx_mstate_global->__pyx_n_u_Mh2,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_alphas,&__pyx_mstate_global->__pyx_n_u_alphaNeighbors,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
6741 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6742 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 250, __pyx_L3_error)
6743 if (__pyx_kwds_len > 0) {
6744 switch (__pyx_nargs) {
6745 case 9:
6746 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6747 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 250, __pyx_L3_error)
6748 CYTHON_FALLTHROUGH;
6749 case 8:
6750 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6751 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 250, __pyx_L3_error)
6752 CYTHON_FALLTHROUGH;
6753 case 7:
6754 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6755 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 250, __pyx_L3_error)
6756 CYTHON_FALLTHROUGH;
6757 case 6:
6758 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6759 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 250, __pyx_L3_error)
6760 CYTHON_FALLTHROUGH;
6761 case 5:
6762 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6763 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 250, __pyx_L3_error)
6764 CYTHON_FALLTHROUGH;
6765 case 4:
6766 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6767 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 250, __pyx_L3_error)
6768 CYTHON_FALLTHROUGH;
6769 case 3:
6770 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6771 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 250, __pyx_L3_error)
6772 CYTHON_FALLTHROUGH;
6773 case 2:
6774 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6775 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 250, __pyx_L3_error)
6776 CYTHON_FALLTHROUGH;
6777 case 1:
6778 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6779 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 250, __pyx_L3_error)
6780 CYTHON_FALLTHROUGH;
6781 case 0: break;
6782 default: goto __pyx_L5_argtuple_error;
6783 }
6784 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6785 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "applyCockburnDGlimiterP1Lagrange2d", 0) < (0)) __PYX_ERR(0, 250, __pyx_L3_error)
6786 for (Py_ssize_t i = __pyx_nargs; i < 9; i++) {
6787 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, i); __PYX_ERR(0, 250, __pyx_L3_error) }
6788 }
6789 } else if (unlikely(__pyx_nargs != 9)) {
6790 goto __pyx_L5_argtuple_error;
6791 } else {
6792 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6793 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 250, __pyx_L3_error)
6794 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6795 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 250, __pyx_L3_error)
6796 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6797 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 250, __pyx_L3_error)
6798 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6799 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 250, __pyx_L3_error)
6800 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6801 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 250, __pyx_L3_error)
6802 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6803 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 250, __pyx_L3_error)
6804 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6805 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 250, __pyx_L3_error)
6806 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
6807 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 250, __pyx_L3_error)
6808 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
6809 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 250, __pyx_L3_error)
6810 }
6811 __pyx_v_nu = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_nu == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 250, __pyx_L3_error)
6812 __pyx_v_Mh2 = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_Mh2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 251, __pyx_L3_error)
6813 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[2]);
6814 __pyx_v_l2g = ((PyArrayObject *)values[3]);
6815 __pyx_v_tag = ((PyArrayObject *)values[4]);
6816 __pyx_v_alphas = ((PyArrayObject *)values[5]);
6817 __pyx_v_alphaNeighbors = ((PyArrayObject *)values[6]);
6818 __pyx_v_Uin = ((PyArrayObject *)values[7]);
6819 __pyx_v_Uout = ((PyArrayObject *)values[8]);
6820 }
6821 goto __pyx_L6_skip;
6822 __pyx_L5_argtuple_error:;
6823 __Pyx_RaiseArgtupleInvalid("applyCockburnDGlimiterP1Lagrange2d", 1, 9, 9, __pyx_nargs); __PYX_ERR(0, 250, __pyx_L3_error)
6824 __pyx_L6_skip:;
6825 goto __pyx_L4_argument_unpacking_done;
6826 __pyx_L3_error:;
6827 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6828 Py_XDECREF(values[__pyx_temp]);
6829 }
6830 __Pyx_AddTraceback("ctimeIntegration.applyCockburnDGlimiterP1Lagrange2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
6831 __Pyx_RefNannyFinishContext();
6832 return NULL;
6833 __pyx_L4_argument_unpacking_done:;
6834 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 252, __pyx_L1_error)
6835 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 253, __pyx_L1_error)
6836 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 254, __pyx_L1_error)
6837 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphas), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "alphas", 0))) __PYX_ERR(0, 255, __pyx_L1_error)
6838 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alphaNeighbors), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "alphaNeighbors", 0))) __PYX_ERR(0, 256, __pyx_L1_error)
6839 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 257, __pyx_L1_error)
6840 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 258, __pyx_L1_error)
6841 __pyx_r = __pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(__pyx_self, __pyx_v_nu, __pyx_v_Mh2, __pyx_v_elementNeighborsArray, __pyx_v_l2g, __pyx_v_tag, __pyx_v_alphas, __pyx_v_alphaNeighbors, __pyx_v_Uin, __pyx_v_Uout);
6842
6843 /* function exit code */
6844 goto __pyx_L0;
6845 __pyx_L1_error:;
6846 __pyx_r = NULL;
6847 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6848 Py_XDECREF(values[__pyx_temp]);
6849 }
6850 goto __pyx_L7_cleaned_up;
6851 __pyx_L0:;
6852 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6853 Py_XDECREF(values[__pyx_temp]);
6854 }
6855 __pyx_L7_cleaned_up:;
6856
6857
6858 __Pyx_RefNannyFinishContext();
6859 return __pyx_r;
6860}
6861
6862static PyObject *__pyx_pf_16ctimeIntegration_10applyCockburnDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_nu, double __pyx_v_Mh2, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_alphas, PyArrayObject *__pyx_v_alphaNeighbors, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
6863 PyObject *__pyx_r = NULL;
6864 __Pyx_RefNannyDeclarations
6865 __Pyx_RefNannySetupContext("applyCockburnDGlimiterP1Lagrange2d", 0);
6866
6867 /* "ctimeIntegration.pyx":259
6868 * np.ndarray Uin,
6869 * np.ndarray Uout):
6870 * capplyCockburnDGlimiterP1Lagrange2d(nu, # <<<<<<<<<<<<<<
6871 * Mh2,
6872 * elementNeighborsArray.shape[0],
6873*/
6874 applyCockburnDGlimiterP1Lagrange2d(__pyx_v_nu, __pyx_v_Mh2, (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[0]), (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]), ((__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_elementNeighborsArray)[1]) - 1), (__pyx_f_5numpy_7ndarray_5shape___get__(__pyx_v_l2g)[1]), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_alphas)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_alphaNeighbors)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
6875
6876 /* "ctimeIntegration.pyx":250
6877 * <int*> alphaNeighbors.data)
6878 *
6879 * def applyCockburnDGlimiterP1Lagrange2d(double nu, # <<<<<<<<<<<<<<
6880 * double Mh2,
6881 * np.ndarray elementNeighborsArray,
6882*/
6883
6884 /* function exit code */
6885 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6886 __Pyx_XGIVEREF(__pyx_r);
6887 __Pyx_RefNannyFinishContext();
6888 return __pyx_r;
6889}
6890
6891/* "ctimeIntegration.pyx":273
6892 * <double*> Uout.data)
6893 *
6894 * def applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, # <<<<<<<<<<<<<<
6895 * int allowMinWithUndershoot,
6896 * int nElements_global,
6897*/
6898
6899/* Python wrapper */
6900static PyObject *__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d(PyObject *__pyx_self,
6901#if CYTHON_VECTORCALL
6902PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6903#else
6904PyObject *__pyx_args, PyObject *__pyx_kwds
6905#endif
6906); /*proto*/
6907static PyMethodDef __pyx_mdef_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d = {"applyDurlofskyDGlimiterP1Lagrange2d", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6908static PyObject *__pyx_pw_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d(PyObject *__pyx_self,
6909#if CYTHON_VECTORCALL
6910PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6911#else
6912PyObject *__pyx_args, PyObject *__pyx_kwds
6913#endif
6914) {
6915 int __pyx_v_killExtrema;
6916 int __pyx_v_allowMinWithUndershoot;
6917 int __pyx_v_nElements_global;
6918 int __pyx_v_nElementBoundaries_element;
6919 int __pyx_v_nNodes_element;
6920 int __pyx_v_nSpace;
6921 int __pyx_v_nDOF_element;
6922 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
6923 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
6924 PyArrayObject *__pyx_v_elementNodesArray = 0;
6925 PyArrayObject *__pyx_v_nodeArray = 0;
6926 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
6927 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
6928 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
6929 PyArrayObject *__pyx_v_l2g = 0;
6930 PyArrayObject *__pyx_v_grad_v0 = 0;
6931 PyArrayObject *__pyx_v_elementAverages = 0;
6932 PyArrayObject *__pyx_v_tag = 0;
6933 PyArrayObject *__pyx_v_Uin = 0;
6934 PyArrayObject *__pyx_v_Uout = 0;
6935 #if !CYTHON_VECTORCALL
6936 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6937 #endif
6938 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6939 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
6940 int __pyx_lineno = 0;
6941 const char *__pyx_filename = NULL;
6942 int __pyx_clineno = 0;
6943 PyObject *__pyx_r = 0;
6944 __Pyx_RefNannyDeclarations
6945 __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange2d (wrapper)", 0);
6946 #if !CYTHON_VECTORCALL
6947 #if CYTHON_ASSUME_SAFE_SIZE
6948 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6949 #else
6950 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6951 #endif
6952 #endif
6953 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6954 {
6955 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_killExtrema,&__pyx_mstate_global->__pyx_n_u_allowMinWithUndershoot,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nSpace,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_grad_v0,&__pyx_mstate_global->__pyx_n_u_elementAverages,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
6956 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6957 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 273, __pyx_L3_error)
6958 if (__pyx_kwds_len > 0) {
6959 switch (__pyx_nargs) {
6960 case 20:
6961 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
6962 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 273, __pyx_L3_error)
6963 CYTHON_FALLTHROUGH;
6964 case 19:
6965 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
6966 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 273, __pyx_L3_error)
6967 CYTHON_FALLTHROUGH;
6968 case 18:
6969 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
6970 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 273, __pyx_L3_error)
6971 CYTHON_FALLTHROUGH;
6972 case 17:
6973 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
6974 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 273, __pyx_L3_error)
6975 CYTHON_FALLTHROUGH;
6976 case 16:
6977 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
6978 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 273, __pyx_L3_error)
6979 CYTHON_FALLTHROUGH;
6980 case 15:
6981 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
6982 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 273, __pyx_L3_error)
6983 CYTHON_FALLTHROUGH;
6984 case 14:
6985 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
6986 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 273, __pyx_L3_error)
6987 CYTHON_FALLTHROUGH;
6988 case 13:
6989 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
6990 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 273, __pyx_L3_error)
6991 CYTHON_FALLTHROUGH;
6992 case 12:
6993 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
6994 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 273, __pyx_L3_error)
6995 CYTHON_FALLTHROUGH;
6996 case 11:
6997 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
6998 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 273, __pyx_L3_error)
6999 CYTHON_FALLTHROUGH;
7000 case 10:
7001 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7002 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 273, __pyx_L3_error)
7003 CYTHON_FALLTHROUGH;
7004 case 9:
7005 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7006 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 273, __pyx_L3_error)
7007 CYTHON_FALLTHROUGH;
7008 case 8:
7009 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7010 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 273, __pyx_L3_error)
7011 CYTHON_FALLTHROUGH;
7012 case 7:
7013 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7014 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 273, __pyx_L3_error)
7015 CYTHON_FALLTHROUGH;
7016 case 6:
7017 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7018 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 273, __pyx_L3_error)
7019 CYTHON_FALLTHROUGH;
7020 case 5:
7021 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7022 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 273, __pyx_L3_error)
7023 CYTHON_FALLTHROUGH;
7024 case 4:
7025 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7026 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 273, __pyx_L3_error)
7027 CYTHON_FALLTHROUGH;
7028 case 3:
7029 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7030 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 273, __pyx_L3_error)
7031 CYTHON_FALLTHROUGH;
7032 case 2:
7033 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7034 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 273, __pyx_L3_error)
7035 CYTHON_FALLTHROUGH;
7036 case 1:
7037 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7038 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 273, __pyx_L3_error)
7039 CYTHON_FALLTHROUGH;
7040 case 0: break;
7041 default: goto __pyx_L5_argtuple_error;
7042 }
7043 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7044 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "applyDurlofskyDGlimiterP1Lagrange2d", 0) < (0)) __PYX_ERR(0, 273, __pyx_L3_error)
7045 for (Py_ssize_t i = __pyx_nargs; i < 20; i++) {
7046 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, i); __PYX_ERR(0, 273, __pyx_L3_error) }
7047 }
7048 } else if (unlikely(__pyx_nargs != 20)) {
7049 goto __pyx_L5_argtuple_error;
7050 } else {
7051 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7052 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 273, __pyx_L3_error)
7053 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7054 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 273, __pyx_L3_error)
7055 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7056 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 273, __pyx_L3_error)
7057 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7058 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 273, __pyx_L3_error)
7059 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7060 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 273, __pyx_L3_error)
7061 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7062 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 273, __pyx_L3_error)
7063 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7064 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 273, __pyx_L3_error)
7065 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7066 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 273, __pyx_L3_error)
7067 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7068 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 273, __pyx_L3_error)
7069 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7070 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 273, __pyx_L3_error)
7071 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7072 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 273, __pyx_L3_error)
7073 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7074 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 273, __pyx_L3_error)
7075 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7076 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 273, __pyx_L3_error)
7077 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7078 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 273, __pyx_L3_error)
7079 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7080 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 273, __pyx_L3_error)
7081 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7082 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 273, __pyx_L3_error)
7083 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7084 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 273, __pyx_L3_error)
7085 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7086 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 273, __pyx_L3_error)
7087 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7088 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 273, __pyx_L3_error)
7089 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7090 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 273, __pyx_L3_error)
7091 }
7092 __pyx_v_killExtrema = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_killExtrema == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L3_error)
7093 __pyx_v_allowMinWithUndershoot = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_allowMinWithUndershoot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
7094 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L3_error)
7095 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L3_error)
7096 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error)
7097 __pyx_v_nSpace = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 278, __pyx_L3_error)
7098 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error)
7099 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
7100 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[8]);
7101 __pyx_v_elementNodesArray = ((PyArrayObject *)values[9]);
7102 __pyx_v_nodeArray = ((PyArrayObject *)values[10]);
7103 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[11]);
7104 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[12]);
7105 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[13]);
7106 __pyx_v_l2g = ((PyArrayObject *)values[14]);
7107 __pyx_v_grad_v0 = ((PyArrayObject *)values[15]);
7108 __pyx_v_elementAverages = ((PyArrayObject *)values[16]);
7109 __pyx_v_tag = ((PyArrayObject *)values[17]);
7110 __pyx_v_Uin = ((PyArrayObject *)values[18]);
7111 __pyx_v_Uout = ((PyArrayObject *)values[19]);
7112 }
7113 goto __pyx_L6_skip;
7114 __pyx_L5_argtuple_error:;
7115 __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d", 1, 20, 20, __pyx_nargs); __PYX_ERR(0, 273, __pyx_L3_error)
7116 __pyx_L6_skip:;
7117 goto __pyx_L4_argument_unpacking_done;
7118 __pyx_L3_error:;
7119 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7120 Py_XDECREF(values[__pyx_temp]);
7121 }
7122 __Pyx_AddTraceback("ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
7123 __Pyx_RefNannyFinishContext();
7124 return NULL;
7125 __pyx_L4_argument_unpacking_done:;
7126 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 280, __pyx_L1_error)
7127 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 281, __pyx_L1_error)
7128 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 282, __pyx_L1_error)
7129 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 283, __pyx_L1_error)
7130 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 284, __pyx_L1_error)
7131 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 285, __pyx_L1_error)
7132 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 286, __pyx_L1_error)
7133 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 287, __pyx_L1_error)
7134 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "grad_v0", 0))) __PYX_ERR(0, 288, __pyx_L1_error)
7135 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementAverages", 0))) __PYX_ERR(0, 289, __pyx_L1_error)
7136 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 290, __pyx_L1_error)
7137 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 291, __pyx_L1_error)
7138 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 292, __pyx_L1_error)
7139 __pyx_r = __pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
7140
7141 /* function exit code */
7142 goto __pyx_L0;
7143 __pyx_L1_error:;
7144 __pyx_r = NULL;
7145 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7146 Py_XDECREF(values[__pyx_temp]);
7147 }
7148 goto __pyx_L7_cleaned_up;
7149 __pyx_L0:;
7150 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7151 Py_XDECREF(values[__pyx_temp]);
7152 }
7153 __pyx_L7_cleaned_up:;
7154
7155
7156
7157
7158
7159
7160
7161 __Pyx_RefNannyFinishContext();
7162 return __pyx_r;
7163}
7164
7165static PyObject *__pyx_pf_16ctimeIntegration_12applyDurlofskyDGlimiterP1Lagrange2d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
7166 PyObject *__pyx_r = NULL;
7167 __Pyx_RefNannyDeclarations
7168 __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange2d", 0);
7169
7170 /* "ctimeIntegration.pyx":293
7171 * np.ndarray Uin,
7172 * np.ndarray Uout):
7173 * capplyDurlofskyDGlimiterP1Lagrange2d(killExtrema, # <<<<<<<<<<<<<<
7174 * allowMinWithUndershoot,
7175 * nElements_global,
7176*/
7177 applyDurlofskyDGlimiterP1Lagrange2d(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_v0)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementAverages)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
7178
7179 /* "ctimeIntegration.pyx":273
7180 * <double*> Uout.data)
7181 *
7182 * def applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, # <<<<<<<<<<<<<<
7183 * int allowMinWithUndershoot,
7184 * int nElements_global,
7185*/
7186
7187 /* function exit code */
7188 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7189 __Pyx_XGIVEREF(__pyx_r);
7190 __Pyx_RefNannyFinishContext();
7191 return __pyx_r;
7192}
7193
7194/* "ctimeIntegration.pyx":314
7195 * <double*> Uout.data)
7196 *
7197 * def applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, # <<<<<<<<<<<<<<
7198 * int allowMinWithUndershoot,
7199 * int nElements_global,
7200*/
7201
7202/* Python wrapper */
7203static PyObject *__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d(PyObject *__pyx_self,
7204#if CYTHON_VECTORCALL
7205PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7206#else
7207PyObject *__pyx_args, PyObject *__pyx_kwds
7208#endif
7209); /*proto*/
7210static PyMethodDef __pyx_mdef_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d = {"applyDurlofskyDGlimiterP1Lagrange3d", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7211static PyObject *__pyx_pw_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d(PyObject *__pyx_self,
7212#if CYTHON_VECTORCALL
7213PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7214#else
7215PyObject *__pyx_args, PyObject *__pyx_kwds
7216#endif
7217) {
7218 int __pyx_v_killExtrema;
7219 int __pyx_v_allowMinWithUndershoot;
7220 int __pyx_v_nElements_global;
7221 int __pyx_v_nElementBoundaries_element;
7222 int __pyx_v_nNodes_element;
7223 int __pyx_v_nSpace;
7224 int __pyx_v_nDOF_element;
7225 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
7226 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
7227 PyArrayObject *__pyx_v_elementNodesArray = 0;
7228 PyArrayObject *__pyx_v_nodeArray = 0;
7229 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
7230 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
7231 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
7232 PyArrayObject *__pyx_v_l2g = 0;
7233 PyArrayObject *__pyx_v_grad_v0 = 0;
7234 PyArrayObject *__pyx_v_elementAverages = 0;
7235 PyArrayObject *__pyx_v_tag = 0;
7236 PyArrayObject *__pyx_v_Uin = 0;
7237 PyArrayObject *__pyx_v_Uout = 0;
7238 #if !CYTHON_VECTORCALL
7239 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7240 #endif
7241 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7242 PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
7243 int __pyx_lineno = 0;
7244 const char *__pyx_filename = NULL;
7245 int __pyx_clineno = 0;
7246 PyObject *__pyx_r = 0;
7247 __Pyx_RefNannyDeclarations
7248 __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange3d (wrapper)", 0);
7249 #if !CYTHON_VECTORCALL
7250 #if CYTHON_ASSUME_SAFE_SIZE
7251 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7252 #else
7253 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7254 #endif
7255 #endif
7256 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7257 {
7258 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_killExtrema,&__pyx_mstate_global->__pyx_n_u_allowMinWithUndershoot,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nSpace,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_grad_v0,&__pyx_mstate_global->__pyx_n_u_elementAverages,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
7259 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7260 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 314, __pyx_L3_error)
7261 if (__pyx_kwds_len > 0) {
7262 switch (__pyx_nargs) {
7263 case 20:
7264 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7265 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 314, __pyx_L3_error)
7266 CYTHON_FALLTHROUGH;
7267 case 19:
7268 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7269 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 314, __pyx_L3_error)
7270 CYTHON_FALLTHROUGH;
7271 case 18:
7272 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7273 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 314, __pyx_L3_error)
7274 CYTHON_FALLTHROUGH;
7275 case 17:
7276 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7277 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 314, __pyx_L3_error)
7278 CYTHON_FALLTHROUGH;
7279 case 16:
7280 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7281 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 314, __pyx_L3_error)
7282 CYTHON_FALLTHROUGH;
7283 case 15:
7284 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7285 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 314, __pyx_L3_error)
7286 CYTHON_FALLTHROUGH;
7287 case 14:
7288 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7289 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 314, __pyx_L3_error)
7290 CYTHON_FALLTHROUGH;
7291 case 13:
7292 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7293 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 314, __pyx_L3_error)
7294 CYTHON_FALLTHROUGH;
7295 case 12:
7296 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7297 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 314, __pyx_L3_error)
7298 CYTHON_FALLTHROUGH;
7299 case 11:
7300 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7301 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 314, __pyx_L3_error)
7302 CYTHON_FALLTHROUGH;
7303 case 10:
7304 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7305 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 314, __pyx_L3_error)
7306 CYTHON_FALLTHROUGH;
7307 case 9:
7308 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7309 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 314, __pyx_L3_error)
7310 CYTHON_FALLTHROUGH;
7311 case 8:
7312 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7313 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 314, __pyx_L3_error)
7314 CYTHON_FALLTHROUGH;
7315 case 7:
7316 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7317 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 314, __pyx_L3_error)
7318 CYTHON_FALLTHROUGH;
7319 case 6:
7320 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7321 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 314, __pyx_L3_error)
7322 CYTHON_FALLTHROUGH;
7323 case 5:
7324 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7325 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 314, __pyx_L3_error)
7326 CYTHON_FALLTHROUGH;
7327 case 4:
7328 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7329 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 314, __pyx_L3_error)
7330 CYTHON_FALLTHROUGH;
7331 case 3:
7332 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7333 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 314, __pyx_L3_error)
7334 CYTHON_FALLTHROUGH;
7335 case 2:
7336 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7337 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 314, __pyx_L3_error)
7338 CYTHON_FALLTHROUGH;
7339 case 1:
7340 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7341 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 314, __pyx_L3_error)
7342 CYTHON_FALLTHROUGH;
7343 case 0: break;
7344 default: goto __pyx_L5_argtuple_error;
7345 }
7346 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7347 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "applyDurlofskyDGlimiterP1Lagrange3d", 0) < (0)) __PYX_ERR(0, 314, __pyx_L3_error)
7348 for (Py_ssize_t i = __pyx_nargs; i < 20; i++) {
7349 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, i); __PYX_ERR(0, 314, __pyx_L3_error) }
7350 }
7351 } else if (unlikely(__pyx_nargs != 20)) {
7352 goto __pyx_L5_argtuple_error;
7353 } else {
7354 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7355 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 314, __pyx_L3_error)
7356 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7357 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 314, __pyx_L3_error)
7358 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7359 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 314, __pyx_L3_error)
7360 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7361 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 314, __pyx_L3_error)
7362 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7363 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 314, __pyx_L3_error)
7364 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7365 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 314, __pyx_L3_error)
7366 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7367 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 314, __pyx_L3_error)
7368 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7369 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 314, __pyx_L3_error)
7370 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7371 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 314, __pyx_L3_error)
7372 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7373 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 314, __pyx_L3_error)
7374 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7375 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 314, __pyx_L3_error)
7376 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7377 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 314, __pyx_L3_error)
7378 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7379 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 314, __pyx_L3_error)
7380 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7381 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 314, __pyx_L3_error)
7382 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7383 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 314, __pyx_L3_error)
7384 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7385 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 314, __pyx_L3_error)
7386 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7387 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 314, __pyx_L3_error)
7388 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7389 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 314, __pyx_L3_error)
7390 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7391 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 314, __pyx_L3_error)
7392 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7393 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 314, __pyx_L3_error)
7394 }
7395 __pyx_v_killExtrema = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_killExtrema == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
7396 __pyx_v_allowMinWithUndershoot = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_allowMinWithUndershoot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 315, __pyx_L3_error)
7397 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L3_error)
7398 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L3_error)
7399 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 318, __pyx_L3_error)
7400 __pyx_v_nSpace = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L3_error)
7401 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error)
7402 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[7]);
7403 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[8]);
7404 __pyx_v_elementNodesArray = ((PyArrayObject *)values[9]);
7405 __pyx_v_nodeArray = ((PyArrayObject *)values[10]);
7406 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[11]);
7407 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[12]);
7408 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[13]);
7409 __pyx_v_l2g = ((PyArrayObject *)values[14]);
7410 __pyx_v_grad_v0 = ((PyArrayObject *)values[15]);
7411 __pyx_v_elementAverages = ((PyArrayObject *)values[16]);
7412 __pyx_v_tag = ((PyArrayObject *)values[17]);
7413 __pyx_v_Uin = ((PyArrayObject *)values[18]);
7414 __pyx_v_Uout = ((PyArrayObject *)values[19]);
7415 }
7416 goto __pyx_L6_skip;
7417 __pyx_L5_argtuple_error:;
7418 __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange3d", 1, 20, 20, __pyx_nargs); __PYX_ERR(0, 314, __pyx_L3_error)
7419 __pyx_L6_skip:;
7420 goto __pyx_L4_argument_unpacking_done;
7421 __pyx_L3_error:;
7422 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7423 Py_XDECREF(values[__pyx_temp]);
7424 }
7425 __Pyx_AddTraceback("ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
7426 __Pyx_RefNannyFinishContext();
7427 return NULL;
7428 __pyx_L4_argument_unpacking_done:;
7429 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 321, __pyx_L1_error)
7430 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 322, __pyx_L1_error)
7431 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 323, __pyx_L1_error)
7432 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 324, __pyx_L1_error)
7433 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 325, __pyx_L1_error)
7434 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 326, __pyx_L1_error)
7435 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 327, __pyx_L1_error)
7436 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 328, __pyx_L1_error)
7437 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "grad_v0", 0))) __PYX_ERR(0, 329, __pyx_L1_error)
7438 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementAverages", 0))) __PYX_ERR(0, 330, __pyx_L1_error)
7439 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 331, __pyx_L1_error)
7440 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 332, __pyx_L1_error)
7441 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 333, __pyx_L1_error)
7442 __pyx_r = __pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
7443
7444 /* function exit code */
7445 goto __pyx_L0;
7446 __pyx_L1_error:;
7447 __pyx_r = NULL;
7448 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7449 Py_XDECREF(values[__pyx_temp]);
7450 }
7451 goto __pyx_L7_cleaned_up;
7452 __pyx_L0:;
7453 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7454 Py_XDECREF(values[__pyx_temp]);
7455 }
7456 __pyx_L7_cleaned_up:;
7457
7458
7459
7460
7461
7462
7463
7464 __Pyx_RefNannyFinishContext();
7465 return __pyx_r;
7466}
7467
7468static PyObject *__pyx_pf_16ctimeIntegration_14applyDurlofskyDGlimiterP1Lagrange3d(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
7469 PyObject *__pyx_r = NULL;
7470 __Pyx_RefNannyDeclarations
7471 __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange3d", 0);
7472
7473 /* "ctimeIntegration.pyx":334
7474 * np.ndarray Uin,
7475 * np.ndarray Uout):
7476 * capplyDurlofskyDGlimiterP1Lagrange3d(killExtrema, # <<<<<<<<<<<<<<
7477 * allowMinWithUndershoot,
7478 * nElements_global,
7479*/
7480 applyDurlofskyDGlimiterP1Lagrange3d(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_v0)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementAverages)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
7481
7482 /* "ctimeIntegration.pyx":314
7483 * <double*> Uout.data)
7484 *
7485 * def applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, # <<<<<<<<<<<<<<
7486 * int allowMinWithUndershoot,
7487 * int nElements_global,
7488*/
7489
7490 /* function exit code */
7491 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7492 __Pyx_XGIVEREF(__pyx_r);
7493 __Pyx_RefNannyFinishContext();
7494 return __pyx_r;
7495}
7496
7497/* "ctimeIntegration.pyx":355
7498 * <double*> Uout.data)
7499 *
7500 * def applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, # <<<<<<<<<<<<<<
7501 * int allowMinWithUndershoot,
7502 * int enforcePositivity,
7503*/
7504
7505/* Python wrapper */
7506static PyObject *__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(PyObject *__pyx_self,
7507#if CYTHON_VECTORCALL
7508PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7509#else
7510PyObject *__pyx_args, PyObject *__pyx_kwds
7511#endif
7512); /*proto*/
7513static PyMethodDef __pyx_mdef_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol = {"applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
7514static PyObject *__pyx_pw_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(PyObject *__pyx_self,
7515#if CYTHON_VECTORCALL
7516PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
7517#else
7518PyObject *__pyx_args, PyObject *__pyx_kwds
7519#endif
7520) {
7521 int __pyx_v_killExtrema;
7522 int __pyx_v_allowMinWithUndershoot;
7523 int __pyx_v_enforcePositivity;
7524 double __pyx_v_vacuumTol;
7525 int __pyx_v_nElements_global;
7526 int __pyx_v_nElementBoundaries_element;
7527 int __pyx_v_nNodes_element;
7528 int __pyx_v_nSpace;
7529 int __pyx_v_nDOF_element;
7530 PyArrayObject *__pyx_v_elementNeighborsArray = 0;
7531 PyArrayObject *__pyx_v_elementBoundariesArray = 0;
7532 PyArrayObject *__pyx_v_elementNodesArray = 0;
7533 PyArrayObject *__pyx_v_nodeArray = 0;
7534 PyArrayObject *__pyx_v_elementBarycentersArray = 0;
7535 PyArrayObject *__pyx_v_elementBoundaryBarycentersArray = 0;
7536 PyArrayObject *__pyx_v_elementNeighborShapeGradients = 0;
7537 PyArrayObject *__pyx_v_l2g = 0;
7538 PyArrayObject *__pyx_v_grad_v0 = 0;
7539 PyArrayObject *__pyx_v_elementAverages = 0;
7540 PyArrayObject *__pyx_v_tag = 0;
7541 PyArrayObject *__pyx_v_Uin = 0;
7542 PyArrayObject *__pyx_v_Uout = 0;
7543 #if !CYTHON_VECTORCALL
7544 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
7545 #endif
7546 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
7547 PyObject* values[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
7548 int __pyx_lineno = 0;
7549 const char *__pyx_filename = NULL;
7550 int __pyx_clineno = 0;
7551 PyObject *__pyx_r = 0;
7552 __Pyx_RefNannyDeclarations
7553 __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol (wrapper)", 0);
7554 #if !CYTHON_VECTORCALL
7555 #if CYTHON_ASSUME_SAFE_SIZE
7556 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
7557 #else
7558 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
7559 #endif
7560 #endif
7561 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
7562 {
7563 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_killExtrema,&__pyx_mstate_global->__pyx_n_u_allowMinWithUndershoot,&__pyx_mstate_global->__pyx_n_u_enforcePositivity,&__pyx_mstate_global->__pyx_n_u_vacuumTol,&__pyx_mstate_global->__pyx_n_u_nElements_global,&__pyx_mstate_global->__pyx_n_u_nElementBoundaries_element,&__pyx_mstate_global->__pyx_n_u_nNodes_element,&__pyx_mstate_global->__pyx_n_u_nSpace,&__pyx_mstate_global->__pyx_n_u_nDOF_element,&__pyx_mstate_global->__pyx_n_u_elementNeighborsArray,&__pyx_mstate_global->__pyx_n_u_elementBoundariesArray,&__pyx_mstate_global->__pyx_n_u_elementNodesArray,&__pyx_mstate_global->__pyx_n_u_nodeArray,&__pyx_mstate_global->__pyx_n_u_elementBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementBoundaryBarycentersArray,&__pyx_mstate_global->__pyx_n_u_elementNeighborShapeGradients,&__pyx_mstate_global->__pyx_n_u_l2g,&__pyx_mstate_global->__pyx_n_u_grad_v0,&__pyx_mstate_global->__pyx_n_u_elementAverages,&__pyx_mstate_global->__pyx_n_u_tag,&__pyx_mstate_global->__pyx_n_u_Uin,&__pyx_mstate_global->__pyx_n_u_Uout,0};
7564 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
7565 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 355, __pyx_L3_error)
7566 if (__pyx_kwds_len > 0) {
7567 switch (__pyx_nargs) {
7568 case 22:
7569 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
7570 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 355, __pyx_L3_error)
7571 CYTHON_FALLTHROUGH;
7572 case 21:
7573 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
7574 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 355, __pyx_L3_error)
7575 CYTHON_FALLTHROUGH;
7576 case 20:
7577 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7578 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 355, __pyx_L3_error)
7579 CYTHON_FALLTHROUGH;
7580 case 19:
7581 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7582 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 355, __pyx_L3_error)
7583 CYTHON_FALLTHROUGH;
7584 case 18:
7585 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7586 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 355, __pyx_L3_error)
7587 CYTHON_FALLTHROUGH;
7588 case 17:
7589 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7590 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 355, __pyx_L3_error)
7591 CYTHON_FALLTHROUGH;
7592 case 16:
7593 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7594 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 355, __pyx_L3_error)
7595 CYTHON_FALLTHROUGH;
7596 case 15:
7597 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7598 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 355, __pyx_L3_error)
7599 CYTHON_FALLTHROUGH;
7600 case 14:
7601 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7602 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 355, __pyx_L3_error)
7603 CYTHON_FALLTHROUGH;
7604 case 13:
7605 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7606 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 355, __pyx_L3_error)
7607 CYTHON_FALLTHROUGH;
7608 case 12:
7609 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7610 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 355, __pyx_L3_error)
7611 CYTHON_FALLTHROUGH;
7612 case 11:
7613 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7614 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 355, __pyx_L3_error)
7615 CYTHON_FALLTHROUGH;
7616 case 10:
7617 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7618 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 355, __pyx_L3_error)
7619 CYTHON_FALLTHROUGH;
7620 case 9:
7621 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7622 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 355, __pyx_L3_error)
7623 CYTHON_FALLTHROUGH;
7624 case 8:
7625 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7626 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 355, __pyx_L3_error)
7627 CYTHON_FALLTHROUGH;
7628 case 7:
7629 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7630 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 355, __pyx_L3_error)
7631 CYTHON_FALLTHROUGH;
7632 case 6:
7633 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7634 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 355, __pyx_L3_error)
7635 CYTHON_FALLTHROUGH;
7636 case 5:
7637 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7638 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 355, __pyx_L3_error)
7639 CYTHON_FALLTHROUGH;
7640 case 4:
7641 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7642 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 355, __pyx_L3_error)
7643 CYTHON_FALLTHROUGH;
7644 case 3:
7645 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7646 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 355, __pyx_L3_error)
7647 CYTHON_FALLTHROUGH;
7648 case 2:
7649 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7650 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 355, __pyx_L3_error)
7651 CYTHON_FALLTHROUGH;
7652 case 1:
7653 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7654 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error)
7655 CYTHON_FALLTHROUGH;
7656 case 0: break;
7657 default: goto __pyx_L5_argtuple_error;
7658 }
7659 const Py_ssize_t kwd_pos_args = __pyx_nargs;
7660 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 0) < (0)) __PYX_ERR(0, 355, __pyx_L3_error)
7661 for (Py_ssize_t i = __pyx_nargs; i < 22; i++) {
7662 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, i); __PYX_ERR(0, 355, __pyx_L3_error) }
7663 }
7664 } else if (unlikely(__pyx_nargs != 22)) {
7665 goto __pyx_L5_argtuple_error;
7666 } else {
7667 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
7668 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 355, __pyx_L3_error)
7669 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
7670 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 355, __pyx_L3_error)
7671 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
7672 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 355, __pyx_L3_error)
7673 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
7674 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 355, __pyx_L3_error)
7675 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
7676 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 355, __pyx_L3_error)
7677 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
7678 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 355, __pyx_L3_error)
7679 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
7680 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 355, __pyx_L3_error)
7681 values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
7682 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 355, __pyx_L3_error)
7683 values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
7684 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 355, __pyx_L3_error)
7685 values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
7686 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 355, __pyx_L3_error)
7687 values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10);
7688 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 355, __pyx_L3_error)
7689 values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11);
7690 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 355, __pyx_L3_error)
7691 values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12);
7692 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 355, __pyx_L3_error)
7693 values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13);
7694 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 355, __pyx_L3_error)
7695 values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14);
7696 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 355, __pyx_L3_error)
7697 values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15);
7698 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 355, __pyx_L3_error)
7699 values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16);
7700 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 355, __pyx_L3_error)
7701 values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17);
7702 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 355, __pyx_L3_error)
7703 values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18);
7704 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 355, __pyx_L3_error)
7705 values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19);
7706 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 355, __pyx_L3_error)
7707 values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20);
7708 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 355, __pyx_L3_error)
7709 values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21);
7710 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 355, __pyx_L3_error)
7711 }
7712 __pyx_v_killExtrema = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_killExtrema == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error)
7713 __pyx_v_allowMinWithUndershoot = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_allowMinWithUndershoot == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L3_error)
7714 __pyx_v_enforcePositivity = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_enforcePositivity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 357, __pyx_L3_error)
7715 __pyx_v_vacuumTol = __Pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_vacuumTol == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 358, __pyx_L3_error)
7716 __pyx_v_nElements_global = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L3_error)
7717 __pyx_v_nElementBoundaries_element = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_nElementBoundaries_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L3_error)
7718 __pyx_v_nNodes_element = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L3_error)
7719 __pyx_v_nSpace = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error)
7720 __pyx_v_nDOF_element = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_nDOF_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L3_error)
7721 __pyx_v_elementNeighborsArray = ((PyArrayObject *)values[9]);
7722 __pyx_v_elementBoundariesArray = ((PyArrayObject *)values[10]);
7723 __pyx_v_elementNodesArray = ((PyArrayObject *)values[11]);
7724 __pyx_v_nodeArray = ((PyArrayObject *)values[12]);
7725 __pyx_v_elementBarycentersArray = ((PyArrayObject *)values[13]);
7726 __pyx_v_elementBoundaryBarycentersArray = ((PyArrayObject *)values[14]);
7727 __pyx_v_elementNeighborShapeGradients = ((PyArrayObject *)values[15]);
7728 __pyx_v_l2g = ((PyArrayObject *)values[16]);
7729 __pyx_v_grad_v0 = ((PyArrayObject *)values[17]);
7730 __pyx_v_elementAverages = ((PyArrayObject *)values[18]);
7731 __pyx_v_tag = ((PyArrayObject *)values[19]);
7732 __pyx_v_Uin = ((PyArrayObject *)values[20]);
7733 __pyx_v_Uout = ((PyArrayObject *)values[21]);
7734 }
7735 goto __pyx_L6_skip;
7736 __pyx_L5_argtuple_error:;
7737 __Pyx_RaiseArgtupleInvalid("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 1, 22, 22, __pyx_nargs); __PYX_ERR(0, 355, __pyx_L3_error)
7738 __pyx_L6_skip:;
7739 goto __pyx_L4_argument_unpacking_done;
7740 __pyx_L3_error:;
7741 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7742 Py_XDECREF(values[__pyx_temp]);
7743 }
7744 __Pyx_AddTraceback("ctimeIntegration.applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", __pyx_clineno, __pyx_lineno, __pyx_filename);
7745 __Pyx_RefNannyFinishContext();
7746 return NULL;
7747 __pyx_L4_argument_unpacking_done:;
7748 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborsArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborsArray", 0))) __PYX_ERR(0, 364, __pyx_L1_error)
7749 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundariesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundariesArray", 0))) __PYX_ERR(0, 365, __pyx_L1_error)
7750 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNodesArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNodesArray", 0))) __PYX_ERR(0, 366, __pyx_L1_error)
7751 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "nodeArray", 0))) __PYX_ERR(0, 367, __pyx_L1_error)
7752 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBarycentersArray", 0))) __PYX_ERR(0, 368, __pyx_L1_error)
7753 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryBarycentersArray), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementBoundaryBarycentersArray", 0))) __PYX_ERR(0, 369, __pyx_L1_error)
7754 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementNeighborShapeGradients), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementNeighborShapeGradients", 0))) __PYX_ERR(0, 370, __pyx_L1_error)
7755 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l2g), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "l2g", 0))) __PYX_ERR(0, 371, __pyx_L1_error)
7756 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grad_v0), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "grad_v0", 0))) __PYX_ERR(0, 372, __pyx_L1_error)
7757 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementAverages), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "elementAverages", 0))) __PYX_ERR(0, 373, __pyx_L1_error)
7758 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "tag", 0))) __PYX_ERR(0, 374, __pyx_L1_error)
7759 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uin), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uin", 0))) __PYX_ERR(0, 375, __pyx_L1_error)
7760 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Uout), __pyx_mstate_global->__pyx_ptype_5numpy_ndarray, 1, "Uout", 0))) __PYX_ERR(0, 376, __pyx_L1_error)
7761 __pyx_r = __pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(__pyx_self, __pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, __pyx_v_elementNeighborsArray, __pyx_v_elementBoundariesArray, __pyx_v_elementNodesArray, __pyx_v_nodeArray, __pyx_v_elementBarycentersArray, __pyx_v_elementBoundaryBarycentersArray, __pyx_v_elementNeighborShapeGradients, __pyx_v_l2g, __pyx_v_grad_v0, __pyx_v_elementAverages, __pyx_v_tag, __pyx_v_Uin, __pyx_v_Uout);
7762
7763 /* function exit code */
7764 goto __pyx_L0;
7765 __pyx_L1_error:;
7766 __pyx_r = NULL;
7767 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7768 Py_XDECREF(values[__pyx_temp]);
7769 }
7770 goto __pyx_L7_cleaned_up;
7771 __pyx_L0:;
7772 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
7773 Py_XDECREF(values[__pyx_temp]);
7774 }
7775 __pyx_L7_cleaned_up:;
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785 __Pyx_RefNannyFinishContext();
7786 return __pyx_r;
7787}
7788
7789static PyObject *__pyx_pf_16ctimeIntegration_16applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_killExtrema, int __pyx_v_allowMinWithUndershoot, int __pyx_v_enforcePositivity, double __pyx_v_vacuumTol, int __pyx_v_nElements_global, int __pyx_v_nElementBoundaries_element, int __pyx_v_nNodes_element, int __pyx_v_nSpace, int __pyx_v_nDOF_element, PyArrayObject *__pyx_v_elementNeighborsArray, PyArrayObject *__pyx_v_elementBoundariesArray, PyArrayObject *__pyx_v_elementNodesArray, PyArrayObject *__pyx_v_nodeArray, PyArrayObject *__pyx_v_elementBarycentersArray, PyArrayObject *__pyx_v_elementBoundaryBarycentersArray, PyArrayObject *__pyx_v_elementNeighborShapeGradients, PyArrayObject *__pyx_v_l2g, PyArrayObject *__pyx_v_grad_v0, PyArrayObject *__pyx_v_elementAverages, PyArrayObject *__pyx_v_tag, PyArrayObject *__pyx_v_Uin, PyArrayObject *__pyx_v_Uout) {
7790 PyObject *__pyx_r = NULL;
7791 __Pyx_RefNannyDeclarations
7792 __Pyx_RefNannySetupContext("applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol", 0);
7793
7794 /* "ctimeIntegration.pyx":377
7795 * np.ndarray Uin,
7796 * np.ndarray Uout):
7797 * capplyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(killExtrema, # <<<<<<<<<<<<<<
7798 * allowMinWithUndershoot,
7799 * enforcePositivity,
7800*/
7801 applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(__pyx_v_killExtrema, __pyx_v_allowMinWithUndershoot, __pyx_v_enforcePositivity, __pyx_v_vacuumTol, __pyx_v_nElements_global, __pyx_v_nElementBoundaries_element, __pyx_v_nNodes_element, __pyx_v_nSpace, __pyx_v_nDOF_element, ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborsArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundariesArray)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNodesArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_nodeArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementBoundaryBarycentersArray)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementNeighborShapeGradients)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_l2g)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_grad_v0)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_elementAverages)), ((int *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_tag)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uin)), ((double *)__pyx_f_5numpy_7ndarray_4data___get__(__pyx_v_Uout)));
7802
7803 /* "ctimeIntegration.pyx":355
7804 * <double*> Uout.data)
7805 *
7806 * def applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, # <<<<<<<<<<<<<<
7807 * int allowMinWithUndershoot,
7808 * int enforcePositivity,
7809*/
7810
7811 /* function exit code */
7812 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7813 __Pyx_XGIVEREF(__pyx_r);
7814 __Pyx_RefNannyFinishContext();
7815 return __pyx_r;
7816}
7817/* #### Code section: module_exttypes ### */
7818
7819static PyMethodDef __pyx_methods[] = {
7820 {0, 0, 0, 0}
7821};
7822/* #### Code section: initfunc_declarations ### */
7823static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
7824static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
7825static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
7826static CYTHON_SMALL_CODE int __Pyx_InitAfterSharedUtility(void); /*proto*/
7827static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
7828static CYTHON_SMALL_CODE int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
7829static CYTHON_SMALL_CODE int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
7830static CYTHON_SMALL_CODE int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
7831static CYTHON_SMALL_CODE int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
7832static CYTHON_SMALL_CODE int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
7833static CYTHON_SMALL_CODE int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
7834static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
7835/* #### Code section: init_module ### */
7836
7837static int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate) {
7838 __Pyx_RefNannyDeclarations
7839 CYTHON_UNUSED_VAR(__pyx_mstate);
7840 __Pyx_RefNannySetupContext("__Pyx_modinit_Global_init_code", 0);
7841 /*--- Global init code ---*/
7842 __Pyx_RefNannyFinishContext();
7843 return 0;
7844}
7845
7846static int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate) {
7847 __Pyx_RefNannyDeclarations
7848 CYTHON_UNUSED_VAR(__pyx_mstate);
7849 __Pyx_RefNannySetupContext("__Pyx_modinit_Variable_export_code", 0);
7850 /*--- Variable export code ---*/
7851 __Pyx_RefNannyFinishContext();
7852 return 0;
7853}
7854
7855static int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate) {
7856 __Pyx_RefNannyDeclarations
7857 CYTHON_UNUSED_VAR(__pyx_mstate);
7858 __Pyx_RefNannySetupContext("__Pyx_modinit_Function_export_code", 0);
7859 /*--- Function export code ---*/
7860 __Pyx_RefNannyFinishContext();
7861 return 0;
7862}
7863
7864static int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate) {
7865 __Pyx_RefNannyDeclarations
7866 PyObject *__pyx_t_1 = NULL;
7867 int __pyx_lineno = 0;
7868 const char *__pyx_filename = NULL;
7869 int __pyx_clineno = 0;
7870 CYTHON_UNUSED_VAR(__pyx_mstate);
7871 __Pyx_RefNannySetupContext("__Pyx_modinit_Type_import_code", 0);
7872 /*--- Type import code ---*/
7873 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
7874 __Pyx_GOTREF(__pyx_t_1);
7875 __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_3_0(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
7876 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7877 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyTypeObject),
7878 #elif CYTHON_COMPILING_IN_LIMITED_API
7879 0, 0,
7880 #else
7881 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyHeapTypeObject),
7882 #endif
7883 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
7884 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7885 __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
7886 __Pyx_GOTREF(__pyx_t_1);
7887 __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "dtype",
7888 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7889 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
7890 #elif CYTHON_COMPILING_IN_LIMITED_API
7891 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
7892 #else
7893 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
7894 #endif
7895 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 229, __pyx_L1_error)
7896 __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "flatiter",
7897 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7898 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
7899 #elif CYTHON_COMPILING_IN_LIMITED_API
7900 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
7901 #else
7902 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
7903 #endif
7904 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 286, __pyx_L1_error)
7905 __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "broadcast",
7906 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7907 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
7908 #elif CYTHON_COMPILING_IN_LIMITED_API
7909 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
7910 #else
7911 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
7912 #endif
7913 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 290, __pyx_L1_error)
7914 __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "ndarray",
7915 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7916 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
7917 #elif CYTHON_COMPILING_IN_LIMITED_API
7918 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
7919 #else
7920 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
7921 #endif
7922 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 329, __pyx_L1_error)
7923 __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "generic",
7924 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7925 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7926 #elif CYTHON_COMPILING_IN_LIMITED_API
7927 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7928 #else
7929 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7930 #endif
7931 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(1, 847, __pyx_L1_error)
7932 __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "number",
7933 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7934 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7935 #elif CYTHON_COMPILING_IN_LIMITED_API
7936 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7937 #else
7938 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7939 #endif
7940 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(1, 849, __pyx_L1_error)
7941 __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "integer",
7942 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7943 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7944 #elif CYTHON_COMPILING_IN_LIMITED_API
7945 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7946 #else
7947 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7948 #endif
7949 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(1, 851, __pyx_L1_error)
7950 __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "signedinteger",
7951 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7952 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7953 #elif CYTHON_COMPILING_IN_LIMITED_API
7954 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7955 #else
7956 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7957 #endif
7958 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 853, __pyx_L1_error)
7959 __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "unsignedinteger",
7960 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7961 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7962 #elif CYTHON_COMPILING_IN_LIMITED_API
7963 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7964 #else
7965 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7966 #endif
7967 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 855, __pyx_L1_error)
7968 __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "inexact",
7969 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7970 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7971 #elif CYTHON_COMPILING_IN_LIMITED_API
7972 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7973 #else
7974 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7975 #endif
7976 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 857, __pyx_L1_error)
7977 __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "floating",
7978 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7979 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7980 #elif CYTHON_COMPILING_IN_LIMITED_API
7981 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7982 #else
7983 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7984 #endif
7985 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(1, 859, __pyx_L1_error)
7986 __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "complexfloating",
7987 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7988 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7989 #elif CYTHON_COMPILING_IN_LIMITED_API
7990 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7991 #else
7992 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7993 #endif
7994 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 861, __pyx_L1_error)
7995 __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "flexible",
7996 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
7997 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
7998 #elif CYTHON_COMPILING_IN_LIMITED_API
7999 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8000 #else
8001 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8002 #endif
8003 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 863, __pyx_L1_error)
8004 __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "character",
8005 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
8006 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8007 #elif CYTHON_COMPILING_IN_LIMITED_API
8008 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8009 #else
8010 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
8011 #endif
8012 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(1, 865, __pyx_L1_error)
8013 __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "ufunc",
8014 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
8015 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
8016 #elif CYTHON_COMPILING_IN_LIMITED_API
8017 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
8018 #else
8019 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
8020 #endif
8021 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 946, __pyx_L1_error)
8022 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8023 __Pyx_RefNannyFinishContext();
8024 return 0;
8025 __pyx_L1_error:;
8026 __Pyx_XDECREF(__pyx_t_1);
8027 __Pyx_RefNannyFinishContext();
8028 return -1;
8029}
8030
8031static int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate) {
8032 __Pyx_RefNannyDeclarations
8033 CYTHON_UNUSED_VAR(__pyx_mstate);
8034 __Pyx_RefNannySetupContext("__Pyx_modinit_Variable_import_code", 0);
8035 /*--- Variable import code ---*/
8036 __Pyx_RefNannyFinishContext();
8037 return 0;
8038}
8039
8040static int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate) {
8041 __Pyx_RefNannyDeclarations
8042 CYTHON_UNUSED_VAR(__pyx_mstate);
8043 __Pyx_RefNannySetupContext("__Pyx_modinit_Function_import_code", 0);
8044 /*--- Function import code ---*/
8045 __Pyx_RefNannyFinishContext();
8046 return 0;
8047}
8048
8049#if CYTHON_PEP489_MULTI_PHASE_INIT
8050static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
8051static int __pyx_pymod_exec_ctimeIntegration(PyObject* module); /*proto*/
8052static PyModuleDef_Slot __pyx_moduledef_slots[] = {
8053 {Py_mod_create, (void*)__pyx_pymod_create},
8054 {Py_mod_exec, (void*)__pyx_pymod_exec_ctimeIntegration},
8055 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
8056 {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
8057 #endif
8058 #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
8059 {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
8060 #endif
8061 {0, NULL}
8062};
8063#endif
8064
8065#ifdef __cplusplus
8066namespace {
8067 struct PyModuleDef __pyx_moduledef =
8068 #else
8069 static struct PyModuleDef __pyx_moduledef =
8070 #endif
8071 {
8072 PyModuleDef_HEAD_INIT,
8073 "ctimeIntegration",
8074 0, /* m_doc */
8075 #if CYTHON_USE_MODULE_STATE
8076 sizeof(__pyx_mstatetype), /* m_size */
8077 #else
8078 (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
8079 #endif
8080 __pyx_methods /* m_methods */,
8081 #if CYTHON_PEP489_MULTI_PHASE_INIT
8082 __pyx_moduledef_slots, /* m_slots */
8083 #else
8084 NULL, /* m_reload */
8085 #endif
8086 #if CYTHON_USE_MODULE_STATE
8087 __pyx_m_traverse, /* m_traverse */
8088 __pyx_m_clear, /* m_clear */
8089 NULL /* m_free */
8090 #else
8091 NULL, /* m_traverse */
8092 NULL, /* m_clear */
8093 NULL /* m_free */
8094 #endif
8095 };
8096 #ifdef __cplusplus
8097} /* anonymous namespace */
8098#endif
8099
8100/* PyModInitFuncType */
8101#ifndef CYTHON_NO_PYINIT_EXPORT
8102 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
8103#else
8104 #ifdef __cplusplus
8105 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
8106 #else
8107 #define __Pyx_PyMODINIT_FUNC PyObject *
8108 #endif
8109#endif
8110
8111__Pyx_PyMODINIT_FUNC PyInit_ctimeIntegration(void) CYTHON_SMALL_CODE; /*proto*/
8112__Pyx_PyMODINIT_FUNC PyInit_ctimeIntegration(void)
8113#if CYTHON_PEP489_MULTI_PHASE_INIT
8114{
8115 return PyModuleDef_Init(&__pyx_moduledef);
8116}
8117/* ModuleCreationPEP489 */
8118#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
8119 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
8120static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
8121 {
8122 PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
8123 if (!module) {
8124 if (!PyErr_ExceptionMatches(PyExc_Exception)) {
8125 goto bad; // BaseException
8126 }
8127 PyErr_Clear(); // just try the 3.8-3.12 version
8128 module = PyImport_ImportModule("_xxsubinterpreters");
8129 if (!module) goto bad;
8130 }
8131 PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
8132 Py_DECREF(module);
8133 if (!current) goto bad;
8134 if (PyTuple_Check(current)) {
8135 PyObject *new_current = PySequence_GetItem(current, 0);
8136 Py_DECREF(current);
8137 current = new_current;
8138 if (!new_current) goto bad;
8139 }
8140 long long as_c_int = PyLong_AsLongLong(current);
8141 Py_DECREF(current);
8142 return as_c_int;
8143 }
8144 bad:
8145 PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
8146 return -1;
8147}
8148#endif
8149#if !CYTHON_USE_MODULE_STATE
8150static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
8151 static PY_INT64_T main_interpreter_id = -1;
8152#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
8153 PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
8154#elif CYTHON_COMPILING_IN_GRAAL
8155 PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
8156#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
8157 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
8158 PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
8159#elif CYTHON_COMPILING_IN_LIMITED_API
8160 PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
8161#else
8162 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
8163#endif
8164 if (unlikely(current_id == -1)) {
8165 return -1;
8166 }
8167 if (main_interpreter_id == -1) {
8168 main_interpreter_id = current_id;
8169 return 0;
8170 } else if (unlikely(main_interpreter_id != current_id)) {
8171 PyErr_SetString(
8172 PyExc_ImportError,
8173 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
8174 return -1;
8175 }
8176 return 0;
8177}
8178#endif
8179static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
8180{
8181 PyObject *value = PyObject_GetAttrString(spec, from_name);
8182 int result = 0;
8183 if (likely(value)) {
8184 if (allow_none || value != Py_None) {
8185 result = PyDict_SetItemString(moddict, to_name, value);
8186 }
8187 Py_DECREF(value);
8188 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
8189 PyErr_Clear();
8190 } else {
8191 result = -1;
8192 }
8193 return result;
8194}
8195static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
8196 PyObject *module = NULL, *moddict, *modname;
8197 CYTHON_UNUSED_VAR(def);
8198 #if !CYTHON_USE_MODULE_STATE
8199 if (__Pyx_check_single_interpreter())
8200 return NULL;
8201 #endif
8202 if (__pyx_m)
8203 return __Pyx_NewRef(__pyx_m);
8204 modname = PyObject_GetAttrString(spec, "name");
8205 if (unlikely(!modname)) goto bad;
8206 module = PyModule_NewObject(modname);
8207 Py_DECREF(modname);
8208 if (unlikely(!module)) goto bad;
8209 moddict = PyModule_GetDict(module);
8210 if (unlikely(!moddict)) goto bad;
8211 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
8212 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
8213 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
8214 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
8215 return module;
8216bad:
8217 Py_XDECREF(module);
8218 return NULL;
8219}
8220
8221
8222static CYTHON_SMALL_CODE int __pyx_pymod_exec_ctimeIntegration(PyObject *__pyx_pyinit_module)
8223#endif
8224{
8225 int stringtab_initialized = 0;
8226 #if CYTHON_USE_MODULE_STATE
8227 int pystate_addmodule_run = 0;
8228 #endif
8229 __pyx_mstatetype *__pyx_mstate = NULL;
8230 PyObject *__pyx_t_1 = NULL;
8231 PyObject *__pyx_t_2 = NULL;
8232 int __pyx_lineno = 0;
8233 const char *__pyx_filename = NULL;
8234 int __pyx_clineno = 0;
8235 __Pyx_RefNannyDeclarations
8236 #if CYTHON_PEP489_MULTI_PHASE_INIT
8237 if (__pyx_m) {
8238 if (__pyx_m == __pyx_pyinit_module) return 0;
8239 PyErr_SetString(PyExc_RuntimeError, "Module 'ctimeIntegration' has already been imported. Re-initialisation is not supported.");
8240 return -1;
8241 }
8242 #else
8243 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
8244 #endif
8245 /*--- Module creation code ---*/
8246 #if CYTHON_PEP489_MULTI_PHASE_INIT
8247 __pyx_t_1 = __pyx_pyinit_module;
8248 Py_INCREF(__pyx_t_1);
8249 #else
8250 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
8251 #endif
8252 #if CYTHON_USE_MODULE_STATE
8253 {
8254 int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
8255 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "ctimeIntegration" pseudovariable */
8256 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
8257 pystate_addmodule_run = 1;
8258 }
8259 #else
8260 __pyx_m = __pyx_t_1;
8261 #endif
8262 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
8263 PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
8264 #endif
8265 __pyx_mstate = __pyx_mstate_global;
8266 CYTHON_UNUSED_VAR(__pyx_t_1);
8267 __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
8268 Py_INCREF(__pyx_mstate->__pyx_d);
8269 __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
8270 __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
8271 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
8272 /* ImportRefnannyAPI */
8273 #if CYTHON_REFNANNY
8274 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
8275 if (!__Pyx_RefNanny) {
8276 if (PyErr_ExceptionMatches(PyExc_Exception)) {
8277 PyErr_Clear();
8278 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
8279 }
8280 if (!__Pyx_RefNanny)
8281 Py_FatalError("failed to import 'refnanny' module");
8282 }
8283 #endif
8284
8285__Pyx_RefNannySetupContext("PyInit_ctimeIntegration", 0);
8286 __Pyx_init_runtime_version();
8287 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)
8288 __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
8289 __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
8290 __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
8291 /*--- Library function declarations ---*/
8292 /*--- Initialize various global constants etc. ---*/
8293 if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8294 stringtab_initialized = 1;
8295 if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8296 if (__pyx_module_is_main_ctimeIntegration) {
8297 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)
8298 }
8299 {
8300 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
8301 if (!PyDict_GetItemString(modules, "ctimeIntegration")) {
8302 if (unlikely((PyDict_SetItemString(modules, "ctimeIntegration", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
8303 }
8304 }
8305 /*--- Builtin init code ---*/
8306 if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8307 /*--- Constants init code ---*/
8308 if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8309 if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8310 /*--- Global type/function init code ---*/
8311 (void)__Pyx_modinit_Global_init_code(__pyx_mstate);
8312 (void)__Pyx_modinit_Variable_export_code(__pyx_mstate);
8313 (void)__Pyx_modinit_Function_export_code(__pyx_mstate);
8314 /*--- Type init code ---*/
8315 if (unlikely((__Pyx_modinit_Type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
8316 (void)__Pyx_modinit_Variable_import_code(__pyx_mstate);
8317 (void)__Pyx_modinit_Function_import_code(__pyx_mstate);
8318 if (__Pyx_InitAfterSharedUtility() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
8319 /*--- Execution code ---*/
8320
8321 /* "ctimeIntegration.pyx":3
8322 * # A type of -*- python -*- file
8323 * # cython: language_level=3
8324 * import numpy as np # <<<<<<<<<<<<<<
8325 * cimport numpy as np
8326 * cdef extern from "timeIntegration.h":
8327*/
8328 __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
8329 __pyx_t_2 = __pyx_t_1;
8330 __Pyx_GOTREF(__pyx_t_2);
8331 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 3, __pyx_L1_error)
8332 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8333
8334 /* "ctimeIntegration.pyx":144
8335 * double* Uout)
8336 * # ------------------------------------------- #
8337 * def psiTCtteDT(int nPoints, # <<<<<<<<<<<<<<
8338 * double tau,
8339 * double dtn,
8340*/
8341 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_1psiTCtteDT, 0, __pyx_mstate_global->__pyx_n_u_psiTCtteDT, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
8342 __Pyx_GOTREF(__pyx_t_2);
8343 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8344 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8345 #endif
8346 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_psiTCtteDT, __pyx_t_2) < (0)) __PYX_ERR(0, 144, __pyx_L1_error)
8347 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8348
8349 /* "ctimeIntegration.pyx":161
8350 * <double*> dtnp1.data)
8351 *
8352 * def applyDGlimitingP1Lagrange1d(int limiterFlag, # <<<<<<<<<<<<<<
8353 * int nElements_global,
8354 * int nNodes_element,
8355*/
8356 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_3applyDGlimitingP1Lagrange1d, 0, __pyx_mstate_global->__pyx_n_u_applyDGlimitingP1Lagrange1d, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
8357 __Pyx_GOTREF(__pyx_t_2);
8358 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8359 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8360 #endif
8361 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDGlimitingP1Lagrange1d, __pyx_t_2) < (0)) __PYX_ERR(0, 161, __pyx_L1_error)
8362 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8363
8364 /* "ctimeIntegration.pyx":188
8365 * <double*> Uout.data)
8366 *
8367 * def applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, # <<<<<<<<<<<<<<
8368 * double vacuumTol,
8369 * int nElements_global,
8370*/
8371 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_5applyDGlimitingP1Lagrange1d_withVacuumTol, 0, __pyx_mstate_global->__pyx_n_u_applyDGlimitingP1Lagrange1d_with, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
8372 __Pyx_GOTREF(__pyx_t_2);
8373 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8374 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8375 #endif
8376 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDGlimitingP1Lagrange1d_with, __pyx_t_2) < (0)) __PYX_ERR(0, 188, __pyx_L1_error)
8377 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8378
8379 /* "ctimeIntegration.pyx":218
8380 *
8381 *
8382 * def computeElementNeighborShapeGradients(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
8383 * np.ndarray elementNeighborsArray,
8384 * np.ndarray elementBarycentersArray,
8385*/
8386 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_7computeElementNeighborShapeGradients, 0, __pyx_mstate_global->__pyx_n_u_computeElementNeighborShapeGradi, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
8387 __Pyx_GOTREF(__pyx_t_2);
8388 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8389 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8390 #endif
8391 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_computeElementNeighborShapeGradi, __pyx_t_2) < (0)) __PYX_ERR(0, 218, __pyx_L1_error)
8392 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8393
8394 /* "ctimeIntegration.pyx":232
8395 * <double*> elementNeighborShapeGradients.data)
8396 *
8397 * def computeCockburnDGlimiterArrays2d(np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
8398 * np.ndarray elementNeighborsArray,
8399 * np.ndarray elementBarycentersArray,
8400*/
8401 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_9computeCockburnDGlimiterArrays2d, 0, __pyx_mstate_global->__pyx_n_u_computeCockburnDGlimiterArrays2d, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
8402 __Pyx_GOTREF(__pyx_t_2);
8403 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8404 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8405 #endif
8406 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_computeCockburnDGlimiterArrays2d, __pyx_t_2) < (0)) __PYX_ERR(0, 232, __pyx_L1_error)
8407 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8408
8409 /* "ctimeIntegration.pyx":250
8410 * <int*> alphaNeighbors.data)
8411 *
8412 * def applyCockburnDGlimiterP1Lagrange2d(double nu, # <<<<<<<<<<<<<<
8413 * double Mh2,
8414 * np.ndarray elementNeighborsArray,
8415*/
8416 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_11applyCockburnDGlimiterP1Lagrange2d, 0, __pyx_mstate_global->__pyx_n_u_applyCockburnDGlimiterP1Lagrange, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
8417 __Pyx_GOTREF(__pyx_t_2);
8418 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8419 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8420 #endif
8421 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyCockburnDGlimiterP1Lagrange, __pyx_t_2) < (0)) __PYX_ERR(0, 250, __pyx_L1_error)
8422 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8423
8424 /* "ctimeIntegration.pyx":273
8425 * <double*> Uout.data)
8426 *
8427 * def applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, # <<<<<<<<<<<<<<
8428 * int allowMinWithUndershoot,
8429 * int nElements_global,
8430*/
8431 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_13applyDurlofskyDGlimiterP1Lagrange2d, 0, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
8432 __Pyx_GOTREF(__pyx_t_2);
8433 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8434 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8435 #endif
8436 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang, __pyx_t_2) < (0)) __PYX_ERR(0, 273, __pyx_L1_error)
8437 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8438
8439 /* "ctimeIntegration.pyx":314
8440 * <double*> Uout.data)
8441 *
8442 * def applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, # <<<<<<<<<<<<<<
8443 * int allowMinWithUndershoot,
8444 * int nElements_global,
8445*/
8446 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_15applyDurlofskyDGlimiterP1Lagrange3d, 0, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_2, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error)
8447 __Pyx_GOTREF(__pyx_t_2);
8448 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8449 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8450 #endif
8451 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_2, __pyx_t_2) < (0)) __PYX_ERR(0, 314, __pyx_L1_error)
8452 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8453
8454 /* "ctimeIntegration.pyx":355
8455 * <double*> Uout.data)
8456 *
8457 * def applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, # <<<<<<<<<<<<<<
8458 * int allowMinWithUndershoot,
8459 * int enforcePositivity,
8460*/
8461 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_16ctimeIntegration_17applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol, 0, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_3, NULL, __pyx_mstate_global->__pyx_n_u_ctimeIntegration, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
8462 __Pyx_GOTREF(__pyx_t_2);
8463 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
8464 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
8465 #endif
8466 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_3, __pyx_t_2) < (0)) __PYX_ERR(0, 355, __pyx_L1_error)
8467 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8468
8469 /* "ctimeIntegration.pyx":1
8470 * # A type of -*- python -*- file # <<<<<<<<<<<<<<
8471 * # cython: language_level=3
8472 * import numpy as np
8473*/
8474 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
8475 __Pyx_GOTREF(__pyx_t_2);
8476 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)
8477 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8478
8479 /*--- Wrapped vars code ---*/
8480
8481 goto __pyx_L0;
8482 __pyx_L1_error:;
8483 __Pyx_XDECREF(__pyx_t_2);
8484 if (__pyx_m) {
8485 if (__pyx_mstate->__pyx_d && stringtab_initialized) {
8486 __Pyx_AddTraceback("init ctimeIntegration", __pyx_clineno, __pyx_lineno, __pyx_filename);
8487 }
8488 #if !CYTHON_USE_MODULE_STATE
8489 Py_CLEAR(__pyx_m);
8490 #else
8491 Py_DECREF(__pyx_m);
8492 if (pystate_addmodule_run) {
8493 PyObject *tp, *value, *tb;
8494 __Pyx_PyErr_FetchException(&tp, &value, &tb);
8495 __Pyx_State_RemoveModule(&__pyx_moduledef);
8496 __Pyx_PyErr_RestoreException(tp, value, tb);
8497 }
8498 #endif
8499 } else if (!PyErr_Occurred()) {
8500 PyErr_SetString(PyExc_ImportError, "init ctimeIntegration");
8501 }
8502 __pyx_L0:;
8503 __Pyx_RefNannyFinishContext();
8504 #if CYTHON_PEP489_MULTI_PHASE_INIT
8505 return (__pyx_m != NULL) ? 0 : -1;
8506 #else
8507 return __pyx_m;
8508 #endif
8509}
8510/* #### Code section: pystring_table ### */
8511/* #### Code section: cached_builtins ### */
8512
8513static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
8514 CYTHON_UNUSED_VAR(__pyx_mstate);
8515
8516 /* Cached unbound methods */
8517 __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
8518 __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
8519 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
8520 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
8521 __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
8522 __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
8523 return 0;
8524}
8525/* #### Code section: cached_constants ### */
8526
8527static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
8528 __Pyx_RefNannyDeclarations
8529 CYTHON_UNUSED_VAR(__pyx_mstate);
8530 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
8531 __Pyx_RefNannyFinishContext();
8532 return 0;
8533}
8534/* #### Code section: init_constants ### */
8535
8536static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
8537 int __pyx_lineno = 0;
8538 const char *__pyx_filename = NULL;
8539 int __pyx_clineno = 0;
8540 CYTHON_UNUSED_VAR(__pyx_mstate);
8541 {
8542 const struct { const unsigned int length: 8; } str_length_index[] = {{1},{179},{8},{39},{34},{28},{3},{3},{4},{20},{12},{8},{8},{10},{8},{12},{8},{13},{22},{14},{6},{34},{27},{41},{35},{49},{35},{18},{18},{32},{36},{16},{3},{5},{5},{15},{23},{22},{31},{29},{21},{17},{17},{7},{5},{11},{3},{11},{12},{26},{16},{14},{7},{6},{9},{2},{2},{5},{3},{10},{10},{3},{3},{9},{6},{2},{3},{5}};
8543 const struct { const unsigned int length: 8; } bytes_length_index[] = {{80},{94},{48},{104},{82},{85},{126},{126},{132}};
8544 #ifndef CYTHON_COMPRESS_STRINGS
8545 #define CYTHON_COMPRESS_STRINGS 90
8546 #endif
8547 #if (CYTHON_COMPRESS_STRINGS) == 1 /* compression: zlib (1106 bytes) */
8548static const char cstring[] = "x\332\225SKo\333F\020\226\222(E\003\303\256\034 \250\033\333\241,?\024\243\225J\333u\232\246\255\253X\266a q\244\332N\321K\211\025\271\222\266&w)\356R6/m\217>\372\250#\217<\362\250\243~\002\217\374\031\375\t\235\245\036~\305\006*\214\370\355\316\314\316\314~3\273u\300\004VD\013\te\333\023-F\025\302\025\003\233\244\216\035$\260\351)\\8D\027\330\221NT\251\356T\277\331\370~CA\324P\034\374\047\326\005W\270[\327M\3049\346\nk(u\227\230\202PEx6\346Ee\277\241x\314U(\306\206\"\230b\203\337\325\003\242\205\251\302\261\220\013e\005Q\312\004\022\204Q\r\216\023\332\\Q\014\342@\022\322\301\362\364.29.\"\303\320\300\017S\327\262\275\242\2463\007\027-\027\222\"\307A\236\322@\304\034$#\226\315\034q\325\315\265\220h\335\362\260\035\210\346\362\022\344\261\360>\025\270\351$E\024m\357\354}k\355\230\320c\346\nM\253zg\360\257\000\035\332\001>\023\277\342\206\246\rK\306\032\374\032.\325%Z\210\320\004\231\341\232\211\205\"+\301\266\213\314\321Z`\01615\302ei\020\237P\214L\223\235\276\047\3647\"Z\307\324\300\016o1\210n\332-t\200I\263Ug\016Ov\034\331\266\351m3\375\244\356:\264\262g\022\213@\217\252\352;\004\265\323&^3\022\217\241\005\230\2744\251\367\231\264SH\375\021\351\256k\0351s\340\350:&k\360\023\357\2364\367\272\374\317\230\353\006\342\036\325\t+\216y\341\272\t_\rX\025\016\322q\035\351\047:\263lW\340[\024\224\345\014\3605ch\3371\261\205\251\030\261w\330B6\336s\220A@\311o\366\333\020R,\025>\266\212\007\047\313\035x\010M\314\207\333\267\310\361t@hM\222i\244f.5\220C\360\247\264\336\035\207>]\324\r\343\365\023\314\030e\240\r\346\350\270\3128\264\260C\204\007W0\264\316\267@\201\305O\210i\356\234\t\007[\310\\k\016\211\3315Q\223V>\354j\303Xt\347f\3517-\\k\232\254\016\003\233\244\035[\253\214\200\215\036\332\320\t\n\226\244\036jS7yh6\263mN\216\266\205\300\225#x\330\006n x\233\0025\005r;\243!\350 \323\305\320e\317\226b\251\377\244\377}\222\312\254\006\331hu\253\327\351\327\372(\236\314\373\233A6\310\215\026\013A9\250\3053J\244l\206(\301\357B\330\347\243\374\017\275\\\202o\373\003\374\245\237""\206x\223\251\314\262_\213\226\337\3646\373Y\260<y\321\355\3705\037\215\026\365 \035d\343\371\245h\351MOMP\306\231/D\205\255^;\301\275\376\000w\3725\300\340q\200\300\315\377#\224\325~\221z4u\216\316\333\361\344\324H\276\354>\350\346\342\211g\027z7+\001wU\251\314tk\340?\235\312\024\374v\220\216\013/\343\302O\275\217}\265_\216\047r\376\263D9\\<\010r\201\032OL\235w.j\027(.\224\242R\005\334\n\245\200\207\2711\254\205\313\275\264\334\375\325\253\311]>L`1D\220\347\253T&\347\247\375l<7\177E\026\243\305\204\2541i\376\353\240|\311\235\342?\364\3251\344\375u`\t`\303oC\304\331T\246\024\240\240\035?\237\275.\013\321\302z\250&\370*\004\363\222\377;0\364\034\210\374\261W\006\265\237\367kcX\362\017\341\236\000GA\026\202\026R\231\227\t\377\327\312\034\027\373\272\227MPV7*~n\305\367\3024@\264\362s\017%\270\333\037\240$in\321\337\366\333\322\3534\220Z\377o\230\222K%\207A\002\020\201\232d\177\274\232\214\326\374\213[2\232\203+s!\347\r\372\377y\230\275{<\006\367\003\257\317\002\251\r\246\200\221K\345Ch+\300\243\240\014\331\277Ne^\205\010\354\323O\357\220\231h\246\010\227\220X\202p\022W\241\332\351\331\356>p9=\033\315J\342%\312\022%J\302\246g\272O\273e\351\265\347Km\367\003d\275Tnw\333\022*~\372?L\217\036\365";
8549 PyObject *data = __Pyx_DecompressString(cstring, 1106, 1);
8550 #define __Pyx_DecompressString_LZSS_UNUSED
8551 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
8552 const char* const bytes = __Pyx_PyBytes_AsString(data);
8553 #if !CYTHON_ASSUME_SAFE_MACROS
8554 if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
8555 #endif
8556 #elif (CYTHON_COMPRESS_STRINGS) > 0 && (CYTHON_COMPRESS_STRINGS) <= 90 /* compression: lzss (1444 bytes) */
8557static const char cstring[] = "\377?Note th\377at Cytho\377n is del\377iberatel\377y strict\373er!\001n PEP\377-484 and\377 rejects\377 subclas\377ses of b\377uiltin t\377ypes. If\377 you nee?d to p%\000%\t\377then set\376\200\000e \047anno\177tation_<\000\377ing\047 dir\366b\000iv\242\000o Fa\377lse.add_\376%\000enumpy.\377_core.mu\376r\000array f\367ailg\003impo\373rt\033\tumath\366\021\016pr\202 us/c\377timeInte\373gr\200\002.pyxM\377h2UinUou\277t__Pyx\001\000D\376\214 _NextRe\367f__\254\004e___\337_func\004\001ma{in\003\002odul\025\002\367nam\035\002qual\356\004\005tesQ\000_is\374\276\001]\000ineall\377owMinWit\377hUndersh\375o\216 lphaNe\377ighborsa\376\n\001sapplyC\377ockburnD\337Glimi\241@P1\373La\271\000nge2d\320\035\002\023\004\307 \021\0071\000\030d_\375wx\000Vacuum\367Tol>\003urlo\217fskyL\030\006\032%,3\377dasyncio\271.\327@\222#scl\233 _\376\323 traceba\377ckcomputue\362\016A\200as2d\031\004\177Element\266%\377ShapeGra\353di\022\000s\340Mdtnv\000\000m1\005\000p1e4\003\377Averages>\010\004BarycN\000\230@\374e\002\017\005oundar\227ies\003\020y\036\024\177\023e\334\244\013D\nNodZ\005nf\377orcePosi\177tivityg\322\000\367_v0\203`mski\377llExtrem\357al2g\225dFla\277gnDOF_\322\004n\362\224$B\262\006\n\rs_gl\237obalnr\002/\006P\377ointsnSp\362\207@n\216\000\355\"npnu\376\213\206\002poppsiT\377CtteDTse\377tdefault\177tagtauv\321e\337value\343@yp\375n\000\000m1\200\001\360\n\377\000\005*\250\021\320*?\377\270v\300Q\300a\330\016\177#\2406\250\021\250!\001\005\377\"\250A\250Q\330\031 \337\320 6\260a\003\0025\260\376\r\000#\320#:\270!\330\355\031\005\000B\300\002\003@\300\001\376M\000\016\000\005&\240Q\320\277&;\2706\300\021\027\000\n\377\037\230v\240Q\240a\330\376\002\004b\250\001\250\021\330\036?%\320%;\2701\003\002D\001\377\036(\320(?\270q\330v\004\001G\300\002\003E\300Q\r\000\357\250\006\250a,\000\240^\260\376\252\001\020\000\004\017\210a\210\317q\330\016\017\000\000\001\002\030\230\377\002\230!\330\014\026\220c\373\230\021\003\001e\2301\330\016\337\030\230\005\230Q\333\000\022\000\377\005(""\240q\250\001\330(\377)\330(=\270V\3001\177\300A\330\014!\240\026\020\002\376\002\004\002\250!\2501\330\014\377\017\210v\220Q\220a\330\337(/\320/D$\000(/\337\250s\260!\330\000\004(2\367\260&\270E\000/\250~\270\333Q\330\013\000#\260\002\002$\260\375a\303 \032\000\005!\240\001\237\240\021\330\035\036\000\000\000\003\330\217\035$\320$\250\"\272 \257#\240\3479\250A\257\"\267\" \240\003s\2401\330 \001\003#\2403\243 \277\031#\2404\240q\225@\034\377\000\005/\250a\250q\330\343\033\034\000\000\000\003\007\002\"\320\"\3373\2601\330\033\005\0007\260\256\034\000%\240Y\237 \033\316 <{\270A\024\000\240#\240Q\000\004\237\330\033%\240S\372\000\004\000T{\250\021\352@(\000\005)\373\"8\232\n\255\003\252\0009\270\021\260\002\326A\376\265\005\035\047\240y\260\001\330\177\035\047\320\047>\270a\003\002\363F\300\002\003\241!\035$\240C\233\240q\034\000\240w\245@*\000\177d\243`\013\007s\306`?\000t\250\347a\357(\000\006*\326b\036\037\330\200\000\000\000\003\005\004\215`\203b\215h\354a\036?(\250\t\260\021\330\206v\332\003R#\000\007\247 *\000\017\217 \036\014\006\371\003\324@?\000\004\250A\200\001\177\360,\000\0057\260a\257 \307\022\023\330\000\000\000\003\000\t\022\031\047\320\031.\352`\004\001/\366 \014\001\377*\250!\330\022\034\230I\036\320 \022\034\320\034\365!\004\001\267\204\001\374\014\001\255!\022\031\230\023\230A\222\"\001G\313@*\000O\312`\013\007C;\230q>\001D\240\001";
8558 PyObject *data = __Pyx_DecompressString_LZSS(cstring, 1444, 2036);
8559 #define __Pyx_DecompressString_UNUSED
8560 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
8561 const char* const bytes = __Pyx_PyBytes_AsString(data);
8562 #if !CYTHON_ASSUME_SAFE_MACROS
8563 if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
8564 #endif
8565 #else /* compression: none (2036 bytes) */
8566static const char bytes[] = "?Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the \047annotation_typing\047 directive to False.add_notenumpy._core.multiarray failed to importnumpy._core.umath failed to importproteus/ctimeIntegration.pyxMh2UinUout__Pyx_PyDict_NextRef__annotate____func____main____module____name____qualname____test___is_coroutineallowMinWithUndershootalphaNeighborsalphasapplyCockburnDGlimiterP1Lagrange2dapplyDGlimitingP1Lagrange1dapplyDGlimitingP1Lagrange1d_withVacuumTolapplyDurlofskyDGlimiterP1Lagrange2dapplyDurlofskyDGlimiterP1Lagrange2d_withVacuumTolapplyDurlofskyDGlimiterP1Lagrange3dasyncio.coroutinescline_in_tracebackcomputeCockburnDGlimiterArrays2dcomputeElementNeighborShapeGradientsctimeIntegrationdtndtnm1dtnp1elementAverageselementBarycentersArrayelementBoundariesArrayelementBoundaryBarycentersArrayelementNeighborShapeGradientselementNeighborsArrayelementNodesArrayenforcePositivitygrad_v0itemskillExtremal2glimiterFlagnDOF_elementnElementBoundaries_elementnElements_globalnNodes_elementnPointsnSpacenodeArraynpnunumpypoppsiTCtteDTsetdefaulttagtauvacuumTolvaluesynypnypnm1\200\001\360\n\000\005*\250\021\320*?\270v\300Q\300a\330\016#\2406\250\021\250!\330\016#\2406\250\021\250\"\250A\250Q\330\031 \320 6\260a\330\031 \320 5\260Q\330\031#\320#:\270!\330\031#\320#B\300!\330\031#\320#@\300\001\200\001\360\016\000\005&\240Q\320&;\2706\300\021\300!\330\n\037\230v\240Q\240a\330\n\037\230v\240Q\240b\250\001\250\021\330\036%\320%;\2701\330\036%\320%:\270!\330\036(\320(?\270q\330\036(\320(G\300q\330\036(\320(E\300Q\330\036(\250\006\250a\330\036%\240^\2601\200\001\360\020\000\004\017\210a\210q\330\016\017\330\016\017\330\016\017\330\016\030\230\002\230!\330\014\026\220c\230\021\330\014\026\220e\2301\330\016\030\230\005\230Q\200\001\360\022\000\005(\240q\250\001\330()\330(=\270V\3001\300A\330\014!\240\026\240q\250\001\330\014!\240\026\240q\250\002\250!\2501\330\014\017\210v\220Q\220a\330(/\320/D\300A""\330(/\250s\260!\330(/\250s\260!\330(2\260&\270\001\330(/\250~\270Q\330(2\260#\260Q\330(2\260$\260a\200\001\360\032\000\005!\240\001\240\021\330\035\036\330\035\036\330\035\036\330\035\036\330\035$\320$5\260Q\330\031 \320 5\260Q\330\031#\2409\250A\330\031#\320#:\270!\330\031 \240\003\2401\330\031 \240\003\2401\330\031#\2403\240a\330\031#\2404\240q\200\001\360\034\000\005/\250a\250q\330\033\034\330\033\034\330\033\034\330\033\034\330\033\034\330\033\"\320\"3\2601\330\033\"\320\"7\260q\330\033%\240Y\250a\330\033%\320%<\270A\330\033\"\240#\240Q\330\033\"\240#\240Q\330\033%\240S\250\001\330\033%\240T\250\021\200\001\360(\000\005)\250\001\250\021\330\035\036\330\035\036\330\035\036\330\035\036\330\035\036\330\035\036\330\035$\320$9\270\021\330\035$\320$:\270!\330\035$\320$5\260Q\330\035\047\240y\260\001\330\035\047\320\047>\270a\330\035\047\320\047F\300a\330\035\047\320\047D\300A\330\035$\240C\240q\330\035\047\240w\250a\330\035\047\240\177\260a\330\035$\240C\240q\330\035\047\240s\250!\330\035\047\240t\2501\200\001\360(\000\006*\250\021\250!\330\036\037\330\036\037\330\036\037\330\036\037\330\036\037\330\036\037\330\036%\320%:\270!\330\036%\320%;\2701\330\036%\320%6\260a\330\036(\250\t\260\021\330\036(\320(?\270q\330\036(\320(G\300q\330\036(\320(E\300Q\330\036%\240S\250\001\330\036(\250\007\250q\330\036(\250\017\260q\330\036%\240S\250\001\330\036(\250\003\2501\330\036(\250\004\250A\200\001\360,\000\0057\260a\260q\330\022\023\330\022\023\330\022\023\330\022\023\330\022\023\330\022\023\330\022\023\330\022\023\330\022\031\320\031.\250a\330\022\031\320\031/\250q\330\022\031\320\031*\250!\330\022\034\230I\240Q\330\022\034\320\0343\2601\330\022\034\320\034;\2701\330\022\034\320\0349\270\021\330\022\031\230\023\230A\330\022\034\230G\2401\330\022\034\230O\2501\330\022\031\230\023\230A\330\022\034\230C\230q\330\022\034\230D\240\001";
8567 PyObject *data = NULL;
8568 #define __Pyx_DecompressString_UNUSED
8569 #define __Pyx_DecompressString_LZSS_UNUSED
8570 #endif
8571 PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
8572 Py_ssize_t pos = 0;
8573 for (int i = 0; i < 68; i++) {
8574 Py_ssize_t bytes_length = str_length_index[i].length;
8575 PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
8576 if (likely(string) && i >= 6) PyUnicode_InternInPlace(&string);
8577 if (unlikely(!string)) {
8578 Py_XDECREF(data);
8579 __PYX_ERR(0, 1, __pyx_L1_error)
8580 }
8581 stringtab[i] = string;
8582 pos += bytes_length;
8583 }
8584 for (int i = 68; i < 77; i++) {
8585 Py_ssize_t bytes_length = bytes_length_index[i-68].length;
8586 PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
8587 stringtab[i] = string;
8588 pos += bytes_length;
8589 if (unlikely(!string)) {
8590 Py_XDECREF(data);
8591 __PYX_ERR(0, 1, __pyx_L1_error)
8592 }
8593 }
8594 Py_XDECREF(data);
8595 for (Py_ssize_t i = 0; i < 77; i++) {
8596 if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
8597 __PYX_ERR(0, 1, __pyx_L1_error)
8598 }
8599 }
8600 #if CYTHON_IMMORTAL_CONSTANTS
8601 {
8602 PyObject **table = stringtab + 68;
8603 for (Py_ssize_t i=0; i<9; ++i) {
8604 #if PY_VERSION_HEX >= 0x030F0000
8605 PyUnstable_SetImmortal(table[i]);
8606 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
8607 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
8608 #if PY_VERSION_HEX < 0x030E0000
8609 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
8610 #else
8611 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
8612 #endif
8613 {
8614 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
8615 }
8616 #else
8617 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
8618 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
8619 #endif
8620 }
8621 }
8622 #endif
8623 }
8624 return 0;
8625 __pyx_L1_error:;
8626 return -1;
8627}
8628/* #### Code section: init_codeobjects ### */
8629#ifdef __cplusplus
8630namespace {
8631#endif
8632typedef struct {
8633 unsigned int argcount : 5;
8634 unsigned int num_posonly_args : 1;
8635 unsigned int num_kwonly_args : 1;
8636 unsigned int nlocals : 5;
8637 unsigned int flags : 10;
8638 unsigned int first_line : 9;
8639} __Pyx_PyCode_New_function_description;
8640#ifdef __cplusplus
8641} /* anonymous namespace */
8642#endif
8643/* NewCodeObj.proto */
8644static PyObject* __Pyx_PyCode_New(
8645 const __Pyx_PyCode_New_function_description descr,
8646 PyObject * const *varnames,
8647 PyObject *filename,
8648 PyObject *funcname,
8649 PyObject *line_table,
8650 PyObject *tuple_dedup_map
8651);
8652
8653
8654static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
8655 PyObject* tuple_dedup_map = PyDict_New();
8656 if (unlikely(!tuple_dedup_map)) return -1;
8657 {
8658 const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 144};
8659 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_nPoints, __pyx_mstate->__pyx_n_u_tau, __pyx_mstate->__pyx_n_u_dtn, __pyx_mstate->__pyx_n_u_dtnm1, __pyx_mstate->__pyx_n_u_yn, __pyx_mstate->__pyx_n_u_ypn, __pyx_mstate->__pyx_n_u_ypnm1, __pyx_mstate->__pyx_n_u_dtnp1};
8660 __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_psiTCtteDT, __pyx_mstate->__pyx_kp_b_iso88591_aq_c_e1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
8661 }
8662 {
8663 const __Pyx_PyCode_New_function_description descr = {13, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 161};
8664 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_limiterFlag, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8665 __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDGlimitingP1Lagrange1d, __pyx_mstate->__pyx_kp_b_iso88591_5Q_5Q_9A_1_1_3a_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
8666 }
8667 {
8668 const __Pyx_PyCode_New_function_description descr = {14, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 188};
8669 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_enforcePositivity, __pyx_mstate->__pyx_n_u_vacuumTol, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8670 __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDGlimitingP1Lagrange1d_with, __pyx_mstate->__pyx_kp_b_iso88591_aq_31_7q_Ya_A_Q_Q_S_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
8671 }
8672 {
8673 const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 218};
8674 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients};
8675 __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_computeElementNeighborShapeGradi, __pyx_mstate->__pyx_kp_b_iso88591_vQa_6_6_AQ_6a_5Q_B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
8676 }
8677 {
8678 const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 232};
8679 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients, __pyx_mstate->__pyx_n_u_alphas, __pyx_mstate->__pyx_n_u_alphaNeighbors};
8680 __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_computeCockburnDGlimiterArrays2d, __pyx_mstate->__pyx_kp_b_iso88591_Q_6_vQa_vQb_1_q_Gq_EQ_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
8681 }
8682 {
8683 const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 250};
8684 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_nu, __pyx_mstate->__pyx_n_u_Mh2, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_alphas, __pyx_mstate->__pyx_n_u_alphaNeighbors, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8685 __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyCockburnDGlimiterP1Lagrange, __pyx_mstate->__pyx_kp_b_iso88591_q_V1A_q_q_1_vQa_DA_s_s_2_Q_2_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
8686 }
8687 {
8688 const __Pyx_PyCode_New_function_description descr = {20, 0, 0, 20, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 273};
8689 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_killExtrema, __pyx_mstate->__pyx_n_u_allowMinWithUndershoot, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nSpace, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_grad_v0, __pyx_mstate->__pyx_n_u_elementAverages, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8690 __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang, __pyx_mstate->__pyx_kp_b_iso88591_9_5Q_y_a_Fa_DA_Cq_wa_a_Cq_s_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
8691 }
8692 {
8693 const __Pyx_PyCode_New_function_description descr = {20, 0, 0, 20, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 314};
8694 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_killExtrema, __pyx_mstate->__pyx_n_u_allowMinWithUndershoot, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nSpace, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_grad_v0, __pyx_mstate->__pyx_n_u_elementAverages, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8695 __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_2, __pyx_mstate->__pyx_kp_b_iso88591_1_6a_q_Gq_EQ_S_q_q_S_1_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
8696 }
8697 {
8698 const __Pyx_PyCode_New_function_description descr = {22, 0, 0, 22, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 355};
8699 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_killExtrema, __pyx_mstate->__pyx_n_u_allowMinWithUndershoot, __pyx_mstate->__pyx_n_u_enforcePositivity, __pyx_mstate->__pyx_n_u_vacuumTol, __pyx_mstate->__pyx_n_u_nElements_global, __pyx_mstate->__pyx_n_u_nElementBoundaries_element, __pyx_mstate->__pyx_n_u_nNodes_element, __pyx_mstate->__pyx_n_u_nSpace, __pyx_mstate->__pyx_n_u_nDOF_element, __pyx_mstate->__pyx_n_u_elementNeighborsArray, __pyx_mstate->__pyx_n_u_elementBoundariesArray, __pyx_mstate->__pyx_n_u_elementNodesArray, __pyx_mstate->__pyx_n_u_nodeArray, __pyx_mstate->__pyx_n_u_elementBarycentersArray, __pyx_mstate->__pyx_n_u_elementBoundaryBarycentersArray, __pyx_mstate->__pyx_n_u_elementNeighborShapeGradients, __pyx_mstate->__pyx_n_u_l2g, __pyx_mstate->__pyx_n_u_grad_v0, __pyx_mstate->__pyx_n_u_elementAverages, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_Uin, __pyx_mstate->__pyx_n_u_Uout};
8700 __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_ctimeIntegration_pyx, __pyx_mstate->__pyx_n_u_applyDurlofskyDGlimiterP1Lagrang_3, __pyx_mstate->__pyx_kp_b_iso88591_7aq_a_q_IQ_31_1_9_A_G1_O1_A_Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
8701 }
8702 Py_DECREF(tuple_dedup_map);
8703 return 0;
8704 bad:
8705 Py_DECREF(tuple_dedup_map);
8706 return -1;
8707}
8708/* #### Code section: init_globals ### */
8709
8710static int __Pyx_InitGlobals(void) {
8711 int __pyx_lineno = 0;
8712 const char *__pyx_filename = NULL;
8713 int __pyx_clineno = 0;
8714 /* PythonCompatibility.init */
8715 if (likely(__Pyx_init_co_variables() == 0 && __Pyx_init_tpflags_variables() == 0)); else
8716
8717 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8718
8719 /* NumpyImportArray.init */
8720 /*
8721 * Cython has automatically inserted a call to _import_array since
8722 * you didn't include one when you cimported numpy. To disable this
8723 * add the line
8724 * <void>numpy._import_array
8725 */
8726 #ifdef NPY_FEATURE_VERSION
8727 #ifndef NO_IMPORT_ARRAY
8728 if (unlikely(_import_array() == -1)) {
8729 PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import "
8730 "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; "
8731 "use '<void>numpy._import_array' to disable if you are certain you don't need it).");
8732 }
8733 #endif
8734 #endif
8735
8736 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8737
8738 /* CommonTypesMetaclass.init */
8739 if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
8740
8741 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8742
8743 /* CachedMethodType.init */
8744 #if CYTHON_COMPILING_IN_LIMITED_API
8745 {
8746 PyObject *typesModule=NULL;
8747 typesModule = PyImport_ImportModule("types");
8748 if (typesModule) {
8749 __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
8750 Py_DECREF(typesModule);
8751 }
8752 } // error handling follows
8753 #endif
8754
8755 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8756
8757 return 0;
8758 __pyx_L1_error:;
8759 return -1;
8760}
8761/* #### Code section: init_after_shared_utility ### */
8762
8763static int __Pyx_InitAfterSharedUtility(void) {
8764 int __pyx_lineno = 0;
8765 const char *__pyx_filename = NULL;
8766 int __pyx_clineno = 0;
8767 /* CythonFunctionPerModule.init */
8768 if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
8769
8770 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
8771
8772 return 0;
8773 __pyx_L1_error:;
8774 return -1;
8775}
8776/* #### Code section: cleanup_globals ### */
8777/* #### Code section: cleanup_module ### */
8778/* #### Code section: main_method ### */
8779/* #### Code section: utility_code_pragmas ### */
8780#ifdef _MSC_VER
8781#pragma warning( push )
8782/* Warning 4127: conditional expression is constant
8783 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
8784 * compile-time, so this warning is not useful
8785 */
8786#pragma warning( disable : 4127 )
8787#endif
8788
8789
8790
8791/* #### Code section: utility_code_def ### */
8792
8793/* --- Runtime support code --- */
8794/* Refnanny */
8795#if CYTHON_REFNANNY
8796static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
8797 PyObject *m = NULL, *p = NULL;
8798 void *r = NULL;
8799 m = PyImport_ImportModule(modname);
8800 if (!m) goto end;
8801 p = PyObject_GetAttrString(m, "RefNannyAPI");
8802 if (!p) goto end;
8803 r = PyLong_AsVoidPtr(p);
8804end:
8805 Py_XDECREF(p);
8806 Py_XDECREF(m);
8807 return (__Pyx_RefNannyAPIStruct *)r;
8808}
8809#endif
8810
8811/* GetTopmostException (used by SaveResetException) */
8812#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
8813static _PyErr_StackItem *
8814__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
8815{
8816 _PyErr_StackItem *exc_info = tstate->exc_info;
8817 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
8818 exc_info->previous_item != NULL)
8819 {
8820 exc_info = exc_info->previous_item;
8821 }
8822 return exc_info;
8823}
8824#endif
8825
8826/* SaveResetException */
8827#if CYTHON_FAST_THREAD_STATE
8828static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
8829 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
8830 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
8831 PyObject *exc_value = exc_info->exc_value;
8832 if (exc_value == NULL || exc_value == Py_None) {
8833 *value = NULL;
8834 *type = NULL;
8835 *tb = NULL;
8836 } else {
8837 *value = exc_value;
8838 Py_INCREF(*value);
8839 *type = (PyObject*) Py_TYPE(exc_value);
8840 Py_INCREF(*type);
8841 *tb = PyException_GetTraceback(exc_value);
8842 }
8843 #elif CYTHON_USE_EXC_INFO_STACK
8844 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
8845 *type = exc_info->exc_type;
8846 *value = exc_info->exc_value;
8847 *tb = exc_info->exc_traceback;
8848 Py_XINCREF(*type);
8849 Py_XINCREF(*value);
8850 Py_XINCREF(*tb);
8851 #else
8852 *type = tstate->exc_type;
8853 *value = tstate->exc_value;
8854 *tb = tstate->exc_traceback;
8855 Py_XINCREF(*type);
8856 Py_XINCREF(*value);
8857 Py_XINCREF(*tb);
8858 #endif
8859}
8860static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
8861 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
8862 _PyErr_StackItem *exc_info = tstate->exc_info;
8863 PyObject *tmp_value = exc_info->exc_value;
8864 exc_info->exc_value = value;
8865 Py_XDECREF(tmp_value);
8866 Py_XDECREF(type);
8867 Py_XDECREF(tb);
8868 #else
8869 PyObject *tmp_type, *tmp_value, *tmp_tb;
8870 #if CYTHON_USE_EXC_INFO_STACK
8871 _PyErr_StackItem *exc_info = tstate->exc_info;
8872 tmp_type = exc_info->exc_type;
8873 tmp_value = exc_info->exc_value;
8874 tmp_tb = exc_info->exc_traceback;
8875 exc_info->exc_type = type;
8876 exc_info->exc_value = value;
8877 exc_info->exc_traceback = tb;
8878 #else
8879 tmp_type = tstate->exc_type;
8880 tmp_value = tstate->exc_value;
8881 tmp_tb = tstate->exc_traceback;
8882 tstate->exc_type = type;
8883 tstate->exc_value = value;
8884 tstate->exc_traceback = tb;
8885 #endif
8886 Py_XDECREF(tmp_type);
8887 Py_XDECREF(tmp_value);
8888 Py_XDECREF(tmp_tb);
8889 #endif
8890}
8891#endif
8892
8893/* FastTypeChecks (used by PyException_Check) */
8894#if CYTHON_COMPILING_IN_CPYTHON
8895static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
8896 while (a) {
8897 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
8898 if (a == b)
8899 return 1;
8900 }
8901 return b == &PyBaseObject_Type;
8902}
8903static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
8904 PyObject *mro;
8905 if (a == b) return 1;
8906 mro = a->tp_mro;
8907 if (likely(mro)) {
8908 Py_ssize_t i, n;
8909 n = PyTuple_GET_SIZE(mro);
8910 for (i = 0; i < n; i++) {
8911 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
8912 return 1;
8913 }
8914 return 0;
8915 }
8916 return __Pyx_InBases(a, b);
8917}
8918static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
8919 PyObject *mro;
8920 if (cls == a || cls == b) return 1;
8921 mro = cls->tp_mro;
8922 if (likely(mro)) {
8923 Py_ssize_t i, n;
8924 n = PyTuple_GET_SIZE(mro);
8925 for (i = 0; i < n; i++) {
8926 PyObject *base = PyTuple_GET_ITEM(mro, i);
8927 if (base == (PyObject *)a || base == (PyObject *)b)
8928 return 1;
8929 }
8930 return 0;
8931 }
8932 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
8933}
8934#endif
8935
8936/* PyErrFetchRestore (used by GivenExceptionMatches) */
8937#if CYTHON_FAST_THREAD_STATE
8938static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
8939#if PY_VERSION_HEX >= 0x030C00A6
8940 PyObject *tmp_value;
8941 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
8942 if (value) {
8943 #if CYTHON_COMPILING_IN_CPYTHON
8944 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
8945 #endif
8946 PyException_SetTraceback(value, tb);
8947 }
8948 tmp_value = tstate->current_exception;
8949 tstate->current_exception = value;
8950 Py_XDECREF(tmp_value);
8951 Py_XDECREF(type);
8952 Py_XDECREF(tb);
8953#else
8954 PyObject *tmp_type, *tmp_value, *tmp_tb;
8955 tmp_type = tstate->curexc_type;
8956 tmp_value = tstate->curexc_value;
8957 tmp_tb = tstate->curexc_traceback;
8958 tstate->curexc_type = type;
8959 tstate->curexc_value = value;
8960 tstate->curexc_traceback = tb;
8961 Py_XDECREF(tmp_type);
8962 Py_XDECREF(tmp_value);
8963 Py_XDECREF(tmp_tb);
8964#endif
8965}
8966static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
8967#if PY_VERSION_HEX >= 0x030C00A6
8968 PyObject* exc_value;
8969 exc_value = tstate->current_exception;
8970 tstate->current_exception = 0;
8971 *value = exc_value;
8972 *type = NULL;
8973 *tb = NULL;
8974 if (exc_value) {
8975 *type = (PyObject*) Py_TYPE(exc_value);
8976 Py_INCREF(*type);
8977 #if CYTHON_COMPILING_IN_CPYTHON
8978 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
8979 Py_XINCREF(*tb);
8980 #else
8981 *tb = PyException_GetTraceback(exc_value);
8982 #endif
8983 }
8984#else
8985 *type = tstate->curexc_type;
8986 *value = tstate->curexc_value;
8987 *tb = tstate->curexc_traceback;
8988 tstate->curexc_type = 0;
8989 tstate->curexc_value = 0;
8990 tstate->curexc_traceback = 0;
8991#endif
8992}
8993#endif
8994
8995/* GivenExceptionMatches (used by PyErrExceptionMatches) */
8996#if CYTHON_COMPILING_IN_CPYTHON
8997static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
8998 if (exc_type1) {
8999 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
9000 } else {
9001 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
9002 }
9003}
9004static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
9005 Py_ssize_t i, n;
9006 assert(PyExceptionClass_Check(exc_type));
9007 n = PyTuple_GET_SIZE(tuple);
9008 for (i=0; i<n; i++) {
9009 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
9010 }
9011 for (i=0; i<n; i++) {
9012 PyObject *t = PyTuple_GET_ITEM(tuple, i);
9013 if (likely(PyExceptionClass_Check(t))) {
9014 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
9015 } else {
9016 }
9017 }
9018 return 0;
9019}
9020static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
9021 if (likely(err == exc_type)) return 1;
9022 if (likely(PyExceptionClass_Check(err))) {
9023 if (likely(PyExceptionClass_Check(exc_type))) {
9024 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
9025 } else if (likely(PyTuple_Check(exc_type))) {
9026 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
9027 } else {
9028 }
9029 }
9030 return PyErr_GivenExceptionMatches(err, exc_type);
9031}
9032static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
9033 assert(PyExceptionClass_Check(exc_type1));
9034 assert(PyExceptionClass_Check(exc_type2));
9035 if (likely(err == exc_type1 || err == exc_type2)) return 1;
9036 if (likely(PyExceptionClass_Check(err))) {
9037 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
9038 }
9039 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
9040}
9041#endif
9042
9043/* PyErrExceptionMatches */
9044#if CYTHON_FAST_THREAD_STATE
9045static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
9046 Py_ssize_t i, n;
9047 n = PyTuple_GET_SIZE(tuple);
9048 for (i=0; i<n; i++) {
9049 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
9050 }
9051 for (i=0; i<n; i++) {
9052 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
9053 }
9054 return 0;
9055}
9056static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
9057 int result;
9058 PyObject *exc_type;
9059#if PY_VERSION_HEX >= 0x030C00A6
9060 PyObject *current_exception = tstate->current_exception;
9061 if (unlikely(!current_exception)) return 0;
9062 exc_type = (PyObject*) Py_TYPE(current_exception);
9063 if (exc_type == err) return 1;
9064#else
9065 exc_type = tstate->curexc_type;
9066 if (exc_type == err) return 1;
9067 if (unlikely(!exc_type)) return 0;
9068#endif
9069 #if CYTHON_AVOID_BORROWED_REFS
9070 Py_INCREF(exc_type);
9071 #endif
9072 if (unlikely(PyTuple_Check(err))) {
9073 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
9074 } else {
9075 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
9076 }
9077 #if CYTHON_AVOID_BORROWED_REFS
9078 Py_DECREF(exc_type);
9079 #endif
9080 return result;
9081}
9082#endif
9083
9084/* GetException */
9085#if CYTHON_FAST_THREAD_STATE
9086static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
9087#else
9088static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
9089#endif
9090{
9091 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
9092#if CYTHON_FAST_THREAD_STATE
9093 PyObject *tmp_type, *tmp_value, *tmp_tb;
9094 #if PY_VERSION_HEX >= 0x030C0000
9095 local_value = tstate->current_exception;
9096 tstate->current_exception = 0;
9097 #else
9098 local_type = tstate->curexc_type;
9099 local_value = tstate->curexc_value;
9100 local_tb = tstate->curexc_traceback;
9101 tstate->curexc_type = 0;
9102 tstate->curexc_value = 0;
9103 tstate->curexc_traceback = 0;
9104 #endif
9105#elif __PYX_LIMITED_VERSION_HEX >= 0x030C0000
9106 local_value = PyErr_GetRaisedException();
9107#else
9108 PyErr_Fetch(&local_type, &local_value, &local_tb);
9109#endif
9110#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
9111 if (likely(local_value)) {
9112 local_type = (PyObject*) Py_TYPE(local_value);
9113 Py_INCREF(local_type);
9114 local_tb = PyException_GetTraceback(local_value);
9115 }
9116#else
9117 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
9118#if CYTHON_FAST_THREAD_STATE
9119 if (unlikely(tstate->curexc_type))
9120#else
9121 if (unlikely(PyErr_Occurred()))
9122#endif
9123 goto bad;
9124 if (local_tb) {
9125 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
9126 goto bad;
9127 }
9128#endif // __PYX_LIMITED_VERSION_HEX >= 0x030C0000
9129 Py_XINCREF(local_tb);
9130 Py_XINCREF(local_type);
9131 Py_XINCREF(local_value);
9132 *type = local_type;
9133 *value = local_value;
9134 *tb = local_tb;
9135#if CYTHON_FAST_THREAD_STATE
9136 #if CYTHON_USE_EXC_INFO_STACK
9137 {
9138 _PyErr_StackItem *exc_info = tstate->exc_info;
9139 #if PY_VERSION_HEX >= 0x030B00a4
9140 tmp_value = exc_info->exc_value;
9141 exc_info->exc_value = local_value;
9142 tmp_type = NULL;
9143 tmp_tb = NULL;
9144 Py_XDECREF(local_type);
9145 Py_XDECREF(local_tb);
9146 #else
9147 tmp_type = exc_info->exc_type;
9148 tmp_value = exc_info->exc_value;
9149 tmp_tb = exc_info->exc_traceback;
9150 exc_info->exc_type = local_type;
9151 exc_info->exc_value = local_value;
9152 exc_info->exc_traceback = local_tb;
9153 #endif
9154 }
9155 #else
9156 tmp_type = tstate->exc_type;
9157 tmp_value = tstate->exc_value;
9158 tmp_tb = tstate->exc_traceback;
9159 tstate->exc_type = local_type;
9160 tstate->exc_value = local_value;
9161 tstate->exc_traceback = local_tb;
9162 #endif
9163 Py_XDECREF(tmp_type);
9164 Py_XDECREF(tmp_value);
9165 Py_XDECREF(tmp_tb);
9166#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
9167 PyErr_SetHandledException(local_value);
9168 Py_XDECREF(local_value);
9169 Py_XDECREF(local_type);
9170 Py_XDECREF(local_tb);
9171#else
9172 PyErr_SetExcInfo(local_type, local_value, local_tb);
9173#endif
9174 return 0;
9175#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
9176bad:
9177 *type = 0;
9178 *value = 0;
9179 *tb = 0;
9180 Py_XDECREF(local_type);
9181 Py_XDECREF(local_value);
9182 Py_XDECREF(local_tb);
9183 return -1;
9184#endif
9185}
9186
9187/* PyObjectCall (used by PyObjectFastCall) */
9188#if CYTHON_COMPILING_IN_CPYTHON
9189static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
9190 PyObject *result;
9191 ternaryfunc call = Py_TYPE(func)->tp_call;
9192 if (unlikely(!call))
9193 return PyObject_Call(func, arg, kw);
9194 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
9195 return NULL;
9196 result = (*call)(func, arg, kw);
9197 Py_LeaveRecursiveCall();
9198 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
9199 PyErr_SetString(
9200 PyExc_SystemError,
9201 "NULL result without error in PyObject_Call");
9202 }
9203 return result;
9204}
9205#endif
9206
9207/* PyObjectCallMethO (used by PyObjectFastCall) */
9208#if CYTHON_COMPILING_IN_CPYTHON
9209static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
9210 PyObject *self, *result;
9211 PyCFunction cfunc;
9212 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
9213 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
9214 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
9215 return NULL;
9216 result = cfunc(self, arg);
9217 Py_LeaveRecursiveCall();
9218 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
9219 PyErr_SetString(
9220 PyExc_SystemError,
9221 "NULL result without error in PyObject_Call");
9222 }
9223 return result;
9224}
9225#endif
9226
9227/* PyObjectFastCall */
9228#if CYTHON_COMPILING_IN_LIMITED_API
9229static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
9230 PyObject *argstuple;
9231 PyObject *result = 0;
9232 size_t i;
9233 argstuple = PyTuple_New((Py_ssize_t)nargs);
9234 if (unlikely(!argstuple)) return NULL;
9235 for (i = 0; i < nargs; i++) {
9236 Py_INCREF(args[i]);
9237 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
9238 }
9239 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
9240 bad:
9241 Py_DECREF(argstuple);
9242 return result;
9243}
9244#endif
9245#if CYTHON_VECTORCALL && !(CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY)
9246 #if CYTHON_COMPILING_IN_CPYTHON
9247static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
9248 PyTypeObject *tp = Py_TYPE(callable);
9249 #if defined(__Pyx_CyFunction_USED)
9250 if (__Pyx_CyFunction_CheckExact(callable)) {
9251 return __Pyx_CyFunction_func_vectorcall(callable);
9252 }
9253 #endif
9254 if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
9255 return NULL;
9256 }
9257 assert(PyCallable_Check(callable));
9258 Py_ssize_t offset = tp->tp_vectorcall_offset;
9259 assert(offset > 0);
9260 vectorcallfunc ptr;
9261 memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
9262 return ptr;
9263}
9264 #else
9265 #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
9266 #endif
9267#endif
9268static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwargs) {
9269 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(nargsf);
9270#if CYTHON_COMPILING_IN_CPYTHON
9271 if (nargs == 0 && kwargs == NULL) {
9272 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
9273 return __Pyx_PyObject_CallMethO(func, NULL);
9274 }
9275 else if (nargs == 1 && kwargs == NULL) {
9276 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
9277 return __Pyx_PyObject_CallMethO(func, args[0]);
9278 }
9279#endif
9280 if (kwargs == NULL) {
9281 #if CYTHON_VECTORCALL
9282 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
9283 return PyObject_Vectorcall(func, args, nargsf, NULL);
9284 #else
9285 vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
9286 if (f) {
9287 return f(func, args, nargsf, NULL);
9288 }
9289 #endif
9290 #endif
9291 }
9292 if (nargs == 0) {
9293 return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
9294 }
9295 #if CYTHON_COMPILING_IN_LIMITED_API
9296 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
9297 #elif CYTHON_COMPILING_IN_PYPY
9298 return PyObject_VectorcallDict(func, args, (size_t) nargs, kwargs);
9299 #else
9300 return PyObject_VectorcallDict(func, args, nargsf, kwargs);
9301 #endif
9302}
9303
9304/* RaiseException */
9305static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
9306 PyObject* owned_instance = NULL;
9307 if (tb == Py_None) {
9308 tb = 0;
9309 } else if (tb && !PyTraceBack_Check(tb)) {
9310 PyErr_SetString(PyExc_TypeError,
9311 "raise: arg 3 must be a traceback or None");
9312 goto bad;
9313 }
9314 if (value == Py_None)
9315 value = 0;
9316 if (PyExceptionInstance_Check(type)) {
9317 if (value) {
9318 PyErr_SetString(PyExc_TypeError,
9319 "instance exception may not have a separate value");
9320 goto bad;
9321 }
9322 value = type;
9323 type = (PyObject*) Py_TYPE(value);
9324 } else if (PyExceptionClass_Check(type)) {
9325 PyObject *instance_class = NULL;
9326 if (value && PyExceptionInstance_Check(value)) {
9327 instance_class = (PyObject*) Py_TYPE(value);
9328 if (instance_class != type) {
9329 int is_subclass = PyObject_IsSubclass(instance_class, type);
9330 if (!is_subclass) {
9331 instance_class = NULL;
9332 } else if (unlikely(is_subclass == -1)) {
9333 goto bad;
9334 } else {
9335 type = instance_class;
9336 }
9337 }
9338 }
9339 if (!instance_class) {
9340 PyObject *args;
9341 if (!value)
9342 args = PyTuple_New(0);
9343 else if (PyTuple_Check(value)) {
9344 Py_INCREF(value);
9345 args = value;
9346 } else
9347 args = PyTuple_Pack(1, value);
9348 if (!args)
9349 goto bad;
9350 owned_instance = PyObject_Call(type, args, NULL);
9351 Py_DECREF(args);
9352 if (!owned_instance)
9353 goto bad;
9354 value = owned_instance;
9355 if (!PyExceptionInstance_Check(value)) {
9356 PyErr_Format(PyExc_TypeError,
9357 "calling %R should have returned an instance of "
9358 "BaseException, not %R",
9359 type, Py_TYPE(value));
9360 goto bad;
9361 }
9362 }
9363 } else {
9364 PyErr_SetString(PyExc_TypeError,
9365 "raise: exception class must be a subclass of BaseException");
9366 goto bad;
9367 }
9368 if (cause) {
9369 PyObject *fixed_cause;
9370 if (cause == Py_None) {
9371 fixed_cause = NULL;
9372 } else if (PyExceptionClass_Check(cause)) {
9373 fixed_cause = PyObject_CallObject(cause, NULL);
9374 if (fixed_cause == NULL)
9375 goto bad;
9376 } else if (PyExceptionInstance_Check(cause)) {
9377 fixed_cause = cause;
9378 Py_INCREF(fixed_cause);
9379 } else {
9380 PyErr_SetString(PyExc_TypeError,
9381 "exception causes must derive from "
9382 "BaseException");
9383 goto bad;
9384 }
9385 PyException_SetCause(value, fixed_cause);
9386 }
9387 PyErr_SetObject(type, value);
9388 if (tb) {
9389#if PY_VERSION_HEX >= 0x030C00A6
9390 PyException_SetTraceback(value, tb);
9391#elif CYTHON_FAST_THREAD_STATE
9392 PyThreadState *tstate = __Pyx_PyThreadState_Current;
9393 PyObject* tmp_tb = tstate->curexc_traceback;
9394 if (tb != tmp_tb) {
9395 Py_INCREF(tb);
9396 tstate->curexc_traceback = tb;
9397 Py_XDECREF(tmp_tb);
9398 }
9399#else
9400 PyObject *tmp_type, *tmp_value, *tmp_tb;
9401 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
9402 Py_INCREF(tb);
9403 PyErr_Restore(tmp_type, tmp_value, tb);
9404 Py_XDECREF(tmp_tb);
9405#endif
9406 }
9407bad:
9408 Py_XDECREF(owned_instance);
9409 return;
9410}
9411
9412/* CopyObjectArray (used by TupleOrListFromArrayImpl) */
9413#if CYTHON_COMPILING_IN_CPYTHON
9414static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
9415 PyObject *v;
9416 Py_ssize_t i;
9417 for (i = 0; i < length; i++) {
9418 v = dest[i] = src[i];
9419 Py_INCREF(v);
9420 }
9421}
9422#endif
9423
9424/* TupleOrListFromArrayImpl (used by TupleFromArray) */
9425#if !(PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API)
9426CYTHON_UNUSED static PyObject *
9427__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) {
9428 if (n <= 0) {
9429 return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
9430 }
9431 PyObject *res = PyTuple_New(n);
9432 if (unlikely(res == NULL)) return NULL;
9433 #if CYTHON_COMPILING_IN_CPYTHON
9434 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
9435 #else
9436 Py_ssize_t i;
9437 for (i = 0; i < n; i++) {
9438 Py_INCREF(src[i]);
9439 if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
9440 Py_DECREF(res);
9441 return NULL;
9442 }
9443 }
9444 #endif
9445 return res;
9446}
9447#endif
9448
9449/* PyObjectCompare (used by UnicodeEquals) */
9450#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
9451#define __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
9452static CYTHON_INLINE int __Pyx_PyObject_CompareStrStrBoolEq(PyObject* s1, PyObject* s2) {
9453 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
9454 int result = PyUnicode_Equal(s1, s2);
9455 #if !CYTHON_COMPILING_IN_CPYTHON
9456 if (unlikely(result == -1)) return -1;
9457 #endif
9458 if (result == 0) goto __pyx_return_false; else goto __pyx_return_true;
9459 #else
9460 int result = PyUnicode_Compare(s1, s2);
9461 if (unlikely((result == -1) && PyErr_Occurred())) return -1;
9462 if (result == 0) goto __pyx_return_true; else goto __pyx_return_false;
9463 #endif
9464__pyx_return_true:
9465 return 1;
9466__pyx_return_false:
9467 return 0;
9468}
9469#endif
9470static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2, int pyop) {
9471 CYTHON_UNUSED_VAR(pyop);
9472 if (unlikely(op1 == Py_None)) {
9473 if (op2 == Py_None) goto __pyx_return_true; else goto __pyx_return_false;
9474 }
9475 if (unlikely(op2 == Py_None)) {
9476 if (op1 == Py_None) goto __pyx_return_true; else goto __pyx_return_false;
9477 }
9478
9479 if (likely(op1 != Py_None)) {
9480 if (op1 == op2) goto __pyx_return_true;
9481 if (likely(op2 != Py_None)) {
9482 return __Pyx_PyObject_CompareStrStrBoolEq(op1, op2);
9483 }
9484 goto __pyx_richcmp;
9485 }
9486
9487 if ((0)) goto __pyx_richcmp;
9488 if ((0)) goto __pyx_return_true;
9489 if ((0)) goto __pyx_return_false;
9490__pyx_richcmp:
9491 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
9492__pyx_return_true:
9493 return 1;
9494__pyx_return_false:
9495 return 0;
9496}
9497
9498/* fastcall */
9499#if CYTHON_VECTORCALL
9500static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
9501{
9502 Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
9503 #if !CYTHON_ASSUME_SAFE_SIZE
9504 if (unlikely(n == -1)) return NULL;
9505 #endif
9506 for (i = 0; i < n; i++)
9507 {
9508 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
9509 #if !CYTHON_ASSUME_SAFE_MACROS
9510 if (unlikely(!namei)) return NULL;
9511 #endif
9512 if (s == namei) return kwvalues[i];
9513 }
9514 for (i = 0; i < n; i++)
9515 {
9516 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
9517 #if !CYTHON_ASSUME_SAFE_MACROS
9518 if (unlikely(!namei)) return NULL;
9519 #endif
9520 int eq = __Pyx_PyUnicode_Equals(s, namei);
9521 if (unlikely(eq != 0)) {
9522 if (unlikely(eq < 0)) return NULL;
9523 return kwvalues[i];
9524 }
9525 }
9526 return NULL;
9527}
9528#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
9529CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
9530 Py_ssize_t i, nkwargs;
9531 PyObject *dict;
9532#if !CYTHON_ASSUME_SAFE_SIZE
9533 nkwargs = PyTuple_Size(kwnames);
9534 if (unlikely(nkwargs < 0)) return NULL;
9535#else
9536 nkwargs = PyTuple_GET_SIZE(kwnames);
9537#endif
9538 dict = PyDict_New();
9539 if (unlikely(!dict))
9540 return NULL;
9541 for (i=0; i<nkwargs; i++) {
9542#if !CYTHON_ASSUME_SAFE_MACROS
9543 PyObject *key = PyTuple_GetItem(kwnames, i);
9544 if (!key) goto bad;
9545#else
9546 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
9547#endif
9548 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
9549 goto bad;
9550 }
9551 return dict;
9552bad:
9553 Py_DECREF(dict);
9554 return NULL;
9555}
9556#endif
9557#endif
9558
9559/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
9560static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
9561 PyObject *args[2] = {NULL, arg};
9562 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
9563}
9564
9565/* IgnoreException (used by UnpackUnboundCMethod_impl) */
9566static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception) {
9567 if (PyErr_GivenExceptionMatches(given_exception ? given_exception : PyErr_Occurred(), ignorable_exception)) {
9568 PyErr_Clear();
9569 return 1;
9570 }
9571 return 0;
9572}
9573
9574/* PyObjectGetAttrStr (used by UnpackUnboundCMethod_impl) */
9575#if CYTHON_USE_TYPE_SLOTS
9576static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
9577 PyTypeObject* tp = Py_TYPE(obj);
9578 if (likely(tp->tp_getattro))
9579 return tp->tp_getattro(obj, attr_name);
9580 return PyObject_GetAttr(obj, attr_name);
9581}
9582#endif
9583
9584/* UnpackUnboundCMethod_impl (used by UnpackUnboundCMethod) */
9585#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
9586static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
9587 PyObject *result;
9588 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
9589 if (unlikely(!selfless_args)) return NULL;
9590 result = PyObject_Call(method, selfless_args, kwargs);
9591 Py_DECREF(selfless_args);
9592 return result;
9593}
9594#else
9595static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
9596 return PyObject_Vectorcall(method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
9597}
9598#endif
9599static PyMethodDef __Pyx_UnboundCMethod_Def = {
9600 "CythonUnboundCMethod",
9601 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
9602#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
9603 METH_VARARGS | METH_KEYWORDS,
9604#else
9605 METH_FASTCALL | METH_KEYWORDS,
9606#endif
9607 NULL
9608};
9609static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
9610 PyObject *method, *result=NULL;
9611 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
9612 if (unlikely(!method))
9613 return -1;
9614 result = method;
9615#if CYTHON_COMPILING_IN_CPYTHON
9616 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
9617 {
9618 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
9619 target->func = descr->d_method->ml_meth;
9620 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
9621 } else
9622#endif
9623#if CYTHON_COMPILING_IN_PYPY
9624#else
9625 if (PyCFunction_Check(method))
9626#endif
9627 {
9628 PyObject *self;
9629 int self_found;
9630#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
9631 self = PyObject_GetAttrString(method, "__self__");
9632 if (!self && !__Pyx_IgnoreException(PyExc_AttributeError)) {
9633 return -1;
9634 }
9635#else
9636 self = PyCFunction_GET_SELF(method);
9637#endif
9638 self_found = (self && self != Py_None);
9639#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
9640 Py_XDECREF(self);
9641#endif
9642 if (self_found) {
9643 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
9644 if (unlikely(!unbound_method)) return -1;
9645 Py_DECREF(method);
9646 result = unbound_method;
9647 }
9648 }
9649#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
9650 if (unlikely(target->method)) {
9651 Py_DECREF(result);
9652 } else
9653#endif
9654 target->method = result;
9655 return 0;
9656}
9657
9658/* CallUnboundCMethod0 */
9659#if CYTHON_COMPILING_IN_CPYTHON
9660static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
9661 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
9662 if (likely(was_initialized == 2 && cfunc->func)) {
9663 if (likely(cfunc->flag == METH_NOARGS))
9664 return __Pyx_CallCFunction(cfunc, self, NULL);
9665 if (likely(cfunc->flag == METH_FASTCALL))
9666 return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
9667 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
9668 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
9669 if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
9670 return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
9671 if (cfunc->flag == METH_VARARGS)
9672 return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
9673 return __Pyx__CallUnboundCMethod0(cfunc, self);
9674 }
9675#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
9676 else if (unlikely(was_initialized == 1)) {
9677 __Pyx_CachedCFunction tmp_cfunc = {
9678#ifndef __cplusplus
9679 0
9680#endif
9681 };
9682 tmp_cfunc.type = cfunc->type;
9683 tmp_cfunc.method_name = cfunc->method_name;
9684 return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
9685 }
9686#endif
9687 PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
9688 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
9689 return result;
9690}
9691#endif
9692static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
9693 PyObject *result;
9694 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
9695 result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
9696 return result;
9697}
9698
9699/* py_dict_items (used by OwnedDictNext) */
9700static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
9701 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
9702}
9703
9704/* py_dict_values (used by OwnedDictNext) */
9705static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
9706 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
9707}
9708
9709/* OwnedDictNext (used by ParseKeywordsImpl) */
9710#if CYTHON_AVOID_BORROWED_REFS
9711static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
9712 PyObject *next = NULL;
9713 if (!*ppos) {
9714 if (pvalue) {
9715 PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
9716 if (unlikely(!dictview)) goto bad;
9717 *ppos = PyObject_GetIter(dictview);
9718 Py_DECREF(dictview);
9719 } else {
9720 *ppos = PyObject_GetIter(p);
9721 }
9722 if (unlikely(!*ppos)) goto bad;
9723 }
9724 next = PyIter_Next(*ppos);
9725 if (!next) {
9726 if (PyErr_Occurred()) goto bad;
9727 return 0;
9728 }
9729 if (pkey && pvalue) {
9730 *pkey = __Pyx_PySequence_ITEM(next, 0);
9731 if (unlikely(*pkey)) goto bad;
9732 *pvalue = __Pyx_PySequence_ITEM(next, 1);
9733 if (unlikely(*pvalue)) goto bad;
9734 Py_DECREF(next);
9735 } else if (pkey) {
9736 *pkey = next;
9737 } else {
9738 assert(pvalue);
9739 *pvalue = next;
9740 }
9741 return 1;
9742 bad:
9743 Py_XDECREF(next);
9744#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
9745 PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
9746#else
9747 PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
9748#endif
9749 if (pkey) *pkey = NULL;
9750 if (pvalue) *pvalue = NULL;
9751 return 0;
9752}
9753#else // !CYTHON_AVOID_BORROWED_REFS
9754static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
9755 int result = PyDict_Next(p, ppos, pkey, pvalue);
9756 if (likely(result == 1)) {
9757 if (pkey) Py_INCREF(*pkey);
9758 if (pvalue) Py_INCREF(*pvalue);
9759 }
9760 return result;
9761}
9762#endif
9763
9764/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
9765static void __Pyx_RaiseDoubleKeywordsError(
9766 const char* func_name,
9767 PyObject* kw_name)
9768{
9769 PyErr_Format(PyExc_TypeError,
9770 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
9771}
9772
9773/* CallUnboundCMethod2 */
9774#if CYTHON_COMPILING_IN_CPYTHON
9775static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
9776 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
9777 if (likely(was_initialized == 2 && cfunc->func)) {
9778 PyObject *args[2] = {arg1, arg2};
9779 if (cfunc->flag == METH_FASTCALL) {
9780 return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
9781 }
9782 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
9783 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
9784 }
9785#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
9786 else if (unlikely(was_initialized == 1)) {
9787 __Pyx_CachedCFunction tmp_cfunc = {
9788#ifndef __cplusplus
9789 0
9790#endif
9791 };
9792 tmp_cfunc.type = cfunc->type;
9793 tmp_cfunc.method_name = cfunc->method_name;
9794 return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
9795 }
9796#endif
9797 PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
9798 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
9799 return result;
9800}
9801#endif
9802static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
9803 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
9804#if CYTHON_COMPILING_IN_CPYTHON
9805 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
9806 PyObject *result = NULL;
9807 PyObject *args = PyTuple_New(2);
9808 if (unlikely(!args)) return NULL;
9809 Py_INCREF(arg1);
9810 PyTuple_SET_ITEM(args, 0, arg1);
9811 Py_INCREF(arg2);
9812 PyTuple_SET_ITEM(args, 1, arg2);
9813 if (cfunc->flag & METH_KEYWORDS)
9814 result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
9815 else
9816 result = __Pyx_CallCFunction(cfunc, self, args);
9817 Py_DECREF(args);
9818 return result;
9819 }
9820#endif
9821 {
9822 PyObject *args[4] = {NULL, self, arg1, arg2};
9823 return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
9824 }
9825}
9826
9827/* ParseKeywordsImpl (used by ParseKeywords) */
9828static int __Pyx_ValidateDuplicatePosArgs(
9829 PyObject *kwds,
9830 PyObject ** const argnames[],
9831 PyObject ** const *first_kw_arg,
9832 const char* function_name)
9833{
9834 PyObject ** const *name = argnames;
9835 while (name != first_kw_arg) {
9836 PyObject *key = **name;
9837 int found = PyDict_Contains(kwds, key);
9838 if (unlikely(found)) {
9839 if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
9840 goto bad;
9841 }
9842 name++;
9843 }
9844 return 0;
9845bad:
9846 return -1;
9847}
9848#if CYTHON_USE_UNICODE_INTERNALS
9849static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
9850 int kind;
9851 Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
9852 if (len != PyUnicode_GET_LENGTH(s2)) return 0;
9853 kind = PyUnicode_KIND(s1);
9854 if (kind != PyUnicode_KIND(s2)) return 0;
9855 const void *data1 = PyUnicode_DATA(s1);
9856 const void *data2 = PyUnicode_DATA(s2);
9857 return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
9858}
9859#endif
9860static int __Pyx_MatchKeywordArg_str(
9861 PyObject *key,
9862 PyObject ** const argnames[],
9863 PyObject ** const *first_kw_arg,
9864 size_t *index_found,
9865 const char *function_name)
9866{
9867 PyObject ** const *name;
9868 #if CYTHON_USE_UNICODE_INTERNALS
9869 Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
9870 if (unlikely(key_hash == -1)) {
9871 key_hash = PyObject_Hash(key);
9872 if (unlikely(key_hash == -1))
9873 goto bad;
9874 }
9875 #endif
9876 name = first_kw_arg;
9877 while (*name) {
9878 PyObject *name_str = **name;
9879 #if CYTHON_USE_UNICODE_INTERNALS
9880 if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
9881 *index_found = (size_t) (name - argnames);
9882 return 1;
9883 }
9884 #else
9885 #if CYTHON_ASSUME_SAFE_SIZE
9886 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
9887 #endif
9888 {
9889 int cmp = PyUnicode_Compare(name_str, key);
9890 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
9891 if (cmp == 0) {
9892 *index_found = (size_t) (name - argnames);
9893 return 1;
9894 }
9895 }
9896 #endif
9897 name++;
9898 }
9899 name = argnames;
9900 while (name != first_kw_arg) {
9901 PyObject *name_str = **name;
9902 #if CYTHON_USE_UNICODE_INTERNALS
9903 if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
9904 if (__Pyx_UnicodeKeywordsEqual(name_str, key))
9905 goto arg_passed_twice;
9906 }
9907 #else
9908 #if CYTHON_ASSUME_SAFE_SIZE
9909 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
9910 #endif
9911 {
9912 if (unlikely(name_str == key)) goto arg_passed_twice;
9913 int cmp = PyUnicode_Compare(name_str, key);
9914 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
9915 if (cmp == 0) goto arg_passed_twice;
9916 }
9917 #endif
9918 name++;
9919 }
9920 return 0;
9921arg_passed_twice:
9922 __Pyx_RaiseDoubleKeywordsError(function_name, key);
9923 goto bad;
9924bad:
9925 return -1;
9926}
9927static int __Pyx_MatchKeywordArg_nostr(
9928 PyObject *key,
9929 PyObject ** const argnames[],
9930 PyObject ** const *first_kw_arg,
9931 size_t *index_found,
9932 const char *function_name)
9933{
9934 PyObject ** const *name;
9935 if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
9936 name = first_kw_arg;
9937 while (*name) {
9938 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
9939 if (cmp == 1) {
9940 *index_found = (size_t) (name - argnames);
9941 return 1;
9942 }
9943 if (unlikely(cmp == -1)) goto bad;
9944 name++;
9945 }
9946 name = argnames;
9947 while (name != first_kw_arg) {
9948 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
9949 if (unlikely(cmp != 0)) {
9950 if (cmp == 1) goto arg_passed_twice;
9951 else goto bad;
9952 }
9953 name++;
9954 }
9955 return 0;
9956arg_passed_twice:
9957 __Pyx_RaiseDoubleKeywordsError(function_name, key);
9958 goto bad;
9959invalid_keyword_type:
9960 PyErr_Format(PyExc_TypeError,
9961 "%.200s() keywords must be strings", function_name);
9962 goto bad;
9963bad:
9964 return -1;
9965}
9966static CYTHON_INLINE int __Pyx_MatchKeywordArg(
9967 PyObject *key,
9968 PyObject ** const argnames[],
9969 PyObject ** const *first_kw_arg,
9970 size_t *index_found,
9971 const char *function_name)
9972{
9973 return likely(PyUnicode_CheckExact(key)) ?
9974 __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
9975 __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
9976}
9977static void __Pyx_RejectUnknownKeyword(
9978 PyObject *kwds,
9979 PyObject ** const argnames[],
9980 PyObject ** const *first_kw_arg,
9981 const char *function_name)
9982{
9983 #if CYTHON_AVOID_BORROWED_REFS
9984 PyObject *pos = NULL;
9985 #else
9986 Py_ssize_t pos = 0;
9987 #endif
9988 PyObject *key = NULL;
9989 __Pyx_BEGIN_CRITICAL_SECTION(kwds);
9990 #if CYTHON_AVOID_BORROWED_REFS
9991 while (__Pyx_PyDict_NextRef(kwds, &pos, &key, NULL))
9992 #else
9993 (void) __Pyx_PyDict_NextRef;
9994 while (PyDict_Next(kwds, &pos, &key, NULL))
9995 #endif
9996 {
9997 PyObject** const *name = first_kw_arg;
9998 while (*name && (**name != key)) name++;
9999 if (!*name) {
10000 size_t index_found = 0;
10001 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
10002 if (cmp != 1) {
10003 if (cmp == 0) {
10004 PyErr_Format(PyExc_TypeError,
10005 "%s() got an unexpected keyword argument '%U'",
10006 function_name, key);
10007 }
10008 #if CYTHON_AVOID_BORROWED_REFS
10009 Py_DECREF(key);
10010 #endif
10011 break;
10012 }
10013 }
10014 #if CYTHON_AVOID_BORROWED_REFS
10015 Py_DECREF(key);
10016 #endif
10017 }
10018 __Pyx_END_CRITICAL_SECTION();
10019 #if CYTHON_AVOID_BORROWED_REFS
10020 Py_XDECREF(pos);
10021 #endif
10022 assert(PyErr_Occurred());
10023}
10024static int __Pyx_ParseKeywordDict(
10025 PyObject *kwds,
10026 PyObject ** const argnames[],
10027 PyObject *values[],
10028 Py_ssize_t num_pos_args,
10029 Py_ssize_t num_kwargs,
10030 const char* function_name,
10031 int ignore_unknown_kwargs)
10032{
10033 PyObject** const *name;
10034 PyObject** const *first_kw_arg = argnames + num_pos_args;
10035 Py_ssize_t extracted = 0;
10036#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
10037 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
10038#endif
10039 name = first_kw_arg;
10040 while (*name && num_kwargs > extracted) {
10041 PyObject * key = **name;
10042 PyObject *value;
10043 int found = 0;
10044 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
10045 found = PyDict_GetItemRef(kwds, key, &value);
10046 #else
10047 value = PyDict_GetItemWithError(kwds, key);
10048 if (value) {
10049 Py_INCREF(value);
10050 found = 1;
10051 } else {
10052 if (unlikely(PyErr_Occurred())) goto bad;
10053 }
10054 #endif
10055 if (found) {
10056 if (unlikely(found < 0)) goto bad;
10057 values[name-argnames] = value;
10058 extracted++;
10059 }
10060 name++;
10061 }
10062 if (num_kwargs > extracted) {
10063 if (ignore_unknown_kwargs) {
10064 if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
10065 goto bad;
10066 } else {
10067 __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
10068 goto bad;
10069 }
10070 }
10071 return 0;
10072bad:
10073 return -1;
10074}
10075static int __Pyx_ParseKeywordDictToDict(
10076 PyObject *kwds,
10077 PyObject ** const argnames[],
10078 PyObject *kwds2,
10079 PyObject *values[],
10080 Py_ssize_t num_pos_args,
10081 const char* function_name)
10082{
10083 PyObject** const *name;
10084 PyObject** const *first_kw_arg = argnames + num_pos_args;
10085 Py_ssize_t len;
10086#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
10087 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
10088#endif
10089 if (PyDict_Update(kwds2, kwds) < 0) goto bad;
10090 name = first_kw_arg;
10091 while (*name) {
10092 PyObject *key = **name;
10093 PyObject *value;
10094#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
10095 int found = PyDict_Pop(kwds2, key, &value);
10096 if (found) {
10097 if (unlikely(found < 0)) goto bad;
10098 values[name-argnames] = value;
10099 }
10100#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
10101 int found = PyDict_GetItemRef(kwds2, key, &value);
10102 if (found) {
10103 if (unlikely(found < 0)) goto bad;
10104 values[name-argnames] = value;
10105 if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
10106 }
10107#else
10108 #if CYTHON_COMPILING_IN_CPYTHON
10109 value = _PyDict_Pop(kwds2, key, kwds2);
10110 #else
10111 value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
10112 #endif
10113 if (value == kwds2) {
10114 Py_DECREF(value);
10115 } else {
10116 if (unlikely(!value)) goto bad;
10117 values[name-argnames] = value;
10118 }
10119#endif
10120 name++;
10121 }
10122 len = PyDict_Size(kwds2);
10123 if (len > 0) {
10124 return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
10125 } else if (unlikely(len == -1)) {
10126 goto bad;
10127 }
10128 return 0;
10129bad:
10130 return -1;
10131}
10132static int __Pyx_ParseKeywordsTuple(
10133 PyObject *kwds,
10134 PyObject * const *kwvalues,
10135 PyObject ** const argnames[],
10136 PyObject *kwds2,
10137 PyObject *values[],
10138 Py_ssize_t num_pos_args,
10139 Py_ssize_t num_kwargs,
10140 const char* function_name,
10141 int ignore_unknown_kwargs)
10142{
10143 PyObject *key = NULL;
10144 PyObject** const * name;
10145 PyObject** const *first_kw_arg = argnames + num_pos_args;
10146 for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
10147#if CYTHON_AVOID_BORROWED_REFS
10148 key = __Pyx_PySequence_ITEM(kwds, pos);
10149#else
10150 key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
10151#endif
10152#if !CYTHON_ASSUME_SAFE_MACROS
10153 if (unlikely(!key)) goto bad;
10154#endif
10155 name = first_kw_arg;
10156 while (*name && (**name != key)) name++;
10157 if (*name) {
10158 PyObject *value = kwvalues[pos];
10159 values[name-argnames] = __Pyx_NewRef(value);
10160 } else {
10161 size_t index_found = 0;
10162 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
10163 if (cmp == 1) {
10164 PyObject *value = kwvalues[pos];
10165 values[index_found] = __Pyx_NewRef(value);
10166 } else {
10167 if (unlikely(cmp == -1)) goto bad;
10168 if (kwds2) {
10169 PyObject *value = kwvalues[pos];
10170 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
10171 } else if (!ignore_unknown_kwargs) {
10172 goto invalid_keyword;
10173 }
10174 }
10175 }
10176 #if CYTHON_AVOID_BORROWED_REFS
10177 Py_DECREF(key);
10178 key = NULL;
10179 #endif
10180 }
10181 return 0;
10182invalid_keyword:
10183 PyErr_Format(PyExc_TypeError,
10184 "%s() got an unexpected keyword argument '%U'",
10185 function_name, key);
10186 goto bad;
10187bad:
10188 #if CYTHON_AVOID_BORROWED_REFS
10189 Py_XDECREF(key);
10190 #endif
10191 return -1;
10192}
10193
10194/* ParseKeywords */
10195static int __Pyx_ParseKeywords(
10196 PyObject *kwds,
10197 PyObject * const *kwvalues,
10198 PyObject ** const argnames[],
10199 PyObject *kwds2,
10200 PyObject *values[],
10201 Py_ssize_t num_pos_args,
10202 Py_ssize_t num_kwargs,
10203 const char* function_name,
10204 int ignore_unknown_kwargs)
10205{
10206 if (CYTHON_VECTORCALL && likely(PyTuple_Check(kwds)))
10207 return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
10208 else if (kwds2)
10209 return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
10210 else
10211 return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
10212}
10213
10214/* RaiseArgTupleInvalid */
10215static void __Pyx_RaiseArgtupleInvalid(
10216 const char* func_name,
10217 int exact,
10218 Py_ssize_t num_min,
10219 Py_ssize_t num_max,
10220 Py_ssize_t num_found)
10221{
10222 Py_ssize_t num_expected;
10223 const char *more_or_less;
10224 if (num_found < num_min) {
10225 num_expected = num_min;
10226 more_or_less = "at least";
10227 } else {
10228 num_expected = num_max;
10229 more_or_less = "at most";
10230 }
10231 if (exact) {
10232 more_or_less = "exactly";
10233 }
10234 PyErr_Format(PyExc_TypeError,
10235 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
10236 func_name, more_or_less, num_expected,
10237 (num_expected == 1) ? "" : "s", num_found);
10238}
10239
10240/* ArgTypeTestError (used by ArgTypeTest) */
10241static void __Pyx_ArgTypeError(PyObject *obj, PyTypeObject *type, const char *name, int exact)
10242{
10243 __Pyx_TypeName type_name;
10244 __Pyx_TypeName obj_type_name;
10245 PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
10246 int from_annotation_subclass = 0;
10247 if (unlikely(!type)) {
10248 PyErr_SetString(PyExc_SystemError, "Missing type object");
10249 return;
10250 } else if (exact == 2) {
10251 if (__Pyx_TypeCheck(obj, type)) {
10252 from_annotation_subclass = 1;
10253 extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
10254 }
10255 }
10256 type_name = __Pyx_PyType_GetFullyQualifiedName(type);
10257 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
10258 if (unlikely(!type_name)) return;
10259 #endif
10260 obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
10261 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
10262 if (unlikely(!obj_type_name)) goto obj_type_name_failed;
10263 #endif
10264 PyErr_Format(PyExc_TypeError,
10265 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME ", got " __Pyx_FMT_TYPENAME ")"
10266#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
10267 "%s%U"
10268#endif
10269 , name, type_name, obj_type_name
10270#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
10271 , (from_annotation_subclass ? ". " : ""), extra_info
10272#endif
10273 );
10274#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
10275 if (exact == 2 && from_annotation_subclass) {
10276 PyObject *res;
10277 PyObject *vargs[2];
10278 vargs[0] = PyErr_GetRaisedException();
10279 vargs[1] = extra_info;
10280 res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
10281 Py_XDECREF(res);
10282 PyErr_SetRaisedException(vargs[0]);
10283 }
10284#endif
10285 __Pyx_DECREF_TypeName(obj_type_name);
10286#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
10287obj_type_name_failed:
10288#endif
10289 __Pyx_DECREF_TypeName(type_name);
10290 return;
10291}
10292
10293/* ArgTypeTest */
10294static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) {
10295 if (likely(Py_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None))))
10296 return 1;
10297 if (!exact && likely(type) && likely(__Pyx_TypeCheck(obj, type)))
10298 return 1;
10299 __Pyx_ArgTypeError(obj, type, name, exact);
10300 return 0;
10301}
10302
10303/* TypeImport */
10304#ifndef __PYX_HAVE_RT_ImportType_3_3_0
10305#define __PYX_HAVE_RT_ImportType_3_3_0
10306static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject *module, const char *module_name, const char *class_name,
10307 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_3_0 check_size)
10308{
10309 PyObject *result = 0;
10310 Py_ssize_t basicsize;
10311 Py_ssize_t itemsize;
10312#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
10313 PyObject *py_basicsize;
10314 PyObject *py_itemsize;
10315#endif
10316 result = PyObject_GetAttrString(module, class_name);
10317 if (!result)
10318 goto bad;
10319 if (!PyType_Check(result)) {
10320 PyErr_Format(PyExc_TypeError,
10321 "%.200s.%.200s is not a type object",
10322 module_name, class_name);
10323 goto bad;
10324 }
10325#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
10326 basicsize = ((PyTypeObject *)result)->tp_basicsize;
10327 itemsize = ((PyTypeObject *)result)->tp_itemsize;
10328#else
10329 if (size == 0) {
10330 return (PyTypeObject *)result;
10331 }
10332 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
10333 if (!py_basicsize)
10334 goto bad;
10335 basicsize = PyLong_AsSsize_t(py_basicsize);
10336 Py_DECREF(py_basicsize);
10337 py_basicsize = 0;
10338 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
10339 goto bad;
10340 py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
10341 if (!py_itemsize)
10342 goto bad;
10343 itemsize = PyLong_AsSsize_t(py_itemsize);
10344 Py_DECREF(py_itemsize);
10345 py_itemsize = 0;
10346 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
10347 goto bad;
10348#endif
10349 if (itemsize) {
10350 if (size % alignment) {
10351 alignment = size % alignment;
10352 }
10353 if (itemsize < (Py_ssize_t)alignment)
10354 itemsize = (Py_ssize_t)alignment;
10355 }
10356 if ((size_t)(basicsize + itemsize) < size) {
10357 PyErr_Format(PyExc_ValueError,
10358 "%.200s.%.200s size changed, may indicate binary incompatibility. "
10359 "Expected %zd from C header, got %zd from PyObject",
10360 module_name, class_name, size, basicsize+itemsize);
10361 goto bad;
10362 }
10363 if (check_size == __Pyx_ImportType_CheckSize_Error_3_3_0 &&
10364 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
10365 PyErr_Format(PyExc_ValueError,
10366 "%.200s.%.200s size changed, may indicate binary incompatibility. "
10367 "Expected %zd from C header, got %zd-%zd from PyObject",
10368 module_name, class_name, size, basicsize, basicsize+itemsize);
10369 goto bad;
10370 }
10371 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_3_0 && (size_t)basicsize > size) {
10372 if (PyErr_WarnFormat(NULL, 0,
10373 "%.200s.%.200s size changed, may indicate binary incompatibility. "
10374 "Expected %zd from C header, got %zd from PyObject",
10375 module_name, class_name, size, basicsize) < 0) {
10376 goto bad;
10377 }
10378 }
10379 return (PyTypeObject *)result;
10380bad:
10381 Py_XDECREF(result);
10382 return NULL;
10383}
10384#endif
10385
10386/* PyObjectGetAttrStrNoError (used by HasAttr) */
10387#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
10388static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
10389 __Pyx_PyThreadState_declare
10390 __Pyx_PyThreadState_assign
10391 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
10392 __Pyx_PyErr_Clear();
10393}
10394#endif
10395static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
10396 PyObject *result;
10397#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
10398 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
10399 return result;
10400#else
10401#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
10402 PyTypeObject* tp = Py_TYPE(obj);
10403 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
10404 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
10405 }
10406#endif
10407 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
10408 if (unlikely(!result)) {
10409 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
10410 }
10411 return result;
10412#endif
10413}
10414
10415/* HasAttr (used by ImportImpl) */
10416#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
10417static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
10418 PyObject *r;
10419 if (unlikely(!PyUnicode_Check(n))) {
10420 PyErr_SetString(PyExc_TypeError,
10421 "hasattr(): attribute name must be string");
10422 return -1;
10423 }
10424 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
10425 if (!r) {
10426 return (unlikely(PyErr_Occurred())) ? -1 : 0;
10427 } else {
10428 Py_DECREF(r);
10429 return 1;
10430 }
10431}
10432#endif
10433
10434/* TupleOrListFromArrayImpl (used by ListFromArray) */
10435CYTHON_UNUSED static PyObject *
10436__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) {
10437 PyObject *res = PyList_New(n);
10438 if (unlikely(res == NULL)) return NULL;
10439 #if CYTHON_COMPILING_IN_CPYTHON
10440 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
10441 #else
10442 Py_ssize_t i;
10443 for (i = 0; i < n; i++) {
10444 Py_INCREF(src[i]);
10445 if (unlikely(__Pyx_PyList_SET_ITEM(res, i, src[i]) < (0))) {
10446 Py_DECREF(res);
10447 return NULL;
10448 }
10449 }
10450 #endif
10451 return res;
10452}
10453
10454/* ImportImpl (used by Import) */
10455static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
10456 PyObject *imported_module = PyImport_GetModule(qualname);
10457 if (unlikely(!imported_module)) {
10458 *module = NULL;
10459 if (PyErr_Occurred()) {
10460 return -1;
10461 }
10462 return 0;
10463 }
10464 *module = imported_module;
10465 return 1;
10466}
10467static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
10468 PyObject *imported_module;
10469 PyObject *top_level_package_name;
10470 Py_ssize_t i;
10471 int status, module_found;
10472 Py_ssize_t dot_index;
10473 module_found = __Pyx__Import_GetModule(qualname, &imported_module);
10474 if (unlikely(!module_found || module_found == -1)) {
10475 *module = NULL;
10476 return module_found;
10477 }
10478 if (imported_names) {
10479 for (i = 0; i < len_imported_names; i++) {
10480 PyObject *imported_name = imported_names[i];
10481#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
10482 int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
10483#else
10484 int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
10485 if (unlikely(has_imported_attribute == -1)) goto error;
10486#endif
10487 if (!has_imported_attribute) {
10488 goto not_found;
10489 }
10490 }
10491 *module = imported_module;
10492 return 1;
10493 }
10494 dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
10495 if (dot_index == -1) {
10496 *module = imported_module;
10497 return 1;
10498 }
10499 if (unlikely(dot_index == -2)) goto error;
10500 top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
10501 if (unlikely(!top_level_package_name)) goto error;
10502 Py_DECREF(imported_module);
10503 status = __Pyx__Import_GetModule(top_level_package_name, module);
10504 Py_DECREF(top_level_package_name);
10505 return status;
10506error:
10507 Py_DECREF(imported_module);
10508 *module = NULL;
10509 return -1;
10510not_found:
10511 Py_DECREF(imported_module);
10512 *module = NULL;
10513 return 0;
10514}
10515static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
10516 PyObject *module = 0;
10517 PyObject *empty_dict = 0;
10518 PyObject *from_list = 0;
10519 int module_found;
10520 if (!qualname) {
10521 qualname = name;
10522 }
10523 module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
10524 if (likely(module_found == 1)) {
10525 return module;
10526 } else if (unlikely(module_found == -1)) {
10527 return NULL;
10528 }
10529 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030f00a6
10530 empty_dict = PyFrozenDict_New(NULL);
10531 #else
10532 empty_dict = PyDict_New();
10533 #endif
10534 if (unlikely(!empty_dict))
10535 goto bad;
10536 if (imported_names) {
10537 from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
10538 if (unlikely(!from_list))
10539 goto bad;
10540 }
10541 if (level == -1) {
10542 const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
10543 if (package_sep != (0)) {
10544 module = PyImport_ImportModuleLevelObject(
10545 name, moddict, empty_dict, from_list, 1);
10546 if (unlikely(!module)) {
10547 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
10548 goto bad;
10549 PyErr_Clear();
10550 }
10551 }
10552 level = 0;
10553 }
10554 if (!module) {
10555 module = PyImport_ImportModuleLevelObject(
10556 name, moddict, empty_dict, from_list, level);
10557 }
10558bad:
10559 Py_XDECREF(from_list);
10560 Py_XDECREF(empty_dict);
10561 return module;
10562}
10563
10564/* Import */
10565static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
10566 return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
10567}
10568
10569/* dict_setdefault (used by FetchCommonType) */
10570static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
10571 PyObject* value;
10572#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
10573 PyDict_SetDefaultRef(d, key, default_value, &value);
10574#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
10575 PyObject *args[] = {d, key, default_value};
10576 value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
10577#elif CYTHON_COMPILING_IN_LIMITED_API
10578 value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
10579#else
10580 value = PyDict_SetDefault(d, key, default_value);
10581 if (unlikely(!value)) return NULL;
10582 Py_INCREF(value);
10583#endif
10584 return value;
10585}
10586
10587/* AddModuleRef (used by FetchSharedCythonModule) */
10588#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3
10589 static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
10590 PyObject *module_dict = PyImport_GetModuleDict();
10591 PyObject *m;
10592 if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
10593 return NULL;
10594 }
10595 if (m != NULL && PyModule_Check(m)) {
10596 return m;
10597 }
10598 Py_XDECREF(m);
10599 m = PyModule_NewObject(name);
10600 if (m == NULL)
10601 return NULL;
10602 if (PyDict_CheckExact(module_dict)) {
10603 PyObject *new_m;
10604 (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
10605 Py_DECREF(m);
10606 return new_m;
10607 } else {
10608 if (PyObject_SetItem(module_dict, name, m) != 0) {
10609 Py_DECREF(m);
10610 return NULL;
10611 }
10612 return m;
10613 }
10614 }
10615 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
10616 if ((PY_VERSION_HEX >= 0x030E0000) && Py_Version >= 0x030E0100) {
10617 return PyImport_AddModuleRef(name);
10618 }
10619 PyObject *py_name = PyUnicode_FromString(name);
10620 if (!py_name) return NULL;
10621 PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
10622 Py_DECREF(py_name);
10623 return module;
10624 }
10625#elif __PYX_LIMITED_VERSION_HEX < 0x030d0000
10626 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
10627 PyObject *module = PyImport_AddModule(name);
10628 Py_XINCREF(module);
10629 return module;
10630 }
10631#endif
10632
10633/* FetchSharedCythonModule (used by FetchCommonType) */
10634static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
10635 return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
10636}
10637
10638/* VerifyCachedType (used by FetchCommonType) */
10639static int __Pyx_VerifyCachedType(PyObject *cached_type,
10640 const char *name,
10641 Py_ssize_t expected_basicsize) {
10642 Py_ssize_t basicsize;
10643 if (!PyType_Check(cached_type)) {
10644 PyErr_Format(PyExc_TypeError,
10645 "Shared Cython type %.200s is not a type object", name);
10646 return -1;
10647 }
10648 if (expected_basicsize == 0) {
10649 return 0; // size is inherited, nothing useful to check
10650 }
10651#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_OPAQUE_OBJECTS
10652 if (expected_basicsize < 0) {
10653 basicsize = PyType_GetTypeDataSize((PyTypeObject*)cached_type);
10654 } else
10655#endif
10656 {
10657 #if CYTHON_COMPILING_IN_LIMITED_API
10658 PyObject *py_basicsize;
10659 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
10660 if (unlikely(!py_basicsize)) return -1;
10661 basicsize = PyLong_AsSsize_t(py_basicsize);
10662 Py_DECREF(py_basicsize);
10663 py_basicsize = NULL;
10664 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
10665 #else
10666 basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
10667 #endif
10668 }
10669 if ((expected_basicsize >= 0) ?
10670 (basicsize != expected_basicsize) :
10671 (basicsize < -expected_basicsize)) {
10672 PyErr_Format(PyExc_TypeError,
10673 "Shared Cython type %.200s has the wrong size, try recompiling",
10674 name);
10675 return -1;
10676 }
10677 return 0;
10678}
10679
10680/* FetchCommonType (used by CommonTypesMetaclass) */
10681#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
10682static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
10683 PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
10684 if (result && metaclass) {
10685 PyObject *old_tp = (PyObject*)Py_TYPE(result);
10686 Py_INCREF((PyObject*)metaclass);
10687 Py_SET_TYPE(result, metaclass);
10688 Py_DECREF(old_tp);
10689 PyType_Modified((PyTypeObject*)result);
10690 }
10691 return result;
10692}
10693#else
10694#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
10695#endif
10696static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
10697 PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
10698 int get_item_ref_result;
10699 const char* object_name = strrchr(spec->name, '.');
10700 object_name = object_name ? object_name+1 : spec->name;
10701 py_object_name = PyUnicode_FromString(object_name);
10702 if (!py_object_name) return NULL;
10703 abi_module = __Pyx_FetchSharedCythonABIModule();
10704 if (!abi_module) goto done;
10705 abi_module_dict = PyModule_GetDict(abi_module);
10706 if (!abi_module_dict) goto done;
10707 get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
10708 if (get_item_ref_result == 1) {
10709 if (__Pyx_VerifyCachedType(
10710 cached_type,
10711 object_name,
10712 spec->basicsize) < 0) {
10713 goto bad;
10714 }
10715 goto done;
10716 } else if (unlikely(get_item_ref_result == -1)) {
10717 goto bad;
10718 }
10719 cached_type = __Pyx_PyType_FromMetaclass(
10720 metaclass,
10721 CYTHON_USE_MODULE_STATE ? module : abi_module,
10722 spec, bases);
10723 if (unlikely(!cached_type)) goto bad;
10724 new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
10725 if (unlikely(new_cached_type != cached_type)) {
10726 if (unlikely(!new_cached_type)) goto bad;
10727 Py_DECREF(cached_type);
10728 cached_type = new_cached_type;
10729 if (__Pyx_VerifyCachedType(
10730 cached_type,
10731 object_name,
10732 spec->basicsize) < 0) {
10733 goto bad;
10734 }
10735 goto done;
10736 } else {
10737 Py_DECREF(new_cached_type);
10738 }
10739done:
10740 Py_XDECREF(abi_module);
10741 Py_DECREF(py_object_name);
10742 assert(cached_type == NULL || PyType_Check(cached_type));
10743 return (PyTypeObject *) cached_type;
10744bad:
10745 Py_XDECREF(cached_type);
10746 cached_type = NULL;
10747 goto done;
10748}
10749
10750/* CommonTypesMetaclass (used by CythonFunctionShared) */
10751static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
10752 return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
10753}
10754#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
10755static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
10756 PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
10757 return NULL;
10758}
10759static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
10760 PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
10761 return -1;
10762}
10763#endif
10764static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
10765 {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
10766 {0, 0, 0, 0, 0}
10767};
10768static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
10769 {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
10770 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
10771 {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
10772 {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
10773 {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
10774 #endif
10775 {0, 0}
10776};
10777static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
10778 __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
10779 0,
10780 0,
10781 Py_TPFLAGS_IMMUTABLETYPE |
10782 Py_TPFLAGS_DISALLOW_INSTANTIATION |
10783 Py_TPFLAGS_DEFAULT,
10784 __pyx_CommonTypesMetaclass_slots
10785};
10786static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
10787 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
10788 PyObject *bases = PyTuple_Pack(1, &PyType_Type);
10789 if (unlikely(!bases)) {
10790 return -1;
10791 }
10792 mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
10793 Py_DECREF(bases);
10794 if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
10795 return -1;
10796 }
10797 return 0;
10798}
10799
10800/* CythonFunctionPerModule (used by CythonFunctionShared) */
10801#if CYTHON_COMPILING_IN_LIMITED_API
10802static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
10803 if (__Pyx_CyFunction_Check(func)) {
10804 return __Pyx_as_CyFunctionObject(func)->func_methoddef->ml_meth == (PyCFunction) cfunc;
10805 } else if (PyCFunction_Check(func)) {
10806 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
10807 }
10808 return 0;
10809}
10810static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
10811 if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
10812 int result;
10813 PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
10814 if (unlikely(!newFunc)) {
10815 PyErr_Clear(); // It's only an optimization, so don't throw an error
10816 return 0;
10817 }
10818 result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
10819 Py_DECREF(newFunc);
10820 return result;
10821 }
10822 return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
10823}
10824#else
10825static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
10826 if (PyMethod_Check(func)) {
10827 func = PyMethod_GET_FUNCTION(func);
10828 }
10829 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
10830}
10831#endif
10832static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
10833#if CYTHON_COMPILING_IN_LIMITED_API
10834 __Pyx_Py_XDECREF_SET(
10835 __Pyx__CyFunction_GetClassObj(f),
10836 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
10837#else
10838 __Pyx_Py_XDECREF_SET(
10839 ((PyCMethodObject *) (f))->mm_class,
10840 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
10841#endif
10842}
10843static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
10844 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
10845 m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
10846 if (unlikely(!m->defaults))
10847 return NULL;
10848 return m->defaults;
10849}
10850static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
10851 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
10852 m->defaults_tuple = tuple;
10853 Py_INCREF(tuple);
10854}
10855static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
10856 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
10857 m->defaults_kwdict = dict;
10858 Py_INCREF(dict);
10859}
10860static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
10861 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
10862 m->func_annotations = dict;
10863 Py_INCREF(dict);
10864}
10865
10866/* CallTypeTraverse (used by CythonFunctionShared) */
10867#if !CYTHON_USE_TYPE_SPECS
10868#else
10869static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
10870 if (!always_call) {
10871 PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
10872 unsigned long flags = PyType_GetFlags(base);
10873 if (flags & Py_TPFLAGS_HEAPTYPE) {
10874 return 0;
10875 }
10876 }
10877 Py_VISIT((PyObject*)Py_TYPE(o));
10878 return 0;
10879}
10880#endif
10881
10882/* PyMethodNew (used by CythonFunctionShared) */
10883#if CYTHON_COMPILING_IN_LIMITED_API
10884static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
10885 PyObject *result;
10886 CYTHON_UNUSED_VAR(typ);
10887 if (!self)
10888 return __Pyx_NewRef(func);
10889 #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
10890 {
10891 PyObject *args[] = {func, self};
10892 result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
10893 }
10894 #else
10895 result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
10896 #endif
10897 return result;
10898}
10899#else
10900static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
10901 CYTHON_UNUSED_VAR(typ);
10902 if (!self)
10903 return __Pyx_NewRef(func);
10904 return PyMethod_New(func, self);
10905}
10906#endif
10907
10908/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
10909#if CYTHON_VECTORCALL
10910static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
10911{
10912 PyObject *res = NULL;
10913 PyObject *kwnames;
10914 PyObject **newargs;
10915 PyObject **kwvalues;
10916 Py_ssize_t i;
10917 #if CYTHON_AVOID_BORROWED_REFS
10918 PyObject *pos;
10919 #else
10920 Py_ssize_t pos;
10921 #endif
10922 size_t j;
10923 PyObject *key, *value;
10924 unsigned long keys_are_strings;
10925 #if !CYTHON_ASSUME_SAFE_SIZE
10926 Py_ssize_t nkw = PyDict_Size(kw);
10927 if (unlikely(nkw == -1)) return NULL;
10928 #else
10929 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
10930 #endif
10931 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
10932 if (unlikely(newargs == NULL)) {
10933 PyErr_NoMemory();
10934 return NULL;
10935 }
10936 for (j = 0; j < nargs; j++) newargs[j] = args[j];
10937 kwnames = PyTuple_New(nkw);
10938 if (unlikely(kwnames == NULL)) {
10939 PyMem_Free(newargs);
10940 return NULL;
10941 }
10942 kwvalues = newargs + nargs;
10943 pos = 0;
10944 i = 0;
10945 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
10946 while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
10947 keys_are_strings &=
10948 #if CYTHON_COMPILING_IN_LIMITED_API
10949 PyType_GetFlags(Py_TYPE(key));
10950 #else
10951 Py_TYPE(key)->tp_flags;
10952 #endif
10953 #if !CYTHON_ASSUME_SAFE_MACROS
10954 if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
10955 #else
10956 PyTuple_SET_ITEM(kwnames, i, key);
10957 #endif
10958 kwvalues[i] = value;
10959 i++;
10960 }
10961 if (unlikely(!keys_are_strings)) {
10962 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
10963 goto cleanup;
10964 }
10965 res = vc(func, newargs, nargs, kwnames);
10966cleanup:
10967 #if CYTHON_AVOID_BORROWED_REFS
10968 Py_DECREF(pos);
10969 #endif
10970 Py_DECREF(kwnames);
10971 for (i = 0; i < nkw; i++)
10972 Py_DECREF(kwvalues[i]);
10973 PyMem_Free(newargs);
10974 return res;
10975}
10976static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
10977{
10978 Py_ssize_t kw_size =
10979 likely(kw == NULL) ?
10980 0 :
10981#if !CYTHON_ASSUME_SAFE_SIZE
10982 PyDict_Size(kw);
10983#else
10984 PyDict_GET_SIZE(kw);
10985#endif
10986 if (kw_size == 0) {
10987 return vc(func, args, nargs, NULL);
10988 }
10989#if !CYTHON_ASSUME_SAFE_SIZE
10990 else if (unlikely(kw_size == -1)) {
10991 return NULL;
10992 }
10993#endif
10994 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
10995}
10996#endif
10997
10998/* CythonFunctionShared (used by CythonFunction) */
10999static PyObject *
11000__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
11001{
11002 if (unlikely(op->func_doc == NULL)) {
11003#if CYTHON_COMPILING_IN_LIMITED_API
11004 const char *doc = op->func_methoddef->ml_doc;
11005#else
11006 const char *doc = ((PyCFunctionObject*)op)->m_ml->ml_doc;
11007#endif
11008 if (doc) {
11009 op->func_doc = PyUnicode_FromString(doc);
11010 if (unlikely(op->func_doc == NULL))
11011 return NULL;
11012 } else {
11013 Py_INCREF(Py_None);
11014 return Py_None;
11015 }
11016 }
11017 Py_INCREF(op->func_doc);
11018 return op->func_doc;
11019}
11020static PyObject *
11021__Pyx_CyFunction_get_doc(PyObject *op_in, void *closure) {
11022 PyObject *result;
11023 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11024 CYTHON_UNUSED_VAR(closure);
11025 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11026 result = __Pyx_CyFunction_get_doc_locked(op);
11027 __Pyx_END_CRITICAL_SECTION();
11028 return result;
11029}
11030static int
11031__Pyx_CyFunction_set_doc(PyObject *op_in, PyObject *value, void *context)
11032{
11033 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11034 CYTHON_UNUSED_VAR(context);
11035 if (value == NULL) {
11036 value = Py_None;
11037 }
11038 Py_INCREF(value);
11039 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11040 __Pyx_Py_XDECREF_SET(op->func_doc, value);
11041 __Pyx_END_CRITICAL_SECTION();
11042 return 0;
11043}
11044static PyObject *
11045__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
11046{
11047 if (unlikely(op->func_name == NULL)) {
11048#if CYTHON_COMPILING_IN_LIMITED_API
11049 const char *name = op->func_methoddef->ml_name;
11050#else
11051 const char *name = ((PyCFunctionObject*)op)->m_ml->ml_name;
11052#endif
11053 op->func_name = PyUnicode_InternFromString(name);
11054 if (unlikely(op->func_name == NULL))
11055 return NULL;
11056 }
11057 Py_INCREF(op->func_name);
11058 return op->func_name;
11059}
11060static PyObject *
11061__Pyx_CyFunction_get_name(PyObject *op, void *context)
11062{
11063 PyObject *result = NULL;
11064 CYTHON_UNUSED_VAR(context);
11065 __Pyx_BEGIN_CRITICAL_SECTION(op);
11066 result = __Pyx_CyFunction_get_name_locked(__Pyx_as_CyFunctionObject(op));
11067 __Pyx_END_CRITICAL_SECTION();
11068 return result;
11069}
11070static int
11071__Pyx_CyFunction_set_name(PyObject *op_in, PyObject *value, void *context)
11072{
11073 CYTHON_UNUSED_VAR(context);
11074 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
11075 PyErr_SetString(PyExc_TypeError,
11076 "__name__ must be set to a string object");
11077 return -1;
11078 }
11079 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11080 Py_INCREF(value);
11081 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11082 __Pyx_Py_XDECREF_SET(op->func_name, value);
11083 __Pyx_END_CRITICAL_SECTION();
11084 return 0;
11085}
11086static PyObject *
11087__Pyx_CyFunction_get_qualname(PyObject *op_in, void *context)
11088{
11089 CYTHON_UNUSED_VAR(context);
11090 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11091 PyObject *result;
11092 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11093 Py_INCREF(op->func_qualname);
11094 result = op->func_qualname;
11095 __Pyx_END_CRITICAL_SECTION();
11096 return result;
11097}
11098static int
11099__Pyx_CyFunction_set_qualname(PyObject *op_in, PyObject *value, void *context)
11100{
11101 CYTHON_UNUSED_VAR(context);
11102 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
11103 PyErr_SetString(PyExc_TypeError,
11104 "__qualname__ must be set to a string object");
11105 return -1;
11106 }
11107 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11108 Py_INCREF(value);
11109 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11110 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
11111 __Pyx_END_CRITICAL_SECTION();
11112 return 0;
11113}
11114#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
11115static PyObject *
11116__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
11117{
11118 CYTHON_UNUSED_VAR(context);
11119 if (unlikely(op->func_dict == NULL)) {
11120 op->func_dict = PyDict_New();
11121 if (unlikely(op->func_dict == NULL))
11122 return NULL;
11123 }
11124 Py_INCREF(op->func_dict);
11125 return op->func_dict;
11126}
11127#endif
11128static PyObject *
11129__Pyx_CyFunction_get_globals(PyObject *op_in, void *context)
11130{
11131 CYTHON_UNUSED_VAR(context);
11132 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11133 Py_INCREF(op->func_globals);
11134 return op->func_globals;
11135}
11136static PyObject *
11137__Pyx_CyFunction_get_closure(PyObject *op, void *context)
11138{
11139 CYTHON_UNUSED_VAR(op);
11140 CYTHON_UNUSED_VAR(context);
11141 Py_INCREF(Py_None);
11142 return Py_None;
11143}
11144static PyObject *
11145__Pyx_CyFunction_get_code(PyObject *op_in, void *context)
11146{
11147 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11148 PyObject* result = (op->func_code) ? op->func_code : Py_None;
11149 CYTHON_UNUSED_VAR(context);
11150 Py_INCREF(result);
11151 return result;
11152}
11153static int
11154__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op, PyObject *op_obj) {
11155 int result = 0;
11156 PyObject *res = op->defaults_getter(op_obj);
11157 if (unlikely(!res))
11158 return -1;
11159 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11160 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
11161 Py_INCREF(op->defaults_tuple);
11162 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
11163 Py_INCREF(op->defaults_kwdict);
11164 #else
11165 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
11166 if (unlikely(!op->defaults_tuple)) result = -1;
11167 else {
11168 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
11169 if (unlikely(!op->defaults_kwdict)) result = -1;
11170 }
11171 #endif
11172 Py_DECREF(res);
11173 return result;
11174}
11175static int
11176__Pyx_CyFunction_set_defaults(PyObject *op_in, PyObject* value, void *context) {
11177 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11178 CYTHON_UNUSED_VAR(context);
11179 if (!value) {
11180 value = Py_None;
11181 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
11182 PyErr_SetString(PyExc_TypeError,
11183 "__defaults__ must be set to a tuple object");
11184 return -1;
11185 }
11186 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
11187 "currently affect the values used in function calls", 1);
11188 Py_INCREF(value);
11189 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11190 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
11191 __Pyx_END_CRITICAL_SECTION();
11192 return 0;
11193}
11194static PyObject *
11195__Pyx_CyFunction_get_defaults_locked(PyObject *op_in) {
11196 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11197 PyObject* result = op->defaults_tuple;
11198 if (unlikely(!result)) {
11199 if (op->defaults_getter) {
11200 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0)) return NULL;
11201 result = op->defaults_tuple;
11202 } else {
11203 result = Py_None;
11204 }
11205 }
11206 Py_INCREF(result);
11207 return result;
11208}
11209static PyObject *
11210__Pyx_CyFunction_get_defaults(PyObject *op, void *context) {
11211 PyObject* result = NULL;
11212 CYTHON_UNUSED_VAR(context);
11213 __Pyx_BEGIN_CRITICAL_SECTION(op);
11214 result = __Pyx_CyFunction_get_defaults_locked(op);
11215 __Pyx_END_CRITICAL_SECTION();
11216 return result;
11217}
11218static int
11219__Pyx_CyFunction_set_kwdefaults(PyObject *op_in, PyObject* value, void *context) {
11220 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11221 CYTHON_UNUSED_VAR(context);
11222 if (!value) {
11223 value = Py_None;
11224 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
11225 PyErr_SetString(PyExc_TypeError,
11226 "__kwdefaults__ must be set to a dict object");
11227 return -1;
11228 }
11229 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
11230 "currently affect the values used in function calls", 1);
11231 Py_INCREF(value);
11232 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11233 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
11234 __Pyx_END_CRITICAL_SECTION();
11235 return 0;
11236}
11237static PyObject *
11238__Pyx_CyFunction_get_kwdefaults_locked(PyObject *op_in) {
11239 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11240 PyObject* result = op->defaults_kwdict;
11241 if (unlikely(!result)) {
11242 if (op->defaults_getter) {
11243 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0)) return NULL;
11244 result = op->defaults_kwdict;
11245 } else {
11246 result = Py_None;
11247 }
11248 }
11249 Py_INCREF(result);
11250 return result;
11251}
11252static PyObject *
11253__Pyx_CyFunction_get_kwdefaults(PyObject *op, void *context) {
11254 PyObject* result;
11255 CYTHON_UNUSED_VAR(context);
11256 __Pyx_BEGIN_CRITICAL_SECTION(op);
11257 result = __Pyx_CyFunction_get_kwdefaults_locked(op);
11258 __Pyx_END_CRITICAL_SECTION();
11259 return result;
11260}
11261static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value);
11262static int
11263__Pyx_CyFunction_set_annotations(PyObject *op_in, PyObject* value, void *context) {
11264 CYTHON_UNUSED_VAR(context);
11265 if (!value || value == Py_None) {
11266 value = NULL;
11267 } else if (unlikely(!PyDict_Check(value))) {
11268 PyErr_SetString(PyExc_TypeError,
11269 "__annotations__ must be set to a dict object");
11270 return -1;
11271 }
11272 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11273 Py_XINCREF(value);
11274 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11275 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
11276 __Pyx_END_CRITICAL_SECTION();
11277 if (unlikely(__Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, Py_None) < 0)) return -1;
11278 return 0;
11279}
11280static int
11281__Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
11282 /* Return 1 if the function dict exists, 0 otherwise. This cannot fail:
11283 * _PyObject_GetDictPtr() may clear errors internally, but never reports them. */
11284#if CYTHON_COMPILING_IN_PYPY
11285 *dict = PyObject_GenericGetDict(op_in, NULL);
11286#elif CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030C0000
11287 *dict = __Pyx_as_CyFunctionObject(op_in)->func_dict;
11288#else
11289 PyObject **dictptr = _PyObject_GetDictPtr(op_in);
11290 *dict = likely(dictptr) ? *dictptr : NULL;
11291#endif
11292 return *dict ? 1 : 0;
11293}
11294static int
11295__Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
11296 PyObject *dict;
11297 int dict_found;
11298 *annotate = NULL;
11299 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
11300 if (!dict_found) return 0;
11301 return __Pyx_PyDict_GetItemRef(dict, __pyx_mstate_global->__pyx_n_u_annotate, annotate);
11302}
11303static int
11304__Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
11305 PyObject *dict;
11306 int dict_found;
11307 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
11308 if (!dict_found) return 0;
11309 if (value) {
11310 return PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
11311 } else {
11312#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
11313 return PyDict_Pop(dict, __pyx_mstate_global->__pyx_n_u_annotate, NULL);
11314#else
11315 int result = PyDict_Contains(dict, __pyx_mstate_global->__pyx_n_u_annotate);
11316 if (result == 1) {
11317 result = PyDict_DelItem(dict, __pyx_mstate_global->__pyx_n_u_annotate);
11318 }
11319 return result;
11320#endif
11321 }
11322}
11323static int
11324__Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
11325 PyObject *dict;
11326 int result;
11327#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
11328 dict = __Pyx_CyFunction_get_dict(__Pyx_as_CyFunctionObject(op_in), NULL);
11329#else
11330 dict = PyObject_GenericGetDict(op_in, NULL);
11331#endif
11332 if (unlikely(!dict)) return -1;
11333 result = PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
11334 Py_DECREF(dict);
11335 return result;
11336}
11337static PyObject *
11338__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
11339 PyObject* result = op->func_annotations;
11340 if (unlikely(!result)) {
11341 result = PyDict_New();
11342 if (unlikely(!result)) return NULL;
11343 op->func_annotations = result;
11344 }
11345 Py_INCREF(result);
11346 return result;
11347}
11348static PyObject *
11349__Pyx_CyFunction_get_annotations(PyObject *op_in, void *context) {
11350 PyObject *annotate = NULL;
11351 PyObject *result = NULL;
11352 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11353 CYTHON_UNUSED_VAR(context);
11354 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11355 result = __Pyx_XNewRef(op->func_annotations);
11356 __Pyx_END_CRITICAL_SECTION();
11357 if (result) return result;
11358 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
11359 if (!annotate || annotate == Py_None) {
11360 Py_XDECREF(annotate);
11361 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11362 result = __Pyx_CyFunction_get_annotations_locked(op);
11363 __Pyx_END_CRITICAL_SECTION();
11364 return result;
11365 }
11366 PyObject *format = PyLong_FromLong(1L); // annotationlib.Format.VALUE
11367 if (likely(format)) {
11368 if (!Py_EnterRecursiveCall(" cyfunction __annotations__.__get__")) {
11369 result = __Pyx_PyObject_CallOneArg(annotate, format);
11370 Py_LeaveRecursiveCall();
11371 Py_DECREF(format);
11372 }
11373 }
11374 Py_DECREF(annotate);
11375 if (unlikely(!result)) return NULL;
11376 if (unlikely(!PyDict_Check(result))) {
11377 PyErr_SetString(PyExc_TypeError, "__annotate__ must return a dict");
11378 Py_DECREF(result);
11379 return NULL;
11380 }
11381 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11382 __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
11383 __Pyx_END_CRITICAL_SECTION();
11384 return result;
11385}
11386static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *arg) {
11387 CYTHON_UNUSED_VAR(arg);
11388 if (unlikely(!self)) {
11389 PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument");
11390 return NULL;
11391 }
11392 PyObject *result;
11393 if (Py_EnterRecursiveCall(" in cyfunction annotate")) {
11394 return NULL;
11395 }
11396 result = __Pyx_CyFunction_get_annotations(self, NULL);
11397 Py_LeaveRecursiveCall();
11398 return result;
11399}
11400static PyObject *
11401__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context);
11402static int
11403__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) {
11404 CYTHON_UNUSED_VAR(context);
11405 if (value == NULL) {
11406 PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted");
11407 return -1;
11408 }
11409 if (unlikely(value != Py_None && !PyCallable_Check(value))) {
11410 PyErr_SetString(PyExc_TypeError, "__annotate__ must be callable or None");
11411 return -1;
11412 }
11413 if (unlikely(__Pyx_TypeCheck(value, &PyCFunction_Type))) {
11414#if !CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_PYPY
11415 PyCFunction cfunction = PyCFunction_GetFunction(value);
11416 if (unlikely(!cfunction)) return -1;
11417 PyObject *value_self = PyCFunction_GetSelf(value);
11418 if (unlikely(!value_self && PyErr_Occurred())) return -1;
11419#else
11420 PyCFunction cfunction = PyCFunction_GET_FUNCTION(value);
11421 PyObject *value_self = PyCFunction_GET_SELF(value);
11422#endif
11423 if (cfunction == __Pyx_CyFunction_annotate_impl && value_self == op_in) {
11424 return __Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, NULL);
11425 }
11426 }
11427 if (value != Py_None) {
11428 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11429 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11430 Py_CLEAR(op->func_annotations);
11431 __Pyx_END_CRITICAL_SECTION();
11432 }
11433 return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
11434}
11435#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11436static PyObject *
11437__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
11438 int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
11439 if (is_coroutine) {
11440 PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
11441 fromlist = PyList_New(1);
11442 if (unlikely(!fromlist)) return NULL;
11443 Py_INCREF(marker);
11444#if CYTHON_ASSUME_SAFE_MACROS
11445 PyList_SET_ITEM(fromlist, 0, marker);
11446#else
11447 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
11448 Py_DECREF(fromlist);
11449 return NULL;
11450 }
11451#endif
11452 module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
11453 Py_DECREF(fromlist);
11454 if (unlikely(!module)) {
11455 goto ignore_or_error;
11456 }
11457 is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
11458 Py_DECREF(module);
11459 if (likely(is_coroutine_value)) {
11460 return is_coroutine_value;
11461 }
11462ignore_or_error:
11463 if (!__Pyx_IgnoreException(PyExc_Exception)) {
11464 return NULL;
11465 }
11466 }
11467 return __Pyx_PyBool_FromLong(is_coroutine);
11468}
11469static PyObject *
11470__Pyx_CyFunction_get_is_coroutine(PyObject *op_in, void *context) {
11471 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11472 PyObject *result;
11473 CYTHON_UNUSED_VAR(context);
11474 if (op->func_is_coroutine) {
11475 return __Pyx_NewRef(op->func_is_coroutine);
11476 }
11477 result = __Pyx_CyFunction_get_is_coroutine_value(op);
11478 if (unlikely(!result))
11479 return NULL;
11480 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11481 if (op->func_is_coroutine) {
11482 Py_DECREF(result);
11483 result = __Pyx_NewRef(op->func_is_coroutine);
11484 } else {
11485 op->func_is_coroutine = __Pyx_NewRef(result);
11486 }
11487 __Pyx_END_CRITICAL_SECTION();
11488 return result;
11489}
11490#endif
11491static void __Pyx_CyFunction_raise_argument_count_error(PyObject *func, const char* message, Py_ssize_t size) {
11492#if CYTHON_COMPILING_IN_LIMITED_API
11493 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
11494 if (!py_name) return;
11495 PyErr_Format(PyExc_TypeError,
11496 "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
11497 py_name, message, size);
11498 Py_DECREF(py_name);
11499#else
11500 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
11501 PyErr_Format(PyExc_TypeError,
11502 "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
11503 name, message, size);
11504#endif
11505}
11506static void __Pyx_CyFunction_raise_type_error(PyObject *func, const char* message) {
11507#if CYTHON_COMPILING_IN_LIMITED_API
11508 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
11509 if (!py_name) return;
11510 PyErr_Format(PyExc_TypeError,
11511 "%.200S() %s",
11512 py_name, message);
11513 Py_DECREF(py_name);
11514#else
11515 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
11516 PyErr_Format(PyExc_TypeError,
11517 "%.200s() %s",
11518 name, message);
11519#endif
11520}
11521#if CYTHON_COMPILING_IN_LIMITED_API
11522static PyObject *
11523__Pyx_CyFunction_get_module(PyObject *op_in, void *context) {
11524 CYTHON_UNUSED_VAR(context);
11525 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11526 Py_INCREF(op->func_module);
11527 return op->func_module;
11528}
11529static int
11530__Pyx_CyFunction_set_module(PyObject *op_in, PyObject* value, void *context) {
11531 CYTHON_UNUSED_VAR(context);
11532 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11533 if (value == NULL) {
11534 value = Py_None;
11535 }
11536 Py_INCREF(value);
11537 PyObject *old = op->func_module;
11538 op->func_module = value;
11539 Py_DECREF(old);
11540 return 0;
11541}
11542#endif
11543static PyGetSetDef __pyx_CyFunction_getsets[] = {
11544 {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
11545 {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
11546 {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
11547 {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
11548 {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
11549#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
11550 {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
11551 {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
11552#else
11553 {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
11554 {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
11555#endif
11556 {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
11557 {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
11558 {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
11559 {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
11560 {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
11561 {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
11562 {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
11563 {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
11564 {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
11565 {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
11566 {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0},
11567#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11568 {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
11569#endif
11570#if CYTHON_COMPILING_IN_LIMITED_API
11571 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
11572#endif
11573 {0, 0, 0, 0, 0}
11574};
11575static PyMemberDef __pyx_CyFunction_members[] = {
11576#if !CYTHON_COMPILING_IN_LIMITED_API
11577 {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
11578#endif
11579#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
11580 {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict),
11581 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
11582#endif
11583#if CYTHON_VECTORCALL
11584#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
11585 {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall),
11586 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
11587#else
11588 {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
11589#endif
11590#if CYTHON_COMPILING_IN_LIMITED_API
11591 {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist),
11592 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
11593#else
11594 {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
11595#endif
11596#endif
11597 {0, 0, 0, 0, 0}
11598};
11599static PyObject *
11600__Pyx_CyFunction_reduce(PyObject *m_in, PyObject *args)
11601{
11602 PyObject *result = NULL;
11603 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
11604 CYTHON_UNUSED_VAR(args);
11605 __Pyx_BEGIN_CRITICAL_SECTION(m_in);
11606 Py_INCREF(m->func_qualname);
11607 result = m->func_qualname;
11608 __Pyx_END_CRITICAL_SECTION();
11609 return result;
11610}
11611static PyMethodDef __pyx_CyFunction_methods[] = {
11612 {"__annotate_cython__", __Pyx_CyFunction_annotate_impl, METH_O,
11613 "Placeholder __annotate__ function to allow 'functools.wraps' to work "
11614 "on Cython functions."},
11615 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_NOARGS, 0},
11616 {0, 0, 0, 0}
11617};
11618static PyObject *
11619__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) {
11620 PyObject *annotate = NULL;
11621 CYTHON_UNUSED_VAR(context);
11622 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
11623 if (annotate) return annotate;
11624 PyObject *method = PyCFunction_New(
11625 &__pyx_CyFunction_methods[0],
11626 op_in);
11627 return method;
11628}
11629#if CYTHON_COMPILING_IN_LIMITED_API
11630#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
11631#else
11632#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
11633#endif
11634static PyObject *__Pyx_CyFunction_Init(PyObject *op_in,
11635 PyMethodDef *ml, int flags, PyObject* qualname,
11636 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
11637 __pyx_CyFunctionObject* op = __Pyx_as_CyFunctionObject(op_in);
11638#if !CYTHON_COMPILING_IN_LIMITED_API
11639 PyCFunctionObject *cf = (PyCFunctionObject*) op;
11640#endif
11641 if (unlikely(op == NULL))
11642 return NULL;
11643#if CYTHON_COMPILING_IN_LIMITED_API
11644 op->func_methoddef = ml;
11645 Py_INCREF(module);
11646 op->func_module = module;
11647#endif
11648 op->flags = flags;
11649 __Pyx_CyFunction_weakreflist(op) = NULL;
11650#if !CYTHON_COMPILING_IN_LIMITED_API
11651 cf->m_ml = ml;
11652 cf->m_self = (PyObject *) op;
11653#endif
11654 Py_XINCREF(closure);
11655 op->func_closure = closure;
11656#if !CYTHON_COMPILING_IN_LIMITED_API
11657 Py_XINCREF(module);
11658 cf->m_module = module;
11659#endif
11660#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
11661 op->func_dict = NULL;
11662#endif
11663 op->func_name = NULL;
11664 Py_INCREF(qualname);
11665 op->func_qualname = qualname;
11666 op->func_doc = NULL;
11667#if CYTHON_COMPILING_IN_LIMITED_API
11668 op->func_classobj = NULL;
11669#else
11670 ((PyCMethodObject*)op)->mm_class = NULL;
11671#endif
11672 op->func_globals = globals;
11673 Py_INCREF(op->func_globals);
11674 Py_XINCREF(code);
11675 op->func_code = code;
11676 op->defaults = NULL;
11677 op->defaults_tuple = NULL;
11678 op->defaults_kwdict = NULL;
11679 op->defaults_getter = NULL;
11680 op->func_annotations = NULL;
11681#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11682 op->func_is_coroutine = NULL;
11683#endif
11684#if CYTHON_VECTORCALL
11685 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
11686 case METH_NOARGS:
11687 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
11688 break;
11689 case METH_O:
11690 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
11691 break;
11692 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
11693 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
11694 break;
11695 case METH_FASTCALL | METH_KEYWORDS:
11696 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
11697 break;
11698 case METH_VARARGS | METH_KEYWORDS:
11699 __Pyx_CyFunction_func_vectorcall(op) = NULL;
11700 break;
11701 default:
11702 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
11703 Py_DECREF(op_in);
11704 return NULL;
11705 }
11706#endif
11707 return op_in;
11708}
11709static int __Pyx__CyFunction_clear(__pyx_CyFunctionObject *m)
11710{
11711 Py_CLEAR(m->func_closure);
11712#if CYTHON_COMPILING_IN_LIMITED_API
11713 Py_CLEAR(m->func_module);
11714#else
11715 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
11716#endif
11717#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
11718 Py_CLEAR(m->func_dict);
11719#elif PY_VERSION_HEX < 0x030d0000
11720 _PyObject_ClearManagedDict((PyObject*)m);
11721#else
11722 PyObject_ClearManagedDict((PyObject*)m);
11723#endif
11724 Py_CLEAR(m->func_name);
11725 Py_CLEAR(m->func_qualname);
11726 Py_CLEAR(m->func_doc);
11727 Py_CLEAR(m->func_globals);
11728 Py_CLEAR(m->func_code);
11729#if CYTHON_COMPILING_IN_LIMITED_API
11730 Py_CLEAR(m->func_classobj);
11731#else
11732 {
11733 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
11734 ((PyCMethodObject *) (m))->mm_class = NULL;
11735 Py_XDECREF(cls);
11736 }
11737#endif
11738 Py_CLEAR(m->defaults_tuple);
11739 Py_CLEAR(m->defaults_kwdict);
11740 Py_CLEAR(m->func_annotations);
11741#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11742 Py_CLEAR(m->func_is_coroutine);
11743#endif
11744 Py_CLEAR(m->defaults);
11745 return 0;
11746}
11747static int
11748__Pyx_CyFunction_clear(PyObject *m)
11749{
11750 return __Pyx__CyFunction_clear(__Pyx_as_CyFunctionObject(m));
11751}
11752static void __Pyx__CyFunction_dealloc(PyObject *m)
11753{
11754 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(m);
11755 if (__Pyx_CyFunction_weakreflist(cyfunc) != NULL)
11756 PyObject_ClearWeakRefs(m);
11757 __Pyx__CyFunction_clear(cyfunc);
11758 __Pyx_PyHeapTypeObject_GC_Del(m);
11759}
11760static void __Pyx_CyFunction_dealloc(PyObject *m)
11761{
11762 PyObject_GC_UnTrack(m);
11763 __Pyx__CyFunction_dealloc(m);
11764}
11765static int __Pyx_CyFunction_traverse(PyObject *m_in, visitproc visit, void *arg)
11766{
11767 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
11768 {
11769 int e = __Pyx_call_type_traverse(m_in, 1, visit, arg);
11770 if (e) return e;
11771 }
11772 Py_VISIT(m->func_closure);
11773#if CYTHON_COMPILING_IN_LIMITED_API
11774 Py_VISIT(m->func_module);
11775#else
11776 Py_VISIT(((PyCFunctionObject*)m)->m_module);
11777#endif
11778#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
11779 Py_VISIT(m->func_dict);
11780#else
11781 {
11782 int e =
11783#if PY_VERSION_HEX < 0x030d0000
11784 _PyObject_VisitManagedDict
11785#else
11786 PyObject_VisitManagedDict
11787#endif
11788 ((PyObject*)m, visit, arg);
11789 if (e != 0) return e;
11790 }
11791#endif
11792 __Pyx_VISIT_CONST(m->func_name);
11793 __Pyx_VISIT_CONST(m->func_qualname);
11794 Py_VISIT(m->func_doc);
11795 Py_VISIT(m->func_globals);
11796 __Pyx_VISIT_CONST(m->func_code);
11797 Py_VISIT(__Pyx__CyFunction_GetClassObj(m));
11798 Py_VISIT(m->defaults_tuple);
11799 Py_VISIT(m->defaults_kwdict);
11800 Py_VISIT(m->func_annotations);
11801#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
11802 Py_VISIT(m->func_is_coroutine);
11803#endif
11804 Py_VISIT(m->defaults);
11805 return 0;
11806}
11807static PyObject*
11808__Pyx_CyFunction_repr(PyObject *op_in)
11809{
11810 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
11811 PyObject *repr;
11812 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
11813 repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
11814 op->func_qualname, (void *)op);
11815 __Pyx_END_CRITICAL_SECTION();
11816 return repr;
11817}
11818static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
11819#if CYTHON_COMPILING_IN_LIMITED_API
11820 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
11821 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
11822 int flags = cyfunc->func_methoddef->ml_flags;
11823#else
11824 PyCFunctionObject* f = (PyCFunctionObject*)func;
11825 PyCFunction meth = f->m_ml->ml_meth;
11826 int flags = f->m_ml->ml_flags;
11827#endif
11828 Py_ssize_t size;
11829 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
11830 case METH_VARARGS:
11831 if (likely(kw == NULL || PyDict_Size(kw) == 0))
11832 return (*meth)(self, arg);
11833 break;
11834 case METH_VARARGS | METH_KEYWORDS:
11835 return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
11836 case METH_NOARGS:
11837 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
11838#if CYTHON_ASSUME_SAFE_SIZE
11839 size = PyTuple_GET_SIZE(arg);
11840#else
11841 size = PyTuple_Size(arg);
11842 if (unlikely(size < 0)) return NULL;
11843#endif
11844 if (likely(size == 0))
11845 return (*meth)(self, NULL);
11846 __Pyx_CyFunction_raise_argument_count_error(
11847 func,
11848 "takes no arguments", size);
11849 return NULL;
11850 }
11851 break;
11852 case METH_O:
11853 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
11854#if CYTHON_ASSUME_SAFE_SIZE
11855 size = PyTuple_GET_SIZE(arg);
11856#else
11857 size = PyTuple_Size(arg);
11858 if (unlikely(size < 0)) return NULL;
11859#endif
11860 if (likely(size == 1)) {
11861 PyObject *result, *arg0;
11862 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11863 arg0 = PyTuple_GET_ITEM(arg, 0);
11864 #else
11865 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
11866 #endif
11867 result = (*meth)(self, arg0);
11868 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
11869 Py_DECREF(arg0);
11870 #endif
11871 return result;
11872 }
11873 __Pyx_CyFunction_raise_argument_count_error(
11874 func,
11875 "takes exactly one argument", size);
11876 return NULL;
11877 }
11878 break;
11879 default:
11880 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
11881 return NULL;
11882 }
11883 __Pyx_CyFunction_raise_type_error(
11884 func, "takes no keyword arguments");
11885 return NULL;
11886}
11887static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
11888 PyObject *result;
11889 result = __Pyx_CyFunction_CallMethod(func, func, arg, kw);
11890 return result;
11891}
11892static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
11893 PyObject *result;
11894 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
11895#if CYTHON_VECTORCALL
11896 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
11897 if (vc) {
11898#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
11899 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
11900#else
11901 (void) &__Pyx_PyVectorcall_FastCallDict;
11902 return PyVectorcall_Call(func, args, kw);
11903#endif
11904 }
11905#endif
11906 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
11907 Py_ssize_t argc;
11908 PyObject *new_args;
11909 PyObject *self;
11910#if CYTHON_ASSUME_SAFE_SIZE
11911 argc = PyTuple_GET_SIZE(args);
11912#else
11913 argc = PyTuple_Size(args);
11914 if (unlikely(argc < 0)) return NULL;
11915#endif
11916 new_args = PyTuple_GetSlice(args, 1, argc);
11917 if (unlikely(!new_args))
11918 return NULL;
11919 self = PyTuple_GetItem(args, 0);
11920 if (unlikely(!self)) {
11921 Py_DECREF(new_args);
11922 PyErr_Format(PyExc_TypeError,
11923 "unbound method %.200S() needs an argument",
11924 cyfunc->func_qualname);
11925 return NULL;
11926 }
11927 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
11928 Py_DECREF(new_args);
11929 } else {
11930 result = __Pyx_CyFunction_Call(func, args, kw);
11931 }
11932 return result;
11933}
11934#if CYTHON_VECTORCALL
11935static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(PyObject *func, __pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
11936{
11937 int ret = 0;
11938 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
11939 if (unlikely(nargs < 1)) {
11940 __Pyx_CyFunction_raise_type_error(
11941 func, "needs an argument");
11942 return -1;
11943 }
11944 ret = 1;
11945 }
11946 if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
11947 __Pyx_CyFunction_raise_type_error(
11948 func, "takes no keyword arguments");
11949 return -1;
11950 }
11951 return ret;
11952}
11953static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
11954{
11955 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
11956 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
11957 PyObject *self;
11958#if CYTHON_COMPILING_IN_LIMITED_API
11959 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
11960 if (unlikely(!meth)) return NULL;
11961#else
11962 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
11963#endif
11964 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
11965 case 1:
11966 self = args[0];
11967 args += 1;
11968 nargs -= 1;
11969 break;
11970 case 0:
11971 self = func;
11972 break;
11973 default:
11974 return NULL;
11975 }
11976 if (unlikely(nargs != 0)) {
11977 __Pyx_CyFunction_raise_argument_count_error(
11978 func, "takes no arguments", nargs);
11979 return NULL;
11980 }
11981 return meth(self, NULL);
11982}
11983static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
11984{
11985 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
11986 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
11987 PyObject *self;
11988#if CYTHON_COMPILING_IN_LIMITED_API
11989 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
11990 if (unlikely(!meth)) return NULL;
11991#else
11992 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
11993#endif
11994 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
11995 case 1:
11996 self = args[0];
11997 args += 1;
11998 nargs -= 1;
11999 break;
12000 case 0:
12001 self = func;
12002 break;
12003 default:
12004 return NULL;
12005 }
12006 if (unlikely(nargs != 1)) {
12007 __Pyx_CyFunction_raise_argument_count_error(
12008 func, "takes exactly one argument", nargs);
12009 return NULL;
12010 }
12011 return meth(self, args[0]);
12012}
12013static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
12014{
12015 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
12016 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
12017 PyObject *self;
12018#if CYTHON_COMPILING_IN_LIMITED_API
12019 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
12020 if (unlikely(!meth)) return NULL;
12021#else
12022 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
12023#endif
12024 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
12025 case 1:
12026 self = args[0];
12027 args += 1;
12028 nargs -= 1;
12029 break;
12030 case 0:
12031 self = func;
12032 break;
12033 default:
12034 return NULL;
12035 }
12036 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
12037}
12038static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
12039{
12040 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
12041 PyTypeObject *cls = (PyTypeObject *) __Pyx__CyFunction_GetClassObj(cyfunc);
12042 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
12043 PyObject *self;
12044#if CYTHON_COMPILING_IN_LIMITED_API
12045 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
12046 if (unlikely(!meth)) return NULL;
12047#else
12048 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
12049#endif
12050 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
12051 case 1:
12052 self = args[0];
12053 args += 1;
12054 nargs -= 1;
12055 break;
12056 case 0:
12057 self = func;
12058 break;
12059 default:
12060 return NULL;
12061 }
12062 #if PY_VERSION_HEX < 0x030e00A6
12063 size_t nargs_value = (size_t) nargs;
12064 #else
12065 Py_ssize_t nargs_value = nargs;
12066 #endif
12067 return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
12068}
12069#endif
12070static PyType_Slot __pyx_CyFunctionType_slots[] = {
12071 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
12072 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
12073 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
12074 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
12075 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
12076 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
12077 {Py_tp_members, (void *)__pyx_CyFunction_members},
12078 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
12079 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
12080 {0, 0},
12081};
12082static PyType_Spec __pyx_CyFunctionType_spec = {
12083 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
12084 __PYX_SHARED_SIZEOF(__pyx_CyFunctionObject),
12085 0,
12086#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
12087 Py_TPFLAGS_METHOD_DESCRIPTOR |
12088#endif
12089#if CYTHON_VECTORCALL
12090#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
12091 Py_TPFLAGS_HAVE_VECTORCALL |
12092#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
12093 _Py_TPFLAGS_HAVE_VECTORCALL |
12094#endif
12095#endif // CYTHON_VECTORCALL
12096#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
12097 Py_TPFLAGS_MANAGED_DICT |
12098#endif
12099 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
12100 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
12101 __pyx_CyFunctionType_slots
12102};
12103static int __pyx_CyFunction_init(PyObject *module) {
12104 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
12105 mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
12106 mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
12107 if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
12108 return -1;
12109 }
12110 return 0;
12111}
12112
12113/* CythonFunction */
12114static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
12115 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
12116 (void)&__Pyx_Get_CyFunction_Type;
12117 PyObject *op = __Pyx_CyFunction_Init(
12118 PyObject_GC_New(PyObject, __pyx_mstate_global->__pyx_CyFunctionType),
12119 ml, flags, qualname, closure, module, globals, code
12120 );
12121 if (likely(op)) {
12122 PyObject_GC_Track(op);
12123 }
12124 return op;
12125}
12126static PyTypeObject *__Pyx_Get_CyFunction_Type(void) {
12127 PyTypeObject *tp = __pyx_mstate_global->__pyx_CyFunctionType;
12128 Py_INCREF((PyObject*)tp);
12129 return tp;
12130}
12131
12132/* PyDictVersioning (used by CLineInTraceback) */
12133#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
12134static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
12135 PyObject *dict = Py_TYPE(obj)->tp_dict;
12136 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
12137}
12138static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
12139 PyObject **dictptr = NULL;
12140 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
12141 if (offset) {
12142#if CYTHON_COMPILING_IN_CPYTHON
12143 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
12144#else
12145 dictptr = _PyObject_GetDictPtr(obj);
12146#endif
12147 }
12148 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
12149}
12150static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
12151 PyObject *dict = Py_TYPE(obj)->tp_dict;
12152 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
12153 return 0;
12154 return obj_dict_version == __Pyx_get_object_dict_version(obj);
12155}
12156#endif
12157
12158/* CLineInTraceback (used by AddTraceback) */
12159#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
12160#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
12161#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
12162#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12163#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
12164#else
12165PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
12166 PyObject **dict_ptr = _PyObject_GetDictPtr(o);
12167 return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
12168}
12169#endif
12170static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
12171 PyObject *use_cline = NULL;
12172 PyObject *ptype, *pvalue, *ptraceback;
12173 PyObject *cython_runtime_dict;
12174 CYTHON_MAYBE_UNUSED_VAR(tstate);
12175 if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
12176 return c_line;
12177 }
12178 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12179 cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
12180 if (likely(cython_runtime_dict)) {
12181 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
12182 use_cline, cython_runtime_dict,
12183 __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
12184 }
12185 if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
12186 c_line = 0;
12187 }
12188 Py_XDECREF(use_cline);
12189 Py_XDECREF(cython_runtime_dict);
12190 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12191 return c_line;
12192}
12193#endif
12194
12195/* CodeObjectCache (used by AddTraceback) */
12196static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
12197 int start = 0, mid = 0, end = count - 1;
12198 if (end >= 0 && code_line > entries[end].code_line) {
12199 return count;
12200 }
12201 while (start < end) {
12202 mid = start + (end - start) / 2;
12203 if (code_line < entries[mid].code_line) {
12204 end = mid;
12205 } else if (code_line > entries[mid].code_line) {
12206 start = mid + 1;
12207 } else {
12208 return mid;
12209 }
12210 }
12211 if (code_line <= entries[mid].code_line) {
12212 return mid;
12213 } else {
12214 return mid + 1;
12215 }
12216}
12217static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
12218 __Pyx_CachedCodeObjectType* code_object;
12219 int pos;
12220 if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
12221 return NULL;
12222 }
12223 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
12224 if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
12225 return NULL;
12226 }
12227 code_object = code_cache->entries[pos].code_object;
12228 Py_INCREF(code_object);
12229 return code_object;
12230}
12231static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
12232#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
12233 (void)__pyx__find_code_object;
12234 return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
12235#else
12236 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
12237#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12238 __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
12239 if (old_count < 0) {
12240 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
12241 return NULL;
12242 }
12243#endif
12244 __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
12245#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12246 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
12247#endif
12248 return result;
12249#endif
12250}
12251static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
12252{
12253 int pos, i;
12254 __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
12255 if (unlikely(!code_line)) {
12256 return;
12257 }
12258 if (unlikely(!entries)) {
12259 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
12260 if (likely(entries)) {
12261 code_cache->entries = entries;
12262 code_cache->max_count = 64;
12263 code_cache->count = 1;
12264 entries[0].code_line = code_line;
12265 entries[0].code_object = code_object;
12266 Py_INCREF(code_object);
12267 }
12268 return;
12269 }
12270 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
12271 if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
12272 __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
12273 entries[pos].code_object = code_object;
12274 Py_INCREF(code_object);
12275 Py_DECREF(tmp);
12276 return;
12277 }
12278 if (code_cache->count == code_cache->max_count) {
12279 int new_max = code_cache->max_count + 64;
12280 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
12281 code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
12282 if (unlikely(!entries)) {
12283 return;
12284 }
12285 code_cache->entries = entries;
12286 code_cache->max_count = new_max;
12287 }
12288 for (i=code_cache->count; i>pos; i--) {
12289 entries[i] = entries[i-1];
12290 }
12291 entries[pos].code_line = code_line;
12292 entries[pos].code_object = code_object;
12293 code_cache->count++;
12294 Py_INCREF(code_object);
12295}
12296static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
12297#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
12298 (void)__pyx__insert_code_object;
12299 return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
12300#else
12301 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
12302#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12303 __pyx_nonatomic_int_type expected = 0;
12304 if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
12305 return;
12306 }
12307#endif
12308 __pyx__insert_code_object(code_cache, code_line, code_object);
12309#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
12310 __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
12311#endif
12312#endif
12313}
12314
12315/* AddTraceback */
12316#include "compile.h"
12317#include "frameobject.h"
12318#include "traceback.h"
12319#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
12320 #ifndef Py_BUILD_CORE
12321 #define Py_BUILD_CORE 1
12322 #endif
12323 #include "internal/pycore_frame.h"
12324#endif
12325#if CYTHON_COMPILING_IN_LIMITED_API
12326static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
12327 PyObject *firstlineno, PyObject *name) {
12328 PyObject *replace = NULL;
12329 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
12330 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
12331 replace = PyObject_GetAttrString(code, "replace");
12332 if (likely(replace)) {
12333 PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
12334 Py_DECREF(replace);
12335 return result;
12336 }
12337 return NULL;
12338}
12339static void __Pyx_AddTraceback(const char *funcname, int c_line,
12340 int py_line, const char *filename) {
12341 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
12342 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
12343 PyObject *exc_type, *exc_value, *exc_traceback;
12344 int success = 0;
12345 if (c_line) {
12346 c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
12347 }
12348 __Pyx_PyErr_FetchException(&exc_type, &exc_value, &exc_traceback);
12349 code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
12350 if (!code_object) {
12351 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
12352 if (unlikely(!code_object)) goto bad;
12353 py_py_line = PyLong_FromLong(py_line);
12354 if (unlikely(!py_py_line)) goto bad;
12355 if (c_line) {
12356 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12357 } else {
12358 py_funcname = PyUnicode_FromString(funcname);
12359 }
12360 if (unlikely(!py_funcname)) goto bad;
12361 dict = PyDict_New();
12362 if (unlikely(!dict)) goto bad;
12363 {
12364 PyObject *old_code_object = code_object;
12365 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
12366 Py_DECREF(old_code_object);
12367 }
12368 if (unlikely(!code_object)) goto bad;
12369 __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
12370 } else {
12371 dict = PyDict_New();
12372 }
12373 getframe = PySys_GetObject("_getframe");
12374 if (unlikely(!getframe)) goto bad;
12375 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
12376 frame = PyEval_EvalCode(code_object, dict, dict);
12377 if (unlikely(!frame) || frame == Py_None) goto bad;
12378 success = 1;
12379 bad:
12380 __Pyx_PyErr_RestoreException(exc_type, exc_value, exc_traceback);
12381 Py_XDECREF(code_object);
12382 Py_XDECREF(py_py_line);
12383 Py_XDECREF(py_funcname);
12384 Py_XDECREF(dict);
12385 Py_XDECREF(replace);
12386 if (success) {
12387 PyTraceBack_Here(
12388 (struct _frame*)frame);
12389 }
12390 Py_XDECREF(frame);
12391}
12392#else
12393static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
12394 const char *funcname, int c_line,
12395 int py_line, const char *filename) {
12396 PyCodeObject *py_code = NULL;
12397 PyObject *py_funcname = NULL;
12398 if (c_line) {
12399 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12400 if (!py_funcname) goto bad;
12401 funcname = PyUnicode_AsUTF8(py_funcname);
12402 if (!funcname) goto bad;
12403 }
12404 py_code = PyCode_NewEmpty(filename, funcname, py_line);
12405 Py_XDECREF(py_funcname);
12406 return py_code;
12407bad:
12408 Py_XDECREF(py_funcname);
12409 return NULL;
12410}
12411static void __Pyx_AddTraceback(const char *funcname, int c_line,
12412 int py_line, const char *filename) {
12413 PyCodeObject *py_code = 0;
12414 PyFrameObject *py_frame = 0;
12415 PyThreadState *tstate = __Pyx_PyThreadState_Current;
12416 PyObject *ptype, *pvalue, *ptraceback;
12417 if (c_line) {
12418 c_line = __Pyx_CLineForTraceback(tstate, c_line);
12419 }
12420 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
12421 if (!py_code) {
12422 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12423 py_code = __Pyx_CreateCodeObjectForTraceback(
12424 funcname, c_line, py_line, filename);
12425 if (!py_code) {
12426 /* If the code object creation fails, then we should clear the
12427 fetched exception references and propagate the new exception */
12428 Py_XDECREF(ptype);
12429 Py_XDECREF(pvalue);
12430 Py_XDECREF(ptraceback);
12431 goto bad;
12432 }
12433 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12434 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
12435 }
12436 py_frame = PyFrame_New(
12437 tstate, /*PyThreadState *tstate,*/
12438 py_code, /*PyCodeObject *code,*/
12439 __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/
12440 0 /*PyObject *locals*/
12441 );
12442 if (!py_frame) goto bad;
12443 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
12444 PyTraceBack_Here(py_frame);
12445bad:
12446 Py_XDECREF(py_code);
12447 Py_XDECREF(py_frame);
12448}
12449#endif
12450
12451/* CIntFromPyVerify */
12452#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
12453 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
12454#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
12455 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
12456#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
12457 {\
12458 func_type value = func_value;\
12459 if (sizeof(target_type) < sizeof(func_type)) {\
12460 if (unlikely(value != (func_type) (target_type) value)) {\
12461 func_type zero = 0;\
12462 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
12463 return (target_type) -1;\
12464 if (is_unsigned && unlikely(value < zero))\
12465 goto raise_neg_overflow;\
12466 else\
12467 goto raise_overflow;\
12468 }\
12469 }\
12470 return (target_type) value;\
12471 }
12472
12473/* Declarations */
12474#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12475 #ifdef __cplusplus
12476 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
12477 return ::std::complex< float >(x, y);
12478 }
12479 #else
12480 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
12481 return x + y*(__pyx_t_float_complex)_Complex_I;
12482 }
12483 #endif
12484#else
12485 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
12486 __pyx_t_float_complex z;
12487 z.real = x;
12488 z.imag = y;
12489 return z;
12490 }
12491#endif
12492
12493/* Arithmetic */
12494#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12495#else
12496 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12497 return (a.real == b.real) && (a.imag == b.imag);
12498 }
12499 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12500 __pyx_t_float_complex z;
12501 z.real = a.real + b.real;
12502 z.imag = a.imag + b.imag;
12503 return z;
12504 }
12505 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12506 __pyx_t_float_complex z;
12507 z.real = a.real - b.real;
12508 z.imag = a.imag - b.imag;
12509 return z;
12510 }
12511 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12512 __pyx_t_float_complex z;
12513 z.real = a.real * b.real - a.imag * b.imag;
12514 z.imag = a.real * b.imag + a.imag * b.real;
12515 return z;
12516 }
12517 #if 1
12518 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12519 if (b.imag == 0) {
12520 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
12521 } else if (fabsf(b.real) >= fabsf(b.imag)) {
12522 if (b.real == 0 && b.imag == 0) {
12523 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
12524 } else {
12525 float r = b.imag / b.real;
12526 float s = (float)(1.0) / (b.real + b.imag * r);
12527 return __pyx_t_float_complex_from_parts(
12528 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
12529 }
12530 } else {
12531 float r = b.real / b.imag;
12532 float s = (float)(1.0) / (b.imag + b.real * r);
12533 return __pyx_t_float_complex_from_parts(
12534 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
12535 }
12536 }
12537 #else
12538 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12539 if (b.imag == 0) {
12540 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
12541 } else {
12542 float denom = b.real * b.real + b.imag * b.imag;
12543 return __pyx_t_float_complex_from_parts(
12544 (a.real * b.real + a.imag * b.imag) / denom,
12545 (a.imag * b.real - a.real * b.imag) / denom);
12546 }
12547 }
12548 #endif
12549 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
12550 __pyx_t_float_complex z;
12551 z.real = -a.real;
12552 z.imag = -a.imag;
12553 return z;
12554 }
12555 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
12556 return (a.real == 0) && (a.imag == 0);
12557 }
12558 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
12559 __pyx_t_float_complex z;
12560 z.real = a.real;
12561 z.imag = -a.imag;
12562 return z;
12563 }
12564 #if 1
12565 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
12566 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12567 return sqrtf(z.real*z.real + z.imag*z.imag);
12568 #else
12569 return hypotf(z.real, z.imag);
12570 #endif
12571 }
12572 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
12573 __pyx_t_float_complex z;
12574 float r, lnr, theta, z_r, z_theta;
12575 if (b.imag == 0 && b.real == (int)b.real) {
12576 if (b.real < 0) {
12577 float denom = a.real * a.real + a.imag * a.imag;
12578 a.real = a.real / denom;
12579 a.imag = -a.imag / denom;
12580 b.real = -b.real;
12581 }
12582 switch ((int)b.real) {
12583 case 0:
12584 z.real = 1;
12585 z.imag = 0;
12586 return z;
12587 case 1:
12588 return a;
12589 case 2:
12590 return __Pyx_c_prod_float(a, a);
12591 case 3:
12592 z = __Pyx_c_prod_float(a, a);
12593 return __Pyx_c_prod_float(z, a);
12594 case 4:
12595 z = __Pyx_c_prod_float(a, a);
12596 return __Pyx_c_prod_float(z, z);
12597 }
12598 }
12599 if (a.imag == 0) {
12600 if (a.real == 0) {
12601 return a;
12602 } else if ((b.imag == 0) && (a.real >= 0)) {
12603 z.real = powf(a.real, b.real);
12604 z.imag = 0;
12605 return z;
12606 } else if (a.real > 0) {
12607 r = a.real;
12608 theta = 0;
12609 } else {
12610 r = -a.real;
12611 theta = atan2f(0.0, -1.0);
12612 }
12613 } else {
12614 r = __Pyx_c_abs_float(a);
12615 theta = atan2f(a.imag, a.real);
12616 }
12617 lnr = logf(r);
12618 z_r = expf(lnr * b.real - theta * b.imag);
12619 z_theta = theta * b.real + lnr * b.imag;
12620 z.real = z_r * cosf(z_theta);
12621 z.imag = z_r * sinf(z_theta);
12622 return z;
12623 }
12624 #endif
12625#endif
12626
12627/* Declarations */
12628#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12629 #ifdef __cplusplus
12630 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
12631 return ::std::complex< double >(x, y);
12632 }
12633 #else
12634 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
12635 return x + y*(__pyx_t_double_complex)_Complex_I;
12636 }
12637 #endif
12638#else
12639 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
12640 __pyx_t_double_complex z;
12641 z.real = x;
12642 z.imag = y;
12643 return z;
12644 }
12645#endif
12646
12647/* Arithmetic */
12648#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12649#else
12650 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12651 return (a.real == b.real) && (a.imag == b.imag);
12652 }
12653 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12654 __pyx_t_double_complex z;
12655 z.real = a.real + b.real;
12656 z.imag = a.imag + b.imag;
12657 return z;
12658 }
12659 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12660 __pyx_t_double_complex z;
12661 z.real = a.real - b.real;
12662 z.imag = a.imag - b.imag;
12663 return z;
12664 }
12665 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12666 __pyx_t_double_complex z;
12667 z.real = a.real * b.real - a.imag * b.imag;
12668 z.imag = a.real * b.imag + a.imag * b.real;
12669 return z;
12670 }
12671 #if 1
12672 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12673 if (b.imag == 0) {
12674 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12675 } else if (fabs(b.real) >= fabs(b.imag)) {
12676 if (b.real == 0 && b.imag == 0) {
12677 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
12678 } else {
12679 double r = b.imag / b.real;
12680 double s = (double)(1.0) / (b.real + b.imag * r);
12681 return __pyx_t_double_complex_from_parts(
12682 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
12683 }
12684 } else {
12685 double r = b.real / b.imag;
12686 double s = (double)(1.0) / (b.imag + b.real * r);
12687 return __pyx_t_double_complex_from_parts(
12688 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
12689 }
12690 }
12691 #else
12692 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12693 if (b.imag == 0) {
12694 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12695 } else {
12696 double denom = b.real * b.real + b.imag * b.imag;
12697 return __pyx_t_double_complex_from_parts(
12698 (a.real * b.real + a.imag * b.imag) / denom,
12699 (a.imag * b.real - a.real * b.imag) / denom);
12700 }
12701 }
12702 #endif
12703 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
12704 __pyx_t_double_complex z;
12705 z.real = -a.real;
12706 z.imag = -a.imag;
12707 return z;
12708 }
12709 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
12710 return (a.real == 0) && (a.imag == 0);
12711 }
12712 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
12713 __pyx_t_double_complex z;
12714 z.real = a.real;
12715 z.imag = -a.imag;
12716 return z;
12717 }
12718 #if 1
12719 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
12720 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12721 return sqrt(z.real*z.real + z.imag*z.imag);
12722 #else
12723 return hypot(z.real, z.imag);
12724 #endif
12725 }
12726 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
12727 __pyx_t_double_complex z;
12728 double r, lnr, theta, z_r, z_theta;
12729 if (b.imag == 0 && b.real == (int)b.real) {
12730 if (b.real < 0) {
12731 double denom = a.real * a.real + a.imag * a.imag;
12732 a.real = a.real / denom;
12733 a.imag = -a.imag / denom;
12734 b.real = -b.real;
12735 }
12736 switch ((int)b.real) {
12737 case 0:
12738 z.real = 1;
12739 z.imag = 0;
12740 return z;
12741 case 1:
12742 return a;
12743 case 2:
12744 return __Pyx_c_prod_double(a, a);
12745 case 3:
12746 z = __Pyx_c_prod_double(a, a);
12747 return __Pyx_c_prod_double(z, a);
12748 case 4:
12749 z = __Pyx_c_prod_double(a, a);
12750 return __Pyx_c_prod_double(z, z);
12751 }
12752 }
12753 if (a.imag == 0) {
12754 if (a.real == 0) {
12755 return a;
12756 } else if ((b.imag == 0) && (a.real >= 0)) {
12757 z.real = pow(a.real, b.real);
12758 z.imag = 0;
12759 return z;
12760 } else if (a.real > 0) {
12761 r = a.real;
12762 theta = 0;
12763 } else {
12764 r = -a.real;
12765 theta = atan2(0.0, -1.0);
12766 }
12767 } else {
12768 r = __Pyx_c_abs_double(a);
12769 theta = atan2(a.imag, a.real);
12770 }
12771 lnr = log(r);
12772 z_r = exp(lnr * b.real - theta * b.imag);
12773 z_theta = theta * b.real + lnr * b.imag;
12774 z.real = z_r * cos(z_theta);
12775 z.imag = z_r * sin(z_theta);
12776 return z;
12777 }
12778 #endif
12779#endif
12780
12781/* Declarations */
12782#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12783 #ifdef __cplusplus
12784 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
12785 return ::std::complex< long double >(x, y);
12786 }
12787 #else
12788 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
12789 return x + y*(__pyx_t_long_double_complex)_Complex_I;
12790 }
12791 #endif
12792#else
12793 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
12794 __pyx_t_long_double_complex z;
12795 z.real = x;
12796 z.imag = y;
12797 return z;
12798 }
12799#endif
12800
12801/* Arithmetic */
12802#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
12803#else
12804 static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
12805 return (a.real == b.real) && (a.imag == b.imag);
12806 }
12807 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) {
12808 __pyx_t_long_double_complex z;
12809 z.real = a.real + b.real;
12810 z.imag = a.imag + b.imag;
12811 return z;
12812 }
12813 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) {
12814 __pyx_t_long_double_complex z;
12815 z.real = a.real - b.real;
12816 z.imag = a.imag - b.imag;
12817 return z;
12818 }
12819 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) {
12820 __pyx_t_long_double_complex z;
12821 z.real = a.real * b.real - a.imag * b.imag;
12822 z.imag = a.real * b.imag + a.imag * b.real;
12823 return z;
12824 }
12825 #if 1
12826 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) {
12827 if (b.imag == 0) {
12828 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12829 } else if (fabsl(b.real) >= fabsl(b.imag)) {
12830 if (b.real == 0 && b.imag == 0) {
12831 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
12832 } else {
12833 long double r = b.imag / b.real;
12834 long double s = (long double)(1.0) / (b.real + b.imag * r);
12835 return __pyx_t_long_double_complex_from_parts(
12836 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
12837 }
12838 } else {
12839 long double r = b.real / b.imag;
12840 long double s = (long double)(1.0) / (b.imag + b.real * r);
12841 return __pyx_t_long_double_complex_from_parts(
12842 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
12843 }
12844 }
12845 #else
12846 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) {
12847 if (b.imag == 0) {
12848 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
12849 } else {
12850 long double denom = b.real * b.real + b.imag * b.imag;
12851 return __pyx_t_long_double_complex_from_parts(
12852 (a.real * b.real + a.imag * b.imag) / denom,
12853 (a.imag * b.real - a.real * b.imag) / denom);
12854 }
12855 }
12856 #endif
12857 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
12858 __pyx_t_long_double_complex z;
12859 z.real = -a.real;
12860 z.imag = -a.imag;
12861 return z;
12862 }
12863 static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
12864 return (a.real == 0) && (a.imag == 0);
12865 }
12866 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
12867 __pyx_t_long_double_complex z;
12868 z.real = a.real;
12869 z.imag = -a.imag;
12870 return z;
12871 }
12872 #if 1
12873 static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
12874 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
12875 return sqrtl(z.real*z.real + z.imag*z.imag);
12876 #else
12877 return hypotl(z.real, z.imag);
12878 #endif
12879 }
12880 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) {
12881 __pyx_t_long_double_complex z;
12882 long double r, lnr, theta, z_r, z_theta;
12883 if (b.imag == 0 && b.real == (int)b.real) {
12884 if (b.real < 0) {
12885 long double denom = a.real * a.real + a.imag * a.imag;
12886 a.real = a.real / denom;
12887 a.imag = -a.imag / denom;
12888 b.real = -b.real;
12889 }
12890 switch ((int)b.real) {
12891 case 0:
12892 z.real = 1;
12893 z.imag = 0;
12894 return z;
12895 case 1:
12896 return a;
12897 case 2:
12898 return __Pyx_c_prod_long__double(a, a);
12899 case 3:
12900 z = __Pyx_c_prod_long__double(a, a);
12901 return __Pyx_c_prod_long__double(z, a);
12902 case 4:
12903 z = __Pyx_c_prod_long__double(a, a);
12904 return __Pyx_c_prod_long__double(z, z);
12905 }
12906 }
12907 if (a.imag == 0) {
12908 if (a.real == 0) {
12909 return a;
12910 } else if ((b.imag == 0) && (a.real >= 0)) {
12911 z.real = powl(a.real, b.real);
12912 z.imag = 0;
12913 return z;
12914 } else if (a.real > 0) {
12915 r = a.real;
12916 theta = 0;
12917 } else {
12918 r = -a.real;
12919 theta = atan2l(0.0, -1.0);
12920 }
12921 } else {
12922 r = __Pyx_c_abs_long__double(a);
12923 theta = atan2l(a.imag, a.real);
12924 }
12925 lnr = logl(r);
12926 z_r = expl(lnr * b.real - theta * b.imag);
12927 z_theta = theta * b.real + lnr * b.imag;
12928 z.real = z_r * cosl(z_theta);
12929 z.imag = z_r * sinl(z_theta);
12930 return z;
12931 }
12932 #endif
12933#endif
12934
12935/* CIntFromPy */
12936static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x);
12937static int __Pyx_raise_neg_overflow___Pyx_PyLong_As_int(void) {
12938 const char* type_name = "int";
12939 PyErr_Format(PyExc_OverflowError,
12940 "can't convert negative value to %.200s", type_name);
12941 return (int) -1;
12942}
12943static int __Pyx_raise_overflow___Pyx_PyLong_As_int(void) {
12944 const char* type_name = "int";
12945 PyErr_Format(PyExc_OverflowError,
12946 "value too large to convert to %.200s", type_name);
12947 return (int) -1;
12948}
12949static CYTHON_INLINE int __Pyx_PyULong___Pyx_PyLong_As_int(PyObject *x) {
12950 const int is_unsigned = 1;
12951#if CYTHON_USE_PYLONG_INTERNALS
12952 {
12953 const digit* digits = __Pyx_PyLong_Digits(x);
12954 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
12955 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
12956 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
12957 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12958 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
12959 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12960 }
12961 } else
12962 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
12963 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
12964 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
12965 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
12966 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12967 }
12968 } else
12969 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
12970 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
12971 __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])))
12972 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
12973 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
12974 }
12975 } else
12976 {}
12977 }
12978#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
12979 if (unlikely(Py_SIZE(x) < 0)) {
12980 goto raise_neg_overflow;
12981 }
12982#else
12983 {
12984 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
12985 if (unlikely(result < 0))
12986 return (int) -1;
12987 if (unlikely(result == 1))
12988 goto raise_neg_overflow;
12989 }
12990#endif
12991 if ((sizeof(int) <= sizeof(unsigned long))) {
12992 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
12993 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
12994 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
12995 }
12996 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
12997raise_neg_overflow:
12998 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
12999raise_overflow:
13000 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
13001}
13002static CYTHON_INLINE int __Pyx_PySLong___Pyx_PyLong_As_int(PyObject *x) {
13003 const int is_unsigned = 0;
13004#if CYTHON_USE_PYLONG_INTERNALS
13005 if (__Pyx_PyLong_IsNeg(x)) {
13006 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13007 const digit* digits = __Pyx_PyLong_Digits(x);
13008 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
13009 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
13010 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13011 __PYX_VERIFY_RETURN_INT(int, long, ival)
13012 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
13013 return (int) (((int) -1) * (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13014 }
13015 } else
13016 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
13017 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
13018 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13019 __PYX_VERIFY_RETURN_INT(int, long, ival)
13020 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
13021 return (int) (((int) -1) * (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13022 }
13023 } else
13024 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
13025 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
13026 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]));
13027 __PYX_VERIFY_RETURN_INT(int, long, ival)
13028 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
13029 return (int) (((int) -1) * (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13030 }
13031 } else
13032 {}
13033 } else {
13034 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13035 const digit* digits = __Pyx_PyLong_Digits(x);
13036 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
13037 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
13038 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13039 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
13040 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13041 }
13042 } else
13043 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
13044 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
13045 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13046 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
13047 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13048 }
13049 } else
13050 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
13051 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
13052 __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])))
13053 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
13054 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13055 }
13056 } else
13057 {}
13058 }
13059#endif
13060 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
13061 if ((sizeof(int) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
13062 __PYX_VERIFY_RETURN_INT_EXC(int, int, PyLong_AsInt(x))
13063 } else
13064 #endif
13065 if ((sizeof(int) <= sizeof(long))) {
13066 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
13067 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
13068 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
13069 }
13070 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
13071raise_neg_overflow:
13072 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
13073raise_overflow:
13074 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
13075}
13076static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x) {
13077#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13078#pragma GCC diagnostic push
13079#pragma GCC diagnostic ignored "-Wconversion"
13080#endif
13081 const int neg_one = (int) -1, const_zero = (int) 0;
13082#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13083#pragma GCC diagnostic pop
13084#endif
13085 const int is_unsigned = neg_one > const_zero;
13086 int val;
13087 int ret = -1;
13088#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
13089 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
13090 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
13091 if (unlikely(bytes_copied == -1)) {
13092 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
13093 goto raise_overflow;
13094 } else {
13095 ret = 0;
13096 }
13097#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
13098 int one = 1; int is_little = (int)*(unsigned char *)&one;
13099 unsigned char *bytes = (unsigned char *)&val;
13100 ret = _PyLong_AsByteArray((PyLongObject *)x,
13101 bytes, sizeof(val),
13102 is_little, !is_unsigned);
13103 if ((0)) goto raise_overflow;
13104#else
13105 PyObject *v;
13106 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
13107 int bits, remaining_bits, is_negative = 0;
13108 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
13109 if (likely(PyLong_CheckExact(x))) {
13110 v = __Pyx_NewRef(x);
13111 } else {
13112 v = PyNumber_Long(x);
13113 if (unlikely(!v)) return (int) -1;
13114 assert(PyLong_CheckExact(v));
13115 }
13116 {
13117 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
13118 if (unlikely(result < 0)) {
13119 Py_DECREF(v);
13120 return (int) -1;
13121 }
13122 is_negative = result == 1;
13123 }
13124 if (is_unsigned && unlikely(is_negative)) {
13125 Py_DECREF(v);
13126 PyErr_SetString(PyExc_OverflowError,
13127 "can't convert negative value to int");
13128 return (int) -1;
13129 } else if (is_negative) {
13130 stepval = PyNumber_Invert(v);
13131 Py_DECREF(v);
13132 if (unlikely(!stepval))
13133 return (int) -1;
13134 } else {
13135 stepval = v;
13136 }
13137 v = NULL;
13138 val = (int) 0;
13139 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
13140 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
13141 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
13142 PyObject *tmp, *digit;
13143 long idigit;
13144 digit = PyNumber_And(stepval, mask);
13145 if (unlikely(!digit)) goto done;
13146 idigit = PyLong_AsLong(digit);
13147 Py_DECREF(digit);
13148 if (unlikely(idigit < 0)) goto done;
13149 val |= ((int) idigit) << bits;
13150 tmp = PyNumber_Rshift(stepval, shift);
13151 if (unlikely(!tmp)) goto done;
13152 Py_DECREF(stepval); stepval = tmp;
13153 }
13154 Py_DECREF(shift); shift = NULL;
13155 Py_DECREF(mask); mask = NULL;
13156 {
13157 long idigit = PyLong_AsLong(stepval);
13158 if (unlikely(idigit < 0)) goto done;
13159 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
13160 if (unlikely(idigit >= (1L << remaining_bits)))
13161 goto raise_overflow;
13162 val |= ((int) idigit) << bits;
13163 }
13164 if (!is_unsigned) {
13165 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
13166 goto raise_overflow;
13167 if (is_negative)
13168 val = ~val;
13169 }
13170 ret = 0;
13171done:
13172 Py_XDECREF(shift);
13173 Py_XDECREF(mask);
13174 Py_XDECREF(stepval);
13175#endif
13176 if (unlikely(ret))
13177 return (int) -1;
13178 return val;
13179raise_overflow:
13180 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
13181}
13182static CYTHON_INLINE int __Pyx_PyLong___Pyx_PyLong_As_int(PyObject *x) {
13183#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13184#pragma GCC diagnostic push
13185#pragma GCC diagnostic ignored "-Wconversion"
13186#endif
13187 const int neg_one = (int) -1, const_zero = (int) 0;
13188#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13189#pragma GCC diagnostic pop
13190#endif
13191 const int is_unsigned = neg_one > const_zero;
13192 if (is_unsigned) {
13193 #if CYTHON_USE_PYLONG_INTERNALS
13194 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
13195 goto raise_neg_overflow;
13196 } else if (__Pyx_PyLong_IsCompact(x)) {
13197 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
13198 } else
13199 #endif
13200 {
13201 return __Pyx_PyULong___Pyx_PyLong_As_int(x);
13202 }
13203 } else {
13204 #if CYTHON_USE_PYLONG_INTERNALS
13205 if (__Pyx_PyLong_IsCompact(x)) {
13206 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
13207 } else
13208 #endif
13209 {
13210 return __Pyx_PySLong___Pyx_PyLong_As_int(x);
13211 }
13212 }
13213#if CYTHON_USE_PYLONG_INTERNALS
13214raise_neg_overflow:
13215 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
13216raise_overflow:
13217 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
13218#endif
13219}
13220static int __Pyx_NonPyLong___Pyx_PyLong_As_int(PyObject *x) {
13221 int val;
13222 PyObject *tmp = __Pyx_PyNumber_Long(x);
13223 if (!tmp) return (int) -1;
13224 val = __Pyx_PyLong_As_int(tmp);
13225 Py_DECREF(tmp);
13226 return val;
13227}
13228static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
13229 if (likely(PyLong_Check(x))) {
13230 return __Pyx_PyLong___Pyx_PyLong_As_int(x);
13231 } else {
13232 return __Pyx_NonPyLong___Pyx_PyLong_As_int(x);
13233 }
13234}
13235
13236/* FormatTypeName */
13237#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
13238static __Pyx_TypeName
13239__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
13240{
13241 PyObject *module = NULL, *name = NULL, *result = NULL;
13242 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
13243 name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
13244 __pyx_mstate_global->__pyx_n_u_qualname);
13245 #else
13246 name = PyType_GetQualName(tp);
13247 #endif
13248 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
13249 module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
13250 __pyx_mstate_global->__pyx_n_u_module);
13251 if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
13252 if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
13253 result = name;
13254 name = NULL;
13255 goto done;
13256 }
13257 result = PyUnicode_FromFormat("%U.%U", module, name);
13258 if (unlikely(result == NULL)) goto bad;
13259 done:
13260 Py_XDECREF(name);
13261 Py_XDECREF(module);
13262 return result;
13263 bad:
13264 PyErr_Clear();
13265 if (name) {
13266 result = name;
13267 name = NULL;
13268 } else {
13269 result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_);
13270 }
13271 goto done;
13272}
13273#endif
13274
13275/* PyObjectVectorcallKwds (used by PyObjectVectorcallMethodKwds) */
13276#if CYTHON_VECTORCALL
13277CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i) {
13278 PyObject *key = __Pyx_PyTuple_GET_ITEM(kwnames, i);
13279#if !CYTHON_ASSUME_SAFE_MACROS
13280 if (unlikely(!key)) return -1;
13281#endif
13282 if (unlikely(!PyUnicode_Check(key))) {
13283 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
13284 return -1;
13285 }
13286 return 0;
13287}
13288#else
13289CYTHON_UNUSED static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t n) {
13290 PyObject *out = PyDict_New();
13291 if (unlikely(!out)) return NULL;
13292 for (Py_ssize_t i=0; i<n; ++i) {
13293 if (unlikely(PyDict_SetItem(out, keys[i], values[i]) < 0)) {
13294 Py_DECREF(out);
13295 return NULL;
13296 }
13297 }
13298 return out;
13299}
13300CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i) {
13301 PyObject *key = kwnames[i];
13302 if (unlikely(!PyUnicode_Check(key))) {
13303 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
13304 return -1;
13305 }
13306 return 0;
13307}
13308#endif
13309
13310/* PyObjectVectorcallMethodKwds (used by CIntToPy) */
13311#if !CYTHON_VECTORCALL
13312static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
13313 PyObject *result;
13314 PyObject *obj = PyObject_GetAttr(args[0], name);
13315 if (unlikely(!obj))
13316 return NULL;
13317 result = __Pyx_Object_VectorcallKwds(obj, args+1, nargsf-1, kwnames);
13318 Py_DECREF(obj);
13319 return result;
13320}
13321#endif
13322
13323/* CIntToPy */
13324static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
13325#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13326#pragma GCC diagnostic push
13327#pragma GCC diagnostic ignored "-Wconversion"
13328#endif
13329 const long neg_one = (long) -1, const_zero = (long) 0;
13330#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13331#pragma GCC diagnostic pop
13332#endif
13333 const int is_unsigned = neg_one > const_zero;
13334 if (is_unsigned) {
13335 if (sizeof(long) < sizeof(long)) {
13336 return PyLong_FromLong((long) value);
13337 } else if (sizeof(long) <= sizeof(unsigned long)) {
13338 return PyLong_FromUnsignedLong((unsigned long) value);
13339#if !CYTHON_COMPILING_IN_PYPY
13340 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
13341 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
13342#endif
13343 }
13344 } else {
13345 if (sizeof(long) <= sizeof(long)) {
13346 return PyLong_FromLong((long) value);
13347 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
13348 return PyLong_FromLongLong((PY_LONG_LONG) value);
13349 }
13350 }
13351 {
13352 unsigned char *bytes = (unsigned char *)&value;
13353#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
13354 if (is_unsigned) {
13355 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
13356 } else {
13357 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
13358 }
13359#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
13360 int one = 1; int little = (int)*(unsigned char *)&one;
13361 return _PyLong_FromByteArray(bytes, sizeof(long),
13362 little, !is_unsigned);
13363#else
13364 int one = 1; int little = (int)*(unsigned char *)&one;
13365 PyObject *result = NULL, *kwds = NULL;
13366 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
13367 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
13368 if (!py_bytes) goto limited_bad;
13369 from_bytes_str = PyUnicode_FromStringAndSize("from_bytes", 10);
13370 if (!from_bytes_str) goto limited_bad;
13371 order_str = PyUnicode_FromString(little ? "little" : "big");
13372 if (!order_str) goto limited_bad;
13373 {
13374 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
13375 if (!is_unsigned) {
13376 PyObject *signed_str = PyUnicode_FromStringAndSize("signed", 6);
13377 if (!signed_str) goto limited_bad;
13378#if CYTHON_VECTORCALL
13379 kwds = PyTuple_Pack(1, signed_str);
13380#else
13381 {
13382 PyObject *keys[] = {signed_str};
13383 PyObject *values[] = {Py_True};
13384 kwds = __Pyx_MakeKwargDict(keys, values, 1);
13385 }
13386#endif
13387 Py_DECREF(signed_str);
13388 if (unlikely(!kwds)) goto limited_bad;
13389 }
13390 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
13391 }
13392 limited_bad:
13393 Py_XDECREF(kwds);
13394 Py_XDECREF(order_str);
13395 Py_XDECREF(py_bytes);
13396 Py_XDECREF(from_bytes_str);
13397 return result;
13398#endif
13399 }
13400}
13401
13402/* CIntFromPy */
13403static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x);
13404static long __Pyx_raise_neg_overflow___Pyx_PyLong_As_long(void) {
13405 const char* type_name = "long";
13406 PyErr_Format(PyExc_OverflowError,
13407 "can't convert negative value to %.200s", type_name);
13408 return (long) -1;
13409}
13410static long __Pyx_raise_overflow___Pyx_PyLong_As_long(void) {
13411 const char* type_name = "long";
13412 PyErr_Format(PyExc_OverflowError,
13413 "value too large to convert to %.200s", type_name);
13414 return (long) -1;
13415}
13416static CYTHON_INLINE long __Pyx_PyULong___Pyx_PyLong_As_long(PyObject *x) {
13417 const int is_unsigned = 1;
13418#if CYTHON_USE_PYLONG_INTERNALS
13419 {
13420 const digit* digits = __Pyx_PyLong_Digits(x);
13421 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13422 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
13423 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
13424 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13425 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
13426 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13427 }
13428 } else
13429 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
13430 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
13431 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13432 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
13433 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13434 }
13435 } else
13436 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
13437 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
13438 __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])))
13439 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
13440 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13441 }
13442 } else
13443 {}
13444 }
13445#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
13446 if (unlikely(Py_SIZE(x) < 0)) {
13447 goto raise_neg_overflow;
13448 }
13449#else
13450 {
13451 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
13452 if (unlikely(result < 0))
13453 return (long) -1;
13454 if (unlikely(result == 1))
13455 goto raise_neg_overflow;
13456 }
13457#endif
13458 if ((sizeof(long) <= sizeof(unsigned long))) {
13459 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
13460 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
13461 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
13462 }
13463 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
13464raise_neg_overflow:
13465 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
13466raise_overflow:
13467 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
13468}
13469static CYTHON_INLINE long __Pyx_PySLong___Pyx_PyLong_As_long(PyObject *x) {
13470 const int is_unsigned = 0;
13471#if CYTHON_USE_PYLONG_INTERNALS
13472 if (__Pyx_PyLong_IsNeg(x)) {
13473 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13474 const digit* digits = __Pyx_PyLong_Digits(x);
13475 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
13476 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
13477 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13478 __PYX_VERIFY_RETURN_INT(long, long, ival)
13479 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
13480 return (long) (((long) -1) * (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13481 }
13482 } else
13483 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
13484 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
13485 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
13486 __PYX_VERIFY_RETURN_INT(long, long, ival)
13487 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
13488 return (long) (((long) -1) * (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13489 }
13490 } else
13491 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
13492 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
13493 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]));
13494 __PYX_VERIFY_RETURN_INT(long, long, ival)
13495 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
13496 return (long) (((long) -1) * (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13497 }
13498 } else
13499 {}
13500 } else {
13501 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
13502 const digit* digits = __Pyx_PyLong_Digits(x);
13503 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
13504 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
13505 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13506 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
13507 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13508 }
13509 } else
13510 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
13511 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
13512 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13513 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
13514 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13515 }
13516 } else
13517 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
13518 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
13519 __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])))
13520 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
13521 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13522 }
13523 } else
13524 {}
13525 }
13526#endif
13527 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
13528 if ((sizeof(long) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
13529 __PYX_VERIFY_RETURN_INT_EXC(long, int, PyLong_AsInt(x))
13530 } else
13531 #endif
13532 if ((sizeof(long) <= sizeof(long))) {
13533 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
13534 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
13535 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
13536 }
13537 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
13538raise_neg_overflow:
13539 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
13540raise_overflow:
13541 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
13542}
13543static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x) {
13544#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13545#pragma GCC diagnostic push
13546#pragma GCC diagnostic ignored "-Wconversion"
13547#endif
13548 const long neg_one = (long) -1, const_zero = (long) 0;
13549#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13550#pragma GCC diagnostic pop
13551#endif
13552 const int is_unsigned = neg_one > const_zero;
13553 long val;
13554 int ret = -1;
13555#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
13556 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
13557 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
13558 if (unlikely(bytes_copied == -1)) {
13559 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
13560 goto raise_overflow;
13561 } else {
13562 ret = 0;
13563 }
13564#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
13565 int one = 1; int is_little = (int)*(unsigned char *)&one;
13566 unsigned char *bytes = (unsigned char *)&val;
13567 ret = _PyLong_AsByteArray((PyLongObject *)x,
13568 bytes, sizeof(val),
13569 is_little, !is_unsigned);
13570 if ((0)) goto raise_overflow;
13571#else
13572 PyObject *v;
13573 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
13574 int bits, remaining_bits, is_negative = 0;
13575 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
13576 if (likely(PyLong_CheckExact(x))) {
13577 v = __Pyx_NewRef(x);
13578 } else {
13579 v = PyNumber_Long(x);
13580 if (unlikely(!v)) return (long) -1;
13581 assert(PyLong_CheckExact(v));
13582 }
13583 {
13584 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
13585 if (unlikely(result < 0)) {
13586 Py_DECREF(v);
13587 return (long) -1;
13588 }
13589 is_negative = result == 1;
13590 }
13591 if (is_unsigned && unlikely(is_negative)) {
13592 Py_DECREF(v);
13593 PyErr_SetString(PyExc_OverflowError,
13594 "can't convert negative value to long");
13595 return (long) -1;
13596 } else if (is_negative) {
13597 stepval = PyNumber_Invert(v);
13598 Py_DECREF(v);
13599 if (unlikely(!stepval))
13600 return (long) -1;
13601 } else {
13602 stepval = v;
13603 }
13604 v = NULL;
13605 val = (long) 0;
13606 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
13607 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
13608 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
13609 PyObject *tmp, *digit;
13610 long idigit;
13611 digit = PyNumber_And(stepval, mask);
13612 if (unlikely(!digit)) goto done;
13613 idigit = PyLong_AsLong(digit);
13614 Py_DECREF(digit);
13615 if (unlikely(idigit < 0)) goto done;
13616 val |= ((long) idigit) << bits;
13617 tmp = PyNumber_Rshift(stepval, shift);
13618 if (unlikely(!tmp)) goto done;
13619 Py_DECREF(stepval); stepval = tmp;
13620 }
13621 Py_DECREF(shift); shift = NULL;
13622 Py_DECREF(mask); mask = NULL;
13623 {
13624 long idigit = PyLong_AsLong(stepval);
13625 if (unlikely(idigit < 0)) goto done;
13626 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
13627 if (unlikely(idigit >= (1L << remaining_bits)))
13628 goto raise_overflow;
13629 val |= ((long) idigit) << bits;
13630 }
13631 if (!is_unsigned) {
13632 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
13633 goto raise_overflow;
13634 if (is_negative)
13635 val = ~val;
13636 }
13637 ret = 0;
13638done:
13639 Py_XDECREF(shift);
13640 Py_XDECREF(mask);
13641 Py_XDECREF(stepval);
13642#endif
13643 if (unlikely(ret))
13644 return (long) -1;
13645 return val;
13646raise_overflow:
13647 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
13648}
13649static CYTHON_INLINE long __Pyx_PyLong___Pyx_PyLong_As_long(PyObject *x) {
13650#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13651#pragma GCC diagnostic push
13652#pragma GCC diagnostic ignored "-Wconversion"
13653#endif
13654 const long neg_one = (long) -1, const_zero = (long) 0;
13655#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
13656#pragma GCC diagnostic pop
13657#endif
13658 const int is_unsigned = neg_one > const_zero;
13659 if (is_unsigned) {
13660 #if CYTHON_USE_PYLONG_INTERNALS
13661 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
13662 goto raise_neg_overflow;
13663 } else if (__Pyx_PyLong_IsCompact(x)) {
13664 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
13665 } else
13666 #endif
13667 {
13668 return __Pyx_PyULong___Pyx_PyLong_As_long(x);
13669 }
13670 } else {
13671 #if CYTHON_USE_PYLONG_INTERNALS
13672 if (__Pyx_PyLong_IsCompact(x)) {
13673 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
13674 } else
13675 #endif
13676 {
13677 return __Pyx_PySLong___Pyx_PyLong_As_long(x);
13678 }
13679 }
13680#if CYTHON_USE_PYLONG_INTERNALS
13681raise_neg_overflow:
13682 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
13683raise_overflow:
13684 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
13685#endif
13686}
13687static long __Pyx_NonPyLong___Pyx_PyLong_As_long(PyObject *x) {
13688 long val;
13689 PyObject *tmp = __Pyx_PyNumber_Long(x);
13690 if (!tmp) return (long) -1;
13691 val = __Pyx_PyLong_As_long(tmp);
13692 Py_DECREF(tmp);
13693 return val;
13694}
13695static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
13696 if (likely(PyLong_Check(x))) {
13697 return __Pyx_PyLong___Pyx_PyLong_As_long(x);
13698 } else {
13699 return __Pyx_NonPyLong___Pyx_PyLong_As_long(x);
13700 }
13701}
13702
13703/* GetRuntimeVersion */
13704#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
13705void __Pyx_init_runtime_version(void) {
13706 if (__Pyx_cached_runtime_version == 0) {
13707 const char* rt_version = Py_GetVersion();
13708 unsigned long version = 0;
13709 unsigned long factor = 0x01000000UL;
13710 unsigned int digit = 0;
13711 int i = 0;
13712 while (factor) {
13713 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
13714 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
13715 ++i;
13716 }
13717 version += factor * digit;
13718 if (rt_version[i] != '.')
13719 break;
13720 digit = 0;
13721 factor >>= 8;
13722 ++i;
13723 }
13724 __Pyx_cached_runtime_version = version;
13725 }
13726}
13727#endif
13728static unsigned long __Pyx_get_runtime_version(void) {
13729#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
13730 return Py_Version & ~0xFFUL;
13731#else
13732 return __Pyx_cached_runtime_version;
13733#endif
13734}
13735
13736/* CheckBinaryVersion */
13737static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
13738 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
13739 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
13740 return 0;
13741 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
13742 return 1;
13743 {
13744 char message[200];
13745 PyOS_snprintf(message, sizeof(message),
13746 "compile time Python version %d.%d "
13747 "of module '%.100s' "
13748 "%s "
13749 "runtime version %d.%d",
13750 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
13751 __Pyx_MODULE_NAME,
13752 (allow_newer) ? "was newer than" : "does not match",
13753 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
13754 );
13755 return PyErr_WarnEx(NULL, message, 1);
13756 }
13757}
13758
13759/* NewCodeObj */
13760#if CYTHON_COMPILING_IN_LIMITED_API
13761 static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
13762 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
13763 PyObject *fv, PyObject *cell, PyObject* fn,
13764 PyObject *name, int fline, PyObject *lnos) {
13765 PyObject *exception_table = NULL;
13766 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
13767 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
13768 PyObject *version_info;
13769 PyObject *py_minor_version = NULL;
13770 #endif
13771 long minor_version = 0;
13772 #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
13773 minor_version = 11;
13774 #else
13775 if (!(version_info = PySys_GetObject("version_info"))) goto end;
13776 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
13777 minor_version = PyLong_AsLong(py_minor_version);
13778 Py_DECREF(py_minor_version);
13779 if (minor_version == -1 && PyErr_Occurred()) goto end;
13780 #endif
13781 if (!(types_module = PyImport_ImportModule("types"))) goto end;
13782 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
13783 if (minor_version <= 10) {
13784 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
13785 c, n, v, fn, name, fline, lnos, fv, cell);
13786 } else {
13787 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
13788 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
13789 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
13790 }
13791 end:
13792 Py_XDECREF(code_type);
13793 Py_XDECREF(exception_table);
13794 Py_XDECREF(types_module);
13795 if (!result) {
13796 PyObject *exc_type, *exc_value, *exc_tb;
13797 PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
13798 if (PyErr_WarnFormat(
13799 PyExc_RuntimeWarning, 1,
13800 "Code object creation failed in Cython module: %S\nTry recompiling with a more recent version of Cython.",
13801 exc_value ? exc_value : exc_type) == 0) {
13802 result = Py_None;
13803 Py_INCREF(result);
13804 }
13805 Py_DECREF(exc_type);
13806 Py_XDECREF(exc_value);
13807 Py_XDECREF(exc_tb);
13808 }
13809 return result;
13810 }
13811#elif PY_VERSION_HEX >= 0x030B0000
13812 static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
13813 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
13814 PyObject *fv, PyObject *cell, PyObject* fn,
13815 PyObject *name, int fline, PyObject *lnos) {
13816 PyCodeObject *result;
13817 result =
13818 #if PY_VERSION_HEX >= 0x030C0000
13819 PyUnstable_Code_NewWithPosOnlyArgs
13820 #else
13821 PyCode_NewWithPosOnlyArgs
13822 #endif
13823 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
13824 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
13825 if (likely(result))
13826 result->_co_firsttraceable = 0;
13827 #endif
13828 return result;
13829 }
13830#elif !CYTHON_COMPILING_IN_PYPY
13831 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
13832 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
13833#else
13834 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
13835 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
13836#endif
13837static PyObject* __Pyx_PyCode_New(
13838 const __Pyx_PyCode_New_function_description descr,
13839 PyObject * const *varnames,
13840 PyObject *filename,
13841 PyObject *funcname,
13842 PyObject *line_table,
13843 PyObject *tuple_dedup_map
13844) {
13845 PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
13846 Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
13847 PyObject *varnames_tuple = PyTuple_New(var_count);
13848 if (unlikely(!varnames_tuple)) return NULL;
13849 for (Py_ssize_t i=0; i < var_count; i++) {
13850 Py_INCREF(varnames[i]);
13851 if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
13852 }
13853 #if CYTHON_COMPILING_IN_LIMITED_API
13854 varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
13855 if (!varnames_tuple_dedup) {
13856 if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
13857 varnames_tuple_dedup = varnames_tuple;
13858 }
13859 #else
13860 varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
13861 if (unlikely(!varnames_tuple_dedup)) goto done;
13862 #endif
13863 #if CYTHON_AVOID_BORROWED_REFS
13864 Py_INCREF(varnames_tuple_dedup);
13865 #endif
13866 if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
13867 Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
13868 #if !CYTHON_ASSUME_SAFE_SIZE
13869 if (unlikely(line_table_length == -1)) goto done;
13870 #endif
13871 Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
13872 code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
13873 if (unlikely(!code_bytes)) goto done;
13874 char* c_code_bytes = PyBytes_AsString(code_bytes);
13875 if (unlikely(!c_code_bytes)) goto done;
13876 memset(c_code_bytes, 0, (size_t) code_len);
13877 }
13878 code_obj = (PyObject*) __Pyx__PyCode_New(
13879 (int) descr.argcount,
13880 (int) descr.num_posonly_args,
13881 (int) descr.num_kwonly_args,
13882 (int) descr.nlocals,
13883 0,
13884 (int) descr.flags,
13885 code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
13886 __pyx_mstate_global->__pyx_empty_tuple,
13887 __pyx_mstate_global->__pyx_empty_tuple,
13888 varnames_tuple_dedup,
13889 __pyx_mstate_global->__pyx_empty_tuple,
13890 __pyx_mstate_global->__pyx_empty_tuple,
13891 filename,
13892 funcname,
13893 (int) descr.first_line,
13894 (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
13895 );
13896done:
13897 Py_XDECREF(code_bytes);
13898 #if CYTHON_AVOID_BORROWED_REFS
13899 Py_XDECREF(varnames_tuple_dedup);
13900 #endif
13901 Py_DECREF(varnames_tuple);
13902 return code_obj;
13903}
13904
13905/* DecompressString */
13906CYTHON_UNUSED
13907static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
13908#ifdef __Pyx_DecompressString_UNUSED
13909 CYTHON_UNUSED_VAR(s);
13910 CYTHON_UNUSED_VAR(length);
13911 CYTHON_UNUSED_VAR(algo);
13912 return NULL;
13913#else
13914 PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
13915 const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
13916 PyObject *methodname = PyUnicode_FromString("decompress");
13917 if (unlikely(!methodname)) return NULL;
13918 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
13919 if (algo == 3) {
13920 PyObject *fromlist = Py_BuildValue("[O]", methodname);
13921 if (unlikely(!fromlist)) goto bad;
13922 module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
13923 Py_DECREF(fromlist);
13924 } else
13925 #endif
13926 module = PyImport_ImportModule(module_name);
13927 if (unlikely(!module)) goto import_failed;
13928 decompress = PyObject_GetAttr(module, methodname);
13929 if (unlikely(!decompress)) goto import_failed;
13930 {
13931 #ifdef __cplusplus
13932 char *memview_bytes = const_cast<char*>(s);
13933 #else
13934 #if defined(__clang__)
13935 #pragma clang diagnostic push
13936 #pragma clang diagnostic ignored "-Wcast-qual"
13937 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
13938 #pragma GCC diagnostic push
13939 #pragma GCC diagnostic ignored "-Wcast-qual"
13940 #endif
13941 char *memview_bytes = (char*) s;
13942 #if defined(__clang__)
13943 #pragma clang diagnostic pop
13944 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
13945 #pragma GCC diagnostic pop
13946 #endif
13947 #endif
13948 #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
13949 int memview_flags = 0x100;
13950 #else
13951 int memview_flags = PyBUF_READ;
13952 #endif
13953 compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
13954 }
13955 if (unlikely(!compressed_bytes)) {
13956 Py_DECREF(decompress);
13957 goto bad;
13958 }
13959 decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
13960 Py_DECREF(compressed_bytes);
13961 Py_DECREF(decompress);
13962 Py_DECREF(module);
13963 Py_DECREF(methodname);
13964 return decompressed;
13965import_failed:
13966 PyErr_Format(PyExc_ImportError,
13967 "Failed to import '%.20s.decompress' - cannot initialise module strings. "
13968 "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
13969 module_name, algo);
13970bad:
13971 Py_XDECREF(module);
13972 Py_DECREF(methodname);
13973 return NULL;
13974#endif
13975}
13976
13977/* DecompressString_LZSS */
13978#ifndef __Pyx_DecompressString_LZSS_UNUSED
13979CYTHON_UNUSED
13980static CYTHON_SMALL_CODE size_t __pyx_lzss_decompress(const uint8_t* src, uint8_t* dst, size_t dst_len) {
13981 size_t pos = 0, out_pos = 0;
13982 while (1) {
13983 uint32_t flags = src[pos++] | 0xFF00;
13984 while (flags & 0x100) {
13985 if (flags & 1) {
13986 dst[out_pos++] = src[pos++];
13987 } else {
13988 uint32_t lo = src[pos++], hi = src[pos++];
13989 uint32_t end_offset_of_last_occurrence, match_length;
13990 if (!(lo & 0x80)) {
13991 end_offset_of_last_occurrence = lo;
13992 match_length = hi;
13993 } else if (!(hi & 0x80)) {
13994 end_offset_of_last_occurrence = 0x80 + (((hi << 2) & 0x180) | (lo & 0x7F));
13995 match_length = hi & 0x1F;
13996 } else {
13997 end_offset_of_last_occurrence = 0x80 + ((hi & 0x7F) << 7 | (lo & 0x7F));
13998 match_length = src[pos++];
13999 }
14000 match_length += 3;
14001 size_t ref_pos = out_pos - end_offset_of_last_occurrence - match_length;
14002 memcpy(dst + out_pos, dst + ref_pos, match_length);
14003 out_pos += match_length;
14004 }
14005 if (out_pos >= dst_len) return pos;
14006 flags >>= 1;
14007 }
14008 }
14009}
14010#endif
14011static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString_LZSS(const char *s, size_t compressed_length, size_t uncompressed_length) {
14012#ifdef __Pyx_DecompressString_LZSS_UNUSED
14013 CYTHON_UNUSED_VAR(s);
14014 CYTHON_UNUSED_VAR(compressed_length);
14015 CYTHON_UNUSED_VAR(uncompressed_length);
14016 return NULL;
14017#else
14018 PyObject *result;
14019 unsigned char *result_data;
14020 size_t src_length;
14021 result = PyBytes_FromStringAndSize(NULL, (Py_ssize_t) uncompressed_length);
14022 if (unlikely(!result)) return NULL;
14023 result_data = __Pyx_PyBytes_AsWritableUString(result);
14024 if (unlikely(!result_data)) goto bad;
14025 src_length = __pyx_lzss_decompress((const uint8_t*) s, result_data, uncompressed_length);
14026 if (unlikely(src_length != compressed_length)) goto decompression_failed;
14027 return result;
14028decompression_failed:
14029 PyErr_SetString(PyExc_RuntimeError, "LZSS string data decompression failed");
14030bad:
14031 Py_DECREF(result);
14032 return NULL;
14033#endif
14034}
14035
14036#include <string.h>
14037static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
14038 size_t len = strlen(s);
14039 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
14040 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
14041 return -1;
14042 }
14043 return (Py_ssize_t) len;
14044}
14045static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
14046 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
14047 if (unlikely(len < 0)) return NULL;
14048 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
14049}
14050static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
14051 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
14052 if (unlikely(len < 0)) return NULL;
14053 return PyByteArray_FromStringAndSize(c_str, len);
14054}
14055static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
14056 Py_ssize_t ignore;
14057 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
14058}
14059#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
14060static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
14061 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
14062#if CYTHON_COMPILING_IN_LIMITED_API
14063 {
14064 const char* result;
14065 Py_ssize_t unicode_length;
14066 CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
14067 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
14068 if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
14069 #else
14070 result = PyUnicode_AsUTF8AndSize(o, length);
14071 #endif
14072 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
14073 unicode_length = PyUnicode_GetLength(o);
14074 if (unlikely(unicode_length < 0)) return NULL;
14075 if (unlikely(unicode_length != *length)) {
14076 PyUnicode_AsASCIIString(o);
14077 return NULL;
14078 }
14079 #endif
14080 return result;
14081 }
14082#else
14083#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
14084 if (likely(PyUnicode_IS_ASCII(o))) {
14085 *length = PyUnicode_GET_LENGTH(o);
14086 return PyUnicode_AsUTF8(o);
14087 } else {
14088 PyUnicode_AsASCIIString(o);
14089 return NULL;
14090 }
14091#else
14092 return PyUnicode_AsUTF8AndSize(o, length);
14093#endif
14094#endif
14095}
14096#endif
14097static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
14098#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
14099 if (PyUnicode_Check(o)) {
14100 return __Pyx_PyUnicode_AsStringAndSize(o, length);
14101 } else
14102#endif
14103 if (PyByteArray_Check(o)) {
14104#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
14105 *length = PyByteArray_GET_SIZE(o);
14106 return PyByteArray_AS_STRING(o);
14107#else
14108 *length = PyByteArray_Size(o);
14109 if (*length == -1) return NULL;
14110 return PyByteArray_AsString(o);
14111#endif
14112 } else
14113 {
14114 char* result;
14115 int r = PyBytes_AsStringAndSize(o, &result, length);
14116 if (unlikely(r < 0)) {
14117 return NULL;
14118 } else {
14119 return result;
14120 }
14121 }
14122}
14123static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
14124 int is_true = x == Py_True;
14125 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
14126 else return PyObject_IsTrue(x);
14127}
14128static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
14129 int retval;
14130 if (unlikely(!x)) return -1;
14131 retval = __Pyx_PyObject_IsTrue(x);
14132 Py_DECREF(x);
14133 return retval;
14134}
14135static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
14136 __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
14137 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
14138 if (unlikely(!result_type_name)) goto bad;
14139 #endif
14140 if (PyLong_Check(result)) {
14141 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
14142 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
14143 "The ability to return an instance of a strict subclass of int is deprecated, "
14144 "and may be removed in a future version of Python.",
14145 result_type_name)) {
14146 __Pyx_DECREF_TypeName(result_type_name);
14147 goto bad;
14148 }
14149 __Pyx_DECREF_TypeName(result_type_name);
14150 return result;
14151 }
14152 PyErr_Format(PyExc_TypeError,
14153 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
14154 result_type_name);
14155 __Pyx_DECREF_TypeName(result_type_name);
14156bad:
14157 Py_DECREF(result);
14158 return NULL;
14159}
14160static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
14161#if CYTHON_USE_TYPE_SLOTS
14162 PyNumberMethods *m;
14163#endif
14164 PyObject *res = NULL;
14165 if (likely(PyLong_Check(x)))
14166 return __Pyx_NewRef(x);
14167#if CYTHON_USE_TYPE_SLOTS
14168 m = Py_TYPE(x)->tp_as_number;
14169 if (likely(m && m->nb_int)) {
14170 res = m->nb_int(x);
14171 }
14172#else
14173 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
14174 res = PyNumber_Long(x);
14175 }
14176#endif
14177 if (likely(res)) {
14178 if (unlikely(!PyLong_CheckExact(res))) {
14179 return __Pyx_PyNumber_LongWrongResultType(res);
14180 }
14181 }
14182 else if (!PyErr_Occurred()) {
14183 PyErr_SetString(PyExc_TypeError,
14184 "an integer is required");
14185 }
14186 return res;
14187}
14188static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_AsSsize_t(PyObject* b) {
14189 #if CYTHON_USE_PYLONG_INTERNALS
14190 Py_ssize_t ival;
14191 const Py_ssize_t size = __Pyx_PyLong_DigitCount(b);
14192 const int is_neg = __Pyx_PyLong_IsNeg(b);
14193 const digit* digits = __Pyx_PyLong_Digits(b);
14194 if (size == 0) return 0;
14195 #if SIZEOF_SIZE_T * 8 > 1 * PyLong_SHIFT
14196 if (size == 1) {
14197 ival = (Py_ssize_t) (((size_t)digits[0]));
14198 } else
14199 #endif
14200 #if SIZEOF_SIZE_T * 8 > 2 * PyLong_SHIFT
14201 if (size == 2) {
14202 ival = (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14203 } else
14204 #endif
14205 #if SIZEOF_SIZE_T * 8 > 3 * PyLong_SHIFT
14206 if (size == 3) {
14207 ival = (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14208 } else
14209 #endif
14210 #if SIZEOF_SIZE_T * 8 > 4 * PyLong_SHIFT
14211 if (size == 4) {
14212 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]));
14213 } else
14214 #endif
14215 return PyLong_AsSsize_t(b);
14216 return is_neg ? -ival : ival;
14217 #else
14218 return PyLong_AsSsize_t(b);
14219 #endif
14220}
14221static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
14222 if (likely(PyLong_Check(b))) {
14223 return __Pyx_PyLong_AsSsize_t(b);
14224 } else {
14225 Py_ssize_t ival;
14226 PyObject *x = PyNumber_Index(b);
14227 if (unlikely(!x)) return -1;
14228 ival = __Pyx_PyLong_AsSsize_t(x);
14229 Py_DECREF(x);
14230 return ival;
14231 }
14232}
14233static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
14234 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
14235 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
14236 } else {
14237 Py_ssize_t ival;
14238 PyObject *x;
14239 x = PyNumber_Index(o);
14240 if (!x) return -1;
14241 ival = PyLong_AsLong(x);
14242 Py_DECREF(x);
14243 return ival;
14244 }
14245}
14246static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
14247 CYTHON_UNUSED_VAR(b);
14248 return __Pyx_NewRef(Py_None);
14249}
14250static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
14251 return __Pyx_NewRef(b ? Py_True: Py_False);
14252}
14253static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
14254 return PyLong_FromSize_t(ival);
14255}
14256
14257
14258/* MultiPhaseInitModuleState */
14259#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
14260#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14261#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
14262 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
14263#else
14264 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
14265#endif
14266#endif
14267#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
14268#error "Module state with PEP489 requires atomics. Currently that's one of\
14269 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
14270#endif
14271#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14272#define __Pyx_ModuleStateLookup_Lock()
14273#define __Pyx_ModuleStateLookup_Unlock()
14274#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
14275static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
14276#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
14277#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
14278#elif defined(__cplusplus) && __cplusplus >= 201103L
14279#include <mutex>
14280static std::mutex __Pyx_ModuleStateLookup_mutex;
14281#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
14282#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
14283#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
14284#include <threads.h>
14285static mtx_t __Pyx_ModuleStateLookup_mutex;
14286static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
14287static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
14288 mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
14289}
14290#define __Pyx_ModuleStateLookup_Lock()\
14291 call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
14292 mtx_lock(&__Pyx_ModuleStateLookup_mutex)
14293#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
14294#elif defined(HAVE_PTHREAD_H)
14295#include <pthread.h>
14296static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
14297#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
14298#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
14299#elif defined(_WIN32)
14300#include <Windows.h> // synchapi.h on its own doesn't work
14301static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
14302#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
14303#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
14304#else
14305#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
14306 Requires C standard >= C11, or C++ standard >= C++11,\
14307 or pthreads, or the Windows 32 API, or Python >= 3.13."
14308#endif
14309typedef struct {
14310 int64_t id;
14311 PyObject *module;
14312} __Pyx_InterpreterIdAndModule;
14313typedef struct {
14314 char interpreter_id_as_index;
14315 Py_ssize_t count;
14316 Py_ssize_t allocated;
14317 __Pyx_InterpreterIdAndModule table[1];
14318} __Pyx_ModuleStateLookupData;
14319#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
14320#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14321static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
14322#endif
14323#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14324static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
14325#else
14326static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
14327#endif
14328static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
14329 __Pyx_InterpreterIdAndModule* table,
14330 Py_ssize_t count,
14331 int64_t interpreterId) {
14332 __Pyx_InterpreterIdAndModule* begin = table;
14333 __Pyx_InterpreterIdAndModule* end = begin + count;
14334 if (begin->id == interpreterId) {
14335 return begin;
14336 }
14337 while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
14338 __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
14339 if (halfway->id == interpreterId) {
14340 return halfway;
14341 }
14342 if (halfway->id < interpreterId) {
14343 begin = halfway;
14344 } else {
14345 end = halfway;
14346 }
14347 }
14348 for (; begin < end; ++begin) {
14349 if (begin->id >= interpreterId) return begin;
14350 }
14351 return begin;
14352}
14353static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
14354 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
14355 if (interpreter_id == -1) return NULL;
14356#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14357 __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
14358 {
14359 __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
14360 if (likely(data)) {
14361 __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
14362 if (likely(data == new_data)) {
14363 goto read_finished;
14364 }
14365 }
14366 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
14367 __Pyx_ModuleStateLookup_Lock();
14368 __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
14369 data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
14370 __Pyx_ModuleStateLookup_Unlock();
14371 }
14372 read_finished:;
14373#else
14374 __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
14375#endif
14376 __Pyx_InterpreterIdAndModule* found = NULL;
14377 if (unlikely(!data)) goto end;
14378 if (data->interpreter_id_as_index) {
14379 if (interpreter_id < data->count) {
14380 found = data->table+interpreter_id;
14381 }
14382 } else {
14383 found = __Pyx_State_FindModuleStateLookupTableLowerBound(
14384 data->table, data->count, interpreter_id);
14385 }
14386 end:
14387 {
14388 PyObject *result=NULL;
14389 if (found && found->id == interpreter_id) {
14390 result = found->module;
14391 }
14392#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14393 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
14394#endif
14395 return result;
14396 }
14397}
14398#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14399static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
14400 while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
14401}
14402#else
14403#define __Pyx_ModuleStateLookup_wait_until_no_readers()
14404#endif
14405static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
14406 Py_ssize_t to_allocate = (*old_data)->allocated;
14407 while (to_allocate <= interpreter_id) {
14408 if (to_allocate == 0) to_allocate = 1;
14409 else to_allocate *= 2;
14410 }
14411 __Pyx_ModuleStateLookupData *new_data = *old_data;
14412 if (to_allocate != (*old_data)->allocated) {
14413 new_data = (__Pyx_ModuleStateLookupData *)realloc(
14414 *old_data,
14415 sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
14416 if (!new_data) {
14417 PyErr_NoMemory();
14418 return -1;
14419 }
14420 for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
14421 new_data->table[i].id = i;
14422 new_data->table[i].module = NULL;
14423 }
14424 new_data->allocated = to_allocate;
14425 }
14426 new_data->table[interpreter_id].module = module;
14427 if (new_data->count < interpreter_id+1) {
14428 new_data->count = interpreter_id+1;
14429 }
14430 *old_data = new_data;
14431 return 0;
14432}
14433static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
14434 __Pyx_InterpreterIdAndModule *read = data->table;
14435 __Pyx_InterpreterIdAndModule *write = data->table;
14436 __Pyx_InterpreterIdAndModule *end = read + data->count;
14437 for (; read<end; ++read) {
14438 if (read->module) {
14439 write->id = read->id;
14440 write->module = read->module;
14441 ++write;
14442 }
14443 }
14444 data->count = write - data->table;
14445 for (; write<end; ++write) {
14446 write->id = 0;
14447 write->module = NULL;
14448 }
14449 data->interpreter_id_as_index = 0;
14450}
14451static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
14452 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
14453 if (interpreter_id == -1) return -1;
14454 int result = 0;
14455 __Pyx_ModuleStateLookup_Lock();
14456#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14457 __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
14458 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
14459#else
14460 __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
14461#endif
14462 __Pyx_ModuleStateLookupData *new_data = old_data;
14463 if (!new_data) {
14464 new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
14465 if (!new_data) {
14466 result = -1;
14467 PyErr_NoMemory();
14468 goto end;
14469 }
14470 new_data->allocated = 1;
14471 new_data->interpreter_id_as_index = 1;
14472 }
14473 __Pyx_ModuleStateLookup_wait_until_no_readers();
14474 if (new_data->interpreter_id_as_index) {
14475 if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
14476 result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
14477 goto end;
14478 }
14479 __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
14480 }
14481 {
14482 Py_ssize_t insert_at = 0;
14483 {
14484 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
14485 new_data->table, new_data->count, interpreter_id);
14486 assert(lower_bound);
14487 insert_at = lower_bound - new_data->table;
14488 if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
14489 lower_bound->module = module;
14490 goto end; // already in table, nothing more to do
14491 }
14492 }
14493 if (new_data->count+1 >= new_data->allocated) {
14494 Py_ssize_t to_allocate = (new_data->count+1)*2;
14495 new_data =
14496 (__Pyx_ModuleStateLookupData*)realloc(
14497 new_data,
14498 sizeof(__Pyx_ModuleStateLookupData) +
14499 (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
14500 if (!new_data) {
14501 result = -1;
14502 new_data = old_data;
14503 PyErr_NoMemory();
14504 goto end;
14505 }
14506 new_data->allocated = to_allocate;
14507 }
14508 ++new_data->count;
14509 int64_t last_id = interpreter_id;
14510 PyObject *last_module = module;
14511 for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
14512 int64_t current_id = new_data->table[i].id;
14513 new_data->table[i].id = last_id;
14514 last_id = current_id;
14515 PyObject *current_module = new_data->table[i].module;
14516 new_data->table[i].module = last_module;
14517 last_module = current_module;
14518 }
14519 }
14520 end:
14521#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14522 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
14523#else
14524 __Pyx_ModuleStateLookup_data = new_data;
14525#endif
14526 __Pyx_ModuleStateLookup_Unlock();
14527 return result;
14528}
14529static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
14530 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
14531 if (interpreter_id == -1) return -1;
14532 __Pyx_ModuleStateLookup_Lock();
14533#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14534 __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
14535 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
14536#else
14537 __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
14538#endif
14539 if (data->interpreter_id_as_index) {
14540 if (interpreter_id < data->count) {
14541 data->table[interpreter_id].module = NULL;
14542 }
14543 goto done;
14544 }
14545 {
14546 __Pyx_ModuleStateLookup_wait_until_no_readers();
14547 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
14548 data->table, data->count, interpreter_id);
14549 if (!lower_bound) goto done;
14550 if (lower_bound->id != interpreter_id) goto done;
14551 __Pyx_InterpreterIdAndModule *end = data->table+data->count;
14552 for (;lower_bound<end-1; ++lower_bound) {
14553 lower_bound->id = (lower_bound+1)->id;
14554 lower_bound->module = (lower_bound+1)->module;
14555 }
14556 }
14557 --data->count;
14558 if (data->count == 0) {
14559 free(data);
14560 data = NULL;
14561 }
14562 done:
14563#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
14564 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
14565#else
14566 __Pyx_ModuleStateLookup_data = data;
14567#endif
14568 __Pyx_ModuleStateLookup_Unlock();
14569 return 0;
14570}
14571#endif
14572
14573/* #### Code section: utility_code_pragmas_end ### */
14574#ifdef _MSC_VER
14575#pragma warning( pop )
14576#endif
14577
14578
14579
14580/* #### Code section: end ### */
14581#endif /* Py_PYTHON_H */
Int n
Definition Headers.h:28
Double T
Definition Headers.h:87
Double r
Definition Headers.h:83
Double f
Definition Headers.h:64
Double s
Definition Headers.h:84
Double * z
Definition Headers.h:49
Double v
Definition Headers.h:95
#define c(i)
Definition jf.h:21
void computeCockburnDGlimiterArrays2d(int nElements_global, int nElementBoundaries_element, int nSpace, const int *elementBoundariesArray, const int *elementNeighborsArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, double *alphas, int *alphaNeighbors)
void applyDurlofskyDGlimiterP1Lagrange2d_withVacuumTol(int killExtrema, int allowMinWithUndershoot, int enforcePositivity, double vacuumTol, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
void applyDurlofskyDGlimiterP1Lagrange3d(int killExtrema, int allowMinWithUndershoot, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
void applyDGlimitingP1Lagrange1d_withVacuumTol(int enforcePositivity, double vacuumTol, int nElements_global, int nNodes_element, int nElementBoundaries_element, int nDOF_element, int *elementNodesArray, int *elementNeighborsArray, double *nodeArray, double *elementBarycentersArray, int *l2g, int *tag, double *Uin, double *Uout)
void psiTCtteDT(int nPoints, double tau, double dtn, double dtnm1, double *yn, double *ypn, double *ypnm1, double *dtnp1)
void applyDurlofskyDGlimiterP1Lagrange2d(int killExtrema, int allowMinWithUndershoot, int nElements_global, int nElementBoundaries_element, int nNodes_element, int nSpace, int nDOF_element, const int *elementNeighborsArray, const int *elementBoundariesArray, const int *elementNodesArray, const double *nodeArray, const double *elementBarycentersArray, const double *elementBoundaryBarycentersArray, const double *elementNeighborShapeGradients, const int *l2g, const double *grad_v0, double *elementAverages, int *tag, double *Uin, double *Uout)
void applyCockburnDGlimiterP1Lagrange2d(double nu, double Mh2, int nElements_global, int nElementBoundaries_element, int nSpace, int nDOF_element, int *elementNeighborsArray, int *l2g, int *tag, double *alphas, int *alphaNeighbors, double *Uin, double *Uout)
void applyDGlimitingP1Lagrange1d(int limiterFlag, int nElements_global, int nNodes_element, int nElementBoundaries_element, int nDOF_element, int *elementNodesArray, int *elementNeighborsArray, double *nodeArray, double *elementBarycentersArray, int *l2g, int *tag, double *Uin, double *Uout)
void computeElementNeighborShapeGradients(int nElements_global, int nElementBoundaries_element, int nSpace, const int *elementBoundariesArray, const int *elementNeighborsArray, double *elementBarycentersArray, double *elementBoundaryBarycentersArray, double *elementNeighborShapeGradients)
c interface for implementation of time discretization algorithms