proteus 1.9.0
C/C++/Fortran libraries
Loading...
Searching...
No Matches
cpskRelations.cpp
Go to the documentation of this file.
1/* Generated by Cython 3.3.0 */
2
3/* BEGIN: Cython Metadata
4{
5 "distutils": {
6 "define_macros": [
7 [
8 "PROTEUS_SUPERLU_H",
9 "\"slu_ddefs.h\""
10 ],
11 [
12 "CMRVEC_BOUNDS_CHECK",
13 1
14 ],
15 [
16 "MV_VECTOR_BOUNDS_CHECK",
17 1
18 ],
19 [
20 "PETSCVEC_BOUNDS_CHECK",
21 1
22 ],
23 [
24 "F77_POST_UNDERSCORE",
25 1
26 ],
27 [
28 "USE_BLAS",
29 1
30 ]
31 ],
32 "depends": [
33 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/arrayobject.h",
34 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/arrayscalars.h",
35 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ndarrayobject.h",
36 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ndarraytypes.h",
37 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include/numpy/ufuncobject.h",
38 "proteus/pskRelations.h",
39 "proteus/pskRelations.pxd"
40 ],
41 "extra_compile_args": [
42 "-Wall",
43 "-DF77_POST_UNDERSCORE",
44 "-DUSE_BLAS",
45 "-DCMRVEC_BOUNDS_CHECK",
46 "-DMV_VECTOR_BOUNDS_CHECK",
47 "-DPETSC_INCLUDE_AS_C",
48 "-DPETSC_SKIP_COMPLEX"
49 ],
50 "extra_link_args": [
51 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
52 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
53 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
54 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
55 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
56 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
57 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
58 "-Wl,-rpath,/work/cekees/miniforge3/envs/proteus-jupyterhub/lib"
59 ],
60 "include_dirs": [
61 "proteus",
62 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/_core/include",
63 "/work/cekees/miniforge3/envs/proteus-jupyterhub/include",
64 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib",
65 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/mpi4py",
66 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages"
67 ],
68 "language": "c++",
69 "libraries": [
70 "hdf5",
71 "stdc++",
72 "m",
73 "petsc",
74 "mpi",
75 "hdf5"
76 ],
77 "library_dirs": [
78 "/work/cekees/miniforge3/envs/proteus-jupyterhub/lib"
79 ],
80 "name": "cpskRelations",
81 "sources": [
82 "proteus/cpskRelations.pyx"
83 ]
84 },
85 "module_name": "cpskRelations"
86}
87END: Cython Metadata */
88
89#ifndef PY_SSIZE_T_CLEAN
90#define PY_SSIZE_T_CLEAN
91#endif /* PY_SSIZE_T_CLEAN */
92/* InitLimitedAPI */
93#if defined(Py_LIMITED_API)
94 #if !defined(CYTHON_LIMITED_API)
95 #define CYTHON_LIMITED_API 1
96 #endif
97#elif defined(CYTHON_LIMITED_API)
98 #ifdef _MSC_VER
99 #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.")
100 #else
101 #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.
102 #endif
103#endif
104
105#include "Python.h"
106#ifndef Py_PYTHON_H
107 #error Python headers needed to compile C extensions, please install development version of Python.
108#elif PY_VERSION_HEX < 0x03090000
109 #error Cython requires Python 3.9+.
110#elif defined(Py_LIMITED_API) && (Py_LIMITED_API & 0xFFFF0000) > (PY_VERSION_HEX & 0xFFFF0000)
111 #error 'Py_LIMITED_API' can only select past Python X.Y versions, not future ones.
112#else
113#define __PYX_ABI_VERSION "3_3_0"
114#define CYTHON_HEX_VERSION 0x030300F0
115#define CYTHON_FUTURE_DIVISION 1
116/* CModulePreamble */
117#include <stddef.h>
118#ifndef offsetof
119 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
120#endif
121#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
122 #ifndef __stdcall
123 #define __stdcall
124 #endif
125 #ifndef __cdecl
126 #define __cdecl
127 #endif
128 #ifndef __fastcall
129 #define __fastcall
130 #endif
131#endif
132#ifdef __has_builtin
133 #define __Pyx_has_cbuiltin(name) __has_builtin(name)
134#else
135 #define __Pyx_has_cbuiltin(name) (0)
136#endif
137#ifndef DL_IMPORT
138 #define DL_IMPORT(t) t
139#endif
140#ifndef DL_EXPORT
141 #define DL_EXPORT(t) t
142#endif
143#define __PYX_COMMA ,
144#ifndef PY_LONG_LONG
145 #define PY_LONG_LONG LONG_LONG
146#endif
147#ifndef Py_HUGE_VAL
148 #define Py_HUGE_VAL HUGE_VAL
149#endif
150#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
151#if defined(CYTHON_LIMITED_API)
152 #ifdef Py_LIMITED_API
153 #undef __PYX_LIMITED_VERSION_HEX
154 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
155 #if Py_LIMITED_API < 0x03090000
156 #error "Cython 3.3 requires the Python Limited API version to be 3.9 or greater."
157 #endif
158 #endif
159 #if defined(GRAALVM_PYTHON) || defined(PYPY_VERSION)
160 #ifdef _MSC_VER
161 #pragma message ("Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
162 code for PyPy and GraalPy and is unlikely to work.")
163 #else
164 #warning "Py_LIMITED_API is defined on PyPy or GraalPy. This takes precedence over Cython's specialized\
165 code for PyPy and GraalPy and is unlikely to work."
166 #endif
167 #endif
168 #define CYTHON_COMPILING_IN_PYPY 0
169 #define CYTHON_COMPILING_IN_CPYTHON 0
170 #define CYTHON_COMPILING_IN_LIMITED_API 1
171 #define CYTHON_COMPILING_IN_GRAAL 0
172 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
173 #undef CYTHON_USE_TYPE_SLOTS
174 #define CYTHON_USE_TYPE_SLOTS 0
175 #undef CYTHON_USE_TYPE_SPECS
176 #define CYTHON_USE_TYPE_SPECS 1
177 #undef CYTHON_USE_PYTYPE_LOOKUP
178 #define CYTHON_USE_PYTYPE_LOOKUP 0
179 #undef CYTHON_USE_PYLIST_INTERNALS
180 #define CYTHON_USE_PYLIST_INTERNALS 0
181 #undef CYTHON_USE_UNICODE_INTERNALS
182 #define CYTHON_USE_UNICODE_INTERNALS 0
183 #ifndef CYTHON_USE_UNICODE_WRITER
184 #define CYTHON_USE_UNICODE_WRITER 0
185 #endif
186 #undef CYTHON_USE_PYLONG_INTERNALS
187 #define CYTHON_USE_PYLONG_INTERNALS 0
188 #ifndef CYTHON_AVOID_BORROWED_REFS
189 #define CYTHON_AVOID_BORROWED_REFS 0
190 #endif
191 #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
192 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
193 #endif
194 #undef CYTHON_ASSUME_SAFE_MACROS
195 #define CYTHON_ASSUME_SAFE_MACROS 0
196 #undef CYTHON_ASSUME_SAFE_SIZE
197 #define CYTHON_ASSUME_SAFE_SIZE 0
198 #undef CYTHON_UNPACK_METHODS
199 #define CYTHON_UNPACK_METHODS 0
200 #undef CYTHON_FAST_THREAD_STATE
201 #define CYTHON_FAST_THREAD_STATE 0
202 #undef CYTHON_FAST_GIL
203 #define CYTHON_FAST_GIL 0
204 #undef CYTHON_VECTORCALL
205 #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
206 #ifndef CYTHON_VECTORCALL_TPNEW
207 #define CYTHON_VECTORCALL_TPNEW (CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030E0000)
208 #endif
209 #ifndef CYTHON_PEP487_INIT_SUBCLASS
210 #define CYTHON_PEP487_INIT_SUBCLASS 1
211 #endif
212 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
213 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
214 #endif
215 #ifndef CYTHON_USE_MODULE_STATE
216 #define CYTHON_USE_MODULE_STATE 0
217 #endif
218 #undef CYTHON_USE_SYS_MONITORING
219 #define CYTHON_USE_SYS_MONITORING 0
220 #ifndef CYTHON_USE_TP_FINALIZE
221 #define CYTHON_USE_TP_FINALIZE (__PYX_LIMITED_VERSION_HEX >= 0x030F0000 && PY_VERSION_HEX > 0x030F00A8)
222 #endif
223 #ifndef CYTHON_USE_AM_SEND
224 #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
225 #endif
226 #undef CYTHON_USE_DICT_VERSIONS
227 #define CYTHON_USE_DICT_VERSIONS 0
228 #undef CYTHON_USE_EXC_INFO_STACK
229 #define CYTHON_USE_EXC_INFO_STACK 0
230 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
231 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
232 #endif
233 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
234 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
235 #endif
236 #ifndef CYTHON_USE_FREELISTS
237 #define CYTHON_USE_FREELISTS 1
238 #endif
239 #undef CYTHON_IMMORTAL_CONSTANTS
240 #define CYTHON_IMMORTAL_CONSTANTS 0
241 #if __PYX_LIMITED_VERSION_HEX < 0x030E0000
242 #undef CYTHON_OPAQUE_OBJECTS
243 #define CYTHON_OPAQUE_OBJECTS 0
244 #elif !defined(CYTHON_OPAQUE_OBJECTS)
245 #define CYTHON_OPAQUE_OBJECTS (__PYX_LIMITED_VERSION_HEX >= 0x030F0000)
246 #endif
247#elif defined(GRAALVM_PYTHON)
248 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
249 The existence of this section does not imply that anything works or is even tested */
250 #define CYTHON_COMPILING_IN_PYPY 0
251 #define CYTHON_COMPILING_IN_CPYTHON 0
252 #define CYTHON_COMPILING_IN_LIMITED_API 0
253 #define CYTHON_COMPILING_IN_GRAAL 1
254 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
255 #ifndef CYTHON_USE_TYPE_SLOTS
256 #define CYTHON_USE_TYPE_SLOTS 0
257 #endif
258 #undef CYTHON_USE_TYPE_SPECS
259 #define CYTHON_USE_TYPE_SPECS 0
260 #undef CYTHON_USE_PYTYPE_LOOKUP
261 #define CYTHON_USE_PYTYPE_LOOKUP 0
262 #undef CYTHON_USE_PYLIST_INTERNALS
263 #define CYTHON_USE_PYLIST_INTERNALS 0
264 #undef CYTHON_USE_UNICODE_INTERNALS
265 #define CYTHON_USE_UNICODE_INTERNALS 0
266 #undef CYTHON_USE_UNICODE_WRITER
267 #define CYTHON_USE_UNICODE_WRITER 0
268 #undef CYTHON_USE_PYLONG_INTERNALS
269 #define CYTHON_USE_PYLONG_INTERNALS 0
270 #undef CYTHON_AVOID_BORROWED_REFS
271 #define CYTHON_AVOID_BORROWED_REFS 1
272 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
273 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
274 #undef CYTHON_ASSUME_SAFE_MACROS
275 #define CYTHON_ASSUME_SAFE_MACROS 0
276 #undef CYTHON_ASSUME_SAFE_SIZE
277 #define CYTHON_ASSUME_SAFE_SIZE 0
278 #undef CYTHON_UNPACK_METHODS
279 #define CYTHON_UNPACK_METHODS 0
280 #undef CYTHON_FAST_THREAD_STATE
281 #define CYTHON_FAST_THREAD_STATE 0
282 #undef CYTHON_FAST_GIL
283 #define CYTHON_FAST_GIL 0
284 #ifndef CYTHON_VECTORCALL
285 #define CYTHON_VECTORCALL 1
286 #endif
287 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
288 #undef CYTHON_VECTORCALL_TPNEW
289 #define CYTHON_VECTORCALL_TPNEW 0
290 #elif !defined(CYTHON_VECTORCALL_TPNEW)
291 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
292 #endif
293 #ifndef CYTHON_PEP487_INIT_SUBCLASS
294 #define CYTHON_PEP487_INIT_SUBCLASS 1
295 #endif
296 #undef CYTHON_PEP489_MULTI_PHASE_INIT
297 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
298 #undef CYTHON_USE_MODULE_STATE
299 #define CYTHON_USE_MODULE_STATE 0
300 #undef CYTHON_USE_SYS_MONITORING
301 #define CYTHON_USE_SYS_MONITORING 0
302 #undef CYTHON_USE_TP_FINALIZE
303 #define CYTHON_USE_TP_FINALIZE 0
304 #undef CYTHON_USE_AM_SEND
305 #define CYTHON_USE_AM_SEND 0
306 #undef CYTHON_USE_DICT_VERSIONS
307 #define CYTHON_USE_DICT_VERSIONS 0
308 #undef CYTHON_USE_EXC_INFO_STACK
309 #define CYTHON_USE_EXC_INFO_STACK 1
310 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
311 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
312 #endif
313 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
314 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
315 #endif
316 #undef CYTHON_USE_FREELISTS
317 #define CYTHON_USE_FREELISTS 0
318 #undef CYTHON_IMMORTAL_CONSTANTS
319 #define CYTHON_IMMORTAL_CONSTANTS 0
320 #undef CYTHON_OPAQUE_OBJECTS
321 #define CYTHON_OPAQUE_OBJECTS 0
322#elif defined(PYPY_VERSION)
323 #define CYTHON_COMPILING_IN_PYPY 1
324 #define CYTHON_COMPILING_IN_CPYTHON 0
325 #define CYTHON_COMPILING_IN_LIMITED_API 0
326 #define CYTHON_COMPILING_IN_GRAAL 0
327 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
328 #undef CYTHON_USE_TYPE_SLOTS
329 #define CYTHON_USE_TYPE_SLOTS 1
330 #ifndef CYTHON_USE_TYPE_SPECS
331 #define CYTHON_USE_TYPE_SPECS 0
332 #endif
333 #undef CYTHON_USE_PYTYPE_LOOKUP
334 #define CYTHON_USE_PYTYPE_LOOKUP 0
335 #undef CYTHON_USE_PYLIST_INTERNALS
336 #define CYTHON_USE_PYLIST_INTERNALS 0
337 #undef CYTHON_USE_UNICODE_INTERNALS
338 #define CYTHON_USE_UNICODE_INTERNALS 0
339 #undef CYTHON_USE_UNICODE_WRITER
340 #define CYTHON_USE_UNICODE_WRITER 0
341 #undef CYTHON_USE_PYLONG_INTERNALS
342 #define CYTHON_USE_PYLONG_INTERNALS 0
343 #undef CYTHON_AVOID_BORROWED_REFS
344 #define CYTHON_AVOID_BORROWED_REFS 1
345 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
346 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
347 #undef CYTHON_ASSUME_SAFE_MACROS
348 #define CYTHON_ASSUME_SAFE_MACROS 0
349 #ifndef CYTHON_ASSUME_SAFE_SIZE
350 #define CYTHON_ASSUME_SAFE_SIZE 1
351 #endif
352 #undef CYTHON_UNPACK_METHODS
353 #define CYTHON_UNPACK_METHODS 0
354 #undef CYTHON_FAST_THREAD_STATE
355 #define CYTHON_FAST_THREAD_STATE 0
356 #undef CYTHON_FAST_GIL
357 #define CYTHON_FAST_GIL 0
358 #ifndef CYTHON_VECTORCALL
359 #define CYTHON_VECTORCALL 1
360 #endif
361 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
362 #undef CYTHON_VECTORCALL_TPNEW
363 #define CYTHON_VECTORCALL_TPNEW 0
364 #elif !defined(CYTHON_VECTORCALL_TPNEW)
365 #define CYTHON_VECTORCALL_TPNEW (PYPY_VERSION_NUM >= 0x07030800 && CYTHON_VECTORCALL)
366 #endif
367 #ifndef CYTHON_PEP487_INIT_SUBCLASS
368 #define CYTHON_PEP487_INIT_SUBCLASS 1
369 #endif
370 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
371 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
372 #endif
373 #undef CYTHON_USE_MODULE_STATE
374 #define CYTHON_USE_MODULE_STATE 0
375 #undef CYTHON_USE_SYS_MONITORING
376 #define CYTHON_USE_SYS_MONITORING 0
377 #ifndef CYTHON_USE_TP_FINALIZE
378 #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
379 #endif
380 #undef CYTHON_USE_AM_SEND
381 #define CYTHON_USE_AM_SEND 0
382 #undef CYTHON_USE_DICT_VERSIONS
383 #define CYTHON_USE_DICT_VERSIONS 0
384 #undef CYTHON_USE_EXC_INFO_STACK
385 #define CYTHON_USE_EXC_INFO_STACK 0
386 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
387 #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
388 #endif
389 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
390 #define CYTHON_USE_OWN_PREP_RERAISE_STAR 1
391 #endif
392 #undef CYTHON_USE_FREELISTS
393 #define CYTHON_USE_FREELISTS 0
394 #undef CYTHON_IMMORTAL_CONSTANTS
395 #define CYTHON_IMMORTAL_CONSTANTS 0
396 #undef CYTHON_OPAQUE_OBJECTS
397 #define CYTHON_OPAQUE_OBJECTS 0
398#else
399 #define CYTHON_COMPILING_IN_PYPY 0
400 #define CYTHON_COMPILING_IN_CPYTHON 1
401 #define CYTHON_COMPILING_IN_LIMITED_API 0
402 #define CYTHON_COMPILING_IN_GRAAL 0
403 #ifdef Py_GIL_DISABLED
404 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
405 #else
406 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
407 #endif
408 #if PY_VERSION_HEX < 0x030A0000
409 #undef CYTHON_USE_TYPE_SLOTS
410 #define CYTHON_USE_TYPE_SLOTS 1
411 #elif !defined(CYTHON_USE_TYPE_SLOTS)
412 #define CYTHON_USE_TYPE_SLOTS 1
413 #endif
414 #ifndef CYTHON_USE_TYPE_SPECS
415 #define CYTHON_USE_TYPE_SPECS 0
416 #endif
417 #ifndef CYTHON_USE_PYTYPE_LOOKUP
418 #define CYTHON_USE_PYTYPE_LOOKUP 1
419 #endif
420 #ifndef CYTHON_USE_PYLONG_INTERNALS
421 #define CYTHON_USE_PYLONG_INTERNALS 1
422 #endif
423 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
424 #undef CYTHON_USE_PYLIST_INTERNALS
425 #define CYTHON_USE_PYLIST_INTERNALS 0
426 #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
427 #define CYTHON_USE_PYLIST_INTERNALS 1
428 #endif
429 #ifndef CYTHON_USE_UNICODE_INTERNALS
430 #define CYTHON_USE_UNICODE_INTERNALS 1
431 #endif
432 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
433 #undef CYTHON_USE_UNICODE_WRITER
434 #define CYTHON_USE_UNICODE_WRITER 0
435 #elif !defined(CYTHON_USE_UNICODE_WRITER)
436 #define CYTHON_USE_UNICODE_WRITER 1
437 #endif
438 #ifndef CYTHON_AVOID_BORROWED_REFS
439 #define CYTHON_AVOID_BORROWED_REFS 0
440 #endif
441 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
442 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
443 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
444 #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
445 #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
446 #endif
447 #ifndef CYTHON_ASSUME_SAFE_MACROS
448 #define CYTHON_ASSUME_SAFE_MACROS 1
449 #endif
450 #ifndef CYTHON_ASSUME_SAFE_SIZE
451 #define CYTHON_ASSUME_SAFE_SIZE 1
452 #endif
453 #ifndef CYTHON_UNPACK_METHODS
454 #define CYTHON_UNPACK_METHODS 1
455 #endif
456 #ifndef CYTHON_FAST_THREAD_STATE
457 #define CYTHON_FAST_THREAD_STATE 1
458 #endif
459 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
460 #undef CYTHON_FAST_GIL
461 #define CYTHON_FAST_GIL 0
462 #elif !defined(CYTHON_FAST_GIL)
463 #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
464 #endif
465 #ifndef CYTHON_VECTORCALL
466 #define CYTHON_VECTORCALL 1
467 #endif
468 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX < 0x030E0000
469 #undef CYTHON_VECTORCALL_TPNEW
470 #define CYTHON_VECTORCALL_TPNEW 0
471 #elif !defined(CYTHON_VECTORCALL_TPNEW)
472 #define CYTHON_VECTORCALL_TPNEW CYTHON_VECTORCALL
473 #endif
474 #ifndef CYTHON_PEP487_INIT_SUBCLASS
475 #define CYTHON_PEP487_INIT_SUBCLASS 1
476 #endif
477 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
478 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
479 #endif
480 #ifndef CYTHON_USE_MODULE_STATE
481 #define CYTHON_USE_MODULE_STATE 0
482 #endif
483 #ifndef CYTHON_USE_SYS_MONITORING
484 #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
485 #endif
486 #ifndef CYTHON_USE_TP_FINALIZE
487 #define CYTHON_USE_TP_FINALIZE 1
488 #endif
489 #ifndef CYTHON_USE_AM_SEND
490 #define CYTHON_USE_AM_SEND 1
491 #endif
492 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
493 #undef CYTHON_USE_DICT_VERSIONS
494 #define CYTHON_USE_DICT_VERSIONS 0
495 #elif !defined(CYTHON_USE_DICT_VERSIONS)
496 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
497 #endif
498 #ifndef CYTHON_USE_EXC_INFO_STACK
499 #define CYTHON_USE_EXC_INFO_STACK 1
500 #endif
501 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
502 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
503 #endif
504 #ifndef CYTHON_USE_OWN_PREP_RERAISE_STAR
505 #define CYTHON_USE_OWN_PREP_RERAISE_STAR (PY_VERSION_HEX < 0x030C00B2)
506 #endif
507 #ifndef CYTHON_USE_FREELISTS
508 #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
509 #endif
510 #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
511 #undef CYTHON_IMMORTAL_CONSTANTS
512 #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work
513 #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
514 #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
515 #endif
516 #ifndef CYTHON_OPAQUE_OBJECTS
517 #define CYTHON_OPAQUE_OBJECTS 0
518 #endif
519#endif
520#if CYTHON_USE_PYLONG_INTERNALS
521 #undef SHIFT
522 #undef BASE
523 #undef MASK
524 #ifdef SIZEOF_VOID_P
525 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
526 #endif
527#endif
528#ifndef __has_attribute
529 #define __has_attribute(x) 0
530#endif
531#ifndef __has_cpp_attribute
532 #define __has_cpp_attribute(x) 0
533#endif
534#ifndef CYTHON_RESTRICT
535 #if defined(__GNUC__)
536 #define CYTHON_RESTRICT __restrict__
537 #elif defined(_MSC_VER) && _MSC_VER >= 1400
538 #define CYTHON_RESTRICT __restrict
539 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
540 #define CYTHON_RESTRICT restrict
541 #else
542 #define CYTHON_RESTRICT
543 #endif
544#endif
545#ifndef CYTHON_UNUSED
546 #if defined(__cplusplus)
547 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
548 * but leads to warnings with -pedantic, since it is a C++17 feature */
549 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
550 #if __has_cpp_attribute(maybe_unused)
551 #define CYTHON_UNUSED [[maybe_unused]]
552 #endif
553 #endif
554 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
555 #define CYTHON_UNUSED [[maybe_unused]]
556 #endif
557#endif
558#ifndef CYTHON_UNUSED
559# if defined(__GNUC__)
560# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
561# define CYTHON_UNUSED __attribute__ ((__unused__))
562# else
563# define CYTHON_UNUSED
564# endif
565# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
566# define CYTHON_UNUSED __attribute__ ((__unused__))
567# else
568# define CYTHON_UNUSED
569# endif
570#endif
571#ifndef CYTHON_UNUSED_VAR
572# if defined(__cplusplus)
573 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
574# else
575# define CYTHON_UNUSED_VAR(x) (void)(x)
576# endif
577#endif
578#ifndef CYTHON_MAYBE_UNUSED_VAR
579 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
580#endif
581#ifndef CYTHON_NCP_UNUSED
582# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
583# define CYTHON_NCP_UNUSED
584# else
585# define CYTHON_NCP_UNUSED CYTHON_UNUSED
586# endif
587#endif
588#ifndef CYTHON_USE_CPP_STD_MOVE
589 #if defined(__cplusplus) && (\
590 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
591 #define CYTHON_USE_CPP_STD_MOVE 1
592 #else
593 #define CYTHON_USE_CPP_STD_MOVE 0
594 #endif
595#endif
596#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
597#include <stdint.h>
598typedef uintptr_t __pyx_uintptr_t;
599#ifndef CYTHON_FALLTHROUGH
600 #if defined(__cplusplus)
601 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
602 * but leads to warnings with -pedantic, since it is a C++17 feature */
603 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
604 #if __has_cpp_attribute(fallthrough)
605 #define CYTHON_FALLTHROUGH [[fallthrough]]
606 #endif
607 #endif
608 #ifndef CYTHON_FALLTHROUGH
609 #if __has_cpp_attribute(clang::fallthrough)
610 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
611 #elif __has_cpp_attribute(gnu::fallthrough)
612 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
613 #endif
614 #endif
615 #endif
616 #ifndef CYTHON_FALLTHROUGH
617 #if __has_attribute(fallthrough)
618 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
619 #else
620 #define CYTHON_FALLTHROUGH
621 #endif
622 #endif
623 #if defined(__clang__) && defined(__apple_build_version__)
624 #if __apple_build_version__ < 7000000
625 #undef CYTHON_FALLTHROUGH
626 #define CYTHON_FALLTHROUGH
627 #endif
628 #endif
629#endif
630#ifdef Py_UNREACHABLE
631 #define __Pyx_UNREACHABLE() Py_UNREACHABLE()
632#elif __Pyx_has_cbuiltin(__builtin_unreachable)
633 #define __Pyx_UNREACHABLE() __builtin_unreachable()
634#elif defined(__clang__) || defined(__INTEL_COMPILER) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
635 #define __Pyx_UNREACHABLE() __builtin_unreachable()
636#elif defined(_MSC_VER)
637 #define __Pyx_UNREACHABLE() __assume(0)
638#else
639 #define __Pyx_UNREACHABLE() Py_FatalError("Unreachable C code path reached")
640#endif
641#ifndef Py_UNREACHABLE
642 #define Py_UNREACHABLE() __Pyx_UNREACHABLE()
643#endif
644#ifdef __cplusplus
645 template <typename T>
646 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
647 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
648#else
649 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
650#endif
651#if CYTHON_COMPILING_IN_PYPY == 1
652 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
653#else
654 #define __PYX_NEED_TP_PRINT_SLOT 0
655#endif
656#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
657#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
658#define __Pyx_PyErr_FetchException(petype, peval, petb) PyErr_Fetch(petype, peval, petb)
659#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_Restore(etype, eval, etb)
660#else
661#define __Pyx_PyErr_FetchException(petype, peval, petb) *(petype)=NULL; *(peval)=PyErr_GetRaisedException(); *(petb)=NULL
662#define __Pyx_PyErr_RestoreException(etype, eval, etb) PyErr_SetRaisedException(eval)
663#endif
664
665/* CppInitCode */
666#ifndef __cplusplus
667 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
668#endif
669#ifndef CYTHON_INLINE
670 #if defined(__clang__)
671 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
672 #else
673 #define CYTHON_INLINE inline
674 #endif
675#endif
676template<typename T>
677void __Pyx_call_destructor(T& x) {
678 x.~T();
679}
680template<typename T>
681class __Pyx_FakeReference {
682 public:
683 __Pyx_FakeReference() : ptr(NULL) { }
684 __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
685 T *operator->() { return ptr; }
686 T *operator&() { return ptr; }
687 operator T&() { return *ptr; }
688 template<typename U> bool operator ==(const U& other) const { return *ptr == other; }
689 template<typename U> bool operator !=(const U& other) const { return *ptr != other; }
690 template<typename U> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
691 template<typename U> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
692 private:
693 T *ptr;
694};
695
696/* PythonCompatibility */
697#define __PYX_BUILD_PY_SSIZE_T "n"
698#define CYTHON_FORMAT_SSIZE_T "z"
699#define __Pyx_BUILTIN_MODULE_NAME "builtins"
700#define __Pyx_DefaultClassType PyType_Type
701#if CYTHON_COMPILING_IN_LIMITED_API
702 #ifndef CO_OPTIMIZED
703 static int CO_OPTIMIZED;
704 #endif
705 #ifndef CO_NEWLOCALS
706 static int CO_NEWLOCALS;
707 #endif
708 #ifndef CO_VARARGS
709 static int CO_VARARGS;
710 #endif
711 #ifndef CO_VARKEYWORDS
712 static int CO_VARKEYWORDS;
713 #endif
714 #ifndef CO_ASYNC_GENERATOR
715 static int CO_ASYNC_GENERATOR;
716 #endif
717 #ifndef CO_GENERATOR
718 static int CO_GENERATOR;
719 #endif
720 #ifndef CO_COROUTINE
721 static int CO_COROUTINE;
722 #endif
723#else
724 #ifndef CO_COROUTINE
725 #define CO_COROUTINE 0x80
726 #endif
727 #ifndef CO_ASYNC_GENERATOR
728 #define CO_ASYNC_GENERATOR 0x200
729 #endif
730#endif
731static int __Pyx_init_co_variables(void);
732#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
733 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
734#else
735 #define __Pyx_Py_Is(x, y) ((x) == (y))
736#endif
737#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
738 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
739#else
740 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
741#endif
742#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
743 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
744#else
745 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
746#endif
747#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
748 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
749#else
750 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
751#endif
752#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
753#if CYTHON_COMPILING_IN_PYPY
754 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
755#else
756 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
757#endif
758#if CYTHON_COMPILING_IN_LIMITED_API
759static unsigned long __Pyx_Runtime_TPFLAGS_SEQUENCE;
760static unsigned long __Pyx_Runtime_TPFLAGS_MAPPING;
761#else
762#define __Pyx_Runtime_TPFLAGS_SEQUENCE Py_TPFLAGS_SEQUENCE
763#define __Pyx_Runtime_TPFLAGS_MAPPING Py_TPFLAGS_MAPPING
764#endif
765static int __Pyx_init_tpflags_variables(void);
766#ifndef Py_TPFLAGS_HAVE_FINALIZE
767 #define Py_TPFLAGS_HAVE_FINALIZE 0
768#endif
769#ifndef Py_TPFLAGS_SEQUENCE
770 #define Py_TPFLAGS_SEQUENCE (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 5)
771#endif
772#ifndef Py_TPFLAGS_MAPPING
773 #define Py_TPFLAGS_MAPPING (CYTHON_COMPILING_IN_LIMITED_API ? 0 : 1 << 6)
774#endif
775#ifndef Py_TPFLAGS_IMMUTABLETYPE
776 #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
777#endif
778#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
779 #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
780#endif
781#ifndef METH_STACKLESS
782 #define METH_STACKLESS 0
783#endif
784#if !defined(METH_FASTCALL) || CYTHON_COMPILING_IN_PYPY
785 #ifndef METH_FASTCALL
786 #define METH_FASTCALL 0x80
787 #endif
788 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
789 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
790 Py_ssize_t nargs, PyObject *kwnames);
791#else
792 #if PY_VERSION_HEX >= 0x030d00A4
793 # define __Pyx_PyCFunctionFast PyCFunctionFast
794 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
795 #else
796 # define __Pyx_PyCFunctionFast _PyCFunctionFast
797 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
798 #endif
799#endif
800#if CYTHON_VECTORCALL
801 #define __Pyx_METH_FASTCALL METH_FASTCALL
802 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
803 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
804#else
805 #define __Pyx_METH_FASTCALL METH_VARARGS
806 #define __Pyx_PyCFunction_FastCall PyCFunction
807 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
808#endif
809#if CYTHON_VECTORCALL
810 #define __pyx_vectorcallfunc vectorcallfunc
811 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
812 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
813#else
814 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
815 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
816#endif
817#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
818#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
819#if CYTHON_COMPILING_IN_CPYTHON
820#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
821#elif !CYTHON_COMPILING_IN_LIMITED_API
822#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
823#endif
824#if CYTHON_COMPILING_IN_CPYTHON
825#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
826static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
827 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
828}
829#endif
830static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
831#if CYTHON_COMPILING_IN_LIMITED_API
832 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
833#else
834 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
835#endif
836}
837#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
838#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
839 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
840#else
841 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
842#endif
843#if CYTHON_COMPILING_IN_PYPY
844 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
845#else
846 #define __Pyx_PyCMethod PyCMethod
847#endif
848#ifndef METH_METHOD
849 #define METH_METHOD 0x200
850#endif
851#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
852 #define PyObject_Malloc(s) PyMem_Malloc(s)
853 #define PyObject_Free(p) PyMem_Free(p)
854 #define PyObject_Realloc(p) PyMem_Realloc(p)
855#endif
856#if CYTHON_COMPILING_IN_LIMITED_API
857 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
858#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
859 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
860 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
861#elif CYTHON_COMPILING_IN_GRAAL
862 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
863 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
864#else
865 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
866 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
867#endif
868#if CYTHON_COMPILING_IN_LIMITED_API
869 #define __Pyx_PyThreadState_Current PyThreadState_Get()
870#elif !CYTHON_FAST_THREAD_STATE
871 #define __Pyx_PyThreadState_Current PyThreadState_GET()
872#elif PY_VERSION_HEX >= 0x030d00A1
873 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
874#else
875 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
876#endif
877#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
878 #define __PYX_SHARED_SIZEOF(T) -((int)sizeof(T))
879 #define __PYX_SHARED_RELATIVE_OFFSET Py_RELATIVE_OFFSET
880 #define CYTHON_OPAQUE_SHARED_TYPES 1
881#else
882 #define __PYX_SHARED_SIZEOF(T) sizeof(T)
883 #define __PYX_SHARED_RELATIVE_OFFSET 0
884 #define CYTHON_OPAQUE_SHARED_TYPES 0
885#endif
886#if CYTHON_USE_MODULE_STATE
887static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
888{
889 void *result;
890 result = PyModule_GetState(op);
891 if (!result)
892 Py_FatalError("Couldn't find the module state");
893 return result;
894}
895#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
896#else
897#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
898#endif
899#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
900#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
901#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
902#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
903#if CYTHON_USE_TYPE_SLOTS
904 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
905 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
906 #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
907 #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
908#else
909 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
910 #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
911 ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
912 (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
913 __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
914 #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
915 #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
916#endif
917#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
918#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
919#else
920#define __Pyx_PyDict_NewPresized(n) PyDict_New()
921#endif
922#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
923#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
924#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
925#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
926static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
927 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
928 if (res == NULL && PyErr_Occurred()) {
929 PyErr_WriteUnraisable(NULL);
930 }
931 return res;
932}
933#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
934#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
935#define __Pyx_PyDict_GetItemStr PyDict_GetItem
936#else
937static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
938#if CYTHON_COMPILING_IN_PYPY
939 return PyDict_GetItem(dict, name);
940#else
941 PyDictEntry *ep;
942 PyDictObject *mp = (PyDictObject*) dict;
943 long hash = ((PyStringObject *) name)->ob_shash;
944 assert(hash != -1);
945 ep = (mp->ma_lookup)(mp, name, hash);
946 if (ep == NULL) {
947 return NULL;
948 }
949 return ep->me_value;
950#endif
951}
952#define __Pyx_PyDict_GetItemStr PyDict_GetItem
953#endif
954#if CYTHON_USE_TYPE_SLOTS
955 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
956 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
957#else
958 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
959 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
960#endif
961#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
962#if CYTHON_USE_TYPE_SPECS
963#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
964 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
965 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
966 PyObject_GC_Del(obj);\
967 Py_DECREF(type);\
968}
969#else
970#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
971#endif
972#if CYTHON_COMPILING_IN_LIMITED_API
973 #define __Pyx_PyUnicode_READY(op) (0)
974 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
975 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
976 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
977 #define __Pyx_PyUnicode_KIND_04(u) __Pyx_PyUnicode_KIND(u)
978 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
979 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
980 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
981#else
982 #if PY_VERSION_HEX >= 0x030C0000
983 #define __Pyx_PyUnicode_READY(op) (0)
984 #else
985 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
986 0 : _PyUnicode_Ready((PyObject *)(op)))
987 #endif
988 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
989 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
990 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
991 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
992 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
993 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
994 #if PY_VERSION_HEX >= 0x030C0000
995 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
996 #else
997 #if CYTHON_COMPILING_IN_CPYTHON
998 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
999 #else
1000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
1001 #endif
1002 #endif
1003 static CYTHON_INLINE int __Pyx_PyUnicode_KIND_04(PyObject *o) {
1004 return __Pyx_PyUnicode_KIND(o) - (int) !!PyUnicode_IS_ASCII(o);
1005 }
1006#endif
1007#if CYTHON_COMPILING_IN_PYPY
1008 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
1009 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
1010#else
1011 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
1012 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
1013 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
1014#endif
1015#if CYTHON_COMPILING_IN_PYPY
1016 #if !defined(PyUnicode_DecodeUnicodeEscape)
1017 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
1018 #endif
1019 #if !defined(PyUnicode_Contains)
1020 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
1021 #endif
1022 #if !defined(PyByteArray_Check)
1023 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
1024 #endif
1025 #if !defined(PyObject_Format)
1026 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
1027 #endif
1028#endif
1029#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
1030#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
1031 #define __Pyx_PySequence_ListKeepNew(obj)\
1032 (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
1033#elif CYTHON_COMPILING_IN_CPYTHON
1034 #define __Pyx_PySequence_ListKeepNew(obj)\
1035 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
1036#else
1037 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
1038#endif
1039#ifndef PySet_CheckExact
1040 #define PySet_CheckExact(obj) Py_IS_TYPE(obj, &PySet_Type)
1041#endif
1042enum __Pyx_ReferenceSharing {
1043 __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
1044 __Pyx_ReferenceSharing_OwnStrongReference,
1045 __Pyx_ReferenceSharing_FunctionArgument,
1046 __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
1047};
1048#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
1049#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
1050 (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
1051 (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
1052 (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
1053#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
1054#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
1055#else
1056#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
1057#endif
1058#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1059 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
1060#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1061 #if CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
1062 #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1063 #else
1064 #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
1065 #endif
1066#elif CYTHON_COMPILING_IN_LIMITED_API || !(CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE)
1067 #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
1068#else
1069 #define __Pyx_PyList_GetItemRef(o, i) (likely(__Pyx_is_valid_index(i, PyList_GET_SIZE(o))) ?\
1070 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1071#endif
1072#if CYTHON_AVOID_BORROWED_REFS || CYTHON_COMPILING_IN_LIMITED_API
1073 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1074 __Pyx_PyList_GetItemRef(o, i))
1075#elif CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1076 #if CYTHON_ASSUME_SAFE_MACROS
1077 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1078 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1079 __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1080 #else
1081 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) (\
1082 __Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
1083 __Pyx_XNewRef(PyList_GetItem(o, i)) : __Pyx_PyList_GetItemRef(o, i))
1084 #endif
1085#elif CYTHON_ASSUME_SAFE_MACROS
1086 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1087 __Pyx_NewRef(PyList_GET_ITEM(o, i)))
1088#else
1089 #define __Pyx_PyList_GET_ITEM_REF(o, i, unsafe_shared) ((void)(unsafe_shared),\
1090 __Pyx_XNewRef(PyList_GetItem(o, i)))
1091#endif
1092#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
1093#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
1094#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
1095static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1096 *result = PyObject_GetItem(dict, key);
1097 if (*result == NULL) {
1098 if (PyErr_ExceptionMatches(PyExc_KeyError)) {
1099 PyErr_Clear();
1100 return 0;
1101 }
1102 return -1;
1103 }
1104 return 1;
1105}
1106#else
1107static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
1108 *result = PyDict_GetItemWithError(dict, key);
1109 if (*result == NULL) {
1110 return PyErr_Occurred() ? -1 : 0;
1111 }
1112 Py_INCREF(*result);
1113 return 1;
1114}
1115#endif
1116#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
1117 #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
1118#else
1119 #define __Pyx_VISIT_CONST(obj)
1120#endif
1121#if CYTHON_ASSUME_SAFE_MACROS
1122 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
1123 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
1124 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
1125 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
1126 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
1127 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
1128#else
1129 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
1130 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
1131 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
1132 #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
1133 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
1134 #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
1135#endif
1136#if CYTHON_ASSUME_SAFE_SIZE
1137 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
1138 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
1139 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
1140 #define __Pyx_PyDict_GET_SIZE(o) PyDict_GET_SIZE(o)
1141 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
1142 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
1143 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
1144#else
1145 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
1146 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
1147 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
1148 #define __Pyx_PyDict_GET_SIZE(o) PyDict_Size(o)
1149 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
1150 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
1151 #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
1152#endif
1153#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
1154 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
1155#endif
1156#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
1157#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t
1158#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1159 #define __Pyx_PySendResult PySendResult
1160#else
1161 typedef enum {
1162 PYGEN_RETURN = 0,
1163 PYGEN_ERROR = -1,
1164 PYGEN_NEXT = 1,
1165 } __Pyx_PySendResult;
1166#endif
1167#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
1168 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
1169#else
1170 #define __Pyx_pyiter_sendfunc sendfunc
1171#endif
1172#if !CYTHON_USE_AM_SEND
1173#define __PYX_HAS_PY_AM_SEND 0
1174#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
1175#define __PYX_HAS_PY_AM_SEND 1
1176#else
1177#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation
1178#endif
1179#if __PYX_HAS_PY_AM_SEND < 2
1180 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
1181#else
1182 typedef struct {
1183 unaryfunc am_await;
1184 unaryfunc am_aiter;
1185 unaryfunc am_anext;
1186 __Pyx_pyiter_sendfunc am_send;
1187 } __Pyx_PyAsyncMethodsStruct;
1188 #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
1189#endif
1190#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
1191 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
1192#else
1193 #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
1194#endif
1195#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
1196#ifdef __cplusplus
1197extern "C"
1198#endif
1199PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
1200#endif
1201#if CYTHON_COMPILING_IN_LIMITED_API
1202static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
1203 int value;
1204 PyObject *py_value = PyObject_GetAttrString(inspect, name);
1205 if (!py_value) return 0;
1206 value = (int) PyLong_AsLong(py_value);
1207 Py_DECREF(py_value);
1208 *write_to = value;
1209 return value != -1 || !PyErr_Occurred();
1210}
1211static int __Pyx_init_co_variables(void) {
1212 PyObject *inspect;
1213 int result;
1214 inspect = PyImport_ImportModule("inspect");
1215 result =
1216#if !defined(CO_OPTIMIZED)
1217 __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
1218#endif
1219#if !defined(CO_NEWLOCALS)
1220 __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
1221#endif
1222#if !defined(CO_VARARGS)
1223 __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
1224#endif
1225#if !defined(CO_VARKEYWORDS)
1226 __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
1227#endif
1228#if !defined(CO_ASYNC_GENERATOR)
1229 __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
1230#endif
1231#if !defined(CO_GENERATOR)
1232 __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
1233#endif
1234#if !defined(CO_COROUTINE)
1235 __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
1236#endif
1237 1;
1238 Py_DECREF(inspect);
1239 return result ? 0 : -1;
1240}
1241static int __Pyx_init_tpflags_bitcount(unsigned long flag) {
1242 int count = 0;
1243 while (flag) {
1244 count += (int) (flag & 1);
1245 flag >>= 1;
1246 }
1247 return count;
1248}
1249static int __Pyx_init_tpflags_variables(void) {
1250 if (__Pyx_Runtime_TPFLAGS_SEQUENCE != 0 && __Pyx_Runtime_TPFLAGS_MAPPING != 0) {
1251 return 0;
1252 }
1253 PyObject *collections_abc = PyImport_ImportModule("collections.abc");
1254 if (!collections_abc) return -1;
1255 int result = 0;
1256 PyObject *sequence = NULL, *mapping = NULL;
1257#if __PYX_LIMITED_VERSION_HEX >= 0x030D0000
1258 if (PyObject_GetOptionalAttrString(collections_abc, "Sequence", &sequence) != 1) goto fail;
1259 if (PyObject_GetOptionalAttrString(collections_abc, "Mapping", &mapping) != 1) goto fail;
1260#else
1261 sequence = PyObject_GetAttrString(collections_abc, "Sequence");
1262 if (!sequence) goto fail_attr_lookup;
1263 mapping = PyObject_GetAttrString(collections_abc, "Mapping");
1264 if (!mapping) goto fail_attr_lookup;
1265#endif
1266 if (!PyType_Check(sequence) || !PyType_Check(mapping)) goto fail;
1267 {
1268 unsigned long sequence_flags = PyType_GetFlags((PyTypeObject*)sequence);
1269 unsigned long mapping_flags = PyType_GetFlags((PyTypeObject*)mapping);
1270 unsigned long mutual_flags = sequence_flags & mapping_flags;
1271 sequence_flags = sequence_flags ^ mutual_flags;
1272 mapping_flags = mapping_flags ^ mutual_flags;
1273 if (__Pyx_Runtime_TPFLAGS_SEQUENCE == 0 && __Pyx_init_tpflags_bitcount(sequence_flags) == 1) {
1274 __Pyx_Runtime_TPFLAGS_SEQUENCE = sequence_flags;
1275 }
1276 if (__Pyx_Runtime_TPFLAGS_MAPPING == 0 && __Pyx_init_tpflags_bitcount(mapping_flags) == 1) {
1277 __Pyx_Runtime_TPFLAGS_MAPPING = mapping_flags;
1278 }
1279 }
1280 cleanup:
1281 Py_XDECREF(mapping);
1282 Py_XDECREF(sequence);
1283 Py_DECREF(collections_abc);
1284 return result;
1285#if __PYX_LIMITED_VERSION_HEX < 0x030D0000
1286 fail_attr_lookup:
1287 if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
1288 PyErr_Clear();
1289 }
1290#endif
1291 fail:
1292 result = PyErr_Occurred() ? -1 : 0;
1293 goto cleanup;
1294}
1295#else
1296static int __Pyx_init_co_variables(void) {
1297 return 0; // It's a limited API-only feature
1298}
1299static int __Pyx_init_tpflags_variables(void) {
1300 return 0; // It's a limited API-only feature
1301}
1302#endif
1303
1304/* MathInitCode */
1305#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
1306 #ifndef _USE_MATH_DEFINES
1307 #define _USE_MATH_DEFINES
1308 #endif
1309#endif
1310#include <math.h>
1311#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
1312#define __Pyx_truncl trunc
1313#else
1314#define __Pyx_truncl truncl
1315#endif
1316
1317#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1318#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 1
1319#endif
1320#ifndef CYTHON_CLINE_IN_TRACEBACK
1321#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
1322#endif
1323#if CYTHON_CLINE_IN_TRACEBACK
1324#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; }
1325#else
1326#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; }
1327#endif
1328#define __PYX_ERR(f_index, lineno, Ln_error) \
1329 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
1330
1331#ifdef CYTHON_EXTERN_C
1332 #undef __PYX_EXTERN_C
1333 #define __PYX_EXTERN_C CYTHON_EXTERN_C
1334#elif defined(__PYX_EXTERN_C)
1335 #ifdef _MSC_VER
1336 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
1337 #else
1338 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
1339 #endif
1340#else
1341 #define __PYX_EXTERN_C extern "C++"
1342#endif
1343
1344#define __PYX_HAVE__cpskRelations
1345#define __PYX_HAVE_API__cpskRelations
1346/* Early includes */
1347#include <string.h>
1348#include <stdio.h>
1349
1350 /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
1351
1352#include "numpy/arrayobject.h"
1353#include "numpy/ndarrayobject.h"
1354#include "numpy/ndarraytypes.h"
1355#include "numpy/arrayscalars.h"
1356#include "numpy/ufuncobject.h"
1357#include "pskRelations.h"
1358#ifdef _OPENMP
1359#include <omp.h>
1360#endif /* _OPENMP */
1361
1362#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
1363#define CYTHON_WITHOUT_ASSERTIONS
1364#endif
1365
1366#ifdef CYTHON_FREETHREADING_COMPATIBLE
1367#if CYTHON_FREETHREADING_COMPATIBLE
1368#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
1369#else
1370#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1371#endif
1372#else
1373#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
1374#endif
1375#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
1376#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
1377#define __PYX_DEFAULT_STRING_ENCODING ""
1378#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
1379#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
1380#define __Pyx_uchar_cast(c) ((unsigned char)c)
1381#define __Pyx_long_cast(x) ((long)x)
1382#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
1383 (sizeof(type) < sizeof(Py_ssize_t)) ||\
1384 (sizeof(type) > sizeof(Py_ssize_t) &&\
1385 likely(v < (type)PY_SSIZE_T_MAX ||\
1386 v == (type)PY_SSIZE_T_MAX) &&\
1387 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
1388 v == (type)PY_SSIZE_T_MIN))) ||\
1389 (sizeof(type) == sizeof(Py_ssize_t) &&\
1390 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
1391 v == (type)PY_SSIZE_T_MAX))) )
1392static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
1393 return (size_t) i < (size_t) limit;
1394}
1395#if defined (__cplusplus) && __cplusplus >= 201103L
1396 #include <cstdlib>
1397 #define __Pyx_sst_abs(value) std::abs(value)
1398#elif SIZEOF_INT >= SIZEOF_SIZE_T
1399 #define __Pyx_sst_abs(value) abs(value)
1400#elif SIZEOF_LONG >= SIZEOF_SIZE_T
1401 #define __Pyx_sst_abs(value) labs(value)
1402#elif defined (_MSC_VER)
1403 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
1404#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1405 #define __Pyx_sst_abs(value) llabs(value)
1406#elif defined (__GNUC__)
1407 #define __Pyx_sst_abs(value) __builtin_llabs(value)
1408#else
1409 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
1410#endif
1411static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
1412static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
1413static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
1414static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
1415#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
1416#define __Pyx_PyBytes_FromString PyBytes_FromString
1417#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
1418static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
1419#if CYTHON_ASSUME_SAFE_MACROS
1420 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1421 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1422 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1423 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1424 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1425 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1426 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
1427#else
1428 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
1429 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
1430 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
1431 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
1432 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
1433 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
1434 #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
1435#endif
1436#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1437#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1438#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
1439#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1440#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1441#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1442#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1443#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1444#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1445#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
1446#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1447static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
1448#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
1449 return Py_NewRef(obj);
1450#else
1451 Py_INCREF(obj);
1452 return obj;
1453#endif
1454}
1455static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
1456#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
1457 return Py_XNewRef(obj);
1458#else
1459 Py_XINCREF(obj);
1460 return obj;
1461#endif
1462}
1463static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
1464static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
1465static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
1466static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1467static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
1468#define __Pyx_PyObject_RichCompareBool(a,b,cmp) __Pyx_PyObject_IsTrueAndDecref(PyObject_RichCompare((a),(b),(cmp)))
1469#define __Pyx_PySequence_Tuple(obj)\
1470 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1471static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1472static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
1473static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1474#if CYTHON_ASSUME_SAFE_MACROS
1475#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1476#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
1477#define __Pyx_PyFloat_IsNonZero(x) (PyFloat_AS_DOUBLE(x) != 0.0)
1478#else
1479#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1480#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
1481#define __Pyx_PyFloat_IsNonZero(x) PyObject_IsTrue(x)
1482#endif
1483#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
1484#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1485#if CYTHON_USE_PYLONG_INTERNALS
1486 #if PY_VERSION_HEX >= 0x030C00A7
1487 #ifndef _PyLong_SIGN_MASK
1488 #define _PyLong_SIGN_MASK 3
1489 #endif
1490 #ifndef _PyLong_NON_SIZE_BITS
1491 #define _PyLong_NON_SIZE_BITS 3
1492 #endif
1493 #define __Pyx_PyLong_SignBits(x) ((int) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK))
1494 #define __Pyx_PyLong_Sign(x) (1 - __Pyx_PyLong_SignBits(x))
1495 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_SignBits(x) & 2) != 0)
1496 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
1497 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_SignBits(x) & 1)
1498 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_SignBits(x) == 0)
1499 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
1500 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
1501 #define __Pyx_PyLong_SignedDigitCount(x)\
1502 (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
1503 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
1504 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
1505 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
1506 #else
1507 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
1508 #define __Pyx_PyLong_CompactValue(x) (((Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
1509 #endif
1510 static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_CompareSignAndSize(PyObject *a, PyObject *b) {
1511 uintptr_t tag_a = ((PyLongObject*)a)->long_value.lv_tag;
1512 uintptr_t tag_b = ((PyLongObject*)b)->long_value.lv_tag;
1513 if (tag_a == tag_b) return 0;
1514 int sign_a = (int) (tag_a & _PyLong_SIGN_MASK);
1515 int sign_b = (int) (tag_b & _PyLong_SIGN_MASK);
1516 if (sign_a > sign_b) return -1;
1517 if (sign_a < sign_b) return 1;
1518 Py_ssize_t size_a = (Py_ssize_t) (tag_a >> _PyLong_NON_SIZE_BITS);
1519 Py_ssize_t size_b = (Py_ssize_t) (tag_b >> _PyLong_NON_SIZE_BITS);
1520 return (1 - sign_a) * (size_a - size_b);
1521 }
1522 typedef Py_ssize_t __Pyx_compact_pylong;
1523 typedef size_t __Pyx_compact_upylong;
1524 #else
1525 #define __Pyx_PyLong_Sign(x) ((int) ((Py_SIZE(x) == 0) ? 0 : (Py_SIZE(x) < 0) ? -1 : 1))
1526 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
1527 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
1528 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
1529 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
1530 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
1531 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
1532 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
1533 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
1534 #define __Pyx_PyLong_CompactValue(x)\
1535 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
1536 #define __Pyx_PyLong_CompareSignAndSize(a, b) (Py_SIZE(a) - Py_SIZE(b))
1537 typedef sdigit __Pyx_compact_pylong;
1538 typedef digit __Pyx_compact_upylong;
1539 #endif
1540 #if PY_VERSION_HEX >= 0x030C00A5
1541 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
1542 #else
1543 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
1544 #endif
1545 #define __Pyx_PyLong_IsNonZero(x) (!__Pyx_PyLong_IsZero(x))
1546#else
1547 #define __Pyx_PyLong_IsNonZero(x) PyObject_IsTrue(x)
1548#endif
1549#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
1550 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1551#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1552 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
1553#else
1554 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1555#endif
1556
1557
1558/* Test for GCC > 2.95 */
1559#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1560 #define likely(x) __builtin_expect(!!(x), 1)
1561 #define unlikely(x) __builtin_expect(!!(x), 0)
1562#else /* !__GNUC__ or GCC < 2.95 */
1563 #define likely(x) (x)
1564 #define unlikely(x) (x)
1565#endif /* __GNUC__ */
1566/* PretendToInitialize */
1567#ifdef __cplusplus
1568#if __cplusplus > 201103L
1569#include <type_traits>
1570#endif
1571template <typename T>
1572static void __Pyx_pretend_to_initialize(T* ptr) {
1573#if __cplusplus > 201103L
1574 if ((std::is_trivially_default_constructible<T>::value))
1575#endif
1576 *ptr = T();
1577 (void)ptr;
1578}
1579#else
1580static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1581#endif
1582
1583
1584#if !CYTHON_USE_MODULE_STATE
1585static PyObject *__pyx_m = NULL;
1586#endif
1587static const char * const __pyx_cfilenm = __FILE__;
1588
1589/* Header.proto */
1590#if !defined(CYTHON_CCOMPLEX)
1591 #if defined(__cplusplus)
1592 #define CYTHON_CCOMPLEX 1
1593 #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
1594 #define CYTHON_CCOMPLEX 1
1595 #else
1596 #define CYTHON_CCOMPLEX 0
1597 #endif
1598#endif
1599#if CYTHON_CCOMPLEX
1600 #ifdef __cplusplus
1601 #include <complex>
1602 #else
1603 #include <complex.h>
1604 #endif
1605#endif
1606#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
1607 #undef _Complex_I
1608 #define _Complex_I 1.0fj
1609#endif
1610
1611/* #### Code section: filename_table ### */
1612
1613static const char* const __pyx_f[] = {
1614 "proteus/cpskRelations.pyx",
1615 "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd",
1616 "cpython/type.pxd",
1617};
1618/* #### Code section: utility_code_proto_before_types ### */
1619/* Atomics.proto (used by UnpackUnboundCMethod) */
1620#include <pythread.h>
1621#ifndef CYTHON_ATOMICS
1622 #define CYTHON_ATOMICS 1
1623#endif
1624#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1625#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1626#define __pyx_atomic_int_type int
1627#define __pyx_nonatomic_int_type int
1628#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1629 (__STDC_VERSION__ >= 201112L) &&\
1630 !defined(__STDC_NO_ATOMICS__))
1631 #include <stdatomic.h>
1632#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1633 (__cplusplus >= 201103L) ||\
1634 (defined(_MSC_VER) && _MSC_VER >= 1700)))
1635 #include <atomic>
1636#endif
1637#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
1638 (__STDC_VERSION__ >= 201112L) &&\
1639 !defined(__STDC_NO_ATOMICS__) &&\
1640 ATOMIC_INT_LOCK_FREE == 2)
1641 #undef __pyx_atomic_int_type
1642 #define __pyx_atomic_int_type atomic_int
1643 #define __pyx_atomic_ptr_type atomic_uintptr_t
1644 #define __pyx_nonatomic_ptr_type uintptr_t
1645 #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
1646 #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
1647 #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
1648 #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
1649 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1650 #define __pyx_atomic_load(value) atomic_load(value)
1651 #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
1652 #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
1653 #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
1654 #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1655 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
1656 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1657 #pragma message ("Using standard C atomics")
1658 #elif defined(__PYX_DEBUG_ATOMICS)
1659 #warning "Using standard C atomics"
1660 #endif
1661#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
1662 (__cplusplus >= 201103L) ||\
1663\
1664 (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
1665 ATOMIC_INT_LOCK_FREE == 2)
1666 #undef __pyx_atomic_int_type
1667 #define __pyx_atomic_int_type std::atomic_int
1668 #define __pyx_atomic_ptr_type std::atomic_uintptr_t
1669 #define __pyx_nonatomic_ptr_type uintptr_t
1670 #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
1671 #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
1672 #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
1673 #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
1674 #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1675 #define __pyx_atomic_load(value) std::atomic_load(value)
1676 #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
1677 #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
1678 #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
1679 #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
1680 #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
1681 #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
1682 #pragma message ("Using standard C++ atomics")
1683 #elif defined(__PYX_DEBUG_ATOMICS)
1684 #warning "Using standard C++ atomics"
1685 #endif
1686#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1687 (__GNUC_MINOR__ > 1 ||\
1688 (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1689 #define __pyx_atomic_ptr_type void*
1690 #define __pyx_nonatomic_ptr_type void*
1691 #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
1692 #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
1693 #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
1694 #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
1695 static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1696 __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
1697 int result = old == *expected;
1698 *expected = old;
1699 return result;
1700 }
1701 #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
1702 #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
1703 #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
1704 #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
1705 #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
1706 static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1707 __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
1708 int result = old == *expected;
1709 *expected = old;
1710 return result;
1711 }
1712 #ifdef __PYX_DEBUG_ATOMICS
1713 #warning "Using GNU atomics"
1714 #endif
1715#elif CYTHON_ATOMICS && defined(_MSC_VER)
1716 #include <intrin.h>
1717 #undef __pyx_atomic_int_type
1718 #define __pyx_atomic_int_type long
1719 #define __pyx_atomic_ptr_type void*
1720 #undef __pyx_nonatomic_int_type
1721 #define __pyx_nonatomic_int_type long
1722 #define __pyx_nonatomic_ptr_type void*
1723 #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
1724 #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
1725 #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
1726 #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
1727 #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
1728 static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
1729 __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
1730 int result = old == *expected;
1731 *expected = old;
1732 return result;
1733 }
1734 #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
1735 #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
1736 #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
1737 #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
1738 #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
1739 static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
1740 __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
1741 int result = old == *expected;
1742 *expected = old;
1743 return result;
1744 }
1745 #ifdef __PYX_DEBUG_ATOMICS
1746 #pragma message ("Using MSVC atomics")
1747 #endif
1748#else
1749 #undef CYTHON_ATOMICS
1750 #define CYTHON_ATOMICS 0
1751 #ifdef __PYX_DEBUG_ATOMICS
1752 #warning "Not using atomics"
1753 #endif
1754#endif
1755
1756/* CriticalSectionsDefinition.proto (used by CriticalSections) */
1757#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1758#define __Pyx_PyCriticalSection void*
1759#define __Pyx_PyCriticalSection2 void*
1760#define __Pyx_PyCriticalSection_End(cs)
1761#define __Pyx_PyCriticalSection2_End(cs)
1762#else
1763#define __Pyx_PyCriticalSection PyCriticalSection
1764#define __Pyx_PyCriticalSection2 PyCriticalSection2
1765#define __Pyx_PyCriticalSection_End PyCriticalSection_End
1766#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
1767#endif
1768
1769/* CriticalSections.proto (used by ParseKeywordsImpl) */
1770#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
1771#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
1772#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
1773#else
1774#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
1775#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
1776#endif
1777#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
1778#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
1779#define __Pyx_END_CRITICAL_SECTION() }
1780#else
1781#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
1782#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
1783#endif
1784
1785/* IncludeStructmemberH.proto (used by CythonFunctionShared) */
1786#include <structmember.h>
1787
1788/* #### Code section: numeric_typedefs ### */
1789
1790/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":761
1791 * # in Cython to enable them only on the right systems.
1792 *
1793 * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1794 * ctypedef npy_int16 int16_t
1795 * ctypedef npy_int32 int32_t
1796*/
1797typedef npy_int8 __pyx_t_5numpy_int8_t;
1798
1799/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":762
1800 *
1801 * ctypedef npy_int8 int8_t
1802 * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1803 * ctypedef npy_int32 int32_t
1804 * ctypedef npy_int64 int64_t
1805*/
1806typedef npy_int16 __pyx_t_5numpy_int16_t;
1807
1808/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":763
1809 * ctypedef npy_int8 int8_t
1810 * ctypedef npy_int16 int16_t
1811 * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1812 * ctypedef npy_int64 int64_t
1813 *
1814*/
1815typedef npy_int32 __pyx_t_5numpy_int32_t;
1816
1817/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":764
1818 * ctypedef npy_int16 int16_t
1819 * ctypedef npy_int32 int32_t
1820 * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1821 *
1822 * ctypedef npy_uint8 uint8_t
1823*/
1824typedef npy_int64 __pyx_t_5numpy_int64_t;
1825
1826/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":766
1827 * ctypedef npy_int64 int64_t
1828 *
1829 * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1830 * ctypedef npy_uint16 uint16_t
1831 * ctypedef npy_uint32 uint32_t
1832*/
1833typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1834
1835/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":767
1836 *
1837 * ctypedef npy_uint8 uint8_t
1838 * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1839 * ctypedef npy_uint32 uint32_t
1840 * ctypedef npy_uint64 uint64_t
1841*/
1842typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1843
1844/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":768
1845 * ctypedef npy_uint8 uint8_t
1846 * ctypedef npy_uint16 uint16_t
1847 * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1848 * ctypedef npy_uint64 uint64_t
1849 *
1850*/
1851typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1852
1853/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":769
1854 * ctypedef npy_uint16 uint16_t
1855 * ctypedef npy_uint32 uint32_t
1856 * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1857 *
1858 * ctypedef npy_float32 float32_t
1859*/
1860typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1861
1862/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":771
1863 * ctypedef npy_uint64 uint64_t
1864 *
1865 * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1866 * ctypedef npy_float64 float64_t
1867 * #ctypedef npy_float80 float80_t
1868*/
1869typedef npy_float32 __pyx_t_5numpy_float32_t;
1870
1871/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":772
1872 *
1873 * ctypedef npy_float32 float32_t
1874 * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1875 * #ctypedef npy_float80 float80_t
1876 * #ctypedef npy_float128 float128_t
1877*/
1878typedef npy_float64 __pyx_t_5numpy_float64_t;
1879
1880/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":779
1881 * ctypedef double complex complex128_t
1882 *
1883 * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1884 * ctypedef npy_ulonglong ulonglong_t
1885 *
1886*/
1887typedef npy_longlong __pyx_t_5numpy_longlong_t;
1888
1889/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":780
1890 *
1891 * ctypedef npy_longlong longlong_t
1892 * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1893 *
1894 * ctypedef npy_intp intp_t
1895*/
1896typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1897
1898/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":782
1899 * ctypedef npy_ulonglong ulonglong_t
1900 *
1901 * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1902 * ctypedef npy_uintp uintp_t
1903 *
1904*/
1905typedef npy_intp __pyx_t_5numpy_intp_t;
1906
1907/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":783
1908 *
1909 * ctypedef npy_intp intp_t
1910 * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1911 *
1912 * ctypedef npy_double float_t
1913*/
1914typedef npy_uintp __pyx_t_5numpy_uintp_t;
1915
1916/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":785
1917 * ctypedef npy_uintp uintp_t
1918 *
1919 * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1920 * ctypedef npy_double double_t
1921 * ctypedef npy_longdouble longdouble_t
1922*/
1923typedef npy_double __pyx_t_5numpy_float_t;
1924
1925/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":786
1926 *
1927 * ctypedef npy_double float_t
1928 * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1929 * ctypedef npy_longdouble longdouble_t
1930 *
1931*/
1932typedef npy_double __pyx_t_5numpy_double_t;
1933
1934/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":787
1935 * ctypedef npy_double float_t
1936 * ctypedef npy_double double_t
1937 * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1938 *
1939 * ctypedef float complex cfloat_t
1940*/
1941typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1942/* #### Code section: complex_type_declarations ### */
1943/* Declarations.proto */
1944#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1945 #ifdef __cplusplus
1946 typedef ::std::complex< float > __pyx_t_float_complex;
1947 #else
1948 typedef float _Complex __pyx_t_float_complex;
1949 #endif
1950#else
1951 typedef struct { float real, imag; } __pyx_t_float_complex;
1952#endif
1953static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1954
1955/* Declarations.proto */
1956#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1957 #ifdef __cplusplus
1958 typedef ::std::complex< double > __pyx_t_double_complex;
1959 #else
1960 typedef double _Complex __pyx_t_double_complex;
1961 #endif
1962#else
1963 typedef struct { double real, imag; } __pyx_t_double_complex;
1964#endif
1965static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1966
1967/* Declarations.proto */
1968#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
1969 #ifdef __cplusplus
1970 typedef ::std::complex< long double > __pyx_t_long_double_complex;
1971 #else
1972 typedef long double _Complex __pyx_t_long_double_complex;
1973 #endif
1974#else
1975 typedef struct { long double real, imag; } __pyx_t_long_double_complex;
1976#endif
1977static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
1978
1979/* #### Code section: type_declarations ### */
1980
1981/*--- Type declarations ---*/
1982/* #### Code section: utility_code_proto ### */
1983
1984/* --- Runtime support code (head) --- */
1985/* Refnanny.proto */
1986#ifndef CYTHON_REFNANNY
1987 #define CYTHON_REFNANNY 0
1988#endif
1989#if CYTHON_REFNANNY
1990 typedef struct {
1991 void (*INCREF)(void*, PyObject*, Py_ssize_t);
1992 void (*DECREF)(void*, PyObject*, Py_ssize_t);
1993 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
1994 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
1995 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
1996 void (*FinishContext)(void**);
1997 } __Pyx_RefNannyAPIStruct;
1998 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1999 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
2000 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
2001 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2002 if (acquire_gil) {\
2003 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2004 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2005 PyGILState_Release(__pyx_gilstate_save);\
2006 } else {\
2007 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
2008 }
2009 #define __Pyx_RefNannyFinishContextNogil() {\
2010 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2011 __Pyx_RefNannyFinishContext();\
2012 PyGILState_Release(__pyx_gilstate_save);\
2013 }
2014 #define __Pyx_RefNannyFinishContextNogil() {\
2015 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2016 __Pyx_RefNannyFinishContext();\
2017 PyGILState_Release(__pyx_gilstate_save);\
2018 }
2019 #define __Pyx_RefNannyFinishContext()\
2020 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
2021 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2022 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2023 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2024 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
2025 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
2026 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
2027 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
2028 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
2029#else
2030 #define __Pyx_RefNannyDeclarations
2031 #define __Pyx_RefNannySetupContext(name, acquire_gil)
2032 #define __Pyx_RefNannyFinishContextNogil()
2033 #define __Pyx_RefNannyFinishContext()
2034 #define __Pyx_INCREF(r) Py_INCREF(r)
2035 #define __Pyx_DECREF(r) Py_DECREF(r)
2036 #define __Pyx_GOTREF(r)
2037 #define __Pyx_GIVEREF(r)
2038 #define __Pyx_XINCREF(r) Py_XINCREF(r)
2039 #define __Pyx_XDECREF(r) Py_XDECREF(r)
2040 #define __Pyx_XGOTREF(r)
2041 #define __Pyx_XGIVEREF(r)
2042#endif
2043#define __Pyx_Py_XDECREF_SET(r, v) do {\
2044 PyObject *tmp = (PyObject *) r;\
2045 r = v; Py_XDECREF(tmp);\
2046 } while (0)
2047#define __Pyx_XDECREF_SET(r, v) do {\
2048 PyObject *tmp = (PyObject *) r;\
2049 r = v; __Pyx_XDECREF(tmp);\
2050 } while (0)
2051#define __Pyx_DECREF_SET(r, v) do {\
2052 PyObject *tmp = (PyObject *) r;\
2053 r = v; __Pyx_DECREF(tmp);\
2054 } while (0)
2055#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
2056#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
2057
2058/* GetTopmostException.proto (used by SaveResetException) */
2059#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
2060static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2061#endif
2062
2063/* PyThreadStateGet.proto (used by SaveResetException) */
2064#if CYTHON_FAST_THREAD_STATE
2065#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
2066#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
2067#if PY_VERSION_HEX >= 0x030C00A6
2068#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
2069#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
2070#else
2071#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
2072#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
2073#endif
2074#else
2075#define __Pyx_PyThreadState_declare
2076#define __Pyx_PyThreadState_assign
2077#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
2078#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
2079#endif
2080
2081/* SaveResetException.proto */
2082#if CYTHON_FAST_THREAD_STATE
2083#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2084static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2085#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2086static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2087#else
2088#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2089#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2090#endif
2091
2092/* FastTypeChecks.proto (used by PyException_Check) */
2093#if CYTHON_COMPILING_IN_CPYTHON
2094#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2095#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
2096static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2097static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
2098#define __Pyx_PyAnySet_Check(obj) __Pyx_TypeCheck2(obj, &PySet_Type, &PyFrozenSet_Type)
2099#else
2100#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2101#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
2102#define __Pyx_PyAnySet_Check(obj) PyAnySet_Check(obj)
2103#endif
2104
2105/* PyException_Check.proto */
2106#define __Pyx_PyExc_Exception_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2107
2108/* PyErrFetchRestore.proto (used by GivenExceptionMatches) */
2109#if CYTHON_FAST_THREAD_STATE
2110#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2111#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2112#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2113#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2114#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2115static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2116static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2117#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
2118#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2119#else
2120#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2121#endif
2122#else
2123#define __Pyx_PyErr_Clear() PyErr_Clear()
2124#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2125#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2126#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2127#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2128#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2129#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2130#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2131#endif
2132
2133/* GivenExceptionMatches.proto (used by PyErrExceptionMatches) */
2134#if CYTHON_COMPILING_IN_CPYTHON
2135static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2136static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2137#else
2138#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2139static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
2140 return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
2141}
2142#endif
2143#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
2144
2145/* PyErrExceptionMatches.proto */
2146#if CYTHON_FAST_THREAD_STATE
2147#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2148static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2149#else
2150#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2151#endif
2152
2153/* GetException.proto */
2154#if CYTHON_FAST_THREAD_STATE
2155#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2156static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2157#else
2158static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2159#endif
2160
2161/* PyImportError_Check.proto */
2162#define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError)
2163
2164/* PyObjectCall.proto (used by PyObjectFastCall) */
2165#if CYTHON_COMPILING_IN_CPYTHON
2166static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2167#else
2168#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2169#endif
2170
2171/* PyObjectCallMethO.proto (used by PyObjectFastCall) */
2172#if CYTHON_COMPILING_IN_CPYTHON
2173static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2174#endif
2175
2176/* PyObjectFastCall.proto */
2177#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
2178static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargsf, PyObject *kwargs);
2179
2180/* RaiseException.export */
2181static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2182
2183/* CopyObjectArray.proto (used by TupleOrListFromArrayImpl) */
2184#if CYTHON_COMPILING_IN_CPYTHON
2185static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length);
2186#endif
2187
2188/* TupleOrListFromArrayImpl.proto (used by TupleFromArray) */
2189#if PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API
2190#define __Pyx_PyTuple_FromArray(src, n) PyTuple_FromArray(src, ((n)<0) ? 0 : (n))
2191#else
2192CYTHON_UNUSED static PyObject *
2193__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
2194#endif
2195
2196/* TupleFromArray.proto (used by fastcall) */
2197
2198
2199/* IncludeStringH.proto (used by PyObjectCompare) */
2200#include <string.h>
2201
2202/* PyObjectCompare.proto (used by UnicodeEquals) */
2203static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2, int pyop);
2204
2205/* UnicodeEquals.proto (used by fastcall) */
2206#define __Pyx_PyUnicode_Equals(s1, s2) __Pyx_PyObject_CompareBoolEq_str_str(s1, s2, Py_EQ)
2207
2208/* fastcall.proto */
2209#if CYTHON_AVOID_BORROWED_REFS
2210 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
2211#elif CYTHON_ASSUME_SAFE_MACROS
2212 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
2213#else
2214 #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
2215#endif
2216#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
2217#define __Pyx_KwValues_VARARGS(args, nargs) NULL
2218#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
2219#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
2220#if CYTHON_VECTORCALL
2221 #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
2222 #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
2223 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
2224 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
2225 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
2226 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
2227 #else
2228 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
2229 #endif
2230#else
2231 #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
2232 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
2233 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
2234 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
2235 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
2236#endif
2237#if CYTHON_VECTORCALL_TPNEW
2238 #if !CYTHON_VECTORCALL
2239 #error Enabling CYTHON_VECTORCALL_TPNEW without CYTHON_VECTORCALL is not supported
2240 #endif
2241 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_FASTCALL
2242 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_FASTCALL
2243 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_FASTCALL
2244 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_FASTCALL
2245 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_FASTCALL
2246#else
2247 #define __Pyx_ArgRef_FASTCALL_TPNEW __Pyx_ArgRef_VARARGS
2248 #define __Pyx_NumKwargs_FASTCALL_TPNEW __Pyx_NumKwargs_VARARGS
2249 #define __Pyx_KwValues_FASTCALL_TPNEW __Pyx_KwValues_VARARGS
2250 #define __Pyx_GetKwValue_FASTCALL_TPNEW __Pyx_GetKwValue_VARARGS
2251 #define __Pyx_KwargsAsDict_FASTCALL_TPNEW __Pyx_KwargsAsDict_VARARGS
2252#endif
2253#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
2254#if CYTHON_VECTORCALL
2255#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
2256#else
2257#define __Pyx_ArgsSlice_FASTCALL __Pyx_ArgsSlice_VARARGS
2258#endif
2259
2260/* py_dict_items.proto (used by OwnedDictNext) */
2261#define __Pyx_PyDict_items_TypePtr (&PyDictKeys_Type)
2262#define __Pyx_PyDict_items_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictItems_TypePtr)
2263#define __Pyx_PyDict_items_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictItems_TypePtr)
2264static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
2265
2266/* CallCFunction.proto (used by CallUnboundCMethod0) */
2267#define __Pyx_CallCFunction(cfunc, self, args)\
2268 ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
2269#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
2270 ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
2271#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
2272 ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
2273#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
2274 ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
2275
2276/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
2277static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2278
2279/* UnpackUnboundCMethod_decl.proto (used by UnpackUnboundCMethod) */
2280typedef struct {
2281 PyObject *type;
2282 PyObject **method_name;
2283 PyCFunction func;
2284 PyObject *method;
2285 int flag;
2286#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
2287 __pyx_atomic_int_type initialized;
2288#endif
2289} __Pyx_CachedCFunction;
2290
2291/* IgnoreException.proto (used by UnpackUnboundCMethod_impl) */
2292static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception);
2293#define __Pyx_IgnoreException(ignorable_exception) __Pyx_IgnoreGivenException(NULL, ignorable_exception)
2294
2295/* PyObjectGetAttrStr.proto (used by UnpackUnboundCMethod_impl) */
2296#if CYTHON_USE_TYPE_SLOTS
2297static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2298#else
2299#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2300#endif
2301
2302/* UnpackUnboundCMethod_impl.export */
2303static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target);
2304
2305/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
2306#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2307static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
2308#if !CYTHON_ATOMICS
2309 return 1;
2310#else
2311 __pyx_nonatomic_int_type expected = 0;
2312 if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
2313 return 0;
2314 }
2315 return expected;
2316#endif
2317}
2318static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
2319#if CYTHON_ATOMICS
2320 __pyx_atomic_store(&cfunc->initialized, 2);
2321#endif
2322}
2323#else
2324#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
2325#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
2326#endif
2327
2328/* CallUnboundCMethod0.proto */
2329CYTHON_UNUSED
2330static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2331#if CYTHON_COMPILING_IN_CPYTHON
2332static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
2333#else
2334#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
2335#endif
2336
2337/* py_dict_values.proto (used by OwnedDictNext) */
2338#define __Pyx_PyDict_values_TypePtr (&PyDictKeys_Type)
2339#define __Pyx_PyDict_values_Check(obj) PyObject_TypeCheck((obj), __Pyx_PyDictValues_TypePtr)
2340#define __Pyx_PyDict_values_CheckExact(obj) Py_IS_TYPE((obj), __Pyx_PyDictValues_TypePtr)
2341static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
2342
2343/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
2344#if CYTHON_AVOID_BORROWED_REFS
2345static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
2346#else
2347CYTHON_INLINE
2348static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
2349#endif
2350
2351/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
2352static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2353
2354/* ParseKeywordsImpl.export */
2355static int __Pyx_ParseKeywordsTuple(
2356 PyObject *kwds,
2357 PyObject * const *kwvalues,
2358 PyObject ** const argnames[],
2359 PyObject *kwds2,
2360 PyObject *values[],
2361 Py_ssize_t num_pos_args,
2362 Py_ssize_t num_kwargs,
2363 const char* function_name,
2364 int ignore_unknown_kwargs
2365);
2366static int __Pyx_ParseKeywordDictToDict(
2367 PyObject *kwds,
2368 PyObject ** const argnames[],
2369 PyObject *kwds2,
2370 PyObject *values[],
2371 Py_ssize_t num_pos_args,
2372 const char* function_name
2373);
2374static int __Pyx_ParseKeywordDict(
2375 PyObject *kwds,
2376 PyObject ** const argnames[],
2377 PyObject *values[],
2378 Py_ssize_t num_pos_args,
2379 Py_ssize_t num_kwargs,
2380 const char* function_name,
2381 int ignore_unknown_kwargs
2382);
2383
2384/* CallUnboundCMethod2.proto */
2385CYTHON_UNUSED
2386static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
2387#if CYTHON_COMPILING_IN_CPYTHON
2388static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
2389#else
2390#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
2391#endif
2392
2393/* ParseKeywords.proto */
2394static CYTHON_INLINE int __Pyx_ParseKeywords(
2395 PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
2396 PyObject *kwds2, PyObject *values[],
2397 Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
2398 const char* function_name,
2399 int ignore_unknown_kwargs
2400);
2401
2402/* RaiseArgTupleInvalid.export */
2403static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2404 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2405
2406/* TypeImport.proto */
2407#ifndef __PYX_HAVE_RT_ImportType_proto_3_3_0
2408#define __PYX_HAVE_RT_ImportType_proto_3_3_0
2409#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
2410#include <stdalign.h>
2411#endif
2412#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
2413#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) alignof(s)
2414#else
2415#define __PYX_GET_STRUCT_ALIGNMENT_3_3_0(s) sizeof(void*)
2416#endif
2417enum __Pyx_ImportType_CheckSize_3_3_0 {
2418 __Pyx_ImportType_CheckSize_Error_3_3_0 = 0,
2419 __Pyx_ImportType_CheckSize_Warn_3_3_0 = 1,
2420 __Pyx_ImportType_CheckSize_Ignore_3_3_0 = 2
2421};
2422static 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);
2423#endif
2424
2425/* PyObjectGetAttrStrNoError.proto (used by HasAttr) */
2426static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2427
2428/* HasAttr.proto (used by ImportImpl) */
2429#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2430#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
2431#else
2432static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2433#endif
2434
2435/* TupleOrListFromArrayImpl.proto (used by ListFromArray) */
2436CYTHON_UNUSED static PyObject *
2437__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
2438
2439/* ListFromArray.proto (used by ImportImpl) */
2440
2441
2442/* ImportImpl.export */
2443static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);
2444
2445/* Import.proto */
2446static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);
2447
2448/* dict_setdefault.proto (used by FetchCommonType) */
2449static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
2450
2451/* AddModuleRef.proto (used by FetchSharedCythonModule) */
2452#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3) ||\
2453 __PYX_LIMITED_VERSION_HEX < 0x030d0000)
2454 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
2455#else
2456 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
2457#endif
2458
2459/* FetchSharedCythonModule.proto (used by FetchCommonType) */
2460static PyObject *__Pyx_FetchSharedCythonABIModule(void);
2461
2462/* VerifyCachedType.proto (used by FetchCommonType) */
2463static int __Pyx_VerifyCachedType(PyObject *cached_type,
2464 const char *name,
2465 Py_ssize_t expected_basicsize);
2466
2467/* FetchCommonType.proto (used by CommonTypesMetaclass) */
2468static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
2469
2470/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
2471static int __pyx_CommonTypesMetaclass_init(PyObject *module);
2472#define __Pyx_CommonTypesMetaclass_USED
2473
2474/* CythonFunctionPerModule.proto (used by CythonFunctionShared) */
2475#define __Pyx_CyFunction_USED
2476#if CYTHON_OPAQUE_SHARED_TYPES
2477#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)PyObject_GetTypeData((o), __pyx_mstate_global->__pyx_CyFunctionType))
2478#else
2479#define __Pyx_as_CyFunctionObject(o) ((__pyx_CyFunctionObject *)o)
2480#endif
2481#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2482#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2483#define __Pyx_CYFUNCTION_CCLASS 0x04
2484#define __Pyx_CYFUNCTION_COROUTINE 0x08
2485#define __Pyx_CyFunction_GetClosure(f)\
2486 ((__Pyx_as_CyFunctionObject(f))->func_closure)
2487#if CYTHON_COMPILING_IN_LIMITED_API
2488 #define __Pyx__CyFunction_GetClassObj(f)\
2489 ((f)->func_classobj)
2490#else
2491 #define __Pyx__CyFunction_GetClassObj(f)\
2492 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
2493#endif
2494#define __Pyx_CyFunction_GetClassObj(f)\
2495 __Pyx__CyFunction_GetClassObj(__Pyx_as_CyFunctionObject(f))
2496#define __Pyx_CyFunction_SetClassObj(f, classobj)\
2497 __Pyx__CyFunction_SetClassObj(__Pyx_as_CyFunctionObject(f), (classobj))
2498#define __Pyx_CyFunction_Defaults(type, f)\
2499 ((type *)((__Pyx_as_CyFunctionObject(f))->defaults))
2500#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2501 (__Pyx_as_CyFunctionObject(f))->defaults_getter = (g)
2502typedef struct {
2503#if CYTHON_COMPILING_IN_LIMITED_API
2504#if !CYTHON_OPAQUE_OBJECTS
2505 PyObject_HEAD
2506#endif
2507 PyMethodDef *func_methoddef;
2508 PyObject *func_module;
2509#else
2510 PyCMethodObject func;
2511#endif
2512#if (CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY) && CYTHON_VECTORCALL
2513 __pyx_vectorcallfunc func_vectorcall;
2514#endif
2515#if CYTHON_COMPILING_IN_LIMITED_API
2516 PyObject *func_weakreflist;
2517#endif
2518#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
2519 PyObject *func_dict;
2520#endif
2521 PyObject *func_name;
2522 PyObject *func_qualname;
2523 PyObject *func_doc;
2524 PyObject *func_globals;
2525 PyObject *func_code;
2526 PyObject *func_closure;
2527#if CYTHON_COMPILING_IN_LIMITED_API
2528 PyObject *func_classobj;
2529#endif
2530 PyObject *defaults;
2531 int flags;
2532 PyObject *defaults_tuple;
2533 PyObject *defaults_kwdict;
2534 PyObject *(*defaults_getter)(PyObject *);
2535 PyObject *func_annotations;
2536#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
2537 PyObject *func_is_coroutine;
2538#endif
2539} __pyx_CyFunctionObject;
2540#undef __Pyx_CyOrPyCFunction_Check
2541#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
2542#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
2543#define __Pyx_CyFunction_CheckExact(obj) Py_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
2544static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
2545#undef __Pyx_IsSameCFunction
2546#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
2547static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
2548static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
2549 PyTypeObject *defaults_type);
2550static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2551 PyObject *tuple);
2552static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2553 PyObject *dict);
2554static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2555 PyObject *dict);
2556static int __pyx_CyFunction_init(PyObject *module);
2557#if CYTHON_VECTORCALL
2558#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
2559#define __Pyx_CyFunction_func_vectorcall(f) ((f)->func_vectorcall)
2560#else
2561#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
2562#endif
2563#endif
2564
2565/* CallTypeTraverse.proto (used by CythonFunctionShared) */
2566#if !CYTHON_USE_TYPE_SPECS
2567#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
2568#else
2569static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
2570#endif
2571
2572/* PyMethodNew.proto (used by CythonFunctionShared) */
2573static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
2574
2575/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
2576#if CYTHON_VECTORCALL
2577static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
2578#endif
2579
2580/* CythonFunctionShared.proto (used by CythonFunction) */
2581static PyObject *__Pyx_CyFunction_Init(PyObject *op_in, PyMethodDef *ml,
2582 int flags, PyObject* qualname,
2583 PyObject *closure,
2584 PyObject *module, PyObject *globals,
2585 PyObject* code);
2586#if CYTHON_VECTORCALL
2587static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2588static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2589static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2590static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2591#endif
2592
2593/* CythonFunction.export */
2594static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2595 int flags, PyObject* qualname,
2596 PyObject *closure,
2597 PyObject *module, PyObject *globals,
2598 PyObject* code);
2599static PyTypeObject *__Pyx_Get_CyFunction_Type(void);
2600
2601/* PyDictVersioning.proto (used by CLineInTraceback) */
2602#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2603#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2604#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2605#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2606 (version_var) = __PYX_GET_DICT_VERSION(dict);\
2607 (cache_var) = (value);
2608#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2609 static PY_UINT64_T __pyx_dict_version = 0;\
2610 static PyObject *__pyx_dict_cached_value = NULL;\
2611 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2612 (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
2613 } else {\
2614 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2615 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2616 }\
2617}
2618static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2619static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2620static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2621#else
2622#define __PYX_GET_DICT_VERSION(dict) (0)
2623#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2624#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2625#endif
2626
2627/* CLineInTraceback.proto (used by AddTraceback) */
2628#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
2629static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2630#else
2631#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2632#endif
2633
2634/* CodeObjectCache.proto (used by AddTraceback) */
2635#if CYTHON_COMPILING_IN_LIMITED_API
2636typedef PyObject __Pyx_CachedCodeObjectType;
2637#else
2638typedef PyCodeObject __Pyx_CachedCodeObjectType;
2639#endif
2640typedef struct {
2641 __Pyx_CachedCodeObjectType* code_object;
2642 int code_line;
2643} __Pyx_CodeObjectCacheEntry;
2644struct __Pyx_CodeObjectCache {
2645 int count;
2646 int max_count;
2647 __Pyx_CodeObjectCacheEntry* entries;
2648 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
2649 __pyx_atomic_int_type accessor_count;
2650 #endif
2651};
2652static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2653static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
2654static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);
2655
2656/* AddTraceback.proto */
2657static void __Pyx_AddTraceback(const char *funcname, int c_line,
2658 int py_line, const char *filename);
2659
2660/* RealImag.proto */
2661#if CYTHON_CCOMPLEX
2662 #ifdef __cplusplus
2663 #define __Pyx_CREAL(z) ((z).real())
2664 #define __Pyx_CIMAG(z) ((z).imag())
2665 #else
2666 #define __Pyx_CREAL(z) (__real__(z))
2667 #define __Pyx_CIMAG(z) (__imag__(z))
2668 #endif
2669#else
2670 #define __Pyx_CREAL(z) ((z).real)
2671 #define __Pyx_CIMAG(z) ((z).imag)
2672#endif
2673#if defined(__cplusplus) && CYTHON_CCOMPLEX\
2674 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2675 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2676 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2677#else
2678 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2679 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2680#endif
2681
2682/* Arithmetic.proto */
2683#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2684 #define __Pyx_c_eq_float(a, b) ((a)==(b))
2685 #define __Pyx_c_sum_float(a, b) ((a)+(b))
2686 #define __Pyx_c_diff_float(a, b) ((a)-(b))
2687 #define __Pyx_c_prod_float(a, b) ((a)*(b))
2688 #define __Pyx_c_quot_float(a, b) ((a)/(b))
2689 #define __Pyx_c_neg_float(a) (-(a))
2690 #ifdef __cplusplus
2691 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2692 #define __Pyx_c_conj_float(z) (::std::conj(z))
2693 #if 1
2694 #define __Pyx_c_abs_float(z) (::std::abs(z))
2695 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2696 #endif
2697 #else
2698 #define __Pyx_c_is_zero_float(z) ((z)==0)
2699 #define __Pyx_c_conj_float(z) (conjf(z))
2700 #if 1
2701 #define __Pyx_c_abs_float(z) (cabsf(z))
2702 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2703 #endif
2704 #endif
2705#else
2706 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2707 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2708 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2709 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2710 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2711 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2712 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2713 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2714 #if 1
2715 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2716 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2717 #endif
2718#endif
2719
2720/* Arithmetic.proto */
2721#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2722 #define __Pyx_c_eq_double(a, b) ((a)==(b))
2723 #define __Pyx_c_sum_double(a, b) ((a)+(b))
2724 #define __Pyx_c_diff_double(a, b) ((a)-(b))
2725 #define __Pyx_c_prod_double(a, b) ((a)*(b))
2726 #define __Pyx_c_quot_double(a, b) ((a)/(b))
2727 #define __Pyx_c_neg_double(a) (-(a))
2728 #ifdef __cplusplus
2729 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2730 #define __Pyx_c_conj_double(z) (::std::conj(z))
2731 #if 1
2732 #define __Pyx_c_abs_double(z) (::std::abs(z))
2733 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2734 #endif
2735 #else
2736 #define __Pyx_c_is_zero_double(z) ((z)==0)
2737 #define __Pyx_c_conj_double(z) (conj(z))
2738 #if 1
2739 #define __Pyx_c_abs_double(z) (cabs(z))
2740 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2741 #endif
2742 #endif
2743#else
2744 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2745 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2746 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2747 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2748 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2749 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2750 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2751 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2752 #if 1
2753 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2754 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2755 #endif
2756#endif
2757
2758/* Arithmetic.proto */
2759#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
2760 #define __Pyx_c_eq_long__double(a, b) ((a)==(b))
2761 #define __Pyx_c_sum_long__double(a, b) ((a)+(b))
2762 #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
2763 #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
2764 #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
2765 #define __Pyx_c_neg_long__double(a) (-(a))
2766 #ifdef __cplusplus
2767 #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
2768 #define __Pyx_c_conj_long__double(z) (::std::conj(z))
2769 #if 1
2770 #define __Pyx_c_abs_long__double(z) (::std::abs(z))
2771 #define __Pyx_c_pow_long__double(a, b) (::std::pow(a, b))
2772 #endif
2773 #else
2774 #define __Pyx_c_is_zero_long__double(z) ((z)==0)
2775 #define __Pyx_c_conj_long__double(z) (conjl(z))
2776 #if 1
2777 #define __Pyx_c_abs_long__double(z) (cabsl(z))
2778 #define __Pyx_c_pow_long__double(a, b) (cpowl(a, b))
2779 #endif
2780 #endif
2781#else
2782 static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2783 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2784 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2785 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2786 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2787 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
2788 static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
2789 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
2790 #if 1
2791 static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
2792 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
2793 #endif
2794#endif
2795
2796/* FormatTypeName.proto */
2797#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030d0000
2798typedef PyObject *__Pyx_TypeName;
2799#define __Pyx_FMT_TYPENAME "%N"
2800#define __Pyx_PyType_GetFullyQualifiedName(tp) Py_NewRef((PyObject*)tp)
2801#define __Pyx_DECREF_TypeName(obj) Py_DECREF(obj)
2802#elif CYTHON_COMPILING_IN_LIMITED_API
2803typedef PyObject *__Pyx_TypeName;
2804#define __Pyx_FMT_TYPENAME "%U"
2805#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
2806static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
2807#else // !LIMITED_API
2808typedef const char *__Pyx_TypeName;
2809#define __Pyx_FMT_TYPENAME "%.200s"
2810#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
2811#define __Pyx_DECREF_TypeName(obj)
2812#endif
2813
2814/* GCCDiagnostics.proto (used by CIntToPy) */
2815#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2816#define __Pyx_HAS_GCC_DIAGNOSTIC
2817#endif
2818
2819/* PyObjectVectorcallKwds.proto (used by PyObjectVectorcallMethodKwds) */
2820#if CYTHON_VECTORCALL
2821#define __Pyx_Object_VectorcallKwds PyObject_Vectorcall
2822CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i);
2823#else
2824#define __Pyx_Object_VectorcallKwds __Pyx_PyObject_FastCallDict
2825CYTHON_UNUSED static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t n);
2826CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i);
2827#endif
2828
2829/* PyObjectVectorcallMethodKwds.proto (used by CIntToPy) */
2830#if CYTHON_VECTORCALL
2831#define __Pyx_Object_VectorcallMethodKwds PyObject_VectorcallMethod
2832#else
2833static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
2834#endif
2835
2836/* CIntToPy.proto */
2837static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);
2838
2839/* CIntFromPy.proto */
2840static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);
2841
2842/* CIntFromPy.proto */
2843static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);
2844
2845/* GetRuntimeVersion.proto */
2846#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
2847static unsigned long __Pyx_cached_runtime_version = 0;
2848static void __Pyx_init_runtime_version(void);
2849#else
2850#define __Pyx_init_runtime_version()
2851#endif
2852static unsigned long __Pyx_get_runtime_version(void);
2853
2854/* CheckBinaryVersion.proto */
2855static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
2856
2857/* DecompressString.proto */
2858static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);
2859
2860/* MultiPhaseInitModuleState.proto */
2861#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
2862#include <stdlib.h>
2863static PyObject *__Pyx_State_FindModule(void*);
2864static int __Pyx_State_AddModule(PyObject* module, void*);
2865static int __Pyx_State_RemoveModule(void*);
2866#elif CYTHON_USE_MODULE_STATE
2867#define __Pyx_State_FindModule PyState_FindModule
2868#define __Pyx_State_AddModule PyState_AddModule
2869#define __Pyx_State_RemoveModule PyState_RemoveModule
2870#endif
2871
2872/* #### Code section: module_declarations ### */
2873/* CythonABIVersion.proto */
2874#if CYTHON_COMPILING_IN_LIMITED_API
2875 #if CYTHON_VECTORCALL
2876 #define __PYX_VECTORCALL_ABI_SUFFIX "_vectorcall"
2877 #else
2878 #define __PYX_VECTORCALL_ABI_SUFFIX
2879 #endif
2880 #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_VECTORCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
2881#else
2882 #define __PYX_LIMITED_ABI_SUFFIX
2883#endif
2884#if __PYX_HAS_PY_AM_SEND == 1
2885 #define __PYX_AM_SEND_ABI_SUFFIX
2886#elif __PYX_HAS_PY_AM_SEND == 2
2887 #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
2888#else
2889 #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
2890#endif
2891#ifndef __PYX_MONITORING_ABI_SUFFIX
2892 #define __PYX_MONITORING_ABI_SUFFIX
2893#endif
2894#if CYTHON_USE_TP_FINALIZE
2895 #define __PYX_TP_FINALIZE_ABI_SUFFIX
2896#else
2897 #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
2898#endif
2899#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
2900 #define __PYX_FREELISTS_ABI_SUFFIX
2901#else
2902 #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
2903#endif
2904#if CYTHON_OPAQUE_OBJECTS && CYTHON_COMPILING_IN_LIMITED_API
2905 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX "opaque"
2906#else
2907 #define __PYX_OPAQUE_OBJECTS_ABI_SUFFIX
2908#endif
2909#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
2910#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
2911#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
2912
2913static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2914static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2915static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2916static CYTHON_INLINE char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2917static CYTHON_INLINE int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2918static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2919static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2920static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2921static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2922static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2923static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self); /* proto*/
2924static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2925static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2926static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2927static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2928static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2929static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
2930static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self); /* proto*/
2931static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self); /* proto*/
2932static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self); /* proto*/
2933static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self); /* proto*/
2934static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self); /* proto*/
2935static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self); /* proto*/
2936static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self); /* proto*/
2937static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2938static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2939static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2940static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2941static CYTHON_INLINE void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2942static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2943static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2944static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2945static CYTHON_INLINE void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2946static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2947static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self); /* proto*/
2948
2949/* Module declarations from "libc.string" */
2950
2951/* Module declarations from "libc.stdio" */
2952
2953/* Module declarations from "__builtin__" */
2954
2955/* Module declarations from "cpython.type" */
2956
2957/* Module declarations from "cpython" */
2958
2959/* Module declarations from "cpython.object" */
2960
2961/* Module declarations from "cpython.ref" */
2962
2963/* Module declarations from "numpy" */
2964
2965/* Module declarations from "numpy" */
2966
2967/* Module declarations from "pskRelations" */
2968
2969/* Module declarations from "cpskRelations" */
2970/* #### Code section: typeinfo ### */
2971/* #### Code section: before_global_var ### */
2972#define __Pyx_MODULE_NAME "cpskRelations"
2973extern int __pyx_module_is_main_cpskRelations;
2974int __pyx_module_is_main_cpskRelations = 0;
2975
2976/* Implementation of "cpskRelations" */
2977/* #### Code section: global_var ### */
2978/* #### Code section: string_decls ### */
2979/* #### Code section: decls ### */
2980static PyObject *__pyx_pf_13cpskRelations_vgm_cal_from_sw(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_Sw, double __pyx_v_sw_min, double __pyx_v_sw_max, double __pyx_v_alpha, double __pyx_v_m, double __pyx_v_eps_small, double __pyx_v_ns_del); /* proto */
2981static PyObject *__pyx_pf_13cpskRelations_2vgm_calc_from_psic(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_psic, double __pyx_v_sw_min, double __pyx_v_sw_max, double __pyx_v_alpha, double __pyx_v_m, double __pyx_v_eps_small, double __pyx_v_ns_del); /* proto */
2982/* #### Code section: late_includes ### */
2983/* #### Code section: module_state ### */
2984/* SmallCodeConfig */
2985#ifndef CYTHON_SMALL_CODE
2986#if defined(__clang__)
2987 #define CYTHON_SMALL_CODE
2988#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
2989 #define CYTHON_SMALL_CODE __attribute__((cold))
2990#else
2991 #define CYTHON_SMALL_CODE
2992#endif
2993#endif
2994
2995#ifdef __cplusplus
2996namespace {
2997 #endif
2998 typedef struct {
2999 PyObject *__pyx_d;
3000 PyObject *__pyx_b;
3001 PyObject *__pyx_cython_runtime;
3002 PyObject *__pyx_empty_tuple;
3003 PyObject *__pyx_empty_bytes;
3004 PyObject *__pyx_empty_unicode;
3005 PyTypeObject *__pyx_ptype_7cpython_4type_type;
3006 PyTypeObject *__pyx_ptype_5numpy_dtype;
3007 PyTypeObject *__pyx_ptype_5numpy_flatiter;
3008 PyTypeObject *__pyx_ptype_5numpy_broadcast;
3009 PyTypeObject *__pyx_ptype_5numpy_ndarray;
3010 PyTypeObject *__pyx_ptype_5numpy_generic;
3011 PyTypeObject *__pyx_ptype_5numpy_number;
3012 PyTypeObject *__pyx_ptype_5numpy_integer;
3013 PyTypeObject *__pyx_ptype_5numpy_signedinteger;
3014 PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
3015 PyTypeObject *__pyx_ptype_5numpy_inexact;
3016 PyTypeObject *__pyx_ptype_5numpy_floating;
3017 PyTypeObject *__pyx_ptype_5numpy_complexfloating;
3018 PyTypeObject *__pyx_ptype_5numpy_flexible;
3019 PyTypeObject *__pyx_ptype_5numpy_character;
3020 PyTypeObject *__pyx_ptype_5numpy_ufunc;
3021 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
3022 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
3023 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
3024 PyObject *__pyx_codeobj_tab[2];
3025 PyObject *__pyx_string_tab[37];
3026/* #### Code section: module_state_contents ### */
3027/* CommonTypesMetaclass.module_state_decls */
3028PyTypeObject *__pyx_CommonTypesMetaclassType;
3029
3030/* CachedMethodType.module_state_decls */
3031#if CYTHON_COMPILING_IN_LIMITED_API
3032PyObject *__Pyx_CachedMethodType;
3033#endif
3034
3035/* CythonFunctionPerModule.module_state_decls */
3036PyTypeObject *__pyx_CyFunctionType;
3037
3038/* CodeObjectCache.module_state_decls */
3039struct __Pyx_CodeObjectCache __pyx_code_cache;
3040
3041/* #### Code section: module_state_end ### */
3042} __pyx_mstatetype;
3043#ifdef __cplusplus
3044} /* anonymous namespace */
3045#endif
3046
3047#if CYTHON_USE_MODULE_STATE
3048#ifdef __cplusplus
3049namespace {
3050extern struct PyModuleDef __pyx_moduledef;
3051} /* anonymous namespace */
3052#else
3053static struct PyModuleDef __pyx_moduledef;
3054#endif
3055
3056#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
3057
3058#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
3059#else
3060static __pyx_mstatetype __pyx_mstate_global_static =
3061#ifdef __cplusplus
3062 {};
3063#else
3064 {0};
3065#endif
3066static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
3067#endif
3068/* #### Code section: constant_name_defines ### */
3069#define __pyx_kp_u_ __pyx_string_tab[0]
3070#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[1]
3071#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[2]
3072#define __pyx_kp_u_proteus_cpskRelations_pyx __pyx_string_tab[3]
3073#define __pyx_n_u_Sw __pyx_string_tab[4]
3074#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[5]
3075#define __pyx_n_u_annotate __pyx_string_tab[6]
3076#define __pyx_n_u_func __pyx_string_tab[7]
3077#define __pyx_n_u_main __pyx_string_tab[8]
3078#define __pyx_n_u_module __pyx_string_tab[9]
3079#define __pyx_n_u_name __pyx_string_tab[10]
3080#define __pyx_n_u_qualname __pyx_string_tab[11]
3081#define __pyx_n_u_test __pyx_string_tab[12]
3082#define __pyx_n_u_is_coroutine __pyx_string_tab[13]
3083#define __pyx_n_u_alpha __pyx_string_tab[14]
3084#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[15]
3085#define __pyx_n_u_cline_in_traceback __pyx_string_tab[16]
3086#define __pyx_n_u_cpskRelations __pyx_string_tab[17]
3087#define __pyx_n_u_eps_small __pyx_string_tab[18]
3088#define __pyx_n_u_items __pyx_string_tab[19]
3089#define __pyx_n_u_m __pyx_string_tab[20]
3090#define __pyx_n_u_np __pyx_string_tab[21]
3091#define __pyx_n_u_ns_del __pyx_string_tab[22]
3092#define __pyx_n_u_numpy __pyx_string_tab[23]
3093#define __pyx_n_u_pop __pyx_string_tab[24]
3094#define __pyx_n_u_psic __pyx_string_tab[25]
3095#define __pyx_n_u_psk __pyx_string_tab[26]
3096#define __pyx_n_u_rwork __pyx_string_tab[27]
3097#define __pyx_n_u_rwork_tol __pyx_string_tab[28]
3098#define __pyx_n_u_setdefault __pyx_string_tab[29]
3099#define __pyx_n_u_sw_max __pyx_string_tab[30]
3100#define __pyx_n_u_sw_min __pyx_string_tab[31]
3101#define __pyx_n_u_values __pyx_string_tab[32]
3102#define __pyx_n_u_vgm_cal_from_sw __pyx_string_tab[33]
3103#define __pyx_n_u_vgm_calc_from_psic __pyx_string_tab[34]
3104#define __pyx_kp_b_iso88591_Q_Q_Q_Q_Qc_Qc_D_Qa_uAQ_CvS_S_S __pyx_string_tab[35]
3105#define __pyx_kp_b_iso88591_Q_Q_Q_Q_Qc_Qc_D_Qa_aq_Ct3e3e3k __pyx_string_tab[36]
3106/* #### Code section: module_state_clear ### */
3107#if CYTHON_USE_MODULE_STATE
3108static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
3109 __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
3110 if (!clear_module_state) return 0;
3111 Py_CLEAR(clear_module_state->__pyx_d);
3112 Py_CLEAR(clear_module_state->__pyx_b);
3113 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
3114 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
3115 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
3116 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
3117 #if CYTHON_PEP489_MULTI_PHASE_INIT
3118 __Pyx_State_RemoveModule(NULL);
3119 #endif
3120 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
3121 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
3122 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
3123 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
3124 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
3125 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
3126 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
3127 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
3128 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
3129 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
3130 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
3131 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
3132 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
3133 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
3134 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
3135 Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
3136 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_items.method);
3137 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_pop.method);
3138 Py_CLEAR(clear_module_state->__pyx_umethod_PyDict_Type_values.method);
3139 for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
3140 for (int i=0; i<37; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
3141/* #### Code section: module_state_clear_contents ### */
3142/* CommonTypesMetaclass.module_state_clear */
3143Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
3144
3145/* CythonFunctionPerModule.module_state_clear */
3146Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
3147
3148/* #### Code section: module_state_clear_end ### */
3149return 0;
3150}
3151#endif
3152/* #### Code section: module_state_traverse ### */
3153#if CYTHON_USE_MODULE_STATE
3154static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3155 __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
3156 if (!traverse_module_state) return 0;
3157 Py_VISIT(traverse_module_state->__pyx_d);
3158 Py_VISIT(traverse_module_state->__pyx_b);
3159 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
3160 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
3161 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
3162 __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
3163 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
3164 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
3165 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
3166 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
3167 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
3168 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
3169 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
3170 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
3171 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
3172 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
3173 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
3174 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
3175 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
3176 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
3177 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
3178 Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
3179 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_items.method);
3180 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_pop.method);
3181 Py_VISIT(traverse_module_state->__pyx_umethod_PyDict_Type_values.method);
3182 for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
3183 for (int i=0; i<37; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
3184/* #### Code section: module_state_traverse_contents ### */
3185/* CommonTypesMetaclass.module_state_traverse */
3186Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
3187
3188/* CythonFunctionPerModule.module_state_traverse */
3189Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
3190
3191/* #### Code section: module_state_traverse_end ### */
3192return 0;
3193}
3194#endif
3195/* #### Code section: module_code ### */
3196
3197/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":230
3198 *
3199 * ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
3200 * @property # <<<<<<<<<<<<<<
3201 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3202 * return PyDataType_TYPEOBJ(self)
3203*/
3204
3205static CYTHON_INLINE PyTypeObject *__pyx_f_5numpy_5dtype_7typeobj___get__(PyArray_Descr *__pyx_v_self) {
3206 PyTypeObject *__pyx_r;
3207
3208 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":232
3209 * @property
3210 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3211 * return PyDataType_TYPEOBJ(self) # <<<<<<<<<<<<<<
3212 *
3213 * @property
3214*/
3215 {
3216
3217 __pyx_r = PyDataType_TYPEOBJ(__pyx_v_self);
3218 }
3219 goto __pyx_L0;
3220
3221 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":230
3222 *
3223 * ctypedef class numpy.dtype [object PyArray_Descr, check_size ignore]:
3224 * @property # <<<<<<<<<<<<<<
3225 * cdef inline PyTypeObject* typeobj(self) noexcept nogil:
3226 * return PyDataType_TYPEOBJ(self)
3227*/
3228
3229 /* function exit code */
3230 __pyx_L0:;
3231 return __pyx_r;
3232}
3233
3234/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":234
3235 * return PyDataType_TYPEOBJ(self)
3236 *
3237 * @property # <<<<<<<<<<<<<<
3238 * cdef inline char kind(self) noexcept nogil:
3239 * return PyDataType_KIND(self)
3240*/
3241
3242static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4kind___get__(PyArray_Descr *__pyx_v_self) {
3243 char __pyx_r;
3244
3245 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":236
3246 * @property
3247 * cdef inline char kind(self) noexcept nogil:
3248 * return PyDataType_KIND(self) # <<<<<<<<<<<<<<
3249 *
3250 * @property
3251*/
3252 {
3253
3254 __pyx_r = PyDataType_KIND(__pyx_v_self);
3255 }
3256 goto __pyx_L0;
3257
3258 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":234
3259 * return PyDataType_TYPEOBJ(self)
3260 *
3261 * @property # <<<<<<<<<<<<<<
3262 * cdef inline char kind(self) noexcept nogil:
3263 * return PyDataType_KIND(self)
3264*/
3265
3266 /* function exit code */
3267 __pyx_L0:;
3268 return __pyx_r;
3269}
3270
3271/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":238
3272 * return PyDataType_KIND(self)
3273 *
3274 * @property # <<<<<<<<<<<<<<
3275 * cdef inline char type(self) noexcept nogil:
3276 * return PyDataType_TYPE(self)
3277*/
3278
3279static CYTHON_INLINE char __pyx_f_5numpy_5dtype_4type___get__(PyArray_Descr *__pyx_v_self) {
3280 char __pyx_r;
3281
3282 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":240
3283 * @property
3284 * cdef inline char type(self) noexcept nogil:
3285 * return PyDataType_TYPE(self) # <<<<<<<<<<<<<<
3286 *
3287 * # Numpy sometimes mutates this without warning (e.g. it'll
3288*/
3289 {
3290
3291 __pyx_r = PyDataType_TYPE(__pyx_v_self);
3292 }
3293 goto __pyx_L0;
3294
3295 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":238
3296 * return PyDataType_KIND(self)
3297 *
3298 * @property # <<<<<<<<<<<<<<
3299 * cdef inline char type(self) noexcept nogil:
3300 * return PyDataType_TYPE(self)
3301*/
3302
3303 /* function exit code */
3304 __pyx_L0:;
3305 return __pyx_r;
3306}
3307
3308/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":247
3309 * # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
3310 * # directly accessing this field.
3311 * @property # <<<<<<<<<<<<<<
3312 * cdef inline char byteorder(self) noexcept nogil:
3313 * return PyDataType_BYTEORDER(self)
3314*/
3315
3316static CYTHON_INLINE char __pyx_f_5numpy_5dtype_9byteorder___get__(PyArray_Descr *__pyx_v_self) {
3317 char __pyx_r;
3318
3319 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":249
3320 * @property
3321 * cdef inline char byteorder(self) noexcept nogil:
3322 * return PyDataType_BYTEORDER(self) # <<<<<<<<<<<<<<
3323 *
3324 * @property
3325*/
3326 {
3327
3328 __pyx_r = PyDataType_BYTEORDER(__pyx_v_self);
3329 }
3330 goto __pyx_L0;
3331
3332 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":247
3333 * # PyArray_IsNativeByteOrder(dtype.byteorder) instead of
3334 * # directly accessing this field.
3335 * @property # <<<<<<<<<<<<<<
3336 * cdef inline char byteorder(self) noexcept nogil:
3337 * return PyDataType_BYTEORDER(self)
3338*/
3339
3340 /* function exit code */
3341 __pyx_L0:;
3342 return __pyx_r;
3343}
3344
3345/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":251
3346 * return PyDataType_BYTEORDER(self)
3347 *
3348 * @property # <<<<<<<<<<<<<<
3349 * cdef inline int type_num(self) noexcept nogil:
3350 * return PyDataType_TYPENUM(self)
3351*/
3352
3353static CYTHON_INLINE int __pyx_f_5numpy_5dtype_8type_num___get__(PyArray_Descr *__pyx_v_self) {
3354 int __pyx_r;
3355
3356 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":253
3357 * @property
3358 * cdef inline int type_num(self) noexcept nogil:
3359 * return PyDataType_TYPENUM(self) # <<<<<<<<<<<<<<
3360 *
3361 * @property
3362*/
3363 {
3364
3365 __pyx_r = PyDataType_TYPENUM(__pyx_v_self);
3366 }
3367 goto __pyx_L0;
3368
3369 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":251
3370 * return PyDataType_BYTEORDER(self)
3371 *
3372 * @property # <<<<<<<<<<<<<<
3373 * cdef inline int type_num(self) noexcept nogil:
3374 * return PyDataType_TYPENUM(self)
3375*/
3376
3377 /* function exit code */
3378 __pyx_L0:;
3379 return __pyx_r;
3380}
3381
3382/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":255
3383 * return PyDataType_TYPENUM(self)
3384 *
3385 * @property # <<<<<<<<<<<<<<
3386 * cdef inline npy_intp itemsize(self) noexcept nogil:
3387 * return PyDataType_ELSIZE(self)
3388*/
3389
3390static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize___get__(PyArray_Descr *__pyx_v_self) {
3391 npy_intp __pyx_r;
3392
3393 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":257
3394 * @property
3395 * cdef inline npy_intp itemsize(self) noexcept nogil:
3396 * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<<
3397 *
3398 * @property
3399*/
3400 {
3401
3402 __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
3403 }
3404 goto __pyx_L0;
3405
3406 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":255
3407 * return PyDataType_TYPENUM(self)
3408 *
3409 * @property # <<<<<<<<<<<<<<
3410 * cdef inline npy_intp itemsize(self) noexcept nogil:
3411 * return PyDataType_ELSIZE(self)
3412*/
3413
3414 /* function exit code */
3415 __pyx_L0:;
3416 return __pyx_r;
3417}
3418
3419/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":259
3420 * return PyDataType_ELSIZE(self)
3421 *
3422 * @property # <<<<<<<<<<<<<<
3423 * cdef inline npy_intp alignment(self) noexcept nogil:
3424 * return PyDataType_ALIGNMENT(self)
3425*/
3426
3427static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment___get__(PyArray_Descr *__pyx_v_self) {
3428 npy_intp __pyx_r;
3429
3430 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":261
3431 * @property
3432 * cdef inline npy_intp alignment(self) noexcept nogil:
3433 * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<<
3434 *
3435 * # Use fields/names with care as they may be NULL. You must check
3436*/
3437 {
3438
3439 __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
3440 }
3441 goto __pyx_L0;
3442
3443 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":259
3444 * return PyDataType_ELSIZE(self)
3445 *
3446 * @property # <<<<<<<<<<<<<<
3447 * cdef inline npy_intp alignment(self) noexcept nogil:
3448 * return PyDataType_ALIGNMENT(self)
3449*/
3450
3451 /* function exit code */
3452 __pyx_L0:;
3453 return __pyx_r;
3454}
3455
3456/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":265
3457 * # Use fields/names with care as they may be NULL. You must check
3458 * # for this using PyDataType_HASFIELDS.
3459 * @property # <<<<<<<<<<<<<<
3460 * cdef inline object fields(self):
3461 * return <object>PyDataType_FIELDS(self)
3462*/
3463
3464static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields___get__(PyArray_Descr *__pyx_v_self) {
3465 PyObject *__pyx_r = NULL;
3466 __Pyx_RefNannyDeclarations
3467 PyObject *__pyx_t_1;
3468 __Pyx_RefNannySetupContext("__get__", 0);
3469
3470 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":267
3471 * @property
3472 * cdef inline object fields(self):
3473 * return <object>PyDataType_FIELDS(self) # <<<<<<<<<<<<<<
3474 *
3475 * @property
3476*/
3477 __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
3478
3479 {
3480 PyObject *__pyx_temp;
3481 {
3482 __pyx_temp = __pyx_r;
3483 __Pyx_INCREF(((PyObject *)__pyx_t_1));
3484 __pyx_r = ((PyObject *)__pyx_t_1);
3485 }
3486 __Pyx_XDECREF(__pyx_temp);
3487 }
3488
3489 goto __pyx_L0;
3490
3491 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":265
3492 * # Use fields/names with care as they may be NULL. You must check
3493 * # for this using PyDataType_HASFIELDS.
3494 * @property # <<<<<<<<<<<<<<
3495 * cdef inline object fields(self):
3496 * return <object>PyDataType_FIELDS(self)
3497*/
3498
3499 /* function exit code */
3500 __pyx_L0:;
3501 __Pyx_XGIVEREF(__pyx_r);
3502 __Pyx_RefNannyFinishContext();
3503 return __pyx_r;
3504}
3505
3506/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":269
3507 * return <object>PyDataType_FIELDS(self)
3508 *
3509 * @property # <<<<<<<<<<<<<<
3510 * cdef inline tuple names(self):
3511 * return <tuple>PyDataType_NAMES(self)
3512*/
3513
3514static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names___get__(PyArray_Descr *__pyx_v_self) {
3515 PyObject *__pyx_r = NULL;
3516 __Pyx_RefNannyDeclarations
3517 PyObject *__pyx_t_1;
3518 __Pyx_RefNannySetupContext("__get__", 0);
3519
3520 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":271
3521 * @property
3522 * cdef inline tuple names(self):
3523 * return <tuple>PyDataType_NAMES(self) # <<<<<<<<<<<<<<
3524 *
3525 * # Use PyDataType_HASSUBARRAY to test whether this field is
3526*/
3527 __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
3528
3529 {
3530 PyObject *__pyx_temp;
3531 {
3532 __pyx_temp = __pyx_r;
3533 __Pyx_INCREF(((PyObject*)__pyx_t_1));
3534 __pyx_r = ((PyObject*)__pyx_t_1);
3535 }
3536 __Pyx_XDECREF(__pyx_temp);
3537 }
3538
3539 goto __pyx_L0;
3540
3541 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":269
3542 * return <object>PyDataType_FIELDS(self)
3543 *
3544 * @property # <<<<<<<<<<<<<<
3545 * cdef inline tuple names(self):
3546 * return <tuple>PyDataType_NAMES(self)
3547*/
3548
3549 /* function exit code */
3550 __pyx_L0:;
3551 __Pyx_XGIVEREF(__pyx_r);
3552 __Pyx_RefNannyFinishContext();
3553 return __pyx_r;
3554}
3555
3556/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":276
3557 * # valid (the pointer can be NULL). Most users should access
3558 * # this field via the inline helper method PyDataType_SHAPE.
3559 * @property # <<<<<<<<<<<<<<
3560 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3561 * return PyDataType_SUBARRAY(self)
3562*/
3563
3564static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray___get__(PyArray_Descr *__pyx_v_self) {
3565 PyArray_ArrayDescr *__pyx_r;
3566
3567 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":278
3568 * @property
3569 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3570 * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<<
3571 *
3572 * @property
3573*/
3574 {
3575
3576 __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
3577 }
3578 goto __pyx_L0;
3579
3580 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":276
3581 * # valid (the pointer can be NULL). Most users should access
3582 * # this field via the inline helper method PyDataType_SHAPE.
3583 * @property # <<<<<<<<<<<<<<
3584 * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
3585 * return PyDataType_SUBARRAY(self)
3586*/
3587
3588 /* function exit code */
3589 __pyx_L0:;
3590 return __pyx_r;
3591}
3592
3593/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":280
3594 * return PyDataType_SUBARRAY(self)
3595 *
3596 * @property # <<<<<<<<<<<<<<
3597 * cdef inline npy_uint64 flags(self) noexcept nogil:
3598 * """The data types flags."""
3599*/
3600
3601static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags___get__(PyArray_Descr *__pyx_v_self) {
3602 npy_uint64 __pyx_r;
3603
3604 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":283
3605 * cdef inline npy_uint64 flags(self) noexcept nogil:
3606 * """The data types flags."""
3607 * return PyDataType_FLAGS(self) # <<<<<<<<<<<<<<
3608 *
3609 *
3610*/
3611 {
3612
3613 __pyx_r = PyDataType_FLAGS(__pyx_v_self);
3614 }
3615 goto __pyx_L0;
3616
3617 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":280
3618 * return PyDataType_SUBARRAY(self)
3619 *
3620 * @property # <<<<<<<<<<<<<<
3621 * cdef inline npy_uint64 flags(self) noexcept nogil:
3622 * """The data types flags."""
3623*/
3624
3625 /* function exit code */
3626 __pyx_L0:;
3627 return __pyx_r;
3628}
3629
3630/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":292
3631 * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
3632 *
3633 * @property # <<<<<<<<<<<<<<
3634 * cdef inline int numiter(self) noexcept nogil:
3635 * """The number of arrays that need to be broadcast to the same shape."""
3636*/
3637
3638static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter___get__(PyArrayMultiIterObject *__pyx_v_self) {
3639 int __pyx_r;
3640
3641 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":295
3642 * cdef inline int numiter(self) noexcept nogil:
3643 * """The number of arrays that need to be broadcast to the same shape."""
3644 * return PyArray_MultiIter_NUMITER(self) # <<<<<<<<<<<<<<
3645 *
3646 * @property
3647*/
3648 {
3649
3650 __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
3651 }
3652 goto __pyx_L0;
3653
3654 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":292
3655 * ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
3656 *
3657 * @property # <<<<<<<<<<<<<<
3658 * cdef inline int numiter(self) noexcept nogil:
3659 * """The number of arrays that need to be broadcast to the same shape."""
3660*/
3661
3662 /* function exit code */
3663 __pyx_L0:;
3664 return __pyx_r;
3665}
3666
3667/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":297
3668 * return PyArray_MultiIter_NUMITER(self)
3669 *
3670 * @property # <<<<<<<<<<<<<<
3671 * cdef inline npy_intp size(self) noexcept nogil:
3672 * """The total broadcasted size."""
3673*/
3674
3675static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size___get__(PyArrayMultiIterObject *__pyx_v_self) {
3676 npy_intp __pyx_r;
3677
3678 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":300
3679 * cdef inline npy_intp size(self) noexcept nogil:
3680 * """The total broadcasted size."""
3681 * return PyArray_MultiIter_SIZE(self) # <<<<<<<<<<<<<<
3682 *
3683 * @property
3684*/
3685 {
3686
3687 __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
3688 }
3689 goto __pyx_L0;
3690
3691 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":297
3692 * return PyArray_MultiIter_NUMITER(self)
3693 *
3694 * @property # <<<<<<<<<<<<<<
3695 * cdef inline npy_intp size(self) noexcept nogil:
3696 * """The total broadcasted size."""
3697*/
3698
3699 /* function exit code */
3700 __pyx_L0:;
3701 return __pyx_r;
3702}
3703
3704/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":302
3705 * return PyArray_MultiIter_SIZE(self)
3706 *
3707 * @property # <<<<<<<<<<<<<<
3708 * cdef inline npy_intp index(self) noexcept nogil:
3709 * """The current (1-d) index into the broadcasted result."""
3710*/
3711
3712static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index___get__(PyArrayMultiIterObject *__pyx_v_self) {
3713 npy_intp __pyx_r;
3714
3715 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":305
3716 * cdef inline npy_intp index(self) noexcept nogil:
3717 * """The current (1-d) index into the broadcasted result."""
3718 * return PyArray_MultiIter_INDEX(self) # <<<<<<<<<<<<<<
3719 *
3720 * @property
3721*/
3722 {
3723
3724 __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
3725 }
3726 goto __pyx_L0;
3727
3728 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":302
3729 * return PyArray_MultiIter_SIZE(self)
3730 *
3731 * @property # <<<<<<<<<<<<<<
3732 * cdef inline npy_intp index(self) noexcept nogil:
3733 * """The current (1-d) index into the broadcasted result."""
3734*/
3735
3736 /* function exit code */
3737 __pyx_L0:;
3738 return __pyx_r;
3739}
3740
3741/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":307
3742 * return PyArray_MultiIter_INDEX(self)
3743 *
3744 * @property # <<<<<<<<<<<<<<
3745 * cdef inline int nd(self) noexcept nogil:
3746 * """The number of dimensions in the broadcasted result."""
3747*/
3748
3749static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd___get__(PyArrayMultiIterObject *__pyx_v_self) {
3750 int __pyx_r;
3751
3752 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":310
3753 * cdef inline int nd(self) noexcept nogil:
3754 * """The number of dimensions in the broadcasted result."""
3755 * return PyArray_MultiIter_NDIM(self) # <<<<<<<<<<<<<<
3756 *
3757 * @property
3758*/
3759 {
3760
3761 __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
3762 }
3763 goto __pyx_L0;
3764
3765 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":307
3766 * return PyArray_MultiIter_INDEX(self)
3767 *
3768 * @property # <<<<<<<<<<<<<<
3769 * cdef inline int nd(self) noexcept nogil:
3770 * """The number of dimensions in the broadcasted result."""
3771*/
3772
3773 /* function exit code */
3774 __pyx_L0:;
3775 return __pyx_r;
3776}
3777
3778/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":312
3779 * return PyArray_MultiIter_NDIM(self)
3780 *
3781 * @property # <<<<<<<<<<<<<<
3782 * cdef inline npy_intp* dimensions(self) noexcept nogil:
3783 * """The shape of the broadcasted result."""
3784*/
3785
3786static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions___get__(PyArrayMultiIterObject *__pyx_v_self) {
3787 npy_intp *__pyx_r;
3788
3789 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":315
3790 * cdef inline npy_intp* dimensions(self) noexcept nogil:
3791 * """The shape of the broadcasted result."""
3792 * return PyArray_MultiIter_DIMS(self) # <<<<<<<<<<<<<<
3793 *
3794 * @property
3795*/
3796 {
3797
3798 __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
3799 }
3800 goto __pyx_L0;
3801
3802 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":312
3803 * return PyArray_MultiIter_NDIM(self)
3804 *
3805 * @property # <<<<<<<<<<<<<<
3806 * cdef inline npy_intp* dimensions(self) noexcept nogil:
3807 * """The shape of the broadcasted result."""
3808*/
3809
3810 /* function exit code */
3811 __pyx_L0:;
3812 return __pyx_r;
3813}
3814
3815/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":317
3816 * return PyArray_MultiIter_DIMS(self)
3817 *
3818 * @property # <<<<<<<<<<<<<<
3819 * cdef inline void** iters(self) noexcept nogil:
3820 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
3821*/
3822
3823static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters___get__(PyArrayMultiIterObject *__pyx_v_self) {
3824 void **__pyx_r;
3825
3826 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":321
3827 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
3828 * On return, the iterators are adjusted for broadcasting."""
3829 * return PyArray_MultiIter_ITERS(self) # <<<<<<<<<<<<<<
3830 *
3831 *
3832*/
3833 {
3834
3835 __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
3836 }
3837 goto __pyx_L0;
3838
3839 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":317
3840 * return PyArray_MultiIter_DIMS(self)
3841 *
3842 * @property # <<<<<<<<<<<<<<
3843 * cdef inline void** iters(self) noexcept nogil:
3844 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
3845*/
3846
3847 /* function exit code */
3848 __pyx_L0:;
3849 return __pyx_r;
3850}
3851
3852/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":335
3853 * # Instead, we use properties that map to the corresponding C-API functions.
3854 *
3855 * @property # <<<<<<<<<<<<<<
3856 * cdef inline PyObject* base(self) noexcept nogil:
3857 * """Returns a borrowed reference to the object owning the data/memory.
3858*/
3859
3860static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base___get__(PyArrayObject *__pyx_v_self) {
3861 PyObject *__pyx_r;
3862
3863 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":339
3864 * """Returns a borrowed reference to the object owning the data/memory.
3865 * """
3866 * return PyArray_BASE(self) # <<<<<<<<<<<<<<
3867 *
3868 * @property
3869*/
3870 {
3871
3872 __pyx_r = PyArray_BASE(__pyx_v_self);
3873 }
3874 goto __pyx_L0;
3875
3876 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":335
3877 * # Instead, we use properties that map to the corresponding C-API functions.
3878 *
3879 * @property # <<<<<<<<<<<<<<
3880 * cdef inline PyObject* base(self) noexcept nogil:
3881 * """Returns a borrowed reference to the object owning the data/memory.
3882*/
3883
3884 /* function exit code */
3885 __pyx_L0:;
3886 return __pyx_r;
3887}
3888
3889/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":341
3890 * return PyArray_BASE(self)
3891 *
3892 * @property # <<<<<<<<<<<<<<
3893 * cdef inline dtype descr(self):
3894 * """Returns an owned reference to the dtype of the array.
3895*/
3896
3897static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr___get__(PyArrayObject *__pyx_v_self) {
3898 PyArray_Descr *__pyx_r = NULL;
3899 __Pyx_RefNannyDeclarations
3900 PyArray_Descr *__pyx_t_1;
3901 __Pyx_RefNannySetupContext("__get__", 0);
3902
3903 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":345
3904 * """Returns an owned reference to the dtype of the array.
3905 * """
3906 * return <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
3907 *
3908 * @property
3909*/
3910 __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
3911
3912 {
3913 PyArray_Descr *__pyx_temp;
3914 {
3915 __pyx_temp = __pyx_r;
3916 __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
3917 __pyx_r = ((PyArray_Descr *)__pyx_t_1);
3918 }
3919 __Pyx_XDECREF((PyObject *)__pyx_temp);
3920 }
3921
3922 goto __pyx_L0;
3923
3924 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":341
3925 * return PyArray_BASE(self)
3926 *
3927 * @property # <<<<<<<<<<<<<<
3928 * cdef inline dtype descr(self):
3929 * """Returns an owned reference to the dtype of the array.
3930*/
3931
3932 /* function exit code */
3933 __pyx_L0:;
3934 __Pyx_XGIVEREF((PyObject *)__pyx_r);
3935 __Pyx_RefNannyFinishContext();
3936 return __pyx_r;
3937}
3938
3939/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":347
3940 * return <dtype>PyArray_DESCR(self)
3941 *
3942 * @property # <<<<<<<<<<<<<<
3943 * cdef inline int ndim(self) noexcept nogil:
3944 * """Returns the number of dimensions in the array.
3945*/
3946
3947static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim___get__(PyArrayObject *__pyx_v_self) {
3948 int __pyx_r;
3949
3950 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":351
3951 * """Returns the number of dimensions in the array.
3952 * """
3953 * return PyArray_NDIM(self) # <<<<<<<<<<<<<<
3954 *
3955 * @property
3956*/
3957 {
3958
3959 __pyx_r = PyArray_NDIM(__pyx_v_self);
3960 }
3961 goto __pyx_L0;
3962
3963 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":347
3964 * return <dtype>PyArray_DESCR(self)
3965 *
3966 * @property # <<<<<<<<<<<<<<
3967 * cdef inline int ndim(self) noexcept nogil:
3968 * """Returns the number of dimensions in the array.
3969*/
3970
3971 /* function exit code */
3972 __pyx_L0:;
3973 return __pyx_r;
3974}
3975
3976/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":353
3977 * return PyArray_NDIM(self)
3978 *
3979 * @property # <<<<<<<<<<<<<<
3980 * cdef inline npy_intp *shape(self) noexcept nogil:
3981 * """Returns a pointer to the dimensions/shape of the array.
3982*/
3983
3984static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape___get__(PyArrayObject *__pyx_v_self) {
3985 npy_intp *__pyx_r;
3986
3987 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":359
3988 * Can return NULL for 0-dimensional arrays.
3989 * """
3990 * return PyArray_DIMS(self) # <<<<<<<<<<<<<<
3991 *
3992 * @property
3993*/
3994 {
3995
3996 __pyx_r = PyArray_DIMS(__pyx_v_self);
3997 }
3998 goto __pyx_L0;
3999
4000 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":353
4001 * return PyArray_NDIM(self)
4002 *
4003 * @property # <<<<<<<<<<<<<<
4004 * cdef inline npy_intp *shape(self) noexcept nogil:
4005 * """Returns a pointer to the dimensions/shape of the array.
4006*/
4007
4008 /* function exit code */
4009 __pyx_L0:;
4010 return __pyx_r;
4011}
4012
4013/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":361
4014 * return PyArray_DIMS(self)
4015 *
4016 * @property # <<<<<<<<<<<<<<
4017 * cdef inline npy_intp *strides(self) noexcept nogil:
4018 * """Returns a pointer to the strides of the array.
4019*/
4020
4021static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides___get__(PyArrayObject *__pyx_v_self) {
4022 npy_intp *__pyx_r;
4023
4024 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":366
4025 * The number of elements matches the number of dimensions of the array (ndim).
4026 * """
4027 * return PyArray_STRIDES(self) # <<<<<<<<<<<<<<
4028 *
4029 * @property
4030*/
4031 {
4032
4033 __pyx_r = PyArray_STRIDES(__pyx_v_self);
4034 }
4035 goto __pyx_L0;
4036
4037 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":361
4038 * return PyArray_DIMS(self)
4039 *
4040 * @property # <<<<<<<<<<<<<<
4041 * cdef inline npy_intp *strides(self) noexcept nogil:
4042 * """Returns a pointer to the strides of the array.
4043*/
4044
4045 /* function exit code */
4046 __pyx_L0:;
4047 return __pyx_r;
4048}
4049
4050/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":368
4051 * return PyArray_STRIDES(self)
4052 *
4053 * @property # <<<<<<<<<<<<<<
4054 * cdef inline npy_intp size(self) noexcept nogil:
4055 * """Returns the total size (in number of elements) of the array.
4056*/
4057
4058static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size___get__(PyArrayObject *__pyx_v_self) {
4059 npy_intp __pyx_r;
4060
4061 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":372
4062 * """Returns the total size (in number of elements) of the array.
4063 * """
4064 * return PyArray_SIZE(self) # <<<<<<<<<<<<<<
4065 *
4066 * @property
4067*/
4068 {
4069
4070 __pyx_r = PyArray_SIZE(__pyx_v_self);
4071 }
4072 goto __pyx_L0;
4073
4074 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":368
4075 * return PyArray_STRIDES(self)
4076 *
4077 * @property # <<<<<<<<<<<<<<
4078 * cdef inline npy_intp size(self) noexcept nogil:
4079 * """Returns the total size (in number of elements) of the array.
4080*/
4081
4082 /* function exit code */
4083 __pyx_L0:;
4084 return __pyx_r;
4085}
4086
4087/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":374
4088 * return PyArray_SIZE(self)
4089 *
4090 * @property # <<<<<<<<<<<<<<
4091 * cdef inline char* data(self) noexcept nogil:
4092 * """The pointer to the data buffer as a char*.
4093*/
4094
4095static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data___get__(PyArrayObject *__pyx_v_self) {
4096 char *__pyx_r;
4097
4098 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":381
4099 * of `PyArray_DATA()` instead, which returns a 'void*'.
4100 * """
4101 * return PyArray_BYTES(self) # <<<<<<<<<<<<<<
4102 *
4103 *
4104*/
4105 {
4106
4107 __pyx_r = PyArray_BYTES(__pyx_v_self);
4108 }
4109 goto __pyx_L0;
4110
4111 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":374
4112 * return PyArray_SIZE(self)
4113 *
4114 * @property # <<<<<<<<<<<<<<
4115 * cdef inline char* data(self) noexcept nogil:
4116 * """The pointer to the data buffer as a char*.
4117*/
4118
4119 /* function exit code */
4120 __pyx_L0:;
4121 return __pyx_r;
4122}
4123
4124/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":794
4125 * ctypedef long double complex clongdouble_t
4126 *
4127 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
4128 * return PyArray_MultiIterNew(1, <void*>a)
4129 *
4130*/
4131
4132static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
4133 PyObject *__pyx_r = NULL;
4134 __Pyx_RefNannyDeclarations
4135 PyObject *__pyx_t_1 = NULL;
4136 int __pyx_lineno = 0;
4137 const char *__pyx_filename = NULL;
4138 int __pyx_clineno = 0;
4139 __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
4140
4141 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":795
4142 *
4143 * cdef inline object PyArray_MultiIterNew1(a):
4144 * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
4145 *
4146 * cdef inline object PyArray_MultiIterNew2(a, b):
4147*/
4148 __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 795, __pyx_L1_error)
4149 __Pyx_GOTREF(__pyx_t_1);
4150 {
4151 PyObject *__pyx_temp;
4152 {
4153 __pyx_temp = __pyx_r;
4154 __pyx_r = __pyx_t_1;
4155 }
4156 __Pyx_XDECREF(__pyx_temp);
4157 }
4158 __pyx_t_1 = 0;
4159 goto __pyx_L0;
4160
4161 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":794
4162 * ctypedef long double complex clongdouble_t
4163 *
4164 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
4165 * return PyArray_MultiIterNew(1, <void*>a)
4166 *
4167*/
4168
4169 /* function exit code */
4170 __pyx_L1_error:;
4171 __Pyx_XDECREF(__pyx_t_1);
4172 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
4173 __pyx_r = 0;
4174 __pyx_L0:;
4175 __Pyx_XGIVEREF(__pyx_r);
4176 __Pyx_RefNannyFinishContext();
4177 return __pyx_r;
4178}
4179
4180/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":797
4181 * return PyArray_MultiIterNew(1, <void*>a)
4182 *
4183 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
4184 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4185 *
4186*/
4187
4188static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
4189 PyObject *__pyx_r = NULL;
4190 __Pyx_RefNannyDeclarations
4191 PyObject *__pyx_t_1 = NULL;
4192 int __pyx_lineno = 0;
4193 const char *__pyx_filename = NULL;
4194 int __pyx_clineno = 0;
4195 __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
4196
4197 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":798
4198 *
4199 * cdef inline object PyArray_MultiIterNew2(a, b):
4200 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
4201 *
4202 * cdef inline object PyArray_MultiIterNew3(a, b, c):
4203*/
4204 __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)
4205 __Pyx_GOTREF(__pyx_t_1);
4206 {
4207 PyObject *__pyx_temp;
4208 {
4209 __pyx_temp = __pyx_r;
4210 __pyx_r = __pyx_t_1;
4211 }
4212 __Pyx_XDECREF(__pyx_temp);
4213 }
4214 __pyx_t_1 = 0;
4215 goto __pyx_L0;
4216
4217 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":797
4218 * return PyArray_MultiIterNew(1, <void*>a)
4219 *
4220 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
4221 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4222 *
4223*/
4224
4225 /* function exit code */
4226 __pyx_L1_error:;
4227 __Pyx_XDECREF(__pyx_t_1);
4228 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
4229 __pyx_r = 0;
4230 __pyx_L0:;
4231 __Pyx_XGIVEREF(__pyx_r);
4232 __Pyx_RefNannyFinishContext();
4233 return __pyx_r;
4234}
4235
4236/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":800
4237 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4238 *
4239 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4240 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4241 *
4242*/
4243
4244static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
4245 PyObject *__pyx_r = NULL;
4246 __Pyx_RefNannyDeclarations
4247 PyObject *__pyx_t_1 = NULL;
4248 int __pyx_lineno = 0;
4249 const char *__pyx_filename = NULL;
4250 int __pyx_clineno = 0;
4251 __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
4252
4253 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":801
4254 *
4255 * cdef inline object PyArray_MultiIterNew3(a, b, c):
4256 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
4257 *
4258 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4259*/
4260 __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)
4261 __Pyx_GOTREF(__pyx_t_1);
4262 {
4263 PyObject *__pyx_temp;
4264 {
4265 __pyx_temp = __pyx_r;
4266 __pyx_r = __pyx_t_1;
4267 }
4268 __Pyx_XDECREF(__pyx_temp);
4269 }
4270 __pyx_t_1 = 0;
4271 goto __pyx_L0;
4272
4273 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":800
4274 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
4275 *
4276 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
4277 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4278 *
4279*/
4280
4281 /* function exit code */
4282 __pyx_L1_error:;
4283 __Pyx_XDECREF(__pyx_t_1);
4284 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
4285 __pyx_r = 0;
4286 __pyx_L0:;
4287 __Pyx_XGIVEREF(__pyx_r);
4288 __Pyx_RefNannyFinishContext();
4289 return __pyx_r;
4290}
4291
4292/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":803
4293 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4294 *
4295 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4296 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4297 *
4298*/
4299
4300static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
4301 PyObject *__pyx_r = NULL;
4302 __Pyx_RefNannyDeclarations
4303 PyObject *__pyx_t_1 = NULL;
4304 int __pyx_lineno = 0;
4305 const char *__pyx_filename = NULL;
4306 int __pyx_clineno = 0;
4307 __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
4308
4309 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":804
4310 *
4311 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
4312 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
4313 *
4314 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4315*/
4316 __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)
4317 __Pyx_GOTREF(__pyx_t_1);
4318 {
4319 PyObject *__pyx_temp;
4320 {
4321 __pyx_temp = __pyx_r;
4322 __pyx_r = __pyx_t_1;
4323 }
4324 __Pyx_XDECREF(__pyx_temp);
4325 }
4326 __pyx_t_1 = 0;
4327 goto __pyx_L0;
4328
4329 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":803
4330 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
4331 *
4332 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
4333 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4334 *
4335*/
4336
4337 /* function exit code */
4338 __pyx_L1_error:;
4339 __Pyx_XDECREF(__pyx_t_1);
4340 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
4341 __pyx_r = 0;
4342 __pyx_L0:;
4343 __Pyx_XGIVEREF(__pyx_r);
4344 __Pyx_RefNannyFinishContext();
4345 return __pyx_r;
4346}
4347
4348/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":806
4349 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4350 *
4351 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4352 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4353 *
4354*/
4355
4356static 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) {
4357 PyObject *__pyx_r = NULL;
4358 __Pyx_RefNannyDeclarations
4359 PyObject *__pyx_t_1 = NULL;
4360 int __pyx_lineno = 0;
4361 const char *__pyx_filename = NULL;
4362 int __pyx_clineno = 0;
4363 __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
4364
4365 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":807
4366 *
4367 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
4368 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
4369 *
4370 * cdef inline tuple PyDataType_SHAPE(dtype d):
4371*/
4372 __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)
4373 __Pyx_GOTREF(__pyx_t_1);
4374 {
4375 PyObject *__pyx_temp;
4376 {
4377 __pyx_temp = __pyx_r;
4378 __pyx_r = __pyx_t_1;
4379 }
4380 __Pyx_XDECREF(__pyx_temp);
4381 }
4382 __pyx_t_1 = 0;
4383 goto __pyx_L0;
4384
4385 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":806
4386 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
4387 *
4388 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
4389 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4390 *
4391*/
4392
4393 /* function exit code */
4394 __pyx_L1_error:;
4395 __Pyx_XDECREF(__pyx_t_1);
4396 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
4397 __pyx_r = 0;
4398 __pyx_L0:;
4399 __Pyx_XGIVEREF(__pyx_r);
4400 __Pyx_RefNannyFinishContext();
4401 return __pyx_r;
4402}
4403
4404/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":809
4405 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4406 *
4407 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4408 * if PyDataType_HASSUBARRAY(d):
4409 * return <tuple>d.subarray.shape
4410*/
4411
4412static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
4413 PyObject *__pyx_r = NULL;
4414 __Pyx_RefNannyDeclarations
4415 int __pyx_t_1;
4416 PyObject *__pyx_t_2;
4417 __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
4418
4419 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":810
4420 *
4421 * cdef inline tuple PyDataType_SHAPE(dtype d):
4422 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4423 * return <tuple>d.subarray.shape
4424 * else:
4425*/
4426 __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
4427
4428 if (__pyx_t_1) {
4429
4430
4431 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":811
4432 * cdef inline tuple PyDataType_SHAPE(dtype d):
4433 * if PyDataType_HASSUBARRAY(d):
4434 * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
4435 * else:
4436 * return ()
4437*/
4438 __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray___get__(__pyx_v_d)->shape;
4439
4440 {
4441 PyObject *__pyx_temp;
4442 {
4443 __pyx_temp = __pyx_r;
4444 __Pyx_INCREF(((PyObject*)__pyx_t_2));
4445 __pyx_r = ((PyObject*)__pyx_t_2);
4446 }
4447 __Pyx_XDECREF(__pyx_temp);
4448 }
4449
4450 goto __pyx_L0;
4451
4452 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":810
4453 *
4454 * cdef inline tuple PyDataType_SHAPE(dtype d):
4455 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
4456 * return <tuple>d.subarray.shape
4457 * else:
4458*/
4459 }
4460
4461 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":813
4462 * return <tuple>d.subarray.shape
4463 * else:
4464 * return () # <<<<<<<<<<<<<<
4465 *
4466 *
4467*/
4468 /*else*/ {
4469 {
4470 PyObject *__pyx_temp;
4471 {
4472 __pyx_temp = __pyx_r;
4473 __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
4474 __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
4475 }
4476 __Pyx_XDECREF(__pyx_temp);
4477 }
4478 goto __pyx_L0;
4479 }
4480
4481 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":809
4482 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
4483 *
4484 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
4485 * if PyDataType_HASSUBARRAY(d):
4486 * return <tuple>d.subarray.shape
4487*/
4488
4489 /* function exit code */
4490 __pyx_L0:;
4491 __Pyx_XGIVEREF(__pyx_r);
4492 __Pyx_RefNannyFinishContext();
4493 return __pyx_r;
4494}
4495
4496/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":947
4497 *
4498 * ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
4499 * @property # <<<<<<<<<<<<<<
4500 * cdef inline int nin(self) noexcept nogil:
4501 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4502*/
4503
4504static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_3nin___get__(PyUFuncObject *__pyx_v_self) {
4505 int __pyx_r;
4506
4507 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":949
4508 * @property
4509 * cdef inline int nin(self) noexcept nogil:
4510 * return _PyUFuncObject_GET_ITEM_DATA(self).nin # <<<<<<<<<<<<<<
4511 *
4512 * @property
4513*/
4514 {
4515
4516 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nin;
4517 }
4518 goto __pyx_L0;
4519
4520 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":947
4521 *
4522 * ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]:
4523 * @property # <<<<<<<<<<<<<<
4524 * cdef inline int nin(self) noexcept nogil:
4525 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4526*/
4527
4528 /* function exit code */
4529 __pyx_L0:;
4530 return __pyx_r;
4531}
4532
4533/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":951
4534 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4535 *
4536 * @property # <<<<<<<<<<<<<<
4537 * cdef inline int nout(self) noexcept nogil:
4538 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4539*/
4540
4541static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_4nout___get__(PyUFuncObject *__pyx_v_self) {
4542 int __pyx_r;
4543
4544 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":953
4545 * @property
4546 * cdef inline int nout(self) noexcept nogil:
4547 * return _PyUFuncObject_GET_ITEM_DATA(self).nout # <<<<<<<<<<<<<<
4548 *
4549 * @property
4550*/
4551 {
4552
4553 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nout;
4554 }
4555 goto __pyx_L0;
4556
4557 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":951
4558 * return _PyUFuncObject_GET_ITEM_DATA(self).nin
4559 *
4560 * @property # <<<<<<<<<<<<<<
4561 * cdef inline int nout(self) noexcept nogil:
4562 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4563*/
4564
4565 /* function exit code */
4566 __pyx_L0:;
4567 return __pyx_r;
4568}
4569
4570/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":955
4571 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4572 *
4573 * @property # <<<<<<<<<<<<<<
4574 * cdef inline int nargs(self) noexcept nogil:
4575 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4576*/
4577
4578static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_5nargs___get__(PyUFuncObject *__pyx_v_self) {
4579 int __pyx_r;
4580
4581 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":957
4582 * @property
4583 * cdef inline int nargs(self) noexcept nogil:
4584 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs # <<<<<<<<<<<<<<
4585 *
4586 * @property
4587*/
4588 {
4589
4590 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->nargs;
4591 }
4592 goto __pyx_L0;
4593
4594 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":955
4595 * return _PyUFuncObject_GET_ITEM_DATA(self).nout
4596 *
4597 * @property # <<<<<<<<<<<<<<
4598 * cdef inline int nargs(self) noexcept nogil:
4599 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4600*/
4601
4602 /* function exit code */
4603 __pyx_L0:;
4604 return __pyx_r;
4605}
4606
4607/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":959
4608 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4609 *
4610 * @property # <<<<<<<<<<<<<<
4611 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4612 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4613*/
4614
4615static CYTHON_INLINE PyUFuncGenericFunction *__pyx_f_5numpy_5ufunc_9functions___get__(PyUFuncObject *__pyx_v_self) {
4616 PyUFuncGenericFunction *__pyx_r;
4617
4618 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":961
4619 * @property
4620 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4621 * return _PyUFuncObject_GET_ITEM_DATA(self).functions # <<<<<<<<<<<<<<
4622 *
4623 * @property
4624*/
4625 {
4626
4627 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->functions;
4628 }
4629 goto __pyx_L0;
4630
4631 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":959
4632 * return _PyUFuncObject_GET_ITEM_DATA(self).nargs
4633 *
4634 * @property # <<<<<<<<<<<<<<
4635 * cdef inline PyUFuncGenericFunction* functions(self) noexcept nogil:
4636 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4637*/
4638
4639 /* function exit code */
4640 __pyx_L0:;
4641 return __pyx_r;
4642}
4643
4644/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":963
4645 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4646 *
4647 * @property # <<<<<<<<<<<<<<
4648 * cdef inline void ** data(self) noexcept nogil:
4649 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4650*/
4651
4652static CYTHON_INLINE void **__pyx_f_5numpy_5ufunc_4data___get__(PyUFuncObject *__pyx_v_self) {
4653 void **__pyx_r;
4654
4655 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":965
4656 * @property
4657 * cdef inline void ** data(self) noexcept nogil:
4658 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data # <<<<<<<<<<<<<<
4659 *
4660 * @property
4661*/
4662 {
4663
4664 __pyx_r = ((void **)_PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->data);
4665 }
4666 goto __pyx_L0;
4667
4668 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":963
4669 * return _PyUFuncObject_GET_ITEM_DATA(self).functions
4670 *
4671 * @property # <<<<<<<<<<<<<<
4672 * cdef inline void ** data(self) noexcept nogil:
4673 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4674*/
4675
4676 /* function exit code */
4677 __pyx_L0:;
4678 return __pyx_r;
4679}
4680
4681/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":967
4682 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4683 *
4684 * @property # <<<<<<<<<<<<<<
4685 * cdef inline int ntypes(self) noexcept nogil:
4686 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4687*/
4688
4689static CYTHON_INLINE int __pyx_f_5numpy_5ufunc_6ntypes___get__(PyUFuncObject *__pyx_v_self) {
4690 int __pyx_r;
4691
4692 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":969
4693 * @property
4694 * cdef inline int ntypes(self) noexcept nogil:
4695 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes # <<<<<<<<<<<<<<
4696 *
4697 * @property
4698*/
4699 {
4700
4701 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ntypes;
4702 }
4703 goto __pyx_L0;
4704
4705 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":967
4706 * return <void **>_PyUFuncObject_GET_ITEM_DATA(self).data
4707 *
4708 * @property # <<<<<<<<<<<<<<
4709 * cdef inline int ntypes(self) noexcept nogil:
4710 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4711*/
4712
4713 /* function exit code */
4714 __pyx_L0:;
4715 return __pyx_r;
4716}
4717
4718/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":971
4719 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4720 *
4721 * @property # <<<<<<<<<<<<<<
4722 * cdef inline const char* name(self) noexcept nogil:
4723 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4724*/
4725
4726static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_4name___get__(PyUFuncObject *__pyx_v_self) {
4727 char const *__pyx_r;
4728
4729 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":973
4730 * @property
4731 * cdef inline const char* name(self) noexcept nogil:
4732 * return _PyUFuncObject_GET_ITEM_DATA(self).name # <<<<<<<<<<<<<<
4733 *
4734 * @property
4735*/
4736 {
4737
4738 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->name;
4739 }
4740 goto __pyx_L0;
4741
4742 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":971
4743 * return _PyUFuncObject_GET_ITEM_DATA(self).ntypes
4744 *
4745 * @property # <<<<<<<<<<<<<<
4746 * cdef inline const char* name(self) noexcept nogil:
4747 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4748*/
4749
4750 /* function exit code */
4751 __pyx_L0:;
4752 return __pyx_r;
4753}
4754
4755/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":975
4756 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4757 *
4758 * @property # <<<<<<<<<<<<<<
4759 * cdef inline const char* doc(self) noexcept nogil:
4760 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
4761*/
4762
4763static CYTHON_INLINE char const *__pyx_f_5numpy_5ufunc_3doc___get__(PyUFuncObject *__pyx_v_self) {
4764 char const *__pyx_r;
4765
4766 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":977
4767 * @property
4768 * cdef inline const char* doc(self) noexcept nogil:
4769 * return _PyUFuncObject_GET_ITEM_DATA(self).doc # <<<<<<<<<<<<<<
4770 *
4771 * @property
4772*/
4773 {
4774
4775 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->doc;
4776 }
4777 goto __pyx_L0;
4778
4779 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":975
4780 * return _PyUFuncObject_GET_ITEM_DATA(self).name
4781 *
4782 * @property # <<<<<<<<<<<<<<
4783 * cdef inline const char* doc(self) noexcept nogil:
4784 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
4785*/
4786
4787 /* function exit code */
4788 __pyx_L0:;
4789 return __pyx_r;
4790}
4791
4792/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":979
4793 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
4794 *
4795 * @property # <<<<<<<<<<<<<<
4796 * cdef inline void* ptr(self) noexcept nogil:
4797 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
4798*/
4799
4800static CYTHON_INLINE void *__pyx_f_5numpy_5ufunc_3ptr___get__(PyUFuncObject *__pyx_v_self) {
4801 void *__pyx_r;
4802
4803 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":981
4804 * @property
4805 * cdef inline void* ptr(self) noexcept nogil:
4806 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr # <<<<<<<<<<<<<<
4807 *
4808 * @property
4809*/
4810 {
4811
4812 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->ptr;
4813 }
4814 goto __pyx_L0;
4815
4816 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":979
4817 * return _PyUFuncObject_GET_ITEM_DATA(self).doc
4818 *
4819 * @property # <<<<<<<<<<<<<<
4820 * cdef inline void* ptr(self) noexcept nogil:
4821 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
4822*/
4823
4824 /* function exit code */
4825 __pyx_L0:;
4826 return __pyx_r;
4827}
4828
4829/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":983
4830 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
4831 *
4832 * @property # <<<<<<<<<<<<<<
4833 * cdef inline PyObject* obj(self) noexcept nogil:
4834 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
4835*/
4836
4837static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_3obj___get__(PyUFuncObject *__pyx_v_self) {
4838 PyObject *__pyx_r;
4839
4840 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":985
4841 * @property
4842 * cdef inline PyObject* obj(self) noexcept nogil:
4843 * return _PyUFuncObject_GET_ITEM_DATA(self).obj # <<<<<<<<<<<<<<
4844 *
4845 * @property
4846*/
4847 {
4848
4849 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->obj;
4850 }
4851 goto __pyx_L0;
4852
4853 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":983
4854 * return _PyUFuncObject_GET_ITEM_DATA(self).ptr
4855 *
4856 * @property # <<<<<<<<<<<<<<
4857 * cdef inline PyObject* obj(self) noexcept nogil:
4858 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
4859*/
4860
4861 /* function exit code */
4862 __pyx_L0:;
4863 return __pyx_r;
4864}
4865
4866/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":987
4867 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
4868 *
4869 * @property # <<<<<<<<<<<<<<
4870 * cdef inline PyObject* userloops(self) noexcept nogil:
4871 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops
4872*/
4873
4874static CYTHON_INLINE PyObject *__pyx_f_5numpy_5ufunc_9userloops___get__(PyUFuncObject *__pyx_v_self) {
4875 PyObject *__pyx_r;
4876
4877 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":989
4878 * @property
4879 * cdef inline PyObject* userloops(self) noexcept nogil:
4880 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops # <<<<<<<<<<<<<<
4881 *
4882 * PyUFuncObject_fields *_PyUFuncObject_GET_ITEM_DATA(ufunc) nogil
4883*/
4884 {
4885
4886 __pyx_r = _PyUFuncObject_GET_ITEM_DATA(__pyx_v_self)->userloops;
4887 }
4888 goto __pyx_L0;
4889
4890 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":987
4891 * return _PyUFuncObject_GET_ITEM_DATA(self).obj
4892 *
4893 * @property # <<<<<<<<<<<<<<
4894 * cdef inline PyObject* userloops(self) noexcept nogil:
4895 * return _PyUFuncObject_GET_ITEM_DATA(self).userloops
4896*/
4897
4898 /* function exit code */
4899 __pyx_L0:;
4900 return __pyx_r;
4901}
4902
4903/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1065
4904 * int _import_umath() except -1
4905 *
4906 * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
4907 * Py_INCREF(base) # important to do this before stealing the reference below!
4908 * PyArray_SetBaseObject(arr, base)
4909*/
4910
4911static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
4912 int __pyx_t_1;
4913 int __pyx_lineno = 0;
4914 const char *__pyx_filename = NULL;
4915 int __pyx_clineno = 0;
4916
4917 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1066
4918 *
4919 * cdef inline void set_array_base(ndarray arr, object base) except *:
4920 * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
4921 * PyArray_SetBaseObject(arr, base)
4922 *
4923*/
4924 Py_INCREF(__pyx_v_base);
4925
4926 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1067
4927 * cdef inline void set_array_base(ndarray arr, object base) except *:
4928 * Py_INCREF(base) # important to do this before stealing the reference below!
4929 * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
4930 *
4931 * cdef inline object get_array_base(ndarray arr):
4932*/
4933 __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)
4934
4935
4936 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1065
4937 * int _import_umath() except -1
4938 *
4939 * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<<
4940 * Py_INCREF(base) # important to do this before stealing the reference below!
4941 * PyArray_SetBaseObject(arr, base)
4942*/
4943
4944 /* function exit code */
4945 goto __pyx_L0;
4946 __pyx_L1_error:;
4947 __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
4948 __pyx_L0:;
4949
4950}
4951
4952/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1069
4953 * PyArray_SetBaseObject(arr, base)
4954 *
4955 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
4956 * base = PyArray_BASE(arr)
4957 * if base is NULL:
4958*/
4959
4960static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
4961 PyObject *__pyx_v_base;
4962 PyObject *__pyx_r = NULL;
4963 __Pyx_RefNannyDeclarations
4964 int __pyx_t_1;
4965 __Pyx_RefNannySetupContext("get_array_base", 0);
4966
4967 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1070
4968 *
4969 * cdef inline object get_array_base(ndarray arr):
4970 * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
4971 * if base is NULL:
4972 * return None
4973*/
4974 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
4975
4976 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1071
4977 * cdef inline object get_array_base(ndarray arr):
4978 * base = PyArray_BASE(arr)
4979 * if base is NULL: # <<<<<<<<<<<<<<
4980 * return None
4981 * return <object>base
4982*/
4983 __pyx_t_1 = (__pyx_v_base == NULL);
4984
4985 if (__pyx_t_1) {
4986
4987
4988 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1072
4989 * base = PyArray_BASE(arr)
4990 * if base is NULL:
4991 * return None # <<<<<<<<<<<<<<
4992 * return <object>base
4993 *
4994*/
4995 {
4996 PyObject *__pyx_temp;
4997 {
4998 __pyx_temp = __pyx_r;
4999 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5000 }
5001 __Pyx_XDECREF(__pyx_temp);
5002 }
5003 goto __pyx_L0;
5004
5005 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1071
5006 * cdef inline object get_array_base(ndarray arr):
5007 * base = PyArray_BASE(arr)
5008 * if base is NULL: # <<<<<<<<<<<<<<
5009 * return None
5010 * return <object>base
5011*/
5012 }
5013
5014 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1073
5015 * if base is NULL:
5016 * return None
5017 * return <object>base # <<<<<<<<<<<<<<
5018 *
5019 * # Versions of the import_* functions which are more suitable for
5020*/
5021 {
5022 PyObject *__pyx_temp;
5023 {
5024 __pyx_temp = __pyx_r;
5025 __Pyx_INCREF(((PyObject *)__pyx_v_base));
5026 __pyx_r = ((PyObject *)__pyx_v_base);
5027 }
5028 __Pyx_XDECREF(__pyx_temp);
5029 }
5030 goto __pyx_L0;
5031
5032 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1069
5033 * PyArray_SetBaseObject(arr, base)
5034 *
5035 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
5036 * base = PyArray_BASE(arr)
5037 * if base is NULL:
5038*/
5039
5040 /* function exit code */
5041 __pyx_L0:;
5042
5043 __Pyx_XGIVEREF(__pyx_r);
5044 __Pyx_RefNannyFinishContext();
5045 return __pyx_r;
5046}
5047
5048/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1077
5049 * # Versions of the import_* functions which are more suitable for
5050 * # Cython code.
5051 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5052 * try:
5053 * __pyx_import_array()
5054*/
5055
5056static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
5057 int __pyx_r;
5058 __Pyx_RefNannyDeclarations
5059 PyObject *__pyx_t_1 = NULL;
5060 PyObject *__pyx_t_2 = NULL;
5061 PyObject *__pyx_t_3 = NULL;
5062 int __pyx_t_4;
5063 PyObject *__pyx_t_5 = NULL;
5064 PyObject *__pyx_t_6 = NULL;
5065 PyObject *__pyx_t_7 = NULL;
5066 PyObject *__pyx_t_8 = NULL;
5067 PyObject *__pyx_t_9 = NULL;
5068 size_t __pyx_t_10;
5069 int __pyx_lineno = 0;
5070 const char *__pyx_filename = NULL;
5071 int __pyx_clineno = 0;
5072 __Pyx_RefNannySetupContext("import_array", 0);
5073
5074 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5075 * # Cython code.
5076 * cdef inline int import_array() except -1:
5077 * try: # <<<<<<<<<<<<<<
5078 * __pyx_import_array()
5079 * except Exception:
5080*/
5081 {
5082 __Pyx_PyThreadState_declare
5083 __Pyx_PyThreadState_assign
5084 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5085 __Pyx_XGOTREF(__pyx_t_1);
5086 __Pyx_XGOTREF(__pyx_t_2);
5087 __Pyx_XGOTREF(__pyx_t_3);
5088 /*try:*/ {
5089
5090 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1079
5091 * cdef inline int import_array() except -1:
5092 * try:
5093 * __pyx_import_array() # <<<<<<<<<<<<<<
5094 * except Exception:
5095 * raise ImportError("numpy._core.multiarray failed to import")
5096*/
5097 __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1079, __pyx_L3_error)
5098
5099
5100 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5101 * # Cython code.
5102 * cdef inline int import_array() except -1:
5103 * try: # <<<<<<<<<<<<<<
5104 * __pyx_import_array()
5105 * except Exception:
5106*/
5107 }
5108 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5109 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5110 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5111 goto __pyx_L8_try_end;
5112 __pyx_L3_error:;
5113
5114 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1080
5115 * try:
5116 * __pyx_import_array()
5117 * except Exception: # <<<<<<<<<<<<<<
5118 * raise ImportError("numpy._core.multiarray failed to import")
5119 *
5120*/
5121 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5122 if (__pyx_t_4) {
5123 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5124 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1080, __pyx_L5_except_error)
5125 __Pyx_XGOTREF(__pyx_t_5);
5126 __Pyx_XGOTREF(__pyx_t_6);
5127 __Pyx_XGOTREF(__pyx_t_7);
5128
5129 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1081
5130 * __pyx_import_array()
5131 * except Exception:
5132 * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<<
5133 *
5134 * cdef inline int import_umath() except -1:
5135*/
5136 __pyx_t_9 = NULL;
5137 __pyx_t_10 = 1;
5138 {
5139 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to};
5140 __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));
5141 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5142 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1081, __pyx_L5_except_error)
5143 __Pyx_GOTREF(__pyx_t_8);
5144 }
5145 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5146 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5147 __PYX_ERR(1, 1081, __pyx_L5_except_error)
5148 }
5149 goto __pyx_L5_except_error;
5150
5151 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1078
5152 * # Cython code.
5153 * cdef inline int import_array() except -1:
5154 * try: # <<<<<<<<<<<<<<
5155 * __pyx_import_array()
5156 * except Exception:
5157*/
5158 __pyx_L5_except_error:;
5159 __Pyx_XGIVEREF(__pyx_t_1);
5160 __Pyx_XGIVEREF(__pyx_t_2);
5161 __Pyx_XGIVEREF(__pyx_t_3);
5162 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5163 goto __pyx_L1_error;
5164 __pyx_L8_try_end:;
5165 }
5166
5167 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1077
5168 * # Versions of the import_* functions which are more suitable for
5169 * # Cython code.
5170 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
5171 * try:
5172 * __pyx_import_array()
5173*/
5174
5175 /* function exit code */
5176 __pyx_r = 0;
5177 goto __pyx_L0;
5178 __pyx_L1_error:;
5179 __Pyx_XDECREF(__pyx_t_5);
5180 __Pyx_XDECREF(__pyx_t_6);
5181 __Pyx_XDECREF(__pyx_t_7);
5182 __Pyx_XDECREF(__pyx_t_8);
5183 __Pyx_XDECREF(__pyx_t_9);
5184 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
5185 __pyx_r = -1;
5186 __pyx_L0:;
5187
5188 __Pyx_RefNannyFinishContext();
5189 return __pyx_r;
5190}
5191
5192/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1083
5193 * raise ImportError("numpy._core.multiarray failed to import")
5194 *
5195 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5196 * try:
5197 * _import_umath()
5198*/
5199
5200static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
5201 int __pyx_r;
5202 __Pyx_RefNannyDeclarations
5203 PyObject *__pyx_t_1 = NULL;
5204 PyObject *__pyx_t_2 = NULL;
5205 PyObject *__pyx_t_3 = NULL;
5206 int __pyx_t_4;
5207 PyObject *__pyx_t_5 = NULL;
5208 PyObject *__pyx_t_6 = NULL;
5209 PyObject *__pyx_t_7 = NULL;
5210 PyObject *__pyx_t_8 = NULL;
5211 PyObject *__pyx_t_9 = NULL;
5212 size_t __pyx_t_10;
5213 int __pyx_lineno = 0;
5214 const char *__pyx_filename = NULL;
5215 int __pyx_clineno = 0;
5216 __Pyx_RefNannySetupContext("import_umath", 0);
5217
5218 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5219 *
5220 * cdef inline int import_umath() except -1:
5221 * try: # <<<<<<<<<<<<<<
5222 * _import_umath()
5223 * except Exception:
5224*/
5225 {
5226 __Pyx_PyThreadState_declare
5227 __Pyx_PyThreadState_assign
5228 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5229 __Pyx_XGOTREF(__pyx_t_1);
5230 __Pyx_XGOTREF(__pyx_t_2);
5231 __Pyx_XGOTREF(__pyx_t_3);
5232 /*try:*/ {
5233
5234 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1085
5235 * cdef inline int import_umath() except -1:
5236 * try:
5237 * _import_umath() # <<<<<<<<<<<<<<
5238 * except Exception:
5239 * raise ImportError("numpy._core.umath failed to import")
5240*/
5241 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1085, __pyx_L3_error)
5242
5243
5244 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5245 *
5246 * cdef inline int import_umath() except -1:
5247 * try: # <<<<<<<<<<<<<<
5248 * _import_umath()
5249 * except Exception:
5250*/
5251 }
5252 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5253 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5254 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5255 goto __pyx_L8_try_end;
5256 __pyx_L3_error:;
5257
5258 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1086
5259 * try:
5260 * _import_umath()
5261 * except Exception: # <<<<<<<<<<<<<<
5262 * raise ImportError("numpy._core.umath failed to import")
5263 *
5264*/
5265 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5266 if (__pyx_t_4) {
5267 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5268 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1086, __pyx_L5_except_error)
5269 __Pyx_XGOTREF(__pyx_t_5);
5270 __Pyx_XGOTREF(__pyx_t_6);
5271 __Pyx_XGOTREF(__pyx_t_7);
5272
5273 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1087
5274 * _import_umath()
5275 * except Exception:
5276 * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
5277 *
5278 * cdef inline int import_ufunc() except -1:
5279*/
5280 __pyx_t_9 = NULL;
5281 __pyx_t_10 = 1;
5282 {
5283 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
5284 __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));
5285 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5286 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1087, __pyx_L5_except_error)
5287 __Pyx_GOTREF(__pyx_t_8);
5288 }
5289 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5290 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5291 __PYX_ERR(1, 1087, __pyx_L5_except_error)
5292 }
5293 goto __pyx_L5_except_error;
5294
5295 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1084
5296 *
5297 * cdef inline int import_umath() except -1:
5298 * try: # <<<<<<<<<<<<<<
5299 * _import_umath()
5300 * except Exception:
5301*/
5302 __pyx_L5_except_error:;
5303 __Pyx_XGIVEREF(__pyx_t_1);
5304 __Pyx_XGIVEREF(__pyx_t_2);
5305 __Pyx_XGIVEREF(__pyx_t_3);
5306 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5307 goto __pyx_L1_error;
5308 __pyx_L8_try_end:;
5309 }
5310
5311 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1083
5312 * raise ImportError("numpy._core.multiarray failed to import")
5313 *
5314 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
5315 * try:
5316 * _import_umath()
5317*/
5318
5319 /* function exit code */
5320 __pyx_r = 0;
5321 goto __pyx_L0;
5322 __pyx_L1_error:;
5323 __Pyx_XDECREF(__pyx_t_5);
5324 __Pyx_XDECREF(__pyx_t_6);
5325 __Pyx_XDECREF(__pyx_t_7);
5326 __Pyx_XDECREF(__pyx_t_8);
5327 __Pyx_XDECREF(__pyx_t_9);
5328 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
5329 __pyx_r = -1;
5330 __pyx_L0:;
5331
5332 __Pyx_RefNannyFinishContext();
5333 return __pyx_r;
5334}
5335
5336/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1089
5337 * raise ImportError("numpy._core.umath failed to import")
5338 *
5339 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5340 * try:
5341 * _import_umath()
5342*/
5343
5344static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
5345 int __pyx_r;
5346 __Pyx_RefNannyDeclarations
5347 PyObject *__pyx_t_1 = NULL;
5348 PyObject *__pyx_t_2 = NULL;
5349 PyObject *__pyx_t_3 = NULL;
5350 int __pyx_t_4;
5351 PyObject *__pyx_t_5 = NULL;
5352 PyObject *__pyx_t_6 = NULL;
5353 PyObject *__pyx_t_7 = NULL;
5354 PyObject *__pyx_t_8 = NULL;
5355 PyObject *__pyx_t_9 = NULL;
5356 size_t __pyx_t_10;
5357 int __pyx_lineno = 0;
5358 const char *__pyx_filename = NULL;
5359 int __pyx_clineno = 0;
5360 __Pyx_RefNannySetupContext("import_ufunc", 0);
5361
5362 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5363 *
5364 * cdef inline int import_ufunc() except -1:
5365 * try: # <<<<<<<<<<<<<<
5366 * _import_umath()
5367 * except Exception:
5368*/
5369 {
5370 __Pyx_PyThreadState_declare
5371 __Pyx_PyThreadState_assign
5372 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
5373 __Pyx_XGOTREF(__pyx_t_1);
5374 __Pyx_XGOTREF(__pyx_t_2);
5375 __Pyx_XGOTREF(__pyx_t_3);
5376 /*try:*/ {
5377
5378 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1091
5379 * cdef inline int import_ufunc() except -1:
5380 * try:
5381 * _import_umath() # <<<<<<<<<<<<<<
5382 * except Exception:
5383 * raise ImportError("numpy._core.umath failed to import")
5384*/
5385 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1091, __pyx_L3_error)
5386
5387
5388 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5389 *
5390 * cdef inline int import_ufunc() except -1:
5391 * try: # <<<<<<<<<<<<<<
5392 * _import_umath()
5393 * except Exception:
5394*/
5395 }
5396 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5397 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5398 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5399 goto __pyx_L8_try_end;
5400 __pyx_L3_error:;
5401
5402 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1092
5403 * try:
5404 * _import_umath()
5405 * except Exception: # <<<<<<<<<<<<<<
5406 * raise ImportError("numpy._core.umath failed to import")
5407 *
5408*/
5409 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
5410 if (__pyx_t_4) {
5411 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5412 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1092, __pyx_L5_except_error)
5413 __Pyx_XGOTREF(__pyx_t_5);
5414 __Pyx_XGOTREF(__pyx_t_6);
5415 __Pyx_XGOTREF(__pyx_t_7);
5416
5417 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1093
5418 * _import_umath()
5419 * except Exception:
5420 * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<<
5421 *
5422 *
5423*/
5424 __pyx_t_9 = NULL;
5425 __pyx_t_10 = 1;
5426 {
5427 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
5428 __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));
5429 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
5430 if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1093, __pyx_L5_except_error)
5431 __Pyx_GOTREF(__pyx_t_8);
5432 }
5433 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5434 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5435 __PYX_ERR(1, 1093, __pyx_L5_except_error)
5436 }
5437 goto __pyx_L5_except_error;
5438
5439 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1090
5440 *
5441 * cdef inline int import_ufunc() except -1:
5442 * try: # <<<<<<<<<<<<<<
5443 * _import_umath()
5444 * except Exception:
5445*/
5446 __pyx_L5_except_error:;
5447 __Pyx_XGIVEREF(__pyx_t_1);
5448 __Pyx_XGIVEREF(__pyx_t_2);
5449 __Pyx_XGIVEREF(__pyx_t_3);
5450 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
5451 goto __pyx_L1_error;
5452 __pyx_L8_try_end:;
5453 }
5454
5455 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1089
5456 * raise ImportError("numpy._core.umath failed to import")
5457 *
5458 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
5459 * try:
5460 * _import_umath()
5461*/
5462
5463 /* function exit code */
5464 __pyx_r = 0;
5465 goto __pyx_L0;
5466 __pyx_L1_error:;
5467 __Pyx_XDECREF(__pyx_t_5);
5468 __Pyx_XDECREF(__pyx_t_6);
5469 __Pyx_XDECREF(__pyx_t_7);
5470 __Pyx_XDECREF(__pyx_t_8);
5471 __Pyx_XDECREF(__pyx_t_9);
5472 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
5473 __pyx_r = -1;
5474 __pyx_L0:;
5475
5476 __Pyx_RefNannyFinishContext();
5477 return __pyx_r;
5478}
5479
5480/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1096
5481 *
5482 *
5483 * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5484 * """
5485 * Cython equivalent of `isinstance(obj, np.timedelta64)`
5486*/
5487
5488static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
5489 int __pyx_r;
5490
5491 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1108
5492 * bool
5493 * """
5494 * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
5495 *
5496 *
5497*/
5498 {
5499
5500 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
5501 }
5502 goto __pyx_L0;
5503
5504 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1096
5505 *
5506 *
5507 * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5508 * """
5509 * Cython equivalent of `isinstance(obj, np.timedelta64)`
5510*/
5511
5512 /* function exit code */
5513 __pyx_L0:;
5514
5515 return __pyx_r;
5516}
5517
5518/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1111
5519 *
5520 *
5521 * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5522 * """
5523 * Cython equivalent of `isinstance(obj, np.datetime64)`
5524*/
5525
5526static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
5527 int __pyx_r;
5528
5529 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1123
5530 * bool
5531 * """
5532 * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
5533 *
5534 *
5535*/
5536 {
5537
5538 __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
5539 }
5540 goto __pyx_L0;
5541
5542 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1111
5543 *
5544 *
5545 * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<<
5546 * """
5547 * Cython equivalent of `isinstance(obj, np.datetime64)`
5548*/
5549
5550 /* function exit code */
5551 __pyx_L0:;
5552
5553 return __pyx_r;
5554}
5555
5556/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1126
5557 *
5558 *
5559 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5560 * """
5561 * returns the int64 value underlying scalar numpy datetime64 object
5562*/
5563
5564static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
5565 npy_datetime __pyx_r;
5566
5567 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1133
5568 * also needed. That can be found using `get_datetime64_unit`.
5569 * """
5570 * return _PyDatetimeScalarObject_GetValue(obj) # <<<<<<<<<<<<<<
5571 *
5572 *
5573*/
5574 {
5575
5576 __pyx_r = _PyDatetimeScalarObject_GetValue(__pyx_v_obj);
5577 }
5578 goto __pyx_L0;
5579
5580 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1126
5581 *
5582 *
5583 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5584 * """
5585 * returns the int64 value underlying scalar numpy datetime64 object
5586*/
5587
5588 /* function exit code */
5589 __pyx_L0:;
5590 return __pyx_r;
5591}
5592
5593/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1136
5594 *
5595 *
5596 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5597 * """
5598 * returns the int64 value underlying scalar numpy timedelta64 object
5599*/
5600
5601static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
5602 npy_timedelta __pyx_r;
5603
5604 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1140
5605 * returns the int64 value underlying scalar numpy timedelta64 object
5606 * """
5607 * return _PyTimedeltaScalarObject_GetValue(obj) # <<<<<<<<<<<<<<
5608 *
5609 *
5610*/
5611 {
5612
5613 __pyx_r = _PyTimedeltaScalarObject_GetValue(__pyx_v_obj);
5614 }
5615 goto __pyx_L0;
5616
5617 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1136
5618 *
5619 *
5620 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5621 * """
5622 * returns the int64 value underlying scalar numpy timedelta64 object
5623*/
5624
5625 /* function exit code */
5626 __pyx_L0:;
5627 return __pyx_r;
5628}
5629
5630/* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1143
5631 *
5632 *
5633 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5634 * """
5635 * returns the unit part of the dtype for a numpy datetime64 object.
5636*/
5637
5638static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
5639 NPY_DATETIMEUNIT __pyx_r;
5640
5641 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1147
5642 * returns the unit part of the dtype for a numpy datetime64 object.
5643 * """
5644 * return _PyDatetimeScalarObject_GetMetadata(obj).base # <<<<<<<<<<<<<<
5645 *
5646 *
5647*/
5648 {
5649
5650 __pyx_r = _PyDatetimeScalarObject_GetMetadata(__pyx_v_obj).base;
5651 }
5652 goto __pyx_L0;
5653
5654 /* "../miniforge3/envs/proteus-jupyterhub/lib/python3.14/site-packages/numpy/__init__.cython-30.pxd":1143
5655 *
5656 *
5657 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<<
5658 * """
5659 * returns the unit part of the dtype for a numpy datetime64 object.
5660*/
5661
5662 /* function exit code */
5663 __pyx_L0:;
5664 return __pyx_r;
5665}
5666
5667/* "cpskRelations.pyx":7
5668 * cimport pskRelations
5669 *
5670 * def vgm_cal_from_sw(double Sw, # <<<<<<<<<<<<<<
5671 * double sw_min,
5672 * double sw_max,
5673*/
5674
5675/* Python wrapper */
5676static PyObject *__pyx_pw_13cpskRelations_1vgm_cal_from_sw(PyObject *__pyx_self,
5677#if CYTHON_VECTORCALL
5678PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5679#else
5680PyObject *__pyx_args, PyObject *__pyx_kwds
5681#endif
5682); /*proto*/
5683static PyMethodDef __pyx_mdef_13cpskRelations_1vgm_cal_from_sw = {"vgm_cal_from_sw", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_13cpskRelations_1vgm_cal_from_sw, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
5684static PyObject *__pyx_pw_13cpskRelations_1vgm_cal_from_sw(PyObject *__pyx_self,
5685#if CYTHON_VECTORCALL
5686PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
5687#else
5688PyObject *__pyx_args, PyObject *__pyx_kwds
5689#endif
5690) {
5691 double __pyx_v_Sw;
5692 double __pyx_v_sw_min;
5693 double __pyx_v_sw_max;
5694 double __pyx_v_alpha;
5695 double __pyx_v_m;
5696 double __pyx_v_eps_small;
5697 double __pyx_v_ns_del;
5698 #if !CYTHON_VECTORCALL
5699 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
5700 #endif
5701 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
5702 PyObject* values[7] = {0,0,0,0,0,0,0};
5703 int __pyx_lineno = 0;
5704 const char *__pyx_filename = NULL;
5705 int __pyx_clineno = 0;
5706 PyObject *__pyx_r = 0;
5707 __Pyx_RefNannyDeclarations
5708 __Pyx_RefNannySetupContext("vgm_cal_from_sw (wrapper)", 0);
5709 #if !CYTHON_VECTORCALL
5710 #if CYTHON_ASSUME_SAFE_SIZE
5711 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
5712 #else
5713 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
5714 #endif
5715 #endif
5716 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
5717 {
5718 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_Sw,&__pyx_mstate_global->__pyx_n_u_sw_min,&__pyx_mstate_global->__pyx_n_u_sw_max,&__pyx_mstate_global->__pyx_n_u_alpha,&__pyx_mstate_global->__pyx_n_u_m,&__pyx_mstate_global->__pyx_n_u_eps_small,&__pyx_mstate_global->__pyx_n_u_ns_del,0};
5719 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
5720 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 7, __pyx_L3_error)
5721 if (__pyx_kwds_len > 0) {
5722 switch (__pyx_nargs) {
5723 case 7:
5724 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5725 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 7, __pyx_L3_error)
5726 CYTHON_FALLTHROUGH;
5727 case 6:
5728 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5729 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 7, __pyx_L3_error)
5730 CYTHON_FALLTHROUGH;
5731 case 5:
5732 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5733 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 7, __pyx_L3_error)
5734 CYTHON_FALLTHROUGH;
5735 case 4:
5736 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5737 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 7, __pyx_L3_error)
5738 CYTHON_FALLTHROUGH;
5739 case 3:
5740 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5741 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 7, __pyx_L3_error)
5742 CYTHON_FALLTHROUGH;
5743 case 2:
5744 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5745 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7, __pyx_L3_error)
5746 CYTHON_FALLTHROUGH;
5747 case 1:
5748 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5749 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7, __pyx_L3_error)
5750 CYTHON_FALLTHROUGH;
5751 case 0: break;
5752 default: goto __pyx_L5_argtuple_error;
5753 }
5754 const Py_ssize_t kwd_pos_args = __pyx_nargs;
5755 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "vgm_cal_from_sw", 0) < (0)) __PYX_ERR(0, 7, __pyx_L3_error)
5756 for (Py_ssize_t i = __pyx_nargs; i < 7; i++) {
5757 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("vgm_cal_from_sw", 1, 7, 7, i); __PYX_ERR(0, 7, __pyx_L3_error) }
5758 }
5759 } else if (unlikely(__pyx_nargs != 7)) {
5760 goto __pyx_L5_argtuple_error;
5761 } else {
5762 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
5763 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7, __pyx_L3_error)
5764 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
5765 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 7, __pyx_L3_error)
5766 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
5767 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 7, __pyx_L3_error)
5768 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
5769 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 7, __pyx_L3_error)
5770 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
5771 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 7, __pyx_L3_error)
5772 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
5773 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 7, __pyx_L3_error)
5774 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
5775 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 7, __pyx_L3_error)
5776 }
5777 __pyx_v_Sw = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_Sw == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 7, __pyx_L3_error)
5778 __pyx_v_sw_min = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_sw_min == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 8, __pyx_L3_error)
5779 __pyx_v_sw_max = __Pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_sw_max == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 9, __pyx_L3_error)
5780 __pyx_v_alpha = __Pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 10, __pyx_L3_error)
5781 __pyx_v_m = __Pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_m == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 11, __pyx_L3_error)
5782 __pyx_v_eps_small = __Pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_eps_small == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
5783 __pyx_v_ns_del = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_ns_del == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 13, __pyx_L3_error)
5784 }
5785 goto __pyx_L6_skip;
5786 __pyx_L5_argtuple_error:;
5787 __Pyx_RaiseArgtupleInvalid("vgm_cal_from_sw", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 7, __pyx_L3_error)
5788 __pyx_L6_skip:;
5789 goto __pyx_L4_argument_unpacking_done;
5790 __pyx_L3_error:;
5791 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5792 Py_XDECREF(values[__pyx_temp]);
5793 }
5794 __Pyx_AddTraceback("cpskRelations.vgm_cal_from_sw", __pyx_clineno, __pyx_lineno, __pyx_filename);
5795 __Pyx_RefNannyFinishContext();
5796 return NULL;
5797 __pyx_L4_argument_unpacking_done:;
5798 __pyx_r = __pyx_pf_13cpskRelations_vgm_cal_from_sw(__pyx_self, __pyx_v_Sw, __pyx_v_sw_min, __pyx_v_sw_max, __pyx_v_alpha, __pyx_v_m, __pyx_v_eps_small, __pyx_v_ns_del);
5799
5800 /* function exit code */
5801 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
5802 Py_XDECREF(values[__pyx_temp]);
5803 }
5804
5805
5806
5807
5808
5809
5810
5811 __Pyx_RefNannyFinishContext();
5812 return __pyx_r;
5813}
5814
5815static PyObject *__pyx_pf_13cpskRelations_vgm_cal_from_sw(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_Sw, double __pyx_v_sw_min, double __pyx_v_sw_max, double __pyx_v_alpha, double __pyx_v_m, double __pyx_v_eps_small, double __pyx_v_ns_del) {
5816 double __pyx_v_rwork[4];
5817 double __pyx_v_rwork_tol[2];
5818 VGM __pyx_v_psk;
5819 PyObject *__pyx_r = NULL;
5820 __Pyx_RefNannyDeclarations
5821 PyObject *__pyx_t_1 = NULL;
5822 PyObject *__pyx_t_2 = NULL;
5823 PyObject *__pyx_t_3 = NULL;
5824 PyObject *__pyx_t_4 = NULL;
5825 PyObject *__pyx_t_5 = NULL;
5826 PyObject *__pyx_t_6 = NULL;
5827 PyObject *__pyx_t_7 = NULL;
5828 int __pyx_lineno = 0;
5829 const char *__pyx_filename = NULL;
5830 int __pyx_clineno = 0;
5831 __Pyx_RefNannySetupContext("vgm_cal_from_sw", 0);
5832
5833 /* "cpskRelations.pyx":16
5834 * cdef double rwork[4]
5835 * cdef double rwork_tol[2]
5836 * rwork[0]=sw_min # <<<<<<<<<<<<<<
5837 * rwork[1]=sw_max
5838 * rwork[2]=alpha
5839*/
5840 (__pyx_v_rwork[0]) = __pyx_v_sw_min;
5841
5842 /* "cpskRelations.pyx":17
5843 * cdef double rwork_tol[2]
5844 * rwork[0]=sw_min
5845 * rwork[1]=sw_max # <<<<<<<<<<<<<<
5846 * rwork[2]=alpha
5847 * rwork[3]=m;
5848*/
5849 (__pyx_v_rwork[1]) = __pyx_v_sw_max;
5850
5851 /* "cpskRelations.pyx":18
5852 * rwork[0]=sw_min
5853 * rwork[1]=sw_max
5854 * rwork[2]=alpha # <<<<<<<<<<<<<<
5855 * rwork[3]=m;
5856 * rwork_tol[0]=eps_small
5857*/
5858 (__pyx_v_rwork[2]) = __pyx_v_alpha;
5859
5860 /* "cpskRelations.pyx":19
5861 * rwork[1]=sw_max
5862 * rwork[2]=alpha
5863 * rwork[3]=m; # <<<<<<<<<<<<<<
5864 * rwork_tol[0]=eps_small
5865 * rwork_tol[1]=ns_del
5866*/
5867 (__pyx_v_rwork[3]) = __pyx_v_m;
5868
5869 /* "cpskRelations.pyx":20
5870 * rwork[2]=alpha
5871 * rwork[3]=m;
5872 * rwork_tol[0]=eps_small # <<<<<<<<<<<<<<
5873 * rwork_tol[1]=ns_del
5874 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork)
5875*/
5876 (__pyx_v_rwork_tol[0]) = __pyx_v_eps_small;
5877
5878 /* "cpskRelations.pyx":21
5879 * rwork[3]=m;
5880 * rwork_tol[0]=eps_small
5881 * rwork_tol[1]=ns_del # <<<<<<<<<<<<<<
5882 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork)
5883 * psk.setTolerances(rwork_tol)
5884*/
5885 (__pyx_v_rwork_tol[1]) = __pyx_v_ns_del;
5886
5887 /* "cpskRelations.pyx":22
5888 * rwork_tol[0]=eps_small
5889 * rwork_tol[1]=ns_del
5890 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork) # <<<<<<<<<<<<<<
5891 * psk.setTolerances(rwork_tol)
5892 * psk.calc(Sw);
5893*/
5894 __pyx_v_psk = VGM(__pyx_v_rwork);
5895
5896 /* "cpskRelations.pyx":23
5897 * rwork_tol[1]=ns_del
5898 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork)
5899 * psk.setTolerances(rwork_tol) # <<<<<<<<<<<<<<
5900 * psk.calc(Sw);
5901 * return (psk.psic,psk.krw,psk.krn,psk.dpsic,psk.dkrw,psk.dkrn)
5902*/
5903 __pyx_v_psk.setTolerances(__pyx_v_rwork_tol);
5904
5905 /* "cpskRelations.pyx":24
5906 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork)
5907 * psk.setTolerances(rwork_tol)
5908 * psk.calc(Sw); # <<<<<<<<<<<<<<
5909 * return (psk.psic,psk.krw,psk.krn,psk.dpsic,psk.dkrw,psk.dkrn)
5910 *
5911*/
5912 __pyx_v_psk.calc(__pyx_v_Sw);
5913
5914 /* "cpskRelations.pyx":25
5915 * psk.setTolerances(rwork_tol)
5916 * psk.calc(Sw);
5917 * return (psk.psic,psk.krw,psk.krn,psk.dpsic,psk.dkrw,psk.dkrn) # <<<<<<<<<<<<<<
5918 *
5919 * def vgm_calc_from_psic(double psic,
5920*/
5921 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_psk.psic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
5922 __Pyx_GOTREF(__pyx_t_1);
5923 __pyx_t_2 = PyFloat_FromDouble(__pyx_v_psk.krw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
5924 __Pyx_GOTREF(__pyx_t_2);
5925 __pyx_t_3 = PyFloat_FromDouble(__pyx_v_psk.krn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
5926 __Pyx_GOTREF(__pyx_t_3);
5927 __pyx_t_4 = PyFloat_FromDouble(__pyx_v_psk.dpsic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)
5928 __Pyx_GOTREF(__pyx_t_4);
5929 __pyx_t_5 = PyFloat_FromDouble(__pyx_v_psk.dkrw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25, __pyx_L1_error)
5930 __Pyx_GOTREF(__pyx_t_5);
5931 __pyx_t_6 = PyFloat_FromDouble(__pyx_v_psk.dkrn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 25, __pyx_L1_error)
5932 __Pyx_GOTREF(__pyx_t_6);
5933 __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25, __pyx_L1_error)
5934 __Pyx_GOTREF(__pyx_t_7);
5935 __Pyx_GIVEREF(__pyx_t_1);
5936 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 25, __pyx_L1_error);
5937 __Pyx_GIVEREF(__pyx_t_2);
5938 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 25, __pyx_L1_error);
5939 __Pyx_GIVEREF(__pyx_t_3);
5940 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 25, __pyx_L1_error);
5941 __Pyx_GIVEREF(__pyx_t_4);
5942 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 25, __pyx_L1_error);
5943 __Pyx_GIVEREF(__pyx_t_5);
5944 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 25, __pyx_L1_error);
5945 __Pyx_GIVEREF(__pyx_t_6);
5946 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_6) != (0)) __PYX_ERR(0, 25, __pyx_L1_error);
5947 __pyx_t_1 = 0;
5948 __pyx_t_2 = 0;
5949 __pyx_t_3 = 0;
5950 __pyx_t_4 = 0;
5951 __pyx_t_5 = 0;
5952 __pyx_t_6 = 0;
5953 {
5954 PyObject *__pyx_temp;
5955 {
5956 __pyx_temp = __pyx_r;
5957 __pyx_r = __pyx_t_7;
5958 }
5959 __Pyx_XDECREF(__pyx_temp);
5960 }
5961 __pyx_t_7 = 0;
5962 goto __pyx_L0;
5963
5964 /* "cpskRelations.pyx":7
5965 * cimport pskRelations
5966 *
5967 * def vgm_cal_from_sw(double Sw, # <<<<<<<<<<<<<<
5968 * double sw_min,
5969 * double sw_max,
5970*/
5971
5972 /* function exit code */
5973 __pyx_L1_error:;
5974 __Pyx_XDECREF(__pyx_t_1);
5975 __Pyx_XDECREF(__pyx_t_2);
5976 __Pyx_XDECREF(__pyx_t_3);
5977 __Pyx_XDECREF(__pyx_t_4);
5978 __Pyx_XDECREF(__pyx_t_5);
5979 __Pyx_XDECREF(__pyx_t_6);
5980 __Pyx_XDECREF(__pyx_t_7);
5981 __Pyx_AddTraceback("cpskRelations.vgm_cal_from_sw", __pyx_clineno, __pyx_lineno, __pyx_filename);
5982 __pyx_r = NULL;
5983 __pyx_L0:;
5984
5985
5986
5987 __Pyx_XGIVEREF(__pyx_r);
5988 __Pyx_RefNannyFinishContext();
5989 return __pyx_r;
5990}
5991
5992/* "cpskRelations.pyx":27
5993 * return (psk.psic,psk.krw,psk.krn,psk.dpsic,psk.dkrw,psk.dkrn)
5994 *
5995 * def vgm_calc_from_psic(double psic, # <<<<<<<<<<<<<<
5996 * double sw_min,
5997 * double sw_max,
5998*/
5999
6000/* Python wrapper */
6001static PyObject *__pyx_pw_13cpskRelations_3vgm_calc_from_psic(PyObject *__pyx_self,
6002#if CYTHON_VECTORCALL
6003PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6004#else
6005PyObject *__pyx_args, PyObject *__pyx_kwds
6006#endif
6007); /*proto*/
6008static PyMethodDef __pyx_mdef_13cpskRelations_3vgm_calc_from_psic = {"vgm_calc_from_psic", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_13cpskRelations_3vgm_calc_from_psic, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
6009static PyObject *__pyx_pw_13cpskRelations_3vgm_calc_from_psic(PyObject *__pyx_self,
6010#if CYTHON_VECTORCALL
6011PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
6012#else
6013PyObject *__pyx_args, PyObject *__pyx_kwds
6014#endif
6015) {
6016 double __pyx_v_psic;
6017 double __pyx_v_sw_min;
6018 double __pyx_v_sw_max;
6019 double __pyx_v_alpha;
6020 double __pyx_v_m;
6021 double __pyx_v_eps_small;
6022 double __pyx_v_ns_del;
6023 #if !CYTHON_VECTORCALL
6024 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
6025 #endif
6026 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
6027 PyObject* values[7] = {0,0,0,0,0,0,0};
6028 int __pyx_lineno = 0;
6029 const char *__pyx_filename = NULL;
6030 int __pyx_clineno = 0;
6031 PyObject *__pyx_r = 0;
6032 __Pyx_RefNannyDeclarations
6033 __Pyx_RefNannySetupContext("vgm_calc_from_psic (wrapper)", 0);
6034 #if !CYTHON_VECTORCALL
6035 #if CYTHON_ASSUME_SAFE_SIZE
6036 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
6037 #else
6038 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
6039 #endif
6040 #endif
6041 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
6042 {
6043 PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_psic,&__pyx_mstate_global->__pyx_n_u_sw_min,&__pyx_mstate_global->__pyx_n_u_sw_max,&__pyx_mstate_global->__pyx_n_u_alpha,&__pyx_mstate_global->__pyx_n_u_m,&__pyx_mstate_global->__pyx_n_u_eps_small,&__pyx_mstate_global->__pyx_n_u_ns_del,0};
6044 const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6045 if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 27, __pyx_L3_error)
6046 if (__pyx_kwds_len > 0) {
6047 switch (__pyx_nargs) {
6048 case 7:
6049 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6050 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 27, __pyx_L3_error)
6051 CYTHON_FALLTHROUGH;
6052 case 6:
6053 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6054 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 27, __pyx_L3_error)
6055 CYTHON_FALLTHROUGH;
6056 case 5:
6057 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6058 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 27, __pyx_L3_error)
6059 CYTHON_FALLTHROUGH;
6060 case 4:
6061 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6062 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 27, __pyx_L3_error)
6063 CYTHON_FALLTHROUGH;
6064 case 3:
6065 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6066 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 27, __pyx_L3_error)
6067 CYTHON_FALLTHROUGH;
6068 case 2:
6069 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6070 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 27, __pyx_L3_error)
6071 CYTHON_FALLTHROUGH;
6072 case 1:
6073 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6074 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 27, __pyx_L3_error)
6075 CYTHON_FALLTHROUGH;
6076 case 0: break;
6077 default: goto __pyx_L5_argtuple_error;
6078 }
6079 const Py_ssize_t kwd_pos_args = __pyx_nargs;
6080 if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "vgm_calc_from_psic", 0) < (0)) __PYX_ERR(0, 27, __pyx_L3_error)
6081 for (Py_ssize_t i = __pyx_nargs; i < 7; i++) {
6082 if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("vgm_calc_from_psic", 1, 7, 7, i); __PYX_ERR(0, 27, __pyx_L3_error) }
6083 }
6084 } else if (unlikely(__pyx_nargs != 7)) {
6085 goto __pyx_L5_argtuple_error;
6086 } else {
6087 values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6088 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 27, __pyx_L3_error)
6089 values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6090 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 27, __pyx_L3_error)
6091 values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6092 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 27, __pyx_L3_error)
6093 values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
6094 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 27, __pyx_L3_error)
6095 values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
6096 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 27, __pyx_L3_error)
6097 values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
6098 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 27, __pyx_L3_error)
6099 values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
6100 if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 27, __pyx_L3_error)
6101 }
6102 __pyx_v_psic = __Pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_psic == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 27, __pyx_L3_error)
6103 __pyx_v_sw_min = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_sw_min == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 28, __pyx_L3_error)
6104 __pyx_v_sw_max = __Pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_sw_max == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 29, __pyx_L3_error)
6105 __pyx_v_alpha = __Pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 30, __pyx_L3_error)
6106 __pyx_v_m = __Pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_m == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 31, __pyx_L3_error)
6107 __pyx_v_eps_small = __Pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_eps_small == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 32, __pyx_L3_error)
6108 __pyx_v_ns_del = __Pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_ns_del == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L3_error)
6109 }
6110 goto __pyx_L6_skip;
6111 __pyx_L5_argtuple_error:;
6112 __Pyx_RaiseArgtupleInvalid("vgm_calc_from_psic", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 27, __pyx_L3_error)
6113 __pyx_L6_skip:;
6114 goto __pyx_L4_argument_unpacking_done;
6115 __pyx_L3_error:;
6116 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6117 Py_XDECREF(values[__pyx_temp]);
6118 }
6119 __Pyx_AddTraceback("cpskRelations.vgm_calc_from_psic", __pyx_clineno, __pyx_lineno, __pyx_filename);
6120 __Pyx_RefNannyFinishContext();
6121 return NULL;
6122 __pyx_L4_argument_unpacking_done:;
6123 __pyx_r = __pyx_pf_13cpskRelations_2vgm_calc_from_psic(__pyx_self, __pyx_v_psic, __pyx_v_sw_min, __pyx_v_sw_max, __pyx_v_alpha, __pyx_v_m, __pyx_v_eps_small, __pyx_v_ns_del);
6124
6125 /* function exit code */
6126 for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
6127 Py_XDECREF(values[__pyx_temp]);
6128 }
6129
6130
6131
6132
6133
6134
6135
6136 __Pyx_RefNannyFinishContext();
6137 return __pyx_r;
6138}
6139
6140static PyObject *__pyx_pf_13cpskRelations_2vgm_calc_from_psic(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_psic, double __pyx_v_sw_min, double __pyx_v_sw_max, double __pyx_v_alpha, double __pyx_v_m, double __pyx_v_eps_small, double __pyx_v_ns_del) {
6141 double __pyx_v_rwork[4];
6142 double __pyx_v_rwork_tol[2];
6143 VGM __pyx_v_psk;
6144 PyObject *__pyx_r = NULL;
6145 __Pyx_RefNannyDeclarations
6146 PyObject *__pyx_t_1 = NULL;
6147 PyObject *__pyx_t_2 = NULL;
6148 PyObject *__pyx_t_3 = NULL;
6149 PyObject *__pyx_t_4 = NULL;
6150 PyObject *__pyx_t_5 = NULL;
6151 PyObject *__pyx_t_6 = NULL;
6152 PyObject *__pyx_t_7 = NULL;
6153 int __pyx_lineno = 0;
6154 const char *__pyx_filename = NULL;
6155 int __pyx_clineno = 0;
6156 __Pyx_RefNannySetupContext("vgm_calc_from_psic", 0);
6157
6158 /* "cpskRelations.pyx":36
6159 * cdef double rwork[4]
6160 * cdef double rwork_tol[2]
6161 * rwork[0]=sw_min # <<<<<<<<<<<<<<
6162 * rwork[1]=sw_max
6163 * rwork[2]=alpha
6164*/
6165 (__pyx_v_rwork[0]) = __pyx_v_sw_min;
6166
6167 /* "cpskRelations.pyx":37
6168 * cdef double rwork_tol[2]
6169 * rwork[0]=sw_min
6170 * rwork[1]=sw_max # <<<<<<<<<<<<<<
6171 * rwork[2]=alpha
6172 * rwork[3]=m;
6173*/
6174 (__pyx_v_rwork[1]) = __pyx_v_sw_max;
6175
6176 /* "cpskRelations.pyx":38
6177 * rwork[0]=sw_min
6178 * rwork[1]=sw_max
6179 * rwork[2]=alpha # <<<<<<<<<<<<<<
6180 * rwork[3]=m;
6181 * rwork_tol[0]=eps_small
6182*/
6183 (__pyx_v_rwork[2]) = __pyx_v_alpha;
6184
6185 /* "cpskRelations.pyx":39
6186 * rwork[1]=sw_max
6187 * rwork[2]=alpha
6188 * rwork[3]=m; # <<<<<<<<<<<<<<
6189 * rwork_tol[0]=eps_small
6190 * rwork_tol[1]=ns_del
6191*/
6192 (__pyx_v_rwork[3]) = __pyx_v_m;
6193
6194 /* "cpskRelations.pyx":40
6195 * rwork[2]=alpha
6196 * rwork[3]=m;
6197 * rwork_tol[0]=eps_small # <<<<<<<<<<<<<<
6198 * rwork_tol[1]=ns_del
6199 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork)
6200*/
6201 (__pyx_v_rwork_tol[0]) = __pyx_v_eps_small;
6202
6203 /* "cpskRelations.pyx":41
6204 * rwork[3]=m;
6205 * rwork_tol[0]=eps_small
6206 * rwork_tol[1]=ns_del # <<<<<<<<<<<<<<
6207 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork)
6208 * psk.setTolerances(rwork_tol)
6209*/
6210 (__pyx_v_rwork_tol[1]) = __pyx_v_ns_del;
6211
6212 /* "cpskRelations.pyx":42
6213 * rwork_tol[0]=eps_small
6214 * rwork_tol[1]=ns_del
6215 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork) # <<<<<<<<<<<<<<
6216 * psk.setTolerances(rwork_tol)
6217 * psk.calc_from_psic(psic)
6218*/
6219 __pyx_v_psk = VGM(__pyx_v_rwork);
6220
6221 /* "cpskRelations.pyx":43
6222 * rwork_tol[1]=ns_del
6223 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork)
6224 * psk.setTolerances(rwork_tol) # <<<<<<<<<<<<<<
6225 * psk.calc_from_psic(psic)
6226 * return (psk.Se,psk.krw,psk.krn,psk.dSe_dpsic,psk.dkrw,psk.dkrn)
6227*/
6228 __pyx_v_psk.setTolerances(__pyx_v_rwork_tol);
6229
6230 /* "cpskRelations.pyx":44
6231 * cdef pskRelations.VGM psk = pskRelations.VGM(rwork)
6232 * psk.setTolerances(rwork_tol)
6233 * psk.calc_from_psic(psic) # <<<<<<<<<<<<<<
6234 * return (psk.Se,psk.krw,psk.krn,psk.dSe_dpsic,psk.dkrw,psk.dkrn)
6235*/
6236 __pyx_v_psk.calc_from_psic(__pyx_v_psic);
6237
6238 /* "cpskRelations.pyx":45
6239 * psk.setTolerances(rwork_tol)
6240 * psk.calc_from_psic(psic)
6241 * return (psk.Se,psk.krw,psk.krn,psk.dSe_dpsic,psk.dkrw,psk.dkrn) # <<<<<<<<<<<<<<
6242*/
6243 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_psk.Se); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
6244 __Pyx_GOTREF(__pyx_t_1);
6245 __pyx_t_2 = PyFloat_FromDouble(__pyx_v_psk.krw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
6246 __Pyx_GOTREF(__pyx_t_2);
6247 __pyx_t_3 = PyFloat_FromDouble(__pyx_v_psk.krn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
6248 __Pyx_GOTREF(__pyx_t_3);
6249 __pyx_t_4 = PyFloat_FromDouble(__pyx_v_psk.dSe_dpsic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
6250 __Pyx_GOTREF(__pyx_t_4);
6251 __pyx_t_5 = PyFloat_FromDouble(__pyx_v_psk.dkrw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
6252 __Pyx_GOTREF(__pyx_t_5);
6253 __pyx_t_6 = PyFloat_FromDouble(__pyx_v_psk.dkrn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
6254 __Pyx_GOTREF(__pyx_t_6);
6255 __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 45, __pyx_L1_error)
6256 __Pyx_GOTREF(__pyx_t_7);
6257 __Pyx_GIVEREF(__pyx_t_1);
6258 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 45, __pyx_L1_error);
6259 __Pyx_GIVEREF(__pyx_t_2);
6260 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 45, __pyx_L1_error);
6261 __Pyx_GIVEREF(__pyx_t_3);
6262 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 45, __pyx_L1_error);
6263 __Pyx_GIVEREF(__pyx_t_4);
6264 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 45, __pyx_L1_error);
6265 __Pyx_GIVEREF(__pyx_t_5);
6266 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 45, __pyx_L1_error);
6267 __Pyx_GIVEREF(__pyx_t_6);
6268 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_6) != (0)) __PYX_ERR(0, 45, __pyx_L1_error);
6269 __pyx_t_1 = 0;
6270 __pyx_t_2 = 0;
6271 __pyx_t_3 = 0;
6272 __pyx_t_4 = 0;
6273 __pyx_t_5 = 0;
6274 __pyx_t_6 = 0;
6275 {
6276 PyObject *__pyx_temp;
6277 {
6278 __pyx_temp = __pyx_r;
6279 __pyx_r = __pyx_t_7;
6280 }
6281 __Pyx_XDECREF(__pyx_temp);
6282 }
6283 __pyx_t_7 = 0;
6284 goto __pyx_L0;
6285
6286 /* "cpskRelations.pyx":27
6287 * return (psk.psic,psk.krw,psk.krn,psk.dpsic,psk.dkrw,psk.dkrn)
6288 *
6289 * def vgm_calc_from_psic(double psic, # <<<<<<<<<<<<<<
6290 * double sw_min,
6291 * double sw_max,
6292*/
6293
6294 /* function exit code */
6295 __pyx_L1_error:;
6296 __Pyx_XDECREF(__pyx_t_1);
6297 __Pyx_XDECREF(__pyx_t_2);
6298 __Pyx_XDECREF(__pyx_t_3);
6299 __Pyx_XDECREF(__pyx_t_4);
6300 __Pyx_XDECREF(__pyx_t_5);
6301 __Pyx_XDECREF(__pyx_t_6);
6302 __Pyx_XDECREF(__pyx_t_7);
6303 __Pyx_AddTraceback("cpskRelations.vgm_calc_from_psic", __pyx_clineno, __pyx_lineno, __pyx_filename);
6304 __pyx_r = NULL;
6305 __pyx_L0:;
6306
6307
6308
6309 __Pyx_XGIVEREF(__pyx_r);
6310 __Pyx_RefNannyFinishContext();
6311 return __pyx_r;
6312}
6313/* #### Code section: module_exttypes ### */
6314
6315static PyMethodDef __pyx_methods[] = {
6316 {0, 0, 0, 0}
6317};
6318/* #### Code section: initfunc_declarations ### */
6319static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
6320static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
6321static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
6322static CYTHON_SMALL_CODE int __Pyx_InitAfterSharedUtility(void); /*proto*/
6323static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
6324static CYTHON_SMALL_CODE int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
6325static CYTHON_SMALL_CODE int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
6326static CYTHON_SMALL_CODE int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
6327static CYTHON_SMALL_CODE int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
6328static CYTHON_SMALL_CODE int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
6329static CYTHON_SMALL_CODE int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
6330static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
6331/* #### Code section: init_module ### */
6332
6333static int __Pyx_modinit_Global_init_code(__pyx_mstatetype *__pyx_mstate) {
6334 __Pyx_RefNannyDeclarations
6335 CYTHON_UNUSED_VAR(__pyx_mstate);
6336 __Pyx_RefNannySetupContext("__Pyx_modinit_Global_init_code", 0);
6337 /*--- Global init code ---*/
6338 __Pyx_RefNannyFinishContext();
6339 return 0;
6340}
6341
6342static int __Pyx_modinit_Variable_export_code(__pyx_mstatetype *__pyx_mstate) {
6343 __Pyx_RefNannyDeclarations
6344 CYTHON_UNUSED_VAR(__pyx_mstate);
6345 __Pyx_RefNannySetupContext("__Pyx_modinit_Variable_export_code", 0);
6346 /*--- Variable export code ---*/
6347 __Pyx_RefNannyFinishContext();
6348 return 0;
6349}
6350
6351static int __Pyx_modinit_Function_export_code(__pyx_mstatetype *__pyx_mstate) {
6352 __Pyx_RefNannyDeclarations
6353 CYTHON_UNUSED_VAR(__pyx_mstate);
6354 __Pyx_RefNannySetupContext("__Pyx_modinit_Function_export_code", 0);
6355 /*--- Function export code ---*/
6356 __Pyx_RefNannyFinishContext();
6357 return 0;
6358}
6359
6360static int __Pyx_modinit_Type_import_code(__pyx_mstatetype *__pyx_mstate) {
6361 __Pyx_RefNannyDeclarations
6362 PyObject *__pyx_t_1 = NULL;
6363 int __pyx_lineno = 0;
6364 const char *__pyx_filename = NULL;
6365 int __pyx_clineno = 0;
6366 CYTHON_UNUSED_VAR(__pyx_mstate);
6367 __Pyx_RefNannySetupContext("__Pyx_modinit_Type_import_code", 0);
6368 /*--- Type import code ---*/
6369 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
6370 __Pyx_GOTREF(__pyx_t_1);
6371 __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_3_0(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
6372 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6373 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyTypeObject),
6374 #elif CYTHON_COMPILING_IN_LIMITED_API
6375 0, 0,
6376 #else
6377 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyHeapTypeObject),
6378 #endif
6379 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
6380 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6381 __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
6382 __Pyx_GOTREF(__pyx_t_1);
6383 __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "dtype",
6384 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6385 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
6386 #elif CYTHON_COMPILING_IN_LIMITED_API
6387 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
6388 #else
6389 sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArray_Descr),
6390 #endif
6391 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 229, __pyx_L1_error)
6392 __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "flatiter",
6393 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6394 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
6395 #elif CYTHON_COMPILING_IN_LIMITED_API
6396 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
6397 #else
6398 sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayIterObject),
6399 #endif
6400 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 286, __pyx_L1_error)
6401 __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "broadcast",
6402 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6403 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
6404 #elif CYTHON_COMPILING_IN_LIMITED_API
6405 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
6406 #else
6407 sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayMultiIterObject),
6408 #endif
6409 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 290, __pyx_L1_error)
6410 __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "ndarray",
6411 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6412 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
6413 #elif CYTHON_COMPILING_IN_LIMITED_API
6414 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
6415 #else
6416 sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyArrayObject),
6417 #endif
6418 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 329, __pyx_L1_error)
6419 __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "generic",
6420 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6421 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6422 #elif CYTHON_COMPILING_IN_LIMITED_API
6423 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6424 #else
6425 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6426 #endif
6427 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(1, 847, __pyx_L1_error)
6428 __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "number",
6429 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6430 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6431 #elif CYTHON_COMPILING_IN_LIMITED_API
6432 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6433 #else
6434 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6435 #endif
6436 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(1, 849, __pyx_L1_error)
6437 __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "integer",
6438 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6439 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6440 #elif CYTHON_COMPILING_IN_LIMITED_API
6441 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6442 #else
6443 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6444 #endif
6445 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(1, 851, __pyx_L1_error)
6446 __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "signedinteger",
6447 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6448 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6449 #elif CYTHON_COMPILING_IN_LIMITED_API
6450 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6451 #else
6452 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6453 #endif
6454 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 853, __pyx_L1_error)
6455 __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "unsignedinteger",
6456 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6457 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6458 #elif CYTHON_COMPILING_IN_LIMITED_API
6459 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6460 #else
6461 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6462 #endif
6463 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 855, __pyx_L1_error)
6464 __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "inexact",
6465 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6466 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6467 #elif CYTHON_COMPILING_IN_LIMITED_API
6468 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6469 #else
6470 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6471 #endif
6472 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 857, __pyx_L1_error)
6473 __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "floating",
6474 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6475 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6476 #elif CYTHON_COMPILING_IN_LIMITED_API
6477 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6478 #else
6479 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6480 #endif
6481 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(1, 859, __pyx_L1_error)
6482 __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "complexfloating",
6483 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6484 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6485 #elif CYTHON_COMPILING_IN_LIMITED_API
6486 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6487 #else
6488 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6489 #endif
6490 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 861, __pyx_L1_error)
6491 __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "flexible",
6492 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6493 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6494 #elif CYTHON_COMPILING_IN_LIMITED_API
6495 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6496 #else
6497 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6498 #endif
6499 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 863, __pyx_L1_error)
6500 __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "character",
6501 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6502 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6503 #elif CYTHON_COMPILING_IN_LIMITED_API
6504 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6505 #else
6506 sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyObject),
6507 #endif
6508 __Pyx_ImportType_CheckSize_Warn_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(1, 865, __pyx_L1_error)
6509 __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_3_0(__pyx_t_1, "numpy", "ufunc",
6510 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
6511 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
6512 #elif CYTHON_COMPILING_IN_LIMITED_API
6513 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
6514 #else
6515 sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_3_0(PyUFuncObject),
6516 #endif
6517 __Pyx_ImportType_CheckSize_Ignore_3_3_0); if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 946, __pyx_L1_error)
6518 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6519 __Pyx_RefNannyFinishContext();
6520 return 0;
6521 __pyx_L1_error:;
6522 __Pyx_XDECREF(__pyx_t_1);
6523 __Pyx_RefNannyFinishContext();
6524 return -1;
6525}
6526
6527static int __Pyx_modinit_Variable_import_code(__pyx_mstatetype *__pyx_mstate) {
6528 __Pyx_RefNannyDeclarations
6529 CYTHON_UNUSED_VAR(__pyx_mstate);
6530 __Pyx_RefNannySetupContext("__Pyx_modinit_Variable_import_code", 0);
6531 /*--- Variable import code ---*/
6532 __Pyx_RefNannyFinishContext();
6533 return 0;
6534}
6535
6536static int __Pyx_modinit_Function_import_code(__pyx_mstatetype *__pyx_mstate) {
6537 __Pyx_RefNannyDeclarations
6538 CYTHON_UNUSED_VAR(__pyx_mstate);
6539 __Pyx_RefNannySetupContext("__Pyx_modinit_Function_import_code", 0);
6540 /*--- Function import code ---*/
6541 __Pyx_RefNannyFinishContext();
6542 return 0;
6543}
6544
6545#if CYTHON_PEP489_MULTI_PHASE_INIT
6546static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
6547static int __pyx_pymod_exec_cpskRelations(PyObject* module); /*proto*/
6548static PyModuleDef_Slot __pyx_moduledef_slots[] = {
6549 {Py_mod_create, (void*)__pyx_pymod_create},
6550 {Py_mod_exec, (void*)__pyx_pymod_exec_cpskRelations},
6551 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
6552 {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
6553 #endif
6554 #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
6555 {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
6556 #endif
6557 {0, NULL}
6558};
6559#endif
6560
6561#ifdef __cplusplus
6562namespace {
6563 struct PyModuleDef __pyx_moduledef =
6564 #else
6565 static struct PyModuleDef __pyx_moduledef =
6566 #endif
6567 {
6568 PyModuleDef_HEAD_INIT,
6569 "cpskRelations",
6570 0, /* m_doc */
6571 #if CYTHON_USE_MODULE_STATE
6572 sizeof(__pyx_mstatetype), /* m_size */
6573 #else
6574 (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
6575 #endif
6576 __pyx_methods /* m_methods */,
6577 #if CYTHON_PEP489_MULTI_PHASE_INIT
6578 __pyx_moduledef_slots, /* m_slots */
6579 #else
6580 NULL, /* m_reload */
6581 #endif
6582 #if CYTHON_USE_MODULE_STATE
6583 __pyx_m_traverse, /* m_traverse */
6584 __pyx_m_clear, /* m_clear */
6585 NULL /* m_free */
6586 #else
6587 NULL, /* m_traverse */
6588 NULL, /* m_clear */
6589 NULL /* m_free */
6590 #endif
6591 };
6592 #ifdef __cplusplus
6593} /* anonymous namespace */
6594#endif
6595
6596/* PyModInitFuncType */
6597#ifndef CYTHON_NO_PYINIT_EXPORT
6598 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
6599#else
6600 #ifdef __cplusplus
6601 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
6602 #else
6603 #define __Pyx_PyMODINIT_FUNC PyObject *
6604 #endif
6605#endif
6606
6607__Pyx_PyMODINIT_FUNC PyInit_cpskRelations(void) CYTHON_SMALL_CODE; /*proto*/
6608__Pyx_PyMODINIT_FUNC PyInit_cpskRelations(void)
6609#if CYTHON_PEP489_MULTI_PHASE_INIT
6610{
6611 return PyModuleDef_Init(&__pyx_moduledef);
6612}
6613/* ModuleCreationPEP489 */
6614#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
6615 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
6616static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
6617 {
6618 PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
6619 if (!module) {
6620 if (!PyErr_ExceptionMatches(PyExc_Exception)) {
6621 goto bad; // BaseException
6622 }
6623 PyErr_Clear(); // just try the 3.8-3.12 version
6624 module = PyImport_ImportModule("_xxsubinterpreters");
6625 if (!module) goto bad;
6626 }
6627 PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
6628 Py_DECREF(module);
6629 if (!current) goto bad;
6630 if (PyTuple_Check(current)) {
6631 PyObject *new_current = PySequence_GetItem(current, 0);
6632 Py_DECREF(current);
6633 current = new_current;
6634 if (!new_current) goto bad;
6635 }
6636 long long as_c_int = PyLong_AsLongLong(current);
6637 Py_DECREF(current);
6638 return as_c_int;
6639 }
6640 bad:
6641 PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
6642 return -1;
6643}
6644#endif
6645#if !CYTHON_USE_MODULE_STATE
6646static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
6647 static PY_INT64_T main_interpreter_id = -1;
6648#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
6649 PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
6650#elif CYTHON_COMPILING_IN_GRAAL
6651 PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
6652#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x030A0000 &&\
6653 (defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)))
6654 PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
6655#elif CYTHON_COMPILING_IN_LIMITED_API
6656 PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
6657#else
6658 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
6659#endif
6660 if (unlikely(current_id == -1)) {
6661 return -1;
6662 }
6663 if (main_interpreter_id == -1) {
6664 main_interpreter_id = current_id;
6665 return 0;
6666 } else if (unlikely(main_interpreter_id != current_id)) {
6667 PyErr_SetString(
6668 PyExc_ImportError,
6669 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
6670 return -1;
6671 }
6672 return 0;
6673}
6674#endif
6675static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
6676{
6677 PyObject *value = PyObject_GetAttrString(spec, from_name);
6678 int result = 0;
6679 if (likely(value)) {
6680 if (allow_none || value != Py_None) {
6681 result = PyDict_SetItemString(moddict, to_name, value);
6682 }
6683 Py_DECREF(value);
6684 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
6685 PyErr_Clear();
6686 } else {
6687 result = -1;
6688 }
6689 return result;
6690}
6691static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
6692 PyObject *module = NULL, *moddict, *modname;
6693 CYTHON_UNUSED_VAR(def);
6694 #if !CYTHON_USE_MODULE_STATE
6695 if (__Pyx_check_single_interpreter())
6696 return NULL;
6697 #endif
6698 if (__pyx_m)
6699 return __Pyx_NewRef(__pyx_m);
6700 modname = PyObject_GetAttrString(spec, "name");
6701 if (unlikely(!modname)) goto bad;
6702 module = PyModule_NewObject(modname);
6703 Py_DECREF(modname);
6704 if (unlikely(!module)) goto bad;
6705 moddict = PyModule_GetDict(module);
6706 if (unlikely(!moddict)) goto bad;
6707 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
6708 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
6709 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
6710 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
6711 return module;
6712bad:
6713 Py_XDECREF(module);
6714 return NULL;
6715}
6716
6717
6718static CYTHON_SMALL_CODE int __pyx_pymod_exec_cpskRelations(PyObject *__pyx_pyinit_module)
6719#endif
6720{
6721 int stringtab_initialized = 0;
6722 #if CYTHON_USE_MODULE_STATE
6723 int pystate_addmodule_run = 0;
6724 #endif
6725 __pyx_mstatetype *__pyx_mstate = NULL;
6726 PyObject *__pyx_t_1 = NULL;
6727 PyObject *__pyx_t_2 = NULL;
6728 int __pyx_lineno = 0;
6729 const char *__pyx_filename = NULL;
6730 int __pyx_clineno = 0;
6731 __Pyx_RefNannyDeclarations
6732 #if CYTHON_PEP489_MULTI_PHASE_INIT
6733 if (__pyx_m) {
6734 if (__pyx_m == __pyx_pyinit_module) return 0;
6735 PyErr_SetString(PyExc_RuntimeError, "Module 'cpskRelations' has already been imported. Re-initialisation is not supported.");
6736 return -1;
6737 }
6738 #else
6739 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
6740 #endif
6741 /*--- Module creation code ---*/
6742 #if CYTHON_PEP489_MULTI_PHASE_INIT
6743 __pyx_t_1 = __pyx_pyinit_module;
6744 Py_INCREF(__pyx_t_1);
6745 #else
6746 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
6747 #endif
6748 #if CYTHON_USE_MODULE_STATE
6749 {
6750 int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
6751 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cpskRelations" pseudovariable */
6752 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
6753 pystate_addmodule_run = 1;
6754 }
6755 #else
6756 __pyx_m = __pyx_t_1;
6757 #endif
6758 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
6759 PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
6760 #endif
6761 __pyx_mstate = __pyx_mstate_global;
6762 CYTHON_UNUSED_VAR(__pyx_t_1);
6763 __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
6764 Py_INCREF(__pyx_mstate->__pyx_d);
6765 __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
6766 __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
6767 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
6768 /* ImportRefnannyAPI */
6769 #if CYTHON_REFNANNY
6770 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
6771 if (!__Pyx_RefNanny) {
6772 if (PyErr_ExceptionMatches(PyExc_Exception)) {
6773 PyErr_Clear();
6774 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
6775 }
6776 if (!__Pyx_RefNanny)
6777 Py_FatalError("failed to import 'refnanny' module");
6778 }
6779 #endif
6780
6781__Pyx_RefNannySetupContext("PyInit_cpskRelations", 0);
6782 __Pyx_init_runtime_version();
6783 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)
6784 __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
6785 __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
6786 __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
6787 /*--- Library function declarations ---*/
6788 /*--- Initialize various global constants etc. ---*/
6789 if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
6790 stringtab_initialized = 1;
6791 if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
6792 if (__pyx_module_is_main_cpskRelations) {
6793 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)
6794 }
6795 {
6796 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
6797 if (!PyDict_GetItemString(modules, "cpskRelations")) {
6798 if (unlikely((PyDict_SetItemString(modules, "cpskRelations", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
6799 }
6800 }
6801 /*--- Builtin init code ---*/
6802 if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
6803 /*--- Constants init code ---*/
6804 if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
6805 if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
6806 /*--- Global type/function init code ---*/
6807 (void)__Pyx_modinit_Global_init_code(__pyx_mstate);
6808 (void)__Pyx_modinit_Variable_export_code(__pyx_mstate);
6809 (void)__Pyx_modinit_Function_export_code(__pyx_mstate);
6810 /*--- Type init code ---*/
6811 if (unlikely((__Pyx_modinit_Type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
6812 (void)__Pyx_modinit_Variable_import_code(__pyx_mstate);
6813 (void)__Pyx_modinit_Function_import_code(__pyx_mstate);
6814 if (__Pyx_InitAfterSharedUtility() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
6815 /*--- Execution code ---*/
6816
6817 /* "cpskRelations.pyx":3
6818 * # A type of -*- python -*- file
6819 * # cython: language_level=3
6820 * import numpy as np # <<<<<<<<<<<<<<
6821 * cimport numpy as np
6822 * cimport pskRelations
6823*/
6824 __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)
6825 __pyx_t_2 = __pyx_t_1;
6826 __Pyx_GOTREF(__pyx_t_2);
6827 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)
6828 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6829
6830 /* "cpskRelations.pyx":7
6831 * cimport pskRelations
6832 *
6833 * def vgm_cal_from_sw(double Sw, # <<<<<<<<<<<<<<
6834 * double sw_min,
6835 * double sw_max,
6836*/
6837 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_13cpskRelations_1vgm_cal_from_sw, 0, __pyx_mstate_global->__pyx_n_u_vgm_cal_from_sw, NULL, __pyx_mstate_global->__pyx_n_u_cpskRelations, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
6838 __Pyx_GOTREF(__pyx_t_2);
6839 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
6840 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
6841 #endif
6842 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_vgm_cal_from_sw, __pyx_t_2) < (0)) __PYX_ERR(0, 7, __pyx_L1_error)
6843 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6844
6845 /* "cpskRelations.pyx":27
6846 * return (psk.psic,psk.krw,psk.krn,psk.dpsic,psk.dkrw,psk.dkrn)
6847 *
6848 * def vgm_calc_from_psic(double psic, # <<<<<<<<<<<<<<
6849 * double sw_min,
6850 * double sw_max,
6851*/
6852 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_13cpskRelations_3vgm_calc_from_psic, 0, __pyx_mstate_global->__pyx_n_u_vgm_calc_from_psic, NULL, __pyx_mstate_global->__pyx_n_u_cpskRelations, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
6853 __Pyx_GOTREF(__pyx_t_2);
6854 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
6855 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
6856 #endif
6857 if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_vgm_calc_from_psic, __pyx_t_2) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
6858 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6859
6860 /* "cpskRelations.pyx":1
6861 * # A type of -*- python -*- file # <<<<<<<<<<<<<<
6862 * # cython: language_level=3
6863 * import numpy as np
6864*/
6865 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
6866 __Pyx_GOTREF(__pyx_t_2);
6867 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)
6868 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6869
6870 /*--- Wrapped vars code ---*/
6871
6872 goto __pyx_L0;
6873 __pyx_L1_error:;
6874 __Pyx_XDECREF(__pyx_t_2);
6875 if (__pyx_m) {
6876 if (__pyx_mstate->__pyx_d && stringtab_initialized) {
6877 __Pyx_AddTraceback("init cpskRelations", __pyx_clineno, __pyx_lineno, __pyx_filename);
6878 }
6879 #if !CYTHON_USE_MODULE_STATE
6880 Py_CLEAR(__pyx_m);
6881 #else
6882 Py_DECREF(__pyx_m);
6883 if (pystate_addmodule_run) {
6884 PyObject *tp, *value, *tb;
6885 __Pyx_PyErr_FetchException(&tp, &value, &tb);
6886 __Pyx_State_RemoveModule(&__pyx_moduledef);
6887 __Pyx_PyErr_RestoreException(tp, value, tb);
6888 }
6889 #endif
6890 } else if (!PyErr_Occurred()) {
6891 PyErr_SetString(PyExc_ImportError, "init cpskRelations");
6892 }
6893 __pyx_L0:;
6894 __Pyx_RefNannyFinishContext();
6895 #if CYTHON_PEP489_MULTI_PHASE_INIT
6896 return (__pyx_m != NULL) ? 0 : -1;
6897 #else
6898 return __pyx_m;
6899 #endif
6900}
6901/* #### Code section: pystring_table ### */
6902/* #### Code section: cached_builtins ### */
6903
6904static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
6905 CYTHON_UNUSED_VAR(__pyx_mstate);
6906
6907 /* Cached unbound methods */
6908 __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
6909 __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
6910 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
6911 __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
6912 __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
6913 __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
6914 return 0;
6915}
6916/* #### Code section: cached_constants ### */
6917
6918static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
6919 __Pyx_RefNannyDeclarations
6920 CYTHON_UNUSED_VAR(__pyx_mstate);
6921 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
6922 __Pyx_RefNannyFinishContext();
6923 return 0;
6924}
6925/* #### Code section: init_constants ### */
6926
6927static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
6928 int __pyx_lineno = 0;
6929 const char *__pyx_filename = NULL;
6930 int __pyx_clineno = 0;
6931 CYTHON_UNUSED_VAR(__pyx_mstate);
6932 {
6933 const struct { const unsigned int length: 6; } str_length_index[] = {{1},{39},{34},{25},{2},{20},{12},{8},{8},{10},{8},{12},{8},{13},{5},{18},{18},{13},{9},{5},{1},{2},{6},{5},{3},{4},{3},{5},{9},{10},{6},{6},{6},{15},{18}};
6934 const struct { const unsigned int length: 7; } bytes_length_index[] = {{112},{112}};
6935 #ifndef CYTHON_COMPRESS_STRINGS
6936 #define CYTHON_COMPRESS_STRINGS 0
6937 #endif
6938 #if (CYTHON_COMPRESS_STRINGS) == 1 /* compression: zlib (349 bytes) */
6939static const char cstring[] = "x\332\255P;N\0031\020%\202\010\201\240\010\\ \022\022\025\nB9\000B JD\222\003X\2033K\254\370\027\3178\3116\220r\313-S\246L\271e\216\30218\002\273\t\240 D\207%\277\367\306~\232y\366\265\215\306\247-!]\300\226\211\232\025\204\000i3\001\245\261\337d\327T\306\273\300\333\266h\200\007\277\034>8\306H\227\322\323\260\213\032X9K-\237N{\023!\036\323i\271\357\224d\361\200S\356b\"\004X\353\030\030E\271\222he\305\006\224]\263\353G\275\276\261`\326<\212\240\2774#qI\212\252<.\262\262\010\332\017\000(\265R\271\326\367)I]\242({r\000\211O \207?\342\241\047A\006\264V\214\206\214\365\226D\037\365\372\261\336yO\252\262\207\211\013\033\020\3544!\3671\201\362\253hR\346\235V\250\354\030tD\032?\033!A\213$8#h\362Y\312M]u\233\325\336Ov\352\207Y#;\313:o{\007\177\213\343\254\223\311\274\261%.\226wE\255(\305\376\354%\357\344P\211\230\335T\346\243\3546\033\347\275y}\336[\324\027\275\345\376\222\212\363\325\356\352\352\277\347\275\346\220\2176\3638o\3478o\317q\321^\014\213\323\342~u\266\352|\000\377\360\347p";
6940 PyObject *data = __Pyx_DecompressString(cstring, 349, 1);
6941 #define __Pyx_DecompressString_LZSS_UNUSED
6942 if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
6943 const char* const bytes = __Pyx_PyBytes_AsString(data);
6944 #if !CYTHON_ASSUME_SAFE_MACROS
6945 if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
6946 #endif
6947 #else /* compression: none (591 bytes) */
6948static const char bytes[] = "?numpy._core.multiarray failed to importnumpy._core.umath failed to importproteus/cpskRelations.pyxSw__Pyx_PyDict_NextRef__annotate____func____main____module____name____qualname____test___is_coroutinealphaasyncio.coroutinescline_in_tracebackcpskRelationseps_smallitemsmnpns_delnumpypoppsicpskrworkrwork_tolsetdefaultsw_maxsw_minvaluesvgm_cal_from_swvgm_calc_from_psic\200\001\360\022\000\005\n\210\021\210#\210Q\330\004\t\210\021\210#\210Q\330\004\t\210\021\210#\210Q\330\004\t\210\021\210#\210Q\330\004\r\210Q\210c\220\021\330\004\r\210Q\210c\220\021\330\004,\250D\260\001\260\021\330\004\007\200~\220Q\220a\330\004\007\200u\210A\210Q\330\004\014\210C\210v\220S\230\005\230S\240\005\240S\250\007\250s\260&\270\003\2701\200\001\360\022\000\005\n\210\021\210#\210Q\330\004\t\210\021\210#\210Q\330\004\t\210\021\210#\210Q\330\004\t\210\021\210#\210Q\330\004\r\210Q\210c\220\021\330\004\r\210Q\210c\220\021\330\004,\250D\260\001\260\021\330\004\007\200~\220Q\220a\330\004\007\200\177\220a\220q\330\004\014\210C\210t\2203\220e\2303\230e\2403\240k\260\023\260F\270#\270Q";
6949 PyObject *data = NULL;
6950 #define __Pyx_DecompressString_UNUSED
6951 #define __Pyx_DecompressString_LZSS_UNUSED
6952 #endif
6953 PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
6954 Py_ssize_t pos = 0;
6955 for (int i = 0; i < 35; i++) {
6956 Py_ssize_t bytes_length = str_length_index[i].length;
6957 PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
6958 if (likely(string) && i >= 4) PyUnicode_InternInPlace(&string);
6959 if (unlikely(!string)) {
6960 Py_XDECREF(data);
6961 __PYX_ERR(0, 1, __pyx_L1_error)
6962 }
6963 stringtab[i] = string;
6964 pos += bytes_length;
6965 }
6966 for (int i = 35; i < 37; i++) {
6967 Py_ssize_t bytes_length = bytes_length_index[i-35].length;
6968 PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
6969 stringtab[i] = string;
6970 pos += bytes_length;
6971 if (unlikely(!string)) {
6972 Py_XDECREF(data);
6973 __PYX_ERR(0, 1, __pyx_L1_error)
6974 }
6975 }
6976 Py_XDECREF(data);
6977 for (Py_ssize_t i = 0; i < 37; i++) {
6978 if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
6979 __PYX_ERR(0, 1, __pyx_L1_error)
6980 }
6981 }
6982 #if CYTHON_IMMORTAL_CONSTANTS
6983 {
6984 PyObject **table = stringtab + 35;
6985 for (Py_ssize_t i=0; i<2; ++i) {
6986 #if PY_VERSION_HEX >= 0x030F0000
6987 PyUnstable_SetImmortal(table[i]);
6988 #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
6989 if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break;
6990 #if PY_VERSION_HEX < 0x030E0000
6991 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
6992 #else
6993 if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
6994 #endif
6995 {
6996 Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1));
6997 }
6998 #else
6999 if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break;
7000 Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
7001 #endif
7002 }
7003 }
7004 #endif
7005 }
7006 return 0;
7007 __pyx_L1_error:;
7008 return -1;
7009}
7010/* #### Code section: init_codeobjects ### */
7011#ifdef __cplusplus
7012namespace {
7013#endif
7014typedef struct {
7015 unsigned int argcount : 3;
7016 unsigned int num_posonly_args : 1;
7017 unsigned int num_kwonly_args : 1;
7018 unsigned int nlocals : 4;
7019 unsigned int flags : 10;
7020 unsigned int first_line : 5;
7021} __Pyx_PyCode_New_function_description;
7022#ifdef __cplusplus
7023} /* anonymous namespace */
7024#endif
7025/* NewCodeObj.proto */
7026static PyObject* __Pyx_PyCode_New(
7027 const __Pyx_PyCode_New_function_description descr,
7028 PyObject * const *varnames,
7029 PyObject *filename,
7030 PyObject *funcname,
7031 PyObject *line_table,
7032 PyObject *tuple_dedup_map
7033);
7034
7035
7036static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
7037 PyObject* tuple_dedup_map = PyDict_New();
7038 if (unlikely(!tuple_dedup_map)) return -1;
7039 {
7040 const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7};
7041 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_Sw, __pyx_mstate->__pyx_n_u_sw_min, __pyx_mstate->__pyx_n_u_sw_max, __pyx_mstate->__pyx_n_u_alpha, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_eps_small, __pyx_mstate->__pyx_n_u_ns_del, __pyx_mstate->__pyx_n_u_rwork, __pyx_mstate->__pyx_n_u_rwork_tol, __pyx_mstate->__pyx_n_u_psk};
7042 __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cpskRelations_pyx, __pyx_mstate->__pyx_n_u_vgm_cal_from_sw, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_Q_Q_Qc_Qc_D_Qa_uAQ_CvS_S_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
7043 }
7044 {
7045 const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 27};
7046 PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_psic, __pyx_mstate->__pyx_n_u_sw_min, __pyx_mstate->__pyx_n_u_sw_max, __pyx_mstate->__pyx_n_u_alpha, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_eps_small, __pyx_mstate->__pyx_n_u_ns_del, __pyx_mstate->__pyx_n_u_rwork, __pyx_mstate->__pyx_n_u_rwork_tol, __pyx_mstate->__pyx_n_u_psk};
7047 __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_proteus_cpskRelations_pyx, __pyx_mstate->__pyx_n_u_vgm_calc_from_psic, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_Q_Q_Qc_Qc_D_Qa_aq_Ct3e3e3k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
7048 }
7049 Py_DECREF(tuple_dedup_map);
7050 return 0;
7051 bad:
7052 Py_DECREF(tuple_dedup_map);
7053 return -1;
7054}
7055/* #### Code section: init_globals ### */
7056
7057static int __Pyx_InitGlobals(void) {
7058 int __pyx_lineno = 0;
7059 const char *__pyx_filename = NULL;
7060 int __pyx_clineno = 0;
7061 /* PythonCompatibility.init */
7062 if (likely(__Pyx_init_co_variables() == 0 && __Pyx_init_tpflags_variables() == 0)); else
7063
7064 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
7065
7066 /* NumpyImportArray.init */
7067 /*
7068 * Cython has automatically inserted a call to _import_array since
7069 * you didn't include one when you cimported numpy. To disable this
7070 * add the line
7071 * <void>numpy._import_array
7072 */
7073 #ifdef NPY_FEATURE_VERSION
7074 #ifndef NO_IMPORT_ARRAY
7075 if (unlikely(_import_array() == -1)) {
7076 PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import "
7077 "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; "
7078 "use '<void>numpy._import_array' to disable if you are certain you don't need it).");
7079 }
7080 #endif
7081 #endif
7082
7083 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
7084
7085 /* CommonTypesMetaclass.init */
7086 if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
7087
7088 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
7089
7090 /* CachedMethodType.init */
7091 #if CYTHON_COMPILING_IN_LIMITED_API
7092 {
7093 PyObject *typesModule=NULL;
7094 typesModule = PyImport_ImportModule("types");
7095 if (typesModule) {
7096 __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
7097 Py_DECREF(typesModule);
7098 }
7099 } // error handling follows
7100 #endif
7101
7102 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
7103
7104 return 0;
7105 __pyx_L1_error:;
7106 return -1;
7107}
7108/* #### Code section: init_after_shared_utility ### */
7109
7110static int __Pyx_InitAfterSharedUtility(void) {
7111 int __pyx_lineno = 0;
7112 const char *__pyx_filename = NULL;
7113 int __pyx_clineno = 0;
7114 /* CythonFunctionPerModule.init */
7115 if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
7116
7117 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
7118
7119 return 0;
7120 __pyx_L1_error:;
7121 return -1;
7122}
7123/* #### Code section: cleanup_globals ### */
7124/* #### Code section: cleanup_module ### */
7125/* #### Code section: main_method ### */
7126/* #### Code section: utility_code_pragmas ### */
7127#ifdef _MSC_VER
7128#pragma warning( push )
7129/* Warning 4127: conditional expression is constant
7130 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
7131 * compile-time, so this warning is not useful
7132 */
7133#pragma warning( disable : 4127 )
7134#endif
7135
7136
7137
7138/* #### Code section: utility_code_def ### */
7139
7140/* --- Runtime support code --- */
7141/* Refnanny */
7142#if CYTHON_REFNANNY
7143static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
7144 PyObject *m = NULL, *p = NULL;
7145 void *r = NULL;
7146 m = PyImport_ImportModule(modname);
7147 if (!m) goto end;
7148 p = PyObject_GetAttrString(m, "RefNannyAPI");
7149 if (!p) goto end;
7150 r = PyLong_AsVoidPtr(p);
7151end:
7152 Py_XDECREF(p);
7153 Py_XDECREF(m);
7154 return (__Pyx_RefNannyAPIStruct *)r;
7155}
7156#endif
7157
7158/* GetTopmostException (used by SaveResetException) */
7159#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
7160static _PyErr_StackItem *
7161__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
7162{
7163 _PyErr_StackItem *exc_info = tstate->exc_info;
7164 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
7165 exc_info->previous_item != NULL)
7166 {
7167 exc_info = exc_info->previous_item;
7168 }
7169 return exc_info;
7170}
7171#endif
7172
7173/* SaveResetException */
7174#if CYTHON_FAST_THREAD_STATE
7175static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
7176 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
7177 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
7178 PyObject *exc_value = exc_info->exc_value;
7179 if (exc_value == NULL || exc_value == Py_None) {
7180 *value = NULL;
7181 *type = NULL;
7182 *tb = NULL;
7183 } else {
7184 *value = exc_value;
7185 Py_INCREF(*value);
7186 *type = (PyObject*) Py_TYPE(exc_value);
7187 Py_INCREF(*type);
7188 *tb = PyException_GetTraceback(exc_value);
7189 }
7190 #elif CYTHON_USE_EXC_INFO_STACK
7191 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
7192 *type = exc_info->exc_type;
7193 *value = exc_info->exc_value;
7194 *tb = exc_info->exc_traceback;
7195 Py_XINCREF(*type);
7196 Py_XINCREF(*value);
7197 Py_XINCREF(*tb);
7198 #else
7199 *type = tstate->exc_type;
7200 *value = tstate->exc_value;
7201 *tb = tstate->exc_traceback;
7202 Py_XINCREF(*type);
7203 Py_XINCREF(*value);
7204 Py_XINCREF(*tb);
7205 #endif
7206}
7207static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
7208 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
7209 _PyErr_StackItem *exc_info = tstate->exc_info;
7210 PyObject *tmp_value = exc_info->exc_value;
7211 exc_info->exc_value = value;
7212 Py_XDECREF(tmp_value);
7213 Py_XDECREF(type);
7214 Py_XDECREF(tb);
7215 #else
7216 PyObject *tmp_type, *tmp_value, *tmp_tb;
7217 #if CYTHON_USE_EXC_INFO_STACK
7218 _PyErr_StackItem *exc_info = tstate->exc_info;
7219 tmp_type = exc_info->exc_type;
7220 tmp_value = exc_info->exc_value;
7221 tmp_tb = exc_info->exc_traceback;
7222 exc_info->exc_type = type;
7223 exc_info->exc_value = value;
7224 exc_info->exc_traceback = tb;
7225 #else
7226 tmp_type = tstate->exc_type;
7227 tmp_value = tstate->exc_value;
7228 tmp_tb = tstate->exc_traceback;
7229 tstate->exc_type = type;
7230 tstate->exc_value = value;
7231 tstate->exc_traceback = tb;
7232 #endif
7233 Py_XDECREF(tmp_type);
7234 Py_XDECREF(tmp_value);
7235 Py_XDECREF(tmp_tb);
7236 #endif
7237}
7238#endif
7239
7240/* FastTypeChecks (used by PyException_Check) */
7241#if CYTHON_COMPILING_IN_CPYTHON
7242static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
7243 while (a) {
7244 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
7245 if (a == b)
7246 return 1;
7247 }
7248 return b == &PyBaseObject_Type;
7249}
7250static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
7251 PyObject *mro;
7252 if (a == b) return 1;
7253 mro = a->tp_mro;
7254 if (likely(mro)) {
7255 Py_ssize_t i, n;
7256 n = PyTuple_GET_SIZE(mro);
7257 for (i = 0; i < n; i++) {
7258 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
7259 return 1;
7260 }
7261 return 0;
7262 }
7263 return __Pyx_InBases(a, b);
7264}
7265static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
7266 PyObject *mro;
7267 if (cls == a || cls == b) return 1;
7268 mro = cls->tp_mro;
7269 if (likely(mro)) {
7270 Py_ssize_t i, n;
7271 n = PyTuple_GET_SIZE(mro);
7272 for (i = 0; i < n; i++) {
7273 PyObject *base = PyTuple_GET_ITEM(mro, i);
7274 if (base == (PyObject *)a || base == (PyObject *)b)
7275 return 1;
7276 }
7277 return 0;
7278 }
7279 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
7280}
7281#endif
7282
7283/* PyErrFetchRestore (used by GivenExceptionMatches) */
7284#if CYTHON_FAST_THREAD_STATE
7285static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
7286#if PY_VERSION_HEX >= 0x030C00A6
7287 PyObject *tmp_value;
7288 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
7289 if (value) {
7290 #if CYTHON_COMPILING_IN_CPYTHON
7291 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
7292 #endif
7293 PyException_SetTraceback(value, tb);
7294 }
7295 tmp_value = tstate->current_exception;
7296 tstate->current_exception = value;
7297 Py_XDECREF(tmp_value);
7298 Py_XDECREF(type);
7299 Py_XDECREF(tb);
7300#else
7301 PyObject *tmp_type, *tmp_value, *tmp_tb;
7302 tmp_type = tstate->curexc_type;
7303 tmp_value = tstate->curexc_value;
7304 tmp_tb = tstate->curexc_traceback;
7305 tstate->curexc_type = type;
7306 tstate->curexc_value = value;
7307 tstate->curexc_traceback = tb;
7308 Py_XDECREF(tmp_type);
7309 Py_XDECREF(tmp_value);
7310 Py_XDECREF(tmp_tb);
7311#endif
7312}
7313static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
7314#if PY_VERSION_HEX >= 0x030C00A6
7315 PyObject* exc_value;
7316 exc_value = tstate->current_exception;
7317 tstate->current_exception = 0;
7318 *value = exc_value;
7319 *type = NULL;
7320 *tb = NULL;
7321 if (exc_value) {
7322 *type = (PyObject*) Py_TYPE(exc_value);
7323 Py_INCREF(*type);
7324 #if CYTHON_COMPILING_IN_CPYTHON
7325 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
7326 Py_XINCREF(*tb);
7327 #else
7328 *tb = PyException_GetTraceback(exc_value);
7329 #endif
7330 }
7331#else
7332 *type = tstate->curexc_type;
7333 *value = tstate->curexc_value;
7334 *tb = tstate->curexc_traceback;
7335 tstate->curexc_type = 0;
7336 tstate->curexc_value = 0;
7337 tstate->curexc_traceback = 0;
7338#endif
7339}
7340#endif
7341
7342/* GivenExceptionMatches (used by PyErrExceptionMatches) */
7343#if CYTHON_COMPILING_IN_CPYTHON
7344static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
7345 if (exc_type1) {
7346 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
7347 } else {
7348 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
7349 }
7350}
7351static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
7352 Py_ssize_t i, n;
7353 assert(PyExceptionClass_Check(exc_type));
7354 n = PyTuple_GET_SIZE(tuple);
7355 for (i=0; i<n; i++) {
7356 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
7357 }
7358 for (i=0; i<n; i++) {
7359 PyObject *t = PyTuple_GET_ITEM(tuple, i);
7360 if (likely(PyExceptionClass_Check(t))) {
7361 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
7362 } else {
7363 }
7364 }
7365 return 0;
7366}
7367static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
7368 if (likely(err == exc_type)) return 1;
7369 if (likely(PyExceptionClass_Check(err))) {
7370 if (likely(PyExceptionClass_Check(exc_type))) {
7371 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
7372 } else if (likely(PyTuple_Check(exc_type))) {
7373 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
7374 } else {
7375 }
7376 }
7377 return PyErr_GivenExceptionMatches(err, exc_type);
7378}
7379static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
7380 assert(PyExceptionClass_Check(exc_type1));
7381 assert(PyExceptionClass_Check(exc_type2));
7382 if (likely(err == exc_type1 || err == exc_type2)) return 1;
7383 if (likely(PyExceptionClass_Check(err))) {
7384 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
7385 }
7386 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
7387}
7388#endif
7389
7390/* PyErrExceptionMatches */
7391#if CYTHON_FAST_THREAD_STATE
7392static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
7393 Py_ssize_t i, n;
7394 n = PyTuple_GET_SIZE(tuple);
7395 for (i=0; i<n; i++) {
7396 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
7397 }
7398 for (i=0; i<n; i++) {
7399 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
7400 }
7401 return 0;
7402}
7403static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
7404 int result;
7405 PyObject *exc_type;
7406#if PY_VERSION_HEX >= 0x030C00A6
7407 PyObject *current_exception = tstate->current_exception;
7408 if (unlikely(!current_exception)) return 0;
7409 exc_type = (PyObject*) Py_TYPE(current_exception);
7410 if (exc_type == err) return 1;
7411#else
7412 exc_type = tstate->curexc_type;
7413 if (exc_type == err) return 1;
7414 if (unlikely(!exc_type)) return 0;
7415#endif
7416 #if CYTHON_AVOID_BORROWED_REFS
7417 Py_INCREF(exc_type);
7418 #endif
7419 if (unlikely(PyTuple_Check(err))) {
7420 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
7421 } else {
7422 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
7423 }
7424 #if CYTHON_AVOID_BORROWED_REFS
7425 Py_DECREF(exc_type);
7426 #endif
7427 return result;
7428}
7429#endif
7430
7431/* GetException */
7432#if CYTHON_FAST_THREAD_STATE
7433static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
7434#else
7435static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
7436#endif
7437{
7438 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
7439#if CYTHON_FAST_THREAD_STATE
7440 PyObject *tmp_type, *tmp_value, *tmp_tb;
7441 #if PY_VERSION_HEX >= 0x030C0000
7442 local_value = tstate->current_exception;
7443 tstate->current_exception = 0;
7444 #else
7445 local_type = tstate->curexc_type;
7446 local_value = tstate->curexc_value;
7447 local_tb = tstate->curexc_traceback;
7448 tstate->curexc_type = 0;
7449 tstate->curexc_value = 0;
7450 tstate->curexc_traceback = 0;
7451 #endif
7452#elif __PYX_LIMITED_VERSION_HEX >= 0x030C0000
7453 local_value = PyErr_GetRaisedException();
7454#else
7455 PyErr_Fetch(&local_type, &local_value, &local_tb);
7456#endif
7457#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
7458 if (likely(local_value)) {
7459 local_type = (PyObject*) Py_TYPE(local_value);
7460 Py_INCREF(local_type);
7461 local_tb = PyException_GetTraceback(local_value);
7462 }
7463#else
7464 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
7465#if CYTHON_FAST_THREAD_STATE
7466 if (unlikely(tstate->curexc_type))
7467#else
7468 if (unlikely(PyErr_Occurred()))
7469#endif
7470 goto bad;
7471 if (local_tb) {
7472 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
7473 goto bad;
7474 }
7475#endif // __PYX_LIMITED_VERSION_HEX >= 0x030C0000
7476 Py_XINCREF(local_tb);
7477 Py_XINCREF(local_type);
7478 Py_XINCREF(local_value);
7479 *type = local_type;
7480 *value = local_value;
7481 *tb = local_tb;
7482#if CYTHON_FAST_THREAD_STATE
7483 #if CYTHON_USE_EXC_INFO_STACK
7484 {
7485 _PyErr_StackItem *exc_info = tstate->exc_info;
7486 #if PY_VERSION_HEX >= 0x030B00a4
7487 tmp_value = exc_info->exc_value;
7488 exc_info->exc_value = local_value;
7489 tmp_type = NULL;
7490 tmp_tb = NULL;
7491 Py_XDECREF(local_type);
7492 Py_XDECREF(local_tb);
7493 #else
7494 tmp_type = exc_info->exc_type;
7495 tmp_value = exc_info->exc_value;
7496 tmp_tb = exc_info->exc_traceback;
7497 exc_info->exc_type = local_type;
7498 exc_info->exc_value = local_value;
7499 exc_info->exc_traceback = local_tb;
7500 #endif
7501 }
7502 #else
7503 tmp_type = tstate->exc_type;
7504 tmp_value = tstate->exc_value;
7505 tmp_tb = tstate->exc_traceback;
7506 tstate->exc_type = local_type;
7507 tstate->exc_value = local_value;
7508 tstate->exc_traceback = local_tb;
7509 #endif
7510 Py_XDECREF(tmp_type);
7511 Py_XDECREF(tmp_value);
7512 Py_XDECREF(tmp_tb);
7513#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
7514 PyErr_SetHandledException(local_value);
7515 Py_XDECREF(local_value);
7516 Py_XDECREF(local_type);
7517 Py_XDECREF(local_tb);
7518#else
7519 PyErr_SetExcInfo(local_type, local_value, local_tb);
7520#endif
7521 return 0;
7522#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
7523bad:
7524 *type = 0;
7525 *value = 0;
7526 *tb = 0;
7527 Py_XDECREF(local_type);
7528 Py_XDECREF(local_value);
7529 Py_XDECREF(local_tb);
7530 return -1;
7531#endif
7532}
7533
7534/* PyObjectCall (used by PyObjectFastCall) */
7535#if CYTHON_COMPILING_IN_CPYTHON
7536static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
7537 PyObject *result;
7538 ternaryfunc call = Py_TYPE(func)->tp_call;
7539 if (unlikely(!call))
7540 return PyObject_Call(func, arg, kw);
7541 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
7542 return NULL;
7543 result = (*call)(func, arg, kw);
7544 Py_LeaveRecursiveCall();
7545 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
7546 PyErr_SetString(
7547 PyExc_SystemError,
7548 "NULL result without error in PyObject_Call");
7549 }
7550 return result;
7551}
7552#endif
7553
7554/* PyObjectCallMethO (used by PyObjectFastCall) */
7555#if CYTHON_COMPILING_IN_CPYTHON
7556static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
7557 PyObject *self, *result;
7558 PyCFunction cfunc;
7559 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
7560 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
7561 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
7562 return NULL;
7563 result = cfunc(self, arg);
7564 Py_LeaveRecursiveCall();
7565 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
7566 PyErr_SetString(
7567 PyExc_SystemError,
7568 "NULL result without error in PyObject_Call");
7569 }
7570 return result;
7571}
7572#endif
7573
7574/* PyObjectFastCall */
7575#if CYTHON_COMPILING_IN_LIMITED_API
7576static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
7577 PyObject *argstuple;
7578 PyObject *result = 0;
7579 size_t i;
7580 argstuple = PyTuple_New((Py_ssize_t)nargs);
7581 if (unlikely(!argstuple)) return NULL;
7582 for (i = 0; i < nargs; i++) {
7583 Py_INCREF(args[i]);
7584 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
7585 }
7586 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
7587 bad:
7588 Py_DECREF(argstuple);
7589 return result;
7590}
7591#endif
7592#if CYTHON_VECTORCALL && !(CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY)
7593 #if CYTHON_COMPILING_IN_CPYTHON
7594static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
7595 PyTypeObject *tp = Py_TYPE(callable);
7596 #if defined(__Pyx_CyFunction_USED)
7597 if (__Pyx_CyFunction_CheckExact(callable)) {
7598 return __Pyx_CyFunction_func_vectorcall(callable);
7599 }
7600 #endif
7601 if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
7602 return NULL;
7603 }
7604 assert(PyCallable_Check(callable));
7605 Py_ssize_t offset = tp->tp_vectorcall_offset;
7606 assert(offset > 0);
7607 vectorcallfunc ptr;
7608 memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
7609 return ptr;
7610}
7611 #else
7612 #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
7613 #endif
7614#endif
7615static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwargs) {
7616 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(nargsf);
7617#if CYTHON_COMPILING_IN_CPYTHON
7618 if (nargs == 0 && kwargs == NULL) {
7619 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
7620 return __Pyx_PyObject_CallMethO(func, NULL);
7621 }
7622 else if (nargs == 1 && kwargs == NULL) {
7623 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
7624 return __Pyx_PyObject_CallMethO(func, args[0]);
7625 }
7626#endif
7627 if (kwargs == NULL) {
7628 #if CYTHON_VECTORCALL
7629 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
7630 return PyObject_Vectorcall(func, args, nargsf, NULL);
7631 #else
7632 vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
7633 if (f) {
7634 return f(func, args, nargsf, NULL);
7635 }
7636 #endif
7637 #endif
7638 }
7639 if (nargs == 0) {
7640 return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
7641 }
7642 #if CYTHON_COMPILING_IN_LIMITED_API
7643 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
7644 #elif CYTHON_COMPILING_IN_PYPY
7645 return PyObject_VectorcallDict(func, args, (size_t) nargs, kwargs);
7646 #else
7647 return PyObject_VectorcallDict(func, args, nargsf, kwargs);
7648 #endif
7649}
7650
7651/* RaiseException */
7652static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
7653 PyObject* owned_instance = NULL;
7654 if (tb == Py_None) {
7655 tb = 0;
7656 } else if (tb && !PyTraceBack_Check(tb)) {
7657 PyErr_SetString(PyExc_TypeError,
7658 "raise: arg 3 must be a traceback or None");
7659 goto bad;
7660 }
7661 if (value == Py_None)
7662 value = 0;
7663 if (PyExceptionInstance_Check(type)) {
7664 if (value) {
7665 PyErr_SetString(PyExc_TypeError,
7666 "instance exception may not have a separate value");
7667 goto bad;
7668 }
7669 value = type;
7670 type = (PyObject*) Py_TYPE(value);
7671 } else if (PyExceptionClass_Check(type)) {
7672 PyObject *instance_class = NULL;
7673 if (value && PyExceptionInstance_Check(value)) {
7674 instance_class = (PyObject*) Py_TYPE(value);
7675 if (instance_class != type) {
7676 int is_subclass = PyObject_IsSubclass(instance_class, type);
7677 if (!is_subclass) {
7678 instance_class = NULL;
7679 } else if (unlikely(is_subclass == -1)) {
7680 goto bad;
7681 } else {
7682 type = instance_class;
7683 }
7684 }
7685 }
7686 if (!instance_class) {
7687 PyObject *args;
7688 if (!value)
7689 args = PyTuple_New(0);
7690 else if (PyTuple_Check(value)) {
7691 Py_INCREF(value);
7692 args = value;
7693 } else
7694 args = PyTuple_Pack(1, value);
7695 if (!args)
7696 goto bad;
7697 owned_instance = PyObject_Call(type, args, NULL);
7698 Py_DECREF(args);
7699 if (!owned_instance)
7700 goto bad;
7701 value = owned_instance;
7702 if (!PyExceptionInstance_Check(value)) {
7703 PyErr_Format(PyExc_TypeError,
7704 "calling %R should have returned an instance of "
7705 "BaseException, not %R",
7706 type, Py_TYPE(value));
7707 goto bad;
7708 }
7709 }
7710 } else {
7711 PyErr_SetString(PyExc_TypeError,
7712 "raise: exception class must be a subclass of BaseException");
7713 goto bad;
7714 }
7715 if (cause) {
7716 PyObject *fixed_cause;
7717 if (cause == Py_None) {
7718 fixed_cause = NULL;
7719 } else if (PyExceptionClass_Check(cause)) {
7720 fixed_cause = PyObject_CallObject(cause, NULL);
7721 if (fixed_cause == NULL)
7722 goto bad;
7723 } else if (PyExceptionInstance_Check(cause)) {
7724 fixed_cause = cause;
7725 Py_INCREF(fixed_cause);
7726 } else {
7727 PyErr_SetString(PyExc_TypeError,
7728 "exception causes must derive from "
7729 "BaseException");
7730 goto bad;
7731 }
7732 PyException_SetCause(value, fixed_cause);
7733 }
7734 PyErr_SetObject(type, value);
7735 if (tb) {
7736#if PY_VERSION_HEX >= 0x030C00A6
7737 PyException_SetTraceback(value, tb);
7738#elif CYTHON_FAST_THREAD_STATE
7739 PyThreadState *tstate = __Pyx_PyThreadState_Current;
7740 PyObject* tmp_tb = tstate->curexc_traceback;
7741 if (tb != tmp_tb) {
7742 Py_INCREF(tb);
7743 tstate->curexc_traceback = tb;
7744 Py_XDECREF(tmp_tb);
7745 }
7746#else
7747 PyObject *tmp_type, *tmp_value, *tmp_tb;
7748 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
7749 Py_INCREF(tb);
7750 PyErr_Restore(tmp_type, tmp_value, tb);
7751 Py_XDECREF(tmp_tb);
7752#endif
7753 }
7754bad:
7755 Py_XDECREF(owned_instance);
7756 return;
7757}
7758
7759/* CopyObjectArray (used by TupleOrListFromArrayImpl) */
7760#if CYTHON_COMPILING_IN_CPYTHON
7761static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
7762 PyObject *v;
7763 Py_ssize_t i;
7764 for (i = 0; i < length; i++) {
7765 v = dest[i] = src[i];
7766 Py_INCREF(v);
7767 }
7768}
7769#endif
7770
7771/* TupleOrListFromArrayImpl (used by TupleFromArray) */
7772#if !(PY_VERSION_HEX >= 0x030F0000 && !CYTHON_COMPILING_IN_LIMITED_API)
7773CYTHON_UNUSED static PyObject *
7774__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) {
7775 if (n <= 0) {
7776 return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
7777 }
7778 PyObject *res = PyTuple_New(n);
7779 if (unlikely(res == NULL)) return NULL;
7780 #if CYTHON_COMPILING_IN_CPYTHON
7781 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
7782 #else
7783 Py_ssize_t i;
7784 for (i = 0; i < n; i++) {
7785 Py_INCREF(src[i]);
7786 if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
7787 Py_DECREF(res);
7788 return NULL;
7789 }
7790 }
7791 #endif
7792 return res;
7793}
7794#endif
7795
7796/* PyObjectCompare (used by UnicodeEquals) */
7797#ifndef __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
7798#define __Pyx_DEFINED_PyObject_CompareStrStrBoolEq
7799static CYTHON_INLINE int __Pyx_PyObject_CompareStrStrBoolEq(PyObject* s1, PyObject* s2) {
7800 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
7801 int result = PyUnicode_Equal(s1, s2);
7802 #if !CYTHON_COMPILING_IN_CPYTHON
7803 if (unlikely(result == -1)) return -1;
7804 #endif
7805 if (result == 0) goto __pyx_return_false; else goto __pyx_return_true;
7806 #else
7807 int result = PyUnicode_Compare(s1, s2);
7808 if (unlikely((result == -1) && PyErr_Occurred())) return -1;
7809 if (result == 0) goto __pyx_return_true; else goto __pyx_return_false;
7810 #endif
7811__pyx_return_true:
7812 return 1;
7813__pyx_return_false:
7814 return 0;
7815}
7816#endif
7817static CYTHON_INLINE int __Pyx_PyObject_CompareBoolEq_str_str(PyObject *op1, PyObject *op2, int pyop) {
7818 CYTHON_UNUSED_VAR(pyop);
7819 if (unlikely(op1 == Py_None)) {
7820 if (op2 == Py_None) goto __pyx_return_true; else goto __pyx_return_false;
7821 }
7822 if (unlikely(op2 == Py_None)) {
7823 if (op1 == Py_None) goto __pyx_return_true; else goto __pyx_return_false;
7824 }
7825
7826 if (likely(op1 != Py_None)) {
7827 if (op1 == op2) goto __pyx_return_true;
7828 if (likely(op2 != Py_None)) {
7829 return __Pyx_PyObject_CompareStrStrBoolEq(op1, op2);
7830 }
7831 goto __pyx_richcmp;
7832 }
7833
7834 if ((0)) goto __pyx_richcmp;
7835 if ((0)) goto __pyx_return_true;
7836 if ((0)) goto __pyx_return_false;
7837__pyx_richcmp:
7838 return __Pyx_PyObject_RichCompareBool(op1, op2, Py_EQ);
7839__pyx_return_true:
7840 return 1;
7841__pyx_return_false:
7842 return 0;
7843}
7844
7845/* fastcall */
7846#if CYTHON_VECTORCALL
7847static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
7848{
7849 Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
7850 #if !CYTHON_ASSUME_SAFE_SIZE
7851 if (unlikely(n == -1)) return NULL;
7852 #endif
7853 for (i = 0; i < n; i++)
7854 {
7855 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
7856 #if !CYTHON_ASSUME_SAFE_MACROS
7857 if (unlikely(!namei)) return NULL;
7858 #endif
7859 if (s == namei) return kwvalues[i];
7860 }
7861 for (i = 0; i < n; i++)
7862 {
7863 PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
7864 #if !CYTHON_ASSUME_SAFE_MACROS
7865 if (unlikely(!namei)) return NULL;
7866 #endif
7867 int eq = __Pyx_PyUnicode_Equals(s, namei);
7868 if (unlikely(eq != 0)) {
7869 if (unlikely(eq < 0)) return NULL;
7870 return kwvalues[i];
7871 }
7872 }
7873 return NULL;
7874}
7875#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_GRAAL
7876CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
7877 Py_ssize_t i, nkwargs;
7878 PyObject *dict;
7879#if !CYTHON_ASSUME_SAFE_SIZE
7880 nkwargs = PyTuple_Size(kwnames);
7881 if (unlikely(nkwargs < 0)) return NULL;
7882#else
7883 nkwargs = PyTuple_GET_SIZE(kwnames);
7884#endif
7885 dict = PyDict_New();
7886 if (unlikely(!dict))
7887 return NULL;
7888 for (i=0; i<nkwargs; i++) {
7889#if !CYTHON_ASSUME_SAFE_MACROS
7890 PyObject *key = PyTuple_GetItem(kwnames, i);
7891 if (!key) goto bad;
7892#else
7893 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
7894#endif
7895 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
7896 goto bad;
7897 }
7898 return dict;
7899bad:
7900 Py_DECREF(dict);
7901 return NULL;
7902}
7903#endif
7904#endif
7905
7906/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
7907static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
7908 PyObject *args[2] = {NULL, arg};
7909 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
7910}
7911
7912/* IgnoreException (used by UnpackUnboundCMethod_impl) */
7913static CYTHON_INLINE int __Pyx_IgnoreGivenException(PyObject *given_exception, PyObject *ignorable_exception) {
7914 if (PyErr_GivenExceptionMatches(given_exception ? given_exception : PyErr_Occurred(), ignorable_exception)) {
7915 PyErr_Clear();
7916 return 1;
7917 }
7918 return 0;
7919}
7920
7921/* PyObjectGetAttrStr (used by UnpackUnboundCMethod_impl) */
7922#if CYTHON_USE_TYPE_SLOTS
7923static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
7924 PyTypeObject* tp = Py_TYPE(obj);
7925 if (likely(tp->tp_getattro))
7926 return tp->tp_getattro(obj, attr_name);
7927 return PyObject_GetAttr(obj, attr_name);
7928}
7929#endif
7930
7931/* UnpackUnboundCMethod_impl (used by UnpackUnboundCMethod) */
7932#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
7933static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
7934 PyObject *result;
7935 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
7936 if (unlikely(!selfless_args)) return NULL;
7937 result = PyObject_Call(method, selfless_args, kwargs);
7938 Py_DECREF(selfless_args);
7939 return result;
7940}
7941#else
7942static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
7943 return PyObject_Vectorcall(method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
7944}
7945#endif
7946static PyMethodDef __Pyx_UnboundCMethod_Def = {
7947 "CythonUnboundCMethod",
7948 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
7949#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
7950 METH_VARARGS | METH_KEYWORDS,
7951#else
7952 METH_FASTCALL | METH_KEYWORDS,
7953#endif
7954 NULL
7955};
7956static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
7957 PyObject *method, *result=NULL;
7958 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
7959 if (unlikely(!method))
7960 return -1;
7961 result = method;
7962#if CYTHON_COMPILING_IN_CPYTHON
7963 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
7964 {
7965 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
7966 target->func = descr->d_method->ml_meth;
7967 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
7968 } else
7969#endif
7970#if CYTHON_COMPILING_IN_PYPY
7971#else
7972 if (PyCFunction_Check(method))
7973#endif
7974 {
7975 PyObject *self;
7976 int self_found;
7977#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
7978 self = PyObject_GetAttrString(method, "__self__");
7979 if (!self && !__Pyx_IgnoreException(PyExc_AttributeError)) {
7980 return -1;
7981 }
7982#else
7983 self = PyCFunction_GET_SELF(method);
7984#endif
7985 self_found = (self && self != Py_None);
7986#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
7987 Py_XDECREF(self);
7988#endif
7989 if (self_found) {
7990 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
7991 if (unlikely(!unbound_method)) return -1;
7992 Py_DECREF(method);
7993 result = unbound_method;
7994 }
7995 }
7996#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
7997 if (unlikely(target->method)) {
7998 Py_DECREF(result);
7999 } else
8000#endif
8001 target->method = result;
8002 return 0;
8003}
8004
8005/* CallUnboundCMethod0 */
8006#if CYTHON_COMPILING_IN_CPYTHON
8007static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
8008 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
8009 if (likely(was_initialized == 2 && cfunc->func)) {
8010 if (likely(cfunc->flag == METH_NOARGS))
8011 return __Pyx_CallCFunction(cfunc, self, NULL);
8012 if (likely(cfunc->flag == METH_FASTCALL))
8013 return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
8014 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
8015 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
8016 if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
8017 return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
8018 if (cfunc->flag == METH_VARARGS)
8019 return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
8020 return __Pyx__CallUnboundCMethod0(cfunc, self);
8021 }
8022#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
8023 else if (unlikely(was_initialized == 1)) {
8024 __Pyx_CachedCFunction tmp_cfunc = {
8025#ifndef __cplusplus
8026 0
8027#endif
8028 };
8029 tmp_cfunc.type = cfunc->type;
8030 tmp_cfunc.method_name = cfunc->method_name;
8031 return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
8032 }
8033#endif
8034 PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
8035 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
8036 return result;
8037}
8038#endif
8039static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
8040 PyObject *result;
8041 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
8042 result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
8043 return result;
8044}
8045
8046/* py_dict_items (used by OwnedDictNext) */
8047static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
8048 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
8049}
8050
8051/* py_dict_values (used by OwnedDictNext) */
8052static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
8053 return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
8054}
8055
8056/* OwnedDictNext (used by ParseKeywordsImpl) */
8057#if CYTHON_AVOID_BORROWED_REFS
8058static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
8059 PyObject *next = NULL;
8060 if (!*ppos) {
8061 if (pvalue) {
8062 PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
8063 if (unlikely(!dictview)) goto bad;
8064 *ppos = PyObject_GetIter(dictview);
8065 Py_DECREF(dictview);
8066 } else {
8067 *ppos = PyObject_GetIter(p);
8068 }
8069 if (unlikely(!*ppos)) goto bad;
8070 }
8071 next = PyIter_Next(*ppos);
8072 if (!next) {
8073 if (PyErr_Occurred()) goto bad;
8074 return 0;
8075 }
8076 if (pkey && pvalue) {
8077 *pkey = __Pyx_PySequence_ITEM(next, 0);
8078 if (unlikely(*pkey)) goto bad;
8079 *pvalue = __Pyx_PySequence_ITEM(next, 1);
8080 if (unlikely(*pvalue)) goto bad;
8081 Py_DECREF(next);
8082 } else if (pkey) {
8083 *pkey = next;
8084 } else {
8085 assert(pvalue);
8086 *pvalue = next;
8087 }
8088 return 1;
8089 bad:
8090 Py_XDECREF(next);
8091#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
8092 PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
8093#else
8094 PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
8095#endif
8096 if (pkey) *pkey = NULL;
8097 if (pvalue) *pvalue = NULL;
8098 return 0;
8099}
8100#else // !CYTHON_AVOID_BORROWED_REFS
8101static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
8102 int result = PyDict_Next(p, ppos, pkey, pvalue);
8103 if (likely(result == 1)) {
8104 if (pkey) Py_INCREF(*pkey);
8105 if (pvalue) Py_INCREF(*pvalue);
8106 }
8107 return result;
8108}
8109#endif
8110
8111/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
8112static void __Pyx_RaiseDoubleKeywordsError(
8113 const char* func_name,
8114 PyObject* kw_name)
8115{
8116 PyErr_Format(PyExc_TypeError,
8117 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
8118}
8119
8120/* CallUnboundCMethod2 */
8121#if CYTHON_COMPILING_IN_CPYTHON
8122static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
8123 int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
8124 if (likely(was_initialized == 2 && cfunc->func)) {
8125 PyObject *args[2] = {arg1, arg2};
8126 if (cfunc->flag == METH_FASTCALL) {
8127 return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
8128 }
8129 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
8130 return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
8131 }
8132#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
8133 else if (unlikely(was_initialized == 1)) {
8134 __Pyx_CachedCFunction tmp_cfunc = {
8135#ifndef __cplusplus
8136 0
8137#endif
8138 };
8139 tmp_cfunc.type = cfunc->type;
8140 tmp_cfunc.method_name = cfunc->method_name;
8141 return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
8142 }
8143#endif
8144 PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
8145 __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
8146 return result;
8147}
8148#endif
8149static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
8150 if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
8151#if CYTHON_COMPILING_IN_CPYTHON
8152 if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
8153 PyObject *result = NULL;
8154 PyObject *args = PyTuple_New(2);
8155 if (unlikely(!args)) return NULL;
8156 Py_INCREF(arg1);
8157 PyTuple_SET_ITEM(args, 0, arg1);
8158 Py_INCREF(arg2);
8159 PyTuple_SET_ITEM(args, 1, arg2);
8160 if (cfunc->flag & METH_KEYWORDS)
8161 result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
8162 else
8163 result = __Pyx_CallCFunction(cfunc, self, args);
8164 Py_DECREF(args);
8165 return result;
8166 }
8167#endif
8168 {
8169 PyObject *args[4] = {NULL, self, arg1, arg2};
8170 return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
8171 }
8172}
8173
8174/* ParseKeywordsImpl (used by ParseKeywords) */
8175static int __Pyx_ValidateDuplicatePosArgs(
8176 PyObject *kwds,
8177 PyObject ** const argnames[],
8178 PyObject ** const *first_kw_arg,
8179 const char* function_name)
8180{
8181 PyObject ** const *name = argnames;
8182 while (name != first_kw_arg) {
8183 PyObject *key = **name;
8184 int found = PyDict_Contains(kwds, key);
8185 if (unlikely(found)) {
8186 if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
8187 goto bad;
8188 }
8189 name++;
8190 }
8191 return 0;
8192bad:
8193 return -1;
8194}
8195#if CYTHON_USE_UNICODE_INTERNALS
8196static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
8197 int kind;
8198 Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
8199 if (len != PyUnicode_GET_LENGTH(s2)) return 0;
8200 kind = PyUnicode_KIND(s1);
8201 if (kind != PyUnicode_KIND(s2)) return 0;
8202 const void *data1 = PyUnicode_DATA(s1);
8203 const void *data2 = PyUnicode_DATA(s2);
8204 return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
8205}
8206#endif
8207static int __Pyx_MatchKeywordArg_str(
8208 PyObject *key,
8209 PyObject ** const argnames[],
8210 PyObject ** const *first_kw_arg,
8211 size_t *index_found,
8212 const char *function_name)
8213{
8214 PyObject ** const *name;
8215 #if CYTHON_USE_UNICODE_INTERNALS
8216 Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
8217 if (unlikely(key_hash == -1)) {
8218 key_hash = PyObject_Hash(key);
8219 if (unlikely(key_hash == -1))
8220 goto bad;
8221 }
8222 #endif
8223 name = first_kw_arg;
8224 while (*name) {
8225 PyObject *name_str = **name;
8226 #if CYTHON_USE_UNICODE_INTERNALS
8227 if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
8228 *index_found = (size_t) (name - argnames);
8229 return 1;
8230 }
8231 #else
8232 #if CYTHON_ASSUME_SAFE_SIZE
8233 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
8234 #endif
8235 {
8236 int cmp = PyUnicode_Compare(name_str, key);
8237 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
8238 if (cmp == 0) {
8239 *index_found = (size_t) (name - argnames);
8240 return 1;
8241 }
8242 }
8243 #endif
8244 name++;
8245 }
8246 name = argnames;
8247 while (name != first_kw_arg) {
8248 PyObject *name_str = **name;
8249 #if CYTHON_USE_UNICODE_INTERNALS
8250 if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
8251 if (__Pyx_UnicodeKeywordsEqual(name_str, key))
8252 goto arg_passed_twice;
8253 }
8254 #else
8255 #if CYTHON_ASSUME_SAFE_SIZE
8256 if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
8257 #endif
8258 {
8259 if (unlikely(name_str == key)) goto arg_passed_twice;
8260 int cmp = PyUnicode_Compare(name_str, key);
8261 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
8262 if (cmp == 0) goto arg_passed_twice;
8263 }
8264 #endif
8265 name++;
8266 }
8267 return 0;
8268arg_passed_twice:
8269 __Pyx_RaiseDoubleKeywordsError(function_name, key);
8270 goto bad;
8271bad:
8272 return -1;
8273}
8274static int __Pyx_MatchKeywordArg_nostr(
8275 PyObject *key,
8276 PyObject ** const argnames[],
8277 PyObject ** const *first_kw_arg,
8278 size_t *index_found,
8279 const char *function_name)
8280{
8281 PyObject ** const *name;
8282 if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
8283 name = first_kw_arg;
8284 while (*name) {
8285 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
8286 if (cmp == 1) {
8287 *index_found = (size_t) (name - argnames);
8288 return 1;
8289 }
8290 if (unlikely(cmp == -1)) goto bad;
8291 name++;
8292 }
8293 name = argnames;
8294 while (name != first_kw_arg) {
8295 int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
8296 if (unlikely(cmp != 0)) {
8297 if (cmp == 1) goto arg_passed_twice;
8298 else goto bad;
8299 }
8300 name++;
8301 }
8302 return 0;
8303arg_passed_twice:
8304 __Pyx_RaiseDoubleKeywordsError(function_name, key);
8305 goto bad;
8306invalid_keyword_type:
8307 PyErr_Format(PyExc_TypeError,
8308 "%.200s() keywords must be strings", function_name);
8309 goto bad;
8310bad:
8311 return -1;
8312}
8313static CYTHON_INLINE int __Pyx_MatchKeywordArg(
8314 PyObject *key,
8315 PyObject ** const argnames[],
8316 PyObject ** const *first_kw_arg,
8317 size_t *index_found,
8318 const char *function_name)
8319{
8320 return likely(PyUnicode_CheckExact(key)) ?
8321 __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
8322 __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
8323}
8324static void __Pyx_RejectUnknownKeyword(
8325 PyObject *kwds,
8326 PyObject ** const argnames[],
8327 PyObject ** const *first_kw_arg,
8328 const char *function_name)
8329{
8330 #if CYTHON_AVOID_BORROWED_REFS
8331 PyObject *pos = NULL;
8332 #else
8333 Py_ssize_t pos = 0;
8334 #endif
8335 PyObject *key = NULL;
8336 __Pyx_BEGIN_CRITICAL_SECTION(kwds);
8337 #if CYTHON_AVOID_BORROWED_REFS
8338 while (__Pyx_PyDict_NextRef(kwds, &pos, &key, NULL))
8339 #else
8340 (void) __Pyx_PyDict_NextRef;
8341 while (PyDict_Next(kwds, &pos, &key, NULL))
8342 #endif
8343 {
8344 PyObject** const *name = first_kw_arg;
8345 while (*name && (**name != key)) name++;
8346 if (!*name) {
8347 size_t index_found = 0;
8348 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
8349 if (cmp != 1) {
8350 if (cmp == 0) {
8351 PyErr_Format(PyExc_TypeError,
8352 "%s() got an unexpected keyword argument '%U'",
8353 function_name, key);
8354 }
8355 #if CYTHON_AVOID_BORROWED_REFS
8356 Py_DECREF(key);
8357 #endif
8358 break;
8359 }
8360 }
8361 #if CYTHON_AVOID_BORROWED_REFS
8362 Py_DECREF(key);
8363 #endif
8364 }
8365 __Pyx_END_CRITICAL_SECTION();
8366 #if CYTHON_AVOID_BORROWED_REFS
8367 Py_XDECREF(pos);
8368 #endif
8369 assert(PyErr_Occurred());
8370}
8371static int __Pyx_ParseKeywordDict(
8372 PyObject *kwds,
8373 PyObject ** const argnames[],
8374 PyObject *values[],
8375 Py_ssize_t num_pos_args,
8376 Py_ssize_t num_kwargs,
8377 const char* function_name,
8378 int ignore_unknown_kwargs)
8379{
8380 PyObject** const *name;
8381 PyObject** const *first_kw_arg = argnames + num_pos_args;
8382 Py_ssize_t extracted = 0;
8383#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
8384 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
8385#endif
8386 name = first_kw_arg;
8387 while (*name && num_kwargs > extracted) {
8388 PyObject * key = **name;
8389 PyObject *value;
8390 int found = 0;
8391 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
8392 found = PyDict_GetItemRef(kwds, key, &value);
8393 #else
8394 value = PyDict_GetItemWithError(kwds, key);
8395 if (value) {
8396 Py_INCREF(value);
8397 found = 1;
8398 } else {
8399 if (unlikely(PyErr_Occurred())) goto bad;
8400 }
8401 #endif
8402 if (found) {
8403 if (unlikely(found < 0)) goto bad;
8404 values[name-argnames] = value;
8405 extracted++;
8406 }
8407 name++;
8408 }
8409 if (num_kwargs > extracted) {
8410 if (ignore_unknown_kwargs) {
8411 if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
8412 goto bad;
8413 } else {
8414 __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
8415 goto bad;
8416 }
8417 }
8418 return 0;
8419bad:
8420 return -1;
8421}
8422static int __Pyx_ParseKeywordDictToDict(
8423 PyObject *kwds,
8424 PyObject ** const argnames[],
8425 PyObject *kwds2,
8426 PyObject *values[],
8427 Py_ssize_t num_pos_args,
8428 const char* function_name)
8429{
8430 PyObject** const *name;
8431 PyObject** const *first_kw_arg = argnames + num_pos_args;
8432 Py_ssize_t len;
8433#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
8434 if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
8435#endif
8436 if (PyDict_Update(kwds2, kwds) < 0) goto bad;
8437 name = first_kw_arg;
8438 while (*name) {
8439 PyObject *key = **name;
8440 PyObject *value;
8441#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
8442 int found = PyDict_Pop(kwds2, key, &value);
8443 if (found) {
8444 if (unlikely(found < 0)) goto bad;
8445 values[name-argnames] = value;
8446 }
8447#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
8448 int found = PyDict_GetItemRef(kwds2, key, &value);
8449 if (found) {
8450 if (unlikely(found < 0)) goto bad;
8451 values[name-argnames] = value;
8452 if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
8453 }
8454#else
8455 #if CYTHON_COMPILING_IN_CPYTHON
8456 value = _PyDict_Pop(kwds2, key, kwds2);
8457 #else
8458 value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
8459 #endif
8460 if (value == kwds2) {
8461 Py_DECREF(value);
8462 } else {
8463 if (unlikely(!value)) goto bad;
8464 values[name-argnames] = value;
8465 }
8466#endif
8467 name++;
8468 }
8469 len = PyDict_Size(kwds2);
8470 if (len > 0) {
8471 return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
8472 } else if (unlikely(len == -1)) {
8473 goto bad;
8474 }
8475 return 0;
8476bad:
8477 return -1;
8478}
8479static int __Pyx_ParseKeywordsTuple(
8480 PyObject *kwds,
8481 PyObject * const *kwvalues,
8482 PyObject ** const argnames[],
8483 PyObject *kwds2,
8484 PyObject *values[],
8485 Py_ssize_t num_pos_args,
8486 Py_ssize_t num_kwargs,
8487 const char* function_name,
8488 int ignore_unknown_kwargs)
8489{
8490 PyObject *key = NULL;
8491 PyObject** const * name;
8492 PyObject** const *first_kw_arg = argnames + num_pos_args;
8493 for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
8494#if CYTHON_AVOID_BORROWED_REFS
8495 key = __Pyx_PySequence_ITEM(kwds, pos);
8496#else
8497 key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
8498#endif
8499#if !CYTHON_ASSUME_SAFE_MACROS
8500 if (unlikely(!key)) goto bad;
8501#endif
8502 name = first_kw_arg;
8503 while (*name && (**name != key)) name++;
8504 if (*name) {
8505 PyObject *value = kwvalues[pos];
8506 values[name-argnames] = __Pyx_NewRef(value);
8507 } else {
8508 size_t index_found = 0;
8509 int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
8510 if (cmp == 1) {
8511 PyObject *value = kwvalues[pos];
8512 values[index_found] = __Pyx_NewRef(value);
8513 } else {
8514 if (unlikely(cmp == -1)) goto bad;
8515 if (kwds2) {
8516 PyObject *value = kwvalues[pos];
8517 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
8518 } else if (!ignore_unknown_kwargs) {
8519 goto invalid_keyword;
8520 }
8521 }
8522 }
8523 #if CYTHON_AVOID_BORROWED_REFS
8524 Py_DECREF(key);
8525 key = NULL;
8526 #endif
8527 }
8528 return 0;
8529invalid_keyword:
8530 PyErr_Format(PyExc_TypeError,
8531 "%s() got an unexpected keyword argument '%U'",
8532 function_name, key);
8533 goto bad;
8534bad:
8535 #if CYTHON_AVOID_BORROWED_REFS
8536 Py_XDECREF(key);
8537 #endif
8538 return -1;
8539}
8540
8541/* ParseKeywords */
8542static int __Pyx_ParseKeywords(
8543 PyObject *kwds,
8544 PyObject * const *kwvalues,
8545 PyObject ** const argnames[],
8546 PyObject *kwds2,
8547 PyObject *values[],
8548 Py_ssize_t num_pos_args,
8549 Py_ssize_t num_kwargs,
8550 const char* function_name,
8551 int ignore_unknown_kwargs)
8552{
8553 if (CYTHON_VECTORCALL && likely(PyTuple_Check(kwds)))
8554 return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
8555 else if (kwds2)
8556 return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
8557 else
8558 return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
8559}
8560
8561/* RaiseArgTupleInvalid */
8562static void __Pyx_RaiseArgtupleInvalid(
8563 const char* func_name,
8564 int exact,
8565 Py_ssize_t num_min,
8566 Py_ssize_t num_max,
8567 Py_ssize_t num_found)
8568{
8569 Py_ssize_t num_expected;
8570 const char *more_or_less;
8571 if (num_found < num_min) {
8572 num_expected = num_min;
8573 more_or_less = "at least";
8574 } else {
8575 num_expected = num_max;
8576 more_or_less = "at most";
8577 }
8578 if (exact) {
8579 more_or_less = "exactly";
8580 }
8581 PyErr_Format(PyExc_TypeError,
8582 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
8583 func_name, more_or_less, num_expected,
8584 (num_expected == 1) ? "" : "s", num_found);
8585}
8586
8587/* TypeImport */
8588#ifndef __PYX_HAVE_RT_ImportType_3_3_0
8589#define __PYX_HAVE_RT_ImportType_3_3_0
8590static PyTypeObject *__Pyx_ImportType_3_3_0(PyObject *module, const char *module_name, const char *class_name,
8591 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_3_0 check_size)
8592{
8593 PyObject *result = 0;
8594 Py_ssize_t basicsize;
8595 Py_ssize_t itemsize;
8596#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
8597 PyObject *py_basicsize;
8598 PyObject *py_itemsize;
8599#endif
8600 result = PyObject_GetAttrString(module, class_name);
8601 if (!result)
8602 goto bad;
8603 if (!PyType_Check(result)) {
8604 PyErr_Format(PyExc_TypeError,
8605 "%.200s.%.200s is not a type object",
8606 module_name, class_name);
8607 goto bad;
8608 }
8609#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
8610 basicsize = ((PyTypeObject *)result)->tp_basicsize;
8611 itemsize = ((PyTypeObject *)result)->tp_itemsize;
8612#else
8613 if (size == 0) {
8614 return (PyTypeObject *)result;
8615 }
8616 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
8617 if (!py_basicsize)
8618 goto bad;
8619 basicsize = PyLong_AsSsize_t(py_basicsize);
8620 Py_DECREF(py_basicsize);
8621 py_basicsize = 0;
8622 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
8623 goto bad;
8624 py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
8625 if (!py_itemsize)
8626 goto bad;
8627 itemsize = PyLong_AsSsize_t(py_itemsize);
8628 Py_DECREF(py_itemsize);
8629 py_itemsize = 0;
8630 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
8631 goto bad;
8632#endif
8633 if (itemsize) {
8634 if (size % alignment) {
8635 alignment = size % alignment;
8636 }
8637 if (itemsize < (Py_ssize_t)alignment)
8638 itemsize = (Py_ssize_t)alignment;
8639 }
8640 if ((size_t)(basicsize + itemsize) < size) {
8641 PyErr_Format(PyExc_ValueError,
8642 "%.200s.%.200s size changed, may indicate binary incompatibility. "
8643 "Expected %zd from C header, got %zd from PyObject",
8644 module_name, class_name, size, basicsize+itemsize);
8645 goto bad;
8646 }
8647 if (check_size == __Pyx_ImportType_CheckSize_Error_3_3_0 &&
8648 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
8649 PyErr_Format(PyExc_ValueError,
8650 "%.200s.%.200s size changed, may indicate binary incompatibility. "
8651 "Expected %zd from C header, got %zd-%zd from PyObject",
8652 module_name, class_name, size, basicsize, basicsize+itemsize);
8653 goto bad;
8654 }
8655 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_3_0 && (size_t)basicsize > size) {
8656 if (PyErr_WarnFormat(NULL, 0,
8657 "%.200s.%.200s size changed, may indicate binary incompatibility. "
8658 "Expected %zd from C header, got %zd from PyObject",
8659 module_name, class_name, size, basicsize) < 0) {
8660 goto bad;
8661 }
8662 }
8663 return (PyTypeObject *)result;
8664bad:
8665 Py_XDECREF(result);
8666 return NULL;
8667}
8668#endif
8669
8670/* PyObjectGetAttrStrNoError (used by HasAttr) */
8671#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
8672static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
8673 __Pyx_PyThreadState_declare
8674 __Pyx_PyThreadState_assign
8675 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
8676 __Pyx_PyErr_Clear();
8677}
8678#endif
8679static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
8680 PyObject *result;
8681#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
8682 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
8683 return result;
8684#else
8685#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
8686 PyTypeObject* tp = Py_TYPE(obj);
8687 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
8688 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
8689 }
8690#endif
8691 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
8692 if (unlikely(!result)) {
8693 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
8694 }
8695 return result;
8696#endif
8697}
8698
8699/* HasAttr (used by ImportImpl) */
8700#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
8701static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
8702 PyObject *r;
8703 if (unlikely(!PyUnicode_Check(n))) {
8704 PyErr_SetString(PyExc_TypeError,
8705 "hasattr(): attribute name must be string");
8706 return -1;
8707 }
8708 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
8709 if (!r) {
8710 return (unlikely(PyErr_Occurred())) ? -1 : 0;
8711 } else {
8712 Py_DECREF(r);
8713 return 1;
8714 }
8715}
8716#endif
8717
8718/* TupleOrListFromArrayImpl (used by ListFromArray) */
8719CYTHON_UNUSED static PyObject *
8720__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) {
8721 PyObject *res = PyList_New(n);
8722 if (unlikely(res == NULL)) return NULL;
8723 #if CYTHON_COMPILING_IN_CPYTHON
8724 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
8725 #else
8726 Py_ssize_t i;
8727 for (i = 0; i < n; i++) {
8728 Py_INCREF(src[i]);
8729 if (unlikely(__Pyx_PyList_SET_ITEM(res, i, src[i]) < (0))) {
8730 Py_DECREF(res);
8731 return NULL;
8732 }
8733 }
8734 #endif
8735 return res;
8736}
8737
8738/* ImportImpl (used by Import) */
8739static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
8740 PyObject *imported_module = PyImport_GetModule(qualname);
8741 if (unlikely(!imported_module)) {
8742 *module = NULL;
8743 if (PyErr_Occurred()) {
8744 return -1;
8745 }
8746 return 0;
8747 }
8748 *module = imported_module;
8749 return 1;
8750}
8751static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
8752 PyObject *imported_module;
8753 PyObject *top_level_package_name;
8754 Py_ssize_t i;
8755 int status, module_found;
8756 Py_ssize_t dot_index;
8757 module_found = __Pyx__Import_GetModule(qualname, &imported_module);
8758 if (unlikely(!module_found || module_found == -1)) {
8759 *module = NULL;
8760 return module_found;
8761 }
8762 if (imported_names) {
8763 for (i = 0; i < len_imported_names; i++) {
8764 PyObject *imported_name = imported_names[i];
8765#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
8766 int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
8767#else
8768 int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
8769 if (unlikely(has_imported_attribute == -1)) goto error;
8770#endif
8771 if (!has_imported_attribute) {
8772 goto not_found;
8773 }
8774 }
8775 *module = imported_module;
8776 return 1;
8777 }
8778 dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
8779 if (dot_index == -1) {
8780 *module = imported_module;
8781 return 1;
8782 }
8783 if (unlikely(dot_index == -2)) goto error;
8784 top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
8785 if (unlikely(!top_level_package_name)) goto error;
8786 Py_DECREF(imported_module);
8787 status = __Pyx__Import_GetModule(top_level_package_name, module);
8788 Py_DECREF(top_level_package_name);
8789 return status;
8790error:
8791 Py_DECREF(imported_module);
8792 *module = NULL;
8793 return -1;
8794not_found:
8795 Py_DECREF(imported_module);
8796 *module = NULL;
8797 return 0;
8798}
8799static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
8800 PyObject *module = 0;
8801 PyObject *empty_dict = 0;
8802 PyObject *from_list = 0;
8803 int module_found;
8804 if (!qualname) {
8805 qualname = name;
8806 }
8807 module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
8808 if (likely(module_found == 1)) {
8809 return module;
8810 } else if (unlikely(module_found == -1)) {
8811 return NULL;
8812 }
8813 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030f00a6
8814 empty_dict = PyFrozenDict_New(NULL);
8815 #else
8816 empty_dict = PyDict_New();
8817 #endif
8818 if (unlikely(!empty_dict))
8819 goto bad;
8820 if (imported_names) {
8821 from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
8822 if (unlikely(!from_list))
8823 goto bad;
8824 }
8825 if (level == -1) {
8826 const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
8827 if (package_sep != (0)) {
8828 module = PyImport_ImportModuleLevelObject(
8829 name, moddict, empty_dict, from_list, 1);
8830 if (unlikely(!module)) {
8831 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
8832 goto bad;
8833 PyErr_Clear();
8834 }
8835 }
8836 level = 0;
8837 }
8838 if (!module) {
8839 module = PyImport_ImportModuleLevelObject(
8840 name, moddict, empty_dict, from_list, level);
8841 }
8842bad:
8843 Py_XDECREF(from_list);
8844 Py_XDECREF(empty_dict);
8845 return module;
8846}
8847
8848/* Import */
8849static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
8850 return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
8851}
8852
8853/* dict_setdefault (used by FetchCommonType) */
8854static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
8855 PyObject* value;
8856#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
8857 PyDict_SetDefaultRef(d, key, default_value, &value);
8858#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
8859 PyObject *args[] = {d, key, default_value};
8860 value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
8861#elif CYTHON_COMPILING_IN_LIMITED_API
8862 value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
8863#else
8864 value = PyDict_SetDefault(d, key, default_value);
8865 if (unlikely(!value)) return NULL;
8866 Py_INCREF(value);
8867#endif
8868 return value;
8869}
8870
8871/* AddModuleRef (used by FetchSharedCythonModule) */
8872#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX < 0x030F00a3
8873 static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
8874 PyObject *module_dict = PyImport_GetModuleDict();
8875 PyObject *m;
8876 if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
8877 return NULL;
8878 }
8879 if (m != NULL && PyModule_Check(m)) {
8880 return m;
8881 }
8882 Py_XDECREF(m);
8883 m = PyModule_NewObject(name);
8884 if (m == NULL)
8885 return NULL;
8886 if (PyDict_CheckExact(module_dict)) {
8887 PyObject *new_m;
8888 (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
8889 Py_DECREF(m);
8890 return new_m;
8891 } else {
8892 if (PyObject_SetItem(module_dict, name, m) != 0) {
8893 Py_DECREF(m);
8894 return NULL;
8895 }
8896 return m;
8897 }
8898 }
8899 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
8900 if ((PY_VERSION_HEX >= 0x030E0000) && Py_Version >= 0x030E0100) {
8901 return PyImport_AddModuleRef(name);
8902 }
8903 PyObject *py_name = PyUnicode_FromString(name);
8904 if (!py_name) return NULL;
8905 PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
8906 Py_DECREF(py_name);
8907 return module;
8908 }
8909#elif __PYX_LIMITED_VERSION_HEX < 0x030d0000
8910 static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
8911 PyObject *module = PyImport_AddModule(name);
8912 Py_XINCREF(module);
8913 return module;
8914 }
8915#endif
8916
8917/* FetchSharedCythonModule (used by FetchCommonType) */
8918static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
8919 return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
8920}
8921
8922/* VerifyCachedType (used by FetchCommonType) */
8923static int __Pyx_VerifyCachedType(PyObject *cached_type,
8924 const char *name,
8925 Py_ssize_t expected_basicsize) {
8926 Py_ssize_t basicsize;
8927 if (!PyType_Check(cached_type)) {
8928 PyErr_Format(PyExc_TypeError,
8929 "Shared Cython type %.200s is not a type object", name);
8930 return -1;
8931 }
8932 if (expected_basicsize == 0) {
8933 return 0; // size is inherited, nothing useful to check
8934 }
8935#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_OPAQUE_OBJECTS
8936 if (expected_basicsize < 0) {
8937 basicsize = PyType_GetTypeDataSize((PyTypeObject*)cached_type);
8938 } else
8939#endif
8940 {
8941 #if CYTHON_COMPILING_IN_LIMITED_API
8942 PyObject *py_basicsize;
8943 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
8944 if (unlikely(!py_basicsize)) return -1;
8945 basicsize = PyLong_AsSsize_t(py_basicsize);
8946 Py_DECREF(py_basicsize);
8947 py_basicsize = NULL;
8948 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
8949 #else
8950 basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
8951 #endif
8952 }
8953 if ((expected_basicsize >= 0) ?
8954 (basicsize != expected_basicsize) :
8955 (basicsize < -expected_basicsize)) {
8956 PyErr_Format(PyExc_TypeError,
8957 "Shared Cython type %.200s has the wrong size, try recompiling",
8958 name);
8959 return -1;
8960 }
8961 return 0;
8962}
8963
8964/* FetchCommonType (used by CommonTypesMetaclass) */
8965#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
8966static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
8967 PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
8968 if (result && metaclass) {
8969 PyObject *old_tp = (PyObject*)Py_TYPE(result);
8970 Py_INCREF((PyObject*)metaclass);
8971 Py_SET_TYPE(result, metaclass);
8972 Py_DECREF(old_tp);
8973 PyType_Modified((PyTypeObject*)result);
8974 }
8975 return result;
8976}
8977#else
8978#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
8979#endif
8980static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
8981 PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
8982 int get_item_ref_result;
8983 const char* object_name = strrchr(spec->name, '.');
8984 object_name = object_name ? object_name+1 : spec->name;
8985 py_object_name = PyUnicode_FromString(object_name);
8986 if (!py_object_name) return NULL;
8987 abi_module = __Pyx_FetchSharedCythonABIModule();
8988 if (!abi_module) goto done;
8989 abi_module_dict = PyModule_GetDict(abi_module);
8990 if (!abi_module_dict) goto done;
8991 get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
8992 if (get_item_ref_result == 1) {
8993 if (__Pyx_VerifyCachedType(
8994 cached_type,
8995 object_name,
8996 spec->basicsize) < 0) {
8997 goto bad;
8998 }
8999 goto done;
9000 } else if (unlikely(get_item_ref_result == -1)) {
9001 goto bad;
9002 }
9003 cached_type = __Pyx_PyType_FromMetaclass(
9004 metaclass,
9005 CYTHON_USE_MODULE_STATE ? module : abi_module,
9006 spec, bases);
9007 if (unlikely(!cached_type)) goto bad;
9008 new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
9009 if (unlikely(new_cached_type != cached_type)) {
9010 if (unlikely(!new_cached_type)) goto bad;
9011 Py_DECREF(cached_type);
9012 cached_type = new_cached_type;
9013 if (__Pyx_VerifyCachedType(
9014 cached_type,
9015 object_name,
9016 spec->basicsize) < 0) {
9017 goto bad;
9018 }
9019 goto done;
9020 } else {
9021 Py_DECREF(new_cached_type);
9022 }
9023done:
9024 Py_XDECREF(abi_module);
9025 Py_DECREF(py_object_name);
9026 assert(cached_type == NULL || PyType_Check(cached_type));
9027 return (PyTypeObject *) cached_type;
9028bad:
9029 Py_XDECREF(cached_type);
9030 cached_type = NULL;
9031 goto done;
9032}
9033
9034/* CommonTypesMetaclass (used by CythonFunctionShared) */
9035static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
9036 return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
9037}
9038#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
9039static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
9040 PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
9041 return NULL;
9042}
9043static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
9044 PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
9045 return -1;
9046}
9047#endif
9048static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
9049 {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
9050 {0, 0, 0, 0, 0}
9051};
9052static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
9053 {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
9054 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
9055 {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
9056 {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
9057 {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
9058 #endif
9059 {0, 0}
9060};
9061static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
9062 __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
9063 0,
9064 0,
9065 Py_TPFLAGS_IMMUTABLETYPE |
9066 Py_TPFLAGS_DISALLOW_INSTANTIATION |
9067 Py_TPFLAGS_DEFAULT,
9068 __pyx_CommonTypesMetaclass_slots
9069};
9070static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
9071 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
9072 PyObject *bases = PyTuple_Pack(1, &PyType_Type);
9073 if (unlikely(!bases)) {
9074 return -1;
9075 }
9076 mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
9077 Py_DECREF(bases);
9078 if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
9079 return -1;
9080 }
9081 return 0;
9082}
9083
9084/* CythonFunctionPerModule (used by CythonFunctionShared) */
9085#if CYTHON_COMPILING_IN_LIMITED_API
9086static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
9087 if (__Pyx_CyFunction_Check(func)) {
9088 return __Pyx_as_CyFunctionObject(func)->func_methoddef->ml_meth == (PyCFunction) cfunc;
9089 } else if (PyCFunction_Check(func)) {
9090 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
9091 }
9092 return 0;
9093}
9094static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
9095 if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
9096 int result;
9097 PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
9098 if (unlikely(!newFunc)) {
9099 PyErr_Clear(); // It's only an optimization, so don't throw an error
9100 return 0;
9101 }
9102 result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
9103 Py_DECREF(newFunc);
9104 return result;
9105 }
9106 return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
9107}
9108#else
9109static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
9110 if (PyMethod_Check(func)) {
9111 func = PyMethod_GET_FUNCTION(func);
9112 }
9113 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
9114}
9115#endif
9116static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
9117#if CYTHON_COMPILING_IN_LIMITED_API
9118 __Pyx_Py_XDECREF_SET(
9119 __Pyx__CyFunction_GetClassObj(f),
9120 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
9121#else
9122 __Pyx_Py_XDECREF_SET(
9123 ((PyCMethodObject *) (f))->mm_class,
9124 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
9125#endif
9126}
9127static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
9128 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
9129 m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
9130 if (unlikely(!m->defaults))
9131 return NULL;
9132 return m->defaults;
9133}
9134static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
9135 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
9136 m->defaults_tuple = tuple;
9137 Py_INCREF(tuple);
9138}
9139static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
9140 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
9141 m->defaults_kwdict = dict;
9142 Py_INCREF(dict);
9143}
9144static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
9145 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(func);
9146 m->func_annotations = dict;
9147 Py_INCREF(dict);
9148}
9149
9150/* CallTypeTraverse (used by CythonFunctionShared) */
9151#if !CYTHON_USE_TYPE_SPECS
9152#else
9153static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
9154 if (!always_call) {
9155 PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
9156 unsigned long flags = PyType_GetFlags(base);
9157 if (flags & Py_TPFLAGS_HEAPTYPE) {
9158 return 0;
9159 }
9160 }
9161 Py_VISIT((PyObject*)Py_TYPE(o));
9162 return 0;
9163}
9164#endif
9165
9166/* PyMethodNew (used by CythonFunctionShared) */
9167#if CYTHON_COMPILING_IN_LIMITED_API
9168static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
9169 PyObject *result;
9170 CYTHON_UNUSED_VAR(typ);
9171 if (!self)
9172 return __Pyx_NewRef(func);
9173 #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
9174 {
9175 PyObject *args[] = {func, self};
9176 result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
9177 }
9178 #else
9179 result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
9180 #endif
9181 return result;
9182}
9183#else
9184static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
9185 CYTHON_UNUSED_VAR(typ);
9186 if (!self)
9187 return __Pyx_NewRef(func);
9188 return PyMethod_New(func, self);
9189}
9190#endif
9191
9192/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
9193#if CYTHON_VECTORCALL
9194static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
9195{
9196 PyObject *res = NULL;
9197 PyObject *kwnames;
9198 PyObject **newargs;
9199 PyObject **kwvalues;
9200 Py_ssize_t i;
9201 #if CYTHON_AVOID_BORROWED_REFS
9202 PyObject *pos;
9203 #else
9204 Py_ssize_t pos;
9205 #endif
9206 size_t j;
9207 PyObject *key, *value;
9208 unsigned long keys_are_strings;
9209 #if !CYTHON_ASSUME_SAFE_SIZE
9210 Py_ssize_t nkw = PyDict_Size(kw);
9211 if (unlikely(nkw == -1)) return NULL;
9212 #else
9213 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
9214 #endif
9215 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
9216 if (unlikely(newargs == NULL)) {
9217 PyErr_NoMemory();
9218 return NULL;
9219 }
9220 for (j = 0; j < nargs; j++) newargs[j] = args[j];
9221 kwnames = PyTuple_New(nkw);
9222 if (unlikely(kwnames == NULL)) {
9223 PyMem_Free(newargs);
9224 return NULL;
9225 }
9226 kwvalues = newargs + nargs;
9227 pos = 0;
9228 i = 0;
9229 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
9230 while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
9231 keys_are_strings &=
9232 #if CYTHON_COMPILING_IN_LIMITED_API
9233 PyType_GetFlags(Py_TYPE(key));
9234 #else
9235 Py_TYPE(key)->tp_flags;
9236 #endif
9237 #if !CYTHON_ASSUME_SAFE_MACROS
9238 if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
9239 #else
9240 PyTuple_SET_ITEM(kwnames, i, key);
9241 #endif
9242 kwvalues[i] = value;
9243 i++;
9244 }
9245 if (unlikely(!keys_are_strings)) {
9246 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
9247 goto cleanup;
9248 }
9249 res = vc(func, newargs, nargs, kwnames);
9250cleanup:
9251 #if CYTHON_AVOID_BORROWED_REFS
9252 Py_DECREF(pos);
9253 #endif
9254 Py_DECREF(kwnames);
9255 for (i = 0; i < nkw; i++)
9256 Py_DECREF(kwvalues[i]);
9257 PyMem_Free(newargs);
9258 return res;
9259}
9260static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
9261{
9262 Py_ssize_t kw_size =
9263 likely(kw == NULL) ?
9264 0 :
9265#if !CYTHON_ASSUME_SAFE_SIZE
9266 PyDict_Size(kw);
9267#else
9268 PyDict_GET_SIZE(kw);
9269#endif
9270 if (kw_size == 0) {
9271 return vc(func, args, nargs, NULL);
9272 }
9273#if !CYTHON_ASSUME_SAFE_SIZE
9274 else if (unlikely(kw_size == -1)) {
9275 return NULL;
9276 }
9277#endif
9278 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
9279}
9280#endif
9281
9282/* CythonFunctionShared (used by CythonFunction) */
9283static PyObject *
9284__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
9285{
9286 if (unlikely(op->func_doc == NULL)) {
9287#if CYTHON_COMPILING_IN_LIMITED_API
9288 const char *doc = op->func_methoddef->ml_doc;
9289#else
9290 const char *doc = ((PyCFunctionObject*)op)->m_ml->ml_doc;
9291#endif
9292 if (doc) {
9293 op->func_doc = PyUnicode_FromString(doc);
9294 if (unlikely(op->func_doc == NULL))
9295 return NULL;
9296 } else {
9297 Py_INCREF(Py_None);
9298 return Py_None;
9299 }
9300 }
9301 Py_INCREF(op->func_doc);
9302 return op->func_doc;
9303}
9304static PyObject *
9305__Pyx_CyFunction_get_doc(PyObject *op_in, void *closure) {
9306 PyObject *result;
9307 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9308 CYTHON_UNUSED_VAR(closure);
9309 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9310 result = __Pyx_CyFunction_get_doc_locked(op);
9311 __Pyx_END_CRITICAL_SECTION();
9312 return result;
9313}
9314static int
9315__Pyx_CyFunction_set_doc(PyObject *op_in, PyObject *value, void *context)
9316{
9317 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9318 CYTHON_UNUSED_VAR(context);
9319 if (value == NULL) {
9320 value = Py_None;
9321 }
9322 Py_INCREF(value);
9323 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9324 __Pyx_Py_XDECREF_SET(op->func_doc, value);
9325 __Pyx_END_CRITICAL_SECTION();
9326 return 0;
9327}
9328static PyObject *
9329__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
9330{
9331 if (unlikely(op->func_name == NULL)) {
9332#if CYTHON_COMPILING_IN_LIMITED_API
9333 const char *name = op->func_methoddef->ml_name;
9334#else
9335 const char *name = ((PyCFunctionObject*)op)->m_ml->ml_name;
9336#endif
9337 op->func_name = PyUnicode_InternFromString(name);
9338 if (unlikely(op->func_name == NULL))
9339 return NULL;
9340 }
9341 Py_INCREF(op->func_name);
9342 return op->func_name;
9343}
9344static PyObject *
9345__Pyx_CyFunction_get_name(PyObject *op, void *context)
9346{
9347 PyObject *result = NULL;
9348 CYTHON_UNUSED_VAR(context);
9349 __Pyx_BEGIN_CRITICAL_SECTION(op);
9350 result = __Pyx_CyFunction_get_name_locked(__Pyx_as_CyFunctionObject(op));
9351 __Pyx_END_CRITICAL_SECTION();
9352 return result;
9353}
9354static int
9355__Pyx_CyFunction_set_name(PyObject *op_in, PyObject *value, void *context)
9356{
9357 CYTHON_UNUSED_VAR(context);
9358 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
9359 PyErr_SetString(PyExc_TypeError,
9360 "__name__ must be set to a string object");
9361 return -1;
9362 }
9363 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9364 Py_INCREF(value);
9365 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9366 __Pyx_Py_XDECREF_SET(op->func_name, value);
9367 __Pyx_END_CRITICAL_SECTION();
9368 return 0;
9369}
9370static PyObject *
9371__Pyx_CyFunction_get_qualname(PyObject *op_in, void *context)
9372{
9373 CYTHON_UNUSED_VAR(context);
9374 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9375 PyObject *result;
9376 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9377 Py_INCREF(op->func_qualname);
9378 result = op->func_qualname;
9379 __Pyx_END_CRITICAL_SECTION();
9380 return result;
9381}
9382static int
9383__Pyx_CyFunction_set_qualname(PyObject *op_in, PyObject *value, void *context)
9384{
9385 CYTHON_UNUSED_VAR(context);
9386 if (unlikely(value == NULL || !PyUnicode_Check(value))) {
9387 PyErr_SetString(PyExc_TypeError,
9388 "__qualname__ must be set to a string object");
9389 return -1;
9390 }
9391 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9392 Py_INCREF(value);
9393 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9394 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
9395 __Pyx_END_CRITICAL_SECTION();
9396 return 0;
9397}
9398#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
9399static PyObject *
9400__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
9401{
9402 CYTHON_UNUSED_VAR(context);
9403 if (unlikely(op->func_dict == NULL)) {
9404 op->func_dict = PyDict_New();
9405 if (unlikely(op->func_dict == NULL))
9406 return NULL;
9407 }
9408 Py_INCREF(op->func_dict);
9409 return op->func_dict;
9410}
9411#endif
9412static PyObject *
9413__Pyx_CyFunction_get_globals(PyObject *op_in, void *context)
9414{
9415 CYTHON_UNUSED_VAR(context);
9416 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9417 Py_INCREF(op->func_globals);
9418 return op->func_globals;
9419}
9420static PyObject *
9421__Pyx_CyFunction_get_closure(PyObject *op, void *context)
9422{
9423 CYTHON_UNUSED_VAR(op);
9424 CYTHON_UNUSED_VAR(context);
9425 Py_INCREF(Py_None);
9426 return Py_None;
9427}
9428static PyObject *
9429__Pyx_CyFunction_get_code(PyObject *op_in, void *context)
9430{
9431 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9432 PyObject* result = (op->func_code) ? op->func_code : Py_None;
9433 CYTHON_UNUSED_VAR(context);
9434 Py_INCREF(result);
9435 return result;
9436}
9437static int
9438__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op, PyObject *op_obj) {
9439 int result = 0;
9440 PyObject *res = op->defaults_getter(op_obj);
9441 if (unlikely(!res))
9442 return -1;
9443 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9444 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
9445 Py_INCREF(op->defaults_tuple);
9446 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
9447 Py_INCREF(op->defaults_kwdict);
9448 #else
9449 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
9450 if (unlikely(!op->defaults_tuple)) result = -1;
9451 else {
9452 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
9453 if (unlikely(!op->defaults_kwdict)) result = -1;
9454 }
9455 #endif
9456 Py_DECREF(res);
9457 return result;
9458}
9459static int
9460__Pyx_CyFunction_set_defaults(PyObject *op_in, PyObject* value, void *context) {
9461 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9462 CYTHON_UNUSED_VAR(context);
9463 if (!value) {
9464 value = Py_None;
9465 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
9466 PyErr_SetString(PyExc_TypeError,
9467 "__defaults__ must be set to a tuple object");
9468 return -1;
9469 }
9470 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
9471 "currently affect the values used in function calls", 1);
9472 Py_INCREF(value);
9473 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9474 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
9475 __Pyx_END_CRITICAL_SECTION();
9476 return 0;
9477}
9478static PyObject *
9479__Pyx_CyFunction_get_defaults_locked(PyObject *op_in) {
9480 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9481 PyObject* result = op->defaults_tuple;
9482 if (unlikely(!result)) {
9483 if (op->defaults_getter) {
9484 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0)) return NULL;
9485 result = op->defaults_tuple;
9486 } else {
9487 result = Py_None;
9488 }
9489 }
9490 Py_INCREF(result);
9491 return result;
9492}
9493static PyObject *
9494__Pyx_CyFunction_get_defaults(PyObject *op, void *context) {
9495 PyObject* result = NULL;
9496 CYTHON_UNUSED_VAR(context);
9497 __Pyx_BEGIN_CRITICAL_SECTION(op);
9498 result = __Pyx_CyFunction_get_defaults_locked(op);
9499 __Pyx_END_CRITICAL_SECTION();
9500 return result;
9501}
9502static int
9503__Pyx_CyFunction_set_kwdefaults(PyObject *op_in, PyObject* value, void *context) {
9504 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9505 CYTHON_UNUSED_VAR(context);
9506 if (!value) {
9507 value = Py_None;
9508 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
9509 PyErr_SetString(PyExc_TypeError,
9510 "__kwdefaults__ must be set to a dict object");
9511 return -1;
9512 }
9513 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
9514 "currently affect the values used in function calls", 1);
9515 Py_INCREF(value);
9516 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9517 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
9518 __Pyx_END_CRITICAL_SECTION();
9519 return 0;
9520}
9521static PyObject *
9522__Pyx_CyFunction_get_kwdefaults_locked(PyObject *op_in) {
9523 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9524 PyObject* result = op->defaults_kwdict;
9525 if (unlikely(!result)) {
9526 if (op->defaults_getter) {
9527 if (unlikely(__Pyx_CyFunction_init_defaults(op, op_in) < 0)) return NULL;
9528 result = op->defaults_kwdict;
9529 } else {
9530 result = Py_None;
9531 }
9532 }
9533 Py_INCREF(result);
9534 return result;
9535}
9536static PyObject *
9537__Pyx_CyFunction_get_kwdefaults(PyObject *op, void *context) {
9538 PyObject* result;
9539 CYTHON_UNUSED_VAR(context);
9540 __Pyx_BEGIN_CRITICAL_SECTION(op);
9541 result = __Pyx_CyFunction_get_kwdefaults_locked(op);
9542 __Pyx_END_CRITICAL_SECTION();
9543 return result;
9544}
9545static int __Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value);
9546static int
9547__Pyx_CyFunction_set_annotations(PyObject *op_in, PyObject* value, void *context) {
9548 CYTHON_UNUSED_VAR(context);
9549 if (!value || value == Py_None) {
9550 value = NULL;
9551 } else if (unlikely(!PyDict_Check(value))) {
9552 PyErr_SetString(PyExc_TypeError,
9553 "__annotations__ must be set to a dict object");
9554 return -1;
9555 }
9556 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9557 Py_XINCREF(value);
9558 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9559 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
9560 __Pyx_END_CRITICAL_SECTION();
9561 if (unlikely(__Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, Py_None) < 0)) return -1;
9562 return 0;
9563}
9564static int
9565__Pyx_CyFunction_get_dict_if_exists(PyObject *op_in, PyObject **dict) {
9566 /* Return 1 if the function dict exists, 0 otherwise. This cannot fail:
9567 * _PyObject_GetDictPtr() may clear errors internally, but never reports them. */
9568#if CYTHON_COMPILING_IN_PYPY
9569 *dict = PyObject_GenericGetDict(op_in, NULL);
9570#elif CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030C0000
9571 *dict = __Pyx_as_CyFunctionObject(op_in)->func_dict;
9572#else
9573 PyObject **dictptr = _PyObject_GetDictPtr(op_in);
9574 *dict = likely(dictptr) ? *dictptr : NULL;
9575#endif
9576 return *dict ? 1 : 0;
9577}
9578static int
9579__Pyx_CyFunction_get_annotate_from_dict_if_exists(PyObject *op_in, PyObject **annotate) {
9580 PyObject *dict;
9581 int dict_found;
9582 *annotate = NULL;
9583 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
9584 if (!dict_found) return 0;
9585 return __Pyx_PyDict_GetItemRef(dict, __pyx_mstate_global->__pyx_n_u_annotate, annotate);
9586}
9587static int
9588__Pyx_CyFunction_set_annotate_in_dict_if_exists(PyObject *op_in, PyObject *value) {
9589 PyObject *dict;
9590 int dict_found;
9591 dict_found = __Pyx_CyFunction_get_dict_if_exists(op_in, &dict);
9592 if (!dict_found) return 0;
9593 if (value) {
9594 return PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
9595 } else {
9596#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
9597 return PyDict_Pop(dict, __pyx_mstate_global->__pyx_n_u_annotate, NULL);
9598#else
9599 int result = PyDict_Contains(dict, __pyx_mstate_global->__pyx_n_u_annotate);
9600 if (result == 1) {
9601 result = PyDict_DelItem(dict, __pyx_mstate_global->__pyx_n_u_annotate);
9602 }
9603 return result;
9604#endif
9605 }
9606}
9607static int
9608__Pyx_CyFunction_set_annotate_in_dict(PyObject *op_in, PyObject *value) {
9609 PyObject *dict;
9610 int result;
9611#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
9612 dict = __Pyx_CyFunction_get_dict(__Pyx_as_CyFunctionObject(op_in), NULL);
9613#else
9614 dict = PyObject_GenericGetDict(op_in, NULL);
9615#endif
9616 if (unlikely(!dict)) return -1;
9617 result = PyDict_SetItem(dict, __pyx_mstate_global->__pyx_n_u_annotate, value);
9618 Py_DECREF(dict);
9619 return result;
9620}
9621static PyObject *
9622__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
9623 PyObject* result = op->func_annotations;
9624 if (unlikely(!result)) {
9625 result = PyDict_New();
9626 if (unlikely(!result)) return NULL;
9627 op->func_annotations = result;
9628 }
9629 Py_INCREF(result);
9630 return result;
9631}
9632static PyObject *
9633__Pyx_CyFunction_get_annotations(PyObject *op_in, void *context) {
9634 PyObject *annotate = NULL;
9635 PyObject *result = NULL;
9636 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9637 CYTHON_UNUSED_VAR(context);
9638 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9639 result = __Pyx_XNewRef(op->func_annotations);
9640 __Pyx_END_CRITICAL_SECTION();
9641 if (result) return result;
9642 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
9643 if (!annotate || annotate == Py_None) {
9644 Py_XDECREF(annotate);
9645 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9646 result = __Pyx_CyFunction_get_annotations_locked(op);
9647 __Pyx_END_CRITICAL_SECTION();
9648 return result;
9649 }
9650 PyObject *format = PyLong_FromLong(1L); // annotationlib.Format.VALUE
9651 if (likely(format)) {
9652 if (!Py_EnterRecursiveCall(" cyfunction __annotations__.__get__")) {
9653 result = __Pyx_PyObject_CallOneArg(annotate, format);
9654 Py_LeaveRecursiveCall();
9655 Py_DECREF(format);
9656 }
9657 }
9658 Py_DECREF(annotate);
9659 if (unlikely(!result)) return NULL;
9660 if (unlikely(!PyDict_Check(result))) {
9661 PyErr_SetString(PyExc_TypeError, "__annotate__ must return a dict");
9662 Py_DECREF(result);
9663 return NULL;
9664 }
9665 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9666 __Pyx_Py_XDECREF_SET(op->func_annotations, __Pyx_NewRef(result));
9667 __Pyx_END_CRITICAL_SECTION();
9668 return result;
9669}
9670static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *arg) {
9671 CYTHON_UNUSED_VAR(arg);
9672 if (unlikely(!self)) {
9673 PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument");
9674 return NULL;
9675 }
9676 PyObject *result;
9677 if (Py_EnterRecursiveCall(" in cyfunction annotate")) {
9678 return NULL;
9679 }
9680 result = __Pyx_CyFunction_get_annotations(self, NULL);
9681 Py_LeaveRecursiveCall();
9682 return result;
9683}
9684static PyObject *
9685__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context);
9686static int
9687__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) {
9688 CYTHON_UNUSED_VAR(context);
9689 if (value == NULL) {
9690 PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted");
9691 return -1;
9692 }
9693 if (unlikely(value != Py_None && !PyCallable_Check(value))) {
9694 PyErr_SetString(PyExc_TypeError, "__annotate__ must be callable or None");
9695 return -1;
9696 }
9697 if (unlikely(__Pyx_TypeCheck(value, &PyCFunction_Type))) {
9698#if !CYTHON_ASSUME_SAFE_MACROS && !CYTHON_COMPILING_IN_PYPY
9699 PyCFunction cfunction = PyCFunction_GetFunction(value);
9700 if (unlikely(!cfunction)) return -1;
9701 PyObject *value_self = PyCFunction_GetSelf(value);
9702 if (unlikely(!value_self && PyErr_Occurred())) return -1;
9703#else
9704 PyCFunction cfunction = PyCFunction_GET_FUNCTION(value);
9705 PyObject *value_self = PyCFunction_GET_SELF(value);
9706#endif
9707 if (cfunction == __Pyx_CyFunction_annotate_impl && value_self == op_in) {
9708 return __Pyx_CyFunction_set_annotate_in_dict_if_exists(op_in, NULL);
9709 }
9710 }
9711 if (value != Py_None) {
9712 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9713 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9714 Py_CLEAR(op->func_annotations);
9715 __Pyx_END_CRITICAL_SECTION();
9716 }
9717 return __Pyx_CyFunction_set_annotate_in_dict(op_in, value);
9718}
9719#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
9720static PyObject *
9721__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
9722 int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
9723 if (is_coroutine) {
9724 PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
9725 fromlist = PyList_New(1);
9726 if (unlikely(!fromlist)) return NULL;
9727 Py_INCREF(marker);
9728#if CYTHON_ASSUME_SAFE_MACROS
9729 PyList_SET_ITEM(fromlist, 0, marker);
9730#else
9731 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
9732 Py_DECREF(fromlist);
9733 return NULL;
9734 }
9735#endif
9736 module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
9737 Py_DECREF(fromlist);
9738 if (unlikely(!module)) {
9739 goto ignore_or_error;
9740 }
9741 is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
9742 Py_DECREF(module);
9743 if (likely(is_coroutine_value)) {
9744 return is_coroutine_value;
9745 }
9746ignore_or_error:
9747 if (!__Pyx_IgnoreException(PyExc_Exception)) {
9748 return NULL;
9749 }
9750 }
9751 return __Pyx_PyBool_FromLong(is_coroutine);
9752}
9753static PyObject *
9754__Pyx_CyFunction_get_is_coroutine(PyObject *op_in, void *context) {
9755 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9756 PyObject *result;
9757 CYTHON_UNUSED_VAR(context);
9758 if (op->func_is_coroutine) {
9759 return __Pyx_NewRef(op->func_is_coroutine);
9760 }
9761 result = __Pyx_CyFunction_get_is_coroutine_value(op);
9762 if (unlikely(!result))
9763 return NULL;
9764 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
9765 if (op->func_is_coroutine) {
9766 Py_DECREF(result);
9767 result = __Pyx_NewRef(op->func_is_coroutine);
9768 } else {
9769 op->func_is_coroutine = __Pyx_NewRef(result);
9770 }
9771 __Pyx_END_CRITICAL_SECTION();
9772 return result;
9773}
9774#endif
9775static void __Pyx_CyFunction_raise_argument_count_error(PyObject *func, const char* message, Py_ssize_t size) {
9776#if CYTHON_COMPILING_IN_LIMITED_API
9777 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
9778 if (!py_name) return;
9779 PyErr_Format(PyExc_TypeError,
9780 "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
9781 py_name, message, size);
9782 Py_DECREF(py_name);
9783#else
9784 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
9785 PyErr_Format(PyExc_TypeError,
9786 "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
9787 name, message, size);
9788#endif
9789}
9790static void __Pyx_CyFunction_raise_type_error(PyObject *func, const char* message) {
9791#if CYTHON_COMPILING_IN_LIMITED_API
9792 PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
9793 if (!py_name) return;
9794 PyErr_Format(PyExc_TypeError,
9795 "%.200S() %s",
9796 py_name, message);
9797 Py_DECREF(py_name);
9798#else
9799 const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
9800 PyErr_Format(PyExc_TypeError,
9801 "%.200s() %s",
9802 name, message);
9803#endif
9804}
9805#if CYTHON_COMPILING_IN_LIMITED_API
9806static PyObject *
9807__Pyx_CyFunction_get_module(PyObject *op_in, void *context) {
9808 CYTHON_UNUSED_VAR(context);
9809 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9810 Py_INCREF(op->func_module);
9811 return op->func_module;
9812}
9813static int
9814__Pyx_CyFunction_set_module(PyObject *op_in, PyObject* value, void *context) {
9815 CYTHON_UNUSED_VAR(context);
9816 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
9817 if (value == NULL) {
9818 value = Py_None;
9819 }
9820 Py_INCREF(value);
9821 PyObject *old = op->func_module;
9822 op->func_module = value;
9823 Py_DECREF(old);
9824 return 0;
9825}
9826#endif
9827static PyGetSetDef __pyx_CyFunction_getsets[] = {
9828 {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
9829 {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
9830 {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
9831 {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
9832 {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
9833#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
9834 {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
9835 {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
9836#else
9837 {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
9838 {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
9839#endif
9840 {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
9841 {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
9842 {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
9843 {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
9844 {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
9845 {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
9846 {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
9847 {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
9848 {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
9849 {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
9850 {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0},
9851#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
9852 {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
9853#endif
9854#if CYTHON_COMPILING_IN_LIMITED_API
9855 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
9856#endif
9857 {0, 0, 0, 0, 0}
9858};
9859static PyMemberDef __pyx_CyFunction_members[] = {
9860#if !CYTHON_COMPILING_IN_LIMITED_API
9861 {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
9862#endif
9863#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
9864 {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict),
9865 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
9866#endif
9867#if CYTHON_VECTORCALL
9868#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
9869 {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall),
9870 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
9871#else
9872 {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
9873#endif
9874#if CYTHON_COMPILING_IN_LIMITED_API
9875 {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist),
9876 __PYX_SHARED_RELATIVE_OFFSET | READONLY, 0},
9877#else
9878 {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
9879#endif
9880#endif
9881 {0, 0, 0, 0, 0}
9882};
9883static PyObject *
9884__Pyx_CyFunction_reduce(PyObject *m_in, PyObject *args)
9885{
9886 PyObject *result = NULL;
9887 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
9888 CYTHON_UNUSED_VAR(args);
9889 __Pyx_BEGIN_CRITICAL_SECTION(m_in);
9890 Py_INCREF(m->func_qualname);
9891 result = m->func_qualname;
9892 __Pyx_END_CRITICAL_SECTION();
9893 return result;
9894}
9895static PyMethodDef __pyx_CyFunction_methods[] = {
9896 {"__annotate_cython__", __Pyx_CyFunction_annotate_impl, METH_O,
9897 "Placeholder __annotate__ function to allow 'functools.wraps' to work "
9898 "on Cython functions."},
9899 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_NOARGS, 0},
9900 {0, 0, 0, 0}
9901};
9902static PyObject *
9903__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) {
9904 PyObject *annotate = NULL;
9905 CYTHON_UNUSED_VAR(context);
9906 if (unlikely(__Pyx_CyFunction_get_annotate_from_dict_if_exists(op_in, &annotate) < 0)) return NULL;
9907 if (annotate) return annotate;
9908 PyObject *method = PyCFunction_New(
9909 &__pyx_CyFunction_methods[0],
9910 op_in);
9911 return method;
9912}
9913#if CYTHON_COMPILING_IN_LIMITED_API
9914#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
9915#else
9916#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
9917#endif
9918static PyObject *__Pyx_CyFunction_Init(PyObject *op_in,
9919 PyMethodDef *ml, int flags, PyObject* qualname,
9920 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
9921 __pyx_CyFunctionObject* op = __Pyx_as_CyFunctionObject(op_in);
9922#if !CYTHON_COMPILING_IN_LIMITED_API
9923 PyCFunctionObject *cf = (PyCFunctionObject*) op;
9924#endif
9925 if (unlikely(op == NULL))
9926 return NULL;
9927#if CYTHON_COMPILING_IN_LIMITED_API
9928 op->func_methoddef = ml;
9929 Py_INCREF(module);
9930 op->func_module = module;
9931#endif
9932 op->flags = flags;
9933 __Pyx_CyFunction_weakreflist(op) = NULL;
9934#if !CYTHON_COMPILING_IN_LIMITED_API
9935 cf->m_ml = ml;
9936 cf->m_self = (PyObject *) op;
9937#endif
9938 Py_XINCREF(closure);
9939 op->func_closure = closure;
9940#if !CYTHON_COMPILING_IN_LIMITED_API
9941 Py_XINCREF(module);
9942 cf->m_module = module;
9943#endif
9944#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
9945 op->func_dict = NULL;
9946#endif
9947 op->func_name = NULL;
9948 Py_INCREF(qualname);
9949 op->func_qualname = qualname;
9950 op->func_doc = NULL;
9951#if CYTHON_COMPILING_IN_LIMITED_API
9952 op->func_classobj = NULL;
9953#else
9954 ((PyCMethodObject*)op)->mm_class = NULL;
9955#endif
9956 op->func_globals = globals;
9957 Py_INCREF(op->func_globals);
9958 Py_XINCREF(code);
9959 op->func_code = code;
9960 op->defaults = NULL;
9961 op->defaults_tuple = NULL;
9962 op->defaults_kwdict = NULL;
9963 op->defaults_getter = NULL;
9964 op->func_annotations = NULL;
9965#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
9966 op->func_is_coroutine = NULL;
9967#endif
9968#if CYTHON_VECTORCALL
9969 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
9970 case METH_NOARGS:
9971 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
9972 break;
9973 case METH_O:
9974 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
9975 break;
9976 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
9977 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
9978 break;
9979 case METH_FASTCALL | METH_KEYWORDS:
9980 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
9981 break;
9982 case METH_VARARGS | METH_KEYWORDS:
9983 __Pyx_CyFunction_func_vectorcall(op) = NULL;
9984 break;
9985 default:
9986 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
9987 Py_DECREF(op_in);
9988 return NULL;
9989 }
9990#endif
9991 return op_in;
9992}
9993static int __Pyx__CyFunction_clear(__pyx_CyFunctionObject *m)
9994{
9995 Py_CLEAR(m->func_closure);
9996#if CYTHON_COMPILING_IN_LIMITED_API
9997 Py_CLEAR(m->func_module);
9998#else
9999 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
10000#endif
10001#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
10002 Py_CLEAR(m->func_dict);
10003#elif PY_VERSION_HEX < 0x030d0000
10004 _PyObject_ClearManagedDict((PyObject*)m);
10005#else
10006 PyObject_ClearManagedDict((PyObject*)m);
10007#endif
10008 Py_CLEAR(m->func_name);
10009 Py_CLEAR(m->func_qualname);
10010 Py_CLEAR(m->func_doc);
10011 Py_CLEAR(m->func_globals);
10012 Py_CLEAR(m->func_code);
10013#if CYTHON_COMPILING_IN_LIMITED_API
10014 Py_CLEAR(m->func_classobj);
10015#else
10016 {
10017 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
10018 ((PyCMethodObject *) (m))->mm_class = NULL;
10019 Py_XDECREF(cls);
10020 }
10021#endif
10022 Py_CLEAR(m->defaults_tuple);
10023 Py_CLEAR(m->defaults_kwdict);
10024 Py_CLEAR(m->func_annotations);
10025#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
10026 Py_CLEAR(m->func_is_coroutine);
10027#endif
10028 Py_CLEAR(m->defaults);
10029 return 0;
10030}
10031static int
10032__Pyx_CyFunction_clear(PyObject *m)
10033{
10034 return __Pyx__CyFunction_clear(__Pyx_as_CyFunctionObject(m));
10035}
10036static void __Pyx__CyFunction_dealloc(PyObject *m)
10037{
10038 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(m);
10039 if (__Pyx_CyFunction_weakreflist(cyfunc) != NULL)
10040 PyObject_ClearWeakRefs(m);
10041 __Pyx__CyFunction_clear(cyfunc);
10042 __Pyx_PyHeapTypeObject_GC_Del(m);
10043}
10044static void __Pyx_CyFunction_dealloc(PyObject *m)
10045{
10046 PyObject_GC_UnTrack(m);
10047 __Pyx__CyFunction_dealloc(m);
10048}
10049static int __Pyx_CyFunction_traverse(PyObject *m_in, visitproc visit, void *arg)
10050{
10051 __pyx_CyFunctionObject *m = __Pyx_as_CyFunctionObject(m_in);
10052 {
10053 int e = __Pyx_call_type_traverse(m_in, 1, visit, arg);
10054 if (e) return e;
10055 }
10056 Py_VISIT(m->func_closure);
10057#if CYTHON_COMPILING_IN_LIMITED_API
10058 Py_VISIT(m->func_module);
10059#else
10060 Py_VISIT(((PyCFunctionObject*)m)->m_module);
10061#endif
10062#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
10063 Py_VISIT(m->func_dict);
10064#else
10065 {
10066 int e =
10067#if PY_VERSION_HEX < 0x030d0000
10068 _PyObject_VisitManagedDict
10069#else
10070 PyObject_VisitManagedDict
10071#endif
10072 ((PyObject*)m, visit, arg);
10073 if (e != 0) return e;
10074 }
10075#endif
10076 __Pyx_VISIT_CONST(m->func_name);
10077 __Pyx_VISIT_CONST(m->func_qualname);
10078 Py_VISIT(m->func_doc);
10079 Py_VISIT(m->func_globals);
10080 __Pyx_VISIT_CONST(m->func_code);
10081 Py_VISIT(__Pyx__CyFunction_GetClassObj(m));
10082 Py_VISIT(m->defaults_tuple);
10083 Py_VISIT(m->defaults_kwdict);
10084 Py_VISIT(m->func_annotations);
10085#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
10086 Py_VISIT(m->func_is_coroutine);
10087#endif
10088 Py_VISIT(m->defaults);
10089 return 0;
10090}
10091static PyObject*
10092__Pyx_CyFunction_repr(PyObject *op_in)
10093{
10094 __pyx_CyFunctionObject *op = __Pyx_as_CyFunctionObject(op_in);
10095 PyObject *repr;
10096 __Pyx_BEGIN_CRITICAL_SECTION(op_in);
10097 repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
10098 op->func_qualname, (void *)op);
10099 __Pyx_END_CRITICAL_SECTION();
10100 return repr;
10101}
10102static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
10103#if CYTHON_COMPILING_IN_LIMITED_API
10104 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
10105 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
10106 int flags = cyfunc->func_methoddef->ml_flags;
10107#else
10108 PyCFunctionObject* f = (PyCFunctionObject*)func;
10109 PyCFunction meth = f->m_ml->ml_meth;
10110 int flags = f->m_ml->ml_flags;
10111#endif
10112 Py_ssize_t size;
10113 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
10114 case METH_VARARGS:
10115 if (likely(kw == NULL || PyDict_Size(kw) == 0))
10116 return (*meth)(self, arg);
10117 break;
10118 case METH_VARARGS | METH_KEYWORDS:
10119 return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
10120 case METH_NOARGS:
10121 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
10122#if CYTHON_ASSUME_SAFE_SIZE
10123 size = PyTuple_GET_SIZE(arg);
10124#else
10125 size = PyTuple_Size(arg);
10126 if (unlikely(size < 0)) return NULL;
10127#endif
10128 if (likely(size == 0))
10129 return (*meth)(self, NULL);
10130 __Pyx_CyFunction_raise_argument_count_error(
10131 func,
10132 "takes no arguments", size);
10133 return NULL;
10134 }
10135 break;
10136 case METH_O:
10137 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
10138#if CYTHON_ASSUME_SAFE_SIZE
10139 size = PyTuple_GET_SIZE(arg);
10140#else
10141 size = PyTuple_Size(arg);
10142 if (unlikely(size < 0)) return NULL;
10143#endif
10144 if (likely(size == 1)) {
10145 PyObject *result, *arg0;
10146 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10147 arg0 = PyTuple_GET_ITEM(arg, 0);
10148 #else
10149 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
10150 #endif
10151 result = (*meth)(self, arg0);
10152 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
10153 Py_DECREF(arg0);
10154 #endif
10155 return result;
10156 }
10157 __Pyx_CyFunction_raise_argument_count_error(
10158 func,
10159 "takes exactly one argument", size);
10160 return NULL;
10161 }
10162 break;
10163 default:
10164 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
10165 return NULL;
10166 }
10167 __Pyx_CyFunction_raise_type_error(
10168 func, "takes no keyword arguments");
10169 return NULL;
10170}
10171static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
10172 PyObject *result;
10173 result = __Pyx_CyFunction_CallMethod(func, func, arg, kw);
10174 return result;
10175}
10176static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
10177 PyObject *result;
10178 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
10179#if CYTHON_VECTORCALL
10180 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
10181 if (vc) {
10182#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
10183 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
10184#else
10185 (void) &__Pyx_PyVectorcall_FastCallDict;
10186 return PyVectorcall_Call(func, args, kw);
10187#endif
10188 }
10189#endif
10190 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
10191 Py_ssize_t argc;
10192 PyObject *new_args;
10193 PyObject *self;
10194#if CYTHON_ASSUME_SAFE_SIZE
10195 argc = PyTuple_GET_SIZE(args);
10196#else
10197 argc = PyTuple_Size(args);
10198 if (unlikely(argc < 0)) return NULL;
10199#endif
10200 new_args = PyTuple_GetSlice(args, 1, argc);
10201 if (unlikely(!new_args))
10202 return NULL;
10203 self = PyTuple_GetItem(args, 0);
10204 if (unlikely(!self)) {
10205 Py_DECREF(new_args);
10206 PyErr_Format(PyExc_TypeError,
10207 "unbound method %.200S() needs an argument",
10208 cyfunc->func_qualname);
10209 return NULL;
10210 }
10211 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
10212 Py_DECREF(new_args);
10213 } else {
10214 result = __Pyx_CyFunction_Call(func, args, kw);
10215 }
10216 return result;
10217}
10218#if CYTHON_VECTORCALL
10219static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(PyObject *func, __pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
10220{
10221 int ret = 0;
10222 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
10223 if (unlikely(nargs < 1)) {
10224 __Pyx_CyFunction_raise_type_error(
10225 func, "needs an argument");
10226 return -1;
10227 }
10228 ret = 1;
10229 }
10230 if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
10231 __Pyx_CyFunction_raise_type_error(
10232 func, "takes no keyword arguments");
10233 return -1;
10234 }
10235 return ret;
10236}
10237static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
10238{
10239 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
10240 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
10241 PyObject *self;
10242#if CYTHON_COMPILING_IN_LIMITED_API
10243 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
10244 if (unlikely(!meth)) return NULL;
10245#else
10246 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
10247#endif
10248 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
10249 case 1:
10250 self = args[0];
10251 args += 1;
10252 nargs -= 1;
10253 break;
10254 case 0:
10255 self = func;
10256 break;
10257 default:
10258 return NULL;
10259 }
10260 if (unlikely(nargs != 0)) {
10261 __Pyx_CyFunction_raise_argument_count_error(
10262 func, "takes no arguments", nargs);
10263 return NULL;
10264 }
10265 return meth(self, NULL);
10266}
10267static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
10268{
10269 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
10270 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
10271 PyObject *self;
10272#if CYTHON_COMPILING_IN_LIMITED_API
10273 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
10274 if (unlikely(!meth)) return NULL;
10275#else
10276 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
10277#endif
10278 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, kwnames)) {
10279 case 1:
10280 self = args[0];
10281 args += 1;
10282 nargs -= 1;
10283 break;
10284 case 0:
10285 self = func;
10286 break;
10287 default:
10288 return NULL;
10289 }
10290 if (unlikely(nargs != 1)) {
10291 __Pyx_CyFunction_raise_argument_count_error(
10292 func, "takes exactly one argument", nargs);
10293 return NULL;
10294 }
10295 return meth(self, args[0]);
10296}
10297static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
10298{
10299 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
10300 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
10301 PyObject *self;
10302#if CYTHON_COMPILING_IN_LIMITED_API
10303 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
10304 if (unlikely(!meth)) return NULL;
10305#else
10306 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
10307#endif
10308 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
10309 case 1:
10310 self = args[0];
10311 args += 1;
10312 nargs -= 1;
10313 break;
10314 case 0:
10315 self = func;
10316 break;
10317 default:
10318 return NULL;
10319 }
10320 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
10321}
10322static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
10323{
10324 __pyx_CyFunctionObject *cyfunc = __Pyx_as_CyFunctionObject(func);
10325 PyTypeObject *cls = (PyTypeObject *) __Pyx__CyFunction_GetClassObj(cyfunc);
10326 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
10327 PyObject *self;
10328#if CYTHON_COMPILING_IN_LIMITED_API
10329 PyCFunction meth = cyfunc->func_methoddef->ml_meth;
10330 if (unlikely(!meth)) return NULL;
10331#else
10332 PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
10333#endif
10334 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(func, cyfunc, nargs, NULL)) {
10335 case 1:
10336 self = args[0];
10337 args += 1;
10338 nargs -= 1;
10339 break;
10340 case 0:
10341 self = func;
10342 break;
10343 default:
10344 return NULL;
10345 }
10346 #if PY_VERSION_HEX < 0x030e00A6
10347 size_t nargs_value = (size_t) nargs;
10348 #else
10349 Py_ssize_t nargs_value = nargs;
10350 #endif
10351 return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
10352}
10353#endif
10354static PyType_Slot __pyx_CyFunctionType_slots[] = {
10355 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
10356 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
10357 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
10358 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
10359 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
10360 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
10361 {Py_tp_members, (void *)__pyx_CyFunction_members},
10362 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
10363 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
10364 {0, 0},
10365};
10366static PyType_Spec __pyx_CyFunctionType_spec = {
10367 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
10368 __PYX_SHARED_SIZEOF(__pyx_CyFunctionObject),
10369 0,
10370#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
10371 Py_TPFLAGS_METHOD_DESCRIPTOR |
10372#endif
10373#if CYTHON_VECTORCALL
10374#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
10375 Py_TPFLAGS_HAVE_VECTORCALL |
10376#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
10377 _Py_TPFLAGS_HAVE_VECTORCALL |
10378#endif
10379#endif // CYTHON_VECTORCALL
10380#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
10381 Py_TPFLAGS_MANAGED_DICT |
10382#endif
10383 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
10384 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
10385 __pyx_CyFunctionType_slots
10386};
10387static int __pyx_CyFunction_init(PyObject *module) {
10388 __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
10389 mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
10390 mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
10391 if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
10392 return -1;
10393 }
10394 return 0;
10395}
10396
10397/* CythonFunction */
10398static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
10399 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
10400 (void)&__Pyx_Get_CyFunction_Type;
10401 PyObject *op = __Pyx_CyFunction_Init(
10402 PyObject_GC_New(PyObject, __pyx_mstate_global->__pyx_CyFunctionType),
10403 ml, flags, qualname, closure, module, globals, code
10404 );
10405 if (likely(op)) {
10406 PyObject_GC_Track(op);
10407 }
10408 return op;
10409}
10410static PyTypeObject *__Pyx_Get_CyFunction_Type(void) {
10411 PyTypeObject *tp = __pyx_mstate_global->__pyx_CyFunctionType;
10412 Py_INCREF((PyObject*)tp);
10413 return tp;
10414}
10415
10416/* PyDictVersioning (used by CLineInTraceback) */
10417#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
10418static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
10419 PyObject *dict = Py_TYPE(obj)->tp_dict;
10420 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
10421}
10422static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
10423 PyObject **dictptr = NULL;
10424 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
10425 if (offset) {
10426#if CYTHON_COMPILING_IN_CPYTHON
10427 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
10428#else
10429 dictptr = _PyObject_GetDictPtr(obj);
10430#endif
10431 }
10432 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
10433}
10434static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
10435 PyObject *dict = Py_TYPE(obj)->tp_dict;
10436 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
10437 return 0;
10438 return obj_dict_version == __Pyx_get_object_dict_version(obj);
10439}
10440#endif
10441
10442/* CLineInTraceback (used by AddTraceback) */
10443#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
10444#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
10445#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
10446#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
10447#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
10448#else
10449PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
10450 PyObject **dict_ptr = _PyObject_GetDictPtr(o);
10451 return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
10452}
10453#endif
10454static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
10455 PyObject *use_cline = NULL;
10456 PyObject *ptype, *pvalue, *ptraceback;
10457 PyObject *cython_runtime_dict;
10458 CYTHON_MAYBE_UNUSED_VAR(tstate);
10459 if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
10460 return c_line;
10461 }
10462 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
10463 cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
10464 if (likely(cython_runtime_dict)) {
10465 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
10466 use_cline, cython_runtime_dict,
10467 __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
10468 }
10469 if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
10470 c_line = 0;
10471 }
10472 Py_XDECREF(use_cline);
10473 Py_XDECREF(cython_runtime_dict);
10474 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
10475 return c_line;
10476}
10477#endif
10478
10479/* CodeObjectCache (used by AddTraceback) */
10480static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
10481 int start = 0, mid = 0, end = count - 1;
10482 if (end >= 0 && code_line > entries[end].code_line) {
10483 return count;
10484 }
10485 while (start < end) {
10486 mid = start + (end - start) / 2;
10487 if (code_line < entries[mid].code_line) {
10488 end = mid;
10489 } else if (code_line > entries[mid].code_line) {
10490 start = mid + 1;
10491 } else {
10492 return mid;
10493 }
10494 }
10495 if (code_line <= entries[mid].code_line) {
10496 return mid;
10497 } else {
10498 return mid + 1;
10499 }
10500}
10501static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
10502 __Pyx_CachedCodeObjectType* code_object;
10503 int pos;
10504 if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
10505 return NULL;
10506 }
10507 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
10508 if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
10509 return NULL;
10510 }
10511 code_object = code_cache->entries[pos].code_object;
10512 Py_INCREF(code_object);
10513 return code_object;
10514}
10515static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
10516#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
10517 (void)__pyx__find_code_object;
10518 return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
10519#else
10520 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
10521#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
10522 __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
10523 if (old_count < 0) {
10524 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
10525 return NULL;
10526 }
10527#endif
10528 __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
10529#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
10530 __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
10531#endif
10532 return result;
10533#endif
10534}
10535static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
10536{
10537 int pos, i;
10538 __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
10539 if (unlikely(!code_line)) {
10540 return;
10541 }
10542 if (unlikely(!entries)) {
10543 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
10544 if (likely(entries)) {
10545 code_cache->entries = entries;
10546 code_cache->max_count = 64;
10547 code_cache->count = 1;
10548 entries[0].code_line = code_line;
10549 entries[0].code_object = code_object;
10550 Py_INCREF(code_object);
10551 }
10552 return;
10553 }
10554 pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
10555 if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
10556 __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
10557 entries[pos].code_object = code_object;
10558 Py_INCREF(code_object);
10559 Py_DECREF(tmp);
10560 return;
10561 }
10562 if (code_cache->count == code_cache->max_count) {
10563 int new_max = code_cache->max_count + 64;
10564 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
10565 code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
10566 if (unlikely(!entries)) {
10567 return;
10568 }
10569 code_cache->entries = entries;
10570 code_cache->max_count = new_max;
10571 }
10572 for (i=code_cache->count; i>pos; i--) {
10573 entries[i] = entries[i-1];
10574 }
10575 entries[pos].code_line = code_line;
10576 entries[pos].code_object = code_object;
10577 code_cache->count++;
10578 Py_INCREF(code_object);
10579}
10580static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
10581#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
10582 (void)__pyx__insert_code_object;
10583 return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
10584#else
10585 struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
10586#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
10587 __pyx_nonatomic_int_type expected = 0;
10588 if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
10589 return;
10590 }
10591#endif
10592 __pyx__insert_code_object(code_cache, code_line, code_object);
10593#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
10594 __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
10595#endif
10596#endif
10597}
10598
10599/* AddTraceback */
10600#include "compile.h"
10601#include "frameobject.h"
10602#include "traceback.h"
10603#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
10604 #ifndef Py_BUILD_CORE
10605 #define Py_BUILD_CORE 1
10606 #endif
10607 #include "internal/pycore_frame.h"
10608#endif
10609#if CYTHON_COMPILING_IN_LIMITED_API
10610static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
10611 PyObject *firstlineno, PyObject *name) {
10612 PyObject *replace = NULL;
10613 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
10614 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
10615 replace = PyObject_GetAttrString(code, "replace");
10616 if (likely(replace)) {
10617 PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
10618 Py_DECREF(replace);
10619 return result;
10620 }
10621 return NULL;
10622}
10623static void __Pyx_AddTraceback(const char *funcname, int c_line,
10624 int py_line, const char *filename) {
10625 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
10626 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
10627 PyObject *exc_type, *exc_value, *exc_traceback;
10628 int success = 0;
10629 if (c_line) {
10630 c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
10631 }
10632 __Pyx_PyErr_FetchException(&exc_type, &exc_value, &exc_traceback);
10633 code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
10634 if (!code_object) {
10635 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
10636 if (unlikely(!code_object)) goto bad;
10637 py_py_line = PyLong_FromLong(py_line);
10638 if (unlikely(!py_py_line)) goto bad;
10639 if (c_line) {
10640 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
10641 } else {
10642 py_funcname = PyUnicode_FromString(funcname);
10643 }
10644 if (unlikely(!py_funcname)) goto bad;
10645 dict = PyDict_New();
10646 if (unlikely(!dict)) goto bad;
10647 {
10648 PyObject *old_code_object = code_object;
10649 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
10650 Py_DECREF(old_code_object);
10651 }
10652 if (unlikely(!code_object)) goto bad;
10653 __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
10654 } else {
10655 dict = PyDict_New();
10656 }
10657 getframe = PySys_GetObject("_getframe");
10658 if (unlikely(!getframe)) goto bad;
10659 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
10660 frame = PyEval_EvalCode(code_object, dict, dict);
10661 if (unlikely(!frame) || frame == Py_None) goto bad;
10662 success = 1;
10663 bad:
10664 __Pyx_PyErr_RestoreException(exc_type, exc_value, exc_traceback);
10665 Py_XDECREF(code_object);
10666 Py_XDECREF(py_py_line);
10667 Py_XDECREF(py_funcname);
10668 Py_XDECREF(dict);
10669 Py_XDECREF(replace);
10670 if (success) {
10671 PyTraceBack_Here(
10672 (struct _frame*)frame);
10673 }
10674 Py_XDECREF(frame);
10675}
10676#else
10677static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
10678 const char *funcname, int c_line,
10679 int py_line, const char *filename) {
10680 PyCodeObject *py_code = NULL;
10681 PyObject *py_funcname = NULL;
10682 if (c_line) {
10683 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
10684 if (!py_funcname) goto bad;
10685 funcname = PyUnicode_AsUTF8(py_funcname);
10686 if (!funcname) goto bad;
10687 }
10688 py_code = PyCode_NewEmpty(filename, funcname, py_line);
10689 Py_XDECREF(py_funcname);
10690 return py_code;
10691bad:
10692 Py_XDECREF(py_funcname);
10693 return NULL;
10694}
10695static void __Pyx_AddTraceback(const char *funcname, int c_line,
10696 int py_line, const char *filename) {
10697 PyCodeObject *py_code = 0;
10698 PyFrameObject *py_frame = 0;
10699 PyThreadState *tstate = __Pyx_PyThreadState_Current;
10700 PyObject *ptype, *pvalue, *ptraceback;
10701 if (c_line) {
10702 c_line = __Pyx_CLineForTraceback(tstate, c_line);
10703 }
10704 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
10705 if (!py_code) {
10706 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
10707 py_code = __Pyx_CreateCodeObjectForTraceback(
10708 funcname, c_line, py_line, filename);
10709 if (!py_code) {
10710 /* If the code object creation fails, then we should clear the
10711 fetched exception references and propagate the new exception */
10712 Py_XDECREF(ptype);
10713 Py_XDECREF(pvalue);
10714 Py_XDECREF(ptraceback);
10715 goto bad;
10716 }
10717 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
10718 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
10719 }
10720 py_frame = PyFrame_New(
10721 tstate, /*PyThreadState *tstate,*/
10722 py_code, /*PyCodeObject *code,*/
10723 __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/
10724 0 /*PyObject *locals*/
10725 );
10726 if (!py_frame) goto bad;
10727 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
10728 PyTraceBack_Here(py_frame);
10729bad:
10730 Py_XDECREF(py_code);
10731 Py_XDECREF(py_frame);
10732}
10733#endif
10734
10735/* Declarations */
10736#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
10737 #ifdef __cplusplus
10738 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
10739 return ::std::complex< float >(x, y);
10740 }
10741 #else
10742 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
10743 return x + y*(__pyx_t_float_complex)_Complex_I;
10744 }
10745 #endif
10746#else
10747 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
10748 __pyx_t_float_complex z;
10749 z.real = x;
10750 z.imag = y;
10751 return z;
10752 }
10753#endif
10754
10755/* Arithmetic */
10756#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
10757#else
10758 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
10759 return (a.real == b.real) && (a.imag == b.imag);
10760 }
10761 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
10762 __pyx_t_float_complex z;
10763 z.real = a.real + b.real;
10764 z.imag = a.imag + b.imag;
10765 return z;
10766 }
10767 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
10768 __pyx_t_float_complex z;
10769 z.real = a.real - b.real;
10770 z.imag = a.imag - b.imag;
10771 return z;
10772 }
10773 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
10774 __pyx_t_float_complex z;
10775 z.real = a.real * b.real - a.imag * b.imag;
10776 z.imag = a.real * b.imag + a.imag * b.real;
10777 return z;
10778 }
10779 #if 1
10780 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
10781 if (b.imag == 0) {
10782 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
10783 } else if (fabsf(b.real) >= fabsf(b.imag)) {
10784 if (b.real == 0 && b.imag == 0) {
10785 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
10786 } else {
10787 float r = b.imag / b.real;
10788 float s = (float)(1.0) / (b.real + b.imag * r);
10789 return __pyx_t_float_complex_from_parts(
10790 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
10791 }
10792 } else {
10793 float r = b.real / b.imag;
10794 float s = (float)(1.0) / (b.imag + b.real * r);
10795 return __pyx_t_float_complex_from_parts(
10796 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
10797 }
10798 }
10799 #else
10800 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
10801 if (b.imag == 0) {
10802 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
10803 } else {
10804 float denom = b.real * b.real + b.imag * b.imag;
10805 return __pyx_t_float_complex_from_parts(
10806 (a.real * b.real + a.imag * b.imag) / denom,
10807 (a.imag * b.real - a.real * b.imag) / denom);
10808 }
10809 }
10810 #endif
10811 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
10812 __pyx_t_float_complex z;
10813 z.real = -a.real;
10814 z.imag = -a.imag;
10815 return z;
10816 }
10817 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
10818 return (a.real == 0) && (a.imag == 0);
10819 }
10820 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
10821 __pyx_t_float_complex z;
10822 z.real = a.real;
10823 z.imag = -a.imag;
10824 return z;
10825 }
10826 #if 1
10827 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
10828 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
10829 return sqrtf(z.real*z.real + z.imag*z.imag);
10830 #else
10831 return hypotf(z.real, z.imag);
10832 #endif
10833 }
10834 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
10835 __pyx_t_float_complex z;
10836 float r, lnr, theta, z_r, z_theta;
10837 if (b.imag == 0 && b.real == (int)b.real) {
10838 if (b.real < 0) {
10839 float denom = a.real * a.real + a.imag * a.imag;
10840 a.real = a.real / denom;
10841 a.imag = -a.imag / denom;
10842 b.real = -b.real;
10843 }
10844 switch ((int)b.real) {
10845 case 0:
10846 z.real = 1;
10847 z.imag = 0;
10848 return z;
10849 case 1:
10850 return a;
10851 case 2:
10852 return __Pyx_c_prod_float(a, a);
10853 case 3:
10854 z = __Pyx_c_prod_float(a, a);
10855 return __Pyx_c_prod_float(z, a);
10856 case 4:
10857 z = __Pyx_c_prod_float(a, a);
10858 return __Pyx_c_prod_float(z, z);
10859 }
10860 }
10861 if (a.imag == 0) {
10862 if (a.real == 0) {
10863 return a;
10864 } else if ((b.imag == 0) && (a.real >= 0)) {
10865 z.real = powf(a.real, b.real);
10866 z.imag = 0;
10867 return z;
10868 } else if (a.real > 0) {
10869 r = a.real;
10870 theta = 0;
10871 } else {
10872 r = -a.real;
10873 theta = atan2f(0.0, -1.0);
10874 }
10875 } else {
10876 r = __Pyx_c_abs_float(a);
10877 theta = atan2f(a.imag, a.real);
10878 }
10879 lnr = logf(r);
10880 z_r = expf(lnr * b.real - theta * b.imag);
10881 z_theta = theta * b.real + lnr * b.imag;
10882 z.real = z_r * cosf(z_theta);
10883 z.imag = z_r * sinf(z_theta);
10884 return z;
10885 }
10886 #endif
10887#endif
10888
10889/* Declarations */
10890#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
10891 #ifdef __cplusplus
10892 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
10893 return ::std::complex< double >(x, y);
10894 }
10895 #else
10896 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
10897 return x + y*(__pyx_t_double_complex)_Complex_I;
10898 }
10899 #endif
10900#else
10901 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
10902 __pyx_t_double_complex z;
10903 z.real = x;
10904 z.imag = y;
10905 return z;
10906 }
10907#endif
10908
10909/* Arithmetic */
10910#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
10911#else
10912 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
10913 return (a.real == b.real) && (a.imag == b.imag);
10914 }
10915 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
10916 __pyx_t_double_complex z;
10917 z.real = a.real + b.real;
10918 z.imag = a.imag + b.imag;
10919 return z;
10920 }
10921 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
10922 __pyx_t_double_complex z;
10923 z.real = a.real - b.real;
10924 z.imag = a.imag - b.imag;
10925 return z;
10926 }
10927 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
10928 __pyx_t_double_complex z;
10929 z.real = a.real * b.real - a.imag * b.imag;
10930 z.imag = a.real * b.imag + a.imag * b.real;
10931 return z;
10932 }
10933 #if 1
10934 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
10935 if (b.imag == 0) {
10936 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
10937 } else if (fabs(b.real) >= fabs(b.imag)) {
10938 if (b.real == 0 && b.imag == 0) {
10939 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
10940 } else {
10941 double r = b.imag / b.real;
10942 double s = (double)(1.0) / (b.real + b.imag * r);
10943 return __pyx_t_double_complex_from_parts(
10944 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
10945 }
10946 } else {
10947 double r = b.real / b.imag;
10948 double s = (double)(1.0) / (b.imag + b.real * r);
10949 return __pyx_t_double_complex_from_parts(
10950 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
10951 }
10952 }
10953 #else
10954 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
10955 if (b.imag == 0) {
10956 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
10957 } else {
10958 double denom = b.real * b.real + b.imag * b.imag;
10959 return __pyx_t_double_complex_from_parts(
10960 (a.real * b.real + a.imag * b.imag) / denom,
10961 (a.imag * b.real - a.real * b.imag) / denom);
10962 }
10963 }
10964 #endif
10965 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
10966 __pyx_t_double_complex z;
10967 z.real = -a.real;
10968 z.imag = -a.imag;
10969 return z;
10970 }
10971 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
10972 return (a.real == 0) && (a.imag == 0);
10973 }
10974 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
10975 __pyx_t_double_complex z;
10976 z.real = a.real;
10977 z.imag = -a.imag;
10978 return z;
10979 }
10980 #if 1
10981 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
10982 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
10983 return sqrt(z.real*z.real + z.imag*z.imag);
10984 #else
10985 return hypot(z.real, z.imag);
10986 #endif
10987 }
10988 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
10989 __pyx_t_double_complex z;
10990 double r, lnr, theta, z_r, z_theta;
10991 if (b.imag == 0 && b.real == (int)b.real) {
10992 if (b.real < 0) {
10993 double denom = a.real * a.real + a.imag * a.imag;
10994 a.real = a.real / denom;
10995 a.imag = -a.imag / denom;
10996 b.real = -b.real;
10997 }
10998 switch ((int)b.real) {
10999 case 0:
11000 z.real = 1;
11001 z.imag = 0;
11002 return z;
11003 case 1:
11004 return a;
11005 case 2:
11006 return __Pyx_c_prod_double(a, a);
11007 case 3:
11008 z = __Pyx_c_prod_double(a, a);
11009 return __Pyx_c_prod_double(z, a);
11010 case 4:
11011 z = __Pyx_c_prod_double(a, a);
11012 return __Pyx_c_prod_double(z, z);
11013 }
11014 }
11015 if (a.imag == 0) {
11016 if (a.real == 0) {
11017 return a;
11018 } else if ((b.imag == 0) && (a.real >= 0)) {
11019 z.real = pow(a.real, b.real);
11020 z.imag = 0;
11021 return z;
11022 } else if (a.real > 0) {
11023 r = a.real;
11024 theta = 0;
11025 } else {
11026 r = -a.real;
11027 theta = atan2(0.0, -1.0);
11028 }
11029 } else {
11030 r = __Pyx_c_abs_double(a);
11031 theta = atan2(a.imag, a.real);
11032 }
11033 lnr = log(r);
11034 z_r = exp(lnr * b.real - theta * b.imag);
11035 z_theta = theta * b.real + lnr * b.imag;
11036 z.real = z_r * cos(z_theta);
11037 z.imag = z_r * sin(z_theta);
11038 return z;
11039 }
11040 #endif
11041#endif
11042
11043/* Declarations */
11044#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
11045 #ifdef __cplusplus
11046 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
11047 return ::std::complex< long double >(x, y);
11048 }
11049 #else
11050 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
11051 return x + y*(__pyx_t_long_double_complex)_Complex_I;
11052 }
11053 #endif
11054#else
11055 static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
11056 __pyx_t_long_double_complex z;
11057 z.real = x;
11058 z.imag = y;
11059 return z;
11060 }
11061#endif
11062
11063/* Arithmetic */
11064#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
11065#else
11066 static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
11067 return (a.real == b.real) && (a.imag == b.imag);
11068 }
11069 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) {
11070 __pyx_t_long_double_complex z;
11071 z.real = a.real + b.real;
11072 z.imag = a.imag + b.imag;
11073 return z;
11074 }
11075 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) {
11076 __pyx_t_long_double_complex z;
11077 z.real = a.real - b.real;
11078 z.imag = a.imag - b.imag;
11079 return z;
11080 }
11081 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) {
11082 __pyx_t_long_double_complex z;
11083 z.real = a.real * b.real - a.imag * b.imag;
11084 z.imag = a.real * b.imag + a.imag * b.real;
11085 return z;
11086 }
11087 #if 1
11088 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) {
11089 if (b.imag == 0) {
11090 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
11091 } else if (fabsl(b.real) >= fabsl(b.imag)) {
11092 if (b.real == 0 && b.imag == 0) {
11093 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
11094 } else {
11095 long double r = b.imag / b.real;
11096 long double s = (long double)(1.0) / (b.real + b.imag * r);
11097 return __pyx_t_long_double_complex_from_parts(
11098 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
11099 }
11100 } else {
11101 long double r = b.real / b.imag;
11102 long double s = (long double)(1.0) / (b.imag + b.real * r);
11103 return __pyx_t_long_double_complex_from_parts(
11104 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
11105 }
11106 }
11107 #else
11108 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) {
11109 if (b.imag == 0) {
11110 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
11111 } else {
11112 long double denom = b.real * b.real + b.imag * b.imag;
11113 return __pyx_t_long_double_complex_from_parts(
11114 (a.real * b.real + a.imag * b.imag) / denom,
11115 (a.imag * b.real - a.real * b.imag) / denom);
11116 }
11117 }
11118 #endif
11119 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
11120 __pyx_t_long_double_complex z;
11121 z.real = -a.real;
11122 z.imag = -a.imag;
11123 return z;
11124 }
11125 static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
11126 return (a.real == 0) && (a.imag == 0);
11127 }
11128 static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
11129 __pyx_t_long_double_complex z;
11130 z.real = a.real;
11131 z.imag = -a.imag;
11132 return z;
11133 }
11134 #if 1
11135 static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
11136 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
11137 return sqrtl(z.real*z.real + z.imag*z.imag);
11138 #else
11139 return hypotl(z.real, z.imag);
11140 #endif
11141 }
11142 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) {
11143 __pyx_t_long_double_complex z;
11144 long double r, lnr, theta, z_r, z_theta;
11145 if (b.imag == 0 && b.real == (int)b.real) {
11146 if (b.real < 0) {
11147 long double denom = a.real * a.real + a.imag * a.imag;
11148 a.real = a.real / denom;
11149 a.imag = -a.imag / denom;
11150 b.real = -b.real;
11151 }
11152 switch ((int)b.real) {
11153 case 0:
11154 z.real = 1;
11155 z.imag = 0;
11156 return z;
11157 case 1:
11158 return a;
11159 case 2:
11160 return __Pyx_c_prod_long__double(a, a);
11161 case 3:
11162 z = __Pyx_c_prod_long__double(a, a);
11163 return __Pyx_c_prod_long__double(z, a);
11164 case 4:
11165 z = __Pyx_c_prod_long__double(a, a);
11166 return __Pyx_c_prod_long__double(z, z);
11167 }
11168 }
11169 if (a.imag == 0) {
11170 if (a.real == 0) {
11171 return a;
11172 } else if ((b.imag == 0) && (a.real >= 0)) {
11173 z.real = powl(a.real, b.real);
11174 z.imag = 0;
11175 return z;
11176 } else if (a.real > 0) {
11177 r = a.real;
11178 theta = 0;
11179 } else {
11180 r = -a.real;
11181 theta = atan2l(0.0, -1.0);
11182 }
11183 } else {
11184 r = __Pyx_c_abs_long__double(a);
11185 theta = atan2l(a.imag, a.real);
11186 }
11187 lnr = logl(r);
11188 z_r = expl(lnr * b.real - theta * b.imag);
11189 z_theta = theta * b.real + lnr * b.imag;
11190 z.real = z_r * cosl(z_theta);
11191 z.imag = z_r * sinl(z_theta);
11192 return z;
11193 }
11194 #endif
11195#endif
11196
11197/* FormatTypeName */
11198#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
11199static __Pyx_TypeName
11200__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
11201{
11202 PyObject *module = NULL, *name = NULL, *result = NULL;
11203 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
11204 name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
11205 __pyx_mstate_global->__pyx_n_u_qualname);
11206 #else
11207 name = PyType_GetQualName(tp);
11208 #endif
11209 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
11210 module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
11211 __pyx_mstate_global->__pyx_n_u_module);
11212 if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
11213 if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
11214 result = name;
11215 name = NULL;
11216 goto done;
11217 }
11218 result = PyUnicode_FromFormat("%U.%U", module, name);
11219 if (unlikely(result == NULL)) goto bad;
11220 done:
11221 Py_XDECREF(name);
11222 Py_XDECREF(module);
11223 return result;
11224 bad:
11225 PyErr_Clear();
11226 if (name) {
11227 result = name;
11228 name = NULL;
11229 } else {
11230 result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_);
11231 }
11232 goto done;
11233}
11234#endif
11235
11236/* PyObjectVectorcallKwds (used by PyObjectVectorcallMethodKwds) */
11237#if CYTHON_VECTORCALL
11238CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject *kwnames, Py_ssize_t i) {
11239 PyObject *key = __Pyx_PyTuple_GET_ITEM(kwnames, i);
11240#if !CYTHON_ASSUME_SAFE_MACROS
11241 if (unlikely(!key)) return -1;
11242#endif
11243 if (unlikely(!PyUnicode_Check(key))) {
11244 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
11245 return -1;
11246 }
11247 return 0;
11248}
11249#else
11250CYTHON_UNUSED static PyObject *__Pyx_MakeKwargDict(PyObject **keys, PyObject **values, Py_ssize_t n) {
11251 PyObject *out = PyDict_New();
11252 if (unlikely(!out)) return NULL;
11253 for (Py_ssize_t i=0; i<n; ++i) {
11254 if (unlikely(PyDict_SetItem(out, keys[i], values[i]) < 0)) {
11255 Py_DECREF(out);
11256 return NULL;
11257 }
11258 }
11259 return out;
11260}
11261CYTHON_UNUSED static int __Pyx_CheckVectorcallKwarg(PyObject **kwnames, Py_ssize_t i) {
11262 PyObject *key = kwnames[i];
11263 if (unlikely(!PyUnicode_Check(key))) {
11264 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
11265 return -1;
11266 }
11267 return 0;
11268}
11269#endif
11270
11271/* PyObjectVectorcallMethodKwds (used by CIntToPy) */
11272#if !CYTHON_VECTORCALL
11273static PyObject *__Pyx_Object_VectorcallMethodKwds(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
11274 PyObject *result;
11275 PyObject *obj = PyObject_GetAttr(args[0], name);
11276 if (unlikely(!obj))
11277 return NULL;
11278 result = __Pyx_Object_VectorcallKwds(obj, args+1, nargsf-1, kwnames);
11279 Py_DECREF(obj);
11280 return result;
11281}
11282#endif
11283
11284/* CIntToPy */
11285static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
11286#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11287#pragma GCC diagnostic push
11288#pragma GCC diagnostic ignored "-Wconversion"
11289#endif
11290 const long neg_one = (long) -1, const_zero = (long) 0;
11291#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11292#pragma GCC diagnostic pop
11293#endif
11294 const int is_unsigned = neg_one > const_zero;
11295 if (is_unsigned) {
11296 if (sizeof(long) < sizeof(long)) {
11297 return PyLong_FromLong((long) value);
11298 } else if (sizeof(long) <= sizeof(unsigned long)) {
11299 return PyLong_FromUnsignedLong((unsigned long) value);
11300#if !CYTHON_COMPILING_IN_PYPY
11301 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
11302 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
11303#endif
11304 }
11305 } else {
11306 if (sizeof(long) <= sizeof(long)) {
11307 return PyLong_FromLong((long) value);
11308 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
11309 return PyLong_FromLongLong((PY_LONG_LONG) value);
11310 }
11311 }
11312 {
11313 unsigned char *bytes = (unsigned char *)&value;
11314#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
11315 if (is_unsigned) {
11316 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
11317 } else {
11318 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
11319 }
11320#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
11321 int one = 1; int little = (int)*(unsigned char *)&one;
11322 return _PyLong_FromByteArray(bytes, sizeof(long),
11323 little, !is_unsigned);
11324#else
11325 int one = 1; int little = (int)*(unsigned char *)&one;
11326 PyObject *result = NULL, *kwds = NULL;
11327 PyObject *py_bytes = NULL, *order_str = NULL, *from_bytes_str = NULL;;
11328 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
11329 if (!py_bytes) goto limited_bad;
11330 from_bytes_str = PyUnicode_FromStringAndSize("from_bytes", 10);
11331 if (!from_bytes_str) goto limited_bad;
11332 order_str = PyUnicode_FromString(little ? "little" : "big");
11333 if (!order_str) goto limited_bad;
11334 {
11335 PyObject *args[] = { (PyObject*)&PyLong_Type, py_bytes, order_str, Py_True };
11336 if (!is_unsigned) {
11337 PyObject *signed_str = PyUnicode_FromStringAndSize("signed", 6);
11338 if (!signed_str) goto limited_bad;
11339#if CYTHON_VECTORCALL
11340 kwds = PyTuple_Pack(1, signed_str);
11341#else
11342 {
11343 PyObject *keys[] = {signed_str};
11344 PyObject *values[] = {Py_True};
11345 kwds = __Pyx_MakeKwargDict(keys, values, 1);
11346 }
11347#endif
11348 Py_DECREF(signed_str);
11349 if (unlikely(!kwds)) goto limited_bad;
11350 }
11351 result = __Pyx_Object_VectorcallMethodKwds(from_bytes_str, args, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
11352 }
11353 limited_bad:
11354 Py_XDECREF(kwds);
11355 Py_XDECREF(order_str);
11356 Py_XDECREF(py_bytes);
11357 Py_XDECREF(from_bytes_str);
11358 return result;
11359#endif
11360 }
11361}
11362
11363/* CIntFromPyVerify (used by CIntFromPy) */
11364#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
11365 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
11366#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
11367 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
11368#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
11369 {\
11370 func_type value = func_value;\
11371 if (sizeof(target_type) < sizeof(func_type)) {\
11372 if (unlikely(value != (func_type) (target_type) value)) {\
11373 func_type zero = 0;\
11374 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
11375 return (target_type) -1;\
11376 if (is_unsigned && unlikely(value < zero))\
11377 goto raise_neg_overflow;\
11378 else\
11379 goto raise_overflow;\
11380 }\
11381 }\
11382 return (target_type) value;\
11383 }
11384
11385/* CIntFromPy */
11386static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x);
11387static long __Pyx_raise_neg_overflow___Pyx_PyLong_As_long(void) {
11388 const char* type_name = "long";
11389 PyErr_Format(PyExc_OverflowError,
11390 "can't convert negative value to %.200s", type_name);
11391 return (long) -1;
11392}
11393static long __Pyx_raise_overflow___Pyx_PyLong_As_long(void) {
11394 const char* type_name = "long";
11395 PyErr_Format(PyExc_OverflowError,
11396 "value too large to convert to %.200s", type_name);
11397 return (long) -1;
11398}
11399static CYTHON_INLINE long __Pyx_PyULong___Pyx_PyLong_As_long(PyObject *x) {
11400 const int is_unsigned = 1;
11401#if CYTHON_USE_PYLONG_INTERNALS
11402 {
11403 const digit* digits = __Pyx_PyLong_Digits(x);
11404 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
11405 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
11406 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
11407 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
11408 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
11409 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
11410 }
11411 } else
11412 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
11413 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
11414 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
11415 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
11416 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
11417 }
11418 } else
11419 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
11420 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
11421 __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])))
11422 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
11423 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
11424 }
11425 } else
11426 {}
11427 }
11428#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
11429 if (unlikely(Py_SIZE(x) < 0)) {
11430 goto raise_neg_overflow;
11431 }
11432#else
11433 {
11434 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
11435 if (unlikely(result < 0))
11436 return (long) -1;
11437 if (unlikely(result == 1))
11438 goto raise_neg_overflow;
11439 }
11440#endif
11441 if ((sizeof(long) <= sizeof(unsigned long))) {
11442 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
11443 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
11444 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
11445 }
11446 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
11447raise_neg_overflow:
11448 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
11449raise_overflow:
11450 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
11451}
11452static CYTHON_INLINE long __Pyx_PySLong___Pyx_PyLong_As_long(PyObject *x) {
11453 const int is_unsigned = 0;
11454#if CYTHON_USE_PYLONG_INTERNALS
11455 if (__Pyx_PyLong_IsNeg(x)) {
11456 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
11457 const digit* digits = __Pyx_PyLong_Digits(x);
11458 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
11459 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
11460 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
11461 __PYX_VERIFY_RETURN_INT(long, long, ival)
11462 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
11463 return (long) (((long) -1) * (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
11464 }
11465 } else
11466 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
11467 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
11468 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
11469 __PYX_VERIFY_RETURN_INT(long, long, ival)
11470 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
11471 return (long) (((long) -1) * (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
11472 }
11473 } else
11474 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
11475 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
11476 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]));
11477 __PYX_VERIFY_RETURN_INT(long, long, ival)
11478 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
11479 return (long) (((long) -1) * (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
11480 }
11481 } else
11482 {}
11483 } else {
11484 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
11485 const digit* digits = __Pyx_PyLong_Digits(x);
11486 if (size == 2 && (8 * sizeof(long) > 1 * PyLong_SHIFT)) {
11487 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
11488 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
11489 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
11490 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
11491 }
11492 } else
11493 if (size == 3 && (8 * sizeof(long) > 2 * PyLong_SHIFT)) {
11494 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
11495 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
11496 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
11497 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
11498 }
11499 } else
11500 if (size == 4 && (8 * sizeof(long) > 3 * PyLong_SHIFT)) {
11501 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
11502 __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])))
11503 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
11504 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
11505 }
11506 } else
11507 {}
11508 }
11509#endif
11510 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
11511 if ((sizeof(long) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
11512 __PYX_VERIFY_RETURN_INT_EXC(long, int, PyLong_AsInt(x))
11513 } else
11514 #endif
11515 if ((sizeof(long) <= sizeof(long))) {
11516 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
11517 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
11518 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
11519 }
11520 return __Pyx_LargePyLong___Pyx_PyLong_As_long(x);
11521raise_neg_overflow:
11522 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
11523raise_overflow:
11524 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
11525}
11526static long __Pyx_LargePyLong___Pyx_PyLong_As_long(PyObject *x) {
11527#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11528#pragma GCC diagnostic push
11529#pragma GCC diagnostic ignored "-Wconversion"
11530#endif
11531 const long neg_one = (long) -1, const_zero = (long) 0;
11532#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11533#pragma GCC diagnostic pop
11534#endif
11535 const int is_unsigned = neg_one > const_zero;
11536 long val;
11537 int ret = -1;
11538#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
11539 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
11540 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
11541 if (unlikely(bytes_copied == -1)) {
11542 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
11543 goto raise_overflow;
11544 } else {
11545 ret = 0;
11546 }
11547#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
11548 int one = 1; int is_little = (int)*(unsigned char *)&one;
11549 unsigned char *bytes = (unsigned char *)&val;
11550 ret = _PyLong_AsByteArray((PyLongObject *)x,
11551 bytes, sizeof(val),
11552 is_little, !is_unsigned);
11553 if ((0)) goto raise_overflow;
11554#else
11555 PyObject *v;
11556 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
11557 int bits, remaining_bits, is_negative = 0;
11558 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
11559 if (likely(PyLong_CheckExact(x))) {
11560 v = __Pyx_NewRef(x);
11561 } else {
11562 v = PyNumber_Long(x);
11563 if (unlikely(!v)) return (long) -1;
11564 assert(PyLong_CheckExact(v));
11565 }
11566 {
11567 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
11568 if (unlikely(result < 0)) {
11569 Py_DECREF(v);
11570 return (long) -1;
11571 }
11572 is_negative = result == 1;
11573 }
11574 if (is_unsigned && unlikely(is_negative)) {
11575 Py_DECREF(v);
11576 PyErr_SetString(PyExc_OverflowError,
11577 "can't convert negative value to long");
11578 return (long) -1;
11579 } else if (is_negative) {
11580 stepval = PyNumber_Invert(v);
11581 Py_DECREF(v);
11582 if (unlikely(!stepval))
11583 return (long) -1;
11584 } else {
11585 stepval = v;
11586 }
11587 v = NULL;
11588 val = (long) 0;
11589 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
11590 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
11591 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
11592 PyObject *tmp, *digit;
11593 long idigit;
11594 digit = PyNumber_And(stepval, mask);
11595 if (unlikely(!digit)) goto done;
11596 idigit = PyLong_AsLong(digit);
11597 Py_DECREF(digit);
11598 if (unlikely(idigit < 0)) goto done;
11599 val |= ((long) idigit) << bits;
11600 tmp = PyNumber_Rshift(stepval, shift);
11601 if (unlikely(!tmp)) goto done;
11602 Py_DECREF(stepval); stepval = tmp;
11603 }
11604 Py_DECREF(shift); shift = NULL;
11605 Py_DECREF(mask); mask = NULL;
11606 {
11607 long idigit = PyLong_AsLong(stepval);
11608 if (unlikely(idigit < 0)) goto done;
11609 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
11610 if (unlikely(idigit >= (1L << remaining_bits)))
11611 goto raise_overflow;
11612 val |= ((long) idigit) << bits;
11613 }
11614 if (!is_unsigned) {
11615 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
11616 goto raise_overflow;
11617 if (is_negative)
11618 val = ~val;
11619 }
11620 ret = 0;
11621done:
11622 Py_XDECREF(shift);
11623 Py_XDECREF(mask);
11624 Py_XDECREF(stepval);
11625#endif
11626 if (unlikely(ret))
11627 return (long) -1;
11628 return val;
11629raise_overflow:
11630 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
11631}
11632static CYTHON_INLINE long __Pyx_PyLong___Pyx_PyLong_As_long(PyObject *x) {
11633#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11634#pragma GCC diagnostic push
11635#pragma GCC diagnostic ignored "-Wconversion"
11636#endif
11637 const long neg_one = (long) -1, const_zero = (long) 0;
11638#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11639#pragma GCC diagnostic pop
11640#endif
11641 const int is_unsigned = neg_one > const_zero;
11642 if (is_unsigned) {
11643 #if CYTHON_USE_PYLONG_INTERNALS
11644 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
11645 goto raise_neg_overflow;
11646 } else if (__Pyx_PyLong_IsCompact(x)) {
11647 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
11648 } else
11649 #endif
11650 {
11651 return __Pyx_PyULong___Pyx_PyLong_As_long(x);
11652 }
11653 } else {
11654 #if CYTHON_USE_PYLONG_INTERNALS
11655 if (__Pyx_PyLong_IsCompact(x)) {
11656 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
11657 } else
11658 #endif
11659 {
11660 return __Pyx_PySLong___Pyx_PyLong_As_long(x);
11661 }
11662 }
11663#if CYTHON_USE_PYLONG_INTERNALS
11664raise_neg_overflow:
11665 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_long();
11666raise_overflow:
11667 return __Pyx_raise_overflow___Pyx_PyLong_As_long();
11668#endif
11669}
11670static long __Pyx_NonPyLong___Pyx_PyLong_As_long(PyObject *x) {
11671 long val;
11672 PyObject *tmp = __Pyx_PyNumber_Long(x);
11673 if (!tmp) return (long) -1;
11674 val = __Pyx_PyLong_As_long(tmp);
11675 Py_DECREF(tmp);
11676 return val;
11677}
11678static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
11679 if (likely(PyLong_Check(x))) {
11680 return __Pyx_PyLong___Pyx_PyLong_As_long(x);
11681 } else {
11682 return __Pyx_NonPyLong___Pyx_PyLong_As_long(x);
11683 }
11684}
11685
11686/* CIntFromPy */
11687static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x);
11688static int __Pyx_raise_neg_overflow___Pyx_PyLong_As_int(void) {
11689 const char* type_name = "int";
11690 PyErr_Format(PyExc_OverflowError,
11691 "can't convert negative value to %.200s", type_name);
11692 return (int) -1;
11693}
11694static int __Pyx_raise_overflow___Pyx_PyLong_As_int(void) {
11695 const char* type_name = "int";
11696 PyErr_Format(PyExc_OverflowError,
11697 "value too large to convert to %.200s", type_name);
11698 return (int) -1;
11699}
11700static CYTHON_INLINE int __Pyx_PyULong___Pyx_PyLong_As_int(PyObject *x) {
11701 const int is_unsigned = 1;
11702#if CYTHON_USE_PYLONG_INTERNALS
11703 {
11704 const digit* digits = __Pyx_PyLong_Digits(x);
11705 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
11706 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
11707 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
11708 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
11709 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
11710 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
11711 }
11712 } else
11713 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
11714 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
11715 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
11716 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
11717 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
11718 }
11719 } else
11720 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
11721 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
11722 __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])))
11723 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
11724 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
11725 }
11726 } else
11727 {}
11728 }
11729#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
11730 if (unlikely(Py_SIZE(x) < 0)) {
11731 goto raise_neg_overflow;
11732 }
11733#else
11734 {
11735 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
11736 if (unlikely(result < 0))
11737 return (int) -1;
11738 if (unlikely(result == 1))
11739 goto raise_neg_overflow;
11740 }
11741#endif
11742 if ((sizeof(int) <= sizeof(unsigned long))) {
11743 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
11744 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
11745 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
11746 }
11747 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
11748raise_neg_overflow:
11749 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
11750raise_overflow:
11751 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
11752}
11753static CYTHON_INLINE int __Pyx_PySLong___Pyx_PyLong_As_int(PyObject *x) {
11754 const int is_unsigned = 0;
11755#if CYTHON_USE_PYLONG_INTERNALS
11756 if (__Pyx_PyLong_IsNeg(x)) {
11757 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
11758 const digit* digits = __Pyx_PyLong_Digits(x);
11759 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
11760 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
11761 long ival = - (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
11762 __PYX_VERIFY_RETURN_INT(int, long, ival)
11763 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
11764 return (int) (((int) -1) * (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
11765 }
11766 } else
11767 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
11768 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
11769 long ival = - (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
11770 __PYX_VERIFY_RETURN_INT(int, long, ival)
11771 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
11772 return (int) (((int) -1) * (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
11773 }
11774 } else
11775 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
11776 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
11777 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]));
11778 __PYX_VERIFY_RETURN_INT(int, long, ival)
11779 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
11780 return (int) (((int) -1) * (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
11781 }
11782 } else
11783 {}
11784 } else {
11785 const Py_ssize_t size = __Pyx_PyLong_DigitCount(x);
11786 const digit* digits = __Pyx_PyLong_Digits(x);
11787 if (size == 2 && (8 * sizeof(int) > 1 * PyLong_SHIFT)) {
11788 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
11789 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
11790 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
11791 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
11792 }
11793 } else
11794 if (size == 3 && (8 * sizeof(int) > 2 * PyLong_SHIFT)) {
11795 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
11796 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
11797 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
11798 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
11799 }
11800 } else
11801 if (size == 4 && (8 * sizeof(int) > 3 * PyLong_SHIFT)) {
11802 if ((8 * sizeof(long) > 4 * PyLong_SHIFT)) {
11803 __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])))
11804 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
11805 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
11806 }
11807 } else
11808 {}
11809 }
11810#endif
11811 #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
11812 if ((sizeof(int) <= sizeof(int)) && (sizeof(int) < sizeof(long))) {
11813 __PYX_VERIFY_RETURN_INT_EXC(int, int, PyLong_AsInt(x))
11814 } else
11815 #endif
11816 if ((sizeof(int) <= sizeof(long))) {
11817 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
11818 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
11819 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
11820 }
11821 return __Pyx_LargePyLong___Pyx_PyLong_As_int(x);
11822raise_neg_overflow:
11823 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
11824raise_overflow:
11825 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
11826}
11827static int __Pyx_LargePyLong___Pyx_PyLong_As_int(PyObject *x) {
11828#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11829#pragma GCC diagnostic push
11830#pragma GCC diagnostic ignored "-Wconversion"
11831#endif
11832 const int neg_one = (int) -1, const_zero = (int) 0;
11833#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11834#pragma GCC diagnostic pop
11835#endif
11836 const int is_unsigned = neg_one > const_zero;
11837 int val;
11838 int ret = -1;
11839#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
11840 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
11841 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
11842 if (unlikely(bytes_copied == -1)) {
11843 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
11844 goto raise_overflow;
11845 } else {
11846 ret = 0;
11847 }
11848#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
11849 int one = 1; int is_little = (int)*(unsigned char *)&one;
11850 unsigned char *bytes = (unsigned char *)&val;
11851 ret = _PyLong_AsByteArray((PyLongObject *)x,
11852 bytes, sizeof(val),
11853 is_little, !is_unsigned);
11854 if ((0)) goto raise_overflow;
11855#else
11856 PyObject *v;
11857 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
11858 int bits, remaining_bits, is_negative = 0;
11859 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
11860 if (likely(PyLong_CheckExact(x))) {
11861 v = __Pyx_NewRef(x);
11862 } else {
11863 v = PyNumber_Long(x);
11864 if (unlikely(!v)) return (int) -1;
11865 assert(PyLong_CheckExact(v));
11866 }
11867 {
11868 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
11869 if (unlikely(result < 0)) {
11870 Py_DECREF(v);
11871 return (int) -1;
11872 }
11873 is_negative = result == 1;
11874 }
11875 if (is_unsigned && unlikely(is_negative)) {
11876 Py_DECREF(v);
11877 PyErr_SetString(PyExc_OverflowError,
11878 "can't convert negative value to int");
11879 return (int) -1;
11880 } else if (is_negative) {
11881 stepval = PyNumber_Invert(v);
11882 Py_DECREF(v);
11883 if (unlikely(!stepval))
11884 return (int) -1;
11885 } else {
11886 stepval = v;
11887 }
11888 v = NULL;
11889 val = (int) 0;
11890 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
11891 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
11892 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
11893 PyObject *tmp, *digit;
11894 long idigit;
11895 digit = PyNumber_And(stepval, mask);
11896 if (unlikely(!digit)) goto done;
11897 idigit = PyLong_AsLong(digit);
11898 Py_DECREF(digit);
11899 if (unlikely(idigit < 0)) goto done;
11900 val |= ((int) idigit) << bits;
11901 tmp = PyNumber_Rshift(stepval, shift);
11902 if (unlikely(!tmp)) goto done;
11903 Py_DECREF(stepval); stepval = tmp;
11904 }
11905 Py_DECREF(shift); shift = NULL;
11906 Py_DECREF(mask); mask = NULL;
11907 {
11908 long idigit = PyLong_AsLong(stepval);
11909 if (unlikely(idigit < 0)) goto done;
11910 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
11911 if (unlikely(idigit >= (1L << remaining_bits)))
11912 goto raise_overflow;
11913 val |= ((int) idigit) << bits;
11914 }
11915 if (!is_unsigned) {
11916 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
11917 goto raise_overflow;
11918 if (is_negative)
11919 val = ~val;
11920 }
11921 ret = 0;
11922done:
11923 Py_XDECREF(shift);
11924 Py_XDECREF(mask);
11925 Py_XDECREF(stepval);
11926#endif
11927 if (unlikely(ret))
11928 return (int) -1;
11929 return val;
11930raise_overflow:
11931 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
11932}
11933static CYTHON_INLINE int __Pyx_PyLong___Pyx_PyLong_As_int(PyObject *x) {
11934#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11935#pragma GCC diagnostic push
11936#pragma GCC diagnostic ignored "-Wconversion"
11937#endif
11938 const int neg_one = (int) -1, const_zero = (int) 0;
11939#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
11940#pragma GCC diagnostic pop
11941#endif
11942 const int is_unsigned = neg_one > const_zero;
11943 if (is_unsigned) {
11944 #if CYTHON_USE_PYLONG_INTERNALS
11945 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
11946 goto raise_neg_overflow;
11947 } else if (__Pyx_PyLong_IsCompact(x)) {
11948 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
11949 } else
11950 #endif
11951 {
11952 return __Pyx_PyULong___Pyx_PyLong_As_int(x);
11953 }
11954 } else {
11955 #if CYTHON_USE_PYLONG_INTERNALS
11956 if (__Pyx_PyLong_IsCompact(x)) {
11957 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
11958 } else
11959 #endif
11960 {
11961 return __Pyx_PySLong___Pyx_PyLong_As_int(x);
11962 }
11963 }
11964#if CYTHON_USE_PYLONG_INTERNALS
11965raise_neg_overflow:
11966 return __Pyx_raise_neg_overflow___Pyx_PyLong_As_int();
11967raise_overflow:
11968 return __Pyx_raise_overflow___Pyx_PyLong_As_int();
11969#endif
11970}
11971static int __Pyx_NonPyLong___Pyx_PyLong_As_int(PyObject *x) {
11972 int val;
11973 PyObject *tmp = __Pyx_PyNumber_Long(x);
11974 if (!tmp) return (int) -1;
11975 val = __Pyx_PyLong_As_int(tmp);
11976 Py_DECREF(tmp);
11977 return val;
11978}
11979static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
11980 if (likely(PyLong_Check(x))) {
11981 return __Pyx_PyLong___Pyx_PyLong_As_int(x);
11982 } else {
11983 return __Pyx_NonPyLong___Pyx_PyLong_As_int(x);
11984 }
11985}
11986
11987/* GetRuntimeVersion */
11988#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
11989void __Pyx_init_runtime_version(void) {
11990 if (__Pyx_cached_runtime_version == 0) {
11991 const char* rt_version = Py_GetVersion();
11992 unsigned long version = 0;
11993 unsigned long factor = 0x01000000UL;
11994 unsigned int digit = 0;
11995 int i = 0;
11996 while (factor) {
11997 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
11998 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
11999 ++i;
12000 }
12001 version += factor * digit;
12002 if (rt_version[i] != '.')
12003 break;
12004 digit = 0;
12005 factor >>= 8;
12006 ++i;
12007 }
12008 __Pyx_cached_runtime_version = version;
12009 }
12010}
12011#endif
12012static unsigned long __Pyx_get_runtime_version(void) {
12013#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
12014 return Py_Version & ~0xFFUL;
12015#else
12016 return __Pyx_cached_runtime_version;
12017#endif
12018}
12019
12020/* CheckBinaryVersion */
12021static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
12022 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
12023 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
12024 return 0;
12025 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
12026 return 1;
12027 {
12028 char message[200];
12029 PyOS_snprintf(message, sizeof(message),
12030 "compile time Python version %d.%d "
12031 "of module '%.100s' "
12032 "%s "
12033 "runtime version %d.%d",
12034 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
12035 __Pyx_MODULE_NAME,
12036 (allow_newer) ? "was newer than" : "does not match",
12037 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
12038 );
12039 return PyErr_WarnEx(NULL, message, 1);
12040 }
12041}
12042
12043/* NewCodeObj */
12044#if CYTHON_COMPILING_IN_LIMITED_API
12045 static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
12046 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
12047 PyObject *fv, PyObject *cell, PyObject* fn,
12048 PyObject *name, int fline, PyObject *lnos) {
12049 PyObject *exception_table = NULL;
12050 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
12051 #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
12052 PyObject *version_info;
12053 PyObject *py_minor_version = NULL;
12054 #endif
12055 long minor_version = 0;
12056 #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
12057 minor_version = 11;
12058 #else
12059 if (!(version_info = PySys_GetObject("version_info"))) goto end;
12060 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
12061 minor_version = PyLong_AsLong(py_minor_version);
12062 Py_DECREF(py_minor_version);
12063 if (minor_version == -1 && PyErr_Occurred()) goto end;
12064 #endif
12065 if (!(types_module = PyImport_ImportModule("types"))) goto end;
12066 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
12067 if (minor_version <= 10) {
12068 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
12069 c, n, v, fn, name, fline, lnos, fv, cell);
12070 } else {
12071 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
12072 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
12073 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
12074 }
12075 end:
12076 Py_XDECREF(code_type);
12077 Py_XDECREF(exception_table);
12078 Py_XDECREF(types_module);
12079 if (!result) {
12080 PyObject *exc_type, *exc_value, *exc_tb;
12081 PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
12082 if (PyErr_WarnFormat(
12083 PyExc_RuntimeWarning, 1,
12084 "Code object creation failed in Cython module: %S\nTry recompiling with a more recent version of Cython.",
12085 exc_value ? exc_value : exc_type) == 0) {
12086 result = Py_None;
12087 Py_INCREF(result);
12088 }
12089 Py_DECREF(exc_type);
12090 Py_XDECREF(exc_value);
12091 Py_XDECREF(exc_tb);
12092 }
12093 return result;
12094 }
12095#elif PY_VERSION_HEX >= 0x030B0000
12096 static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
12097 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
12098 PyObject *fv, PyObject *cell, PyObject* fn,
12099 PyObject *name, int fline, PyObject *lnos) {
12100 PyCodeObject *result;
12101 result =
12102 #if PY_VERSION_HEX >= 0x030C0000
12103 PyUnstable_Code_NewWithPosOnlyArgs
12104 #else
12105 PyCode_NewWithPosOnlyArgs
12106 #endif
12107 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
12108 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
12109 if (likely(result))
12110 result->_co_firsttraceable = 0;
12111 #endif
12112 return result;
12113 }
12114#elif !CYTHON_COMPILING_IN_PYPY
12115 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
12116 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
12117#else
12118 #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
12119 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
12120#endif
12121static PyObject* __Pyx_PyCode_New(
12122 const __Pyx_PyCode_New_function_description descr,
12123 PyObject * const *varnames,
12124 PyObject *filename,
12125 PyObject *funcname,
12126 PyObject *line_table,
12127 PyObject *tuple_dedup_map
12128) {
12129 PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
12130 Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
12131 PyObject *varnames_tuple = PyTuple_New(var_count);
12132 if (unlikely(!varnames_tuple)) return NULL;
12133 for (Py_ssize_t i=0; i < var_count; i++) {
12134 Py_INCREF(varnames[i]);
12135 if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
12136 }
12137 #if CYTHON_COMPILING_IN_LIMITED_API
12138 varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
12139 if (!varnames_tuple_dedup) {
12140 if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
12141 varnames_tuple_dedup = varnames_tuple;
12142 }
12143 #else
12144 varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
12145 if (unlikely(!varnames_tuple_dedup)) goto done;
12146 #endif
12147 #if CYTHON_AVOID_BORROWED_REFS
12148 Py_INCREF(varnames_tuple_dedup);
12149 #endif
12150 if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
12151 Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
12152 #if !CYTHON_ASSUME_SAFE_SIZE
12153 if (unlikely(line_table_length == -1)) goto done;
12154 #endif
12155 Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
12156 code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
12157 if (unlikely(!code_bytes)) goto done;
12158 char* c_code_bytes = PyBytes_AsString(code_bytes);
12159 if (unlikely(!c_code_bytes)) goto done;
12160 memset(c_code_bytes, 0, (size_t) code_len);
12161 }
12162 code_obj = (PyObject*) __Pyx__PyCode_New(
12163 (int) descr.argcount,
12164 (int) descr.num_posonly_args,
12165 (int) descr.num_kwonly_args,
12166 (int) descr.nlocals,
12167 0,
12168 (int) descr.flags,
12169 code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
12170 __pyx_mstate_global->__pyx_empty_tuple,
12171 __pyx_mstate_global->__pyx_empty_tuple,
12172 varnames_tuple_dedup,
12173 __pyx_mstate_global->__pyx_empty_tuple,
12174 __pyx_mstate_global->__pyx_empty_tuple,
12175 filename,
12176 funcname,
12177 (int) descr.first_line,
12178 (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
12179 );
12180done:
12181 Py_XDECREF(code_bytes);
12182 #if CYTHON_AVOID_BORROWED_REFS
12183 Py_XDECREF(varnames_tuple_dedup);
12184 #endif
12185 Py_DECREF(varnames_tuple);
12186 return code_obj;
12187}
12188
12189/* DecompressString */
12190CYTHON_UNUSED
12191static CYTHON_SMALL_CODE PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
12192#ifdef __Pyx_DecompressString_UNUSED
12193 CYTHON_UNUSED_VAR(s);
12194 CYTHON_UNUSED_VAR(length);
12195 CYTHON_UNUSED_VAR(algo);
12196 return NULL;
12197#else
12198 PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
12199 const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
12200 PyObject *methodname = PyUnicode_FromString("decompress");
12201 if (unlikely(!methodname)) return NULL;
12202 #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
12203 if (algo == 3) {
12204 PyObject *fromlist = Py_BuildValue("[O]", methodname);
12205 if (unlikely(!fromlist)) goto bad;
12206 module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
12207 Py_DECREF(fromlist);
12208 } else
12209 #endif
12210 module = PyImport_ImportModule(module_name);
12211 if (unlikely(!module)) goto import_failed;
12212 decompress = PyObject_GetAttr(module, methodname);
12213 if (unlikely(!decompress)) goto import_failed;
12214 {
12215 #ifdef __cplusplus
12216 char *memview_bytes = const_cast<char*>(s);
12217 #else
12218 #if defined(__clang__)
12219 #pragma clang diagnostic push
12220 #pragma clang diagnostic ignored "-Wcast-qual"
12221 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
12222 #pragma GCC diagnostic push
12223 #pragma GCC diagnostic ignored "-Wcast-qual"
12224 #endif
12225 char *memview_bytes = (char*) s;
12226 #if defined(__clang__)
12227 #pragma clang diagnostic pop
12228 #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
12229 #pragma GCC diagnostic pop
12230 #endif
12231 #endif
12232 #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
12233 int memview_flags = 0x100;
12234 #else
12235 int memview_flags = PyBUF_READ;
12236 #endif
12237 compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
12238 }
12239 if (unlikely(!compressed_bytes)) {
12240 Py_DECREF(decompress);
12241 goto bad;
12242 }
12243 decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
12244 Py_DECREF(compressed_bytes);
12245 Py_DECREF(decompress);
12246 Py_DECREF(module);
12247 Py_DECREF(methodname);
12248 return decompressed;
12249import_failed:
12250 PyErr_Format(PyExc_ImportError,
12251 "Failed to import '%.20s.decompress' - cannot initialise module strings. "
12252 "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
12253 module_name, algo);
12254bad:
12255 Py_XDECREF(module);
12256 Py_DECREF(methodname);
12257 return NULL;
12258#endif
12259}
12260
12261#include <string.h>
12262static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
12263 size_t len = strlen(s);
12264 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
12265 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
12266 return -1;
12267 }
12268 return (Py_ssize_t) len;
12269}
12270static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
12271 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
12272 if (unlikely(len < 0)) return NULL;
12273 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
12274}
12275static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
12276 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
12277 if (unlikely(len < 0)) return NULL;
12278 return PyByteArray_FromStringAndSize(c_str, len);
12279}
12280static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
12281 Py_ssize_t ignore;
12282 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
12283}
12284#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
12285static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
12286 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
12287#if CYTHON_COMPILING_IN_LIMITED_API
12288 {
12289 const char* result;
12290 Py_ssize_t unicode_length;
12291 CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
12292 #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
12293 if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
12294 #else
12295 result = PyUnicode_AsUTF8AndSize(o, length);
12296 #endif
12297 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
12298 unicode_length = PyUnicode_GetLength(o);
12299 if (unlikely(unicode_length < 0)) return NULL;
12300 if (unlikely(unicode_length != *length)) {
12301 PyUnicode_AsASCIIString(o);
12302 return NULL;
12303 }
12304 #endif
12305 return result;
12306 }
12307#else
12308#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
12309 if (likely(PyUnicode_IS_ASCII(o))) {
12310 *length = PyUnicode_GET_LENGTH(o);
12311 return PyUnicode_AsUTF8(o);
12312 } else {
12313 PyUnicode_AsASCIIString(o);
12314 return NULL;
12315 }
12316#else
12317 return PyUnicode_AsUTF8AndSize(o, length);
12318#endif
12319#endif
12320}
12321#endif
12322static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
12323#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
12324 if (PyUnicode_Check(o)) {
12325 return __Pyx_PyUnicode_AsStringAndSize(o, length);
12326 } else
12327#endif
12328 if (PyByteArray_Check(o)) {
12329#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
12330 *length = PyByteArray_GET_SIZE(o);
12331 return PyByteArray_AS_STRING(o);
12332#else
12333 *length = PyByteArray_Size(o);
12334 if (*length == -1) return NULL;
12335 return PyByteArray_AsString(o);
12336#endif
12337 } else
12338 {
12339 char* result;
12340 int r = PyBytes_AsStringAndSize(o, &result, length);
12341 if (unlikely(r < 0)) {
12342 return NULL;
12343 } else {
12344 return result;
12345 }
12346 }
12347}
12348static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
12349 int is_true = x == Py_True;
12350 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
12351 else return PyObject_IsTrue(x);
12352}
12353static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
12354 int retval;
12355 if (unlikely(!x)) return -1;
12356 retval = __Pyx_PyObject_IsTrue(x);
12357 Py_DECREF(x);
12358 return retval;
12359}
12360static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
12361 __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
12362 #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
12363 if (unlikely(!result_type_name)) goto bad;
12364 #endif
12365 if (PyLong_Check(result)) {
12366 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
12367 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
12368 "The ability to return an instance of a strict subclass of int is deprecated, "
12369 "and may be removed in a future version of Python.",
12370 result_type_name)) {
12371 __Pyx_DECREF_TypeName(result_type_name);
12372 goto bad;
12373 }
12374 __Pyx_DECREF_TypeName(result_type_name);
12375 return result;
12376 }
12377 PyErr_Format(PyExc_TypeError,
12378 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
12379 result_type_name);
12380 __Pyx_DECREF_TypeName(result_type_name);
12381bad:
12382 Py_DECREF(result);
12383 return NULL;
12384}
12385static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
12386#if CYTHON_USE_TYPE_SLOTS
12387 PyNumberMethods *m;
12388#endif
12389 PyObject *res = NULL;
12390 if (likely(PyLong_Check(x)))
12391 return __Pyx_NewRef(x);
12392#if CYTHON_USE_TYPE_SLOTS
12393 m = Py_TYPE(x)->tp_as_number;
12394 if (likely(m && m->nb_int)) {
12395 res = m->nb_int(x);
12396 }
12397#else
12398 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
12399 res = PyNumber_Long(x);
12400 }
12401#endif
12402 if (likely(res)) {
12403 if (unlikely(!PyLong_CheckExact(res))) {
12404 return __Pyx_PyNumber_LongWrongResultType(res);
12405 }
12406 }
12407 else if (!PyErr_Occurred()) {
12408 PyErr_SetString(PyExc_TypeError,
12409 "an integer is required");
12410 }
12411 return res;
12412}
12413static CYTHON_INLINE Py_ssize_t __Pyx_PyLong_AsSsize_t(PyObject* b) {
12414 #if CYTHON_USE_PYLONG_INTERNALS
12415 Py_ssize_t ival;
12416 const Py_ssize_t size = __Pyx_PyLong_DigitCount(b);
12417 const int is_neg = __Pyx_PyLong_IsNeg(b);
12418 const digit* digits = __Pyx_PyLong_Digits(b);
12419 if (size == 0) return 0;
12420 #if SIZEOF_SIZE_T * 8 > 1 * PyLong_SHIFT
12421 if (size == 1) {
12422 ival = (Py_ssize_t) (((size_t)digits[0]));
12423 } else
12424 #endif
12425 #if SIZEOF_SIZE_T * 8 > 2 * PyLong_SHIFT
12426 if (size == 2) {
12427 ival = (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
12428 } else
12429 #endif
12430 #if SIZEOF_SIZE_T * 8 > 3 * PyLong_SHIFT
12431 if (size == 3) {
12432 ival = (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
12433 } else
12434 #endif
12435 #if SIZEOF_SIZE_T * 8 > 4 * PyLong_SHIFT
12436 if (size == 4) {
12437 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]));
12438 } else
12439 #endif
12440 return PyLong_AsSsize_t(b);
12441 return is_neg ? -ival : ival;
12442 #else
12443 return PyLong_AsSsize_t(b);
12444 #endif
12445}
12446static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
12447 if (likely(PyLong_Check(b))) {
12448 return __Pyx_PyLong_AsSsize_t(b);
12449 } else {
12450 Py_ssize_t ival;
12451 PyObject *x = PyNumber_Index(b);
12452 if (unlikely(!x)) return -1;
12453 ival = __Pyx_PyLong_AsSsize_t(x);
12454 Py_DECREF(x);
12455 return ival;
12456 }
12457}
12458static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
12459 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
12460 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
12461 } else {
12462 Py_ssize_t ival;
12463 PyObject *x;
12464 x = PyNumber_Index(o);
12465 if (!x) return -1;
12466 ival = PyLong_AsLong(x);
12467 Py_DECREF(x);
12468 return ival;
12469 }
12470}
12471static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
12472 CYTHON_UNUSED_VAR(b);
12473 return __Pyx_NewRef(Py_None);
12474}
12475static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
12476 return __Pyx_NewRef(b ? Py_True: Py_False);
12477}
12478static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
12479 return PyLong_FromSize_t(ival);
12480}
12481
12482
12483/* MultiPhaseInitModuleState */
12484#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
12485#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12486#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
12487 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
12488#else
12489 #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
12490#endif
12491#endif
12492#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
12493#error "Module state with PEP489 requires atomics. Currently that's one of\
12494 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
12495#endif
12496#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12497#define __Pyx_ModuleStateLookup_Lock()
12498#define __Pyx_ModuleStateLookup_Unlock()
12499#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
12500static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
12501#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
12502#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
12503#elif defined(__cplusplus) && __cplusplus >= 201103L
12504#include <mutex>
12505static std::mutex __Pyx_ModuleStateLookup_mutex;
12506#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
12507#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
12508#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
12509#include <threads.h>
12510static mtx_t __Pyx_ModuleStateLookup_mutex;
12511static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
12512static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
12513 mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
12514}
12515#define __Pyx_ModuleStateLookup_Lock()\
12516 call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
12517 mtx_lock(&__Pyx_ModuleStateLookup_mutex)
12518#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
12519#elif defined(HAVE_PTHREAD_H)
12520#include <pthread.h>
12521static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
12522#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
12523#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
12524#elif defined(_WIN32)
12525#include <Windows.h> // synchapi.h on its own doesn't work
12526static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
12527#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
12528#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
12529#else
12530#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
12531 Requires C standard >= C11, or C++ standard >= C++11,\
12532 or pthreads, or the Windows 32 API, or Python >= 3.13."
12533#endif
12534typedef struct {
12535 int64_t id;
12536 PyObject *module;
12537} __Pyx_InterpreterIdAndModule;
12538typedef struct {
12539 char interpreter_id_as_index;
12540 Py_ssize_t count;
12541 Py_ssize_t allocated;
12542 __Pyx_InterpreterIdAndModule table[1];
12543} __Pyx_ModuleStateLookupData;
12544#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
12545#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12546static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
12547#endif
12548#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12549static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
12550#else
12551static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
12552#endif
12553static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
12554 __Pyx_InterpreterIdAndModule* table,
12555 Py_ssize_t count,
12556 int64_t interpreterId) {
12557 __Pyx_InterpreterIdAndModule* begin = table;
12558 __Pyx_InterpreterIdAndModule* end = begin + count;
12559 if (begin->id == interpreterId) {
12560 return begin;
12561 }
12562 while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
12563 __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
12564 if (halfway->id == interpreterId) {
12565 return halfway;
12566 }
12567 if (halfway->id < interpreterId) {
12568 begin = halfway;
12569 } else {
12570 end = halfway;
12571 }
12572 }
12573 for (; begin < end; ++begin) {
12574 if (begin->id >= interpreterId) return begin;
12575 }
12576 return begin;
12577}
12578static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
12579 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
12580 if (interpreter_id == -1) return NULL;
12581#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12582 __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
12583 {
12584 __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
12585 if (likely(data)) {
12586 __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
12587 if (likely(data == new_data)) {
12588 goto read_finished;
12589 }
12590 }
12591 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
12592 __Pyx_ModuleStateLookup_Lock();
12593 __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
12594 data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
12595 __Pyx_ModuleStateLookup_Unlock();
12596 }
12597 read_finished:;
12598#else
12599 __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
12600#endif
12601 __Pyx_InterpreterIdAndModule* found = NULL;
12602 if (unlikely(!data)) goto end;
12603 if (data->interpreter_id_as_index) {
12604 if (interpreter_id < data->count) {
12605 found = data->table+interpreter_id;
12606 }
12607 } else {
12608 found = __Pyx_State_FindModuleStateLookupTableLowerBound(
12609 data->table, data->count, interpreter_id);
12610 }
12611 end:
12612 {
12613 PyObject *result=NULL;
12614 if (found && found->id == interpreter_id) {
12615 result = found->module;
12616 }
12617#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12618 __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
12619#endif
12620 return result;
12621 }
12622}
12623#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12624static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
12625 while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
12626}
12627#else
12628#define __Pyx_ModuleStateLookup_wait_until_no_readers()
12629#endif
12630static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
12631 Py_ssize_t to_allocate = (*old_data)->allocated;
12632 while (to_allocate <= interpreter_id) {
12633 if (to_allocate == 0) to_allocate = 1;
12634 else to_allocate *= 2;
12635 }
12636 __Pyx_ModuleStateLookupData *new_data = *old_data;
12637 if (to_allocate != (*old_data)->allocated) {
12638 new_data = (__Pyx_ModuleStateLookupData *)realloc(
12639 *old_data,
12640 sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
12641 if (!new_data) {
12642 PyErr_NoMemory();
12643 return -1;
12644 }
12645 for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
12646 new_data->table[i].id = i;
12647 new_data->table[i].module = NULL;
12648 }
12649 new_data->allocated = to_allocate;
12650 }
12651 new_data->table[interpreter_id].module = module;
12652 if (new_data->count < interpreter_id+1) {
12653 new_data->count = interpreter_id+1;
12654 }
12655 *old_data = new_data;
12656 return 0;
12657}
12658static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
12659 __Pyx_InterpreterIdAndModule *read = data->table;
12660 __Pyx_InterpreterIdAndModule *write = data->table;
12661 __Pyx_InterpreterIdAndModule *end = read + data->count;
12662 for (; read<end; ++read) {
12663 if (read->module) {
12664 write->id = read->id;
12665 write->module = read->module;
12666 ++write;
12667 }
12668 }
12669 data->count = write - data->table;
12670 for (; write<end; ++write) {
12671 write->id = 0;
12672 write->module = NULL;
12673 }
12674 data->interpreter_id_as_index = 0;
12675}
12676static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
12677 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
12678 if (interpreter_id == -1) return -1;
12679 int result = 0;
12680 __Pyx_ModuleStateLookup_Lock();
12681#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12682 __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
12683 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
12684#else
12685 __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
12686#endif
12687 __Pyx_ModuleStateLookupData *new_data = old_data;
12688 if (!new_data) {
12689 new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
12690 if (!new_data) {
12691 result = -1;
12692 PyErr_NoMemory();
12693 goto end;
12694 }
12695 new_data->allocated = 1;
12696 new_data->interpreter_id_as_index = 1;
12697 }
12698 __Pyx_ModuleStateLookup_wait_until_no_readers();
12699 if (new_data->interpreter_id_as_index) {
12700 if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
12701 result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
12702 goto end;
12703 }
12704 __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
12705 }
12706 {
12707 Py_ssize_t insert_at = 0;
12708 {
12709 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
12710 new_data->table, new_data->count, interpreter_id);
12711 assert(lower_bound);
12712 insert_at = lower_bound - new_data->table;
12713 if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
12714 lower_bound->module = module;
12715 goto end; // already in table, nothing more to do
12716 }
12717 }
12718 if (new_data->count+1 >= new_data->allocated) {
12719 Py_ssize_t to_allocate = (new_data->count+1)*2;
12720 new_data =
12721 (__Pyx_ModuleStateLookupData*)realloc(
12722 new_data,
12723 sizeof(__Pyx_ModuleStateLookupData) +
12724 (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
12725 if (!new_data) {
12726 result = -1;
12727 new_data = old_data;
12728 PyErr_NoMemory();
12729 goto end;
12730 }
12731 new_data->allocated = to_allocate;
12732 }
12733 ++new_data->count;
12734 int64_t last_id = interpreter_id;
12735 PyObject *last_module = module;
12736 for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
12737 int64_t current_id = new_data->table[i].id;
12738 new_data->table[i].id = last_id;
12739 last_id = current_id;
12740 PyObject *current_module = new_data->table[i].module;
12741 new_data->table[i].module = last_module;
12742 last_module = current_module;
12743 }
12744 }
12745 end:
12746#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12747 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
12748#else
12749 __Pyx_ModuleStateLookup_data = new_data;
12750#endif
12751 __Pyx_ModuleStateLookup_Unlock();
12752 return result;
12753}
12754static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
12755 int64_t interpreter_id = PyInterpreterState_GetID(PyInterpreterState_Get());
12756 if (interpreter_id == -1) return -1;
12757 __Pyx_ModuleStateLookup_Lock();
12758#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12759 __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
12760 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
12761#else
12762 __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
12763#endif
12764 if (data->interpreter_id_as_index) {
12765 if (interpreter_id < data->count) {
12766 data->table[interpreter_id].module = NULL;
12767 }
12768 goto done;
12769 }
12770 {
12771 __Pyx_ModuleStateLookup_wait_until_no_readers();
12772 __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
12773 data->table, data->count, interpreter_id);
12774 if (!lower_bound) goto done;
12775 if (lower_bound->id != interpreter_id) goto done;
12776 __Pyx_InterpreterIdAndModule *end = data->table+data->count;
12777 for (;lower_bound<end-1; ++lower_bound) {
12778 lower_bound->id = (lower_bound+1)->id;
12779 lower_bound->module = (lower_bound+1)->module;
12780 }
12781 }
12782 --data->count;
12783 if (data->count == 0) {
12784 free(data);
12785 data = NULL;
12786 }
12787 done:
12788#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
12789 __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
12790#else
12791 __Pyx_ModuleStateLookup_data = data;
12792#endif
12793 __Pyx_ModuleStateLookup_Unlock();
12794 return 0;
12795}
12796#endif
12797
12798/* #### Code section: utility_code_pragmas_end ### */
12799#ifdef _MSC_VER
12800#pragma warning( pop )
12801#endif
12802
12803
12804
12805/* #### Code section: end ### */
12806#endif /* Py_PYTHON_H */
Int n
Definition Headers.h:28
Double T
Definition Headers.h:87
Double r
Definition Headers.h:83
Double U
Definition Headers.h:88
Double f
Definition Headers.h:64
Double s
Definition Headers.h:84
Double * z
Definition Headers.h:49
Double v
Definition Headers.h:95
double dSe_dpsic
virtual void setTolerances(const double *rwork_tol)
void calc(const double &Sw)
virtual void calc_from_psic(const double &psicIn)
#define c(i)
Definition jf.h:21
Richards free-function PSK closures (moved here from proteus/richards/psk_models.h).